Open ccconnor opened 6 years ago
By the way, when value is less than sellPrice, "buy" succeeded, when eual or large, failed. https://monosnap.com/file/LWGKLZCdZNAiDj3nfrdKZzsmy4GrH3
buyPrice is by default 0, this is why the tx fails, try calling setPrices
before
First thanks for you reply. But I've already set price.
@heyconnor Have you got it worked?
@Aniket-Engg Finally I didn't use buy and sell interface.
Okay. Your gist is broken. Are you still looking to get it worked?
@Aniket-Engg That gist was the same as official site's. I used a simple one.
Hello, I'm trying to learn smart contract according to https://www.ethereum.org/token. I'm using remix IDE, and the enviroment option is JavaScript VM. The contract is deployed succefully, but when I try to buy tokens, remix shows errors "the constructor should be payable if you send value". After I added payable keyword, the buy function still failed. The code I'm using is just the same as the above url shows, or https://gist.github.com/6d78ad3e351cb8799339d99a9c3def51. Can someone offer any suggestions?