-
Couldn't load subscription status.
- Fork 75
feat: deploy scroll, blast, mode, redstone, zora, ink, and soneium spoke pools #1081
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
Changes from all commits
011cf43
39b6395
226abc5
a81cb69
bcc65f5
903d736
34f87a0
21c1234
b784a44
1df6d63
fae7423
738951c
54538c4
42a4066
9fe5920
dea5b89
2ff9c0b
073ef8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "lib/forge-std": { | ||
| "rev": "6bce1540c7a5d1c40eec032a1ae16f0e01f82b92" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,13 @@ | ||
| #!/bin/bash | ||
|
|
||
| # This script verifies the bytecode of a contract onchain matches the bytecode in the artifact | ||
| # It takes the following arguments: | ||
| # 1. The transaction hash of the contract deployment | ||
| # 2. The RPC URL to use | ||
| # 3. The name of the contract | ||
|
|
||
| # Note that this script doesn't take into account any link libraries that are used in the contract | ||
|
|
||
| args=("$@") | ||
|
|
||
| if [ ${#args[@]} -ne 3 ]; then | ||
|
|
@@ -12,27 +20,18 @@ RPC=${args[1]} | |
| CONTRACT_NAME=${args[2]} | ||
|
|
||
| ONCHAIN=$(cast tx $TX --rpc-url $RPC --json | jq -r '.input' | sed 's/^0x//') | ||
| echo "$ONCHAIN" > onchain_creation.hex | ||
|
|
||
| ART=out/$CONTRACT_NAME.sol/$CONTRACT_NAME.json | ||
|
|
||
| CREATION=$(jq -r '.bytecode.object' "$ART" | sed 's/^0x//') | ||
|
|
||
| TAIL=${ONCHAIN:${#CREATION}} | ||
| CODE_ONCHAIN=${ONCHAIN:0:${#CREATION}} | ||
|
|
||
|
|
||
|
|
||
| cast keccak $CODE_ONCHAIN | ||
| cast keccak $CREATION | ||
|
|
||
| if [[ $CODE_ONCHAIN == $CREATION ]]; then | ||
| echo "✅ Code match"; | ||
| else | ||
| echo "❌ Code mismatch"; | ||
| if [[ $CODE_ONCHAIN == $CREATION ]]; then | ||
| echo "✅ Code match" | ||
| else | ||
| echo "❌ Code mismatch" | ||
| fi | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fusmanii For the future, we should probably standardize the way we do this "veryfying of bytecode" action. We've got this script, and 2 more: The latter script seems unused currently (am I wrong here @pxrl?) I like the idea of it: sanity checking some params for the spoke. It'd be nice to keep that up-to-date and potentially also create a foundry version. It'd be nice if we consolidated all this functionality into some single foundry script that could work for any deployment: either foundry or hardhat. These are a little vague thoughts and only tangentially relevant There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added this as a quick way to check bytecode of a deployed contract using foundry but I agree, ideally there would be one script that can verify bytecode/params of a spoke pool regardless if it was deployed using foundry or hardhat
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah; it's only sporadically used, but it's a fairly inexpensive way of checking for any configuration issues in the SpokePool. There's value in checking that the onchain values match what was (intended to be) configured by the deployment script, but there's secondary value in dumping the values so that people can sanity check the results for anything that might be misconfigured in the deployment script. The visual inspection might catch issues that we are prone to overlook if the error is buried in a config file. Ideally it could use executed post-deployment and the output could form part of the eventual PR to add the SpokePool artefacts. |
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
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.
@fusmanii could you explain why we need this?
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 just pinning
lib/forge-stdversion, not sure why it hasn't been added to the repo already