Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.24 KB

README.md

File metadata and controls

61 lines (40 loc) · 1.24 KB

Token Y and Z: The Alpha Contract

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.

Run Integration Tests

cd YZAlphaContracts
npm install
npx hardhat test

Run Local Node

npx hardhat node

Deployment

npx hardhat run scripts/deploy.ts --network localhost

(Optional) Start UI Dashboard

cd dashboard-next
npm install
npm run dev

Open http://localhost:3000 with your browser to see the Y token contribution proportions.

Users

This project includes named users. In the following CLI commands, replace <user> with alice, bob, or owner.

Airdrop Y Tokens

npx hardhat airdrop-y --user <user> --amount <amount> --network localhost

npx hardhat y-balance --user <user> --network localhost

Contribute Y Tokens

npx hardhat deposit-y --user <user> --amount <amount> --network localhost

npx hardhat alpha-contributions --network localhost

Mint and Distribute Z Tokens

npx hardhat distribute-z --user owner --network localhost

npx hardhat z-balance --user <user> --network localhost