1

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

eth.getCompilers()

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

2

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.

https://ethereum.github.io/browser-solidity/

(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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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