[Ethereum] MyAdvancedToken Automating Selling and Buying function not working

contract-developmentsoliditytokens

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 !

Best Answer

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

Related Topic