Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
d8635bda
Unverified
Commit
d8635bda
authored
Dec 06, 2023
by
Mark Tyneway
Committed by
GitHub
Dec 06, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8486 from ethereum-optimism/ctb/init-pausable
contracts-bedrock: Allow initializing system as paused
parents
f7d8f9cf
043fc866
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
57 additions
and
27 deletions
+57
-27
superchainconfig.go
op-bindings/bindings/superchainconfig.go
+14
-14
superchainconfig_more.go
op-bindings/bindings/superchainconfig_more.go
+1
-1
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+2
-2
Deploy.s.sol
packages/contracts-bedrock/scripts/Deploy.s.sol
+1
-1
semver-lock.json
packages/contracts-bedrock/semver-lock.json
+2
-2
SuperchainConfig.json
...ges/contracts-bedrock/snapshots/abi/SuperchainConfig.json
+5
-0
SuperchainConfig.sol
packages/contracts-bedrock/src/L1/SuperchainConfig.sol
+14
-4
Authorization.t.sol
packages/contracts-bedrock/test/Authorization.t.sol
+1
-1
SuperchainConfig.t.sol
packages/contracts-bedrock/test/L1/SuperchainConfig.t.sol
+16
-1
Initializable.t.sol
packages/contracts-bedrock/test/vendor/Initializable.t.sol
+1
-1
No files found.
op-bindings/bindings/superchainconfig.go
View file @
d8635bda
...
...
@@ -30,8 +30,8 @@ var (
// SuperchainConfigMetaData contains all meta data concerning the SuperchainConfig contract.
var
SuperchainConfigMetaData
=
&
bind
.
MetaData
{
ABI
:
"[{
\"
inputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
enumSuperchainConfig.UpdateType
\"
,
\"
name
\"
:
\"
updateType
\"
,
\"
type
\"
:
\"
uint8
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
data
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ConfigUpdate
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"
version
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
name
\"
:
\"
Initialized
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
identifier
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
Paused
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[],
\"
name
\"
:
\"
Unpaused
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GUARDIAN_SLOT
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bytes32
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
PAUSED_SLOT
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bytes32
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
guardian
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
guardian_
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_guardian
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
initialize
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
_identifier
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
pause
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
paused
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
paused_
\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
unpause
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
version
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
}]"
,
Bin
:
"0x60806040523480156
1001057600080fd5b5061001b6000610020565b610273565b600054610100900460ff16158080156100405750600054600160ff909116105b8061006b57506100593061014860201b6106221760201c565b15801561006b575060005460ff166001145b6100d25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805460ff1916600117905580156100f5576000805461ff0019166101001790555b6100fe82610157565b8015610144576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6001600160a01b03163b151590565b61019861018560017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe696101f9565b60001b826101f560201b61063e1760201c565b6000604080516001600160a01b03841660208201527f7b743789cff01dafdeae47739925425aab5dfd02d0c8229e4a508bcd2b9f42bb910160408051601f19818403018152908290526101ea9161021e565b60405180910390a250565b9055565b60008282101561021957634e487b7160e01b600052601160045260246000fd5b500390565b600060208083528351808285015260005b8181101561024b5785810183015185820160400152820161022f565b8181111561025d576000604083870101525b50601f01601f1916929092016040019392505050565b610901806102826000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80636da663551161005b5780636da663551461012a5780637fbf7b6a1461013d578063c23a451a14610153578063c4d66de81461015b57600080fd5b80633f4ba83a1461008d578063452a93201461009757806354fd4d50146100c95780635c975abb14610112575b600080fd5b61009561016e565b005b61009f610294565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101056040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516100c09190610768565b61011a6102cd565b60405190151581526020016100c0565b6100956101383660046107b1565b610305565b610145610435565b6040519081526020016100c0565b610145610463565b610095610169366004610880565b61048e565b610176610294565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f5375706572636861696e436f6e6669673a206f6e6c7920677561726469616e2060448201527f63616e20756e706175736500000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61026961026360017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b76108b6565b60009055565b6040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b60006102c86102c460017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe696108b6565b5490565b905090565b60006102fd6102c460017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b76108b6565b600114905090565b61030d610294565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f5375706572636861696e436f6e6669673a206f6e6c7920677561726469616e2060448201527f63616e2070617573650000000000000000000000000000000000000000000000606482015260840161022c565b6103fb6103f560017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b76108b6565b60019055565b7fc32e6d5d6d1de257f64eac19ddb1f700ba13527983849c9486b1ab007ea283818160405161042a9190610768565b60405180910390a150565b61046060017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b76108b6565b81565b61046060017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe696108b6565b600054610100900460ff16158080156104ae5750600054600160ff909116105b806104c85750303b1580156104c8575060005460ff166001145b610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161022c565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156105b257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6105bb82610642565b801561061e57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b9055565b61067561067060017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe696108b6565b829055565b60006040805173ffffffffffffffffffffffffffffffffffffffff841660208201527f7b743789cff01dafdeae47739925425aab5dfd02d0c8229e4a508bcd2b9f42bb9101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526106f291610768565b60405180910390a250565b6000815180845260005b8181101561072357602081850181015186830182015201610707565b81811115610735576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061077b60208301846106fd565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156107c357600080fd5b813567ffffffffffffffff808211156107db57600080fd5b818401915084601f8301126107ef57600080fd5b81358181111561080157610801610782565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561084757610847610782565b8160405282815287602084870101111561086057600080fd5b826020860160208301376000928101602001929092525095945050505050565b60006020828403121561089257600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461077b57600080fd5b6000828210156108ef
577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50039056fea164736f6c634300080f000a"
,
ABI
:
"[{
\"
inputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
enumSuperchainConfig.UpdateType
\"
,
\"
name
\"
:
\"
updateType
\"
,
\"
type
\"
:
\"
uint8
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
data
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ConfigUpdate
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint8
\"
,
\"
name
\"
:
\"
version
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
name
\"
:
\"
Initialized
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
identifier
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
Paused
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[],
\"
name
\"
:
\"
Unpaused
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GUARDIAN_SLOT
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bytes32
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
PAUSED_SLOT
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bytes32
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
guardian
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
guardian_
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_guardian
\"
,
\"
type
\"
:
\"
address
\"
}
,{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
_paused
\"
,
\"
type
\"
:
\"
bool
\"
}
],
\"
name
\"
:
\"
initialize
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"
_identifier
\"
,
\"
type
\"
:
\"
string
\"
}],
\"
name
\"
:
\"
pause
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
paused
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
paused_
\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
unpause
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
version
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
}]"
,
Bin
:
"0x60806040523480156
200001157600080fd5b506200001f60008062000025565b62000361565b600054610100900460ff1615808015620000465750600054600160ff909116105b8062000076575062000063306200019460201b620006051760201c565b15801562000076575060005460ff166001145b620000de5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805460ff19166001179055801562000102576000805461ff0019166101001790555b6200010d83620001a3565b81156200014857604080518082019091526012815271125b9a5d1a585b1a5e995c881c185d5cd95960721b6020820152620001489062000248565b80156200018f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6001600160a01b03163b151590565b620001e9620001d460017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe69620002cf565b60001b82620002cb60201b620006211760201c565b6000604080516001600160a01b03841660208201527f7b743789cff01dafdeae47739925425aab5dfd02d0c8229e4a508bcd2b9f42bb910160408051601f19818403018152908290526200023d9162000345565b60405180910390a250565b6200028f6200027960017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b7620002cf565b60001b6001620002cb60201b620006211760201c565b7fc32e6d5d6d1de257f64eac19ddb1f700ba13527983849c9486b1ab007ea2838181604051620002c0919062000345565b60405180910390a150565b9055565b600082821015620002f057634e487b7160e01b600052601160045260246000fd5b500390565b6000815180845260005b818110156200031d57602081850181015186830182015201620002ff565b8181111562000330576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006200035a6020830184620002f5565b9392505050565b61097380620003716000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80635c975abb1161005b5780635c975abb146101255780636da663551461013d5780637fbf7b6a14610150578063c23a451a1461016657600080fd5b80633f4ba83a1461008d578063400ada7514610097578063452a9320146100aa57806354fd4d50146100dc575b600080fd5b61009561016e565b005b6100956100a536600461074e565b610294565b6100b261046d565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101186040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b6040516100d39190610810565b61012d6104a6565b60405190151581526020016100d3565b61009561014b366004610859565b6104de565b6101586105ac565b6040519081526020016100d3565b6101586105da565b61017661046d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f5375706572636861696e436f6e6669673a206f6e6c7920677561726469616e2060448201527f63616e20756e706175736500000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61026961026360017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b7610928565b60009055565b6040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b600054610100900460ff16158080156102b45750600054600160ff909116105b806102ce5750303b1580156102ce575060005460ff166001145b61035a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161022c565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156103b857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6103c183610625565b8115610405576104056040518060400160405280601281526020017f496e697469616c697a65722070617573656400000000000000000000000000008152506106e0565b801561046857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b60006104a161049d60017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe69610928565b5490565b905090565b60006104d661049d60017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b7610928565b600114905090565b6104e661046d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f5375706572636861696e436f6e6669673a206f6e6c7920677561726469616e2060448201527f63616e2070617573650000000000000000000000000000000000000000000000606482015260840161022c565b6105a9816106e0565b50565b6105d760017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b7610928565b81565b6105d760017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe69610928565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b9055565b61065861065360017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe69610928565b829055565b60006040805173ffffffffffffffffffffffffffffffffffffffff841660208201527f7b743789cff01dafdeae47739925425aab5dfd02d0c8229e4a508bcd2b9f42bb9101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526106d591610810565b60405180910390a250565b61071461070e60017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b7610928565b60019055565b7fc32e6d5d6d1de257f64eac19ddb1f700ba13527983849c9486b1ab007ea28381816040516107439190610810565b60405180910390a150565b6000806040838503121561076157600080fd5b823573ffffffffffffffffffffffffffffffffffffffff8116811461078557600080fd5b91506020830135801515811461079a57600080fd5b809150509250929050565b6000815180845260005b818110156107cb576020818501810151868301820152016107af565b818111156107dd576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061082360208301846107a5565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561086b57600080fd5b813567ffffffffffffffff8082111561088357600080fd5b818401915084601f83011261089757600080fd5b8135818111156108a9576108a961082a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156108ef576108ef61082a565b8160405282815287602084870101111561090857600080fd5b826020860160208301376000928101602001929092525095945050505050565b600082821015610961
577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50039056fea164736f6c634300080f000a"
,
}
// SuperchainConfigABI is the input ABI used to generate the binding from.
...
...
@@ -356,25 +356,25 @@ func (_SuperchainConfig *SuperchainConfigCallerSession) Version() (string, error
return
_SuperchainConfig
.
Contract
.
Version
(
&
_SuperchainConfig
.
CallOpts
)
}
// Initialize is a paid mutator transaction binding the contract method 0x
c4d66de8
.
// Initialize is a paid mutator transaction binding the contract method 0x
400ada75
.
//
// Solidity: function initialize(address _guardian) returns()
func
(
_SuperchainConfig
*
SuperchainConfigTransactor
)
Initialize
(
opts
*
bind
.
TransactOpts
,
_guardian
common
.
Address
)
(
*
types
.
Transaction
,
error
)
{
return
_SuperchainConfig
.
contract
.
Transact
(
opts
,
"initialize"
,
_guardian
)
// Solidity: function initialize(address _guardian
, bool _paused
) returns()
func
(
_SuperchainConfig
*
SuperchainConfigTransactor
)
Initialize
(
opts
*
bind
.
TransactOpts
,
_guardian
common
.
Address
,
_paused
bool
)
(
*
types
.
Transaction
,
error
)
{
return
_SuperchainConfig
.
contract
.
Transact
(
opts
,
"initialize"
,
_guardian
,
_paused
)
}
// Initialize is a paid mutator transaction binding the contract method 0x
c4d66de8
.
// Initialize is a paid mutator transaction binding the contract method 0x
400ada75
.
//
// Solidity: function initialize(address _guardian) returns()
func
(
_SuperchainConfig
*
SuperchainConfigSession
)
Initialize
(
_guardian
common
.
Address
)
(
*
types
.
Transaction
,
error
)
{
return
_SuperchainConfig
.
Contract
.
Initialize
(
&
_SuperchainConfig
.
TransactOpts
,
_guardian
)
// Solidity: function initialize(address _guardian
, bool _paused
) returns()
func
(
_SuperchainConfig
*
SuperchainConfigSession
)
Initialize
(
_guardian
common
.
Address
,
_paused
bool
)
(
*
types
.
Transaction
,
error
)
{
return
_SuperchainConfig
.
Contract
.
Initialize
(
&
_SuperchainConfig
.
TransactOpts
,
_guardian
,
_paused
)
}
// Initialize is a paid mutator transaction binding the contract method 0x
c4d66de8
.
// Initialize is a paid mutator transaction binding the contract method 0x
400ada75
.
//
// Solidity: function initialize(address _guardian) returns()
func
(
_SuperchainConfig
*
SuperchainConfigTransactorSession
)
Initialize
(
_guardian
common
.
Address
)
(
*
types
.
Transaction
,
error
)
{
return
_SuperchainConfig
.
Contract
.
Initialize
(
&
_SuperchainConfig
.
TransactOpts
,
_guardian
)
// Solidity: function initialize(address _guardian
, bool _paused
) returns()
func
(
_SuperchainConfig
*
SuperchainConfigTransactorSession
)
Initialize
(
_guardian
common
.
Address
,
_paused
bool
)
(
*
types
.
Transaction
,
error
)
{
return
_SuperchainConfig
.
Contract
.
Initialize
(
&
_SuperchainConfig
.
TransactOpts
,
_guardian
,
_paused
)
}
// Pause is a paid mutator transaction binding the contract method 0x6da66355.
...
...
op-bindings/bindings/superchainconfig_more.go
View file @
d8635bda
...
...
@@ -13,7 +13,7 @@ const SuperchainConfigStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contr
var
SuperchainConfigStorageLayout
=
new
(
solc
.
StorageLayout
)
var
SuperchainConfigDeployedBin
=
"0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063
6da663551161005b5780636da663551461012a5780637fbf7b6a1461013d578063c23a451a14610153578063c4d66de81461015b57600080fd5b80633f4ba83a1461008d578063452a93201461009757806354fd4d50146100c95780635c975abb14610112575b600080fd5b61009561016e565b005b61009f610294565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101056040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516100c09190610768565b61011a6102cd565b60405190151581526020016100c0565b6100956101383660046107b1565b610305565b610145610435565b6040519081526020016100c0565b610145610463565b610095610169366004610880565b61048e565b610176610294565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f5375706572636861696e436f6e6669673a206f6e6c7920677561726469616e2060448201527f63616e20756e706175736500000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61026961026360017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b76108b6565b60009055565b6040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b60006102c86102c460017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe696108b6565b5490565b905090565b60006102fd6102c460017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b76108b6565b600114905090565b61030d610294565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f5375706572636861696e436f6e6669673a206f6e6c7920677561726469616e2060448201527f63616e2070617573650000000000000000000000000000000000000000000000606482015260840161022c565b6103fb6103f560017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b76108b6565b60019055565b7fc32e6d5d6d1de257f64eac19ddb1f700ba13527983849c9486b1ab007ea283818160405161042a9190610768565b60405180910390a150565b61046060017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b76108b6565b81565b61046060017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe696108b6565b600054610100900460ff16158080156104ae5750600054600160ff909116105b806104c85750303b1580156104c8575060005460ff166001145b610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161022c565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156105b257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6105bb82610642565b801561061e57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b9055565b61067561067060017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe696108b6565b829055565b60006040805173ffffffffffffffffffffffffffffffffffffffff841660208201527f7b743789cff01dafdeae47739925425aab5dfd02d0c8229e4a508bcd2b9f42bb9101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526106f291610768565b60405180910390a250565b6000815180845260005b8181101561072357602081850181015186830182015201610707565b81811115610735576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061077b60208301846106fd565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156107c357600080fd5b813567ffffffffffffffff808211156107db57600080fd5b818401915084601f8301126107ef57600080fd5b81358181111561080157610801610782565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561084757610847610782565b8160405282815287602084870101111561086057600080fd5b826020860160208301376000928101602001929092525095945050505050565b60006020828403121561089257600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461077b57600080fd5b6000828210156108ef
577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50039056fea164736f6c634300080f000a"
var
SuperchainConfigDeployedBin
=
"0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063
5c975abb1161005b5780635c975abb146101255780636da663551461013d5780637fbf7b6a14610150578063c23a451a1461016657600080fd5b80633f4ba83a1461008d578063400ada7514610097578063452a9320146100aa57806354fd4d50146100dc575b600080fd5b61009561016e565b005b6100956100a536600461074e565b610294565b6100b261046d565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101186040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b6040516100d39190610810565b61012d6104a6565b60405190151581526020016100d3565b61009561014b366004610859565b6104de565b6101586105ac565b6040519081526020016100d3565b6101586105da565b61017661046d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f5375706572636861696e436f6e6669673a206f6e6c7920677561726469616e2060448201527f63616e20756e706175736500000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61026961026360017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b7610928565b60009055565b6040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b600054610100900460ff16158080156102b45750600054600160ff909116105b806102ce5750303b1580156102ce575060005460ff166001145b61035a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161022c565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156103b857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6103c183610625565b8115610405576104056040518060400160405280601281526020017f496e697469616c697a65722070617573656400000000000000000000000000008152506106e0565b801561046857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b60006104a161049d60017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe69610928565b5490565b905090565b60006104d661049d60017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b7610928565b600114905090565b6104e661046d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f5375706572636861696e436f6e6669673a206f6e6c7920677561726469616e2060448201527f63616e2070617573650000000000000000000000000000000000000000000000606482015260840161022c565b6105a9816106e0565b50565b6105d760017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b7610928565b81565b6105d760017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe69610928565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b9055565b61065861065360017fd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe69610928565b829055565b60006040805173ffffffffffffffffffffffffffffffffffffffff841660208201527f7b743789cff01dafdeae47739925425aab5dfd02d0c8229e4a508bcd2b9f42bb9101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526106d591610810565b60405180910390a250565b61071461070e60017f54176ff9944c4784e5857ec4e5ef560a462c483bf534eda43f91bb01a470b1b7610928565b60019055565b7fc32e6d5d6d1de257f64eac19ddb1f700ba13527983849c9486b1ab007ea28381816040516107439190610810565b60405180910390a150565b6000806040838503121561076157600080fd5b823573ffffffffffffffffffffffffffffffffffffffff8116811461078557600080fd5b91506020830135801515811461079a57600080fd5b809150509250929050565b6000815180845260005b818110156107cb576020818501810151868301820152016107af565b818111156107dd576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061082360208301846107a5565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561086b57600080fd5b813567ffffffffffffffff8082111561088357600080fd5b818401915084601f83011261089757600080fd5b8135818111156108a9576108a961082a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156108ef576108ef61082a565b8160405282815287602084870101111561090857600080fd5b826020860160208301376000928101602001929092525095945050505050565b600082821015610961
577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50039056fea164736f6c634300080f000a"
func
init
()
{
...
...
packages/contracts-bedrock/.gas-snapshot
View file @
d8635bda
...
...
@@ -4,8 +4,8 @@ GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_0() (gas: 5406
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 4052847)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 442004)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 3487753)
GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 55
446
)
GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 55
379
)
GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 86629)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 68462)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 68911)
GasBenchMark_OptimismPortal:test_proveWithdrawalTransaction_benchmark() (gas: 153571)
\ No newline at end of file
GasBenchMark_OptimismPortal:test_proveWithdrawalTransaction_benchmark() (gas: 153504)
\ No newline at end of file
packages/contracts-bedrock/scripts/Deploy.s.sol
View file @
d8635bda
...
...
@@ -721,7 +721,7 @@ contract Deploy is Deployer {
_upgradeAndCallViaSafe({
_proxy: superchainConfigProxy,
_implementation: superchainConfig,
_innerCallData: abi.encodeCall(SuperchainConfig.initialize, (cfg.superchainConfigGuardian()))
_innerCallData: abi.encodeCall(SuperchainConfig.initialize, (cfg.superchainConfigGuardian()
, false
))
});
ChainAssertions.checkSuperchainConfig({ _contracts: _proxiesUnstrict(), _cfg: cfg, _isPaused: false });
...
...
packages/contracts-bedrock/semver-lock.json
View file @
d8635bda
...
...
@@ -36,8 +36,8 @@
"sourceCodeHash"
:
"0xbd56a23cd3221cb9d25029e80cd9f2afe2c615ae9c0b3956bf6ed373b8b805b6"
},
"src/L1/SuperchainConfig.sol"
:
{
"initCodeHash"
:
"0x
b7d34a360315d7cd920dfae9688a279f82c0608e3e3fe839d50e17f5fe50b65f
"
,
"sourceCodeHash"
:
"0x
22d8de384a5261335ba734ef4af221b0e360b6228531560811188d22b555e926
"
"initCodeHash"
:
"0x
d3cd2d5345886966e4946abf60bfb9b1be9a134b49b47f8d744b1b56d627b72a
"
,
"sourceCodeHash"
:
"0x
c64527ce01726036f31236ba851a458f39b990f1f3629e44df59986365456137
"
},
"src/L1/SystemConfig.sol"
:
{
"initCodeHash"
:
"0x7662ba203d662cf433b3e44b85fdd6f4d5b39d77eb88156200d15b6bc8f15bc4"
,
...
...
packages/contracts-bedrock/snapshots/abi/SuperchainConfig.json
View file @
d8635bda
...
...
@@ -100,6 +100,11 @@
"internalType"
:
"address"
,
"name"
:
"_guardian"
,
"type"
:
"address"
},
{
"internalType"
:
"bool"
,
"name"
:
"_paused"
,
"type"
:
"bool"
}
],
"name"
:
"initialize"
,
...
...
packages/contracts-bedrock/src/L1/SuperchainConfig.sol
View file @
d8635bda
...
...
@@ -33,18 +33,22 @@ contract SuperchainConfig is Initializable, ISemver {
event ConfigUpdate(UpdateType indexed updateType, bytes data);
/// @notice Semantic version.
/// @custom:semver 1.
0
.0
string public constant version = "1.
0
.0";
/// @custom:semver 1.
1
.0
string public constant version = "1.
1
.0";
/// @notice Constructs the SuperchainConfig contract.
constructor() {
initialize({ _guardian: address(0) });
initialize({ _guardian: address(0)
, _paused: false
});
}
/// @notice Initializer.
/// @param _guardian Address of the guardian, can pause the OptimismPortal.
function initialize(address _guardian) public initializer {
/// @param _paused Initial paused status.
function initialize(address _guardian, bool _paused) public initializer {
_setGuardian(_guardian);
if (_paused) {
_pause("Initializer paused");
}
}
/// @notice Getter for the guardian address.
...
...
@@ -61,6 +65,12 @@ contract SuperchainConfig is Initializable, ISemver {
/// @param _identifier (Optional) A string to identify provenance of the pause transaction.
function pause(string memory _identifier) external {
require(msg.sender == guardian(), "SuperchainConfig: only guardian can pause");
_pause(_identifier);
}
/// @notice Pauses withdrawals.
/// @param _identifier (Optional) A string to identify provenance of the pause transaction.
function _pause(string memory _identifier) internal {
Storage.setUint(PAUSED_SLOT, 1);
emit Paused(_identifier);
}
...
...
packages/contracts-bedrock/test/Authorization.t.sol
View file @
d8635bda
...
...
@@ -183,7 +183,7 @@ contract Authorization_Test is CommonTest {
_addSpec("SuperchainConfig", _getSel("GUARDIAN_SLOT()"), false);
_addSpec("SuperchainConfig", _getSel("PAUSED_SLOT()"), false);
_addSpec("SuperchainConfig", _getSel("guardian()"), false);
_addSpec("SuperchainConfig", _getSel("initialize(address)"), false);
_addSpec("SuperchainConfig", _getSel("initialize(address
,bool
)"), false);
_addSpec("SuperchainConfig", _getSel("pause(string)"), true);
_addSpec("SuperchainConfig", _getSel("paused()"), false);
_addSpec("SuperchainConfig", _getSel("unpause()"), true);
...
...
packages/contracts-bedrock/test/L1/SuperchainConfig.t.sol
View file @
d8635bda
...
...
@@ -15,10 +15,25 @@ import { SuperchainConfig } from "src/L1/SuperchainConfig.sol";
contract SuperchainConfig_Init_Test is CommonTest {
/// @dev Tests that initialization sets the correct values. These are defined in CommonTest.sol.
function test_initialize_
values
_succeeds() external {
function test_initialize_
unpaused
_succeeds() external {
assertFalse(superchainConfig.paused());
assertEq(superchainConfig.guardian(), deploy.cfg().superchainConfigGuardian());
}
/// @dev Tests that it can be intialized as paused.
function test_initialize_paused_succeeds() external {
Proxy newProxy = new Proxy(alice);
SuperchainConfig newImpl = new SuperchainConfig();
vm.startPrank(alice);
newProxy.upgradeToAndCall(
address(newImpl),
abi.encodeWithSelector(SuperchainConfig.initialize.selector, deploy.cfg().superchainConfigGuardian(), true)
);
assertTrue(SuperchainConfig(address(newProxy)).paused());
assertEq(SuperchainConfig(address(newProxy)).guardian(), deploy.cfg().superchainConfigGuardian());
}
}
contract SuperchainConfig_Pause_TestFail is CommonTest {
...
...
packages/contracts-bedrock/test/vendor/Initializable.t.sol
View file @
d8635bda
...
...
@@ -39,7 +39,7 @@ contract Initializer_Test is Bridge_Initializer {
contracts.push(
InitializeableContract({
target: address(superchainConfig),
initCalldata: abi.encodeCall(superchainConfig.initialize, (address(0))),
initCalldata: abi.encodeCall(superchainConfig.initialize, (address(0)
, false
)),
initializedSlotVal: deploy.loadInitializedSlot("SuperchainConfig", true)
})
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment