This repo is intended to have scripts and tests available to allow for testing UMA contracts. The repo uses the OptimisticDepositBox
and EventBasedPredictionMarket
contracts as examples.
You will need to install the long-term support version of nodejs, currently nodejs v16. You will also need to install yarn.
yarn
yarn hardhat compile
yarn test # Run unit tests
yarn lint
yarn lint-fix
Use the command below to deploy a particular contract (along with any dependencies that haven't been deployed on this network). In the deploy script, the func.tags
determines the contracts to deploy which is specified using the --tags
arg in the command:
export MNEMONIC="Your 12-word phrase here"
export CUSTOM_NODE_URL="Your node url here"
yarn hardhat deploy --network goerli --tags OptimisticDepositBox,EventBasedPredictionMarket
To perform an etherscan verification on a particular contract address that you have deployed on a public network:
export ETHERSCAN_API_KEY="Your etherscan api key here"
export CUSTOM_NODE_URL="Your node url here"
yarn hardhat verify "Your contract address here" --network goerli
To perform a verification on all the contracts you have deployed on a particular network:
export CUSTOM_NODE_URL="Your node url here"
export ETHERSCAN_API_KEY="Your etherscan api key here"
yarn hardhat etherscan-verify --network goerli --license AGPL-3.0 --force-license