This project demonstrates a smart-contract that manages two ERC-20 tokens, where one token is received and used to mint and distribute another token based on proportional contributions.
cd YZAlphaContracts
npm install
npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.ts --network localhost
cd dashboard-next
npm install
npm run dev
Open http://localhost:3000 with your browser to see the Y token contribution proportions.
This project includes named users. In the following CLI commands, replace <user>
with alice
, bob
, or owner
.
npx hardhat airdrop-y --user <user> --amount <amount> --network localhost
npx hardhat y-balance --user <user> --network localhost
npx hardhat deposit-y --user <user> --amount <amount> --network localhost
npx hardhat alpha-contributions --network localhost
npx hardhat distribute-z --user owner --network localhost
npx hardhat z-balance --user <user> --network localhost