- Is ERC20 compliant
- Responsible for holding all tokens balances on the Cudos platform infrastructure
- The
CudosTokenhas the following properties- Defines a token
name-CudosToken - Defines a token
symbol-CUDOS - Defines the number of
decimalsthe token is divisible by -18 - Defines the total supply of tokens -
10 billiontokens are created upon contract creation
- Defines a token
- The token has a
transfersEnabledflag that can be toggled to enable transfers for all. Only admin addresses defined in the linkedCudosAccessControlscontract can toggle this flag. - Whitelisted addresses can transfer tokens even if the
transfersEnabledflag is set to false. The whitelist is defined in the linkedCudosAccessControlscontract.
VestingContractis not directly based on a specific EIP but does borrow some leanings from the open-zepplin library- Designed to work with Cudos ERC20 token contract but would support any standard ERC20 contract
- General rules are as follows:
- Single vesting schedule per
address - Schedules are defined as address, total amount, total time vested
- User can withdraw every second and will issue allowance since last draw down
- Cudo is in control of setting up and cancelling any vesting schedules
- Utility methods can be called to gain insight into a beneficiaries remaining allowance and draw down rates
- Single vesting schedule per
- Deploy
CudosAccessControlsfrom a Cudo admin account. The deployment account will be automatically granted the default admin role. - Deploy
CudosTokenfrom a Cudo account supplying the address of the access control contract
Requires Yarn or Npm, and NodeJs (version 10.x upwards) globally
- Install dependencies.
yarn install or
npm install
- Run tests.
npx buidler test-
Code coverage and instrumentation performed by a buidler plugin - solidity-coverage
-
To run code coverage
npx buidler coverage- this will produce the following: -
HTML output in
/coverage/index.html -
JSON output in
./.coverage.json -
Terminal output
- To view GAS estimates for the project run the following:
- In one terminal tab:
npx buidler node - And in another terminal tab:
yarn test-with-gas
- In one terminal tab: