Skip to content

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.

Notifications You must be signed in to change notification settings

JarJarBB/AlphaERC20

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published