-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: deployment scripts #8
Conversation
contracts/script/utils/Base.s.sol
Outdated
|
||
/// @notice When used, runs the script on the chains specified in the `CHAIN_IDS` env variable. | ||
/// Must have a `RPC_${CHAIN_ID}` env variable set for each chain. | ||
modifier multichain() { |
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.
README.md
Outdated
@@ -14,6 +15,7 @@ forge install succinctlabs/sp1-contracts | |||
``` | |||
|
|||
To install a specific version: | |||
|
|||
```bash | |||
forge install succinctlabs/sp1-contracts@<version> |
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.
this is no longer correct i tihnk?
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.
I think it's still relevant? If someone wants these contracts as a dependency, they can specify a specific tag/commit this way
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.
but shouldn't you only need latest?
contracts/.env.example
Outdated
RPC_1= | ||
RPC_11155111= | ||
RPC_17000= | ||
RPC_100= | ||
RPC_137= | ||
RPC_42161= | ||
RPC_421614= | ||
RPC_8453= | ||
RPC_84532= | ||
RPC_534352= | ||
RPC_534351= | ||
|
||
# Etherscan API keys for each chain ID | ||
ETHERSCAN_API_KEY_1= | ||
ETHERSCAN_API_KEY_11155111= | ||
ETHERSCAN_API_KEY_17000= | ||
ETHERSCAN_API_KEY_100= | ||
ETHERSCAN_API_KEY_137= | ||
ETHERSCAN_API_KEY_42161= | ||
ETHERSCAN_API_KEY_421614= | ||
ETHERSCAN_API_KEY_8453= | ||
ETHERSCAN_API_KEY_84532= | ||
ETHERSCAN_API_KEY_534352= | ||
ETHERSCAN_API_KEY_534351= | ||
|
||
# Etherscan API URLs for each chain ID | ||
ETHERSCAN_API_URL_1=https://api.etherscan.io/api | ||
ETHERSCAN_API_URL_5=https://api-goerli.etherscan.io/api | ||
ETHERSCAN_API_URL_17000=https://api-holesky.etherscan.io/api | ||
ETHERSCAN_API_URL_11155111=https://api-sepolia.etherscan.io/api | ||
ETHERSCAN_API_URL_100=https://api.gnosisscan.io/api | ||
ETHERSCAN_API_URL_137=https://api.polygonscan.com/api | ||
ETHERSCAN_API_URL_420=https://api-optimistic.etherscan.io/api | ||
ETHERSCAN_API_URL_42161=https://api.arbiscan.io/api | ||
ETHERSCAN_API_URL_421614=https://api-sepolia.arbiscan.io/api | ||
ETHERSCAN_API_URL_8453=https://api.basescan.org/api | ||
ETHERSCAN_API_URL_84532=https://api-sepolia.basescan.org/api | ||
ETHERSCAN_API_URL_534352=https://api.scrollscan.com/api | ||
ETHERSCAN_API_URL_534351=https://api-sepolia.scrollscan.com/api |
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.
IMO we should just manage this all in foundry and have CHAINS be a list of chain names
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.
nice thing about how its setup in this PR is that we can just put in our existing .env from other repo and it works out of the box
ids are easier to standardize around as chain names are conflicting in terms of like exact name ("arb-testnet" vs "arb-sepolia" vs "arb_sepolia") while just leads to work devx
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.
updated to chain names
// Add the verifier to the gateway | ||
SP1VerifierGateway gateway = SP1VerifierGateway(SP1_VERIFIER_GATEWAY); | ||
gateway.addRoute(verifier); |
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.
in the future we may have multiple routes here right?
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.
wdym? Each verifier version corresponds to one route
function run() external multichain(KEY) broadcaster { | ||
// Read config | ||
bytes32 CREATE2_SALT = readBytes32("CREATE2_SALT"); | ||
address OWNER = readAddress("OWNER"); |
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.
these envs are not in example
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.
updated
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options | ||
|
||
[rpc_endpoints] |
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.
IMO we should just not need these if CHAINS is user specified
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.
I think its nice to have some examples of how it all connects together. Plus having them all here makes it so if anyone else needs to deploy the contracts, they can git clone and go without having to configure stuff
fully forge script deployment process, and v1.0.8-testnet deployment
uses template changes found in succinctlabs/sp1#963