0

I've been experimenting with some generic copy-paste codes on the Ropsten Test Net and I am able to create a token and have the creator receive all the tokens. However, when I try to buy these test tokens on a second account, the Ether is sent, and no tokens ever come back my way. I'm just wondering where I should be looking in the code for this function since nothing anywhere else online seems to have my answer.

1
  • Without looking at the contract's code it can be anything. Transaction failed, Transfer event not generated, etc.
    – Ismael
    Commented Mar 10, 2018 at 21:42

2 Answers 2

0

Check the following conditions

  1. You have default function as payable so that it accepts ETH
  2. You have the buy/sell price in the token contract
0

The crowdsale functionality can be separated from the token.

Suggest reading the OpenZeppelin documentation on creating tokens and crowdsales https://docs.openzeppelin.com/contracts/2.x/tokens https://docs.openzeppelin.com/contracts/2.x/crowdsales

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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