Skip to content

Commit 5c5a7b0

Browse files
authored
[goerli-alpha] Incident practice - rotate batcher (#111)
* Rotate batcher * Set back to old batcher * Records files
1 parent e23157a commit 5c5a7b0

File tree

6 files changed

+271
-0
lines changed

6 files changed

+271
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
OP_COMMIT=90bff30727d05fb3451e2a6a118c1350fd0c62af
2+
BASE_CONTRACTS_COMMIT=e961e8638874d571aa63a6e35507e3779131d1eb
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
include ../../Makefile
2+
include ../.env
3+
include .env
4+
5+
##
6+
# Foundry commands
7+
##
8+
9+
.PHONY: sign
10+
sign:
11+
$(GOPATH)/bin/eip712sign --private-key $(PRIVATE_KEY) -- \
12+
forge script --rpc-url $(L1_RPC_URL) SetBatcherAddr --sig "sign()"
13+
14+
.PHONY: run
15+
run:
16+
forge script --rpc-url $(L1_RPC_URL) \
17+
SetBatcherAddr --sig "run(bytes)" $(SIGNATURES) \
18+
--private-key $(PRIVATE_KEY) \
19+
--broadcast
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[profile.default]
2+
src = 'src'
3+
out = 'out'
4+
libs = ['lib']
5+
broadcast = 'records'
6+
fs_permissions = [ {access = "read-write", path = "./"} ]
7+
optimizer = true
8+
optimizer_runs = 999999
9+
solc_version = "0.8.15"
10+
via-ir = true
11+
remappings = [
12+
'@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/',
13+
'@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts',
14+
'@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts',
15+
'@rari-capital/solmate/=lib/solmate/',
16+
'@base-contracts/=lib/base-contracts'
17+
]
18+
19+
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0xb08c9ea019181c7c98256c35dfd77a83e813d634d324b40ee8c1615d4eb4f1c5",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0xA221e753e82626F96b83b3665F4fA92114a2a6f3",
8+
"function": null,
9+
"arguments": null,
10+
"transaction": {
11+
"type": "0x02",
12+
"from": "0xd753a89450213a8d7f7acce3a615d71ebd97366d",
13+
"to": "0xa221e753e82626f96b83b3665f4fa92114a2a6f3",
14+
"gas": "0x1efbb",
15+
"value": "0x0",
16+
"data": "0x6a761202000000000000000000000000ca11bde05977b3631167028862be2a173976ca110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000012482ad56cb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000004f775d578e3ab8ce81f5ec065050938dbd5fb8c2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c9b26f61000000000000000000000000f298c4836d17994556d941b51f0800aa034e7f110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008224ccbf1c14ba0568b1ca6ff8592054e981d9ed9f945905b45cc06726b89378d521beec4e7f988869d0895d3e3b2ed517dc4e30e0ea8dc7495e7de61eb96b031c1ce6a0e9d6b6bc0a401c66f315280238a47c1252254f76a10528fefd267cf66c3e0df4e8859a3eb020414f82577786e5849986b575213d70cb13a3265d538e73cf1b000000000000000000000000000000000000000000000000000000000000",
17+
"nonce": "0x4c",
18+
"accessList": []
19+
},
20+
"additionalContracts": [],
21+
"isFixedGasLimit": false
22+
}
23+
],
24+
"receipts": [
25+
{
26+
"transactionHash": "0xb08c9ea019181c7c98256c35dfd77a83e813d634d324b40ee8c1615d4eb4f1c5",
27+
"transactionIndex": "0x3",
28+
"blockHash": "0x2f1dc2dbe4ca454c4c3947050453710663584ed08be90c16ea10db0be7720536",
29+
"blockNumber": "0x95ae7c",
30+
"from": "0xD753a89450213A8D7f7aCCE3a615d71ebD97366d",
31+
"to": "0xA221e753e82626F96b83b3665F4fA92114a2a6f3",
32+
"cumulativeGasUsed": "0x45f12",
33+
"gasUsed": "0x166e7",
34+
"contractAddress": null,
35+
"logs": [
36+
{
37+
"address": "0xA221e753e82626F96b83b3665F4fA92114a2a6f3",
38+
"topics": [
39+
"0x66753cd2356569ee081232e3be8909b950e0a76c1f8460c3a5e3c2be32b11bed"
40+
],
41+
"data": "0x000000000000000000000000ca11bde05977b3631167028862be2a173976ca110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000012482ad56cb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000004f775d578e3ab8ce81f5ec065050938dbd5fb8c2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c9b26f61000000000000000000000000f298c4836d17994556d941b51f0800aa034e7f110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008224ccbf1c14ba0568b1ca6ff8592054e981d9ed9f945905b45cc06726b89378d521beec4e7f988869d0895d3e3b2ed517dc4e30e0ea8dc7495e7de61eb96b031c1ce6a0e9d6b6bc0a401c66f315280238a47c1252254f76a10528fefd267cf66c3e0df4e8859a3eb020414f82577786e5849986b575213d70cb13a3265d538e73cf1b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001f000000000000000000000000d753a89450213a8d7f7acce3a615d71ebd97366d0000000000000000000000000000000000000000000000000000000000000002",
42+
"blockHash": "0x2f1dc2dbe4ca454c4c3947050453710663584ed08be90c16ea10db0be7720536",
43+
"blockNumber": "0x95ae7c",
44+
"transactionHash": "0xb08c9ea019181c7c98256c35dfd77a83e813d634d324b40ee8c1615d4eb4f1c5",
45+
"transactionIndex": "0x3",
46+
"logIndex": "0x1",
47+
"removed": false
48+
},
49+
{
50+
"address": "0x4f775d578e3Ab8ce81f5Ec065050938DbD5Fb8c2",
51+
"topics": [
52+
"0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be",
53+
"0x0000000000000000000000000000000000000000000000000000000000000000",
54+
"0x0000000000000000000000000000000000000000000000000000000000000000"
55+
],
56+
"data": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f298c4836d17994556d941b51f0800aa034e7f11",
57+
"blockHash": "0x2f1dc2dbe4ca454c4c3947050453710663584ed08be90c16ea10db0be7720536",
58+
"blockNumber": "0x95ae7c",
59+
"transactionHash": "0xb08c9ea019181c7c98256c35dfd77a83e813d634d324b40ee8c1615d4eb4f1c5",
60+
"transactionIndex": "0x3",
61+
"logIndex": "0x2",
62+
"removed": false
63+
},
64+
{
65+
"address": "0xA221e753e82626F96b83b3665F4fA92114a2a6f3",
66+
"topics": [
67+
"0x442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e"
68+
],
69+
"data": "0x100ebf3ec61df0a871ba7a1711966be616bf089a0a8c41fc2ca2680b870208140000000000000000000000000000000000000000000000000000000000000000",
70+
"blockHash": "0x2f1dc2dbe4ca454c4c3947050453710663584ed08be90c16ea10db0be7720536",
71+
"blockNumber": "0x95ae7c",
72+
"transactionHash": "0xb08c9ea019181c7c98256c35dfd77a83e813d634d324b40ee8c1615d4eb4f1c5",
73+
"transactionIndex": "0x3",
74+
"logIndex": "0x3",
75+
"removed": false
76+
}
77+
],
78+
"status": "0x1",
79+
"logsBloom": "0x00000000400000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000008000040000000000000000000000000000000000000008000000000040000000000000080000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000400000000000000000084000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000020000000000000000004000000000000000000000000000000000000018000000000",
80+
"type": "0x2",
81+
"effectiveGasPrice": "0xb2d05e08"
82+
}
83+
],
84+
"libraries": [],
85+
"pending": [],
86+
"returns": {
87+
"0": {
88+
"internal_type": "bool",
89+
"value": "true"
90+
}
91+
},
92+
"timestamp": 1696449591,
93+
"chain": 5,
94+
"multi": false,
95+
"commit": "e7f775b"
96+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0x204ebc4dd9106c5b07585119614b2113bac023de000fb76e9205ffcaf82a0cdd",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0xA221e753e82626F96b83b3665F4fA92114a2a6f3",
8+
"function": null,
9+
"arguments": null,
10+
"transaction": {
11+
"type": "0x02",
12+
"from": "0xd753a89450213a8d7f7acce3a615d71ebd97366d",
13+
"to": "0xa221e753e82626f96b83b3665f4fa92114a2a6f3",
14+
"gas": "0x1efbb",
15+
"value": "0x0",
16+
"data": "0x6a761202000000000000000000000000ca11bde05977b3631167028862be2a173976ca110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000012482ad56cb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000004f775d578e3ab8ce81f5ec065050938dbd5fb8c2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c9b26f6100000000000000000000000053394266fc80e5d4e6d25b3d0b7ca243859b7b0900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082b94d330ad36bd0a08cdd70fcd0e81a9b9cdc05e0362be4d526d47f3c0cfbaf8e2f607cc9ce53a2b9288afa76cd61d1e03f7b4e7386251ab6c9e59399eef3c7e91bdeab23397b8d879cdeac05f443acc852b3922528f4359c3de66a6a76ffcc0e687b5df6603ce8c5e053605dd735e2c71ef6d567735fac00959ea9018c89f2cb501c000000000000000000000000000000000000000000000000000000000000",
17+
"nonce": "0x4d",
18+
"accessList": []
19+
},
20+
"additionalContracts": [],
21+
"isFixedGasLimit": false
22+
}
23+
],
24+
"receipts": [
25+
{
26+
"transactionHash": "0x204ebc4dd9106c5b07585119614b2113bac023de000fb76e9205ffcaf82a0cdd",
27+
"transactionIndex": "0x0",
28+
"blockHash": "0xdc2fe7c51ab67f1c1619d884cb20239e60ca20be1971d88150095843eae9ef3d",
29+
"blockNumber": "0x95b1de",
30+
"from": "0xD753a89450213A8D7f7aCCE3a615d71ebD97366d",
31+
"to": "0xA221e753e82626F96b83b3665F4fA92114a2a6f3",
32+
"cumulativeGasUsed": "0x166e7",
33+
"gasUsed": "0x166e7",
34+
"contractAddress": null,
35+
"logs": [
36+
{
37+
"address": "0xA221e753e82626F96b83b3665F4fA92114a2a6f3",
38+
"topics": [
39+
"0x66753cd2356569ee081232e3be8909b950e0a76c1f8460c3a5e3c2be32b11bed"
40+
],
41+
"data": "0x000000000000000000000000ca11bde05977b3631167028862be2a173976ca110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000012482ad56cb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000004f775d578e3ab8ce81f5ec065050938dbd5fb8c2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c9b26f6100000000000000000000000053394266fc80e5d4e6d25b3d0b7ca243859b7b0900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082b94d330ad36bd0a08cdd70fcd0e81a9b9cdc05e0362be4d526d47f3c0cfbaf8e2f607cc9ce53a2b9288afa76cd61d1e03f7b4e7386251ab6c9e59399eef3c7e91bdeab23397b8d879cdeac05f443acc852b3922528f4359c3de66a6a76ffcc0e687b5df6603ce8c5e053605dd735e2c71ef6d567735fac00959ea9018c89f2cb501c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000d753a89450213a8d7f7acce3a615d71ebd97366d0000000000000000000000000000000000000000000000000000000000000002",
42+
"blockHash": "0xdc2fe7c51ab67f1c1619d884cb20239e60ca20be1971d88150095843eae9ef3d",
43+
"blockNumber": "0x95b1de",
44+
"transactionHash": "0x204ebc4dd9106c5b07585119614b2113bac023de000fb76e9205ffcaf82a0cdd",
45+
"transactionIndex": "0x0",
46+
"logIndex": "0x0",
47+
"removed": false
48+
},
49+
{
50+
"address": "0x4f775d578e3Ab8ce81f5Ec065050938DbD5Fb8c2",
51+
"topics": [
52+
"0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be",
53+
"0x0000000000000000000000000000000000000000000000000000000000000000",
54+
"0x0000000000000000000000000000000000000000000000000000000000000000"
55+
],
56+
"data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000053394266fc80e5d4e6d25b3d0b7ca243859b7b09",
57+
"blockHash": "0xdc2fe7c51ab67f1c1619d884cb20239e60ca20be1971d88150095843eae9ef3d",
58+
"blockNumber": "0x95b1de",
59+
"transactionHash": "0x204ebc4dd9106c5b07585119614b2113bac023de000fb76e9205ffcaf82a0cdd",
60+
"transactionIndex": "0x0",
61+
"logIndex": "0x1",
62+
"removed": false
63+
},
64+
{
65+
"address": "0xA221e753e82626F96b83b3665F4fA92114a2a6f3",
66+
"topics": [
67+
"0x442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e"
68+
],
69+
"data": "0xf4c8ed2a7ec0025fe4464a0a281b958f7a43926c9b010addfa5973c1e4cf110c0000000000000000000000000000000000000000000000000000000000000000",
70+
"blockHash": "0xdc2fe7c51ab67f1c1619d884cb20239e60ca20be1971d88150095843eae9ef3d",
71+
"blockNumber": "0x95b1de",
72+
"transactionHash": "0x204ebc4dd9106c5b07585119614b2113bac023de000fb76e9205ffcaf82a0cdd",
73+
"transactionIndex": "0x0",
74+
"logIndex": "0x2",
75+
"removed": false
76+
}
77+
],
78+
"status": "0x1",
79+
"logsBloom": "0x00000000400000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000008000040000000000000000000000000000000000000008000000000040000000000000080000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000400000000000000000084000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000020000000000000000004000000000000000000000000000000000000018000000000",
80+
"type": "0x2",
81+
"effectiveGasPrice": "0xb2d05e09"
82+
}
83+
],
84+
"libraries": [],
85+
"pending": [],
86+
"returns": {
87+
"0": {
88+
"internal_type": "bool",
89+
"value": "true"
90+
}
91+
},
92+
"timestamp": 1696462286,
93+
"chain": 5,
94+
"multi": false,
95+
"commit": "2043f83"
96+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity 0.8.15;
3+
4+
import "@eth-optimism-bedrock/src/L1/SystemConfig.sol";
5+
import "@base-contracts/script/universal/MultisigBuilder.sol";
6+
7+
contract SetBatcherAddr is MultisigBuilder {
8+
address constant internal NewBatcher = 0x53394266FC80E5D4E6D25B3d0b7Ca243859B7B09;
9+
address constant internal SystemConfigAddr = 0x4f775d578e3Ab8ce81f5Ec065050938DbD5Fb8c2;
10+
address internal PROXY_ADMIN_OWNER = 0xA221e753e82626F96b83b3665F4fA92114a2a6f3;
11+
12+
13+
function _postCheck() internal override view {
14+
SystemConfig systemConfig = SystemConfig(SystemConfigAddr);
15+
bytes32 batcherHash = bytes32(abi.encode(NewBatcher));
16+
require(systemConfig.batcherHash() == batcherHash, "SetBatcherAddr: batcherHash not set correctly");
17+
}
18+
19+
function _buildCalls() internal override view returns (IMulticall3.Call3[] memory) {
20+
IMulticall3.Call3[] memory calls = new IMulticall3.Call3[](1);
21+
22+
bytes32 batcherHash = bytes32(abi.encode(NewBatcher));
23+
24+
calls[0] = IMulticall3.Call3({
25+
target: SystemConfigAddr,
26+
allowFailure: false,
27+
callData: abi.encodeCall(
28+
SystemConfig.setBatcherHash,
29+
(batcherHash)
30+
)
31+
});
32+
33+
return calls;
34+
}
35+
36+
function _ownerSafe() internal override view returns (address) {
37+
return PROXY_ADMIN_OWNER;
38+
}
39+
}

0 commit comments

Comments
 (0)