This repository contains the governance token contract for NIIFI.
This project was developed and tried with Node.js v12 and v14. Other versions of Node.js have thus far not been tested with this project. Note however that @nomiclabs/hardhat-waffle was found to trigger faulty unit tests if installed with npm < 7. Thus you should most likely upgrade your npm with npm install -g npm before continuing.
Install as follows:
npm install --engine-strictThe contract may compiled with
npm run buildAfter successful build the contract may be tested with
npm run testComplementary to testing the contract may be deployed to a HardHat Ethereum instance on localhost, allowing for subsequent interaction with the smart contract in console or script.
In a separate terminal start the Ethereum instance
npm run nodeDeploy contracts to the node
npm run deploy:localhostThe sample script at scripts/mint.js may be run to mint tokens.
npm run mint:localhostAnother sample script at scripts/transfer.js may be run to transfer tokens from
the mint target to another account.
npm run transfer:localhostAlso the HardHat REPL may be started to interact with the HardHat instance
npm run console:localhostFor deployment on public testnet the EOA to deploy from may be derived from mnemonics. The generation of mnemonics may be done as
npx mnemonics