This repository has been archived by the owner on Oct 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Token Example Error #893
Comments
By the way, when value is less than sellPrice, "buy" succeeded, when eual or large, failed. |
buyPrice is by default 0, this is why the tx fails, try calling |
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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?
The text was updated successfully, but these errors were encountered: