- ERC20 basic contract
- Owner can pause unpause the contract
- Clone this repo. Nodejs and npm are assumed to be installed.
- Check versions -
node -v=> v9.3.0,npm -v=> 5.6.0 - Install truffle
sudo npm install -g [email protected] - Download ganache (http://truffleframework.com/ganache/) personal ethereum blockchain.
- Linux: Set permissions on it
chmod u+x ganache-1.1.0-beta.0-x86_64.AppImage - MacOS: Install from Ganache-1.1.0-beta.0.dmg
- Linux: Set permissions on it
- Under acmetoken do
npm install [email protected]to install the solidity libraries
truffle compile- this compiles solidity contracts under contracts/ folder- Run ganache
- Linux:
./ganache-1.1.0-beta.0-x86_64.AppImage - MacOS:
open -a ganache
- Linux:
truffle migrate --reset- this deploys using the default n/w. Else specify using --network
- Run ganache
- Linux:
./ganache-1.1.0-beta.0-x86_64.AppImage - MacOS:
open -a ganache
- Linux:
- Open truffle console using this command from the project directory
truffle console - In the console you can perform following test
var acme = AcmeToken.at(AcmeToken.address)acme.paused()should show falseacme.pause()should execute the pause call that you can verify in Ganacheacme.paused()should show true as the state in the contract is now changed
- React app to play with certain features of the contract
- Display Pause state of the scripts
- Display total supply state of the scripts
- Toggle button to Pause /Unpause based on pause state ( note : this is a txn action so would need to use wallet like metamask )
- Add tasks
- node v9.3.0 , npm 5.6.0
- Truffle v4.0.4 (core: 4.0.4)
- Solidity v0.4.18 (solc-js)
- Zeppelin-solidity v1.6.0
- Ganache 1.0.1