$ nvm use
$ yarn
- Fill in the environment values as described with .env.example template inside the .env file (comand below)
$ yarn compile
$ yarn test
$ yarn coverage
$ yarn lint
$ yarn format
$ yarn size
$ yarn node
$ yarn node-mainnet
$ yarn node-testnet
$ node scripts/updateAbis.js
Here we are going to fork SEI Mainnet to a local environment in order to check if deployment of a farm(classic/boosted) would pass as expected when deploying to mainnet
Add OWNER_ADDRESS
to .env
file
In deployments/tokenConfig.json
file create a local
environment and then copy required tokens addresses from mainnet
section and paste them to local
section
In deployments/addresses.json
file create a local
environment and then copy DragonswapStakerFactory
contract address from mainnet
section and then paste it in local section
Depending on your needs you can fork a mainnet using the current state of the chain or using a state of the chain from a specific blocknumber:
Forking the current state of the chain:
$ npx hardhat node --fork https://evm-rpc.sei-apis.com
Forking state from a specific block number:
`$ npx hardhat node --fork https://evm-rpc.sei-apis.com --fork-block-number <blocknumber>`
Test deployment for classic farm:
`$ npx hardhat run --network local scripts/deployFarmSimulation.js`
Test deployment for boosted farm:
`$ npx hardhat run --network local scripts/deployBoostedFarmSimulation.js`
Check if endTimestamp is greater than startTimestamp. Also check if the duration of the farm is calculated precisely by converting endTimestamp to more readable form which can be done at [https://www.epochconverter.com/]
MIT