This repository contains two contracts:
- SKT ERC20 Contract
- Name: Sukhavati Network Token
- Symbol: SKT
- Decimals: 8
The ERC20 contract uses the OpenZeppelin ERC20PresetMinterPauser contract.
OpenZeppelin contracts are community audited and considered to be safe.
The signature contains the address of the participant, the number of tokens and a nonce. The contract uses ecrecover
to verify that the signature was created by our trusted account.
If the signature is valid, the contract will transfer the tokens from a Sukhavat owned wallet to the participant.
Install the dependencies:
yarn install
Create the .env file:
cp -v .env.example .env
Run the ganache-cli test rpc with a predefined mnemonic phrase:
yarn testrpc
Run the tests in a new terminal session:
truffle test
Config deploy account
If .env not exit please
cp .env.example .env
Find the .env to find TRUSTED_ACCOUNT config key input the deploy account private key
Config gasPrice on network
Find the truffle-config.js file get export object in follow path and default gasPrice is 1gwei
networks -> live -> gasPrice
Deploy contract to rinkeby test network
./node_modules/.bin/truffle migrate --reset --network rinkeby
Deploy contract to main net network
./node_modules/.bin/truffle migrate --reset --network live