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

improve local deployment #89

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

holic
Copy link

@holic holic commented Sep 24, 2024

  • add --verify flag only when ETHERSCAN_API_KEY is set
  • etch safe deployer code if its missing from the chain (presumably a local chain)

this allows for running make deploy with anvil

Script ran successfully.

== Logs ==
  Deploying on chain ID 31337
  implementation 0x000100abaad02f1cfC8Bbe32bD5a564817339E72
  factory 0x0BA5ED0c6AA8c49038F819E587E2633c4A9F428a

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Sep 24, 2024

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@holic holic force-pushed the holic/local-deploys branch from 126f58a to ed163c8 Compare September 24, 2024 13:52
address constant EXPECTED_FACTORY = 0x0BA5ED0c6AA8c49038F819E587E2633c4A9F428a;
// cast code 0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7 --rpc-url https://mainnet.base.org
bytes constant SAFE_SINGLETON_FACTORY_CODE =
hex"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3";
Copy link
Author

@holic holic Sep 24, 2024

Choose a reason for hiding this comment

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

ideally SafeSingletonDeployer would export this or a method containing the vm.etch logic, but hardcoding it here for now

happy to open a PR over there too if this sounds reasonable!

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah good idea to export

Copy link
Contributor

Choose a reason for hiding this comment

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

or alternatively, maybe we should just have a new function like, "deployAnvil"? which uses etch and doesn't have to expose

Copy link
Author

Choose a reason for hiding this comment

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

works for me, should I open a PR?

Copy link
Author

Choose a reason for hiding this comment

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

went ahead and opened one: wilsoncusack/safe-singleton-deployer-sol#2

Comment on lines +20 to +21
// Set the deployer code if it's not already on the chain.
if (SafeSingletonDeployer.SAFE_SINGLETON_FACTORY.code.length == 0) {
Copy link
Author

@holic holic Sep 24, 2024

Choose a reason for hiding this comment

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

this check could alternatively be

Suggested change
// Set the deployer code if it's not already on the chain.
if (SafeSingletonDeployer.SAFE_SINGLETON_FACTORY.code.length == 0) {
// Set the deployer code when running this on Anvil
if (block.chainid == 31337) {

@cb-heimdall
Copy link
Collaborator

Review Error for DashaBochkar @ 2024-11-02 22:18:27 UTC
User must have write permissions to review

@cb-heimdall
Copy link
Collaborator

Review Error for Jakeshellybase @ 2024-12-11 08:02:04 UTC
User must have write permissions to review

@cb-heimdall
Copy link
Collaborator

Review Error for Jakeshellybase @ 2024-12-21 12:34:28 UTC
User must have write permissions to review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants