Smart contract for Amasa token vesting.
Table of Contents
This contract is used to create vesting table for Amasa token beneficiaries.
Set up the development environment on your machine as follows.
As a prerequisite, you need:
- Node.js v12+
- npm
Clone the project and install all dependencies:
git clone https://github.com/amasaio/vesting-contract.git
cd vesting-contract/
npm i -g truffle
npm i
In the root directory of the project create a file with name .env
. Then paste these parameters to the file and initialize them accordingly:
INFURA_TOKEN_MAINNET=<Token for connecting to Ethereum mainnet using infura provider>
INFURA_TOKEN_RINKEBY=<Token for connecting to Ethereum rinkeby using infura provider>
MNEMONIC=<Contract owner's mnemonic backup phrase>
VESTING_DECIMAL=<Precision of the numbers. 18 is recommended>
TOKEN_ADDRESS=<Amasa token address>
OWNER_ADDRESS=<Owner wallet address>
ETHERSCAN_API_KEY=<The Etherscan API Key which is used for publishing the source code on the Etherscan>
SIGNERS=<Signers seperated with space(' ')>
THRESHOULD=<Signs count need to execute a transaction >
truffle compile
You can deploy the contract locally, to Rinkeby, or to Ethereum mainnet.
- In a separate terminal, start the testnet:
ganache-cli
- In your main terminal, run:
truffle migrate --network development
- In your main terminal, run:
truffle migrate --network rinkeby
- In your main terminal, run:
truffle migrate --network mainnet
In a separate console:
ganache-cli
In main console:
# for unit tests
truffle test --network development
Copyright 2021 Amasa