Testing Your ERC20 Tokens

  1. Deploy a test network like Rinkby or Ropsten. The ether on these networks are test ether you can get them for free from a faucet.  I am using a Ropsten node run on infura.
  2. Get a wallet with a Mnemonic. I am using iancoleman’s wallet generator.  This is not secure don’t do this for real ether.  Save the mnemonic to a .secret file and .gitignore it.
  3. Get some free test ether from a faucet like this one.
  4.  Edit your truffle-config.js file and  uncomment the lines related to ropsten like lines approx 24,25,63-70.
  5. npm install truffle-hdwallet-provider (or a hdwallet provider)
  6. truffle test
  7. Then do some debugging so your unit tests work
  8. truffle test –network ropsten
  9. ooo tests have different results on different blockchain networks yikes
  10. the errors are not that bad and its a test network – lets deploy
  11. truffle compile –reset –compile-all (because why not)
  12. truffle migrate –network ropsten
  13. did it work? lets check the ropsten blockchain! Its alive! Here is the repo
  14. Tomorrow we interact with it via our web app and reactjs

Important you must call approve before transfer or your tokens will be inaccessible forever.

I also got some good haskell links from some folks at Recurse.  And my favorite link of the day – Voldemort types!  I discovered this while googling a rust bug.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.