- the account that deployes the contract is the
token contract owner
; contract owner
has all the tokens at the begining;- transfer funds between accounts;
- owner can freeze any account to prevent tranferring funds out from these accounts;
- owner can unfreeze accounts to enable transfer;
- owner can return a list of all accounts that received tokens;
Currently support node.js v8.11.1
$ npm intall
- The token contract can be tested with
test/TestToken.js
file:
$ truffle test test/TestToken.js
The result is similar to following:
deploy the contracts to ropsten network as:
$ truffle migrate --reset --network ropsten
Launch the web server in the root working directory:
$ npm run dev
Simply switch the proper network (e.g., rinkeby or mainnet) and login the owner account in MetaMask, and type in account address to be unfreezed and click button.