I need to create the ethereum tokens for this i learn about contracts. I try with simple contract using this link https://www.ethereum.org/greeter

when i try this contract


var greeterSource = 'contract mortal { address owner; function mortal() { owner = msg.sender; } function kill() { if (msg.sender == owner) selfdestruct(owner); } } contract greeter is mortal { string greeting; function greeter(string _greeting) public { greeting = _greeting; } function greet() constant returns (string) { return greeting; } }'

var greeterCompiled = web3.eth.compile.solidity(greeterSource)

the above line got the error like this

Error: The method eth_compileSolidity does not exist/is not available

Then we search about this error. the functions are depricated on the latest version

so how we can create this contracts. I can't get the correct solution for this on online so please help anyone

Thanks in advance


1 Answer 1


I probably think in latest version you cannot compile solidity directly. I am not sure of this. Try using online solidity compiler. This is much better way.


(This is the link for solidity online compiler) This is one such contract

after writing your contract you will get bytecode, interface and web3 deploy. copy the code in web3 deploy to some directory you wish, lets say to $HOME/Desktop/contract/ballot.js

start you geth console and simply do a load script i.e in your geth console type loadScript('PATH')

Here is PATH is the relative path of ballot.js

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.