ERC20 Smart Contract for the xFUND
token. The smart contract is an extended
ERC20 contract, with modified minting functionality. The contract is deployed
with an initial supply of zero tokens.
xFUND
tokens are minted and issued using claim tickets, which can be generated and
signed by accounts with the ISSUER_ROLE
role in the smart contract. These tickets
are signed offline for claimants, and it is up to the claimant to submit the
claim ticket to the smart contract in order to have the allocated number of
tokens minted for their account.
The ISSUER_ROLE
can be granted and revoked as required.
The openzeppelin/test-environment
packages and dependencies require
NodeJS >= v8.9.4
and <= v12.18.3
(excluding v11
) in order to correctly install.
We recommend using nvm to manage NodeJS
installations.
Yarn is recommended for package management.
Run:
yarn install
to install the Node packages and dependencies
Run:
npx oz compile
to compile smart contract
Run:
npm test
If ganache-cli
is not installed, install with:
npm install -i ganache-cli
Run ganache-cli
with:
npx ganache-cli --deterministic
The --deterministic
flag will ensure the same keys and accounts are generated
each time
Deploy with:
npx oz deploy
Select regular
deployment, development
network, and the xFUND
contract.
The Name and Symbol are xFUND and XFUND respectively.
The standard ERC20 functions are available. Additionally, there are two main extended
functions, which allow for the claim ticket functionality - claim
, and lastNonce
.