Skip to content
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

Merged
merged 12 commits into from
Aug 9, 2022
Merged

Add support for deployment on Goerli testnet #382

merged 12 commits into from
Aug 9, 2022

Conversation

michalinacienciala
Copy link
Contributor

@michalinacienciala michalinacienciala commented Jul 11, 2022

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:

Refs:
keep-network/keep-core#3012
threshold-network/solidity-contracts#114
keep-network/keep-core#3081

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`.
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.
@michalinacienciala michalinacienciala marked this pull request as ready for review August 9, 2022 14:11
@michalinacienciala
Copy link
Contributor Author

@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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change needed?

Copy link
Contributor Author

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.

@nkuba nkuba merged commit 83e8330 into main Aug 9, 2022
@nkuba nkuba deleted the ci-goerli branch August 9, 2022 15:03
@pdyraga pdyraga added this to the solidity/v1.0.0 milestone Jan 31, 2023
@pdyraga pdyraga added the ⛓️ solidity Solidity contracts label Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⛓️ solidity Solidity contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants