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
d734f9d9
Unverified
Commit
d734f9d9
authored
Oct 26, 2022
by
mergify[bot]
Committed by
GitHub
Oct 26, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3676 from ethereum-optimism/sc/ctb-unified-deploy
feat(ctb): simplfy deploy scripts with dictator
parents
27e164d5
94ce202b
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
995 additions
and
412 deletions
+995
-412
__init__.py
bedrock-devnet/devnet/__init__.py
+1
-1
deployerwhitelist_more.go
op-bindings/bindings/deployerwhitelist_more.go
+1
-1
gaspriceoracle_more.go
op-bindings/bindings/gaspriceoracle_more.go
+1
-1
governancetoken_more.go
op-bindings/bindings/governancetoken_more.go
+1
-1
l1crossdomainmessenger_more.go
op-bindings/bindings/l1crossdomainmessenger_more.go
+1
-1
l2crossdomainmessenger_more.go
op-bindings/bindings/l2crossdomainmessenger_more.go
+1
-1
l2erc721bridge_more.go
op-bindings/bindings/l2erc721bridge_more.go
+1
-1
l2standardbridge_more.go
op-bindings/bindings/l2standardbridge_more.go
+1
-1
legacyerc20eth_more.go
op-bindings/bindings/legacyerc20eth_more.go
+1
-1
legacymessagepasser_more.go
op-bindings/bindings/legacymessagepasser_more.go
+1
-1
optimismmintableerc721factory_more.go
op-bindings/bindings/optimismmintableerc721factory_more.go
+1
-1
optimismportal_more.go
op-bindings/bindings/optimismportal_more.go
+1
-1
proxyadmin_more.go
op-bindings/bindings/proxyadmin_more.go
+1
-1
FreshSystemDictator.sol
...acts-bedrock/contracts/deployment/FreshSystemDictator.sol
+116
-0
CommonTest.t.sol
packages/contracts-bedrock/contracts/test/CommonTest.t.sol
+1
-4
L2CrossDomainMessenger.t.sol
...racts-bedrock/contracts/test/L2CrossDomainMessenger.t.sol
+0
-1
hardhat.json
packages/contracts-bedrock/deploy-config/hardhat.json
+7
-2
000-InitProxies.deploy.ts
packages/contracts-bedrock/deploy/000-InitProxies.deploy.ts
+0
-42
000-ProxyAdmin.ts
packages/contracts-bedrock/deploy/000-ProxyAdmin.ts
+24
-0
001-InitImplementations.deploy.ts
...ontracts-bedrock/deploy/001-InitImplementations.deploy.ts
+0
-300
001-L1StandardBridgeProxy.ts
...ges/contracts-bedrock/deploy/001-L1StandardBridgeProxy.ts
+24
-0
002-ConfigureProxyAdmin.ts
packages/contracts-bedrock/deploy/002-ConfigureProxyAdmin.ts
+0
-45
002-L2OutputOracleProxy.ts
packages/contracts-bedrock/deploy/002-L2OutputOracleProxy.ts
+24
-0
003-L1CrossDomainMessengerProxy.ts
...ntracts-bedrock/deploy/003-L1CrossDomainMessengerProxy.ts
+24
-0
004-OptimismPortalProxy.ts
packages/contracts-bedrock/deploy/004-OptimismPortalProxy.ts
+24
-0
005-OptimismMintableERC20FactoryProxy.ts
...s-bedrock/deploy/005-OptimismMintableERC20FactoryProxy.ts
+24
-0
006-L1ERC721BridgeProxy.ts
packages/contracts-bedrock/deploy/006-L1ERC721BridgeProxy.ts
+24
-0
007-L1CrossDomainMessengerImpl.ts
...ontracts-bedrock/deploy/007-L1CrossDomainMessengerImpl.ts
+31
-0
008-L1StandardBridgeImpl.ts
...ages/contracts-bedrock/deploy/008-L1StandardBridgeImpl.ts
+37
-0
009-L2OutputOracleImpl.ts
packages/contracts-bedrock/deploy/009-L2OutputOracleImpl.ts
+101
-0
010-OptimismPortalImpl.ts
packages/contracts-bedrock/deploy/010-OptimismPortalImpl.ts
+39
-0
011-OptimismMintableERC20FactoryImpl.ts
...ts-bedrock/deploy/011-OptimismMintableERC20FactoryImpl.ts
+31
-0
012-L1ERC721BridgeImpl.ts
packages/contracts-bedrock/deploy/012-L1ERC721BridgeImpl.ts
+32
-0
013-FreshSystemDicator.ts
packages/contracts-bedrock/deploy/013-FreshSystemDicator.ts
+104
-0
hardhat.config.ts
packages/contracts-bedrock/hardhat.config.ts
+15
-5
package.json
packages/contracts-bedrock/package.json
+2
-0
deploy-utils.ts
packages/contracts-bedrock/src/deploy-utils.ts
+298
-0
No files found.
bedrock-devnet/devnet/__init__.py
View file @
d734f9d9
...
...
@@ -75,11 +75,11 @@ def main():
addresses
[
c
.
replace
(
'.json'
,
''
)]
=
data
[
'address'
]
sdk_addresses
=
{}
sdk_addresses
.
update
({
'AddressManager'
:
'0x0000000000000000000000000000000000000000'
,
'StateCommitmentChain'
:
'0x0000000000000000000000000000000000000000'
,
'CanonicalTransactionChain'
:
'0x0000000000000000000000000000000000000000'
,
'BondManager'
:
'0x0000000000000000000000000000000000000000'
,
})
sdk_addresses
[
'AddressManager'
]
=
addresses
[
'AddressManager'
]
sdk_addresses
[
'L1CrossDomainMessenger'
]
=
addresses
[
'L1CrossDomainMessengerProxy'
]
sdk_addresses
[
'L1StandardBridge'
]
=
addresses
[
'L1StandardBridgeProxy'
]
sdk_addresses
[
'OptimismPortal'
]
=
addresses
[
'OptimismPortalProxy'
]
...
...
op-bindings/bindings/deployerwhitelist_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
DeployerWhitelistStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:3
248,
\"
contract
\"
:
\"
contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist
\"
,
\"
label
\"
:
\"
owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:3253
,
\"
contract
\"
:
\"
contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist
\"
,
\"
label
\"
:
\"
whitelist
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_bool)
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_mapping(t_address,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_bool
\"
}}}"
const
DeployerWhitelistStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:3
529,
\"
contract
\"
:
\"
contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist
\"
,
\"
label
\"
:
\"
owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:3534
,
\"
contract
\"
:
\"
contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist
\"
,
\"
label
\"
:
\"
whitelist
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_bool)
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_mapping(t_address,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_bool
\"
}}}"
var
DeployerWhitelistStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/gaspriceoracle_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
GasPriceOracleStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:28
513
,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
_owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:1953,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
spacer_1_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1956,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
spacer_2_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1959,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
overhead
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1962,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
scalar
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
4
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1965,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
decimals
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
5
\"
,
\"
type
\"
:
\"
t_uint256
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
}}}"
const
GasPriceOracleStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:28
794
,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
_owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:1953,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
spacer_1_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1956,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
spacer_2_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1959,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
overhead
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1962,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
scalar
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
4
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1965,
\"
contract
\"
:
\"
contracts/L2/GasPriceOracle.sol:GasPriceOracle
\"
,
\"
label
\"
:
\"
decimals
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
5
\"
,
\"
type
\"
:
\"
t_uint256
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
}}}"
var
GasPriceOracleStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/governancetoken_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
GovernanceTokenStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:2
8863,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_balances
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_uint256)
\"
},{
\"
astId
\"
:28869,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_allowances
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
},{
\"
astId
\"
:28871,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_totalSupply
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:28873,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_name
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_string_storage
\"
},{
\"
astId
\"
:28875,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_symbol
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
4
\"
,
\"
type
\"
:
\"
t_string_storage
\"
},{
\"
astId
\"
:30240,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_nonces
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
5
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_struct(Counter)32426_storage)
\"
},{
\"
astId
\"
:30248,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_PERMIT_TYPEHASH_DEPRECATED_SLOT
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
6
\"
,
\"
type
\"
:
\"
t_bytes32
\"
},{
\"
astId
\"
:29581,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_delegates
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
7
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_address)
\"
},{
\"
astId
\"
:29587,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_checkpoints
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
8
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_array(t_struct(Checkpoint)29572_storage)dyn_storage)
\"
},{
\"
astId
\"
:29591,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_totalSupplyCheckpoints
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
9
\"
,
\"
type
\"
:
\"
t_array(t_struct(Checkpoint)29572_storage)dyn_storage
\"
},{
\"
astId
\"
:28513,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
10
\"
,
\"
type
\"
:
\"
t_address
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_struct(Checkpoint)29572_storage)dyn_storage
\"
:{
\"
encoding
\"
:
\"
dynamic_array
\"
,
\"
label
\"
:
\"
struct ERC20Votes.Checkpoint[]
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_address,t_address)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
address)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_address
\"
},
\"
t_mapping(t_address,t_array(t_struct(Checkpoint)29572_storage)dyn_storage)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
struct ERC20Votes.Checkpoint[])
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_array(t_struct(Checkpoint)29572_storage)dyn_storage
\"
},
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
mapping(address =
\u003e
uint256))
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_mapping(t_address,t_uint256)
\"
},
\"
t_mapping(t_address,t_struct(Counter)32426_storage)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
struct Counters.Counter)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_struct(Counter)32426_storage
\"
},
\"
t_mapping(t_address,t_uint256)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
uint256)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_uint256
\"
},
\"
t_string_storage
\"
:{
\"
encoding
\"
:
\"
bytes
\"
,
\"
label
\"
:
\"
string
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_struct(Checkpoint)29572_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct ERC20Votes.Checkpoint
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_struct(Counter)32426
_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct Counters.Counter
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint224
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint224
\"
,
\"
numberOfBytes
\"
:
\"
28
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint32
\"
,
\"
numberOfBytes
\"
:
\"
4
\"
}}}"
const
GovernanceTokenStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:2
9144,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_balances
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_uint256)
\"
},{
\"
astId
\"
:29150,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_allowances
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
},{
\"
astId
\"
:29152,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_totalSupply
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:29154,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_name
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_string_storage
\"
},{
\"
astId
\"
:29156,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_symbol
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
4
\"
,
\"
type
\"
:
\"
t_string_storage
\"
},{
\"
astId
\"
:30521,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_nonces
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
5
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_struct(Counter)32707_storage)
\"
},{
\"
astId
\"
:30529,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_PERMIT_TYPEHASH_DEPRECATED_SLOT
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
6
\"
,
\"
type
\"
:
\"
t_bytes32
\"
},{
\"
astId
\"
:29862,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_delegates
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
7
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_address)
\"
},{
\"
astId
\"
:29868,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_checkpoints
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
8
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_array(t_struct(Checkpoint)29853_storage)dyn_storage)
\"
},{
\"
astId
\"
:29872,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_totalSupplyCheckpoints
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
9
\"
,
\"
type
\"
:
\"
t_array(t_struct(Checkpoint)29853_storage)dyn_storage
\"
},{
\"
astId
\"
:28794,
\"
contract
\"
:
\"
contracts/L2/GovernanceToken.sol:GovernanceToken
\"
,
\"
label
\"
:
\"
_owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
10
\"
,
\"
type
\"
:
\"
t_address
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_struct(Checkpoint)29853_storage)dyn_storage
\"
:{
\"
encoding
\"
:
\"
dynamic_array
\"
,
\"
label
\"
:
\"
struct ERC20Votes.Checkpoint[]
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_address,t_address)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
address)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_address
\"
},
\"
t_mapping(t_address,t_array(t_struct(Checkpoint)29853_storage)dyn_storage)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
struct ERC20Votes.Checkpoint[])
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_array(t_struct(Checkpoint)29853_storage)dyn_storage
\"
},
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
mapping(address =
\u003e
uint256))
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_mapping(t_address,t_uint256)
\"
},
\"
t_mapping(t_address,t_struct(Counter)32707_storage)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
struct Counters.Counter)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_struct(Counter)32707_storage
\"
},
\"
t_mapping(t_address,t_uint256)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
uint256)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_uint256
\"
},
\"
t_string_storage
\"
:{
\"
encoding
\"
:
\"
bytes
\"
,
\"
label
\"
:
\"
string
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_struct(Checkpoint)29853_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct ERC20Votes.Checkpoint
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_struct(Counter)32707
_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct Counters.Counter
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint224
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint224
\"
,
\"
numberOfBytes
\"
:
\"
28
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint32
\"
,
\"
numberOfBytes
\"
:
\"
4
\"
}}}"
var
GovernanceTokenStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/l1crossdomainmessenger_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
L1CrossDomainMessengerStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:2
4904,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_0_0_20
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:27890,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:20,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:27893,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:21,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:28504,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_array(t_uint256)50_storage
\"
},{
\"
astId
\"
:27762,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
51
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:27882,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
52
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:28055,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_paused
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
101
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:28160,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
102
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:28175,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_status
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
151
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:28219,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
152
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:24956,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_201_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
201
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:24961,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_202_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
202
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:24966,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
successfulMessages
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
203
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:24969,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
xDomainMsgSender
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
204
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:24972,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
msgNonce
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
205
\"
,
\"
type
\"
:
\"
t_uint240
\"
},{
\"
astId
\"
:24977,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
receivedMessages
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
206
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:24982
,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
207
\"
,
\"
type
\"
:
\"
t_array(t_uint256)42_storage
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)42_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[42]
\"
,
\"
numberOfBytes
\"
:
\"
1344
\"
},
\"
t_array(t_uint256)49_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[49]
\"
,
\"
numberOfBytes
\"
:
\"
1568
\"
},
\"
t_array(t_uint256)50_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[50]
\"
,
\"
numberOfBytes
\"
:
\"
1600
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_bytes32,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_bool
\"
},
\"
t_uint240
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint240
\"
,
\"
numberOfBytes
\"
:
\"
30
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
const
L1CrossDomainMessengerStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:2
5185,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_0_0_20
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:28171,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:20,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:28174,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:21,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:28785,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_array(t_uint256)50_storage
\"
},{
\"
astId
\"
:28043,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
51
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:28163,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
52
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:28336,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_paused
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
101
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:28441,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
102
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:28456,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_status
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
151
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:28500,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
152
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:25237,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_201_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
201
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:25242,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_202_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
202
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:25247,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
successfulMessages
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
203
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:25250,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
xDomainMsgSender
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
204
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:25253,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
msgNonce
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
205
\"
,
\"
type
\"
:
\"
t_uint240
\"
},{
\"
astId
\"
:25258,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
receivedMessages
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
206
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:25263
,
\"
contract
\"
:
\"
contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
207
\"
,
\"
type
\"
:
\"
t_array(t_uint256)42_storage
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)42_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[42]
\"
,
\"
numberOfBytes
\"
:
\"
1344
\"
},
\"
t_array(t_uint256)49_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[49]
\"
,
\"
numberOfBytes
\"
:
\"
1568
\"
},
\"
t_array(t_uint256)50_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[50]
\"
,
\"
numberOfBytes
\"
:
\"
1600
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_bytes32,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_bool
\"
},
\"
t_uint240
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint240
\"
,
\"
numberOfBytes
\"
:
\"
30
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
var
L1CrossDomainMessengerStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/l2crossdomainmessenger_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
L2CrossDomainMessengerStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:2
4904,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_0_0_20
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:27890,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:20,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:27893,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:21,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:28504,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_array(t_uint256)50_storage
\"
},{
\"
astId
\"
:27762,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
51
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:27882,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
52
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:28055,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_paused
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
101
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:28160,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
102
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:28175,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_status
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
151
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:28219,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
152
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:24956,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_201_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
201
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:24961,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_202_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
202
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:24966,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
successfulMessages
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
203
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:24969,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
xDomainMsgSender
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
204
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:24972,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
msgNonce
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
205
\"
,
\"
type
\"
:
\"
t_uint240
\"
},{
\"
astId
\"
:24977,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
receivedMessages
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
206
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:24982
,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
207
\"
,
\"
type
\"
:
\"
t_array(t_uint256)42_storage
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)42_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[42]
\"
,
\"
numberOfBytes
\"
:
\"
1344
\"
},
\"
t_array(t_uint256)49_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[49]
\"
,
\"
numberOfBytes
\"
:
\"
1568
\"
},
\"
t_array(t_uint256)50_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[50]
\"
,
\"
numberOfBytes
\"
:
\"
1600
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_bytes32,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_bool
\"
},
\"
t_uint240
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint240
\"
,
\"
numberOfBytes
\"
:
\"
30
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
const
L2CrossDomainMessengerStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:2
5185,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_0_0_20
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:28171,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:20,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:28174,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:21,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:28785,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_array(t_uint256)50_storage
\"
},{
\"
astId
\"
:28043,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
51
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:28163,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
52
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:28336,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_paused
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
101
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:28441,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
102
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:28456,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
_status
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
151
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:28500,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
152
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:25237,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_201_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
201
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:25242,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
spacer_202_0_32
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
202
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:25247,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
successfulMessages
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
203
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:25250,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
xDomainMsgSender
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
204
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:25253,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
msgNonce
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
205
\"
,
\"
type
\"
:
\"
t_uint240
\"
},{
\"
astId
\"
:25258,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
receivedMessages
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
206
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:25263
,
\"
contract
\"
:
\"
contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
207
\"
,
\"
type
\"
:
\"
t_array(t_uint256)42_storage
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)42_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[42]
\"
,
\"
numberOfBytes
\"
:
\"
1344
\"
},
\"
t_array(t_uint256)49_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[49]
\"
,
\"
numberOfBytes
\"
:
\"
1568
\"
},
\"
t_array(t_uint256)50_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[50]
\"
,
\"
numberOfBytes
\"
:
\"
1600
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_bytes32,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_bool
\"
},
\"
t_uint240
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint240
\"
,
\"
numberOfBytes
\"
:
\"
30
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
var
L2CrossDomainMessengerStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/l2erc721bridge_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
L2ERC721BridgeStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:25
410
,
\"
contract
\"
:
\"
contracts/L2/L2ERC721Bridge.sol:L2ERC721Bridge
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
}],
\"
types
\"
:{
\"
t_array(t_uint256)49_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[49]
\"
,
\"
numberOfBytes
\"
:
\"
1568
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
}}}"
const
L2ERC721BridgeStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:25
691
,
\"
contract
\"
:
\"
contracts/L2/L2ERC721Bridge.sol:L2ERC721Bridge
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
}],
\"
types
\"
:{
\"
t_array(t_uint256)49_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[49]
\"
,
\"
numberOfBytes
\"
:
\"
1568
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
}}}"
var
L2ERC721BridgeStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/l2standardbridge_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
L2StandardBridgeStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:27
063,
\"
contract
\"
:
\"
contracts/L2/L2StandardBridge.sol:L2StandardBridge
\"
,
\"
label
\"
:
\"
spacer_0_0_20
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:27066,
\"
contract
\"
:
\"
contracts/L2/L2StandardBridge.sol:L2StandardBridge
\"
,
\"
label
\"
:
\"
spacer_1_0_20
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:27073,
\"
contract
\"
:
\"
contracts/L2/L2StandardBridge.sol:L2StandardBridge
\"
,
\"
label
\"
:
\"
deposits
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
},{
\"
astId
\"
:27078
,
\"
contract
\"
:
\"
contracts/L2/L2StandardBridge.sol:L2StandardBridge
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_array(t_uint256)47_storage
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)47_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[47]
\"
,
\"
numberOfBytes
\"
:
\"
1504
\"
},
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
mapping(address =
\u003e
uint256))
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_mapping(t_address,t_uint256)
\"
},
\"
t_mapping(t_address,t_uint256)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
uint256)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_uint256
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
}}}"
const
L2StandardBridgeStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:27
344,
\"
contract
\"
:
\"
contracts/L2/L2StandardBridge.sol:L2StandardBridge
\"
,
\"
label
\"
:
\"
spacer_0_0_20
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:27347,
\"
contract
\"
:
\"
contracts/L2/L2StandardBridge.sol:L2StandardBridge
\"
,
\"
label
\"
:
\"
spacer_1_0_20
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:27354,
\"
contract
\"
:
\"
contracts/L2/L2StandardBridge.sol:L2StandardBridge
\"
,
\"
label
\"
:
\"
deposits
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
},{
\"
astId
\"
:27359
,
\"
contract
\"
:
\"
contracts/L2/L2StandardBridge.sol:L2StandardBridge
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_array(t_uint256)47_storage
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)47_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[47]
\"
,
\"
numberOfBytes
\"
:
\"
1504
\"
},
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
mapping(address =
\u003e
uint256))
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_mapping(t_address,t_uint256)
\"
},
\"
t_mapping(t_address,t_uint256)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
uint256)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_uint256
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
}}}"
var
L2StandardBridgeStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/legacyerc20eth_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
LegacyERC20ETHStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:2
8863,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
_balances
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_uint256)
\"
},{
\"
astId
\"
:28869,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
_allowances
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
},{
\"
astId
\"
:28871,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
_totalSupply
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:28873,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
_name
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_string_storage
\"
},{
\"
astId
\"
:28875,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
_symbol
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
4
\"
,
\"
type
\"
:
\"
t_string_storage
\"
},{
\"
astId
\"
:25639,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
remoteToken
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
5
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:25642
,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
bridge
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
6
\"
,
\"
type
\"
:
\"
t_address
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
mapping(address =
\u003e
uint256))
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_mapping(t_address,t_uint256)
\"
},
\"
t_mapping(t_address,t_uint256)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
uint256)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_uint256
\"
},
\"
t_string_storage
\"
:{
\"
encoding
\"
:
\"
bytes
\"
,
\"
label
\"
:
\"
string
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
}}}"
const
LegacyERC20ETHStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:2
9144,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
_balances
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_uint256)
\"
},{
\"
astId
\"
:29150,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
_allowances
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
},{
\"
astId
\"
:29152,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
_totalSupply
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:29154,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
_name
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_string_storage
\"
},{
\"
astId
\"
:29156,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
_symbol
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
4
\"
,
\"
type
\"
:
\"
t_string_storage
\"
},{
\"
astId
\"
:25920,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
remoteToken
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
5
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:25923
,
\"
contract
\"
:
\"
contracts/legacy/LegacyERC20ETH.sol:LegacyERC20ETH
\"
,
\"
label
\"
:
\"
bridge
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
6
\"
,
\"
type
\"
:
\"
t_address
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_mapping(t_address,t_mapping(t_address,t_uint256))
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
mapping(address =
\u003e
uint256))
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_mapping(t_address,t_uint256)
\"
},
\"
t_mapping(t_address,t_uint256)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
uint256)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_uint256
\"
},
\"
t_string_storage
\"
:{
\"
encoding
\"
:
\"
bytes
\"
,
\"
label
\"
:
\"
string
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
}}}"
var
LegacyERC20ETHStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/legacymessagepasser_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
LegacyMessagePasserStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:
3891
,
\"
contract
\"
:
\"
contracts/legacy/LegacyMessagePasser.sol:LegacyMessagePasser
\"
,
\"
label
\"
:
\"
sentMessages
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
}],
\"
types
\"
:{
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_bytes32,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_bool
\"
}}}"
const
LegacyMessagePasserStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:
4172
,
\"
contract
\"
:
\"
contracts/legacy/LegacyMessagePasser.sol:LegacyMessagePasser
\"
,
\"
label
\"
:
\"
sentMessages
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
}],
\"
types
\"
:{
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_bytes32,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_bool
\"
}}}"
var
LegacyMessagePasserStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/optimismmintableerc721factory_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
OptimismMintableERC721FactoryStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:26
162
,
\"
contract
\"
:
\"
contracts/universal/OptimismMintableERC721Factory.sol:OptimismMintableERC721Factory
\"
,
\"
label
\"
:
\"
isOptimismMintableERC721
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_bool)
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_mapping(t_address,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_bool
\"
}}}"
const
OptimismMintableERC721FactoryStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:26
443
,
\"
contract
\"
:
\"
contracts/universal/OptimismMintableERC721Factory.sol:OptimismMintableERC721Factory
\"
,
\"
label
\"
:
\"
isOptimismMintableERC721
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_bool)
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_mapping(t_address,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_bool
\"
}}}"
var
OptimismMintableERC721FactoryStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/optimismportal_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
OptimismPortalStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:28
703,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:28706
,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:1,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:1603,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
params
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_struct(ResourceParams)1573_storage
\"
},{
\"
astId
\"
:1608,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_array(t_uint256)48_storage
\"
},{
\"
astId
\"
:1179,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
l2Sender
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
50
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:1192,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
finalizedWithdrawals
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
51
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)48_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[48]
\"
,
\"
numberOfBytes
\"
:
\"
1536
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_bytes32,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_bool
\"
},
\"
t_struct(ResourceParams)1573_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct ResourceMetering.ResourceParams
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint128
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint128
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint64
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint64
\"
,
\"
numberOfBytes
\"
:
\"
8
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
const
OptimismPortalStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:28
984,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:28987
,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:1,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:1603,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
params
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_struct(ResourceParams)1573_storage
\"
},{
\"
astId
\"
:1608,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_array(t_uint256)48_storage
\"
},{
\"
astId
\"
:1179,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
l2Sender
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
50
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:1192,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
finalizedWithdrawals
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
51
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)48_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[48]
\"
,
\"
numberOfBytes
\"
:
\"
1536
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_bytes32,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_bool
\"
},
\"
t_struct(ResourceParams)1573_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct ResourceMetering.ResourceParams
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint128
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint128
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint64
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint64
\"
,
\"
numberOfBytes
\"
:
\"
8
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
var
OptimismPortalStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/proxyadmin_more.go
View file @
d734f9d9
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
ProxyAdminStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:3
5963,
\"
contract
\"
:
\"
contracts/universal/ProxyAdmin.sol:ProxyAdmin
\"
,
\"
label
\"
:
\"
owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:26535,
\"
contract
\"
:
\"
contracts/universal/ProxyAdmin.sol:ProxyAdmin
\"
,
\"
label
\"
:
\"
proxyType
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_enum(ProxyType)26529)
\"
},{
\"
astId
\"
:26540,
\"
contract
\"
:
\"
contracts/universal/ProxyAdmin.sol:ProxyAdmin
\"
,
\"
label
\"
:
\"
implementationName
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_string_storage)
\"
},{
\"
astId
\"
:26544,
\"
contract
\"
:
\"
contracts/universal/ProxyAdmin.sol:ProxyAdmin
\"
,
\"
label
\"
:
\"
addressManager
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_contract(AddressManager)3238
\"
},{
\"
astId
\"
:26548,
\"
contract
\"
:
\"
contracts/universal/ProxyAdmin.sol:ProxyAdmin
\"
,
\"
label
\"
:
\"
upgrading
\"
,
\"
offset
\"
:20,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_bool
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_contract(AddressManager)3238
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
contract AddressManager
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_enum(ProxyType)26529
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
enum ProxyAdmin.ProxyType
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_mapping(t_address,t_enum(ProxyType)26529)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
enum ProxyAdmin.ProxyType)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_enum(ProxyType)26529
\"
},
\"
t_mapping(t_address,t_string_storage)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
string)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_string_storage
\"
},
\"
t_string_storage
\"
:{
\"
encoding
\"
:
\"
bytes
\"
,
\"
label
\"
:
\"
string
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
}}}"
const
ProxyAdminStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:3
6244,
\"
contract
\"
:
\"
contracts/universal/ProxyAdmin.sol:ProxyAdmin
\"
,
\"
label
\"
:
\"
owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:26816,
\"
contract
\"
:
\"
contracts/universal/ProxyAdmin.sol:ProxyAdmin
\"
,
\"
label
\"
:
\"
proxyType
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_enum(ProxyType)26810)
\"
},{
\"
astId
\"
:26821,
\"
contract
\"
:
\"
contracts/universal/ProxyAdmin.sol:ProxyAdmin
\"
,
\"
label
\"
:
\"
implementationName
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_mapping(t_address,t_string_storage)
\"
},{
\"
astId
\"
:26825,
\"
contract
\"
:
\"
contracts/universal/ProxyAdmin.sol:ProxyAdmin
\"
,
\"
label
\"
:
\"
addressManager
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_contract(AddressManager)3519
\"
},{
\"
astId
\"
:26829,
\"
contract
\"
:
\"
contracts/universal/ProxyAdmin.sol:ProxyAdmin
\"
,
\"
label
\"
:
\"
upgrading
\"
,
\"
offset
\"
:20,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_bool
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_contract(AddressManager)3519
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
contract AddressManager
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_enum(ProxyType)26810
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
enum ProxyAdmin.ProxyType
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_mapping(t_address,t_enum(ProxyType)26810)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
enum ProxyAdmin.ProxyType)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_enum(ProxyType)26810
\"
},
\"
t_mapping(t_address,t_string_storage)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(address =
\u003e
string)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_address
\"
,
\"
value
\"
:
\"
t_string_storage
\"
},
\"
t_string_storage
\"
:{
\"
encoding
\"
:
\"
bytes
\"
,
\"
label
\"
:
\"
string
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
}}}"
var
ProxyAdminStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
packages/contracts-bedrock/contracts/deployment/FreshSystemDictator.sol
0 → 100644
View file @
d734f9d9
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { ProxyAdmin } from "../universal/ProxyAdmin.sol";
import { L2OutputOracle } from "../L1/L2OutputOracle.sol";
import { OptimismPortal } from "../L1/OptimismPortal.sol";
import { L1CrossDomainMessenger } from "../L1/L1CrossDomainMessenger.sol";
import { L1StandardBridge } from "../L1/L1StandardBridge.sol";
import { L1ERC721Bridge } from "../L1/L1ERC721Bridge.sol";
import { OptimismMintableERC20Factory } from "../universal/OptimismMintableERC20Factory.sol";
/**
* @title FreshSystemDictator
* @notice The FreshSystemDictator is responsible for coordinating initialization of a fresh
* deployment of the Optimism system. We expect that all proxies and implementations
* already be deployed before this contract is used.
*/
contract FreshSystemDictator is Ownable {
struct GlobalConfig {
ProxyAdmin proxyAdmin;
address controller;
address finalOwner;
}
struct ProxyAddressConfig {
address l2OutputOracleProxy;
address optimismPortalProxy;
address l1CrossDomainMessengerProxy;
address l1StandardBridgeProxy;
address optimismMintableERC20FactoryProxy;
address l1ERC721BridgeProxy;
}
struct ImplementationAddressConfig {
L2OutputOracle l2OutputOracleImpl;
OptimismPortal optimismPortalImpl;
L1CrossDomainMessenger l1CrossDomainMessengerImpl;
L1StandardBridge l1StandardBridgeImpl;
OptimismMintableERC20Factory optimismMintableERC20FactoryImpl;
L1ERC721Bridge l1ERC721BridgeImpl;
}
struct L2OutputOracleConfig {
bytes32 l2OutputOracleGenesisL2Output;
address l2OutputOracleProposer;
address l2OutputOracleOwner;
}
struct Config {
GlobalConfig globalConfig;
ProxyAddressConfig proxyAddressConfig;
ImplementationAddressConfig implementationAddressConfig;
L2OutputOracleConfig l2OutputOracleConfig;
}
Config public config;
constructor(Config memory _config) Ownable() {
config = _config;
_transferOwnership(config.globalConfig.controller);
}
function step1() external onlyOwner {
// Upgrade and initialize the L2OutputOracle.
config.globalConfig.proxyAdmin.upgradeAndCall(
payable(config.proxyAddressConfig.l2OutputOracleProxy),
address(config.implementationAddressConfig.l2OutputOracleImpl),
abi.encodeCall(
L2OutputOracle.initialize,
(
config.l2OutputOracleConfig.l2OutputOracleGenesisL2Output,
config.l2OutputOracleConfig.l2OutputOracleProposer,
config.l2OutputOracleConfig.l2OutputOracleOwner
)
)
);
// Upgrade and initialize the OptimismPortal.
config.globalConfig.proxyAdmin.upgradeAndCall(
payable(config.proxyAddressConfig.optimismPortalProxy),
address(config.implementationAddressConfig.optimismPortalImpl),
abi.encodeCall(OptimismPortal.initialize, ())
);
// Upgrade and initialize the L1CrossDomainMessenger.
config.globalConfig.proxyAdmin.upgradeAndCall(
payable(config.proxyAddressConfig.l1CrossDomainMessengerProxy),
address(config.implementationAddressConfig.l1CrossDomainMessengerImpl),
abi.encodeCall(L1CrossDomainMessenger.initialize, ())
);
// Upgrade the L1StandardBridge (no initializer).
config.globalConfig.proxyAdmin.upgrade(
payable(config.proxyAddressConfig.l1StandardBridgeProxy),
address(config.implementationAddressConfig.l1StandardBridgeImpl)
);
// Upgrade the OptimismMintableERC20Factory (no initializer).
config.globalConfig.proxyAdmin.upgrade(
payable(config.proxyAddressConfig.optimismMintableERC20FactoryProxy),
address(config.implementationAddressConfig.optimismMintableERC20FactoryImpl)
);
// Upgrade the L1ERC721Bridge (no initializer).
config.globalConfig.proxyAdmin.upgrade(
payable(config.proxyAddressConfig.l1ERC721BridgeProxy),
address(config.implementationAddressConfig.l1ERC721BridgeImpl)
);
}
function step2() external onlyOwner {
// Transfer ownership of the ProxyAdmin to the final owner.
config.globalConfig.proxyAdmin.setOwner(config.globalConfig.finalOwner);
}
}
packages/contracts-bedrock/contracts/test/CommonTest.t.sol
View file @
d734f9d9
...
...
@@ -429,10 +429,7 @@ contract ERC721Bridge_Initializer is Messenger_Initializer {
function setUp() public virtual override {
super.setUp();
L1Bridge = new L1ERC721Bridge(
address(L1Messenger),
Predeploys.L2_ERC721_BRIDGE
);
L1Bridge = new L1ERC721Bridge(address(L1Messenger), Predeploys.L2_ERC721_BRIDGE);
L2ERC721Bridge l2b = new L2ERC721Bridge(
Predeploys.L2_CROSS_DOMAIN_MESSENGER,
...
...
packages/contracts-bedrock/contracts/test/L2CrossDomainMessenger.t.sol
View file @
d734f9d9
...
...
@@ -55,7 +55,6 @@ contract L2CrossDomainMessenger_Test is Messenger_Initializer {
)
);
// MessagePassed event
vm.expectEmit(true, true, true, true);
emit MessagePassed(
...
...
packages/contracts-bedrock/deploy-config/hardhat.json
View file @
d734f9d9
{
"proxyAdminOwner"
:
"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc"
,
"l1StartingBlockTag"
:
"earliest"
,
"l1ChainID"
:
900
,
"l2ChainID"
:
901
,
...
...
@@ -15,7 +17,10 @@
"l2OutputOracleSubmissionInterval"
:
6
,
"l2OutputOracleStartingTimestamp"
:
-1
,
"l2OutputOracleProposer"
:
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
,
"l2OutputOracleOwner"
:
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
,
"l2OutputOracleOwner"
:
"0x6925B8704Ff96DEe942623d6FB5e946EF5884b63"
,
"l2OutputOracleGenesisL2Output"
:
"0x1111111111111111111111111111111111111111111111111111111111111111"
,
"finalizationPeriodSeconds"
:
2
,
"
deploymentWait
Confirmations"
:
1
"
numDeploy
Confirmations"
:
1
}
packages/contracts-bedrock/deploy/000-InitProxies.deploy.ts
deleted
100644 → 0
View file @
27e164d5
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
'
hardhat-deploy
'
import
'
@nomiclabs/hardhat-ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
const
proxies
=
[
'
L2OutputOracleProxy
'
,
'
L1CrossDomainMessengerProxy
'
,
'
L1StandardBridgeProxy
'
,
'
OptimismPortalProxy
'
,
'
OptimismMintableERC20FactoryProxy
'
,
'
L1ERC721BridgeProxy
'
,
]
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
{
deploy
}
=
hre
.
deployments
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
const
{
deployConfig
}
=
hre
const
l1
=
hre
.
ethers
.
provider
const
promises
=
[]
const
nonce
=
await
l1
.
getTransactionCount
(
deployer
)
for
(
let
i
=
0
;
i
<
proxies
.
length
;
i
++
)
{
const
proxy
=
proxies
[
i
]
promises
.
push
(
deploy
(
proxy
,
{
contract
:
'
Proxy
'
,
from
:
deployer
,
args
:
[
deployer
],
log
:
true
,
waitConfirmations
:
deployConfig
.
deploymentWaitConfirmations
,
nonce
:
nonce
+
i
,
})
)
}
await
Promise
.
all
(
promises
)
}
deployFn
.
tags
=
[
'
InitProxies
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/000-ProxyAdmin.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
await
deployAndVerifyAndThen
({
hre
,
name
:
'
ProxyAdmin
'
,
args
:
[
deployer
],
postDeployAction
:
async
(
contract
)
=>
{
// Owner is temporarily set to the deployer. We transfer ownership of the ProxyAdmin to the
// SystemDictator before we trigger the dictator steps.
await
assertContractVariable
(
contract
,
'
owner
'
,
deployer
)
},
})
}
deployFn
.
tags
=
[
'
ProxyAdmin
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/001-InitImplementations.deploy.ts
deleted
100644 → 0
View file @
27e164d5
/* Imports: Internal */
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
BigNumber
}
from
'
ethers
'
import
'
hardhat-deploy
'
import
'
@nomiclabs/hardhat-ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
{
predeploys
}
from
'
../src/constants
'
const
upgradeABIs
=
{
L2OutputOracleProxy
:
async
(
deployConfig
)
=>
[
'
initialize(bytes32,address,address)
'
,
[
deployConfig
.
l2OutputOracleGenesisL2Output
,
deployConfig
.
l2OutputOracleProposer
,
deployConfig
.
l2OutputOracleOwner
,
],
],
OptimismPortalProxy
:
async
()
=>
[
'
initialize
'
,
[]],
L1CrossDomainMessengerProxy
:
async
()
=>
[
'
initialize
'
,
[]],
}
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
{
deploy
,
get
}
=
hre
.
deployments
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
const
{
deployConfig
}
=
hre
const
l1
=
hre
.
ethers
.
provider
let
deployL2StartingTimestamp
=
deployConfig
.
l2OutputOracleStartingTimestamp
if
(
deployL2StartingTimestamp
<
0
)
{
const
l1StartingBlock
=
await
l1
.
getBlock
(
deployConfig
.
l1StartingBlockTag
)
if
(
l1StartingBlock
===
null
)
{
throw
new
Error
(
`Cannot fetch block tag
${
deployConfig
.
l1StartingBlockTag
}
`
)
}
deployL2StartingTimestamp
=
l1StartingBlock
.
timestamp
}
const
oracleProxy
=
await
get
(
'
L2OutputOracleProxy
'
)
const
portalProxy
=
await
get
(
'
OptimismPortalProxy
'
)
const
messengerProxy
=
await
get
(
'
L1CrossDomainMessengerProxy
'
)
const
bridgeProxy
=
await
get
(
'
L1StandardBridgeProxy
'
)
const
erc721BridgeProxy
=
await
get
(
'
L1ERC721BridgeProxy
'
)
let
nonce
=
await
l1
.
getTransactionCount
(
deployer
)
const
implTxs
=
[
deploy
(
'
L2OutputOracle
'
,
{
from
:
deployer
,
args
:
[
deployConfig
.
l2OutputOracleSubmissionInterval
,
deployConfig
.
l2OutputOracleGenesisL2Output
,
deployConfig
.
l2OutputOracleHistoricalTotalBlocks
,
deployConfig
.
l2OutputOracleStartingBlockNumber
,
deployL2StartingTimestamp
,
deployConfig
.
l2BlockTime
,
deployConfig
.
l2OutputOracleProposer
,
deployConfig
.
l2OutputOracleOwner
,
],
log
:
true
,
waitConfirmations
:
deployConfig
.
deploymentWaitConfirmations
,
nonce
,
}),
deploy
(
'
OptimismPortal
'
,
{
from
:
deployer
,
args
:
[
oracleProxy
.
address
,
2
],
log
:
true
,
waitConfirmations
:
deployConfig
.
deploymentWaitConfirmations
,
nonce
:
++
nonce
,
}),
deploy
(
'
L1CrossDomainMessenger
'
,
{
from
:
deployer
,
args
:
[
portalProxy
.
address
],
log
:
true
,
waitConfirmations
:
deployConfig
.
deploymentWaitConfirmations
,
nonce
:
++
nonce
,
}),
deploy
(
'
L1StandardBridge
'
,
{
from
:
deployer
,
args
:
[
messengerProxy
.
address
],
log
:
true
,
waitConfirmations
:
deployConfig
.
deploymentWaitConfirmations
,
nonce
:
++
nonce
,
}),
deploy
(
'
OptimismMintableERC20Factory
'
,
{
from
:
deployer
,
args
:
[
bridgeProxy
.
address
],
log
:
true
,
waitConfirmations
:
deployConfig
.
deploymentWaitConfirmations
,
nonce
:
++
nonce
,
}),
deploy
(
'
AddressManager
'
,
{
from
:
deployer
,
args
:
[],
log
:
true
,
waitConfirmations
:
deployConfig
.
deploymentWaitConfirmations
,
nonce
:
++
nonce
,
}),
deploy
(
'
ProxyAdmin
'
,
{
from
:
deployer
,
args
:
[
deployer
],
log
:
true
,
waitConfirmations
:
deployConfig
.
deploymentWaitConfirmations
,
nonce
:
++
nonce
,
}),
deploy
(
'
L1ERC721Bridge
'
,
{
from
:
deployer
,
args
:
[
messengerProxy
.
address
,
predeploys
.
L2ERC721Bridge
],
log
:
true
,
waitConfirmations
:
deployConfig
.
deploymentWaitConfirmations
,
nonce
:
++
nonce
,
}),
]
await
Promise
.
all
(
implTxs
)
let
tx
// Reset the nonce for the next set of transactions
for
(
const
[
proxy
,
upgrader
]
of
Object
.
entries
(
upgradeABIs
))
{
const
upgraderOut
=
await
upgrader
(
deployConfig
)
const
implName
=
proxy
.
replace
(
'
Proxy
'
,
''
)
const
implDeployment
=
await
get
(
implName
)
const
implContract
=
await
hre
.
ethers
.
getContractAt
(
implName
,
implDeployment
.
address
)
const
proxyDeployment
=
await
get
(
proxy
)
const
proxyContract
=
await
hre
.
ethers
.
getContractAt
(
'
Proxy
'
,
proxyDeployment
.
address
)
console
.
log
(
`Upgrading contract impl
${
implName
}
.`
)
tx
=
await
proxyContract
.
upgradeToAndCall
(
implContract
.
address
,
implContract
.
interface
.
encodeFunctionData
(
upgraderOut
[
0
]
as
string
,
upgraderOut
[
1
]
as
any
[]
)
)
console
.
log
(
`Awaiting TX hash
${
tx
.
hash
}
.`
)
await
tx
.
wait
()
console
.
log
(
'
Done.
'
)
}
const
bridge
=
await
get
(
'
L1StandardBridge
'
)
const
bridgeProxyContract
=
await
hre
.
ethers
.
getContractAt
(
'
Proxy
'
,
bridgeProxy
.
address
)
console
.
log
(
`Upgrading L1StandardBridge at
${
bridge
.
address
}
.`
)
tx
=
await
bridgeProxyContract
.
upgradeTo
(
bridge
.
address
)
console
.
log
(
`Awaiting TX hash
${
tx
.
hash
}
.`
)
await
tx
.
wait
()
console
.
log
(
'
Done
'
)
const
factory
=
await
get
(
'
OptimismMintableERC20Factory
'
)
const
factoryProxy
=
await
get
(
'
OptimismMintableERC20FactoryProxy
'
)
const
factoryProxyContract
=
await
hre
.
ethers
.
getContractAt
(
'
Proxy
'
,
factoryProxy
.
address
)
console
.
log
(
`Upgrading OptimismMintableERC20Factory at
${
factory
.
address
}
.`
)
tx
=
await
factoryProxyContract
.
upgradeTo
(
factory
.
address
)
console
.
log
(
`Awaiting TX hash
${
tx
.
hash
}
.`
)
await
tx
.
wait
()
console
.
log
(
'
Done
'
)
const
erc721Bridge
=
await
get
(
'
L1ERC721Bridge
'
)
const
erc721BridgeProxyContract
=
await
hre
.
ethers
.
getContractAt
(
'
Proxy
'
,
erc721BridgeProxy
.
address
)
console
.
log
(
`Upgrading L1ERC721Bridge at
${
erc721Bridge
.
address
}
`
)
tx
=
await
erc721BridgeProxyContract
.
upgradeTo
(
erc721Bridge
.
address
)
console
.
log
(
`Awaiting TX hash
${
tx
.
hash
}
.`
)
await
tx
.
wait
()
console
.
log
(
'
Done
'
)
await
validateOracle
(
hre
,
deployConfig
,
deployL2StartingTimestamp
)
await
validatePortal
(
hre
)
await
validateMessenger
(
hre
)
await
validateBridge
(
hre
)
await
validateTokenFactory
(
hre
)
await
validateERC721Bridge
(
hre
)
}
const
validateOracle
=
async
(
hre
,
deployConfig
,
deployL2StartingTimestamp
)
=>
{
const
proxy
=
await
hre
.
deployments
.
get
(
'
L2OutputOracleProxy
'
)
const
L2OutputOracle
=
await
hre
.
ethers
.
getContractAt
(
'
L2OutputOracle
'
,
proxy
.
address
)
const
submissionInterval
=
await
L2OutputOracle
.
SUBMISSION_INTERVAL
()
if
(
!
submissionInterval
.
eq
(
BigNumber
.
from
(
deployConfig
.
l2OutputOracleSubmissionInterval
)
)
)
{
throw
new
Error
(
'
submission internal misconfigured
'
)
}
const
historicalBlocks
=
await
L2OutputOracle
.
HISTORICAL_TOTAL_BLOCKS
()
if
(
!
historicalBlocks
.
eq
(
BigNumber
.
from
(
deployConfig
.
l2OutputOracleHistoricalTotalBlocks
)
)
)
{
throw
new
Error
(
'
historical total blocks misconfigured
'
)
}
const
startingBlockNumber
=
await
L2OutputOracle
.
STARTING_BLOCK_NUMBER
()
if
(
!
startingBlockNumber
.
eq
(
BigNumber
.
from
(
deployConfig
.
l2OutputOracleStartingBlockNumber
)
)
)
{
throw
new
Error
(
'
starting block number misconfigured
'
)
}
const
startingTimestamp
=
await
L2OutputOracle
.
STARTING_TIMESTAMP
()
if
(
!
startingTimestamp
.
eq
(
BigNumber
.
from
(
deployL2StartingTimestamp
)))
{
throw
new
Error
(
'
starting timestamp misconfigured
'
)
}
const
l2BlockTime
=
await
L2OutputOracle
.
L2_BLOCK_TIME
()
if
(
!
l2BlockTime
.
eq
(
BigNumber
.
from
(
deployConfig
.
l2BlockTime
)))
{
throw
new
Error
(
'
L2 block time misconfigured
'
)
}
}
const
validatePortal
=
async
(
hre
)
=>
{
const
oracle
=
await
hre
.
deployments
.
get
(
'
L2OutputOracleProxy
'
)
const
proxy
=
await
hre
.
deployments
.
get
(
'
OptimismPortalProxy
'
)
const
OptimismPortal
=
await
hre
.
ethers
.
getContractAt
(
'
OptimismPortal
'
,
proxy
.
address
)
const
l2Oracle
=
await
OptimismPortal
.
L2_ORACLE
()
if
(
l2Oracle
!==
oracle
.
address
)
{
throw
new
Error
(
'
L2 Oracle mismatch
'
)
}
}
const
validateMessenger
=
async
(
hre
)
=>
{
const
portal
=
await
hre
.
deployments
.
get
(
'
OptimismPortalProxy
'
)
const
proxy
=
await
hre
.
deployments
.
get
(
'
L1CrossDomainMessengerProxy
'
)
const
L1CrossDomainMessenger
=
await
hre
.
ethers
.
getContractAt
(
'
L1CrossDomainMessenger
'
,
proxy
.
address
)
const
portalAddress
=
await
L1CrossDomainMessenger
.
portal
()
if
(
portalAddress
!==
portal
.
address
)
{
throw
new
Error
(
'
portal misconfigured
'
)
}
}
const
validateBridge
=
async
(
hre
)
=>
{
const
messenger
=
await
hre
.
deployments
.
get
(
'
L1CrossDomainMessengerProxy
'
)
const
proxy
=
await
hre
.
deployments
.
get
(
'
L1StandardBridgeProxy
'
)
const
L1StandardBridge
=
await
hre
.
ethers
.
getContractAt
(
'
L1StandardBridge
'
,
proxy
.
address
)
if
(
messenger
.
address
!==
(
await
L1StandardBridge
.
messenger
()))
{
throw
new
Error
(
'
misconfigured messenger
'
)
}
}
// The messenger address should be set to the proxy messenger
// The other bridge should be set to the predeploy on L2
const
validateERC721Bridge
=
async
(
hre
)
=>
{
const
messenger
=
await
hre
.
deployments
.
get
(
'
L1CrossDomainMessengerProxy
'
)
const
proxy
=
await
hre
.
deployments
.
get
(
'
L1ERC721BridgeProxy
'
)
const
L1ERC721Bridge
=
await
hre
.
ethers
.
getContractAt
(
'
L1ERC721Bridge
'
,
proxy
.
address
)
if
(
messenger
.
address
!==
(
await
L1ERC721Bridge
.
messenger
()))
{
throw
new
Error
(
'
misconfigured messenger
'
)
}
if
((
await
L1ERC721Bridge
.
otherBridge
())
!==
predeploys
.
L2ERC721Bridge
)
{
throw
new
Error
(
'
misconfigured otherBridge
'
)
}
}
const
validateTokenFactory
=
async
(
hre
)
=>
{
const
bridge
=
await
hre
.
deployments
.
get
(
'
L1StandardBridgeProxy
'
)
const
proxy
=
await
hre
.
deployments
.
get
(
'
OptimismMintableERC20FactoryProxy
'
)
const
OptimismMintableERC20Factory
=
await
hre
.
ethers
.
getContractAt
(
'
OptimismMintableERC20Factory
'
,
proxy
.
address
)
if
(
bridge
.
address
!==
(
await
OptimismMintableERC20Factory
.
bridge
()))
{
throw
new
Error
(
'
bridge misconfigured
'
)
}
}
deployFn
.
tags
=
[
'
InitImplementations
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/001-L1StandardBridgeProxy.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getDeploymentAddress
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
proxyAdmin
=
await
getDeploymentAddress
(
hre
,
'
ProxyAdmin
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
L1StandardBridgeProxy
'
,
contract
:
'
Proxy
'
,
args
:
[
proxyAdmin
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
admin
'
,
proxyAdmin
)
},
})
}
deployFn
.
tags
=
[
'
L1StandardBridgeProxy
'
,
'
fresh
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/002-ConfigureProxyAdmin.ts
deleted
100644 → 0
View file @
27e164d5
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
'
hardhat-deploy
'
import
'
@nomiclabs/hardhat-ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
admin
=
await
hre
.
deployments
.
get
(
'
ProxyAdmin
'
)
const
ProxyAdmin
=
await
hre
.
ethers
.
getContractAt
(
'
ProxyAdmin
'
,
admin
.
address
)
// This is set up for fresh networks only
const
proxies
=
[
'
L2OutputOracleProxy
'
,
'
L1CrossDomainMessengerProxy
'
,
'
L1StandardBridgeProxy
'
,
'
OptimismPortalProxy
'
,
'
OptimismMintableERC20FactoryProxy
'
,
'
L1ERC721BridgeProxy
'
,
]
// Wait on all the txs in parallel so that the deployment goes faster
const
txs
=
[]
for
(
const
proxy
of
proxies
)
{
const
deployment
=
await
hre
.
deployments
.
get
(
proxy
)
const
Proxy
=
await
hre
.
ethers
.
getContractAt
(
'
Proxy
'
,
deployment
.
address
)
const
tx
=
await
Proxy
.
changeAdmin
(
admin
.
address
)
txs
.
push
(
tx
)
}
await
Promise
.
all
(
txs
.
map
((
tx
)
=>
tx
.
wait
()))
const
addressManager
=
await
hre
.
deployments
.
get
(
'
AddressManager
'
)
const
AddressManager
=
await
hre
.
ethers
.
getContractAt
(
'
AddressManager
'
,
addressManager
.
address
)
const
postConfig
=
[
await
AddressManager
.
transferOwnership
(
admin
.
address
),
await
ProxyAdmin
.
setAddressManager
(
addressManager
.
address
),
]
await
Promise
.
all
(
postConfig
.
map
((
tx
)
=>
tx
.
wait
()))
}
deployFn
.
tags
=
[
'
ConfigureProxyAdmin
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/002-L2OutputOracleProxy.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getDeploymentAddress
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
proxyAdmin
=
await
getDeploymentAddress
(
hre
,
'
ProxyAdmin
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
L2OutputOracleProxy
'
,
contract
:
'
Proxy
'
,
args
:
[
proxyAdmin
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
admin
'
,
proxyAdmin
)
},
})
}
deployFn
.
tags
=
[
'
L2OutputOracleProxy
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/003-L1CrossDomainMessengerProxy.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getDeploymentAddress
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
proxyAdmin
=
await
getDeploymentAddress
(
hre
,
'
ProxyAdmin
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
L1CrossDomainMessengerProxy
'
,
contract
:
'
Proxy
'
,
args
:
[
proxyAdmin
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
admin
'
,
proxyAdmin
)
},
})
}
deployFn
.
tags
=
[
'
L1CrossDomainMessengerProxy
'
,
'
fresh
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/004-OptimismPortalProxy.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getDeploymentAddress
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
proxyAdmin
=
await
getDeploymentAddress
(
hre
,
'
ProxyAdmin
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
OptimismPortalProxy
'
,
contract
:
'
Proxy
'
,
args
:
[
proxyAdmin
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
admin
'
,
proxyAdmin
)
},
})
}
deployFn
.
tags
=
[
'
OptimismPortalProxy
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/005-OptimismMintableERC20FactoryProxy.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getDeploymentAddress
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
proxyAdmin
=
await
getDeploymentAddress
(
hre
,
'
ProxyAdmin
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
OptimismMintableERC20FactoryProxy
'
,
contract
:
'
Proxy
'
,
args
:
[
proxyAdmin
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
admin
'
,
proxyAdmin
)
},
})
}
deployFn
.
tags
=
[
'
OptimismMintableERC20FactoryProxy
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/006-L1ERC721BridgeProxy.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getDeploymentAddress
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
proxyAdmin
=
await
getDeploymentAddress
(
hre
,
'
ProxyAdmin
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
L1ERC721BridgeProxy
'
,
contract
:
'
Proxy
'
,
args
:
[
proxyAdmin
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
admin
'
,
proxyAdmin
)
},
})
}
deployFn
.
tags
=
[
'
L1ERC721BridgeProxy
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/007-L1CrossDomainMessengerImpl.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
OptimismPortalProxy
=
await
getContractFromArtifact
(
hre
,
'
OptimismPortalProxy
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
L1CrossDomainMessengerImpl
'
,
contract
:
'
L1CrossDomainMessenger
'
,
args
:
[
OptimismPortalProxy
.
address
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
portal
'
,
OptimismPortalProxy
.
address
)
},
})
}
deployFn
.
tags
=
[
'
L1CrossDomainMessengerImpl
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/008-L1StandardBridgeImpl.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
predeploys
}
from
'
../src
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
L1CrossDomainMessengerProxy
=
await
getContractFromArtifact
(
hre
,
'
L1CrossDomainMessengerProxy
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
L1StandardBridgeImpl
'
,
contract
:
'
L1StandardBridge
'
,
args
:
[
L1CrossDomainMessengerProxy
.
address
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
messenger
'
,
L1CrossDomainMessengerProxy
.
address
)
await
assertContractVariable
(
contract
,
'
otherBridge
'
,
predeploys
.
L2StandardBridge
)
},
})
}
deployFn
.
tags
=
[
'
L1StandardBridgeImpl
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/009-L2OutputOracleImpl.ts
0 → 100644
View file @
d734f9d9
import
assert
from
'
assert
'
import
{
ethers
}
from
'
ethers
'
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
// Use default starting time if starting time is not provided.
let
deployL2StartingTimestamp
=
hre
.
deployConfig
.
l2OutputOracleStartingTimestamp
if
(
deployL2StartingTimestamp
<
0
)
{
const
l1StartingBlock
=
await
hre
.
ethers
.
provider
.
getBlock
(
hre
.
deployConfig
.
l1StartingBlockTag
)
if
(
l1StartingBlock
===
null
)
{
throw
new
Error
(
`Cannot fetch block tag
${
hre
.
deployConfig
.
l1StartingBlockTag
}
`
)
}
deployL2StartingTimestamp
=
l1StartingBlock
.
timestamp
}
await
deployAndVerifyAndThen
({
hre
,
name
:
'
L2OutputOracleImpl
'
,
contract
:
'
L2OutputOracle
'
,
args
:
[
hre
.
deployConfig
.
l2OutputOracleSubmissionInterval
,
hre
.
deployConfig
.
l2OutputOracleGenesisL2Output
,
hre
.
deployConfig
.
l2OutputOracleHistoricalTotalBlocks
,
hre
.
deployConfig
.
l2OutputOracleStartingBlockNumber
,
deployL2StartingTimestamp
,
hre
.
deployConfig
.
l2BlockTime
,
hre
.
deployConfig
.
l2OutputOracleProposer
,
hre
.
deployConfig
.
l2OutputOracleOwner
,
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
SUBMISSION_INTERVAL
'
,
hre
.
deployConfig
.
l2OutputOracleSubmissionInterval
)
await
assertContractVariable
(
contract
,
'
STARTING_BLOCK_NUMBER
'
,
hre
.
deployConfig
.
l2OutputOracleStartingBlockNumber
)
await
assertContractVariable
(
contract
,
'
HISTORICAL_TOTAL_BLOCKS
'
,
hre
.
deployConfig
.
l2OutputOracleHistoricalTotalBlocks
)
await
assertContractVariable
(
contract
,
'
STARTING_TIMESTAMP
'
,
deployL2StartingTimestamp
)
await
assertContractVariable
(
contract
,
'
L2_BLOCK_TIME
'
,
hre
.
deployConfig
.
l2BlockTime
)
await
assertContractVariable
(
contract
,
'
proposer
'
,
hre
.
deployConfig
.
l2OutputOracleProposer
)
await
assertContractVariable
(
contract
,
'
owner
'
,
hre
.
deployConfig
.
l2OutputOracleOwner
)
// Has to be done separately since l2Output is a mapping.
if
(
hre
.
deployConfig
.
l2OutputOracleGenesisL2Output
===
ethers
.
constants
.
HashZero
)
{
console
.
log
(
`[WARNING] Genesis L2 output is ZERO and should NOT BE ZERO if you are deploying to prod`
)
}
else
{
const
output
=
await
contract
.
getL2Output
(
hre
.
deployConfig
.
l2OutputOracleStartingBlockNumber
)
assert
(
output
.
outputRoot
===
hre
.
deployConfig
.
l2OutputOracleGenesisL2Output
,
`[FATAL] L2OutputOracleImpl genesis output is
${
output
.
outputRoot
}
but should be
${
hre
.
deployConfig
.
l2OutputOracleGenesisL2Output
}
`
)
}
},
})
}
deployFn
.
tags
=
[
'
L2OutputOracleImpl
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/010-OptimismPortalImpl.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
L2OutputOracleProxy
=
await
getContractFromArtifact
(
hre
,
'
L2OutputOracleProxy
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
OptimismPortalImpl
'
,
contract
:
'
OptimismPortal
'
,
args
:
[
L2OutputOracleProxy
.
address
,
hre
.
deployConfig
.
finalizationPeriodSeconds
,
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
L2_ORACLE
'
,
L2OutputOracleProxy
.
address
)
await
assertContractVariable
(
contract
,
'
FINALIZATION_PERIOD_SECONDS
'
,
hre
.
deployConfig
.
finalizationPeriodSeconds
)
},
})
}
deployFn
.
tags
=
[
'
OptimismPortalImpl
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/011-OptimismMintableERC20FactoryImpl.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
L1StandardBridgeProxy
=
await
getContractFromArtifact
(
hre
,
'
L1StandardBridgeProxy
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
OptimismMintableERC20FactoryImpl
'
,
contract
:
'
OptimismMintableERC20Factory
'
,
args
:
[
L1StandardBridgeProxy
.
address
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
bridge
'
,
L1StandardBridgeProxy
.
address
)
},
})
}
deployFn
.
tags
=
[
'
OptimismMintableERC20FactoryImpl
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/012-L1ERC721BridgeImpl.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
predeploys
}
from
'
../src
'
import
{
assertContractVariable
,
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
L1CrossDomainMessengerProxy
=
await
getContractFromArtifact
(
hre
,
'
L1CrossDomainMessengerProxy
'
)
await
deployAndVerifyAndThen
({
hre
,
name
:
'
L1ERC721BridgeImpl
'
,
contract
:
'
L1ERC721Bridge
'
,
args
:
[
L1CrossDomainMessengerProxy
.
address
,
predeploys
.
L2ERC721Bridge
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
messenger
'
,
L1CrossDomainMessengerProxy
.
address
)
},
})
}
deployFn
.
tags
=
[
'
L1ERC721BridgeImpl
'
,
'
fresh
'
,
'
migration
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/013-FreshSystemDicator.ts
0 → 100644
View file @
d734f9d9
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
getDeploymentAddress
,
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
await
deployAndVerifyAndThen
({
hre
,
name
:
'
FreshSystemDictator
'
,
args
:
[
{
globalConfig
:
{
proxyAdmin
:
await
getDeploymentAddress
(
hre
,
'
ProxyAdmin
'
),
controller
:
deployer
,
// TODO
finalOwner
:
hre
.
deployConfig
.
proxyAdminOwner
,
},
proxyAddressConfig
:
{
l2OutputOracleProxy
:
await
getDeploymentAddress
(
hre
,
'
L2OutputOracleProxy
'
),
optimismPortalProxy
:
await
getDeploymentAddress
(
hre
,
'
OptimismPortalProxy
'
),
l1CrossDomainMessengerProxy
:
await
getDeploymentAddress
(
hre
,
'
L1CrossDomainMessengerProxy
'
),
l1StandardBridgeProxy
:
await
getDeploymentAddress
(
hre
,
'
L1StandardBridgeProxy
'
),
optimismMintableERC20FactoryProxy
:
await
getDeploymentAddress
(
hre
,
'
OptimismMintableERC20FactoryProxy
'
),
l1ERC721BridgeProxy
:
await
getDeploymentAddress
(
hre
,
'
L1ERC721BridgeProxy
'
),
},
implementationAddressConfig
:
{
l2OutputOracleImpl
:
await
getDeploymentAddress
(
hre
,
'
L2OutputOracleImpl
'
),
optimismPortalImpl
:
await
getDeploymentAddress
(
hre
,
'
OptimismPortalImpl
'
),
l1CrossDomainMessengerImpl
:
await
getDeploymentAddress
(
hre
,
'
L1CrossDomainMessengerImpl
'
),
l1StandardBridgeImpl
:
await
getDeploymentAddress
(
hre
,
'
L1StandardBridgeImpl
'
),
optimismMintableERC20FactoryImpl
:
await
getDeploymentAddress
(
hre
,
'
OptimismMintableERC20FactoryImpl
'
),
l1ERC721BridgeImpl
:
await
getDeploymentAddress
(
hre
,
'
L1ERC721BridgeImpl
'
),
},
l2OutputOracleConfig
:
{
l2OutputOracleGenesisL2Output
:
hre
.
deployConfig
.
l2OutputOracleGenesisL2Output
,
l2OutputOracleProposer
:
hre
.
deployConfig
.
l2OutputOracleProposer
,
l2OutputOracleOwner
:
hre
.
deployConfig
.
l2OutputOracleOwner
,
},
},
],
postDeployAction
:
async
()
=>
{
// TODO: Assert all the config was set correctly.
},
})
const
ProxyAdmin
=
await
getContractFromArtifact
(
hre
,
'
ProxyAdmin
'
,
{
signerOrProvider
:
deployer
,
})
const
FreshSystemDictator
=
await
getContractFromArtifact
(
hre
,
'
FreshSystemDictator
'
,
{
signerOrProvider
:
deployer
,
}
)
await
ProxyAdmin
.
setOwner
(
FreshSystemDictator
.
address
)
await
FreshSystemDictator
.
step1
()
await
FreshSystemDictator
.
step2
()
}
deployFn
.
tags
=
[
'
FreshSystemDictator
'
,
'
fresh
'
]
export
default
deployFn
packages/contracts-bedrock/hardhat.config.ts
View file @
d734f9d9
...
...
@@ -30,6 +30,7 @@ task('accounts', 'Prints the list of accounts', async (_, hre) => {
const
config
:
HardhatUserConfig
=
{
networks
:
{
devnetL1
:
{
live
:
false
,
url
:
'
http://localhost:8545
'
,
accounts
:
[
'
ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
'
,
...
...
@@ -70,6 +71,12 @@ const config: HardhatUserConfig = {
},
},
deployConfigSpec
:
{
// Address of the L1 proxy admin owner.
proxyAdminOwner
:
{
type
:
'
address
'
,
default
:
ethers
.
constants
.
AddressZero
,
},
// To anchor the rollup at for L1 genesis.
// The L2 genesis script uses this to fill the storage of the L1Block info predeploy.
// The rollup config script uses this to fill the L1 genesis info for the rollup.
...
...
@@ -85,6 +92,7 @@ const config: HardhatUserConfig = {
l1ChainID
:
{
type
:
'
number
'
,
},
// Required to identify the L2 network and create p2p signatures unique for this chain.
// Part of L2 genesis config.
// "l2_chain_id" in rollup config.
...
...
@@ -199,6 +207,12 @@ const config: HardhatUserConfig = {
type
:
'
address
'
,
},
// uint256 - Finalization period in seconds.
finalizationPeriodSeconds
:
{
type
:
'
number
'
,
default
:
2
,
},
// Optional L1 genesis block values. These must ONLY be used by the L1 genesis config script.
// Not all deployments may create a new L1 chain, but instead attach to an existing L1 chain, like Goerli.
// -------------------------------------------------
...
...
@@ -309,10 +323,6 @@ const config: HardhatUserConfig = {
type
:
'
address
'
,
default
:
ethers
.
constants
.
AddressZero
,
},
proxyAdminOwner
:
{
type
:
'
address
'
,
default
:
ethers
.
constants
.
AddressZero
,
},
gasPriceOracleOwner
:
{
type
:
'
address
'
,
default
:
ethers
.
constants
.
AddressZero
,
...
...
@@ -329,7 +339,7 @@ const config: HardhatUserConfig = {
type
:
'
number
'
,
default
:
6
,
},
deploymentWait
Confirmations
:
{
numDeploy
Confirmations
:
{
type
:
'
number
'
,
default
:
1
,
},
...
...
packages/contracts-bedrock/package.json
View file @
d734f9d9
...
...
@@ -49,6 +49,8 @@
"@eth-optimism/hardhat-deploy-config"
:
"^0.2.4"
,
"@ethereumjs/trie"
:
"^5.0.0-beta.1"
,
"@ethereumjs/util"
:
"^8.0.0-beta.1"
,
"@ethersproject/abstract-provider"
:
"^5.7.0"
,
"@ethersproject/abstract-signer"
:
"^5.7.0"
,
"ethereumjs-wallet"
:
"^1.0.2"
,
"@defi-wonderland/smock"
:
"^2.0.2"
,
"@foundry-rs/hardhat-forge"
:
"^0.1.17"
,
...
...
packages/contracts-bedrock/src/deploy-utils.ts
0 → 100644
View file @
d734f9d9
import
assert
from
'
assert
'
import
{
ethers
,
Contract
}
from
'
ethers
'
import
{
Provider
}
from
'
@ethersproject/abstract-provider
'
import
{
Signer
}
from
'
@ethersproject/abstract-signer
'
import
{
sleep
,
awaitCondition
,
getChainId
}
from
'
@eth-optimism/core-utils
'
import
{
HttpNetworkConfig
}
from
'
hardhat/types
'
export
const
deployAndVerifyAndThen
=
async
({
hre
,
name
,
args
,
contract
,
iface
,
postDeployAction
,
}:
{
hre
:
any
name
:
string
args
:
any
[]
contract
?:
string
iface
?:
string
postDeployAction
?:
(
contract
:
Contract
)
=>
Promise
<
void
>
})
=>
{
const
{
deploy
}
=
hre
.
deployments
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
const
result
=
await
deploy
(
name
,
{
contract
,
from
:
deployer
,
args
,
log
:
true
,
waitConfirmations
:
hre
.
deployConfig
.
numDeployConfirmations
,
})
await
hre
.
ethers
.
provider
.
waitForTransaction
(
result
.
transactionHash
)
if
(
result
.
newlyDeployed
)
{
if
(
!
(
await
isHardhatNode
(
hre
))
&&
hre
.
network
.
config
.
live
!==
false
)
{
// Verification sometimes fails, even when the contract is correctly deployed and eventually
// verified. Possibly due to a race condition. We don't want to halt the whole deployment
// process just because that happens.
try
{
console
.
log
(
'
Verifying on Etherscan...
'
)
await
hre
.
run
(
'
verify:verify
'
,
{
address
:
result
.
address
,
constructorArguments
:
args
,
})
console
.
log
(
'
Successfully verified on Etherscan
'
)
}
catch
(
error
)
{
console
.
log
(
'
Error when verifying bytecode on Etherscan:
'
)
console
.
log
(
error
)
}
try
{
console
.
log
(
'
Verifying on Sourcify...
'
)
await
hre
.
run
(
'
sourcify
'
)
console
.
log
(
'
Successfully verified on Sourcify
'
)
}
catch
(
error
)
{
console
.
log
(
'
Error when verifying bytecode on Sourcify:
'
)
console
.
log
(
error
)
}
}
if
(
postDeployAction
)
{
const
signer
=
hre
.
ethers
.
provider
.
getSigner
(
deployer
)
let
abi
=
result
.
abi
if
(
iface
!==
undefined
)
{
const
factory
=
await
hre
.
ethers
.
getContractFactory
(
iface
)
abi
=
factory
.
interface
}
await
postDeployAction
(
getAdvancedContract
({
hre
,
contract
:
new
Contract
(
result
.
address
,
abi
,
signer
),
})
)
}
}
}
// Returns a version of the contract object which modifies all of the input contract's methods to:
// 1. Waits for a confirmed receipt with more than deployConfig.numDeployConfirmations confirmations.
// 2. Include simple resubmission logic, ONLY for Kovan, which appears to drop transactions.
export
const
getAdvancedContract
=
(
opts
:
{
hre
:
any
contract
:
Contract
}):
Contract
=>
{
// Temporarily override Object.defineProperty to bypass ether's object protection.
const
def
=
Object
.
defineProperty
Object
.
defineProperty
=
(
obj
,
propName
,
prop
)
=>
{
prop
.
writable
=
true
return
def
(
obj
,
propName
,
prop
)
}
const
contract
=
new
Contract
(
opts
.
contract
.
address
,
opts
.
contract
.
interface
,
opts
.
contract
.
signer
||
opts
.
contract
.
provider
)
// Now reset Object.defineProperty
Object
.
defineProperty
=
def
// Override each function call to also `.wait()` so as to simplify the deploy scripts' syntax.
for
(
const
fnName
of
Object
.
keys
(
contract
.
functions
))
{
const
fn
=
contract
[
fnName
].
bind
(
contract
)
;(
contract
as
any
)[
fnName
]
=
async
(...
args
:
any
)
=>
{
// We want to use the gas price that has been configured at the beginning of the deployment.
// However, if the function being triggered is a "constant" (static) function, then we don't
// want to provide a gas price because we're prone to getting insufficient balance errors.
let
gasPrice
:
number
|
undefined
try
{
gasPrice
=
opts
.
hre
.
deployConfig
.
gasPrice
}
catch
(
err
)
{
// Fine, no gas price
}
if
(
contract
.
interface
.
getFunction
(
fnName
).
constant
)
{
gasPrice
=
0
}
const
tx
=
await
fn
(...
args
,
{
gasPrice
,
})
if
(
typeof
tx
!==
'
object
'
||
typeof
tx
.
wait
!==
'
function
'
)
{
return
tx
}
// Special logic for:
// (1) handling confirmations
// (2) handling an issue on Kovan specifically where transactions get dropped for no
// apparent reason.
const
maxTimeout
=
120
let
timeout
=
0
while
(
true
)
{
await
sleep
(
1000
)
const
receipt
=
await
contract
.
provider
.
getTransactionReceipt
(
tx
.
hash
)
if
(
receipt
===
null
)
{
timeout
++
if
(
timeout
>
maxTimeout
&&
opts
.
hre
.
network
.
name
===
'
kovan
'
)
{
// Special resubmission logic ONLY required on Kovan.
console
.
log
(
`WARNING: Exceeded max timeout on transaction. Attempting to submit transaction again...`
)
return
contract
[
fnName
](...
args
)
}
}
else
if
(
receipt
.
confirmations
>=
opts
.
hre
.
deployConfig
.
numDeployConfirmations
)
{
return
tx
}
}
}
}
return
contract
}
export
const
fundAccount
=
async
(
hre
:
any
,
address
:
string
,
amount
:
ethers
.
BigNumber
)
=>
{
if
(
!
hre
.
deployConfig
.
isForkedNetwork
)
{
throw
new
Error
(
'
this method can only be used against a forked network
'
)
}
console
.
log
(
`Funding account
${
address
}
...`
)
await
hre
.
ethers
.
provider
.
send
(
'
hardhat_setBalance
'
,
[
address
,
amount
.
toHexString
(),
])
console
.
log
(
`Waiting for balance to reflect...`
)
await
awaitCondition
(
async
()
=>
{
const
balance
=
await
hre
.
ethers
.
provider
.
getBalance
(
address
)
return
balance
.
gte
(
amount
)
},
5000
,
100
)
console
.
log
(
`Account successfully funded.`
)
}
export
const
sendImpersonatedTx
=
async
(
opts
:
{
hre
:
any
contract
:
ethers
.
Contract
fn
:
string
from
:
string
gas
:
string
args
:
any
[]
})
=>
{
if
(
!
opts
.
hre
.
deployConfig
.
isForkedNetwork
)
{
throw
new
Error
(
'
this method can only be used against a forked network
'
)
}
console
.
log
(
`Impersonating account
${
opts
.
from
}
...`
)
await
opts
.
hre
.
ethers
.
provider
.
send
(
'
hardhat_impersonateAccount
'
,
[
opts
.
from
])
console
.
log
(
`Funding account
${
opts
.
from
}
...`
)
await
fundAccount
(
opts
.
hre
,
opts
.
from
,
BIG_BALANCE
)
console
.
log
(
`Sending impersonated transaction...`
)
const
tx
=
await
opts
.
contract
.
populateTransaction
[
opts
.
fn
](...
opts
.
args
)
const
provider
=
new
opts
.
hre
.
ethers
.
providers
.
JsonRpcProvider
(
(
opts
.
hre
.
network
.
config
as
HttpNetworkConfig
).
url
)
await
provider
.
send
(
'
eth_sendTransaction
'
,
[
{
...
tx
,
from
:
opts
.
from
,
gas
:
opts
.
gas
,
},
])
console
.
log
(
`Stopping impersonation of account
${
opts
.
from
}
...`
)
await
opts
.
hre
.
ethers
.
provider
.
send
(
'
hardhat_stopImpersonatingAccount
'
,
[
opts
.
from
,
])
}
export
const
getContractFromArtifact
=
async
(
hre
:
any
,
name
:
string
,
options
:
{
iface
?:
string
signerOrProvider
?:
Signer
|
Provider
|
string
}
=
{}
):
Promise
<
ethers
.
Contract
>
=>
{
const
artifact
=
await
hre
.
deployments
.
get
(
name
)
await
hre
.
ethers
.
provider
.
waitForTransaction
(
artifact
.
receipt
.
transactionHash
)
// Get the deployed contract's interface.
let
iface
=
new
hre
.
ethers
.
utils
.
Interface
(
artifact
.
abi
)
// Override with optional iface name if requested.
if
(
options
.
iface
)
{
const
factory
=
await
hre
.
ethers
.
getContractFactory
(
options
.
iface
)
iface
=
factory
.
interface
}
let
signerOrProvider
:
Signer
|
Provider
=
hre
.
ethers
.
provider
if
(
options
.
signerOrProvider
)
{
if
(
typeof
options
.
signerOrProvider
===
'
string
'
)
{
signerOrProvider
=
hre
.
ethers
.
provider
.
getSigner
(
options
.
signerOrProvider
)
}
else
{
signerOrProvider
=
options
.
signerOrProvider
}
}
return
getAdvancedContract
({
hre
,
contract
:
new
hre
.
ethers
.
Contract
(
artifact
.
address
,
iface
,
signerOrProvider
),
})
}
export
const
isHardhatNode
=
async
(
hre
)
=>
{
return
(
await
getChainId
(
hre
.
ethers
.
provider
))
===
31337
}
export
const
assertContractVariable
=
async
(
contract
:
ethers
.
Contract
,
variable
:
string
,
expected
:
any
)
=>
{
// Need to make a copy that doesn't have a signer or we get the error that contracts with
// signers cannot override the from address.
const
temp
=
new
ethers
.
Contract
(
contract
.
address
,
contract
.
interface
,
contract
.
provider
)
const
actual
=
await
temp
.
callStatic
[
variable
]({
from
:
ethers
.
constants
.
AddressZero
,
})
assert
(
actual
===
expected
||
(
actual
.
eq
&&
actual
.
eq
(
expected
)),
`[FATAL]
${
variable
}
is
${
actual
}
but should be
${
expected
}
`
)
}
export
const
getDeploymentAddress
=
async
(
hre
:
any
,
name
:
string
):
Promise
<
string
>
=>
{
const
deployment
=
await
hre
.
deployments
.
get
(
name
)
return
deployment
.
address
}
// Large balance to fund accounts with.
export
const
BIG_BALANCE
=
ethers
.
BigNumber
.
from
(
`0xFFFFFFFFFFFFFFFFFFFF`
)
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