OriginProtocol / OriginProtocol/origin-dollar
Document shortend/clean deploy process
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 152
- Forks
- 115
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 17
Description
In the past we've used a large spreadsheet for each deploy. However, we've now moved many of the steps out of being run only at deploy time and into the CI system.
I'd love your review and additions to this process.
Deploy Process
- Set environment variables
git checkout -B {{YOURHANDLE}}/deploy_{{DEPLOY_NUMBER}}
export PROVIDER_URL="https://eth-mainnet.alchemyapi.io/v2/{{ALCHEMY_KEY}}"
export HARDHAT_NETWORK=mainnet
export ETHERSCAN_API_KEY={{ETHERSCAN_KEY}}
export VERBOSE=true
export GAS_PRICE_MULTIPLIER=1.15
- Set deploy keys
I usually change my terminal color to a danger color before loading keys.
Different shells have ways of not recording commands into history. On the fish shell, a space in front of the command will keep it out of history. You can check after running that the export command that the key has not been saved.
On OSx iTerm add the following entry to ~/.profile file:
export HISTCONTROL=ignorespace
and space before a cli command will skip recording it to history.
export DEPLOYER_PK={{pk1}}
export GOVERNOR_PK={{pk1}}
export MAINNET_DEPLOYER_OVERRIDE {{YOUR DEPLOYER ADDRESS}}
npx hardhat accounts
npx hardhat env
- Do the deploy
yarn run deploy:mainnet | tee mainnet.out
- Verify
# For each deployed contract, verify it.
# Sample contract verification below
npx hardhat --network mainnet verify --contract contracts/strategies/VaultValueChecker.sol:OETHVaultValueChecker 0x31FD8618379D8e473Ec2B1540B906E8e11D2A99b
- Governance proposal
If the deploy had a governance action, edit the deploy file, and add the newly created proposalId to the options for deploymentWithGovernanceProposal. Then save the deploy file, and add the change to the file to git.
- Git
cp ../dapp/network.mainnet.json ../dapp/prod.network.json
git add deployments/mainnet/*.json
git add deployments/mainnet/solcInputs/*.json
git add deployments/mainnet/.migrations.json
git add storageLayout/mainnet/*.json
git commit -m "mainnet deploy {{DEPLOY NUMBER}}"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file is named. Start by comparing the documented Deploy Process with the CI workflow referenced in the issue and the yarn run deploy:mainnet entry point. Done means a shorter, accurate deployment guide that reflects the CI-managed steps and retains the required verification, governance, and Git commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, shell, solidity
- Domain
- blockchain, devops, documentation, release
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100