Smart contracts for CurateV2
Refresh the list of deployed contracts by running ./scripts/generateDeploymentsMarkdown.sh
or ./scripts/populateReadme.sh
.
yarn install
yarn test
yarn build
yarn lint
yarn fix
NOTICE: the commands below work only if you are inside the contracts/
directory.
Copy .env.example
file as .env
and edit it accordingly.
cp .env.example .env
The following env vars are required:
PRIVATE_KEY
: the private key of the deployer account used for the testnets.MAINNET_PRIVATE_KEY
: the private key of the deployer account used for Mainnet.INFURA_API_KEY
: the API key for infura.
The ones below are optional:
ETHERSCAN_API_KEY
: to verify the source of the newly deployed contracts on Etherscan.ARBISCAN_API_KEY
: to verify the source of the newly deployed contracts on Arbitrum.GNOSISSCAN_API_KEY
: to verify the source of the newly deployed contracts on Gnosis chain.
Shell 1: the node
yarn hardhat node --tags nothing
Shell 2: the deploy script
yarn deploy --network localhost --tags CurateV2
Shell 1: the node
yarn start-devnet-fork
# or
yarn start-testnet-fork
Shell 2: the deploy script
yarn deploy-devnet-fork
# or
yarn deploy-testnet-fork
yarn deploy --network arbitrumSepolia --tags CurateV2
The deployed addresses should be displayed to the screen after the deployment is complete. If you missed them, you can always go to the deployments/<network>
directory and look for the respective file.
Same steps as above but append Devnet
to the --network
parameter.
Shell 1: the node
yarn hardhat node --tags CurateV2
Shell 2: the test scripts
yarn test --network localhost
This must be done for each network separately.
# explorer
yarn etherscan-verify --network arbitrumSepolia
yarn etherscan-verify-proxies
# sourcify
yarn sourcify --network arbitrumSepolia
scripts/generateDeploymentArtifact.sh <network> <address>
scripts/generateDeploymentArtifact.sh gnosischain 0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9 > deployments/gnosischain/WETH.json
Ensure that your $TENDERLY_PROJECT
and $TENDERLY_USERNAME
is set correctly in .env
.
yarn tenderly-verify --network sepolia
yarn tenderly-verify --network arbitrumSepolia