-
Notifications
You must be signed in to change notification settings - Fork 20.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eth_compilers, eth_compileSolidity are gone in go-ethereum 1.6.0 #3793
Comments
Compiling via RPC has been removed in #3740 (see ethereum/EIPs#209 for why). We will bring it back under a different method name if there is sufficient user demand. You're the second person to complain about it within 2 days, so it looks like there is demand. |
Leaving this open so other people can find this issue and raise their voice here. |
@fjl, Thanks for the info. It would be convenient to have it on RPC but I have the issue as well on IPC, any idea why? |
When I say RPC I mean the IPC endpoint too. The methods have been removed by the linked PR. There is no way to invoke solc through geth at this time. |
This feature is really useful. Can we please have the compilers available? |
Eth.compile is a great feature! |
I too think eth.compile is a great feature, and it was an important part of my Dapp, so that people could generate a simple contract from a web form, compile and deploy it, all without knowledge of Solididty or the need to use Mist. |
Updated my project due to this issue ethereum/solidity#1708, And now :/ |
Also voting for bringing it back, otherwise at least we should update the official docs and tutorials to not confuse a newcomers (like me) |
Living exactly the same situation as the comment above from vyorkin. Newcomer, confused by outdated official tutorial. |
Either way, the docs/website should reflect the latest state I think :) On this page https://www.ethereum.org/greeter it still assumes you're using solc. |
eth_compileSolidity, or analogue should be available over RPC . Please. |
If the old console command has to go, can we not just replace it with a similarly named function that calls a solidity compiler? It just seems sensible that it's there. Or at least, make a tutorial for writing and making solidity apps that people can follow. I was trying to hard to learn how to use geth or ethereum or anything. All the introductions I can find use Solidity [1]. This system is hard enough to follow or install as it is without all the documentation leading us down dead ends after DAYS AND DAYS of trying to install compilers that apparently don't exist now. So how are we meant to make or deploy smart contracts? This crypto tool has amazing potential but the impossibility of learning how to use or interact with it is terrible. I can run geth as a fast node on my windows 10 machine, and I have a command-line solc compiler on my MacBook. But I don't seem to be able to get both at once! Windows10: For example chocolaty now doesn't work, despite tutorials telling me its by far the easiest way to get solc on Windows. If instead I run ">npm install -g solc" ([2]) it seems to work but then when I run ">solc" it just says it's not recognised as a command, program or batch file. MacBook: I think solc is working in Terminal, but without a tutorial I'm stuck with rookie errors in even compiling the "Hello World" of [1]. I describe this issue below. [1] https://ethereum.org/greeter#getting-other-people-to-interact-with-your-code
|
Sorry, but how to adding my contract into the gethereum in version of geth 1.6.0? Okey, web3.eth.contract([]).new() just still can be used. |
The greeter tutorial (and the token, crowdfunding ones) is not yet updated for the changes in 1.6.0. It makes it harder for people who are trying to learn Ethereum to compile and run contracts. Please fix/advise |
Please bring back the old command line-compilers, they were very useful for testing |
I too think eth.compile is a great feature, please bring it back to the latest version. |
many documents tutoriaIs, etc. point to command line compilers this change breaks them,I too spent DAYS trying to make this work. Please bring it back |
Hi all, Perhaps the following will help you. To get a feeling of Solidity (not sure how up to date it is, but will give you an idea of syntax): In order to get the "Hello World" smart contract to work, you need to compile it with solc like so: where test.sol contains
"output" can be an arbitrary directory on your machine. For more info, go here: http://solidity.readthedocs.io/en/develop/using-the-compiler.html Ignore the formatting, as I copied it from @GregoryFenn; the solidity lexer ignores whitespace so it doesn't matter. This will compile your contract. |
I use eth.compile.solidity for a custom deploy script, it was very useful, please bring back. |
Some useful workaround for the moment: https://ethereum.stackexchange.com/questions/15435/how-to-compile-solidity-contracts-with-geth-v1-6 |
We're having downstream issues now because of this. Can you put those functions back, please? |
Ethereum.org's own greeter example is out of date now, should update the docs to demonstrate the steps to compiling if these functions aren't restored |
This cost me two days of work to work-around. I don't understand why you guys would intentionally make it harder to compile smart-contracts. We're compiling client-side now... |
Since a lot of people are saying they're having a hard time finding a workaround. Here's a code snippet that will get you the same result without
Replace all instances of |
This solution won't work under react, and it also requires you to have solc installed locally. It won't work with metamask against ethereum mainnet, either. Here's my solution, see the full code at: www.github.com/tectract/ethdeployer in the top-level .html file of my create-react-app:
and then in the code:
the above snippet detects either the local web3 object or switches to the metamask-provided web3 object, if that exists...
Note, I had to wait for the window.BrowserSolc object to load, which is the reason for the setTimeout there. note also I'm using the lodash lib as "_" here. Cheers~ |
Correct, my script is for server-side compilation via Node, it will not work client side. |
Anyone knows where is the source code of this page: https://www.ethereum.org/greeter and who can fix the glaring error? cc: @vbuterin |
Working update as of 4th December 2017: Alright everyone... let's calm down... languages like C++ (and respective communities) have been around for decades, Solidity has been around for years... the newest version at that, for just months. Plus, the Ethereum Foundation team, which is probably in charge of changes like this, is literally 3 people. Sheesh, give 'em a break. With that said, all you need for the greeter example to compile is the
Then, you can use the command line tool from ***NOTE: on the command line, the command is
(I named my solidity file And pit pat piffy wing wong wang just like that1, you've got your compiled binaries and contract ABIs in the folder
BONUS: to get perfect linting for the code (the original example will compile just fine, but with warnings), add
|
Note that the official site still documents the method, though. |
Please bring back the feature, it's very useful for any kind of projects |
Internet is full of examples with eth_compileSolidity used in compile function, so now every newbie trying to learn from examples on the web is failing. Some people just think its all about the code and can't think outside the box, it's not about the code but its about the people so whoever orchestrated this change has failed. You should first find out how people are using something you are about to change and how much are they using it and then carefully plan how to change it and also inform people where change is about to happen to change the code. This is not a way how to treat an open source project of this importance or maybe people o charge think it is but I think it just sucks for community. |
These are from the days when the compiler was coupled to the RPC layer...which imho is a big no no. But we had a big EIP discussion about this...someone feel free to take up the charge on the EIP. |
I'm giving up entirely on Ethereum. It was a nice idea but it's become just another cryptocurrency like bitcoin and wasted its chance to be a great distrubuted computing language due to infuriating barriers to entry. I'm a moderaderly good python, C++ and C# programmer and have a PhD in Cyber Security, but for the life of me I can't get to grips with this ruddy software. Come back when you've got a working and accessible API to write and deploy DAPPs, add funds, check balances and search and use other DAPPs. |
please see how I compile solidity code CLIENT-SIDE, using web3 and browser-solc, here: https://blockgeeks.com/guides/how-to-learn-solidity/ relevant source code is here: https://github.com/Tectract/EthDeployer/blob/master/src/Deploy.js This should be the standard until solc is added back into GETH, if ever, imho. My article was recently translated to Chinese too :) |
If you just need to compile and deploy a contract, you can use the tool I wrote, running here: https://www.enledger.io/EthDeployer/ Using Metamask and Chrome. It's not flawless, but I did recently updated it to handle deployment of ERC20 contracts. |
If the method is not supposed to exist, it should probably not be mentioned at https://github.com/ethereum/go-ethereum/wiki/Contract-Tutorial |
Is this normal:
|
And probably the official doc: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_compilesolidity ? |
System information
Geth version: v1.6.0-unstable-6d038e76/linux/go1.7.3
OS & Version: Linux/Ubuntu 16.04.1 LTS (x86_64)
Commit hash : 6d038e7
Expected behaviour
Running
eth.getCompilers()
in the geth console should return an array of compilers['solidity']
that could even be empty ([]
)Actual behaviour
The command returns
Error: The method eth_getCompilers does not exist/is not available
but I have started the node with--ipcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3"
and I am able to run othereth
commands. I was actually trying to execute the command via RPC withweb3j
and was getting an error then realized it didn't work in the console either.Steps to reproduce the behaviour
eth.getCompilers()
[]
, not an error messageThe text was updated successfully, but these errors were encountered: