This project demonstrates a basic PERC20 contract without comprensive access-control logic. The main differences between ERC20 and PERC20 are protected balanceOf
function and disabled Transfer
and Approval
events
To compile contracts, use following command:
npm run compile
NOTE: tests are not compatible with hardhat network / ganache, so you have to start Swisstronik local node or use public testnet
Create .env
file from example
cp example.env .env
Add PRIVATE_KEY
in .env
with actual private key to interact with network. If you're using other network than local testnet you also should replace url
in hardhat.config.ts
To run tests, use following command:
npm run test
To deploy contracts, use check scripts/deploy.ts
script and use following command:
npm run deploy