1

I attempt to create a token with the "automatic and selling" function as describe here. After having copy/paste the code (footpage)and deployed the contract no error message appears. But when I execute the functions "sell" or "buy" nothing happens. When trying to execute the function "buy" no field appears, which seems very odd to me because one should enter the amount they want buy/sell ... Have any idea how to fix this ?

My expectations are that the sender account receive an amount of the new token equal to the amount of ether sent * conversion rate specified, is this the purpose of this code ?

Thanks in advance !

0

You linked to the basic coin code, try the full improved coin code here: https://ethereum.org/token#full-coin-code

Also, make sure you choose the MyAdvancedToken under 'SELECT CONTRACT TO DEPLOY' After you deployed, go to the contract admin page and use the setPrices function to first give a price to buy and sell functions, then try to use the buy/sell from an account with ether.

*make sure to use the testnet

0

If you are using MyAdvancedToken contract, after deployment first of all you should set the prices of buy and sell with command setPrices. The prices are in wei, not in ETH. Also, you need to send some ETH to your token contract, only then sell function will work. Because you need pay back ETH for your tokens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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