The V4 testnet deployed contracts and essential hardhat tasks.
Install direnv module.
We use direnv to manage environment variables. You'll likely need to install it.
cp .envrc.example .envrcTo run fork scripts, deploy or perform any operation with a mainnet/testnet node you will need an Infura API key.
To disburse and deposit you will need to add a list of address(es) to DISBURSE_ADDRESSES.
Example
export DISBURSE_ADDRESSES='0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000001'yarnyarn deploy-rinkebyyarn deploy-mumbaiyarn disburse rinkebyyarn disburse mumbaiyarn deposit rinkebyyarn deposit mumbaiyarn node-rinkebyyarn node-mumbaiInteract with the V4 testnet deployed contracts through hardhat tasks.
yarn task [TASK_NAME]
yarn task [TASK_NAME] --wallet 0
yarn task [TASK_NAME] --user 0x0000000000000000000000000000000000000000
- winningPickIndices: Calculates a user winning picks and prize tier (distribution index) results
- claim: Claim winning prizes and receive tickets
- getDraws: Read target draw buffer parameters
- getOldestDraw: Read oldest draw buffer parameters
- getNewestDraw: Read newest draw buffer parameters
- getLiveDraws: Read all draw buffer parameters between oldest and newest
- pushDraw: Push new draw parameters
- setDraw: Set existing draw parameters
- getPrizeDistribution: Read target prize distribtion parameters
- getOldestPrizeDistribution: Read oldest prize distribtion parameters
- getNewestPrizeDistribution: Read newest prize distribtion parameters
- getLivePrizeDistributionList: Read all prize distribution buffer between oldest and newest
- deposit: Deposit tokens and mint tickets
- balanceOf: Read balance of user address
- getAccountDetails: Read account details of user address
- getAverageBalancesBetween: Read average balance between epoch timestamp of user address
- delegate: Delegate TWAB to delegate address
- transfer: Transfer balance of ticket to recipient address
Certain tasks require a "user" address like claim and calculate.
Default the wallet address is used. A user address can be passed
Default (Index 0) Wallet in Mnemonic
yarn task [TASK_NAME] --wallet 0
Index 1 Wallet in Mnemonic
yarn task [TASK_NAME] --wallet 1
Pass User Address
yarn task [TASK_NAME] --user 0x0000000000000000000000000000000000000000
Open a CLI dashboard to view the state of deployed testnet contracts.
yarn dashboard