Skip to content

Commit 2af21b9

Browse files
committed
Fix deployers aux files and keys
1 parent b08337d commit 2af21b9

File tree

4 files changed

+632
-12
lines changed

4 files changed

+632
-12
lines changed

contracts/deployments/31337.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"CREATE2_SALT": "0x0000000000000000000000000000000000000000000000000000000000000009",
3+
"SP1_VERIFIER_GATEWAY_GROTH16": "0x3c380a84855AFe756E7FB33fe59ae81466B19027",
4+
"V3_0_0_SP1_VERIFIER_GROTH16": "0x6e325f6cEC3EeBD6cC1b68d2a6e93342a161e174"
5+
}

contracts/foundry.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ out = "out"
44
libs = ["lib"]
55

66
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
7-
fs_permissions = [{ access = "read-write", path = "./script/output"}, {access = "read", path = "./script/deploy"}]
7+
fs_permissions = [
8+
{ access = "read-write", path = "./script/output"},
9+
{access = "read", path = "./script/deploy"},
10+
{ access = "read-write", path = "./deployments"},
11+
]

contracts/scripts/anvil/deploy_sp1_contracts.sh

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,41 @@
33
# cd to the directory of this script so that this can be run from anywhere
44
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
55
# At this point we are in tests/integration
6-
echo "$parent_path"
6+
cd "$parent_path"
77

8-
# # Deploy Groth16 SP1 verifier gateway
9-
# forge script script/deploy/SP1VerifierGatewayGroth16Deployer.s.sol:SP1VerifierGatewayScript \
10-
# --rpc-url "http://localhost:8545" \
11-
# --private-key "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a" \
12-
# --broadcast
8+
# Start an empty anvil chain in the background and dump its state to a json file upon exit
9+
anvil --dump-state state/sp1-deployed-anvil-state.json &
10+
11+
# cd to /contracts
12+
cd ../../
13+
14+
sleep 1
15+
16+
export CHAINS='TESTNET'
17+
export RPC_TESTNET='http://localhost:8545'
18+
export OWNER='0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC'
19+
20+
# Deploy Groth16 SP1 verifier gateway
21+
forge script script/deploy/SP1VerifierGatewayGroth16Deployer.s.sol:SP1VerifierGatewayScript \
22+
--rpc-url "http://localhost:8545" \
23+
--private-key "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a" \
24+
--broadcast
1325

1426
# # Deploy Groth16 SP1 verifier
15-
# forge script ./script/deploy/SP1VerifierGroth16Deployer.s.sol:SP1VerifierScript \
16-
# --rpc-url "http://localhost:8545" \
17-
# --private-key "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6" \
18-
# --broadcast \
19-
# --verify --verifier etherscan --multi
27+
forge script ./script/deploy/SP1VerifierGroth16Deployer.s.sol:SP1VerifierScript \
28+
--rpc-url "http://localhost:8545" \
29+
--private-key "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a" \
30+
--broadcast
31+
32+
33+
# Kill the anvil process to save state
34+
pkill anvil
35+
36+
# Anvil adds a block state, making the code to fail. We don't care about this, just the accounts and the deployed code
37+
cd "$parent_path"
38+
39+
jq 'del(.block)' state/sp1-deployed-anvil-state.json > state/sp1-deployed-anvil-state-tmp.json
40+
41+
cp -f state/sp1-deployed-anvil-state-tmp.json state/sp1-deployed-anvil-state.json
42+
43+
rm state/sp1-deployed-anvil-state-tmp.json

0 commit comments

Comments
 (0)