- yarn
- Node js v18
- Typescript
- Hardhat
- Install:
yarn
- Compile contracts:
yarn compile
- Deploy locally:
yarn deploy
- Deploy to live network: For this step you would need to provide your MNEMONIC inside .envrc file
export MNEMONIC='YOUR MNEMONIC'
direnv allow .envrc
And then run:
yarn deploy:network <network>
- Run Test:
yarn test
- Run coverage:
yarn coverage
- Generate abis:
yarn abis
- Know the size of your contracts:
yarn size
- Verify contracts: due to they are all upgradeable contracts, we just need to provide the address of the deployed contract and the network. Also, do not forget to provide the api key of your network to your hardhat.config.ts. For instance, to verify on Polygon Mumbai testnet:
etherscan: {
apiKey: {
polygonMumbai: process.env.MUMBAI_ETHERSCAN_API_KEY ? process.env.MUMBAI_ETHERSCAN_API_KEY : ''
}
},
npx hardhat verify --network <NETWORK> <CONTRACT_ADDRESS>
- Set serie vault: set serie vault address.
npx hardhat set-serie-vault --vault <VAULT_ADDRESS> --serie <SERIE_ID> --network <NETWORK>
- Enable exits
npx hardhat enable-exits --network <NETWORK>
- Disable exits
npx hardhat disable-exits --network <NETWORK>
- Add builder
npx hardhat add-builder --builder <BUILDER_ADDRESS> --network <NETWORK>
- Remove builder
npx hardhat remove-builder --builder <BUILDER_ADDRESS> --network <NETWORK>
- Award builder
npx hardhat award --builder <BUILDER_ADDRESS> --amount <AMOUNT_TO_AWARD> --serie-id <SERIE_ID> --network <NETWORK>
- Get contract version
npx hardhat get-version --network <NETWORK>
- Get serie supply
npx hardhat serie-supply --serie-id <SERIE_ID> --network <NETWORK>
- Get user serie balance
npx hardhat user-serie-balance --serie-id <SERIE_ID> --user <USER_ADDRESS>
- Update serie vault status
npx hardhat update-serie-vault-status --serie <SERIE_ID> --status <STATUS> --network <NETWORK>
- Create vault
npx hardhat create-vault --stable-token <TOKEN_ADDRESS> --serie <SERIE_ID> --network <NETWORK>
Serie ID | Vault address | Token | ||
---|---|---|---|---|
1 | 0xF75b4266d7227D2412227426eC1019065981D72F | USDT | ||
2 | 0xfd08F181b72ebD9822c405deA04B4F6EE463fbCC | USDT | ||
3 | 0x9e77Ec5425D19F5DD49DD4C21357Bb0ffFb41218 | USDT |
Thank you for considering helping out with the source code! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes!
If you'd like to contribute to resi-tokenomics, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base.