Skip to content

gongf05/erc20_token

Repository files navigation

ERC20 token with Freeze, Airdrop and Bounty Functions

1. Specifications:

  1. the account that deployes the contract is the token contract owner;
  2. contract owner has all the tokens at the begining;
  3. transfer funds between accounts;
  4. owner can freeze any account to prevent tranferring funds out from these accounts;
  5. owner can unfreeze accounts to enable transfer;
  6. owner can return a list of all accounts that received tokens;

2. Install depencies

Currently support node.js v8.11.1

$ npm intall 

3. JS testing

  • The token contract can be tested with test/TestToken.js file:
$ truffle test test/TestToken.js 

The result is similar to following:

4. Deploy to Ropsten TestNet

deploy the contracts to ropsten network as:

$ truffle migrate --reset --network ropsten

5. Freeze Account with Webpage

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.

About

solidity code of ERC20 token

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published