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
63ec5881
Unverified
Commit
63ec5881
authored
Feb 02, 2023
by
mergify[bot]
Committed by
GitHub
Feb 02, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into jg/txmgr_cleanup_pt1
parents
d0c22cf5
bb4b84c0
Changes
60
Hide whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
835 additions
and
868 deletions
+835
-868
config.yml
.circleci/config.yml
+3
-3
.dockerignore
.dockerignore
+2
-0
CODEOWNERS
.github/CODEOWNERS
+1
-1
settings.json
.vscode/settings.json
+2
-2
README.md
README.md
+1
-1
codecov.yml
codecov.yml
+1
-1
l1standardbridge.go
op-bindings/bindings/l1standardbridge.go
+1
-1
l2standardbridge.go
op-bindings/bindings/l2standardbridge.go
+1
-1
l2standardbridge_more.go
op-bindings/bindings/l2standardbridge_more.go
+1
-1
whitelists.go
op-heartbeat/whitelists.go
+7
-0
account_proof.go
op-node/eth/account_proof.go
+1
-1
channel_in_reader.go
op-node/rollup/derive/channel_in_reader.go
+1
-1
eth_client.go
op-node/sources/eth_client.go
+2
-1
Dockerfile.packages
ops/docker/Dockerfile.packages
+3
-3
.depcheckrc
packages/chain-mon/.depcheckrc
+0
-0
.env.example
packages/chain-mon/.env.example
+9
-0
.eslintrc.js
packages/chain-mon/.eslintrc.js
+0
-0
.lintstagedrc.yml
packages/chain-mon/.lintstagedrc.yml
+0
-0
.prettierrc.js
packages/chain-mon/.prettierrc.js
+0
-0
CHANGELOG.md
packages/chain-mon/CHANGELOG.md
+0
-0
LICENSE
packages/chain-mon/LICENSE
+0
-0
README.md
packages/chain-mon/README.md
+30
-0
package.json
packages/chain-mon/package.json
+5
-6
service.ts
packages/chain-mon/src/drippie-mon/service.ts
+1
-1
index.ts
packages/chain-mon/src/index.ts
+1
-0
tsconfig.json
packages/chain-mon/tsconfig.json
+0
-0
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+37
-33
L1StandardBridge.sol
packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol
+68
-4
L2StandardBridge.sol
packages/contracts-bedrock/contracts/L2/L2StandardBridge.sol
+81
-3
AddressAliasHelper.t.sol
...contracts-bedrock/contracts/test/AddressAliasHelper.t.sol
+4
-1
Bytes.t.sol
packages/contracts-bedrock/contracts/test/Bytes.t.sol
+117
-82
L1StandardBridge.t.sol
...s/contracts-bedrock/contracts/test/L1StandardBridge.t.sol
+103
-38
L2StandardBridge.t.sol
...s/contracts-bedrock/contracts/test/L2StandardBridge.t.sol
+144
-46
StandardBridge.sol
.../contracts-bedrock/contracts/universal/StandardBridge.sol
+91
-4
.gas-snapshot
packages/contracts-periphery/.gas-snapshot
+15
-15
AssetReceiver.t.sol
...cts-periphery/contracts/foundry-tests/AssetReceiver.t.sol
+33
-5
AttestationStation.t.sol
...eriphery/contracts/foundry-tests/AttestationStation.t.sol
+1
-5
Optimist.t.sol
...ontracts-periphery/contracts/foundry-tests/Optimist.t.sol
+1
-6
Transactor.t.sol
...tracts-periphery/contracts/foundry-tests/Transactor.t.sol
+2
-6
package.json
packages/contracts-periphery/package.json
+2
-7
AssetReceiver.spec.ts
...-periphery/test/contracts/universal/AssetReceiver.spec.ts
+0
-243
Transactor.spec.ts
...cts-periphery/test/contracts/universal/Transactor.spec.ts
+0
-93
CheckBalanceHigh.spec.ts
...cts/universal/drippie/dripchecks/CheckBalanceHigh.spec.ts
+0
-51
CheckBalanceLow.spec.ts
...acts/universal/drippie/dripchecks/CheckBalanceLow.spec.ts
+0
-51
CheckGelatoLow.spec.ts
...racts/universal/drippie/dripchecks/CheckGelatoLow.spec.ts
+0
-48
CheckTrue.spec.ts
.../contracts/universal/drippie/dripchecks/CheckTrue.spec.ts
+0
-17
constants.ts
packages/contracts-periphery/test/helpers/constants.ts
+0
-2
deploy.ts
packages/contracts-periphery/test/helpers/deploy.ts
+0
-12
index.ts
packages/contracts-periphery/test/helpers/index.ts
+0
-3
solidity.ts
packages/contracts-periphery/test/helpers/solidity.ts
+0
-21
setup.ts
packages/contracts-periphery/test/setup.ts
+0
-10
index.ts
packages/drippie-mon/src/index.ts
+0
-1
deposit-erc20.ts
packages/sdk/tasks/deposit-erc20.ts
+22
-5
deposit-eth.ts
packages/sdk/tasks/deposit-eth.ts
+4
-1
README.md
specs/README.md
+10
-8
exec-engine.md
specs/exec-engine.md
+2
-0
introduction.md
specs/introduction.md
+11
-9
predeploys.md
specs/predeploys.md
+9
-10
proposals.md
specs/proposals.md
+3
-2
rollup-node.md
specs/rollup-node.md
+2
-2
No files found.
.circleci/config.yml
View file @
63ec5881
...
...
@@ -846,9 +846,9 @@ workflows:
requires
:
-
yarn-monorepo
-
js-lint-test
:
name
:
drippie
-mon-tests
coverage_flag
:
drippie
-mon-tests
package_name
:
drippie
-mon
name
:
chain
-mon-tests
coverage_flag
:
chain
-mon-tests
package_name
:
chain
-mon
dependencies
:
"
(common-ts|contracts-periphery|core-utils|sdk)"
requires
:
-
yarn-monorepo
...
...
.dockerignore
View file @
63ec5881
.github
.vscode
node_modules
**/node_modules
.env
**/.env
...
...
.github/CODEOWNERS
View file @
63ec5881
...
...
@@ -12,7 +12,7 @@
/packages/contracts-periphery @ethereum-optimism/contract-reviewers
/packages/core-utils @ethereum-optimism/legacy-reviewers
/packages/data-transport-layer @ethereum-optimism/legacy-reviewers
/packages/
drippie-mon
@smartcontracts
/packages/
chain-mon
@smartcontracts
/packages/fault-detector @ethereum-optimism/legacy-reviewers
/packages/hardhat-deploy-config @ethereum-optimism/legacy-reviewers
/packages/message-relayer @ethereum-optimism/legacy-reviewers
...
...
.vscode/settings.json
View file @
63ec5881
...
...
@@ -25,7 +25,7 @@
"changeProcessCWD"
:
true
},
{
"directory"
:
"packages/
drippie
-mon"
,
"directory"
:
"packages/
chain
-mon"
,
"changeProcessCWD"
:
true
},
{
...
...
@@ -45,4 +45,4 @@
"eslint.format.enable"
:
true
,
"editorconfig.generateAuto"
:
false
,
"files.trimTrailingWhitespace"
:
true
}
\ No newline at end of file
}
README.md
View file @
63ec5881
...
...
@@ -57,7 +57,7 @@ Refer to the Directory Structure section below to understand which packages are
│ ├──
<a
href=
"./packages/contracts-periphery"
>
contracts-periphery
</a>
: Peripheral contracts for Optimism
│ ├──
<a
href=
"./packages/core-utils"
>
core-utils
</a>
: Low-level utilities that make building Optimism easier
│ ├──
<a
href=
"./packages/data-transport-layer"
>
data-transport-layer
</a>
: Service for indexing Optimism-related L1 data
│ ├──
<a
href=
"./packages/
drippie-mon"
>
drippie-mon
</a>
: Service for monitoring Drippie instan
ces
│ ├──
<a
href=
"./packages/
chain-mon"
>
chain-mon
</a>
: Chain monitoring servi
ces
│ ├──
<a
href=
"./packages/fault-detector"
>
fault-detector
</a>
: Service for detecting Sequencer faults
│ ├──
<a
href=
"./packages/message-relayer"
>
message-relayer
</a>
: Tool for automatically relaying L1
<>
L2 messages in development
│ ├──
<a
href=
"./packages/replica-healthcheck"
>
replica-healthcheck
</a>
: Service for monitoring the health of a replica node
...
...
codecov.yml
View file @
63ec5881
...
...
@@ -37,7 +37,7 @@ flag_management:
-
name
:
actor-tests-tests
-
name
:
contracts-periphery-tests
-
name
:
dtl-tests
-
name
:
drippie
-mon-tests
-
name
:
chain
-mon-tests
-
name
:
fault-detector-tests
-
name
:
message-relayer-tests
-
name
:
replica-healthcheck-tests
...
...
op-bindings/bindings/l1standardbridge.go
View file @
63ec5881
...
...
@@ -31,7 +31,7 @@ var (
// L1StandardBridgeMetaData contains all meta data concerning the L1StandardBridge contract.
var
L1StandardBridgeMetaData
=
&
bind
.
MetaData
{
ABI
:
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
addresspayable
\"
,
\"
name
\"
:
\"
_messenger
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
localToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
remoteToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ERC20BridgeFinalized
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
localToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
remoteToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ERC20BridgeInitiated
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
l1Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
l2Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ERC20DepositInitiated
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
l1Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
l2Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ERC20WithdrawalFinalized
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ETHBridgeFinalized
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ETHBridgeInitiated
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ETHDepositInitiated
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ETHWithdrawalFinalized
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
MESSENGER
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractCrossDomainMessenger
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
OTHER_BRIDGE
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractStandardBridge
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_localToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_remoteToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
bridgeERC20
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_localToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_remoteToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
bridgeERC20To
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
bridgeETH
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
bridgeETHTo
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_l1Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_l2Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
depositERC20
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_l1Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_l2Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
depositERC20To
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
depositETH
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
depositETHTo
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
deposits
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_localToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_remoteToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
finalizeBridgeERC20
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
finalizeBridgeETH
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_l1Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_l2Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
finalizeERC20Withdrawal
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
finalizeETHWithdrawal
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
l2TokenBridge
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
messenger
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractCrossDomainMessenger
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
version
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
receive
\"
}]"
,
Bin
:
"0x6101206040523480156200001257600080fd5b5060405162002f
1a38038062002f1a83398101604081905262000035916200006f565b6001600160a01b031660805273420000000000000000000000000000000000001060a052600160c081905260e052600061010052620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b60805160a05160c05160e05161010051612daf6200016b60003960006111ee015260006111c50152600061119c015260008181610311015281816103c80152818161053501528181610a4001528181610c8d015281816114a9015281816119110152611ebb015260008181610253015281816103fe0152818161050b0152818161056c01528181610a1601528181610a7701528181610c6301528181610cc401528181610f510152818161147f015281816114e0015281816118d40152611e7f0152612daf6000f3fe60806040526004361061012d5760003560e01c8063838b2520116100a5578063927ede2d11610074578063a9f9e67511610059578063a9f9e67514610433578063b1a1a88214610453578063e11013dd1461046657600080fd5b8063927ede2d146103ec5780639a2ac6d51461042057600080fd5b8063838b25201461033357806387087623146103535780638f601f661461037357806391c49bf8146103b957600080fd5b80633cb747bf116100fc57806354fd4d50116100e157806354fd4d50146102bd57806358a997f6146102df5780637f46ddb2146102ff57600080fd5b80633cb747bf14610244578063540abf731461029d57600080fd5b80630166a07a146101eb57806309fc88431461020b5780631532ec341461021e5780631635f5fd1461023157600080fd5b366101e657333b156101c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101e4333362030d4060405180602001604052806000815250610479565b005b600080fd5b3480156101f757600080fd5b506101e4610206366004612617565b6104f3565b6101e46102193660046126c8565b610927565b6101e461022c36600461271b565b6109fe565b6101e461023f36600461271b565b610c4b565b34801561025057600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102a957600080fd5b506101e46102b836600461278e565b611147565b3480156102c957600080fd5b506102d2611195565b604051610294919061287b565b3480156102eb57600080fd5b506101e46102fa36600461288e565b611238565b34801561030b57600080fd5b506102737f000000000000000000000000000000000000000000000000000000000000000081565b34801561033f57600080fd5b506101e461034e36600461278e565b61130c565b34801561035f57600080fd5b506101e461036e36600461288e565b611351565b34801561037f57600080fd5b506103ab61038e366004612911565b600260209081526000928352604080842090915290825290205481565b604051908152602001610294565b3480156103c557600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610273565b3480156103f857600080fd5b506102737f000000000000000000000000000000000000000000000000000000000000000081565b6101e461042e36600461294a565b611425565b34801561043f57600080fd5b506101e461044e366004612617565b611467565b6101e46104613660046126c8565b6116c8565b6101e461047436600461294a565b611799565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f2334846040516104d89291906129ad565b60405180910390a36104ed84843485856117dc565b50505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561061157507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f991906129c6565b73ffffffffffffffffffffffffffffffffffffffff16145b6106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b6106cc87611a1b565b1561081a576106db8787611a7d565b61078d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101bd565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590528816906340c10f1990604401600060405180830381600087803b1580156107fd57600080fd5b505af1158015610811573d6000803e3d6000fd5b5050505061089c565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a1683529290522054610858908490612a12565b73ffffffffffffffffffffffffffffffffffffffff8089166000818152600260209081526040808320948c168352939052919091209190915561089c908585611b24565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd878787876040516109169493929190612a72565b60405180910390a450505050505050565b333b156109b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b6109f93333348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506117dc92505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610b1c57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ae0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0491906129c6565b73ffffffffffffffffffffffffffffffffffffffff16145b610bce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e631858585604051610c2f93929190612ab2565b60405180910390a3610c448585858585610c4b565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610d6957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5191906129c6565b73ffffffffffffffffffffffffffffffffffffffff16145b610e1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b823414610eaa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e7420726571756972656400000000000060648201526084016101bd565b3073ffffffffffffffffffffffffffffffffffffffff851603610f4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c66000000000000000000000000000000000000000000000000000000000060648201526084016101bd565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361102a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f206d60448201527f657373656e67657200000000000000000000000000000000000000000000000060648201526084016101bd565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d85858560405161108b93929190612ab2565b60405180910390a360006110b0855a8660405180602001604052806000815250611bf8565b90508061113f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c6564000000000000000000000000000000000000000000000000000000000060648201526084016101bd565b505050505050565b61118c87873388888888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611c1292505050565b50505050505050565b60606111c07f0000000000000000000000000000000000000000000000000000000000000000611fcb565b6111e97f0000000000000000000000000000000000000000000000000000000000000000611fcb565b6112127f0000000000000000000000000000000000000000000000000000000000000000611fcb565b60405160200161122493929190612ad5565b604051602081830303815290604052905090565b333b156112c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b61113f86863333888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061210892505050565b61118c87873388888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061210892505050565b333b156113e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b61113f86863333888888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611c1292505050565b6104ed33858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061047992505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561158557507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015611549573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156d91906129c6565b73ffffffffffffffffffffffffffffffffffffffff16145b611637576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3878787876040516116b19493929190612a72565b60405180910390a461118c878787878787876104f3565b333b15611757576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b6109f933338585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061047992505050565b6104ed3385348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506117dc92505050565b82341461186b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5374616e646172644272696467653a206272696467696e6720455448206d757360448201527f7420696e636c7564652073756666696369656e74204554482076616c7565000060648201526084016101bd565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af585846040516118ca9291906129ad565b60405180910390a37f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b8989898860405160240161194f9493929190612b4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b90921682526119e292918890600401612b8a565b6000604051808303818588803b1580156119fb57600080fd5b505af1158015611a0f573d6000803e3d6000fd5b50505050505050505050565b6000611a47827f1d1d8b6300000000000000000000000000000000000000000000000000000000612197565b80611a775750611a77827fec4fc8e300000000000000000000000000000000000000000000000000000000612197565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa158015611aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aee91906129c6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109f99084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526121ba565b600080600080845160208601878a8af19695505050505050565b611c1b87611a1b565b15611d6957611c2a8787611a7d565b611cdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101bd565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015260248201859052881690639dc29fac90604401600060405180830381600087803b158015611d4c57600080fd5b505af1158015611d60573d6000803e3d6000fd5b50505050611dfd565b611d8b73ffffffffffffffffffffffffffffffffffffffff88168630866122c6565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a1683529290522054611dc9908490612bcf565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b16835292905220555b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf878786604051611e7593929190612be7565b60405180910390a47f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b898b8a8a8a89604051602401611efd96959493929190612c1c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611f9092918790600401612b8a565b600060405180830381600087803b158015611faa57600080fd5b505af1158015611fbe573d6000803e3d6000fd5b5050505050505050505050565b60608160000361200e57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612038578061202281612c77565b91506120319050600a83612cde565b9150612012565b60008167ffffffffffffffff81111561205357612053612cf2565b6040519080825280601f01601f19166020018201604052801561207d576020820181803683370190505b5090505b841561210057612092600183612a12565b915061209f600a86612d21565b6120aa906030612bcf565b60f81b8183815181106120bf576120bf612d35565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506120f9600a86612cde565b9450612081565b949350505050565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d039687878660405161218093929190612be7565b60405180910390a461118c87878787878787611c12565b60006121a283612324565b80156121b357506121b38383612388565b9392505050565b600061221c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166124579092919063ffffffff16565b8051909150156109f9578080602001905181019061223a9190612d64565b6109f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101bd565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526104ed9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611b76565b6000612350827f01ffc9a700000000000000000000000000000000000000000000000000000000612388565b8015611a775750612381827fffffffff00000000000000000000000000000000000000000000000000000000612388565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015612440575060208210155b801561244c5750600081115b979650505050505050565b606061210084846000858573ffffffffffffffffffffffffffffffffffffffff85163b6124e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101bd565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516125099190612d86565b60006040518083038185875af1925050503d8060008114612546576040519150601f19603f3d011682016040523d82523d6000602084013e61254b565b606091505b509150915061244c828286606083156125655750816121b3565b8251156125755782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101bd919061287b565b73ffffffffffffffffffffffffffffffffffffffff811681146125cb57600080fd5b50565b60008083601f8401126125e057600080fd5b50813567ffffffffffffffff8111156125f857600080fd5b60208301915083602082850101111561261057600080fd5b9250929050565b600080600080600080600060c0888a03121561263257600080fd5b873561263d816125a9565b9650602088013561264d816125a9565b9550604088013561265d816125a9565b9450606088013561266d816125a9565b93506080880135925060a088013567ffffffffffffffff81111561269057600080fd5b61269c8a828b016125ce565b989b979a50959850939692959293505050565b803563ffffffff811681146126c357600080fd5b919050565b6000806000604084860312156126dd57600080fd5b6126e6846126af565b9250602084013567ffffffffffffffff81111561270257600080fd5b61270e868287016125ce565b9497909650939450505050565b60008060008060006080868803121561273357600080fd5b853561273e816125a9565b9450602086013561274e816125a9565b935060408601359250606086013567ffffffffffffffff81111561277157600080fd5b61277d888289016125ce565b969995985093965092949392505050565b600080600080600080600060c0888a0312156127a957600080fd5b87356127b4816125a9565b965060208801356127c4816125a9565b955060408801356127d4816125a9565b9450606088013593506127e9608089016126af565b925060a088013567ffffffffffffffff81111561269057600080fd5b60005b83811015612820578181015183820152602001612808565b838111156104ed5750506000910152565b60008151808452612849816020860160208601612805565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006121b36020830184612831565b60008060008060008060a087890312156128a757600080fd5b86356128b2816125a9565b955060208701356128c2816125a9565b9450604087013593506128d7606088016126af565b9250608087013567ffffffffffffffff8111156128f357600080fd5b6128ff89828a016125ce565b979a9699509497509295939492505050565b6000806040838503121561292457600080fd5b823561292f816125a9565b9150602083013561293f816125a9565b809150509250929050565b6000806000806060858703121561296057600080fd5b843561296b816125a9565b9350612979602086016126af565b9250604085013567ffffffffffffffff81111561299557600080fd5b6129a1878288016125ce565b95989497509550505050565b8281526040602082015260006121006040830184612831565b6000602082840312156129d857600080fd5b81516121b3816125a9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612a2457612a246129e3565b500390565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152606060408201526000612aa8606083018486612a29565b9695505050505050565b838152604060208201526000612acc604083018486612a29565b95945050505050565b60008451612ae7818460208901612805565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612b23816001850160208a01612805565b60019201918201528351612b3e816002840160208801612805565b0160020195945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152612aa86080830184612831565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000612bb96060830185612831565b905063ffffffff83166040830152949350505050565b60008219821115612be257612be26129e3565b500190565b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201526000612acc6060830184612831565b600073ffffffffffffffffffffffffffffffffffffffff80891683528088166020840152808716604084015280861660608401525083608083015260c060a0830152612c6b60c0830184612831565b98975050505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612ca857612ca86129e3565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612ced57612ced612caf565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612d3057612d30612caf565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215612d7657600080fd5b815180151581146121b357600080fd5b60008251612d98818460208701612805
565b919091019291505056fea164736f6c634300080f000a"
,
Bin
:
"0x6101206040523480156200001257600080fd5b5060405162002f
d838038062002fd883398101604081905262000035916200006f565b6001600160a01b031660805273420000000000000000000000000000000000001060a052600160c081905260e052600061010052620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b60805160a05160c05160e05161010051612e6d6200016b60003960006110b0015260006110870152600061105e015260008181610311015281816103c8015281816104ce0152818161099b01528181610b7f0152818161136b015281816116f60152611d2f015260008181610253015281816103fe015281816104a40152818161050501528181610971015281816109d201528181610b5501528181610bb601528181610e4301528181611341015281816113a2015281816116b90152611cf30152612e6d6000f3fe60806040526004361061012d5760003560e01c8063838b2520116100a5578063927ede2d11610074578063a9f9e67511610059578063a9f9e67514610433578063b1a1a88214610453578063e11013dd1461046657600080fd5b8063927ede2d146103ec5780639a2ac6d51461042057600080fd5b8063838b25201461033357806387087623146103535780638f601f661461037357806391c49bf8146103b957600080fd5b80633cb747bf116100fc57806354fd4d50116100e157806354fd4d50146102bd57806358a997f6146102df5780637f46ddb2146102ff57600080fd5b80633cb747bf14610244578063540abf731461029d57600080fd5b80630166a07a146101eb57806309fc88431461020b5780631532ec341461021e5780631635f5fd1461023157600080fd5b366101e657333b156101c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101e4333362030d4060405180602001604052806000815250610479565b005b600080fd5b3480156101f757600080fd5b506101e461020636600461276e565b61048c565b6101e461021936600461281f565b610882565b6101e461022c366004612872565b610959565b6101e461023f366004612872565b610b3d565b34801561025057600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102a957600080fd5b506101e46102b83660046128e5565b611012565b3480156102c957600080fd5b506102d2611057565b60405161029491906129d2565b3480156102eb57600080fd5b506101e46102fa3660046129e5565b6110fa565b34801561030b57600080fd5b506102737f000000000000000000000000000000000000000000000000000000000000000081565b34801561033f57600080fd5b506101e461034e3660046128e5565b6111ce565b34801561035f57600080fd5b506101e461036e3660046129e5565b611213565b34801561037f57600080fd5b506103ab61038e366004612a68565b600260209081526000928352604080842090915290825290205481565b604051908152602001610294565b3480156103c557600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610273565b3480156103f857600080fd5b506102737f000000000000000000000000000000000000000000000000000000000000000081565b6101e461042e366004612aa1565b6112e7565b34801561043f57600080fd5b506101e461044e36600461276e565b611329565b6101e461046136600461281f565b611508565b6101e4610474366004612aa1565b6115d9565b610486848434858561161c565b50505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156105aa57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561056e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105929190612b04565b73ffffffffffffffffffffffffffffffffffffffff16145b61065c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b61066587611800565b156107b3576106748787611862565b610726576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101bd565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590528816906340c10f1990604401600060405180830381600087803b15801561079657600080fd5b505af11580156107aa573d6000803e3d6000fd5b50505050610835565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a16835292905220546107f1908490612b50565b73ffffffffffffffffffffffffffffffffffffffff8089166000818152600260209081526040808320948c1683529390529190912091909155610835908585611909565b610879878787878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506119dd92505050565b50505050505050565b333b15610911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b6109543333348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061161c92505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610a7757507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5f9190612b04565b73ffffffffffffffffffffffffffffffffffffffff16145b610b29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b610b368585858585610b3d565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610c5b57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c439190612b04565b73ffffffffffffffffffffffffffffffffffffffff16145b610d0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b823414610d9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e7420726571756972656400000000000060648201526084016101bd565b3073ffffffffffffffffffffffffffffffffffffffff851603610e41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c66000000000000000000000000000000000000000000000000000000000060648201526084016101bd565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610f1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f206d60448201527f657373656e67657200000000000000000000000000000000000000000000000060648201526084016101bd565b610f5e85858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a6b92505050565b6000610f7b855a8660405180602001604052806000815250611ade565b90508061100a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c6564000000000000000000000000000000000000000000000000000000000060648201526084016101bd565b505050505050565b61087987873388888888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611af892505050565b60606110827f0000000000000000000000000000000000000000000000000000000000000000611e3f565b6110ab7f0000000000000000000000000000000000000000000000000000000000000000611e3f565b6110d47f0000000000000000000000000000000000000000000000000000000000000000611e3f565b6040516020016110e693929190612b67565b604051602081830303815290604052905090565b333b15611189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b61100a86863333888888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611f7c92505050565b61087987873388888888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611f7c92505050565b333b156112a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b61100a86863333888888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611af892505050565b61048633858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061047992505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561144757507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561140b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142f9190612b04565b73ffffffffffffffffffffffffffffffffffffffff16145b6114f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a4016101bd565b6108798787878787878761048c565b333b15611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084016101bd565b61095433338585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061047992505050565b6104863385348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061161c92505050565b8234146116ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5374616e646172644272696467653a206272696467696e6720455448206d757360448201527f7420696e636c7564652073756666696369656e74204554482076616c7565000060648201526084016101bd565b6116b785858584611f8b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b898989886040516024016117349493929190612bdd565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b90921682526117c792918890600401612c26565b6000604051808303818588803b1580156117e057600080fd5b505af11580156117f4573d6000803e3d6000fd5b50505050505050505050565b600061182c827f1d1d8b6300000000000000000000000000000000000000000000000000000000611ffe565b8061185c575061185c827fec4fc8e300000000000000000000000000000000000000000000000000000000611ffe565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d39190612b04565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109549084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612021565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f3ceee06c1e37648fcbb6ed52e17b3e1f275a1f8c7b22a84b2b84732431e046b3868686604051611a5593929190612c6b565b60405180910390a461100a86868686868661212d565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f2ac69ee804d9a7a0984249f508dfab7cb2534b465b6ce1580f99a38ba9c5e6318484604051611aca929190612ca9565b60405180910390a3610486848484846121b5565b600080600080845160208601878a8af19695505050505050565b611b0187611800565b15611c4f57611b108787611862565b611bc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a4016101bd565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015260248201859052881690639dc29fac90604401600060405180830381600087803b158015611c3257600080fd5b505af1158015611c46573d6000803e3d6000fd5b50505050611ce3565b611c7173ffffffffffffffffffffffffffffffffffffffff8816863086612222565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a1683529290522054611caf908490612cc2565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b16835292905220555b611cf1878787878786612280565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b898b8a8a8a89604051602401611d7196959493929190612cda565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611e0492918790600401612c26565b600060405180830381600087803b158015611e1e57600080fd5b505af1158015611e32573d6000803e3d6000fd5b5050505050505050505050565b606081600003611e8257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611eac5780611e9681612d35565b9150611ea59050600a83612d9c565b9150611e86565b60008167ffffffffffffffff811115611ec757611ec7612db0565b6040519080825280601f01601f191660200182016040528015611ef1576020820181803683370190505b5090505b8415611f7457611f06600183612b50565b9150611f13600a86612ddf565b611f1e906030612cc2565b60f81b818381518110611f3357611f33612df3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611f6d600a86612d9c565b9450611ef5565b949350505050565b61087987878787878787611af8565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f35d79ab81f2b2017e19afb5c5571778877782d7a8786f5907f93b0f4702f4f238484604051611fea929190612ca9565b60405180910390a36104868484848461230e565b60006120098361236d565b801561201a575061201a83836123d1565b9392505050565b6000612083826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166124a09092919063ffffffff16565b80519091501561095457808060200190518101906120a19190612e22565b610954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101bd565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd8686866040516121a593929190612c6b565b60405180910390a4505050505050565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d8484604051612214929190612ca9565b60405180910390a350505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526104869085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161195b565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f718594027abd4eaed59f95162563e0cc6d0e8d5b86b1c7be8b1b0ac3343d03968686866040516122f893929190612c6b565b60405180910390a461100a8686868686866124af565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af58484604051612214929190612ca9565b6000612399827f01ffc9a7000000000000000000000000000000000000000000000000000000006123d1565b801561185c57506123ca827fffffffff000000000000000000000000000000000000000000000000000000006123d1565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015612489575060208210155b80156124955750600081115b979650505050505050565b6060611f748484600085612527565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf8686866040516121a593929190612c6b565b6060824710156125b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016101bd565b73ffffffffffffffffffffffffffffffffffffffff85163b612637576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101bd565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516126609190612e44565b60006040518083038185875af1925050503d806000811461269d576040519150601f19603f3d011682016040523d82523d6000602084013e6126a2565b606091505b5091509150612495828286606083156126bc57508161201a565b8251156126cc5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101bd91906129d2565b73ffffffffffffffffffffffffffffffffffffffff8116811461272257600080fd5b50565b60008083601f84011261273757600080fd5b50813567ffffffffffffffff81111561274f57600080fd5b60208301915083602082850101111561276757600080fd5b9250929050565b600080600080600080600060c0888a03121561278957600080fd5b873561279481612700565b965060208801356127a481612700565b955060408801356127b481612700565b945060608801356127c481612700565b93506080880135925060a088013567ffffffffffffffff8111156127e757600080fd5b6127f38a828b01612725565b989b979a50959850939692959293505050565b803563ffffffff8116811461281a57600080fd5b919050565b60008060006040848603121561283457600080fd5b61283d84612806565b9250602084013567ffffffffffffffff81111561285957600080fd5b61286586828701612725565b9497909650939450505050565b60008060008060006080868803121561288a57600080fd5b853561289581612700565b945060208601356128a581612700565b935060408601359250606086013567ffffffffffffffff8111156128c857600080fd5b6128d488828901612725565b969995985093965092949392505050565b600080600080600080600060c0888a03121561290057600080fd5b873561290b81612700565b9650602088013561291b81612700565b9550604088013561292b81612700565b94506060880135935061294060808901612806565b925060a088013567ffffffffffffffff8111156127e757600080fd5b60005b8381101561297757818101518382015260200161295f565b838111156104865750506000910152565b600081518084526129a081602086016020860161295c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061201a6020830184612988565b60008060008060008060a087890312156129fe57600080fd5b8635612a0981612700565b95506020870135612a1981612700565b945060408701359350612a2e60608801612806565b9250608087013567ffffffffffffffff811115612a4a57600080fd5b612a5689828a01612725565b979a9699509497509295939492505050565b60008060408385031215612a7b57600080fd5b8235612a8681612700565b91506020830135612a9681612700565b809150509250929050565b60008060008060608587031215612ab757600080fd5b8435612ac281612700565b9350612ad060208601612806565b9250604085013567ffffffffffffffff811115612aec57600080fd5b612af887828801612725565b95989497509550505050565b600060208284031215612b1657600080fd5b815161201a81612700565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612b6257612b62612b21565b500390565b60008451612b7981846020890161295c565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612bb5816001850160208a0161295c565b60019201918201528351612bd081600284016020880161295c565b0160020195945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152612c1c6080830184612988565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000612c556060830185612988565b905063ffffffff83166040830152949350505050565b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201526000612ca06060830184612988565b95945050505050565b828152604060208201526000611f746040830184612988565b60008219821115612cd557612cd5612b21565b500190565b600073ffffffffffffffffffffffffffffffffffffffff80891683528088166020840152808716604084015280861660608401525083608083015260c060a0830152612d2960c0830184612988565b98975050505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d6657612d66612b21565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612dab57612dab612d6d565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612dee57612dee612d6d565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215612e3457600080fd5b8151801515811461201a57600080fd5b60008251612e5681846020870161295c
565b919091019291505056fea164736f6c634300080f000a"
,
}
// L1StandardBridgeABI is the input ABI used to generate the binding from.
...
...
op-bindings/bindings/l2standardbridge.go
View file @
63ec5881
...
...
@@ -31,7 +31,7 @@ var (
// L2StandardBridgeMetaData contains all meta data concerning the L2StandardBridge contract.
var
L2StandardBridgeMetaData
=
&
bind
.
MetaData
{
ABI
:
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
addresspayable
\"
,
\"
name
\"
:
\"
_otherBridge
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
l1Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
l2Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
DepositFinalized
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
localToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
remoteToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ERC20BridgeFinalized
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
localToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
remoteToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ERC20BridgeInitiated
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ETHBridgeFinalized
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
ETHBridgeInitiated
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
l1Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
l2Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:false,
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
WithdrawalInitiated
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
MESSENGER
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractCrossDomainMessenger
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
OTHER_BRIDGE
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractStandardBridge
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_localToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_remoteToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
bridgeERC20
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_localToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_remoteToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
bridgeERC20To
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
bridgeETH
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
bridgeETHTo
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
deposits
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_localToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_remoteToken
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
finalizeBridgeERC20
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
finalizeBridgeETH
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_l1Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_l2Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_from
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
finalizeDeposit
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
l1TokenBridge
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
messenger
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractCrossDomainMessenger
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
version
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_l2Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
withdraw
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_l2Token
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
_to
\"
,
\"
type
\"
:
\"
address
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_amount
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
_minGasLimit
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_extraData
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
withdrawTo
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
receive
\"
}]"
,
Bin
:
"0x6101206040523480156200001257600080fd5b5060405162002
a3038038062002a3083398101604081905262000035916200006f565b7342000000000000000000000000000000000000076080526001600160a01b031660a052600160c081905260e052600061010052620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b60805160a05160c05160e051610100516128ef6200014160003960006110bf015260006110960152600061106d0152600081816102280152818161030c0152818161058a01528181610a840152818161148c015261183f015260008181610281015281816103a601528181610560015281816105c101528181610a5a01528181610abb01528181610d480152818161144f015261180301526128ef6000f3fe6080604052600436106100ec5760003560e01c806354fd4d501161008a5780638f601f66116100595780638f601f661461034e578063927ede2d14610394578063a3a79548146103c8578063e11013dd146103db57600080fd5b806354fd4d50146102c5578063662a633a146102e75780637f46ddb2146102fa578063870876231461032e57600080fd5b806332b7006d116100c657806332b7006d1461020657806336c717c1146102195780633cb747bf14610272578063540abf73146102a557600080fd5b80630166a07a146101c057806309fc8843146101e05780631635f5fd146101f357600080fd5b366101bb57333b15610185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101b973deaddeaddeaddeaddeaddeaddeaddeaddead000033333462030d40604051806020016040528060008152506103ee565b005b600080fd5b3480156101cc57600080fd5b506101b96101db366004612103565b610548565b6101b96101ee3660046121b4565b61096b565b6101b9610201366004612207565b610a42565b6101b961021436600461227a565b610f3e565b34801561022557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561027e57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610248565b3480156102b157600080fd5b506101b96102c03660046122ce565b611018565b3480156102d157600080fd5b506102da611066565b60405161026991906123bb565b6101b96102f5366004612103565b611109565b34801561030657600080fd5b506102487f000000000000000000000000000000000000000000000000000000000000000081565b34801561033a57600080fd5b506101b96103493660046123ce565b6111f6565b34801561035a57600080fd5b50610386610369366004612451565b600260209081526000928352604080842090915290825290205481565b604051908152602001610269565b3480156103a057600080fd5b506102487f000000000000000000000000000000000000000000000000000000000000000081565b6101b96103d63660046123ce565b6112ca565b6101b96103e936600461248a565b61130e565b60008673ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa15801561043b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045f91906124ed565b90507fffffffffffffffffffffffff215221522152215221522152215221522153000073ffffffffffffffffffffffffffffffffffffffff8816016104b0576104ab8686868686611357565b6104bf565b6104bf87828888888888611596565b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f73d170910aba9e6d50b102db522b1dbcd796216f5128b445aa2135272886497e8888876040516105379392919061250a565b60405180910390a450505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561066657507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906124ed565b73ffffffffffffffffffffffffffffffffffffffff16145b610718576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b6107218761194f565b1561086f5761073087876119b1565b6107e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590528816906340c10f1990604401600060405180830381600087803b15801561085257600080fd5b505af1158015610866573d6000803e3d6000fd5b505050506108f1565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a16835292905220546108ad908490612577565b73ffffffffffffffffffffffffffffffffffffffff8089166000818152600260209081526040808320948c16835293905291909120919091556108f1908585611a58565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd8787878760405161053794939291906125d7565b333b156109fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610a3d3333348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061135792505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610b6057507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4891906124ed565b73ffffffffffffffffffffffffffffffffffffffff16145b610c12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b823414610ca1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e74207265717569726564000000000000606482015260840161017c565b3073ffffffffffffffffffffffffffffffffffffffff851603610d46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c660000000000000000000000000000000000000000000000000000000000606482015260840161017c565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610e21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f206d60448201527f657373656e676572000000000000000000000000000000000000000000000000606482015260840161017c565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d858585604051610e8293929190612617565b60405180910390a36000610ea7855a8660405180602001604052806000815250611b2c565b905080610f36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c65640000000000000000000000000000000000000000000000000000000000606482015260840161017c565b505050505050565b333b15610fcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b611011853333878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103ee92505050565b5050505050565b61105d87873388888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061159692505050565b50505050505050565b60606110917f0000000000000000000000000000000000000000000000000000000000000000611b46565b6110ba7f0000000000000000000000000000000000000000000000000000000000000000611b46565b6110e37f0000000000000000000000000000000000000000000000000000000000000000611b46565b6040516020016110f593929190612631565b604051602081830303815290604052905090565b73ffffffffffffffffffffffffffffffffffffffff8716158015611156575073ffffffffffffffffffffffffffffffffffffffff861673deaddeaddeaddeaddeaddeaddeaddeaddead0000145b1561116d576111688585858585610a42565b61117c565b61117c86888787878787610548565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fb0444523268717a02698be47d0803aa7468c00acbed2f8bd93a0459cde61dd898787878760405161053794939291906125d7565b333b15611285576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610f3686863333888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061159692505050565b610f36863387878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103ee92505050565b6113513385348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061135792505050565b50505050565b8234146113e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5374616e646172644272696467653a206272696467696e6720455448206d757360448201527f7420696e636c7564652073756666696369656e74204554482076616c75650000606482015260840161017c565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af585846040516114459291906126a7565b60405180910390a37f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b898989886040516024016114ca94939291906126c0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b909216825261155d929188906004016126ff565b6000604051808303818588803b15801561157657600080fd5b505af115801561158a573d6000803e3d6000fd5b50505050505050505050565b61159f8761194f565b156116ed576115ae87876119b1565b611660576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015260248201859052881690639dc29fac90604401600060405180830381600087803b1580156116d057600080fd5b505af11580156116e4573d6000803e3d6000fd5b50505050611781565b61170f73ffffffffffffffffffffffffffffffffffffffff8816863086611c83565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a168352929052205461174d908490612744565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b16835292905220555b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf8787866040516117f99392919061250a565b60405180910390a47f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b898b8a8a8a896040516024016118819695949392919061275c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611914929187906004016126ff565b600060405180830381600087803b15801561192e57600080fd5b505af1158015611942573d6000803e3d6000fd5b5050505050505050505050565b600061197b827f1d1d8b6300000000000000000000000000000000000000000000000000000000611ce1565b806119ab57506119ab827fec4fc8e300000000000000000000000000000000000000000000000000000000611ce1565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2291906124ed565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610a3d9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611d04565b600080600080845160208601878a8af19695505050505050565b606081600003611b8957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611bb35780611b9d816127b7565b9150611bac9050600a8361281e565b9150611b8d565b60008167ffffffffffffffff811115611bce57611bce612832565b6040519080825280601f01601f191660200182016040528015611bf8576020820181803683370190505b5090505b8415611c7b57611c0d600183612577565b9150611c1a600a86612861565b611c25906030612744565b60f81b818381518110611c3a57611c3a612875565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611c74600a8661281e565b9450611bfc565b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526113519085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611aaa565b6000611cec83611e10565b8015611cfd5750611cfd8383611e74565b9392505050565b6000611d66826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611f439092919063ffffffff16565b805190915015610a3d5780806020019051810190611d8491906128a4565b610a3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161017c565b6000611e3c827f01ffc9a700000000000000000000000000000000000000000000000000000000611e74565b80156119ab5750611e6d827fffffffff00000000000000000000000000000000000000000000000000000000611e74565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015611f2c575060208210155b8015611f385750600081115b979650505050505050565b6060611c7b84846000858573ffffffffffffffffffffffffffffffffffffffff85163b611fcc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161017c565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611ff591906128c6565b60006040518083038185875af1925050503d8060008114612032576040519150601f19603f3d011682016040523d82523d6000602084013e612037565b606091505b5091509150611f3882828660608315612051575081611cfd565b8251156120615782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017c91906123bb565b73ffffffffffffffffffffffffffffffffffffffff811681146120b757600080fd5b50565b60008083601f8401126120cc57600080fd5b50813567ffffffffffffffff8111156120e457600080fd5b6020830191508360208285010111156120fc57600080fd5b9250929050565b600080600080600080600060c0888a03121561211e57600080fd5b873561212981612095565b9650602088013561213981612095565b9550604088013561214981612095565b9450606088013561215981612095565b93506080880135925060a088013567ffffffffffffffff81111561217c57600080fd5b6121888a828b016120ba565b989b979a50959850939692959293505050565b803563ffffffff811681146121af57600080fd5b919050565b6000806000604084860312156121c957600080fd5b6121d28461219b565b9250602084013567ffffffffffffffff8111156121ee57600080fd5b6121fa868287016120ba565b9497909650939450505050565b60008060008060006080868803121561221f57600080fd5b853561222a81612095565b9450602086013561223a81612095565b935060408601359250606086013567ffffffffffffffff81111561225d57600080fd5b612269888289016120ba565b969995985093965092949392505050565b60008060008060006080868803121561229257600080fd5b853561229d81612095565b9450602086013593506122b26040870161219b565b9250606086013567ffffffffffffffff81111561225d57600080fd5b600080600080600080600060c0888a0312156122e957600080fd5b87356122f481612095565b9650602088013561230481612095565b9550604088013561231481612095565b9450606088013593506123296080890161219b565b925060a088013567ffffffffffffffff81111561217c57600080fd5b60005b83811015612360578181015183820152602001612348565b838111156113515750506000910152565b60008151808452612389816020860160208601612345565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611cfd6020830184612371565b60008060008060008060a087890312156123e757600080fd5b86356123f281612095565b9550602087013561240281612095565b9450604087013593506124176060880161219b565b9250608087013567ffffffffffffffff81111561243357600080fd5b61243f89828a016120ba565b979a9699509497509295939492505050565b6000806040838503121561246457600080fd5b823561246f81612095565b9150602083013561247f81612095565b809150509250929050565b600080600080606085870312156124a057600080fd5b84356124ab81612095565b93506124b96020860161219b565b9250604085013567ffffffffffffffff8111156124d557600080fd5b6124e1878288016120ba565b95989497509550505050565b6000602082840312156124ff57600080fd5b8151611cfd81612095565b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061253f6060830184612371565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561258957612589612548565b500390565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152600061260d60608301848661258e565b9695505050505050565b83815260406020820152600061253f60408301848661258e565b60008451612643818460208901612345565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161267f816001850160208a01612345565b6001920191820152835161269a816002840160208801612345565b0160020195945050505050565b828152604060208201526000611c7b6040830184612371565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261260d6080830184612371565b73ffffffffffffffffffffffffffffffffffffffff8416815260606020820152600061272e6060830185612371565b905063ffffffff83166040830152949350505050565b6000821982111561275757612757612548565b500190565b600073ffffffffffffffffffffffffffffffffffffffff80891683528088166020840152808716604084015280861660608401525083608083015260c060a08301526127ab60c0830184612371565b98975050505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036127e8576127e8612548565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261282d5761282d6127ef565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612870576128706127ef565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156128b657600080fd5b81518015158114611cfd57600080fd5b600082516128d8818460208701612345
565b919091019291505056fea164736f6c634300080f000a"
,
Bin
:
"0x6101206040523480156200001257600080fd5b5060405162002
b8f38038062002b8f83398101604081905262000035916200006f565b7342000000000000000000000000000000000000076080526001600160a01b031660a052600160c081905260e052600061010052620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b60805160a05160c05160e05161010051612a4e620001416000396000610fd901526000610fb001526000610f870152600081816102280152818161030c0152818161050a015281816109ce015281816112cc015261160d015260008181610281015281816103a6015281816104e001528181610541015281816109a401528181610a0501528181610c920152818161128f01526115d10152612a4e6000f3fe6080604052600436106100ec5760003560e01c806354fd4d501161008a5780638f601f66116100595780638f601f661461034e578063927ede2d14610394578063a3a79548146103c8578063e11013dd146103db57600080fd5b806354fd4d50146102c5578063662a633a146102e75780637f46ddb2146102fa578063870876231461032e57600080fd5b806332b7006d116100c657806332b7006d1461020657806336c717c1146102195780633cb747bf14610272578063540abf73146102a557600080fd5b80630166a07a146101c057806309fc8843146101e05780631635f5fd146101f357600080fd5b366101bb57333b15610185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101b973deaddeaddeaddeaddeaddeaddeaddeaddead000033333462030d40604051806020016040528060008152506103ee565b005b600080fd5b3480156101cc57600080fd5b506101b96101db3660046122fb565b6104c8565b6101b96101ee3660046123ac565b6108b5565b6101b96102013660046123ff565b61098c565b6101b9610214366004612472565b610e61565b34801561022557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561027e57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610248565b3480156102b157600080fd5b506101b96102c03660046124c6565b610f3b565b3480156102d157600080fd5b506102da610f80565b60405161026991906125b3565b6101b96102f53660046122fb565b611023565b34801561030657600080fd5b506102487f000000000000000000000000000000000000000000000000000000000000000081565b34801561033a57600080fd5b506101b96103493660046125c6565b611091565b34801561035a57600080fd5b50610386610369366004612649565b600260209081526000928352604080842090915290825290205481565b604051908152602001610269565b3480156103a057600080fd5b506102487f000000000000000000000000000000000000000000000000000000000000000081565b6101b96103d63660046125c6565b611165565b6101b96103e9366004612682565b6111a9565b60008673ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa15801561043b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045f91906126e5565b90507fffffffffffffffffffffffff215221522152215221522152215221522153000073ffffffffffffffffffffffffffffffffffffffff8816016104b0576104ab86868686866111f2565b6104bf565b6104bf878288888888886113d6565b50505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156105e657507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ce91906126e5565b73ffffffffffffffffffffffffffffffffffffffff16145b610698576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b6106a18761171d565b156107ef576106b0878761177f565b610762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590528816906340c10f1990604401600060405180830381600087803b1580156107d257600080fd5b505af11580156107e6573d6000803e3d6000fd5b50505050610871565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a168352929052205461082d908490612731565b73ffffffffffffffffffffffffffffffffffffffff8089166000818152600260209081526040808320948c1683529390529190912091909155610871908585611826565b6104bf878787878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118fa92505050565b333b15610944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b6109873333348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506111f292505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610aaa57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9291906126e5565b73ffffffffffffffffffffffffffffffffffffffff16145b610b5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b823414610beb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e74207265717569726564000000000000606482015260840161017c565b3073ffffffffffffffffffffffffffffffffffffffff851603610c90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c660000000000000000000000000000000000000000000000000000000000606482015260840161017c565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610d6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f206d60448201527f657373656e676572000000000000000000000000000000000000000000000000606482015260840161017c565b610dad85858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061198892505050565b6000610dca855a8660405180602001604052806000815250611a29565b905080610e59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c65640000000000000000000000000000000000000000000000000000000000606482015260840161017c565b505050505050565b333b15610ef0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610f34853333878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103ee92505050565b5050505050565b6104bf87873388888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113d692505050565b6060610fab7f0000000000000000000000000000000000000000000000000000000000000000611a43565b610fd47f0000000000000000000000000000000000000000000000000000000000000000611a43565b610ffd7f0000000000000000000000000000000000000000000000000000000000000000611a43565b60405160200161100f93929190612748565b604051602081830303815290604052905090565b73ffffffffffffffffffffffffffffffffffffffff8716158015611070575073ffffffffffffffffffffffffffffffffffffffff861673deaddeaddeaddeaddeaddeaddeaddeaddead0000145b15611082576104ab858585858561098c565b6104bf868887878787876104c8565b333b15611120576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610e5986863333888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113d692505050565b610e59863387878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103ee92505050565b6111ec3385348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506111f292505050565b50505050565b823414611281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5374616e646172644272696467653a206272696467696e6720455448206d757360448201527f7420696e636c7564652073756666696369656e74204554482076616c75650000606482015260840161017c565b61128d85858584611b80565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b8989898860405160240161130a94939291906127be565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b909216825261139d92918890600401612807565b6000604051808303818588803b1580156113b657600080fd5b505af11580156113ca573d6000803e3d6000fd5b50505050505050505050565b6113df8761171d565b1561152d576113ee878761177f565b6114a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015260248201859052881690639dc29fac90604401600060405180830381600087803b15801561151057600080fd5b505af1158015611524573d6000803e3d6000fd5b505050506115c1565b61154f73ffffffffffffffffffffffffffffffffffffffff8816863086611c21565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a168352929052205461158d90849061284c565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b16835292905220555b6115cf878787878786611c7f565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b898b8a8a8a8960405160240161164f96959493929190612864565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b90921682526116e292918790600401612807565b600060405180830381600087803b1580156116fc57600080fd5b505af1158015611710573d6000803e3d6000fd5b5050505050505050505050565b6000611749827f1d1d8b6300000000000000000000000000000000000000000000000000000000611d0d565b806117795750611779827fec4fc8e300000000000000000000000000000000000000000000000000000000611d0d565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f091906126e5565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109879084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611d30565b8373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fb0444523268717a02698be47d0803aa7468c00acbed2f8bd93a0459cde61dd89868686604051611972939291906128bf565b60405180910390a4610e59868686868686611e3c565b8373ffffffffffffffffffffffffffffffffffffffff1673deaddeaddeaddeaddeaddeaddeaddeaddead000073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fb0444523268717a02698be47d0803aa7468c00acbed2f8bd93a0459cde61dd89868686604051611a15939291906128bf565b60405180910390a46111ec84848484611ec4565b600080600080845160208601878a8af19695505050505050565b606081600003611a8657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611ab05780611a9a816128fd565b9150611aa99050600a83612964565b9150611a8a565b60008167ffffffffffffffff811115611acb57611acb612978565b6040519080825280601f01601f191660200182016040528015611af5576020820181803683370190505b5090505b8415611b7857611b0a600183612731565b9150611b17600a866129a7565b611b2290603061284c565b60f81b818381518110611b3757611b376129bb565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b71600a86612964565b9450611af9565b949350505050565b8373ffffffffffffffffffffffffffffffffffffffff1673deaddeaddeaddeaddeaddeaddeaddeaddead000073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f73d170910aba9e6d50b102db522b1dbcd796216f5128b445aa2135272886497e868686604051611c0d939291906128bf565b60405180910390a46111ec84848484611f31565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526111ec9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611878565b8373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f73d170910aba9e6d50b102db522b1dbcd796216f5128b445aa2135272886497e868686604051611cf7939291906128bf565b60405180910390a4610e59868686868686611f90565b6000611d1883612008565b8015611d295750611d29838361206c565b9392505050565b6000611d92826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661213b9092919063ffffffff16565b8051909150156109875780806020019051810190611db091906129ea565b610987576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161017c565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd868686604051611eb4939291906128bf565b60405180910390a4505050505050565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d8484604051611f23929190612a0c565b60405180910390a350505050565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af58484604051611f23929190612a0c565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf868686604051611eb4939291906128bf565b6000612034827f01ffc9a70000000000000000000000000000000000000000000000000000000061206c565b80156117795750612065827fffffffff0000000000000000000000000000000000000000000000000000000061206c565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015612124575060208210155b80156121305750600081115b979650505050505050565b6060611b7884846000858573ffffffffffffffffffffffffffffffffffffffff85163b6121c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161017c565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516121ed9190612a25565b60006040518083038185875af1925050503d806000811461222a576040519150601f19603f3d011682016040523d82523d6000602084013e61222f565b606091505b509150915061213082828660608315612249575081611d29565b8251156122595782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017c91906125b3565b73ffffffffffffffffffffffffffffffffffffffff811681146122af57600080fd5b50565b60008083601f8401126122c457600080fd5b50813567ffffffffffffffff8111156122dc57600080fd5b6020830191508360208285010111156122f457600080fd5b9250929050565b600080600080600080600060c0888a03121561231657600080fd5b87356123218161228d565b965060208801356123318161228d565b955060408801356123418161228d565b945060608801356123518161228d565b93506080880135925060a088013567ffffffffffffffff81111561237457600080fd5b6123808a828b016122b2565b989b979a50959850939692959293505050565b803563ffffffff811681146123a757600080fd5b919050565b6000806000604084860312156123c157600080fd5b6123ca84612393565b9250602084013567ffffffffffffffff8111156123e657600080fd5b6123f2868287016122b2565b9497909650939450505050565b60008060008060006080868803121561241757600080fd5b85356124228161228d565b945060208601356124328161228d565b935060408601359250606086013567ffffffffffffffff81111561245557600080fd5b612461888289016122b2565b969995985093965092949392505050565b60008060008060006080868803121561248a57600080fd5b85356124958161228d565b9450602086013593506124aa60408701612393565b9250606086013567ffffffffffffffff81111561245557600080fd5b600080600080600080600060c0888a0312156124e157600080fd5b87356124ec8161228d565b965060208801356124fc8161228d565b9550604088013561250c8161228d565b94506060880135935061252160808901612393565b925060a088013567ffffffffffffffff81111561237457600080fd5b60005b83811015612558578181015183820152602001612540565b838111156111ec5750506000910152565b6000815180845261258181602086016020860161253d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611d296020830184612569565b60008060008060008060a087890312156125df57600080fd5b86356125ea8161228d565b955060208701356125fa8161228d565b94506040870135935061260f60608801612393565b9250608087013567ffffffffffffffff81111561262b57600080fd5b61263789828a016122b2565b979a9699509497509295939492505050565b6000806040838503121561265c57600080fd5b82356126678161228d565b915060208301356126778161228d565b809150509250929050565b6000806000806060858703121561269857600080fd5b84356126a38161228d565b93506126b160208601612393565b9250604085013567ffffffffffffffff8111156126cd57600080fd5b6126d9878288016122b2565b95989497509550505050565b6000602082840312156126f757600080fd5b8151611d298161228d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561274357612743612702565b500390565b6000845161275a81846020890161253d565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612796816001850160208a0161253d565b600192019182015283516127b181600284016020880161253d565b0160020195945050505050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526127fd6080830184612569565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff841681526060602082015260006128366060830185612569565b905063ffffffff83166040830152949350505050565b6000821982111561285f5761285f612702565b500190565b600073ffffffffffffffffffffffffffffffffffffffff80891683528088166020840152808716604084015280861660608401525083608083015260c060a08301526128b360c0830184612569565b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff841681528260208201526060604082015260006128f46060830184612569565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361292e5761292e612702565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261297357612973612935565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000826129b6576129b6612935565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156129fc57600080fd5b81518015158114611d2957600080fd5b828152604060208201526000611b786040830184612569565b60008251612a3781846020870161253d
565b919091019291505056fea164736f6c634300080f000a"
,
}
// L2StandardBridgeABI is the input ABI used to generate the binding from.
...
...
op-bindings/bindings/l2standardbridge_more.go
View file @
63ec5881
...
...
@@ -13,7 +13,7 @@ const L2StandardBridgeStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contr
var
L2StandardBridgeStorageLayout
=
new
(
solc
.
StorageLayout
)
var
L2StandardBridgeDeployedBin
=
"0x6080604052600436106100ec5760003560e01c806354fd4d501161008a5780638f601f66116100595780638f601f661461034e578063927ede2d14610394578063a3a79548146103c8578063e11013dd146103db57600080fd5b806354fd4d50146102c5578063662a633a146102e75780637f46ddb2146102fa578063870876231461032e57600080fd5b806332b7006d116100c657806332b7006d1461020657806336c717c1146102195780633cb747bf14610272578063540abf73146102a557600080fd5b80630166a07a146101c057806309fc8843146101e05780631635f5fd146101f357600080fd5b366101bb57333b15610185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101b973deaddeaddeaddeaddeaddeaddeaddeaddead000033333462030d40604051806020016040528060008152506103ee565b005b600080fd5b3480156101cc57600080fd5b506101b96101db366004612
103565b610548565b6101b96101ee3660046121b4565b61096b565b6101b9610201366004612207565b610a42565b6101b961021436600461227a565b610f3e565b34801561022557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561027e57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610248565b3480156102b157600080fd5b506101b96102c03660046122ce565b611018565b3480156102d157600080fd5b506102da611066565b60405161026991906123bb565b6101b96102f5366004612103565b611109565b34801561030657600080fd5b506102487f000000000000000000000000000000000000000000000000000000000000000081565b34801561033a57600080fd5b506101b96103493660046123ce565b6111f6565b34801561035a57600080fd5b50610386610369366004612451565b600260209081526000928352604080842090915290825290205481565b604051908152602001610269565b3480156103a057600080fd5b506102487f000000000000000000000000000000000000000000000000000000000000000081565b6101b96103d63660046123ce565b6112ca565b6101b96103e936600461248a565b61130e565b60008673ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa15801561043b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045f91906124ed565b90507fffffffffffffffffffffffff215221522152215221522152215221522153000073ffffffffffffffffffffffffffffffffffffffff8816016104b0576104ab8686868686611357565b6104bf565b6104bf87828888888888611596565b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f73d170910aba9e6d50b102db522b1dbcd796216f5128b445aa2135272886497e8888876040516105379392919061250a565b60405180910390a450505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561066657507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906124ed565b73ffffffffffffffffffffffffffffffffffffffff16145b610718576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b6107218761194f565b1561086f5761073087876119b1565b6107e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590528816906340c10f1990604401600060405180830381600087803b15801561085257600080fd5b505af1158015610866573d6000803e3d6000fd5b505050506108f1565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a16835292905220546108ad908490612577565b73ffffffffffffffffffffffffffffffffffffffff8089166000818152600260209081526040808320948c16835293905291909120919091556108f1908585611a58565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd8787878760405161053794939291906125d7565b333b156109fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610a3d3333348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061135792505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610b6057507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4891906124ed565b73ffffffffffffffffffffffffffffffffffffffff16145b610c12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b823414610ca1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e74207265717569726564000000000000606482015260840161017c565b3073ffffffffffffffffffffffffffffffffffffffff851603610d46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c660000000000000000000000000000000000000000000000000000000000606482015260840161017c565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610e21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f206d60448201527f657373656e676572000000000000000000000000000000000000000000000000606482015260840161017c565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d858585604051610e8293929190612617565b60405180910390a36000610ea7855a8660405180602001604052806000815250611b2c565b905080610f36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c65640000000000000000000000000000000000000000000000000000000000606482015260840161017c565b505050505050565b333b15610fcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b611011853333878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103ee92505050565b5050505050565b61105d87873388888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061159692505050565b50505050505050565b60606110917f0000000000000000000000000000000000000000000000000000000000000000611b46565b6110ba7f0000000000000000000000000000000000000000000000000000000000000000611b46565b6110e37f0000000000000000000000000000000000000000000000000000000000000000611b46565b6040516020016110f593929190612631565b604051602081830303815290604052905090565b73ffffffffffffffffffffffffffffffffffffffff8716158015611156575073ffffffffffffffffffffffffffffffffffffffff861673deaddeaddeaddeaddeaddeaddeaddeaddead0000145b1561116d576111688585858585610a42565b61117c565b61117c86888787878787610548565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fb0444523268717a02698be47d0803aa7468c00acbed2f8bd93a0459cde61dd898787878760405161053794939291906125d7565b333b15611285576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610f3686863333888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061159692505050565b610f36863387878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103ee92505050565b6113513385348686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061135792505050565b50505050565b8234146113e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5374616e646172644272696467653a206272696467696e6720455448206d757360448201527f7420696e636c7564652073756666696369656e74204554482076616c75650000606482015260840161017c565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af585846040516114459291906126a7565b60405180910390a37f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b898989886040516024016114ca94939291906126c0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b909216825261155d929188906004016126ff565b6000604051808303818588803b15801561157657600080fd5b505af115801561158a573d6000803e3d6000fd5b50505050505050505050565b61159f8761194f565b156116ed576115ae87876119b1565b611660576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015260248201859052881690639dc29fac90604401600060405180830381600087803b1580156116d057600080fd5b505af11580156116e4573d6000803e3d6000fd5b50505050611781565b61170f73ffffffffffffffffffffffffffffffffffffffff8816863086611c83565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a168352929052205461174d908490612744565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b16835292905220555b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf8787866040516117f99392919061250a565b60405180910390a47f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b898b8a8a8a896040516024016118819695949392919061275c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b9092168252611914929187906004016126ff565b600060405180830381600087803b15801561192e57600080fd5b505af1158015611942573d6000803e3d6000fd5b5050505050505050505050565b600061197b827f1d1d8b6300000000000000000000000000000000000000000000000000000000611ce1565b806119ab57506119ab827fec4fc8e300000000000000000000000000000000000000000000000000000000611ce1565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2291906124ed565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610a3d9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611d04565b600080600080845160208601878a8af19695505050505050565b606081600003611b8957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611bb35780611b9d816127b7565b9150611bac9050600a8361281e565b9150611b8d565b60008167ffffffffffffffff811115611bce57611bce612832565b6040519080825280601f01601f191660200182016040528015611bf8576020820181803683370190505b5090505b8415611c7b57611c0d600183612577565b9150611c1a600a86612861565b611c25906030612744565b60f81b818381518110611c3a57611c3a612875565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611c74600a8661281e565b9450611bfc565b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526113519085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611aaa565b6000611cec83611e10565b8015611cfd5750611cfd8383611e74565b9392505050565b6000611d66826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611f439092919063ffffffff16565b805190915015610a3d5780806020019051810190611d8491906128a4565b610a3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161017c565b6000611e3c827f01ffc9a700000000000000000000000000000000000000000000000000000000611e74565b80156119ab5750611e6d827fffffffff00000000000000000000000000000000000000000000000000000000611e74565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015611f2c575060208210155b8015611f385750600081115b979650505050505050565b6060611c7b84846000858573ffffffffffffffffffffffffffffffffffffffff85163b611fcc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161017c565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611ff591906128c6565b60006040518083038185875af1925050503d8060008114612032576040519150601f19603f3d011682016040523d82523d6000602084013e612037565b606091505b5091509150611f3882828660608315612051575081611cfd565b8251156120615782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017c91906123bb565b73ffffffffffffffffffffffffffffffffffffffff811681146120b757600080fd5b50565b60008083601f8401126120cc57600080fd5b50813567ffffffffffffffff8111156120e457600080fd5b6020830191508360208285010111156120fc57600080fd5b9250929050565b600080600080600080600060c0888a03121561211e57600080fd5b873561212981612095565b9650602088013561213981612095565b9550604088013561214981612095565b9450606088013561215981612095565b93506080880135925060a088013567ffffffffffffffff81111561217c57600080fd5b6121888a828b016120ba565b989b979a50959850939692959293505050565b803563ffffffff811681146121af57600080fd5b919050565b6000806000604084860312156121c957600080fd5b6121d28461219b565b9250602084013567ffffffffffffffff8111156121ee57600080fd5b6121fa868287016120ba565b9497909650939450505050565b60008060008060006080868803121561221f57600080fd5b853561222a81612095565b9450602086013561223a81612095565b935060408601359250606086013567ffffffffffffffff81111561225d57600080fd5b612269888289016120ba565b969995985093965092949392505050565b60008060008060006080868803121561229257600080fd5b853561229d81612095565b9450602086013593506122b26040870161219b565b9250606086013567ffffffffffffffff81111561225d57600080fd5b600080600080600080600060c0888a0312156122e957600080fd5b87356122f481612095565b9650602088013561230481612095565b9550604088013561231481612095565b9450606088013593506123296080890161219b565b925060a088013567ffffffffffffffff81111561217c57600080fd5b60005b83811015612360578181015183820152602001612348565b838111156113515750506000910152565b60008151808452612389816020860160208601612345565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611cfd6020830184612371565b60008060008060008060a087890312156123e757600080fd5b86356123f281612095565b9550602087013561240281612095565b9450604087013593506124176060880161219b565b9250608087013567ffffffffffffffff81111561243357600080fd5b61243f89828a016120ba565b979a9699509497509295939492505050565b6000806040838503121561246457600080fd5b823561246f81612095565b9150602083013561247f81612095565b809150509250929050565b600080600080606085870312156124a057600080fd5b84356124ab81612095565b93506124b96020860161219b565b9250604085013567ffffffffffffffff8111156124d557600080fd5b6124e1878288016120ba565b95989497509550505050565b6000602082840312156124ff57600080fd5b8151611cfd81612095565b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061253f6060830184612371565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561258957612589612548565b500390565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152600061260d60608301848661258e565b9695505050505050565b83815260406020820152600061253f60408301848661258e565b60008451612643818460208901612345565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161267f816001850160208a01612345565b6001920191820152835161269a816002840160208801612345565b0160020195945050505050565b828152604060208201526000611c7b6040830184612371565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261260d6080830184612371565b73ffffffffffffffffffffffffffffffffffffffff8416815260606020820152600061272e6060830185612371565b905063ffffffff83166040830152949350505050565b6000821982111561275757612757612548565b500190565b600073ffffffffffffffffffffffffffffffffffffffff80891683528088166020840152808716604084015280861660608401525083608083015260c060a08301526127ab60c0830184612371565b98975050505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036127e8576127e8612548565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261282d5761282d6127ef565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082612870576128706127ef565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156128b657600080fd5b81518015158114611cfd57600080fd5b600082516128d8818460208701612345
565b919091019291505056fea164736f6c634300080f000a"
var
L2StandardBridgeDeployedBin
=
"0x6080604052600436106100ec5760003560e01c806354fd4d501161008a5780638f601f66116100595780638f601f661461034e578063927ede2d14610394578063a3a79548146103c8578063e11013dd146103db57600080fd5b806354fd4d50146102c5578063662a633a146102e75780637f46ddb2146102fa578063870876231461032e57600080fd5b806332b7006d116100c657806332b7006d1461020657806336c717c1146102195780633cb747bf14610272578063540abf73146102a557600080fd5b80630166a07a146101c057806309fc8843146101e05780631635f5fd146101f357600080fd5b366101bb57333b15610185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f4100000000000000000060648201526084015b60405180910390fd5b6101b973deaddeaddeaddeaddeaddeaddeaddeaddead000033333462030d40604051806020016040528060008152506103ee565b005b600080fd5b3480156101cc57600080fd5b506101b96101db366004612
2fb565b6104c8565b6101b96101ee3660046123ac565b6108b5565b6101b96102013660046123ff565b61098c565b6101b9610214366004612472565b610e61565b34801561022557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561027e57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610248565b3480156102b157600080fd5b506101b96102c03660046124c6565b610f3b565b3480156102d157600080fd5b506102da610f80565b60405161026991906125b3565b6101b96102f53660046122fb565b611023565b34801561030657600080fd5b506102487f000000000000000000000000000000000000000000000000000000000000000081565b34801561033a57600080fd5b506101b96103493660046125c6565b611091565b34801561035a57600080fd5b50610386610369366004612649565b600260209081526000928352604080842090915290825290205481565b604051908152602001610269565b3480156103a057600080fd5b506102487f000000000000000000000000000000000000000000000000000000000000000081565b6101b96103d63660046125c6565b611165565b6101b96103e9366004612682565b6111a9565b60008673ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa15801561043b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045f91906126e5565b90507fffffffffffffffffffffffff215221522152215221522152215221522153000073ffffffffffffffffffffffffffffffffffffffff8816016104b0576104ab86868686866111f2565b6104bf565b6104bf878288888888886113d6565b50505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156105e657507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ce91906126e5565b73ffffffffffffffffffffffffffffffffffffffff16145b610698576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b6106a18761171d565b156107ef576106b0878761177f565b610762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590528816906340c10f1990604401600060405180830381600087803b1580156107d257600080fd5b505af11580156107e6573d6000803e3d6000fd5b50505050610871565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a168352929052205461082d908490612731565b73ffffffffffffffffffffffffffffffffffffffff8089166000818152600260209081526040808320948c1683529390529190912091909155610871908585611826565b6104bf878787878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118fa92505050565b333b15610944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b6109873333348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506111f292505050565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610aaa57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9291906126e5565b73ffffffffffffffffffffffffffffffffffffffff16145b610b5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20746865206f7468657220627269646760648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a40161017c565b823414610beb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5374616e646172644272696467653a20616d6f756e742073656e7420646f657360448201527f206e6f74206d6174636820616d6f756e74207265717569726564000000000000606482015260840161017c565b3073ffffffffffffffffffffffffffffffffffffffff851603610c90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f207360448201527f656c660000000000000000000000000000000000000000000000000000000000606482015260840161017c565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610d6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f5374616e646172644272696467653a2063616e6e6f742073656e6420746f206d60448201527f657373656e676572000000000000000000000000000000000000000000000000606482015260840161017c565b610dad85858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061198892505050565b6000610dca855a8660405180602001604052806000815250611a29565b905080610e59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5374616e646172644272696467653a20455448207472616e736665722066616960448201527f6c65640000000000000000000000000000000000000000000000000000000000606482015260840161017c565b505050505050565b333b15610ef0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610f34853333878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103ee92505050565b5050505050565b6104bf87873388888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113d692505050565b6060610fab7f0000000000000000000000000000000000000000000000000000000000000000611a43565b610fd47f0000000000000000000000000000000000000000000000000000000000000000611a43565b610ffd7f0000000000000000000000000000000000000000000000000000000000000000611a43565b60405160200161100f93929190612748565b604051602081830303815290604052905090565b73ffffffffffffffffffffffffffffffffffffffff8716158015611070575073ffffffffffffffffffffffffffffffffffffffff861673deaddeaddeaddeaddeaddeaddeaddeaddead0000145b15611082576104ab858585858561098c565b6104bf868887878787876104c8565b333b15611120576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f5374616e646172644272696467653a2066756e6374696f6e2063616e206f6e6c60448201527f792062652063616c6c65642066726f6d20616e20454f41000000000000000000606482015260840161017c565b610e5986863333888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113d692505050565b610e59863387878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103ee92505050565b6111ec3385348686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506111f292505050565b50505050565b823414611281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5374616e646172644272696467653a206272696467696e6720455448206d757360448201527f7420696e636c7564652073756666696369656e74204554482076616c75650000606482015260840161017c565b61128d85858584611b80565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b847f0000000000000000000000000000000000000000000000000000000000000000631635f5fd60e01b8989898860405160240161130a94939291906127be565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e086901b909216825261139d92918890600401612807565b6000604051808303818588803b1580156113b657600080fd5b505af11580156113ca573d6000803e3d6000fd5b50505050505050505050565b6113df8761171d565b1561152d576113ee878761177f565b6114a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f5374616e646172644272696467653a2077726f6e672072656d6f746520746f6b60448201527f656e20666f72204f7074696d69736d204d696e7461626c65204552433230206c60648201527f6f63616c20746f6b656e00000000000000000000000000000000000000000000608482015260a40161017c565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015260248201859052881690639dc29fac90604401600060405180830381600087803b15801561151057600080fd5b505af1158015611524573d6000803e3d6000fd5b505050506115c1565b61154f73ffffffffffffffffffffffffffffffffffffffff8816863086611c21565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260209081526040808320938a168352929052205461158d90849061284c565b73ffffffffffffffffffffffffffffffffffffffff8089166000908152600260209081526040808320938b16835292905220555b6115cf878787878786611c7f565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633dbb202b7f0000000000000000000000000000000000000000000000000000000000000000630166a07a60e01b898b8a8a8a8960405160240161164f96959493929190612864565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b90921682526116e292918790600401612807565b600060405180830381600087803b1580156116fc57600080fd5b505af1158015611710573d6000803e3d6000fd5b5050505050505050505050565b6000611749827f1d1d8b6300000000000000000000000000000000000000000000000000000000611d0d565b806117795750611779827fec4fc8e300000000000000000000000000000000000000000000000000000000611d0d565b92915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663c01e1bd66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f091906126e5565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109879084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611d30565b8373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fb0444523268717a02698be47d0803aa7468c00acbed2f8bd93a0459cde61dd89868686604051611972939291906128bf565b60405180910390a4610e59868686868686611e3c565b8373ffffffffffffffffffffffffffffffffffffffff1673deaddeaddeaddeaddeaddeaddeaddeaddead000073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fb0444523268717a02698be47d0803aa7468c00acbed2f8bd93a0459cde61dd89868686604051611a15939291906128bf565b60405180910390a46111ec84848484611ec4565b600080600080845160208601878a8af19695505050505050565b606081600003611a8657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611ab05780611a9a816128fd565b9150611aa99050600a83612964565b9150611a8a565b60008167ffffffffffffffff811115611acb57611acb612978565b6040519080825280601f01601f191660200182016040528015611af5576020820181803683370190505b5090505b8415611b7857611b0a600183612731565b9150611b17600a866129a7565b611b2290603061284c565b60f81b818381518110611b3757611b376129bb565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b71600a86612964565b9450611af9565b949350505050565b8373ffffffffffffffffffffffffffffffffffffffff1673deaddeaddeaddeaddeaddeaddeaddeaddead000073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f73d170910aba9e6d50b102db522b1dbcd796216f5128b445aa2135272886497e868686604051611c0d939291906128bf565b60405180910390a46111ec84848484611f31565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526111ec9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611878565b8373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f73d170910aba9e6d50b102db522b1dbcd796216f5128b445aa2135272886497e868686604051611cf7939291906128bf565b60405180910390a4610e59868686868686611f90565b6000611d1883612008565b8015611d295750611d29838361206c565b9392505050565b6000611d92826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661213b9092919063ffffffff16565b8051909150156109875780806020019051810190611db091906129ea565b610987576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161017c565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fd59c65b35445225835c83f50b6ede06a7be047d22e357073e250d9af537518cd868686604051611eb4939291906128bf565b60405180910390a4505050505050565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f31b2166ff604fc5672ea5df08a78081d2bc6d746cadce880747f3643d819e83d8484604051611f23929190612a0c565b60405180910390a350505050565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f2849b43074093a05396b6f2a937dee8565b15a48a7b3d4bffb732a5017380af58484604051611f23929190612a0c565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f7ff126db8024424bbfd9826e8ab82ff59136289ea440b04b39a0df1b03b9cabf868686604051611eb4939291906128bf565b6000612034827f01ffc9a70000000000000000000000000000000000000000000000000000000061206c565b80156117795750612065827fffffffff0000000000000000000000000000000000000000000000000000000061206c565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015612124575060208210155b80156121305750600081115b979650505050505050565b6060611b7884846000858573ffffffffffffffffffffffffffffffffffffffff85163b6121c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161017c565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516121ed9190612a25565b60006040518083038185875af1925050503d806000811461222a576040519150601f19603f3d011682016040523d82523d6000602084013e61222f565b606091505b509150915061213082828660608315612249575081611d29565b8251156122595782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017c91906125b3565b73ffffffffffffffffffffffffffffffffffffffff811681146122af57600080fd5b50565b60008083601f8401126122c457600080fd5b50813567ffffffffffffffff8111156122dc57600080fd5b6020830191508360208285010111156122f457600080fd5b9250929050565b600080600080600080600060c0888a03121561231657600080fd5b87356123218161228d565b965060208801356123318161228d565b955060408801356123418161228d565b945060608801356123518161228d565b93506080880135925060a088013567ffffffffffffffff81111561237457600080fd5b6123808a828b016122b2565b989b979a50959850939692959293505050565b803563ffffffff811681146123a757600080fd5b919050565b6000806000604084860312156123c157600080fd5b6123ca84612393565b9250602084013567ffffffffffffffff8111156123e657600080fd5b6123f2868287016122b2565b9497909650939450505050565b60008060008060006080868803121561241757600080fd5b85356124228161228d565b945060208601356124328161228d565b935060408601359250606086013567ffffffffffffffff81111561245557600080fd5b612461888289016122b2565b969995985093965092949392505050565b60008060008060006080868803121561248a57600080fd5b85356124958161228d565b9450602086013593506124aa60408701612393565b9250606086013567ffffffffffffffff81111561245557600080fd5b600080600080600080600060c0888a0312156124e157600080fd5b87356124ec8161228d565b965060208801356124fc8161228d565b9550604088013561250c8161228d565b94506060880135935061252160808901612393565b925060a088013567ffffffffffffffff81111561237457600080fd5b60005b83811015612558578181015183820152602001612540565b838111156111ec5750506000910152565b6000815180845261258181602086016020860161253d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611d296020830184612569565b60008060008060008060a087890312156125df57600080fd5b86356125ea8161228d565b955060208701356125fa8161228d565b94506040870135935061260f60608801612393565b9250608087013567ffffffffffffffff81111561262b57600080fd5b61263789828a016122b2565b979a9699509497509295939492505050565b6000806040838503121561265c57600080fd5b82356126678161228d565b915060208301356126778161228d565b809150509250929050565b6000806000806060858703121561269857600080fd5b84356126a38161228d565b93506126b160208601612393565b9250604085013567ffffffffffffffff8111156126cd57600080fd5b6126d9878288016122b2565b95989497509550505050565b6000602082840312156126f757600080fd5b8151611d298161228d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561274357612743612702565b500390565b6000845161275a81846020890161253d565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612796816001850160208a0161253d565b600192019182015283516127b181600284016020880161253d565b0160020195945050505050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526127fd6080830184612569565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff841681526060602082015260006128366060830185612569565b905063ffffffff83166040830152949350505050565b6000821982111561285f5761285f612702565b500190565b600073ffffffffffffffffffffffffffffffffffffffff80891683528088166020840152808716604084015280861660608401525083608083015260c060a08301526128b360c0830184612569565b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff841681528260208201526060604082015260006128f46060830184612569565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361292e5761292e612702565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261297357612973612935565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000826129b6576129b6612935565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156129fc57600080fd5b81518015158114611d2957600080fd5b828152604060208201526000611b786040830184612569565b60008251612a3781846020870161253d
565b919091019291505056fea164736f6c634300080f000a"
func
init
()
{
if
err
:=
json
.
Unmarshal
([]
byte
(
L2StandardBridgeStorageLayoutJSON
),
L2StandardBridgeStorageLayout
);
err
!=
nil
{
...
...
op-heartbeat/whitelists.go
View file @
63ec5881
...
...
@@ -10,4 +10,11 @@ var AllowedVersions = map[string]bool{
""
:
true
,
"v0.1.0-beta.1"
:
true
,
"v0.1.0-goerli-rehearsal.1"
:
true
,
"v0.10.9"
:
true
,
"v0.10.10"
:
true
,
"v0.10.11"
:
true
,
"v0.10.12"
:
true
,
"v0.10.13"
:
true
,
"v0.10.14"
:
true
,
"v0.11.0"
:
true
,
}
op-node/eth/account_proof.go
View file @
63ec5881
...
...
@@ -15,7 +15,7 @@ import (
type
StorageProofEntry
struct
{
Key
common
.
Hash
`json:"key"`
Value
hexutil
.
B
ytes
`json:"value"`
Value
hexutil
.
B
ig
`json:"value"`
Proof
[]
hexutil
.
Bytes
`json:"proof"`
}
...
...
op-node/rollup/derive/channel_in_reader.go
View file @
63ec5881
...
...
@@ -13,7 +13,7 @@ import (
// Channel In Reader reads a batch from the channel
// This does decompression and limits the max RLP size
// This is a pure function from the channel, but each channel (or channel fragment)
// must be tagged with an L1 inclusion block to be passed to the
the
batch queue.
// must be tagged with an L1 inclusion block to be passed to the batch queue.
type
ChannelInReader
struct
{
log
log
.
Logger
...
...
op-node/sources/eth_client.go
View file @
63ec5881
...
...
@@ -359,7 +359,8 @@ func (s *EthClient) ReadStorageAt(ctx context.Context, address common.Address, s
if
err
:=
result
.
Verify
(
block
.
Root
());
err
!=
nil
{
return
common
.
Hash
{},
fmt
.
Errorf
(
"failed to verify retrieved proof against state root: %w"
,
err
)
}
return
common
.
BytesToHash
(
result
.
StorageProof
[
0
]
.
Value
),
nil
value
:=
result
.
StorageProof
[
0
]
.
Value
.
ToInt
()
return
common
.
BytesToHash
(
value
.
Bytes
()),
nil
}
func
(
s
*
EthClient
)
Close
()
{
...
...
ops/docker/Dockerfile.packages
View file @
63ec5881
...
...
@@ -46,7 +46,7 @@ COPY packages/hardhat-deploy-config/package.json ./packages/hardhat-deploy-confi
COPY packages/message-relayer/package.json ./packages/message-relayer/package.json
COPY packages/fault-detector/package.json ./packages/fault-detector/package.json
COPY packages/replica-healthcheck/package.json ./packages/replica-healthcheck/package.json
COPY packages/
drippie-mon/package.json ./packages/drippie
-mon/package.json
COPY packages/
chain-mon/package.json ./packages/chain
-mon/package.json
COPY packages/balance-monitor/package.json ./packages/balance-monitor/package.json
COPY packages/two-step-monitor/package.json ./packages/two-step-monitor/package.json
COPY integration-tests/package.json ./integration-tests/package.json
...
...
@@ -106,8 +106,8 @@ WORKDIR /opt/optimism/packages/replica-healthcheck
ENTRYPOINT ["npm", "run", "start"]
FROM base as drippie-mon
WORKDIR /opt/optimism/packages/
drippie
-mon
ENTRYPOINT ["npm", "run", "start"]
WORKDIR /opt/optimism/packages/
chain
-mon
ENTRYPOINT ["npm", "run", "start
:drippie-mon
"]
FROM base as balance-monitor
WORKDIR /opt/optimism/packages/balance-monitor
...
...
packages/
drippie
-mon/.depcheckrc
→
packages/
chain
-mon/.depcheckrc
View file @
63ec5881
File moved
packages/
drippie
-mon/.env.example
→
packages/
chain
-mon/.env.example
View file @
63ec5881
###############################################################################
# ↓ drippie-mon ↓ #
###############################################################################
# RPC pointing to network where Drippie is deployed
DRIPPIE_MON__RPC=
...
...
packages/
drippie
-mon/.eslintrc.js
→
packages/
chain
-mon/.eslintrc.js
View file @
63ec5881
File moved
packages/
drippie
-mon/.lintstagedrc.yml
→
packages/
chain
-mon/.lintstagedrc.yml
View file @
63ec5881
File moved
packages/
drippie
-mon/.prettierrc.js
→
packages/
chain
-mon/.prettierrc.js
View file @
63ec5881
File moved
packages/
drippie
-mon/CHANGELOG.md
→
packages/
chain
-mon/CHANGELOG.md
View file @
63ec5881
File moved
packages/
drippie
-mon/LICENSE
→
packages/
chain
-mon/LICENSE
View file @
63ec5881
File moved
packages/
drippie
-mon/README.md
→
packages/
chain
-mon/README.md
View file @
63ec5881
# @eth-optimism/
drippie
-mon
# @eth-optimism/
chain
-mon
[

](https://codecov.io/gh/ethereum-optimism/optimism)
[

](https://codecov.io/gh/ethereum-optimism/optimism)
`
drippie-mon`
is a simple service for monitoring Drippie contract
s.
`
chain-mon`
is a collection of chain monitoring service
s.
## Installation
...
...
@@ -14,11 +14,17 @@ yarn install
yarn build
```
## Running
the
service
## Running
a
service
Copy
`.env.example`
into a new file named
`.env`
, then set the environment variables listed there.
Copy
`.env.example`
into a new file named
`.env`
, then set the environment variables listed there
depending on the service you want to run
.
Once your environment variables have been set, run via:
```
yarn start
yarn start:<service name>
```
For example, to run
`drippie-mon`
, execute:
```
yarn start:drippie-mon
```
packages/
drippie
-mon/package.json
→
packages/
chain
-mon/package.json
View file @
63ec5881
{
"private"
:
true
,
"name"
:
"@eth-optimism/
drippie
-mon"
,
"version"
:
"0.
4.3
"
,
"description"
:
"[Optimism]
Service for monitoring Drippie instan
ces"
,
"name"
:
"@eth-optimism/
chain
-mon"
,
"version"
:
"0.
1.0
"
,
"description"
:
"[Optimism]
Chain monitoring servi
ces"
,
"main"
:
"dist/index"
,
"types"
:
"dist/index"
,
"files"
:
[
"dist/*"
],
"scripts"
:
{
"start
"
:
"ts-node ./src
/service.ts"
,
"start
:drippie-mon"
:
"ts-node ./src/drippie-mon
/service.ts"
,
"test:coverage"
:
"echo 'No tests defined.'"
,
"build"
:
"tsc -p ./tsconfig.json"
,
"clean"
:
"rimraf dist/ ./tsconfig.tsbuildinfo"
,
...
...
@@ -21,10 +21,9 @@
"keywords"
:
[
"optimism"
,
"ethereum"
,
"drippie"
,
"monitoring"
],
"homepage"
:
"https://github.com/ethereum-optimism/optimism/tree/develop/packages/
drippie
-mon#readme"
,
"homepage"
:
"https://github.com/ethereum-optimism/optimism/tree/develop/packages/
chain
-mon#readme"
,
"license"
:
"MIT"
,
"author"
:
"Optimism PBC"
,
"repository"
:
{
...
...
packages/
drippie-mon/src
/service.ts
→
packages/
chain-mon/src/drippie-mon
/service.ts
View file @
63ec5881
...
...
@@ -9,7 +9,7 @@ import { Provider } from '@ethersproject/abstract-provider'
import
{
ethers
}
from
'
ethers
'
import
*
as
DrippieArtifact
from
'
@eth-optimism/contracts-periphery/artifacts/contracts/universal/drippie/Drippie.sol/Drippie.json
'
import
{
version
}
from
'
../package.json
'
import
{
version
}
from
'
../
../
package.json
'
type
DrippieMonOptions
=
{
rpc
:
Provider
...
...
packages/chain-mon/src/index.ts
0 → 100644
View file @
63ec5881
export
*
from
'
./drippie-mon/service
'
packages/
drippie
-mon/tsconfig.json
→
packages/
chain
-mon/tsconfig.json
View file @
63ec5881
File moved
packages/contracts-bedrock/.gas-snapshot
View file @
63ec5881
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 261344)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_1() (gas: 75851)
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_0() (gas: 3482
07
)
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 112
639
)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 348
229
)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 112
660
)
GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 40
502
)
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_0() (gas: 3482
96
)
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 112
728
)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 348
318
)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 112
749
)
GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 40
853
)
GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 88513)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 74998)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 36156)
GasBenchMark_OptimismPortal:test_proveWithdrawalTransaction_benchmark() (gas: 167187)
Bytes_
Test:test_slice_acrossMultipleWords_works() (gas: 9391
)
Bytes_
Test:test_slice_acrossWords_works() (gas: 1397
)
Bytes_
Test:test_slice_fromNonZeroIdx_works() (gas: 17218
)
Bytes_
Test:test_slice_fromZeroIdx_works() (gas: 20826
)
Bytes_
Test:test_toNibbles_expectedResult128Bytes_works() (gas: 129885
)
Bytes_
Test:test_toNibbles_expectedResult5Bytes_works() (gas: 6132
)
Bytes_
Test:test_toNibbles_zeroLengthInput_works() (gas: 966
)
Bytes_
slice_Test:test_slice_acrossMultipleWords_works() (gas: 9357
)
Bytes_
slice_Test:test_slice_acrossWords_works() (gas: 1396
)
Bytes_
slice_Test:test_slice_fromNonZeroIdx_works() (gas: 17154
)
Bytes_
slice_Test:test_slice_fromZeroIdx_works() (gas: 20671
)
Bytes_
toNibbles_Test:test_toNibbles_expectedResult128Bytes_works() (gas: 129830
)
Bytes_
toNibbles_Test:test_toNibbles_expectedResult5Bytes_works() (gas: 6088
)
Bytes_
toNibbles_Test:test_toNibbles_zeroLengthInput_works() (gas: 944
)
CrossDomainMessenger_BaseGas_Test:test_baseGas_succeeds() (gas: 20120)
CrossDomainOwnableThroughPortal_Test:test_depositTransaction_crossDomainOwner_succeeds() (gas: 61882)
CrossDomainOwnable_Test:test_onlyOwner_notOwner_reverts() (gas: 10530)
...
...
@@ -92,23 +92,25 @@ L1ERC721Bridge_Test:test_finalizeBridgeERC721_notFromRemoteMessenger_reverts() (
L1ERC721Bridge_Test:test_finalizeBridgeERC721_notViaLocalMessenger_reverts() (gas: 16093)
L1ERC721Bridge_Test:test_finalizeBridgeERC721_selfToken_reverts() (gas: 17593)
L1ERC721Bridge_Test:test_finalizeBridgeERC721_succeeds() (gas: 323814)
L1StandardBridge_DepositERC20To_Test:test_depositERC20To_succeeds() (gas: 624908)
L1StandardBridge_DepositERC20_Test:test_depositERC20_succeeds() (gas: 622587)
L1StandardBridge_BridgeETHTo_Test:test_bridgeETHTo_succeeds() (gas: 419609)
L1StandardBridge_BridgeETH_Test:test_bridgeETH_succeeds() (gas: 406785)
L1StandardBridge_DepositERC20To_Test:test_depositERC20To_succeeds() (gas: 625056)
L1StandardBridge_DepositERC20_Test:test_depositERC20_succeeds() (gas: 622735)
L1StandardBridge_DepositERC20_TestFail:test_depositERC20_notEoa_reverts() (gas: 22320)
L1StandardBridge_DepositETHTo_Test:test_depositETHTo_succeeds() (gas:
359219
)
L1StandardBridge_DepositETH_Test:test_depositETH_succeeds() (gas: 40
5236
)
L1StandardBridge_DepositETHTo_Test:test_depositETHTo_succeeds() (gas:
419642
)
L1StandardBridge_DepositETH_Test:test_depositETH_succeeds() (gas: 40
6880
)
L1StandardBridge_DepositETH_TestFail:test_depositETH_notEoa_reverts() (gas: 40780)
L1StandardBridge_FinalizeBridgeETH_Test:test_finalizeBridgeETH_succeeds() (gas:
48788
)
L1StandardBridge_FinalizeBridgeETH_Test:test_finalizeBridgeETH_succeeds() (gas:
51674
)
L1StandardBridge_FinalizeBridgeETH_TestFail:test_finalizeBridgeETH_incorrectValue_reverts() (gas: 34207)
L1StandardBridge_FinalizeBridgeETH_TestFail:test_finalizeBridgeETH_sendToMessenger_reverts() (gas: 34288)
L1StandardBridge_FinalizeBridgeETH_TestFail:test_finalizeBridgeETH_sendToSelf_reverts() (gas: 34257)
L1StandardBridge_FinalizeERC20Withdrawal_Test:test_finalizeERC20Withdrawal_succeeds() (gas: 496
088
)
L1StandardBridge_FinalizeERC20Withdrawal_Test:test_finalizeERC20Withdrawal_succeeds() (gas: 496
417
)
L1StandardBridge_FinalizeERC20Withdrawal_TestFail:test_finalizeERC20Withdrawal_notMessenger_reverts() (gas: 31148)
L1StandardBridge_FinalizeERC20Withdrawal_TestFail:test_finalizeERC20Withdrawal_notOtherBridge_reverts() (gas: 31504)
L1StandardBridge_FinalizeETHWithdrawal_Test:test_finalizeETHWithdrawal_succeeds() (gas: 6
1815
)
L1StandardBridge_FinalizeETHWithdrawal_Test:test_finalizeETHWithdrawal_succeeds() (gas: 6
2166
)
L1StandardBridge_Getter_Test:test_getters_succeeds() (gas: 32151)
L1StandardBridge_Initialize_Test:test_initialize_succeeds() (gas: 22005)
L1StandardBridge_Receive_Test:test_receive_succeeds() (gas: 520
249
)
L1StandardBridge_Receive_Test:test_receive_succeeds() (gas: 520
338
)
L2CrossDomainMessenger_Test:test_messageVersion_succeeds() (gas: 8389)
L2CrossDomainMessenger_Test:test_pause_notOwner_reverts() (gas: 10837)
L2CrossDomainMessenger_Test:test_pause_succeeds() (gas: 31846)
...
...
@@ -164,18 +166,20 @@ L2OutputOracleUpgradeable_Test:test_initValuesOnProxy_succeeds() (gas: 26093)
L2OutputOracleUpgradeable_Test:test_initializeImpl_alreadyInitialized_reverts() (gas: 15149)
L2OutputOracleUpgradeable_Test:test_initializeProxy_alreadyInitialized_reverts() (gas: 20131)
L2OutputOracleUpgradeable_Test:test_upgrading_succeeds() (gas: 180413)
L2StandardBridge_FinalizeBridgeETH_Test:test_finalizeBridgeETH_succeeds() (gas: 36076)
L2StandardBridge_Test:test_finalizeBridgeETH_incorrectValue_reverts() (gas: 23865)
L2StandardBridge_Test:test_finalizeBridgeETH_sendToMessenger_reverts() (gas: 23960)
L2StandardBridge_Test:test_finalizeBridgeETH_sendToSelf_reverts() (gas: 23826)
L2StandardBridge_Test:test_finalizeDeposit_depositingERC20_succeeds() (gas: 90619)
L2StandardBridge_Test:test_finalizeDeposit_depositingETH_succeeds() (gas: 89451)
L2StandardBridge_Test:test_initialize_succeeds() (gas: 24270)
L2StandardBridge_Test:test_receive_succeeds() (gas: 177206)
L2StandardBridge_Test:test_withdrawTo_withdrawingERC20_succeeds() (gas: 386492)
L2StandardBridge_Test:test_withdraw_insufficientValue_reverts() (gas: 19649)
L2StandardBridge_Test:test_withdraw_notEOA_reverts() (gas: 251799)
L2StandardBridge_Test:test_withdraw_withdrawingERC20_succeeds() (gas: 384536)
L2StandardBridge_BridgeERC20To_Test:test_bridgeERC20To_succeeds() (gas: 387969)
L2StandardBridge_BridgeERC20To_Test:test_withdrawTo_withdrawingERC20_succeeds() (gas: 388200)
L2StandardBridge_BridgeERC20_Test:test_bridgeERC20_succeeds() (gas: 383692)
L2StandardBridge_BridgeERC20_Test:test_withdraw_notEOA_reverts() (gas: 251790)
L2StandardBridge_BridgeERC20_Test:test_withdraw_withdrawingERC20_succeeds() (gas: 383877)
L2StandardBridge_Bridge_Test:test_finalizeBridgeETH_incorrectValue_reverts() (gas: 23798)
L2StandardBridge_Bridge_Test:test_finalizeBridgeETH_sendToMessenger_reverts() (gas: 23960)
L2StandardBridge_Bridge_Test:test_finalizeBridgeETH_sendToSelf_reverts() (gas: 23848)
L2StandardBridge_Bridge_Test:test_finalizeDeposit_depositingERC20_succeeds() (gas: 90989)
L2StandardBridge_Bridge_Test:test_finalizeDeposit_depositingETH_succeeds() (gas: 89821)
L2StandardBridge_FinalizeBridgeETH_Test:test_finalizeBridgeETH_succeeds() (gas: 43155)
L2StandardBridge_Test:test_initialize_succeeds() (gas: 24247)
L2StandardBridge_Test:test_receive_succeeds() (gas: 177145)
L2StandardBridge_Test:test_withdraw_insufficientValue_reverts() (gas: 19615)
L2ToL1MessagePasserTest:test_burn_succeeds() (gas: 112572)
L2ToL1MessagePasserTest:test_initiateWithdrawal_fromContract_succeeds() (gas: 70423)
L2ToL1MessagePasserTest:test_initiateWithdrawal_fromEOA_succeeds() (gas: 75874)
...
...
@@ -385,7 +389,7 @@ SequencerFeeVault_Test:test_constructor_succeeds() (gas: 5504)
SequencerFeeVault_Test:test_minWithdrawalAmount_succeeds() (gas: 5420)
SequencerFeeVault_Test:test_receive_succeeds() (gas: 17336)
SequencerFeeVault_Test:test_withdraw_notEnough_reverts() (gas: 9309)
SequencerFeeVault_Test:test_withdraw_succeeds() (gas: 1
59816
)
SequencerFeeVault_Test:test_withdraw_succeeds() (gas: 1
63169
)
SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 61966)
SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 10545)
SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 10532)
...
...
packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol
View file @
63ec5881
...
...
@@ -126,7 +126,6 @@ contract L1StandardBridge is StandardBridge, Semver {
uint256 _amount,
bytes calldata _extraData
) external onlyOtherBridge {
emit ERC20WithdrawalFinalized(_l1Token, _l2Token, _from, _to, _amount, _extraData);
finalizeBridgeERC20(_l1Token, _l2Token, _from, _to, _amount, _extraData);
}
...
...
@@ -242,7 +241,6 @@ contract L1StandardBridge is StandardBridge, Semver {
uint256 _amount,
bytes calldata _extraData
) external payable onlyOtherBridge {
emit ETHWithdrawalFinalized(_from, _to, _amount, _extraData);
finalizeBridgeETH(_from, _to, _amount, _extraData);
}
...
...
@@ -270,7 +268,6 @@ contract L1StandardBridge is StandardBridge, Semver {
uint32 _minGasLimit,
bytes memory _extraData
) internal {
emit ETHDepositInitiated(_from, _to, msg.value, _extraData);
_initiateBridgeETH(_from, _to, msg.value, _minGasLimit, _extraData);
}
...
...
@@ -294,7 +291,74 @@ contract L1StandardBridge is StandardBridge, Semver {
uint32 _minGasLimit,
bytes memory _extraData
) internal {
emit ERC20DepositInitiated(_l1Token, _l2Token, _from, _to, _amount, _extraData);
_initiateBridgeERC20(_l1Token, _l2Token, _from, _to, _amount, _minGasLimit, _extraData);
}
/**
* @notice Emits the legacy ETHDepositInitiated event followed by the ETHBridgeInitiated event.
* This is necessary for backwards compatibility with the legacy bridge.
*
* @inheritdoc StandardBridge
*/
function _emitETHBridgeInitiated(
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal override {
emit ETHDepositInitiated(_from, _to, _amount, _extraData);
super._emitETHBridgeInitiated(_from, _to, _amount, _extraData);
}
/**
* @notice Emits the legacy ETHWithdrawalFinalized event followed by the ETHBridgeFinalized
* event. This is necessary for backwards compatibility with the legacy bridge.
*
* @inheritdoc StandardBridge
*/
function _emitETHBridgeFinalized(
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal override {
emit ETHWithdrawalFinalized(_from, _to, _amount, _extraData);
super._emitETHBridgeFinalized(_from, _to, _amount, _extraData);
}
/**
* @notice Emits the legacy ERC20DepositInitiated event followed by the ERC20BridgeInitiated
* event. This is necessary for backwards compatibility with the legacy bridge.
*
* @inheritdoc StandardBridge
*/
function _emitERC20BridgeInitiated(
address _localToken,
address _remoteToken,
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal override {
emit ERC20DepositInitiated(_localToken, _remoteToken, _from, _to, _amount, _extraData);
super._emitERC20BridgeInitiated(_localToken, _remoteToken, _from, _to, _amount, _extraData);
}
/**
* @notice Emits the legacy ERC20WithdrawalFinalized event followed by the ERC20BridgeFinalized
* event. This is necessary for backwards compatibility with the legacy bridge.
*
* @inheritdoc StandardBridge
*/
function _emitERC20BridgeFinalized(
address _localToken,
address _remoteToken,
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal override {
emit ERC20WithdrawalFinalized(_localToken, _remoteToken, _from, _to, _amount, _extraData);
super._emitERC20BridgeFinalized(_localToken, _remoteToken, _from, _to, _amount, _extraData);
}
}
packages/contracts-bedrock/contracts/L2/L2StandardBridge.sol
View file @
63ec5881
...
...
@@ -148,8 +148,6 @@ contract L2StandardBridge is StandardBridge, Semver {
} else {
finalizeBridgeERC20(_l2Token, _l1Token, _from, _to, _amount, _extraData);
}
emit DepositFinalized(_l1Token, _l2Token, _from, _to, _amount, _extraData);
}
/**
...
...
@@ -187,7 +185,87 @@ contract L2StandardBridge is StandardBridge, Semver {
} else {
_initiateBridgeERC20(_l2Token, l1Token, _from, _to, _amount, _minGasLimit, _extraData);
}
}
/**
* @notice Emits the legacy WithdrawalInitiated event followed by the ETHBridgeInitiated event.
* This is necessary for backwards compatibility with the legacy bridge.
*
* @inheritdoc StandardBridge
*/
function _emitETHBridgeInitiated(
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal override {
emit WithdrawalInitiated(
address(0),
Predeploys.LEGACY_ERC20_ETH,
_from,
_to,
_amount,
_extraData
);
super._emitETHBridgeInitiated(_from, _to, _amount, _extraData);
}
/**
* @notice Emits the legacy DepositFinalized event followed by the ETHBridgeFinalized event.
* This is necessary for backwards compatibility with the legacy bridge.
*
* @inheritdoc StandardBridge
*/
function _emitETHBridgeFinalized(
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal override {
emit DepositFinalized(
address(0),
Predeploys.LEGACY_ERC20_ETH,
_from,
_to,
_amount,
_extraData
);
super._emitETHBridgeFinalized(_from, _to, _amount, _extraData);
}
/**
* @notice Emits the legacy WithdrawalInitiated event followed by the ERC20BridgeInitiated
* event. This is necessary for backwards compatibility with the legacy bridge.
*
* @inheritdoc StandardBridge
*/
function _emitERC20BridgeInitiated(
address _localToken,
address _remoteToken,
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal override {
emit WithdrawalInitiated(_remoteToken, _localToken, _from, _to, _amount, _extraData);
super._emitERC20BridgeInitiated(_localToken, _remoteToken, _from, _to, _amount, _extraData);
}
emit WithdrawalInitiated(l1Token, _l2Token, _from, _to, _amount, _extraData);
/**
* @notice Emits the legacy DepositFinalized event followed by the ERC20BridgeFinalized event.
* This is necessary for backwards compatibility with the legacy bridge.
*
* @inheritdoc StandardBridge
*/
function _emitERC20BridgeFinalized(
address _localToken,
address _remoteToken,
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal override {
emit DepositFinalized(_remoteToken, _localToken, _from, _to, _amount, _extraData);
super._emitERC20BridgeFinalized(_localToken, _remoteToken, _from, _to, _amount, _extraData);
}
}
packages/contracts-bedrock/contracts/test/AddressAliasHelper.t.sol
View file @
63ec5881
...
...
@@ -4,7 +4,10 @@ pragma solidity 0.8.15;
import { Test } from "forge-std/Test.sol";
import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol";
contract AddressAliasHelper_Test is Test {
contract AddressAliasHelper_applyAndUndo_Test is Test {
/**
* @notice Tests that applying and then undoing an alias results in the original address.
*/
function testFuzz_applyAndUndo_succeeds(address _address) external {
address aliased = AddressAliasHelper.applyL1ToL2Alias(_address);
address unaliased = AddressAliasHelper.undoL1ToL2Alias(aliased);
...
...
packages/contracts-bedrock/contracts/test/Bytes.t.sol
View file @
63ec5881
...
...
@@ -3,10 +3,10 @@ pragma solidity 0.8.15;
import { Test } from "forge-std/Test.sol";
import { Bytes } from "../libraries/Bytes.sol";
/// @title BytesTest
contract Bytes_Test is Test {
/// @dev Tests that the `slice` function works as expected when starting from
/// index 0.
contract Bytes_slice_Test is Test {
/**
* @notice Tests that the `slice` function works as expected when starting from index 0.
*/
function test_slice_fromZeroIdx_works() public {
bytes memory input = hex"11223344556677889900";
...
...
@@ -24,8 +24,10 @@ contract Bytes_Test is Test {
assertEq(Bytes.slice(input, 0, 10), hex"11223344556677889900");
}
/// @dev Tests that the `slice` function works as expected when starting from
/// indexes [1, 9] with lengths [1, 9], in reverse order.
/**
* @notice Tests that the `slice` function works as expected when starting from indices [1, 9]
* with lengths [1, 9], in reverse order.
*/
function test_slice_fromNonZeroIdx_works() public {
bytes memory input = hex"11223344556677889900";
...
...
@@ -42,10 +44,11 @@ contract Bytes_Test is Test {
assertEq(Bytes.slice(input, 1, 9), hex"223344556677889900");
}
/// @dev Tests that the `slice` function works as expected when slicing between
/// multiple words in memory. In this case, we test that a 2 byte slice between
/// the 32nd byte of the first word and the 1st byte of the second word is
/// correct.
/**
* @notice Tests that the `slice` function works as expected when slicing between multiple words
* in memory. In this case, we test that a 2 byte slice between the 32nd byte of the
* first word and the 1st byte of the second word is correct.
*/
function test_slice_acrossWords_works() public {
bytes
memory input = hex"00000000000000000000000000000000000000000000000000000000000000112200000000000000000000000000000000000000000000000000000000000000";
...
...
@@ -53,9 +56,11 @@ contract Bytes_Test is Test {
assertEq(Bytes.slice(input, 31, 2), hex"1122");
}
/// @dev Tests that the `slice` function works as expected when slicing between
/// multiple words in memory. In this case, we test that a 34 byte slice between
/// 3 separate words returns the correct result.
/**
* @notice Tests that the `slice` function works as expected when slicing between multiple
* words in memory. In this case, we test that a 34 byte slice between 3 separate words
* returns the correct result.
*/
function test_slice_acrossMultipleWords_works() public {
bytes
memory input = hex"000000000000000000000000000000000000000000000000000000000000001122FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1100000000000000000000000000000000000000000000000000000000000000";
...
...
@@ -65,8 +70,10 @@ contract Bytes_Test is Test {
assertEq(Bytes.slice(input, 31, 34), expected);
}
/// @dev Tests that, when given an input bytes array of length `n`,
/// the `slice` function will always revert if `_start + _length > n`.
/**
* @notice Tests that, when given an input bytes array of length `n`, the `slice` function will
* always revert if `_start + _length > n`.
*/
function testFuzz_slice_outOfBounds_reverts(
bytes memory _input,
uint256 _start,
...
...
@@ -81,8 +88,10 @@ contract Bytes_Test is Test {
Bytes.slice(_input, _start, _length);
}
/// @dev Tests that, when given a length `n` that is greater than `type(uint256).max - 31`,
/// the `slice` function reverts.
/**
* @notice Tests that, when given a length `n` that is greater than `type(uint256).max - 31`,
* the `slice` function reverts.
*/
function testFuzz_slice_lengthOverflows_reverts(
bytes memory _input,
uint256 _start,
...
...
@@ -95,8 +104,10 @@ contract Bytes_Test is Test {
Bytes.slice(_input, _start, _length);
}
/// @dev Tests that, when given a length `n` that is greater than `type(uint256).max - 31`,
/// the `slice` function reverts.
/**
* @notice Tests that, when given a start index `n` that is greater than
* `type(uint256).max - n`, the `slice` function reverts.
*/
function testFuzz_slice_rangeOverflows_reverts(
bytes memory _input,
uint256 _start,
...
...
@@ -111,9 +122,56 @@ contract Bytes_Test is Test {
vm.expectRevert("slice_overflow");
Bytes.slice(_input, _start, _length);
}
}
contract Bytes_toNibbles_Test is Test {
/**
* @notice Diffs the test Solidity version of `toNibbles` against the Yul version.
*
* @param _bytes The `bytes` array to convert to nibbles.
*
* @return Yul version of `toNibbles` applied to `_bytes`.
*/
function _toNibblesYul(bytes memory _bytes) internal pure returns (bytes memory) {
// Allocate memory for the `nibbles` array.
bytes memory nibbles = new bytes(_bytes.length << 1);
assembly {
// Load the length of the passed bytes array from memory
let bytesLength := mload(_bytes)
// Store the memory offset of the _bytes array's contents on the stack
let bytesStart := add(_bytes, 0x20)
/// @dev Tests that, given an input of 5 bytes, the `toNibbles` function returns
/// an array of 10 nibbles corresponding to the input data.
// Store the memory offset of the nibbles array's contents on the stack
let nibblesStart := add(nibbles, 0x20)
// Loop through each byte in the input array
for {
let i := 0x00
} lt(i, bytesLength) {
i := add(i, 0x01)
} {
// Get the starting offset of the next 2 bytes in the nibbles array
let offset := add(nibblesStart, shl(0x01, i))
// Load the byte at the current index within the `_bytes` array
let b := byte(0x00, mload(add(bytesStart, i)))
// Pull out the first nibble and store it in the new array
mstore8(offset, shr(0x04, b))
// Pull out the second nibble and store it in the new array
mstore8(add(offset, 0x01), and(b, 0x0F))
}
}
return nibbles;
}
/**
* @notice Tests that, given an input of 5 bytes, the `toNibbles` function returns an array of
* 10 nibbles corresponding to the input data.
*/
function test_toNibbles_expectedResult5Bytes_works() public {
bytes memory input = hex"1234567890";
bytes memory expected = hex"01020304050607080900";
...
...
@@ -124,10 +182,11 @@ contract Bytes_Test is Test {
assertEq(actual, expected);
}
/// @dev Tests that, given an input of 128 bytes, the `toNibbles` function returns
/// an array of 256 nibbles corresponding to the input data.
/// This test exists to ensure that, given a large input, the `toNibbles` function
/// works as expected.
/**
* @notice Tests that, given an input of 128 bytes, the `toNibbles` function returns an array
* of 256 nibbles corresponding to the input data. This test exists to ensure that,
* given a large input, the `toNibbles` function works as expected.
*/
function test_toNibbles_expectedResult128Bytes_works() public {
bytes
memory input = hex"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f";
...
...
@@ -140,8 +199,10 @@ contract Bytes_Test is Test {
assertEq(actual, expected);
}
/// @dev Tests that, given an input of 0 bytes, the `toNibbles` function returns
/// a zero length array.
/**
* @notice Tests that, given an input of 0 bytes, the `toNibbles` function returns a zero
* length array.
*/
function test_toNibbles_zeroLengthInput_works() public {
bytes memory input = hex"";
bytes memory expected = hex"";
...
...
@@ -153,30 +214,24 @@ contract Bytes_Test is Test {
assertEq(actual, expected);
}
/// @dev Test that the `toNibbles` function in the `Bytes` library is equivalent to the
/// Yul implementation.
/**
* @notice Test that the `toNibbles` function in the `Bytes` library is equivalent to the Yul
* implementation.
*/
function testDiff_toNibbles_succeeds(bytes memory _input) public {
assertEq(Bytes.toNibbles(_input), toNibblesYul(_input));
}
/// @dev Test that the `equal` function in the `Bytes` library returns `false` if given
/// two non-equal byte arrays.
function testFuzz_equal_notEqual_works(bytes memory _a, bytes memory _b) public {
vm.assume(!manualEq(_a, _b));
assertFalse(Bytes.equal(_a, _b));
assertEq(Bytes.toNibbles(_input), _toNibblesYul(_input));
}
}
/// @dev Test whether or not the `equal` function in the `Bytes` library is equivalent
/// to manually checking equality of the two dynamic `bytes` arrays in memory.
function testDiff_equal_works(bytes memory _a, bytes memory _b) public {
assertEq(Bytes.equal(_a, _b), manualEq(_a, _b));
}
////////////////////////////////////////////////////////////////
// HELPERS //
////////////////////////////////////////////////////////////////
/// @dev Utility function to manually check equality of two dynamic `bytes` arrays in memory.
contract Bytes_equal_Test is Test {
/**
* @notice Manually checks equality of two dynamic `bytes` arrays in memory.
*
* @param _a The first `bytes` array to compare.
* @param _b The second `bytes` array to compare.
*
* @return True if the two `bytes` arrays are equal in memory.
*/
function manualEq(bytes memory _a, bytes memory _b) internal pure returns (bool) {
bool _eq;
assembly {
...
...
@@ -191,40 +246,20 @@ contract Bytes_Test is Test {
return _eq;
}
/// @dev Utility function to diff test Solidity version of `toNibbles`
function toNibblesYul(bytes memory _bytes) internal pure returns (bytes memory) {
// Allocate memory for the `nibbles` array.
bytes memory nibbles = new bytes(_bytes.length << 1);
assembly {
// Load the length of the passed bytes array from memory
let bytesLength := mload(_bytes)
// Store the memory offset of the _bytes array's contents on the stack
let bytesStart := add(_bytes, 0x20)
// Store the memory offset of the nibbles array's contents on the stack
let nibblesStart := add(nibbles, 0x20)
// Loop through each byte in the input array
for {
let i := 0x00
} lt(i, bytesLength) {
i := add(i, 0x01)
} {
// Get the starting offset of the next 2 bytes in the nibbles array
let offset := add(nibblesStart, shl(0x01, i))
// Load the byte at the current index within the `_bytes` array
let b := byte(0x00, mload(add(bytesStart, i)))
// Pull out the first nibble and store it in the new array
mstore8(offset, shr(0x04, b))
// Pull out the second nibble and store it in the new array
mstore8(add(offset, 0x01), and(b, 0x0F))
}
}
/**
* @notice Tests that the `equal` function in the `Bytes` library returns `false` if given two
* non-equal byte arrays.
*/
function testFuzz_equal_notEqual_works(bytes memory _a, bytes memory _b) public {
vm.assume(!manualEq(_a, _b));
assertFalse(Bytes.equal(_a, _b));
}
return nibbles;
/**
* @notice Test whether or not the `equal` function in the `Bytes` library is equivalent to
* manually checking equality of the two dynamic `bytes` arrays in memory.
*/
function testDiff_equal_works(bytes memory _a, bytes memory _b) public {
assertEq(Bytes.equal(_a, _b), manualEq(_a, _b));
}
}
packages/contracts-bedrock/contracts/test/L1StandardBridge.t.sol
View file @
63ec5881
...
...
@@ -71,34 +71,37 @@ contract L1StandardBridge_Receive_Test is Bridge_Initializer {
contract L1StandardBridge_Receive_TestFail {}
contract L1StandardBridge_DepositETH_Test is Bridge_Initializer {
// depositETH
// - emits ETHDepositInitiated
// - calls optimismPortal.depositTransaction
// - only EOA
// - ETH ends up in the optimismPortal
function test_depositETH_succeeds() external {
contract PreBridgeETH is Bridge_Initializer {
function _preBridgeETH(bool isLegacy) internal {
assertEq(address(op).balance, 0);
uint256 nonce = L1Messenger.messageNonce();
uint256 version = 0; // Internal constant in the OptimismPortal: DEPOSIT_VERSION
address l1MessengerAliased = AddressAliasHelper.applyL1ToL2Alias(address(L1Messenger));
vm.expectEmit(true, true, true, true, address(L1Bridge));
emit ETHDepositInitiated(alice, alice, 500, hex"ff");
vm.expectEmit(true, true, true, true, address(L1Bridge));
emit ETHBridgeInitiated(alice, alice, 500, hex"ff");
bytes memory message = abi.encodeWithSelector(
StandardBridge.finalizeBridgeETH.selector,
alice,
alice,
500,
hex"
ff
"
hex"
dead
"
);
if (isLegacy) {
vm.expectCall(
address(L1Bridge),
500,
abi.encodeWithSelector(L1Bridge.depositETH.selector, 50000, hex"dead")
);
} else {
vm.expectCall(
address(L1Bridge),
500,
abi.encodeWithSelector(L1Bridge.bridgeETH.selector, 50000, hex"dead")
);
}
vm.expectCall(
address(L1Messenger),
500,
abi.encodeWithSelector(
CrossDomainMessenger.sendMessage.selector,
address(L2Bridge),
...
...
@@ -120,6 +123,7 @@ contract L1StandardBridge_DepositETH_Test is Bridge_Initializer {
uint64 baseGas = L1Messenger.baseGas(message, 50000);
vm.expectCall(
address(op),
500,
abi.encodeWithSelector(
OptimismPortal.depositTransaction.selector,
address(L2Messenger),
...
...
@@ -138,6 +142,12 @@ contract L1StandardBridge_DepositETH_Test is Bridge_Initializer {
innerMessage
);
vm.expectEmit(true, true, true, true, address(L1Bridge));
emit ETHDepositInitiated(alice, alice, 500, hex"dead");
vm.expectEmit(true, true, true, true, address(L1Bridge));
emit ETHBridgeInitiated(alice, alice, 500, hex"dead");
// OptimismPortal emits a TransactionDeposited event on `depositTransaction` call
vm.expectEmit(true, true, true, true, address(op));
emit TransactionDeposited(l1MessengerAliased, address(L2Messenger), version, opaqueData);
...
...
@@ -151,7 +161,33 @@ contract L1StandardBridge_DepositETH_Test is Bridge_Initializer {
emit SentMessageExtension1(address(L1Bridge), 500);
vm.prank(alice, alice);
L1Bridge.depositETH{ value: 500 }(50000, hex"ff");
}
}
contract L1StandardBridge_DepositETH_Test is PreBridgeETH {
// depositETH
// - emits ETHDepositInitiated
// - emits ETHBridgeInitiated
// - calls optimismPortal.depositTransaction
// - only EOA
// - ETH ends up in the optimismPortal
function test_depositETH_succeeds() external {
_preBridgeETH({ isLegacy: true });
L1Bridge.depositETH{ value: 500 }(50000, hex"dead");
assertEq(address(op).balance, 500);
}
}
contract L1StandardBridge_BridgeETH_Test is PreBridgeETH {
// BridgeETH
// - emits ETHDepositInitiated
// - emits ETHBridgeInitiated
// - calls optimismPortal.depositTransaction
// - only EOA
// - ETH ends up in the optimismPortal
function test_bridgeETH_succeeds() external {
_preBridgeETH({ isLegacy: false });
L1Bridge.bridgeETH{ value: 500 }(50000, hex"dead");
assertEq(address(op).balance, 500);
}
}
...
...
@@ -167,29 +203,26 @@ contract L1StandardBridge_DepositETH_TestFail is Bridge_Initializer {
}
}
contract L1StandardBridge_DepositETHTo_Test is Bridge_Initializer {
// depositETHTo
// - emits ETHDepositInitiated
// - calls optimismPortal.depositTransaction
// - EOA or contract can call
// - ETH ends up in the optimismPortal
function test_depositETHTo_succeeds() external {
contract PreBridgeETHTo is Bridge_Initializer {
function _preBridgeETHTo(bool isLegacy) internal {
assertEq(address(op).balance, 0);
uint256 nonce = L1Messenger.messageNonce();
uint256 version = 0; // Internal constant in the OptimismPortal: DEPOSIT_VERSION
address l1MessengerAliased = AddressAliasHelper.applyL1ToL2Alias(address(L1Messenger));
vm.expectEmit(true, true, true, true, address(L1Bridge));
emit ETHDepositInitiated(alice, bob, 600, hex"dead");
vm.expectEmit(true, true, true, true, address(L1Bridge));
emit ETHBridgeInitiated(alice, bob, 600, hex"dead");
// depositETHTo on the L1 bridge should be called
vm.expectCall(
address(L1Bridge),
abi.encodeWithSelector(L1Bridge.depositETHTo.selector, bob, 1000, hex"dead")
);
if (isLegacy) {
vm.expectCall(
address(L1Bridge),
600,
abi.encodeWithSelector(L1Bridge.depositETHTo.selector, bob, 60000, hex"dead")
);
} else {
vm.expectCall(
address(L1Bridge),
600,
abi.encodeWithSelector(L1Bridge.bridgeETHTo.selector, bob, 60000, hex"dead")
);
}
bytes memory message = abi.encodeWithSelector(
StandardBridge.finalizeBridgeETH.selector,
...
...
@@ -207,7 +240,7 @@ contract L1StandardBridge_DepositETHTo_Test is Bridge_Initializer {
CrossDomainMessenger.sendMessage.selector,
address(L2Bridge),
message,
1
000
60
000
)
);
...
...
@@ -217,11 +250,11 @@ contract L1StandardBridge_DepositETHTo_Test is Bridge_Initializer {
address(L1Bridge),
address(L2Bridge),
600,
1
000,
60
000,
message
);
uint64 baseGas = L1Messenger.baseGas(message,
1
000);
uint64 baseGas = L1Messenger.baseGas(message,
60
000);
vm.expectCall(
address(op),
abi.encodeWithSelector(
...
...
@@ -242,13 +275,19 @@ contract L1StandardBridge_DepositETHTo_Test is Bridge_Initializer {
innerMessage
);
vm.expectEmit(true, true, true, true, address(L1Bridge));
emit ETHDepositInitiated(alice, bob, 600, hex"dead");
vm.expectEmit(true, true, true, true, address(L1Bridge));
emit ETHBridgeInitiated(alice, bob, 600, hex"dead");
// OptimismPortal emits a TransactionDeposited event on `depositTransaction` call
vm.expectEmit(true, true, true, true, address(op));
emit TransactionDeposited(l1MessengerAliased, address(L2Messenger), version, opaqueData);
// SentMessage event emitted by the CrossDomainMessenger
vm.expectEmit(true, true, true, true, address(L1Messenger));
emit SentMessage(address(L2Bridge), address(L1Bridge), message, nonce,
1
000);
emit SentMessage(address(L2Bridge), address(L1Bridge), message, nonce,
60
000);
// SentMessageExtension1 event emitted by the CrossDomainMessenger
vm.expectEmit(true, true, true, true, address(L1Messenger));
...
...
@@ -256,7 +295,33 @@ contract L1StandardBridge_DepositETHTo_Test is Bridge_Initializer {
// deposit eth to bob
vm.prank(alice, alice);
L1Bridge.depositETHTo{ value: 600 }(bob, 1000, hex"dead");
}
}
contract L1StandardBridge_DepositETHTo_Test is PreBridgeETHTo {
// depositETHTo
// - emits ETHDepositInitiated
// - calls optimismPortal.depositTransaction
// - EOA or contract can call
// - ETH ends up in the optimismPortal
function test_depositETHTo_succeeds() external {
_preBridgeETHTo({ isLegacy: true });
L1Bridge.depositETHTo{ value: 600 }(bob, 60000, hex"dead");
assertEq(address(op).balance, 600);
}
}
contract L1StandardBridge_BridgeETHTo_Test is PreBridgeETHTo {
// BridgeETHTo
// - emits ETHDepositInitiated
// - emits ETHBridgeInitiated
// - calls optimismPortal.depositTransaction
// - only EOA
// - ETH ends up in the optimismPortal
function test_bridgeETHTo_succeeds() external {
_preBridgeETHTo({ isLegacy: false });
L1Bridge.bridgeETHTo{ value: 600 }(bob, 60000, hex"dead");
assertEq(address(op).balance, 600);
}
}
...
...
packages/contracts-bedrock/contracts/test/L2StandardBridge.t.sol
View file @
63ec5881
...
...
@@ -57,7 +57,10 @@ contract L2StandardBridge_Test is Bridge_Initializer {
})
);
vm.expectEmit(true, true, true, true, address(L2Bridge));
vm.expectEmit(true, true, true, true);
emit WithdrawalInitiated(address(0), Predeploys.LEGACY_ERC20_ETH, alice, alice, 100, hex"");
vm.expectEmit(true, true, true, true);
emit ETHBridgeInitiated(alice, alice, 100, hex"");
// L2ToL1MessagePasser will emit a MessagePassed event
...
...
@@ -100,9 +103,6 @@ contract L2StandardBridge_Test is Bridge_Initializer {
)
);
vm.expectEmit(true, true, true, true);
emit WithdrawalInitiated(address(0), Predeploys.LEGACY_ERC20_ETH, alice, alice, 100, hex"");
vm.prank(alice, alice);
(bool success, ) = address(L2Bridge).call{ value: 100 }(hex"");
assertEq(success, true);
...
...
@@ -118,12 +118,12 @@ contract L2StandardBridge_Test is Bridge_Initializer {
vm.prank(alice, alice);
L2Bridge.withdraw(address(Predeploys.LEGACY_ERC20_ETH), 100, 1000, hex"");
}
}
// withdraw
// - token is burned
// - emits WithdrawalInitiated
// - calls Withdrawer.initiateWithdrawal
function test_withdraw_withdrawingERC20_succeeds() external {
contract PreBridgeERC20 is Bridge_Initializer {
// withdraw and BridgeERC20 should behave the same when transferring ERC20 tokens
// so they should share the same setup and expectEmit calls
function _preBridgeERC20(bool isLegacy) internal {
// Alice has 100 L2Token
deal(address(L2Token), alice, 100, true);
assertEq(L2Token.balanceOf(alice), 100);
...
...
@@ -158,30 +158,30 @@ contract L2StandardBridge_Test is Bridge_Initializer {
})
);
vm.expectEmit(true, true, true, true);
emit ERC20BridgeInitiated(address(L2Token), address(L1Token), alice, alice, 100, hex"");
vm.expectEmit(true, true, true, true, address(messagePasser));
emit MessagePassed(
nonce
,
address(L2Messenger)
,
address(L1Messenger)
,
0,
baseGas,
withdrawalData,
withdrawalHash
);
// SentMessage event emitted by the CrossDomainMessenger
vm.expectEmit(true, true, true, true, address(L2Messenger));
emit SentMessage(address(L1Bridge), address(L2Bridge), message, nonce, 1000);
// SentMessageExtension1 event emitted by the CrossDomainMessenger
vm.expectEmit(true, true, true, true, address(L2Messenger));
emit SentMessageExtension1(address(L2Bridge), 0);
vm.expectEmit(true, true, true, true
);
emit WithdrawalInitiated(address(L1Token), address(L2Token), alice, alice, 100, hex"");
if (isLegacy) {
vm.expectCall(
address(L2Bridge),
abi.encodeWithSelector(
L2Bridge.withdraw.selector,
address(L2Token)
,
100
,
1000
,
hex""
)
);
} else {
vm.expectCall(
address(L2Bridge),
abi.encodeWithSelector(
L2Bridge.bridgeERC20.selector,
address(L2Token),
address(L1Token),
100,
1000,
hex""
)
);
}
vm.expectCall(
address(L2Messenger),
...
...
@@ -209,12 +209,58 @@ contract L2StandardBridge_Test is Bridge_Initializer {
abi.encodeWithSelector(OptimismMintableERC20.burn.selector, alice, 100)
);
vm.expectEmit(true, true, true, true);
emit WithdrawalInitiated(address(L1Token), address(L2Token), alice, alice, 100, hex"");
vm.expectEmit(true, true, true, true);
emit ERC20BridgeInitiated(address(L2Token), address(L1Token), alice, alice, 100, hex"");
vm.expectEmit(true, true, true, true);
emit MessagePassed(
nonce,
address(L2Messenger),
address(L1Messenger),
0,
baseGas,
withdrawalData,
withdrawalHash
);
// SentMessage event emitted by the CrossDomainMessenger
vm.expectEmit(true, true, true, true);
emit SentMessage(address(L1Bridge), address(L2Bridge), message, nonce, 1000);
// SentMessageExtension1 event emitted by the CrossDomainMessenger
vm.expectEmit(true, true, true, true);
emit SentMessageExtension1(address(L2Bridge), 0);
vm.prank(alice, alice);
}
}
contract L2StandardBridge_BridgeERC20_Test is PreBridgeERC20 {
// withdraw
// - token is burned
// - emits WithdrawalInitiated
// - calls Withdrawer.initiateWithdrawal
function test_withdraw_withdrawingERC20_succeeds() external {
_preBridgeERC20({ isLegacy: true });
L2Bridge.withdraw(address(L2Token), 100, 1000, hex"");
assertEq(L2Token.balanceOf(alice), 0);
}
// BridgeERC20
// - token is burned
// - emits WithdrawalInitiated
// - calls Withdrawer.initiateWithdrawal
function test_bridgeERC20_succeeds() external {
_preBridgeERC20({ isLegacy: false });
L2Bridge.bridgeERC20(address(L2Token), address(L1Token), 100, 1000, hex"");
assertEq(L2Token.balanceOf(alice), 0);
}
function test_withdraw_notEOA_reverts() external {
// This contract has 100 L2Token
deal(address(L2Token), address(this), 100, true);
...
...
@@ -222,12 +268,12 @@ contract L2StandardBridge_Test is Bridge_Initializer {
vm.expectRevert("StandardBridge: function can only be called from an EOA");
L2Bridge.withdraw(address(L2Token), 100, 1000, hex"");
}
}
// withdrawTo
// - token is burned
// - emits WithdrawalInitiated w/ correct recipient
// - calls Withdrawer.initiateWithdrawal
function test_withdrawTo_withdrawingERC20_succeeds() external {
contract PreBridgeERC20To is Bridge_Initializer {
// withdrawTo and BridgeERC20To should behave the same when transferring ERC20 tokens
// so they should share the same setup and expectEmit calls
function _preBridgeERC20To(bool isLegacy) internal {
deal(address(L2Token), alice, 100, true);
assertEq(L2Token.balanceOf(alice), 100);
uint256 nonce = L2Messenger.messageNonce();
...
...
@@ -261,7 +307,10 @@ contract L2StandardBridge_Test is Bridge_Initializer {
})
);
vm.expectEmit(true, true, true, true);
vm.expectEmit(true, true, true, true, address(L2Bridge));
emit WithdrawalInitiated(address(L1Token), address(L2Token), alice, bob, 100, hex"");
vm.expectEmit(true, true, true, true, address(L2Bridge));
emit ERC20BridgeInitiated(address(L2Token), address(L1Token), alice, bob, 100, hex"");
vm.expectEmit(true, true, true, true, address(messagePasser));
...
...
@@ -283,8 +332,32 @@ contract L2StandardBridge_Test is Bridge_Initializer {
vm.expectEmit(true, true, true, true, address(L2Messenger));
emit SentMessageExtension1(address(L2Bridge), 0);
vm.expectEmit(true, true, true, true);
emit WithdrawalInitiated(address(L1Token), address(L2Token), alice, bob, 100, hex"");
if (isLegacy) {
vm.expectCall(
address(L2Bridge),
abi.encodeWithSelector(
L2Bridge.withdrawTo.selector,
address(L2Token),
bob,
100,
1000,
hex""
)
);
} else {
vm.expectCall(
address(L2Bridge),
abi.encodeWithSelector(
L2Bridge.bridgeERC20To.selector,
address(L2Token),
address(L1Token),
bob,
100,
1000,
hex""
)
);
}
vm.expectCall(
address(L2Messenger),
...
...
@@ -313,11 +386,33 @@ contract L2StandardBridge_Test is Bridge_Initializer {
);
vm.prank(alice, alice);
}
}
contract L2StandardBridge_BridgeERC20To_Test is PreBridgeERC20To {
// withdrawTo
// - token is burned
// - emits WithdrawalInitiated w/ correct recipient
// - calls Withdrawer.initiateWithdrawal
function test_withdrawTo_withdrawingERC20_succeeds() external {
_preBridgeERC20To({ isLegacy: true });
L2Bridge.withdrawTo(address(L2Token), bob, 100, 1000, hex"");
assertEq(L2Token.balanceOf(alice), 0);
}
// bridgeERC20To
// - token is burned
// - emits WithdrawalInitiated w/ correct recipient
// - calls Withdrawer.initiateWithdrawal
function test_bridgeERC20To_succeeds() external {
_preBridgeERC20To({ isLegacy: false });
L2Bridge.bridgeERC20To(address(L2Token), address(L1Token), bob, 100, 1000, hex"");
assertEq(L2Token.balanceOf(alice), 0);
}
}
contract L2StandardBridge_Bridge_Test is Bridge_Initializer {
// finalizeDeposit
// - only callable by l1TokenBridge
// - supported token pair emits DepositFinalized
...
...
@@ -336,10 +431,10 @@ contract L2StandardBridge_Test is Bridge_Initializer {
// Should emit both the bedrock and legacy events
vm.expectEmit(true, true, true, true, address(L2Bridge));
emit
ERC20BridgeFinalized(address(L2Token), address(L1
Token), alice, alice, 100, hex"");
emit
DepositFinalized(address(L1Token), address(L2
Token), alice, alice, 100, hex"");
vm.expectEmit(true, true, true, true, address(L2Bridge));
emit
DepositFinalized(address(L1Token), address(L2
Token), alice, alice, 100, hex"");
emit
ERC20BridgeFinalized(address(L2Token), address(L1
Token), alice, alice, 100, hex"");
vm.prank(address(L2Messenger));
L2Bridge.finalizeDeposit(address(L1Token), address(L2Token), alice, alice, 100, hex"");
...
...
@@ -353,6 +448,9 @@ contract L2StandardBridge_Test is Bridge_Initializer {
);
// Should emit both the bedrock and legacy events
vm.expectEmit(true, true, true, true, address(L2Bridge));
emit DepositFinalized(address(L1Token), address(L2Token), alice, alice, 100, hex"");
vm.expectEmit(true, true, true, true, address(L2Bridge));
emit ERC20BridgeFinalized(
address(L2Token), // localToken
...
...
@@ -363,9 +461,6 @@ contract L2StandardBridge_Test is Bridge_Initializer {
hex""
);
vm.expectEmit(true, true, true, true, address(L2Bridge));
emit DepositFinalized(address(L1Token), address(L2Token), alice, alice, 100, hex"");
vm.prank(address(L2Messenger));
L2Bridge.finalizeDeposit(address(L1Token), address(L2Token), alice, alice, 100, hex"");
}
...
...
@@ -418,6 +513,9 @@ contract L2StandardBridge_FinalizeBridgeETH_Test is Bridge_Initializer {
vm.deal(messenger, 100);
vm.prank(messenger);
vm.expectEmit(true, true, true, true);
emit DepositFinalized(address(0), Predeploys.LEGACY_ERC20_ETH, alice, alice, 100, hex"");
vm.expectEmit(true, true, true, true);
emit ETHBridgeFinalized(alice, alice, 100, hex"");
...
...
packages/contracts-bedrock/contracts/universal/StandardBridge.sol
View file @
63ec5881
...
...
@@ -301,7 +301,9 @@ abstract contract StandardBridge {
require(_to != address(this), "StandardBridge: cannot send to self");
require(_to != address(MESSENGER), "StandardBridge: cannot send to messenger");
emit ETHBridgeFinalized(_from, _to, _amount, _extraData);
// Emit the correct events. By default this will be _amount, but child
// contracts may override this function in order to emit legacy events as well.
_emitETHBridgeFinalized(_from, _to, _amount, _extraData);
bool success = SafeCall.call(_to, gasleft(), _amount, hex"");
require(success, "StandardBridge: ETH transfer failed");
...
...
@@ -340,7 +342,9 @@ abstract contract StandardBridge {
IERC20(_localToken).safeTransfer(_to, _amount);
}
emit ERC20BridgeFinalized(_localToken, _remoteToken, _from, _to, _amount, _extraData);
// Emit the correct events. By default this will be ERC20BridgeFinalized, but child
// contracts may override this function in order to emit legacy events as well.
_emitERC20BridgeFinalized(_localToken, _remoteToken, _from, _to, _amount, _extraData);
}
/**
...
...
@@ -366,7 +370,9 @@ abstract contract StandardBridge {
"StandardBridge: bridging ETH must include sufficient ETH value"
);
emit ETHBridgeInitiated(_from, _to, _amount, _extraData);
// Emit the correct events. By default this will be _amount, but child
// contracts may override this function in order to emit legacy events as well.
_emitETHBridgeInitiated(_from, _to, _amount, _extraData);
MESSENGER.sendMessage{ value: _amount }(
address(OTHER_BRIDGE),
...
...
@@ -414,7 +420,9 @@ abstract contract StandardBridge {
deposits[_localToken][_remoteToken] = deposits[_localToken][_remoteToken] + _amount;
}
emit ERC20BridgeInitiated(_localToken, _remoteToken, _from, _to, _amount, _extraData);
// Emit the correct events. By default this will be ERC20BridgeInitiated, but child
// contracts may override this function in order to emit legacy events as well.
_emitERC20BridgeInitiated(_localToken, _remoteToken, _from, _to, _amount, _extraData);
MESSENGER.sendMessage(
address(OTHER_BRIDGE),
...
...
@@ -463,4 +471,83 @@ abstract contract StandardBridge {
{
return _otherToken == OptimismMintableERC20(_mintableToken).l1Token();
}
/** @notice Emits the ETHBridgeInitiated event and if necessary the appropriate legacy event
* when an ETH bridge is finalized on this chain.
*
* @param _from Address of the sender.
* @param _to Address of the receiver.
* @param _amount Amount of ETH sent.
* @param _extraData Extra data sent with the transaction.
*/
function _emitETHBridgeInitiated(
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal virtual {
emit ETHBridgeInitiated(_from, _to, _amount, _extraData);
}
/**
* @notice Emits the ETHBridgeFinalized and if necessary the appropriate legacy event when an
* ETH bridge is finalized on this chain.
*
* @param _from Address of the sender.
* @param _to Address of the receiver.
* @param _amount Amount of ETH sent.
* @param _extraData Extra data sent with the transaction.
*/
function _emitETHBridgeFinalized(
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal virtual {
emit ETHBridgeFinalized(_from, _to, _amount, _extraData);
}
/**
* @notice Emits the ERC20BridgeInitiated event and if necessary the appropriate legacy
* event when an ERC20 bridge is initiated to the other chain.
*
* @param _localToken Address of the ERC20 on this chain.
* @param _remoteToken Address of the ERC20 on the remote chain.
* @param _from Address of the sender.
* @param _to Address of the receiver.
* @param _amount Amount of the ERC20 sent.
* @param _extraData Extra data sent with the transaction.
*/
function _emitERC20BridgeInitiated(
address _localToken,
address _remoteToken,
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal virtual {
emit ERC20BridgeInitiated(_localToken, _remoteToken, _from, _to, _amount, _extraData);
}
/**
* @notice Emits the ERC20BridgeFinalized event and if necessary the appropriate legacy
* event when an ERC20 bridge is initiated to the other chain.
*
* @param _localToken Address of the ERC20 on this chain.
* @param _remoteToken Address of the ERC20 on the remote chain.
* @param _from Address of the sender.
* @param _to Address of the receiver.
* @param _amount Amount of the ERC20 sent.
* @param _extraData Extra data sent with the transaction.
*/
function _emitERC20BridgeFinalized(
address _localToken,
address _remoteToken,
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) internal virtual {
emit ERC20BridgeFinalized(_localToken, _remoteToken, _from, _to, _amount, _extraData);
}
}
packages/contracts-periphery/.gas-snapshot
View file @
63ec5881
...
...
@@ -4,15 +4,15 @@ AssetReceiverTest:testFail_withdrawERC721() (gas: 55908)
AssetReceiverTest:testFail_withdrawETH() (gas: 10457)
AssetReceiverTest:testFail_withdrawETHwithAmount() (gas: 10594)
AssetReceiverTest:test_constructor() (gas: 9794)
AssetReceiverTest:test_receive() (gas:
1886
0)
AssetReceiverTest:test_withdrawERC20() (gas: 18
3064
)
AssetReceiverTest:test_withdrawERC20withAmount() (gas: 18
2146
)
AssetReceiverTest:test_withdrawERC721() (gas:
49097
)
AssetReceiverTest:test_withdrawETH() (gas: 2
6179
)
AssetReceiverTest:test_withdrawETHwithAmount() (gas: 2
6108
)
AssetReceiverTest:test_attest_bulk() (gas: 6114
40
)
AssetReceiverTest:test_attest_individual() (gas: 5385
14
)
AssetReceiverTest:test_attest_single() (gas: 5589
62
)
AssetReceiverTest:test_receive() (gas:
2101
0)
AssetReceiverTest:test_withdrawERC20() (gas: 18
5529
)
AssetReceiverTest:test_withdrawERC20withAmount() (gas: 18
4609
)
AssetReceiverTest:test_withdrawERC721() (gas:
51565
)
AssetReceiverTest:test_withdrawETH() (gas: 2
8774
)
AssetReceiverTest:test_withdrawETHwithAmount() (gas: 2
8703
)
AssetReceiverTest:test_attest_bulk() (gas: 6114
17
)
AssetReceiverTest:test_attest_individual() (gas: 5385
36
)
AssetReceiverTest:test_attest_single() (gas: 5589
39
)
CheckBalanceHighTest:testFuzz_check_fails(address,uint256) (runs: 256, μ: 12352, ~: 12382)
CheckBalanceHighTest:testFuzz_check_succeeds(address,uint256) (runs: 256, μ: 10284, ~: 10284)
CheckBalanceLowTest:testFuzz_check_fails(address,uint256) (runs: 256, μ: 10262, ~: 10262)
...
...
@@ -45,7 +45,7 @@ OptimistTest:test_optimist_baseURI() (gas: 116809)
OptimistTest:test_optimist_burn() (gas: 77526)
OptimistTest:test_optimist_initialize() (gas: 23095)
OptimistTest:test_optimist_is_on_allow_list() (gas: 52616)
OptimistTest:test_optimist_mint_already_minted() (gas: 98
911
)
OptimistTest:test_optimist_mint_already_minted() (gas: 98
823
)
OptimistTest:test_optimist_mint_happy_path() (gas: 99175)
OptimistTest:test_optimist_mint_no_attestation() (gas: 15897)
OptimistTest:test_optimist_mint_secondary_minter() (gas: 100576)
...
...
@@ -54,9 +54,9 @@ OptimistTest:test_optimist_sbt_transfer() (gas: 102331)
OptimistTest:test_optimist_set_approval_for_all() (gas: 100907)
OptimistTest:test_optimist_supports_interface() (gas: 5797)
OptimistTest:test_optimist_token_id_of_owner() (gas: 95045)
OptimistTest:test_optimist_token_uri() (gas: 2139
50
)
TransactorTest:testFail_CALL() (gas: 156
58
)
OptimistTest:test_optimist_token_uri() (gas: 2139
72
)
TransactorTest:testFail_CALL() (gas: 156
36
)
TransactorTest:testFail_DELEGATECALLL() (gas: 15632)
TransactorTest:test_CALL() (gas: 269
77
)
TransactorTest:test_DELEGATECALL() (gas: 211
22
)
TransactorTest:test_constructor() (gas: 97
8
2)
TransactorTest:test_CALL() (gas: 269
69
)
TransactorTest:test_DELEGATECALL() (gas: 211
89
)
TransactorTest:test_constructor() (gas: 97
7
2)
packages/contracts-periphery/contracts/foundry-tests/AssetReceiver.t.sol
View file @
63ec5881
...
...
@@ -17,7 +17,22 @@ contract AssetReceiver_Initializer is Test {
TestERC721 testERC721;
AssetReceiver assetReceiver;
function _setUp() public {
event ReceivedETH(address indexed from, uint256 amount);
event WithdrewETH(address indexed withdrawer, address indexed recipient, uint256 amount);
event WithdrewERC20(
address indexed withdrawer,
address indexed recipient,
address indexed asset,
uint256 amount
);
event WithdrewERC721(
address indexed withdrawer,
address indexed recipient,
address indexed asset,
uint256 id
);
function setUp() public {
// Deploy ERC20 and ERC721 tokens
testERC20 = new TestERC20();
testERC721 = new TestERC721();
...
...
@@ -38,10 +53,6 @@ contract AssetReceiver_Initializer is Test {
}
contract AssetReceiverTest is AssetReceiver_Initializer {
function setUp() public {
super._setUp();
}
// Tests if the owner was set correctly during deploy
function test_constructor() external {
assertEq(address(alice), assetReceiver.owner());
...
...
@@ -52,6 +63,8 @@ contract AssetReceiverTest is AssetReceiver_Initializer {
// Check that contract balance is 0 initially
assertEq(address(assetReceiver).balance, 0);
vm.expectEmit(true, true, true, true, address(assetReceiver));
emit ReceivedETH(alice, 100);
// Send funds
vm.prank(alice);
(bool success, ) = address(assetReceiver).call{ value: 100 }(hex"");
...
...
@@ -71,6 +84,9 @@ contract AssetReceiverTest is AssetReceiver_Initializer {
assertEq(address(alice).balance, 1 ether);
vm.expectEmit(true, true, true, true, address(assetReceiver));
emit WithdrewETH(alice, alice, 1 ether);
// call withdrawETH
vm.prank(alice);
assetReceiver.withdrawETH(payable(alice));
...
...
@@ -96,6 +112,9 @@ contract AssetReceiverTest is AssetReceiver_Initializer {
assertEq(address(alice).balance, 1 ether);
vm.expectEmit(true, true, true, true, address(assetReceiver));
emit WithdrewETH(alice, alice, 0.5 ether);
// call withdrawETH
vm.prank(alice);
assetReceiver.withdrawETH(payable(alice), 0.5 ether);
...
...
@@ -121,6 +140,9 @@ contract AssetReceiverTest is AssetReceiver_Initializer {
assertEq(testERC20.balanceOf(address(assetReceiver)), 100_000);
assertEq(testERC20.balanceOf(alice), 0);
vm.expectEmit(true, true, true, true, address(assetReceiver));
emit WithdrewERC20(alice, alice, address(testERC20), 100_000);
// call withdrawERC20
vm.prank(alice);
assetReceiver.withdrawERC20(testERC20, alice);
...
...
@@ -146,6 +168,9 @@ contract AssetReceiverTest is AssetReceiver_Initializer {
assertEq(testERC20.balanceOf(address(assetReceiver)), 100_000);
assertEq(testERC20.balanceOf(alice), 0);
vm.expectEmit(true, true, true, true, address(assetReceiver));
emit WithdrewERC20(alice, alice, address(testERC20), 50_000);
// call withdrawERC20
vm.prank(alice);
assetReceiver.withdrawERC20(testERC20, alice, 50_000);
...
...
@@ -172,6 +197,9 @@ contract AssetReceiverTest is AssetReceiver_Initializer {
testERC721.transferFrom(alice, address(assetReceiver), DEFAULT_TOKEN_ID);
assertEq(testERC721.ownerOf(DEFAULT_TOKEN_ID), address(assetReceiver));
vm.expectEmit(true, true, true, true, address(assetReceiver));
emit WithdrewERC721(alice, alice, address(testERC721), DEFAULT_TOKEN_ID);
// Call withdrawERC721
vm.prank(alice);
assetReceiver.withdrawERC721(testERC721, alice, DEFAULT_TOKEN_ID);
...
...
packages/contracts-periphery/contracts/foundry-tests/AttestationStation.t.sol
View file @
63ec5881
...
...
@@ -11,7 +11,7 @@ contract AssetReceiver_Initializer is Test {
address bob = address(256);
address sally = address(512);
function
_
setUp() public {
function setUp() public {
// Give alice and bob some ETH
vm.deal(alice_attestor, 1 ether);
...
...
@@ -22,10 +22,6 @@ contract AssetReceiver_Initializer is Test {
}
contract AssetReceiverTest is AssetReceiver_Initializer {
function setUp() public {
super._setUp();
}
event AttestationCreated(
address indexed creator,
address indexed about,
...
...
packages/contracts-periphery/contracts/foundry-tests/Optimist.t.sol
View file @
63ec5881
...
...
@@ -47,7 +47,7 @@ contract Optimist_Initializer is Test {
attestationStation.attest(attestationData);
}
function
_
setUp() public {
function setUp() public {
// Give alice and bob and sally some ETH
vm.deal(alice_admin, 1 ether);
vm.deal(bob, 1 ether);
...
...
@@ -68,11 +68,6 @@ contract Optimist_Initializer is Test {
}
contract OptimistTest is Optimist_Initializer {
function setUp() public {
super._setUp();
_initializeContracts();
}
function test_optimist_initialize() external {
// expect name to be set
assertEq(optimist.name(), name);
...
...
packages/contracts-periphery/contracts/foundry-tests/Transactor.t.sol
View file @
63ec5881
...
...
@@ -15,7 +15,7 @@ contract Transactor_Initializer is Test {
Reverter reverter;
CallRecorder callRecorded;
function
_
setUp() public {
function setUp() public {
// Deploy Reverter and CallRecorder helper contracts
reverter = new Reverter();
callRecorded = new CallRecorder();
...
...
@@ -34,10 +34,6 @@ contract Transactor_Initializer is Test {
}
contract TransactorTest is Transactor_Initializer {
function setUp() public {
super._setUp();
}
// Tests if the owner was set correctly during deploy
function test_constructor() external {
assertEq(address(alice), transactor.owner());
...
...
@@ -49,7 +45,7 @@ contract TransactorTest is Transactor_Initializer {
bytes memory data = abi.encodeWithSelector(callRecorded.record.selector);
// Run CALL
vm.prank(alice);
vm.expectCall(address(callRecorded), data);
vm.expectCall(address(callRecorded),
200_000 wei,
data);
transactor.CALL(address(callRecorded), data, 200_000 wei);
}
...
...
packages/contracts-periphery/package.json
View file @
63ec5881
...
...
@@ -16,10 +16,9 @@
"build"
:
"yarn build:hh"
,
"build:hh"
:
"hardhat compile --show-stack-traces"
,
"build:forge"
:
"forge build"
,
"test"
:
"yarn test:contracts"
,
"test:contracts"
:
"hardhat test --show-stack-traces"
,
"test"
:
"yarn test:forge"
,
"test:forge"
:
"forge test"
,
"test:coverage"
:
"
NODE_OPTIONS=--max_old_space_size=8192 hardhat coverage &&
yarn test:coverage:forge"
,
"test:coverage"
:
"yarn test:coverage:forge"
,
"test:coverage:forge"
:
"forge coverage"
,
"test:slither"
:
"slither ."
,
"gas-snapshot"
:
"forge snapshot"
,
...
...
@@ -54,7 +53,6 @@
"url"
:
"https://github.com/ethereum-optimism/optimism.git"
},
"devDependencies"
:
{
"@defi-wonderland/smock"
:
"^2.0.7"
,
"@eth-optimism/contracts-bedrock"
:
"0.11.3"
,
"@eth-optimism/core-utils"
:
"^0.12.0"
,
"@eth-optimism/hardhat-deploy-config"
:
"^0.2.5"
,
...
...
@@ -65,8 +63,6 @@
"@rari-capital/solmate"
:
"7.0.0-alpha.3"
,
"@openzeppelin/contracts"
:
"4.7.3"
,
"@openzeppelin/contracts-upgradeable"
:
"4.7.3"
,
"@types/chai"
:
"^4.2.18"
,
"@types/mocha"
:
"^8.2.2"
,
"@types/node"
:
"^17.0.21"
,
"@typechain/ethers-v5"
:
"^10.1.0"
,
"@typechain/hardhat"
:
"^6.1.2"
,
...
...
@@ -82,7 +78,6 @@
"hardhat-deploy"
:
"^0.11.10"
,
"hardhat-gas-reporter"
:
"^1.0.8"
,
"lint-staged"
:
"11.0.0"
,
"mocha"
:
"^10.0.0"
,
"mkdirp"
:
"^1.0.4"
,
"node-fetch"
:
"^2.6.7"
,
"prettier"
:
"^2.8.0"
,
...
...
packages/contracts-periphery/test/contracts/universal/AssetReceiver.spec.ts
deleted
100644 → 0
View file @
d0c22cf5
import
hre
from
'
hardhat
'
import
{
SignerWithAddress
}
from
'
@nomiclabs/hardhat-ethers/signers
'
import
{
Contract
}
from
'
ethers
'
import
{
expect
}
from
'
../../setup
'
import
{
deploy
}
from
'
../../helpers
'
describe
(
'
AssetReceiver
'
,
()
=>
{
const
DEFAULT_TOKEN_ID
=
0
const
DEFAULT_AMOUNT
=
hre
.
ethers
.
constants
.
WeiPerEther
const
DEFAULT_RECIPIENT
=
'
0x
'
+
'
11
'
.
repeat
(
20
)
let
signer1
:
SignerWithAddress
let
signer2
:
SignerWithAddress
before
(
'
signer setup
'
,
async
()
=>
{
;[
signer1
,
signer2
]
=
await
hre
.
ethers
.
getSigners
()
})
let
TestERC20
:
Contract
let
TestERC721
:
Contract
let
AssetReceiver
:
Contract
beforeEach
(
'
deploy contracts
'
,
async
()
=>
{
TestERC20
=
await
deploy
(
'
TestERC20
'
,
{
signer
:
signer1
})
TestERC721
=
await
deploy
(
'
TestERC721
'
,
{
signer
:
signer1
})
AssetReceiver
=
await
deploy
(
'
AssetReceiver
'
,
{
signer
:
signer1
,
args
:
[
signer1
.
address
],
})
})
beforeEach
(
'
balance setup
'
,
async
()
=>
{
await
TestERC20
.
mint
(
signer1
.
address
,
hre
.
ethers
.
constants
.
MaxUint256
)
await
TestERC721
.
mint
(
signer1
.
address
,
DEFAULT_TOKEN_ID
)
await
hre
.
ethers
.
provider
.
send
(
'
hardhat_setBalance
'
,
[
DEFAULT_RECIPIENT
,
'
0x0
'
,
])
})
describe
(
'
receive
'
,
()
=>
{
it
(
'
should be able to receive ETH
'
,
async
()
=>
{
await
expect
(
signer1
.
sendTransaction
({
to
:
AssetReceiver
.
address
,
value
:
DEFAULT_AMOUNT
,
})
).
to
.
not
.
be
.
reverted
expect
(
await
hre
.
ethers
.
provider
.
getBalance
(
AssetReceiver
.
address
)
).
to
.
equal
(
DEFAULT_AMOUNT
)
})
})
describe
(
'
withdrawETH(address)
'
,
()
=>
{
describe
(
'
when called by authorized address
'
,
()
=>
{
it
(
'
should withdraw all ETH in the contract
'
,
async
()
=>
{
await
signer1
.
sendTransaction
({
to
:
AssetReceiver
.
address
,
value
:
DEFAULT_AMOUNT
,
})
await
expect
(
AssetReceiver
[
'
withdrawETH(address)
'
](
DEFAULT_RECIPIENT
))
.
to
.
emit
(
AssetReceiver
,
'
WithdrewETH
'
)
.
withArgs
(
signer1
.
address
,
DEFAULT_RECIPIENT
,
DEFAULT_AMOUNT
)
expect
(
await
hre
.
ethers
.
provider
.
getBalance
(
AssetReceiver
.
address
)
).
to
.
equal
(
0
)
expect
(
await
hre
.
ethers
.
provider
.
getBalance
(
DEFAULT_RECIPIENT
)
).
to
.
equal
(
DEFAULT_AMOUNT
)
})
})
describe
(
'
when called by not authorized address
'
,
()
=>
{
it
(
'
should revert
'
,
async
()
=>
{
await
expect
(
AssetReceiver
.
connect
(
signer2
)[
'
withdrawETH(address)
'
](
signer2
.
address
)
).
to
.
be
.
revertedWith
(
'
UNAUTHORIZED
'
)
})
})
})
describe
(
'
withdrawETH(address,uint256)
'
,
()
=>
{
describe
(
'
when called by authorized address
'
,
()
=>
{
it
(
'
should withdraw the given amount of ETH
'
,
async
()
=>
{
await
signer1
.
sendTransaction
({
to
:
AssetReceiver
.
address
,
value
:
DEFAULT_AMOUNT
.
mul
(
2
),
})
await
expect
(
AssetReceiver
[
'
withdrawETH(address,uint256)
'
](
DEFAULT_RECIPIENT
,
DEFAULT_AMOUNT
)
)
.
to
.
emit
(
AssetReceiver
,
'
WithdrewETH
'
)
.
withArgs
(
signer1
.
address
,
DEFAULT_RECIPIENT
,
DEFAULT_AMOUNT
)
expect
(
await
hre
.
ethers
.
provider
.
getBalance
(
AssetReceiver
.
address
)
).
to
.
equal
(
DEFAULT_AMOUNT
)
expect
(
await
hre
.
ethers
.
provider
.
getBalance
(
DEFAULT_RECIPIENT
)
).
to
.
equal
(
DEFAULT_AMOUNT
)
})
})
describe
(
'
when called by not authorized address
'
,
()
=>
{
it
(
'
should revert
'
,
async
()
=>
{
await
expect
(
AssetReceiver
.
connect
(
signer2
)[
'
withdrawETH(address,uint256)
'
](
DEFAULT_RECIPIENT
,
DEFAULT_AMOUNT
)
).
to
.
be
.
revertedWith
(
'
UNAUTHORIZED
'
)
})
})
})
describe
(
'
withdrawERC20(address,address)
'
,
()
=>
{
describe
(
'
when called by authorized address
'
,
()
=>
{
it
(
'
should withdraw all ERC20 balance held by the contract
'
,
async
()
=>
{
await
TestERC20
.
transfer
(
AssetReceiver
.
address
,
DEFAULT_AMOUNT
)
await
expect
(
AssetReceiver
[
'
withdrawERC20(address,address)
'
](
TestERC20
.
address
,
DEFAULT_RECIPIENT
)
)
.
to
.
emit
(
AssetReceiver
,
'
WithdrewERC20
'
)
.
withArgs
(
signer1
.
address
,
DEFAULT_RECIPIENT
,
TestERC20
.
address
,
DEFAULT_AMOUNT
)
expect
(
await
TestERC20
.
balanceOf
(
DEFAULT_RECIPIENT
)).
to
.
equal
(
DEFAULT_AMOUNT
)
})
})
describe
(
'
when called by not authorized address
'
,
()
=>
{
it
(
'
should revert
'
,
async
()
=>
{
await
expect
(
AssetReceiver
.
connect
(
signer2
)[
'
withdrawERC20(address,address)
'
](
TestERC20
.
address
,
DEFAULT_RECIPIENT
)
).
to
.
be
.
revertedWith
(
'
UNAUTHORIZED
'
)
})
})
})
describe
(
'
withdrawERC20(address,address,uint256)
'
,
()
=>
{
describe
(
'
when called by authorized address
'
,
()
=>
{
it
(
'
should withdraw the given ERC20 amount
'
,
async
()
=>
{
await
TestERC20
.
transfer
(
AssetReceiver
.
address
,
DEFAULT_AMOUNT
.
mul
(
2
))
await
expect
(
AssetReceiver
[
'
withdrawERC20(address,address,uint256)
'
](
TestERC20
.
address
,
DEFAULT_RECIPIENT
,
DEFAULT_AMOUNT
)
)
.
to
.
emit
(
AssetReceiver
,
'
WithdrewERC20
'
)
.
withArgs
(
signer1
.
address
,
DEFAULT_RECIPIENT
,
TestERC20
.
address
,
DEFAULT_AMOUNT
)
expect
(
await
TestERC20
.
balanceOf
(
DEFAULT_RECIPIENT
)).
to
.
equal
(
DEFAULT_AMOUNT
)
})
})
describe
(
'
when called by not authorized address
'
,
()
=>
{
it
(
'
should revert
'
,
async
()
=>
{
await
expect
(
AssetReceiver
.
connect
(
signer2
)[
'
withdrawERC20(address,address,uint256)
'
](
TestERC20
.
address
,
DEFAULT_RECIPIENT
,
DEFAULT_AMOUNT
)
).
to
.
be
.
revertedWith
(
'
UNAUTHORIZED
'
)
})
})
})
describe
(
'
withdrawERC721
'
,
()
=>
{
describe
(
'
when called by authorized address
'
,
()
=>
{
it
(
'
should withdraw the token
'
,
async
()
=>
{
await
TestERC721
.
transferFrom
(
signer1
.
address
,
AssetReceiver
.
address
,
DEFAULT_TOKEN_ID
)
await
expect
(
AssetReceiver
.
withdrawERC721
(
TestERC721
.
address
,
DEFAULT_RECIPIENT
,
DEFAULT_TOKEN_ID
)
)
.
to
.
emit
(
AssetReceiver
,
'
WithdrewERC721
'
)
.
withArgs
(
signer1
.
address
,
DEFAULT_RECIPIENT
,
TestERC721
.
address
,
DEFAULT_TOKEN_ID
)
expect
(
await
TestERC721
.
ownerOf
(
DEFAULT_TOKEN_ID
)).
to
.
equal
(
DEFAULT_RECIPIENT
)
})
})
describe
(
'
when called by not authorized address
'
,
()
=>
{
it
(
'
should revert
'
,
async
()
=>
{
await
expect
(
AssetReceiver
.
connect
(
signer2
).
withdrawERC721
(
TestERC721
.
address
,
DEFAULT_RECIPIENT
,
DEFAULT_TOKEN_ID
)
).
to
.
be
.
revertedWith
(
'
UNAUTHORIZED
'
)
})
})
})
})
packages/contracts-periphery/test/contracts/universal/Transactor.spec.ts
deleted
100644 → 0
View file @
d0c22cf5
import
hre
from
'
hardhat
'
import
{
SignerWithAddress
}
from
'
@nomiclabs/hardhat-ethers/signers
'
import
{
Contract
}
from
'
ethers
'
import
{
expect
}
from
'
../../setup
'
import
{
decodeSolidityRevert
,
deploy
}
from
'
../../helpers
'
describe
(
'
Transactor
'
,
()
=>
{
let
signer1
:
SignerWithAddress
let
signer2
:
SignerWithAddress
before
(
'
signer setup
'
,
async
()
=>
{
;[
signer1
,
signer2
]
=
await
hre
.
ethers
.
getSigners
()
})
let
CallRecorder
:
Contract
let
Reverter
:
Contract
let
Transactor
:
Contract
beforeEach
(
'
deploy contracts
'
,
async
()
=>
{
CallRecorder
=
await
deploy
(
'
CallRecorder
'
)
Reverter
=
await
deploy
(
'
Reverter
'
)
Transactor
=
await
deploy
(
'
Transactor
'
,
{
signer
:
signer1
,
args
:
[
signer1
.
address
],
})
})
describe
(
'
CALL
'
,
()
=>
{
describe
(
'
when called by authorized address
'
,
()
=>
{
it
(
'
should do a call to the target contract
'
,
async
()
=>
{
const
data
=
CallRecorder
.
interface
.
encodeFunctionData
(
'
record
'
)
await
Transactor
.
CALL
(
CallRecorder
.
address
,
data
,
0
,
{
gasLimit
:
2
_000_000
,
})
const
call
=
await
CallRecorder
.
lastCall
()
expect
(
call
.
data
).
to
.
equal
(
data
)
expect
(
call
.
sender
).
to
.
equal
(
Transactor
.
address
)
})
it
(
'
should be able to call with value
'
,
async
()
=>
{
const
data
=
CallRecorder
.
interface
.
encodeFunctionData
(
'
record
'
)
const
value
=
69
await
Transactor
.
CALL
(
CallRecorder
.
address
,
data
,
value
,
{
gasLimit
:
2
_000_000
,
value
,
})
const
call
=
await
CallRecorder
.
lastCall
()
expect
(
call
.
value
).
to
.
equal
(
value
)
})
})
describe
(
'
when called by not authorized address
'
,
()
=>
{
it
(
'
should be reverted
'
,
async
()
=>
{
const
data
=
CallRecorder
.
interface
.
encodeFunctionData
(
'
record
'
)
await
expect
(
Transactor
.
connect
(
signer2
).
CALL
(
CallRecorder
.
address
,
data
,
0
,
{
gasLimit
:
2
_000_000
,
})
).
to
.
be
.
revertedWith
(
'
UNAUTHORIZED
'
)
})
})
})
describe
(
'
DELEGATECALL
'
,
()
=>
{
describe
(
'
when called by authorized address
'
,
()
=>
{
it
(
'
should do a delegatecall to the target contract
'
,
async
()
=>
{
const
data
=
Reverter
.
interface
.
encodeFunctionData
(
'
doRevert
'
)
const
ret
=
await
Transactor
.
callStatic
.
DELEGATECALL
(
Reverter
.
address
,
data
,
{
gasLimit
:
2
_000_000
,
}
)
expect
(
ret
[
0
]).
to
.
equal
(
false
)
expect
(
decodeSolidityRevert
(
ret
[
1
])).
to
.
deep
.
equal
(
'
Reverter reverted
'
)
})
})
describe
(
'
when called by not authorized address
'
,
()
=>
{
it
(
'
should be reverted
'
,
async
()
=>
{
const
data
=
Reverter
.
interface
.
encodeFunctionData
(
'
doRevert
'
)
await
expect
(
Transactor
.
connect
(
signer2
).
DELEGATECALL
(
Reverter
.
address
,
data
,
{
gasLimit
:
2
_000_000
,
})
).
to
.
be
.
revertedWith
(
'
UNAUTHORIZED
'
)
})
})
})
})
packages/contracts-periphery/test/contracts/universal/drippie/dripchecks/CheckBalanceHigh.spec.ts
deleted
100644 → 0
View file @
d0c22cf5
import
hre
from
'
hardhat
'
import
{
Contract
}
from
'
ethers
'
import
{
toRpcHexString
}
from
'
@eth-optimism/core-utils
'
import
{
expect
}
from
'
../../../../setup
'
import
{
deploy
}
from
'
../../../../helpers
'
import
{
encodeDripCheckParams
}
from
'
../../../../../src
'
describe
(
'
CheckBalanceHigh
'
,
()
=>
{
const
RECIPIENT
=
'
0x
'
+
'
11
'
.
repeat
(
20
)
const
THRESHOLD
=
100
let
CheckBalanceHigh
:
Contract
before
(
async
()
=>
{
CheckBalanceHigh
=
await
deploy
(
'
CheckBalanceHigh
'
)
})
describe
(
'
check
'
,
()
=>
{
it
(
'
should return true when balance is above threshold
'
,
async
()
=>
{
await
hre
.
ethers
.
provider
.
send
(
'
hardhat_setBalance
'
,
[
RECIPIENT
,
toRpcHexString
(
THRESHOLD
+
1
),
])
expect
(
await
CheckBalanceHigh
.
check
(
encodeDripCheckParams
(
CheckBalanceHigh
.
interface
,
{
target
:
RECIPIENT
,
threshold
:
THRESHOLD
,
})
)
).
to
.
equal
(
true
)
})
it
(
'
should return false when balance is below threshold
'
,
async
()
=>
{
await
hre
.
ethers
.
provider
.
send
(
'
hardhat_setBalance
'
,
[
RECIPIENT
,
toRpcHexString
(
THRESHOLD
-
1
),
])
expect
(
await
CheckBalanceHigh
.
check
(
encodeDripCheckParams
(
CheckBalanceHigh
.
interface
,
{
target
:
RECIPIENT
,
threshold
:
THRESHOLD
,
})
)
).
to
.
equal
(
false
)
})
})
})
packages/contracts-periphery/test/contracts/universal/drippie/dripchecks/CheckBalanceLow.spec.ts
deleted
100644 → 0
View file @
d0c22cf5
import
hre
from
'
hardhat
'
import
{
Contract
}
from
'
ethers
'
import
{
toRpcHexString
}
from
'
@eth-optimism/core-utils
'
import
{
expect
}
from
'
../../../../setup
'
import
{
deploy
}
from
'
../../../../helpers
'
import
{
encodeDripCheckParams
}
from
'
../../../../../src
'
describe
(
'
CheckBalanceLow
'
,
()
=>
{
const
RECIPIENT
=
'
0x
'
+
'
11
'
.
repeat
(
20
)
const
THRESHOLD
=
100
let
CheckBalanceLow
:
Contract
before
(
async
()
=>
{
CheckBalanceLow
=
await
deploy
(
'
CheckBalanceLow
'
)
})
describe
(
'
check
'
,
()
=>
{
it
(
'
should return true when balance is below threshold
'
,
async
()
=>
{
await
hre
.
ethers
.
provider
.
send
(
'
hardhat_setBalance
'
,
[
RECIPIENT
,
toRpcHexString
(
THRESHOLD
-
1
),
])
expect
(
await
CheckBalanceLow
.
check
(
encodeDripCheckParams
(
CheckBalanceLow
.
interface
,
{
target
:
RECIPIENT
,
threshold
:
THRESHOLD
,
})
)
).
to
.
equal
(
true
)
})
it
(
'
should return false when balance is above threshold
'
,
async
()
=>
{
await
hre
.
ethers
.
provider
.
send
(
'
hardhat_setBalance
'
,
[
RECIPIENT
,
toRpcHexString
(
THRESHOLD
+
1
),
])
expect
(
await
CheckBalanceLow
.
check
(
encodeDripCheckParams
(
CheckBalanceLow
.
interface
,
{
target
:
RECIPIENT
,
threshold
:
THRESHOLD
,
})
)
).
to
.
equal
(
false
)
})
})
})
packages/contracts-periphery/test/contracts/universal/drippie/dripchecks/CheckGelatoLow.spec.ts
deleted
100644 → 0
View file @
d0c22cf5
import
{
Contract
}
from
'
ethers
'
import
{
smock
,
FakeContract
}
from
'
@defi-wonderland/smock
'
import
{
expect
}
from
'
../../../../setup
'
import
{
deploy
}
from
'
../../../../helpers
'
import
{
encodeDripCheckParams
}
from
'
../../../../../src
'
describe
(
'
CheckGelatoLow
'
,
()
=>
{
const
RECIPIENT
=
'
0x
'
+
'
11
'
.
repeat
(
20
)
const
THRESHOLD
=
100
let
CheckGelatoLow
:
Contract
let
FakeGelatoTresury
:
FakeContract
<
Contract
>
before
(
async
()
=>
{
CheckGelatoLow
=
await
deploy
(
'
CheckGelatoLow
'
)
FakeGelatoTresury
=
await
smock
.
fake
(
'
IGelatoTreasury
'
)
})
describe
(
'
check
'
,
()
=>
{
it
(
'
should return true when balance is below threshold
'
,
async
()
=>
{
FakeGelatoTresury
.
userTokenBalance
.
returns
(
THRESHOLD
-
1
)
expect
(
await
CheckGelatoLow
.
check
(
encodeDripCheckParams
(
CheckGelatoLow
.
interface
,
{
treasury
:
FakeGelatoTresury
.
address
,
threshold
:
THRESHOLD
,
recipient
:
RECIPIENT
,
})
)
).
to
.
equal
(
true
)
})
it
(
'
should return false when balance is above threshold
'
,
async
()
=>
{
FakeGelatoTresury
.
userTokenBalance
.
returns
(
THRESHOLD
+
1
)
expect
(
await
CheckGelatoLow
.
check
(
encodeDripCheckParams
(
CheckGelatoLow
.
interface
,
{
treasury
:
FakeGelatoTresury
.
address
,
threshold
:
THRESHOLD
,
recipient
:
RECIPIENT
,
})
)
).
to
.
equal
(
false
)
})
})
})
packages/contracts-periphery/test/contracts/universal/drippie/dripchecks/CheckTrue.spec.ts
deleted
100644 → 0
View file @
d0c22cf5
import
{
Contract
}
from
'
ethers
'
import
{
expect
}
from
'
../../../../setup
'
import
{
deploy
}
from
'
../../../../helpers
'
describe
(
'
CheckTrue
'
,
()
=>
{
let
CheckTrue
:
Contract
before
(
async
()
=>
{
CheckTrue
=
await
deploy
(
'
CheckTrue
'
)
})
describe
(
'
check
'
,
()
=>
{
it
(
'
should return true
'
,
async
()
=>
{
expect
(
await
CheckTrue
.
check
(
'
0x
'
)).
to
.
equal
(
true
)
})
})
})
packages/contracts-periphery/test/helpers/constants.ts
deleted
100644 → 0
View file @
d0c22cf5
export
const
NON_NULL_BYTES32
=
'
0x
'
+
'
11
'
.
repeat
(
32
)
export
const
NON_ZERO_ADDRESS
=
'
0x
'
+
'
11
'
.
repeat
(
20
)
packages/contracts-periphery/test/helpers/deploy.ts
deleted
100644 → 0
View file @
d0c22cf5
import
hre
from
'
hardhat
'
export
const
deploy
=
async
(
name
:
string
,
opts
?:
{
args
?:
any
[]
signer
?:
any
}
)
=>
{
const
factory
=
await
hre
.
ethers
.
getContractFactory
(
name
,
opts
?.
signer
)
return
factory
.
deploy
(...(
opts
?.
args
||
[]))
}
packages/contracts-periphery/test/helpers/index.ts
deleted
100644 → 0
View file @
d0c22cf5
export
*
from
'
./deploy
'
export
*
from
'
./solidity
'
export
*
from
'
./constants
'
packages/contracts-periphery/test/helpers/solidity.ts
deleted
100644 → 0
View file @
d0c22cf5
import
{
ethers
}
from
'
ethers
'
export
const
decodeSolidityRevert
=
(
revert
:
string
)
=>
{
const
iface
=
new
ethers
.
utils
.
Interface
([
{
inputs
:
[
{
internalType
:
'
string
'
,
name
:
'
message
'
,
type
:
'
string
'
,
},
],
name
:
'
Error
'
,
outputs
:
[],
stateMutability
:
'
nonpayable
'
,
type
:
'
function
'
,
},
])
return
iface
.
decodeFunctionData
(
'
Error
'
,
revert
)[
0
]
}
packages/contracts-periphery/test/setup.ts
deleted
100644 → 0
View file @
d0c22cf5
/* External Imports */
import
chai
=
require
(
'
chai
'
)
import
Mocha
from
'
mocha
'
import
{
solidity
}
from
'
ethereum-waffle
'
chai
.
use
(
solidity
)
const
should
=
chai
.
should
()
const
expect
=
chai
.
expect
export
{
should
,
expect
,
Mocha
}
packages/drippie-mon/src/index.ts
deleted
100644 → 0
View file @
d0c22cf5
export
*
from
'
./service
'
packages/sdk/tasks/deposit-erc20.ts
View file @
63ec5881
...
...
@@ -340,29 +340,44 @@ task('deposit-erc20', 'Deposits WETH9 onto L2.')
)
console
.
log
(
'
Finalizing withdrawal...
'
)
const
finalize
=
await
messenger
.
finalizeMessage
(
withdraw
)
// TODO: Update SDK to properly estimate gas
const
finalize
=
await
messenger
.
finalizeMessage
(
withdraw
,
{
overrides
:
{
gasLimit
:
500
_000
},
})
const
finalizeReceipt
=
await
finalize
.
wait
()
console
.
log
(
'
finalizeReceipt:
'
,
finalizeReceipt
)
console
.
log
(
`Took
${
Math
.
floor
(
Date
.
now
()
/
1000
)
-
now
}
seconds`
)
for
(
const
log
of
finalizeReceipt
.
logs
)
{
switch
(
log
.
address
)
{
case
OptimismPortal
.
address
:
{
const
parsed
=
OptimismPortal
.
interface
.
parseLog
(
log
)
console
.
log
(
`Log
${
parsed
.
name
}
from
${
log
.
address
}
`
)
console
.
log
(
`Log
${
parsed
.
name
}
from
OptimismPortal (
${
log
.
address
}
)
`
)
console
.
log
(
parsed
.
args
)
console
.
log
()
break
}
case
L1CrossDomainMessenger
.
address
:
{
const
parsed
=
L1CrossDomainMessenger
.
interface
.
parseLog
(
log
)
console
.
log
(
`Log
${
parsed
.
name
}
from
${
log
.
address
}
`
)
console
.
log
(
`Log
${
parsed
.
name
}
from L1CrossDomainMessenger (
${
log
.
address
}
)`
)
console
.
log
(
parsed
.
args
)
console
.
log
()
break
}
case
L1StandardBridge
.
address
:
{
const
parsed
=
L1StandardBridge
.
interface
.
parseLog
(
log
)
console
.
log
(
`Log
${
parsed
.
name
}
from
${
log
.
address
}
`
)
console
.
log
(
`Log
${
parsed
.
name
}
from L1StandardBridge (
${
log
.
address
}
)`
)
console
.
log
(
parsed
.
args
)
console
.
log
()
break
}
case
WETH9
.
address
:
{
const
parsed
=
WETH9
.
interface
.
parseLog
(
log
)
console
.
log
(
`Log
${
parsed
.
name
}
from WETH9 (
${
log
.
address
}
)`
)
console
.
log
(
parsed
.
args
)
console
.
log
()
break
...
...
@@ -378,7 +393,9 @@ task('deposit-erc20', 'Deposits WETH9 onto L2.')
const
expectedBalance
=
preBalance
.
add
(
utils
.
parseEther
(
'
1
'
))
if
(
!
expectedBalance
.
eq
(
postBalance
))
{
throw
new
Error
(
'
Balance mismatch
'
)
throw
new
Error
(
`Balance mismatch, expected:
${
expectedBalance
}
, actual:
${
postBalance
}
`
)
}
console
.
log
(
'
Withdrawal success
'
)
})
packages/sdk/tasks/deposit-eth.ts
View file @
63ec5881
...
...
@@ -374,7 +374,10 @@ task('deposit-eth', 'Deposits ether to L2.')
console
.
log
(
parsed
.
name
)
console
.
log
(
parsed
.
args
)
console
.
log
()
if
(
parsed
.
name
!==
'
ETHBridgeFinalized
'
)
{
if
(
parsed
.
name
!==
'
ETHBridgeFinalized
'
&&
parsed
.
name
!==
'
ETHWithdrawalFinalized
'
)
{
throw
new
Error
(
'
Wrong event name from L1StandardBridge
'
)
}
if
(
!
parsed
.
args
.
amount
.
eq
(
withdrawAmount
))
{
...
...
specs/README.md
View file @
63ec5881
...
...
@@ -27,9 +27,10 @@ Our aim is to design a protocol specification that is:
-
**Fast:**
When users send transactions, they get reliable confirmations with low-latency.
For example when swapping on Uniswap you should see that your transaction succeed in less than 2
seconds.
-
**Scalable:**
It should be possible to handle an enormous number of transactions per second which
will enable us to charge low fees. V1.0 will enable us to scale up to and even past the gas limit
on L1. Later iterations will scale much further.
-
**Scalable:**
It should be possible to handle an enormous number of transactions
per second which will enable the system to charge low fees.
V1.0 will enable Optimism to scale up to and even past the gas limit on L1.
Later iterations should scale much further.
-
**Modular:**
Our designs will use modularity to reduce complexity and enable parallel
contributions. Coming up with good conceptual frameworks & composable atoms of software enables us
to build extremely complex software even when any one person cannot hold that much in their brain.
...
...
@@ -41,8 +42,9 @@ Our aim is to design a protocol specification that is:
our software to avoid creating a system no one wants to use.
-
**Clear and Readable:**
The specs we write are written to be read. So tight feedback loop with the
systems team consuming the spec is also key!
-
**Secure:**
This is self-evident. We cannot lose money and in a system where even a bit of
downtime can result in loss of funds this means everything we build must be incredibly secure.
-
**Decentralizable:**
Everything we build must have a clear path towards decentralization. Today
Optimism relies on OptimismPBC to function, but eventually it will be managed by a DAO and even in
that decentralized future our system must thrive.
-
**Secure:**
This is self-evident.
User’s assets are at stake. Every component of the system must be incredibly secure.
-
**Decentralizable:**
Optimism must be designed to avail itself of the security and
censorship-resistant guarantees achieved by a decentralized system.
Currently centralized components of the system should have a clear path towards decentralization.
Already decentralized components of the system should be protected and preserved.
specs/exec-engine.md
View file @
63ec5881
...
...
@@ -48,8 +48,10 @@ Deposited transactions MUST never be consumed from the transaction pool.
## Engine API
<!--
*
Note: the
[
Engine API
][
l1-api-spec
]
is in alpha,
`v1.0.0-alpha.5`
.
There may be subtle tweaks, beta starts in a few weeks
*
-->
### `engine_forkchoiceUpdatedV1`
...
...
specs/introduction.md
View file @
63ec5881
...
...
@@ -91,9 +91,11 @@ At the heart of the network are users (us!). Users can:
### Sequencers
The sequencer is the primary block producer. There may be one sequencer
**or**
many using a consensus protocol. For
1.
0.0, there is just one sequencer. In general, specifications may use "the sequencer" to be a stand-in term for the
consensus protocol operated by multiple sequencers.
The sequencer is the primary block producer.
There may be one sequencer
**or**
many using a consensus protocol.
For 1.0.0, there is just one sequencer (currently operated under the oversight of the Optimism Foundation).
In general, specifications may use "the sequencer" to be a stand-in term
for the consensus protocol operated by multiple sequencers.
The sequencer:
...
...
@@ -125,21 +127,21 @@ provide context when diving into any particular component specification.
### Depositing and Sending Transactions
Users will often begin their L2 journey by depositing ETH from L1.
Once they have ETH to pay fees, they'll start
sending transactions on L2. The following diagram demonstrates this interaction and all key Optimism
components which ar
e utilized:
Users will often begin their L2 journey by depositing ETH from L1.
Once they have ETH to pay fees, they'll start sending transactions on L2.
The following diagram demonstrates this interaction and all key Optimism components which are or should b
e utilized:

Links to components mentioned in this diagram:
-
Batch Inbox (WIP)
<!-- - Batch Inbox (WIP) -->
-
[
Rollup Node
](
./rollup-node.md
)
-
[
Execution Engine
](
./exec-engine.md
)
-
Sequencer Batch Submitter (WIP)
<!-- - Sequencer Batch Submitter (WIP) -->
-
[
L2 Output Oracle
](
./proposals.md#l2-output-oracle-smart-contract
)
-
[
L2 Output Submitter
](
./proposals.md#proposing-l2-output-commitments
)
-
Fault Proof VM (WIP)
<!-- - Fault Proof VM (WIP) -->
### Withdrawing
...
...
specs/predeploys.md
View file @
63ec5881
...
...
@@ -108,12 +108,11 @@ permissionlessly removed from the L2 supply by calling the `burn()` function.
Address:
`0x4200000000000000000000000000000000000002`
The
`DeployerWhitelist`
is a predeploy that was used to provide additional
safety during the initial phases of Optimism. It is owned by the
Optimism foundation and defines the accounts that are allowed to deploy contracts to the
network.
The
`DeployerWhitelist`
is a predeploy that was used to provide additional safety
during the initial phases of Optimism.
It previously defined the accounts that are allowed to deploy contracts to the network.
Arbitrary contract deployment
has been
enabled and it is not possible to turn
Arbitrary contract deployment
was subsequently
enabled and it is not possible to turn
off. In the legacy system, this contract was hooked into
`CREATE`
and
`CREATE2`
to ensure that the deployer was allowlisted.
...
...
@@ -263,9 +262,9 @@ have the ability to upgrade any of the other predeploy contracts.
Address:
`0x4200000000000000000000000000000000000011`
The
`SequencerFeeVault`
accumulates any transaction
tips
and is the value of
`block.coinbase`
.
When enough fees accumulate in this account, they can be
permissionlessly
withdrawn to an immutable L1 address.
The
`SequencerFeeVault`
accumulates any transaction
priority fee
and is the value of
`block.coinbase`
.
When enough fees accumulate in this account, they can be
withdrawn to an immutable L1 address.
To change the L1 address that fees are withdrawn to, the contract must be
upgraded by changing its proxy's implementation key.
...
...
@@ -300,7 +299,7 @@ Address: `0x4200000000000000000000000000000000000019`
The
`BaseFeeVault`
predeploy receives the basefees on L2. The basefee is not
burnt on L2 like it is on L1. Once the contract has received a certain amount
of fees, the ETH can be
permissionlessly
withdrawn to an immutable address on
of fees, the ETH can be withdrawn to an immutable address on
L1.
## L1FeeVault
...
...
@@ -311,4 +310,4 @@ Address: `0x420000000000000000000000000000000000001a`
The
`L1FeeVault`
predeploy receives the L1 portion of the transaction fees.
Once the contract has received a certain amount of fees, the ETH can be
permissionlessly
withdrawn to an immutable address on L1.
withdrawn to an immutable address on L1.
specs/proposals.md
View file @
63ec5881
...
...
@@ -26,7 +26,8 @@ proving any piece of data captured by the outputs.
Proposers submit the output roots to L1 and can be contested with a fault proof,
with a bond at stake if the proof is wrong.
_Note_
: Although fault proof construction and verification
[
is implemented in Cannon
][
cannon
]
,
_Note_
: Fault proofs on Optimism are not fully specified at this time. Although fault proof
construction and verification
[
is implemented in Cannon
][
cannon
]
,
the fault proof game specification and integration of a output-root challenger into the
[
rollup-node
][
g-rollup-node
]
are part of later specification milestones.
...
...
@@ -50,7 +51,7 @@ The proposer may also delete multiple output roots by calling the `deleteL2Outpu
index of the first output to delete, this will also delete all subsequent outputs.
> **Note regarding future work:** In the initial version of the system, the proposer will be the same entity as the
> sequencer, which is a trusted role. In the future proposers
will
need to submit a bond in order to post L2 output
> sequencer, which is a trusted role. In the future proposers
may
need to submit a bond in order to post L2 output
> roots, and some or all of this bond may be taken in the event of a faulty proposal.
## L2 Output Commitment Construction
...
...
specs/rollup-node.md
View file @
63ec5881
...
...
@@ -55,8 +55,8 @@ For a complete specification of the L2 block derivation, refer to the [L2 block
## L2 Output RPC method
The Rollup node has its own RPC method,
`optimism_outputAtBlock`
which returns
the
a 32
byte hash corresponding to the
[
L2 output root
](
./proposals.md#l2-output-commitment-construction
)
.
The Rollup node has its own RPC method,
`optimism_outputAtBlock`
which returns
a 32
byte hash corresponding to the
[
L2 output root
](
./proposals.md#l2-output-commitment-construction
)
.
[
SSZ
]:
https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md
...
...
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