-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for deployment on Goerli testnet #382
Conversation
Görli became a recommended test network after Ropsten's deprecation notice (https://blog.ethereum.org/2022/06/21/testnet-deprecation/). We're modifying GitHub Actions workflow for deploying `tbtc-v2` contracts to support the deployment on Görli. We're also leaving the possibility of deployment on Ropsten (this will be removed once we have have the Görli deployment battle-tested and Ropsten gets shut down). NOTE: We're temporarily using some testing configuration in the workflow, which needs to be removed before merge to `main`.
fbd4a05
to
5b11755
Compare
As the Ropsten testnet becomes deprecated in the near future, we are switching to deployment on Goerli. If deployment on Ropsten will be needed in the interm period, we will do it manually, not via GH Actions.
We are bumping the version of used custom GH actions from `v1` to `v2`, as `v2` uses the new order of modules execution.
We tag the latest `@keep-network/tbtc` package containing contracts migrated on some environment with tag that is a name of that environment. We can use that tag instead of the explicit version when resolving contracts of dependent projects.
Right now we only support `goerli` network and we expect that the workflow (when triggered manually) is always dispatched with this `environment`. Previously we introduced `github.event.inputs.environment == 'goerli'` condition to not run the deploy job if workflow gets accidentally run on a different environment. But even without this condition we don't risk publishing of a package with some invalid contracts - deploy will fail either due to unsupported `environment` or due to incorrect account being used. Actually, returning error instead of cleanly exiting the workflow may be a better idea in case wrong `environment` is provided - this will alarm the scheduler that something went wrong with the deployment.
We're changing the name of the CI modules (in order for the CI flow to execute jobs one after another the modules names can't consist of more than 4 slash-separated parts).
We can be more precise when deleting unwanted artifacts. Also we need to get rid of the `random-beacon` artifacts. Otherwise the `random-beacon` contracts get picked by the `etherscan-verify` action.
The script has to be used in order to get dependency contracts working.
@nkuba, ready for review. The workflow was verified here: https://github.com/keep-network/tbtc-v2/runs/7744385930?check_suite_focus=true. |
env: | ||
TENDERLY_TOKEN: ${{ secrets.TENDERLY_TOKEN }} | ||
run: ./config_tenderly.sh | ||
|
||
- name: Deploy contracts | ||
- name: Deploy contract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that got there by mistake, I'm fixing it as part of https://github.com/keep-network/tbtc-v2/pull/392/files.
Görli became a recommended test network after Ropsten's deprecation
notice (https://blog.ethereum.org/2022/06/21/testnet-deprecation/).
We're modifying GitHub Actions workflow for deploying
tbtc-v2
contracts to support the deployment on Görli. We're also leaving the
possibility of deployment on Ropsten (this will be removed once we have
have the Görli deployment battle-tested and Ropsten gets shut down).
NOTE: We're temporarily using some testing configuration in the
workflow, which needs to be removed before merge to
main
.TODO:
@keep-network/ecdsa
package published (will be possible after merge of Add support for deployment on Goerli testnet keep-core#3081)Refs:
keep-network/keep-core#3012
threshold-network/solidity-contracts#114
keep-network/keep-core#3081