The smart contracts and deployment of OpenR&D.
npm i
Copy .env.example to .env and fill in the PRIV_KEY with the private key you want to use.
npm t
Runs all the unit tests.
npx hardhat coverage
Runs all the unit tests and calculates the test coverage.
npx hardhat deploy --network mumbai
Deploys the smart contracts to the chosen network. In case the contracts have not changed since last deploy, the will not be redeployed.
Different networks can be configured in ./hardhat.config.ts
Deployment settings can be changed in ./deploy
npx hardhat etherscan-verify --network mumbai
npx hardhat sourcify --network mumbai
Verifies the deployed contracts source code on etherscan and sourcify.
Etherscan API key can be configured per network in ./hardhat.config.ts combined with .env
npx hardhat export --export export.ts --network mumbai
Creates the export.ts file with the address and abi of all deployments. To be used in the frontend.
npx hardhat run ./scripts/UpdateAragonDeploy.ts --network mumbai
Imports the latest deployment of Aragon OSx to hardhat-deploy. The active-contract.json can be acquired from their github: https://github.com/aragon/osx/blob/develop/active_contracts.json