-
Notifications
You must be signed in to change notification settings - Fork 16
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
Adjust CI to support deployments of contracts on Goerli testnet #231
Draft
michalinacienciala
wants to merge
7
commits into
main
Choose a base branch
from
update-ci-and-dependencies
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+989
−72
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously we've been deploying coverage-pools on Ropsten. As this testnet became deprecated, we're switching to the Goerli testnet. The hardhat config for that network has already been added in a separate commit/PR. Now we need to adjust CI jobs to be in line with that config. In this commit we modify the way we get the contract owner account's private key - we use an environment variable that can store multiple accounts and we fill its value with the value of a `GOERLI_ETH_CONTRACT_OWNER_PRIVATE_KEY` GH secret. We also update value of the `CHAIN_API_URL` variable, as we've changed the name of the secret that holds the information about the chain API URL.
The Ropsten testnet became deprecated. We switched to using Goerli testnet for testing. This commit adds some missing piecies of the Goerli-related configuration and removes the obsolete Ropsten-related config.
We no longer support `ropsten` testnet. The only testnet we do support is `goerli` . It is expected that this tesnet is used when workflow gets triggered manually.
The `Solidity` workflow for `coverage-pools` was part of the no longer used v1 of the CI flow. As in the v2 of the system we changed the structure of the dependencies between modules and added soem new modules, we need to adjust the position of the `coverage-pools` module in the v2 of the CI flow. In a sepaarate repository (`@keep-network/ci`) we're configuring the `github.com/keep-network/coverage-pools` module to execute after `github.com/threshold-network/solidity-contracts` module. In this PR we switch the workflow to use the `v2` of the CI flow and change the way how we resolve latest contracts. When workflow will be executed with the `goerli` `environment` input (which is the assumed behavior), we'll use the latest `goerli`-tagged `keep-core` and `tbtc` packages. We'll determine the version of the `@threshold-network/solidity-contracts` package based on the value passed in the `upstream_builds` input. As part of this PR we've also adjusted the Hardhat config to use the artifacts of the `@threshold-network/solidity-contracts` module. Tmp
After deploying the `coverage-pools` contracts we want to verify them in the Etherscan, so that their source code could be easily browsed there. Historically, in our other modules, we've been using either the `@nomiclabs/hardhat-etherscan` or `hardhat-deploy` plugin to run the verification. Here in the `coverage-pools` module, the config we used was inconsistent and it contained elements of both plugins' configs. In this commit we sort the config out - from now on we'll use only the `@nomiclabs/hardhat-etherscan` plugin to verify `coverage-pools` contracts on Etherscan. We already have the plugin defined as the project dependency and we have the deployments scripts configured to perform the verification. We're adding passing of the `ETHERSCAN_API_KEY` secret as an environment variable in the deployment step in the CI and removing an obsolete configuration related to the `hardhat-deploy` plugin.
We're switching from deployments of contacts on Ropsten to deployment on Goerli (because the Ropsten testnet became deprecated).
2 tasks
@nkuba, after keep-network/ci#35 gets merged, I'll update the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously we've been deploying coverage-pools on Ropsten. As this testnet
became deprecated, we're switching to the Goerli testnet. The hardhat config for
that network has already been partially added in a separate commit/PR. Now we
need to adjust CI jobs and add missing pieces in the Hardhat config to make the
deployment work.
As part of this PR:
coverage-pools
module to the CI flow ci#35 merged)TODO:
threshold-network
andkeep-network
projects #212, Görli contracts deployment #214, Add support for deployment on Goerli testnet #215 once changes in this PR get approved