Hello
I am currently reading the example(
https://github.com/ethereum/web3.js/blob/master/example/contract.html).
As per above tutorial, I'm try to compile my contract source code using web3.eth.compile.solidity, but this did not working as per mention in above example.
I'm using web3 version(0.8.1);
Hope anyone help me to understand, this.
Thanks.
Comments
I got the solution,
only Have to install solc. and setSolc.
I tried:
admin.setSolc("/usr/local/bin/solc")
admin.setSolc("/usr/local/bin/solc",function(){ })
and
admin.setSolc("/usr/local/bin/solc",function(){ return "/usr/local/bin/solc"; })
None of these work.
Every time I do:
eth.getCompilers()
I get and empty array:
[ '' ]
Here are my notes:
brew install llvm --HEAD --with-clang
brew uninstall cpp-ethereum #uninstall the existing cpp-ethereum
brew tap ethereum/ethereum
brew install cpp-ethereum --with-evmjit
brew linkapps cpp-ethereum
#test:
which solc
#should return a valid path
#Now run geth:
geth console 2>>geth.log
eth.getCompilers()
#Should return:
['Solidity' ]
#Win!
I'm by no means an expert on this.
Bumping this thread since I am stuck...
eth.getCompilers()
I get and empty array:
[ '' ]
Same for me, even after following the steps Eamorr provided.
which solc
#should return a valid path
Here nothing happens.
And as mentioned above, do not get the ['Solidity'] message, just a blank [ ]!
Any advice, total noob:) OS X El captain.
Cheers!
brew update
brew upgrade
brew tap ethereum/ethereum
brew install solidity
brew linkapps solidity
solidity.readthedocs.io/en/latest/installing-solidity.html