A factory contract that deploys an erc20 token and assigns the initial balance to the sender. Built using Truffle Drizzle and zeppelin-solidity.
Dapp (Rinkeby) can be found here.
Medium article here.
Create a .env
file in root directory and add your private key:
RINKEBY_PRIVATE_KEY="MY_PRIVATE_KEY_HERE"
- Run Ganache
- Deploy MyTokenFactory to ganache:
truffle deploy --network ganache
- Run local front-end:
npm run start
- Using Metamask Custom RPC option connect to Private Ganache Network:
- RPC Server: HTTP://127.0.0.1:7545
- Network ID: 5777
- Import your Ganache account into Metamask using private key
- Ready to deploy! Fill in token name and symbol and click.
Serves the front-end on http://localhost:3000
npm run start
npm run test
npm run build
To deploy:
truffle deploy --network [network]
$ npm run test:truffle
$ npm run coverage
MyTokenFactory: 0xc922efc865436117055608b7a908e23e75da48f0
When migrating
Error: Attempting to run transaction which calls a contract function, but recipient address 0x8cdaf0cd259887258bc13a92c0a6da92698644c0 is not a contract address
Solution: delete contents of /build/contracts and recompile.
Quick fix: revert to "reactstrap": "5.0.0-beta". It has older react-popper version.
Error: The current provider doesn't support subscriptions: MetamaskInpageProvider
MetaMask/metamask-extension#2350
After running solidity-coverage, testrpc remains a ghost process. Solution: kill it with:
$ npm run stop
and run coverage again:
$ npm run coverage