Usefull commands
npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
node scripts/<script-name.ts>
npx hardhat helpstart an hardhat node locally
npx hardhat nodethe following command will be deploying the smart contracts on your local node
npx hardhat run scripts/deploy-script.ts --network localhostFor submitting the contract verification we cannot use, as of now, the APIs provided on Avalanche since are still in beta, and integration with Hardhat and Truffle is on its way. We can verify the contract:
- creating a flat file using the following command
npx hardhat flatten contracts/MZR.sol >> flat-MZR.sol- Remove from the generated file, apart from the one at the top, all the specifications for the compiler and the SPDX license
- select optimisation:yes from the snowtrace's UI when submitting the verify request.
https://docs.avax.network/build/tutorials/smart-contracts/verify-smart-contract-using-hardhat-and-snowtrace/
- Deploy smart contract on BSC
- Initialize smart contract (set admin address, mzr token contract address, tokens per block with correct decimals, no rewards claim until timestamp)
- Deposit MZR to farm smart contract