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

For CI, deploy to Arbitrum Sepolia instead of Base Sepolia #89

Closed
wants to merge 43 commits into from

Conversation

jplodge-pro
Copy link
Member

@jplodge-pro jplodge-pro commented Aug 7, 2024

Deploy to Arbitrum Sepolia testnet instead of Base Sepolia, for CI deployments.

Done

  • Changed deploy:ci build script to invoke make deploy-arbitrumSepolia
  • Added Arbitrum Sepolia specific environment variables to the GitHub Action.
  • Also updated the GitHub testnet Environment with same.
  • Also updated the foundry.toml with same.
  • Renamed the Arbitrum Sepolia specific make target to use the Network Alias
  • Tweaked the deploy and verify commands in make to use the Build Scripts to assure a consistent state
  • Added a means to use alternative Deployer Authentication, if needed.
    • For example, instead of a Private Key, we could use a cast wallet Account and Password, like so:
      DEPLOYER_AUTHENTICATION="--account DEVOPS_DEPLOYER --password xyz"
  • Updated testnet.toml to reference the correct Chain Id.
  • Pinned GitHub Action Foundry version (@lucasia)
  • Changed to use Blockscout as the Verifier (@lucasia)

Resolves #88

Removed the `db-export` from `deploy:ci` as it is a post-deploy operation and is invoked from the makefile.
Removed `tsc` from `gen-types` and added it to `build` as a more natural fit.
Added `yarn` `clean` and `build` to the generic `deploy` target so all deployments are clean.
Tweaked foundry variables to match those added to GitHub Environment.
Added the required variable mapping to GitHub Action
Tweaked the `Makefile` to `clean` and `build` before deploy and resume.
Added the DEPLOY_SCRIPT variable to the Makefile
Added the DEPLOYER_AUTHENTICATION variable to the Makefile, defaulting to the PK parameter and env variable. But this simplifies deploying to testnet from local.
@jplodge-pro jplodge-pro marked this pull request as ready for review August 7, 2024 10:36
Copy link
Member

@lucasia lucasia left a comment

Choose a reason for hiding this comment

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

the deployment to arbitrumSepolia from the branch works fine using the below on my machine at lest. please confirm the versions of forge and forge-std you are using.

forge nightly (foundryup) forge 0.2.0 (4351742 2024-08-07T00:24:31.137910000Z)

  • foundryup
  • forge --version

git submodule status
07263d193d621c4b2b0ce8b4d54af58f6957d97d forge-std (v1.9.1)
dbb6104ce834628e473d2173bbc9d47f81a9eec3 openzeppelin-contracts (v5.0.0-12-gdbb6104c)

packages/contracts/Makefile Outdated Show resolved Hide resolved
packages/contracts/Makefile Outdated Show resolved Hide resolved
packages/contracts/package.json Show resolved Hide resolved
packages/contracts/package.json Show resolved Hide resolved
@jplodge-pro
Copy link
Member Author

jplodge-pro commented Aug 8, 2024

Thanks for the review, @lucasia

the deployment to arbitrumSepolia from the branch works fine using the below on my machine at lest. please confirm the versions of forge and forge-std you are using.

forge nightly (foundryup) forge 0.2.0 (4351742 2024-08-07T00:24:31.137910000Z)

  • foundryup
  • forge --version

git submodule status 07263d193d621c4b2b0ce8b4d54af58f6957d97d forge-std (v1.9.1) dbb6104ce834628e473d2173bbc9d47f81a9eec3 openzeppelin-contracts (v5.0.0-12-gdbb6104c)

I foolishly ran foundryup before checking my version, so I don't know my previous version.
Now, however, my versions are as follows:

forge 0.2.0 (7f0f5b4 2024-08-08T00:19:27.650028841Z)
 07263d193d621c4b2b0ce8b4d54af58f6957d97d lib/forge-std (v1.9.1)
 dbb6104ce834628e473d2173bbc9d47f81a9eec3 lib/openzeppelin-contracts (v5.0.0-12-gdbb6104c)

I will re-test the deployment.

UPDATE

The problem was that I did not have ETHERSCAN_API_KEY AND ARBITRUM_SEPOLIA_ETHERSCAN_API_KEY set in the .env file at the same time.
With that setting, the deploy/verify works correctly (db-export still fails, as that supabase instance is mothballed).

…ation.

Added comments explaining some deployment discoveries.
Removed the Base Sepolia key.
Copy link

openzeppelin-code bot commented Aug 13, 2024

For CI, deploy to Arbitrum Sepolia instead of Base Sepolia

Generated at commit: dce2a85d1f69710b1156314b13fef4b300b41160

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
0
0
0
4
15
19
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@lucasia
Copy link
Member

lucasia commented Dec 3, 2024

Closing - de-prioritized.

@lucasia lucasia closed this Dec 3, 2024
@lucasia lucasia deleted the deploy-ci-arb-sepolia branch December 3, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change deploy:ci to deploy to arbitrum Sepolia
3 participants