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
09eb322e
Unverified
Commit
09eb322e
authored
Sep 23, 2021
by
Kelvin Fichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint: fix
parent
3c56126c
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
98 additions
and
224 deletions
+98
-224
env.ts
integration-tests/test/shared/env.ts
+1
-3
package.json
package.json
+1
-1
007-OVM_L1CrossDomainMessenger.deploy.ts
...contracts/deploy/007-OVM_L1CrossDomainMessenger.deploy.ts
+1
-4
009-Proxy__OVM_L1StandardBridge.deploy.ts
...ontracts/deploy/009-Proxy__OVM_L1StandardBridge.deploy.ts
+1
-4
connect-contracts.ts
packages/contracts/src/connect-contracts.ts
+2
-6
L1CrossDomainMessenger.spec.ts
...est/contracts/L1/messaging/L1CrossDomainMessenger.spec.ts
+16
-67
L1StandardBridge.spec.ts
...acts/test/contracts/L1/messaging/L1StandardBridge.spec.ts
+2
-6
CanonicalTransactionChain.gas.spec.ts
...contracts/L1/rollup/CanonicalTransactionChain.gas.spec.ts
+8
-11
CanonicalTransactionChain.spec.ts
...est/contracts/L1/rollup/CanonicalTransactionChain.spec.ts
+46
-85
StateCommitmentChain.spec.ts
...cts/test/contracts/L1/rollup/StateCommitmentChain.spec.ts
+5
-9
L2CrossDomainMessenger.spec.ts
...est/contracts/L2/messaging/L2CrossDomainMessenger.spec.ts
+10
-10
L2StandardBridge.spec.ts
...acts/test/contracts/L2/messaging/L2StandardBridge.spec.ts
+3
-12
OVM_SequencerFeeVault.spec.ts
...est/contracts/L2/predeploys/OVM_SequencerFeeVault.spec.ts
+2
-6
No files found.
integration-tests/test/shared/env.ts
View file @
09eb322e
...
...
@@ -101,9 +101,7 @@ export class OptimismEnv {
.
connect
(
l2Wallet
)
.
attach
(
predeploys
.
OVM_GasPriceOracle
)
const
sccAddress
=
await
addressManager
.
getAddress
(
'
StateCommitmentChain
'
)
const
sccAddress
=
await
addressManager
.
getAddress
(
'
StateCommitmentChain
'
)
const
scc
=
getContractFactory
(
'
StateCommitmentChain
'
)
.
connect
(
l1Wallet
)
.
attach
(
sccAddress
)
...
...
package.json
View file @
09eb322e
...
...
@@ -45,7 +45,7 @@
"test:coverage"
:
"yarn lerna run test:coverage --parallel"
,
"lint"
:
"yarn lerna run lint"
,
"lint:check"
:
"yarn lerna run lint:check"
,
"lint:fix"
:
"yarn lerna run lint:fix"
,
"lint:fix"
:
"yarn lerna run lint:fix
--parallel
"
,
"postinstall"
:
"patch-package"
,
"ready"
:
"yarn lint && yarn test"
,
"prepare"
:
"husky install"
,
...
...
packages/contracts/deploy/007-OVM_L1CrossDomainMessenger.deploy.ts
View file @
09eb322e
...
...
@@ -50,10 +50,7 @@ const deployFn: DeployFunction = async (hre) => {
)
}
await
Lib_AddressManager
.
setAddress
(
'
L1CrossDomainMessenger
'
,
result
.
address
)
await
Lib_AddressManager
.
setAddress
(
'
L1CrossDomainMessenger
'
,
result
.
address
)
}
deployFn
.
dependencies
=
[
'
Lib_AddressManager
'
]
...
...
packages/contracts/deploy/009-Proxy__OVM_L1StandardBridge.deploy.ts
View file @
09eb322e
...
...
@@ -94,10 +94,7 @@ const deployFn: DeployFunction = async (hre) => {
await
Proxy__WithChugSplashInterface
.
setOwner
(
addressManagerOwner
)
// Todo: remove this after adding chugsplash proxy
await
Lib_AddressManager
.
setAddress
(
'
Proxy__L1StandardBridge
'
,
result
.
address
)
await
Lib_AddressManager
.
setAddress
(
'
Proxy__L1StandardBridge
'
,
result
.
address
)
}
deployFn
.
dependencies
=
[
'
Lib_AddressManager
'
,
'
L1StandardBridge
'
]
...
...
packages/contracts/src/connect-contracts.ts
View file @
09eb322e
...
...
@@ -62,13 +62,9 @@ export const connectL1Contracts = async (
return
{
addressManager
:
getEthersContract
(
'
Lib_AddressManager
'
),
canonicalTransactionChain
:
getEthersContract
(
'
CanonicalTransactionChain
'
),
canonicalTransactionChain
:
getEthersContract
(
'
CanonicalTransactionChain
'
),
stateCommitmentChain
:
getEthersContract
(
'
StateCommitmentChain
'
),
xDomainMessengerProxy
:
getEthersContract
(
'
Proxy__L1CrossDomainMessenger
'
),
xDomainMessengerProxy
:
getEthersContract
(
'
Proxy__L1CrossDomainMessenger
'
),
bondManager
:
getEthersContract
(
'
mockBondManager
'
),
}
}
...
...
packages/contracts/test/contracts/L1/messaging/L1CrossDomainMessenger.spec.ts
View file @
09eb322e
...
...
@@ -96,8 +96,7 @@ describe('L1CrossDomainMessenger', () => {
Factory__L1CrossDomainMessenger
=
await
ethers
.
getContractFactory
(
'
L1CrossDomainMessenger
'
)
CanonicalTransactionChain
=
await
Factory__CanonicalTransactionChain
.
deploy
(
CanonicalTransactionChain
=
await
Factory__CanonicalTransactionChain
.
deploy
(
AddressManager
.
address
,
FORCE_INCLUSION_PERIOD_SECONDS
,
FORCE_INCLUSION_PERIOD_BLOCKS
,
...
...
@@ -131,8 +130,7 @@ describe('L1CrossDomainMessenger', () => {
let
L1CrossDomainMessenger
:
Contract
beforeEach
(
async
()
=>
{
const
xDomainMessengerImpl
=
await
Factory__L1CrossDomainMessenger
.
deploy
()
const
xDomainMessengerImpl
=
await
Factory__L1CrossDomainMessenger
.
deploy
()
// We use an upgradable proxy for the XDomainMessenger--deploy & set up the proxy.
L1CrossDomainMessenger
=
await
deployProxyXDomainMessenger
(
AddressManager
,
...
...
@@ -366,13 +364,7 @@ describe('L1CrossDomainMessenger', () => {
}
await
expect
(
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof1
)
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof1
)
).
to
.
be
.
revertedWith
(
'
Provided message could not be verified.
'
)
})
...
...
@@ -410,13 +402,7 @@ describe('L1CrossDomainMessenger', () => {
}
await
expect
(
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof1
)
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof1
)
).
to
.
be
.
revertedWith
(
'
Provided message could not be verified.
'
)
})
...
...
@@ -493,13 +479,7 @@ describe('L1CrossDomainMessenger', () => {
)
await
expect
(
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
).
to
.
be
.
revertedWith
(
'
Provided message has already been received.
'
)
})
...
...
@@ -507,20 +487,13 @@ describe('L1CrossDomainMessenger', () => {
await
L1CrossDomainMessenger
.
pause
()
await
expect
(
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
).
to
.
be
.
revertedWith
(
'
Pausable: paused
'
)
})
describe
(
'
blockMessage and allowMessage
'
,
()
=>
{
it
(
'
should revert if called by an account other than the owner
'
,
async
()
=>
{
const
L1CrossDomainMessenger2
=
L1CrossDomainMessenger
.
connect
(
signer2
)
const
L1CrossDomainMessenger2
=
L1CrossDomainMessenger
.
connect
(
signer2
)
await
expect
(
L1CrossDomainMessenger2
.
blockMessage
(
keccak256
(
calldata
))
).
to
.
be
.
revertedWith
(
'
Ownable: caller is not the owner
'
)
...
...
@@ -534,13 +507,7 @@ describe('L1CrossDomainMessenger', () => {
await
L1CrossDomainMessenger
.
blockMessage
(
keccak256
(
calldata
))
await
expect
(
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
).
to
.
be
.
revertedWith
(
'
Provided message has been blocked.
'
)
})
...
...
@@ -548,25 +515,13 @@ describe('L1CrossDomainMessenger', () => {
await
L1CrossDomainMessenger
.
blockMessage
(
keccak256
(
calldata
))
await
expect
(
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
).
to
.
be
.
revertedWith
(
'
Provided message has been blocked.
'
)
await
L1CrossDomainMessenger
.
allowMessage
(
keccak256
(
calldata
))
await
expect
(
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
).
to
.
not
.
be
.
reverted
})
})
...
...
@@ -580,13 +535,7 @@ describe('L1CrossDomainMessenger', () => {
)
await
expect
(
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
L1CrossDomainMessenger
.
relayMessage
(
target
,
sender
,
message
,
0
,
proof
)
).
to
.
be
.
revertedWith
(
'
Only OVM_L2MessageRelayer can relay L2-to-L1 messages.
'
)
...
...
packages/contracts/test/contracts/L1/messaging/L1StandardBridge.spec.ts
View file @
09eb322e
...
...
@@ -298,9 +298,7 @@ describe('L1StandardBridge', () => {
expect
(
depositerBalance
).
to
.
equal
(
INITIAL_TOTAL_L1_SUPPLY
-
depositAmount
)
// bridge's balance is increased
const
bridgeBalance
=
await
L1ERC20
.
balanceOf
(
L1StandardBridge
.
address
)
const
bridgeBalance
=
await
L1ERC20
.
balanceOf
(
L1StandardBridge
.
address
)
expect
(
bridgeBalance
).
to
.
equal
(
depositAmount
)
// Check the correct cross-chain call was sent:
...
...
@@ -339,9 +337,7 @@ describe('L1StandardBridge', () => {
expect
(
depositerBalance
).
to
.
equal
(
INITIAL_TOTAL_L1_SUPPLY
-
depositAmount
)
// bridge's balance is increased
const
bridgeBalance
=
await
L1ERC20
.
balanceOf
(
L1StandardBridge
.
address
)
const
bridgeBalance
=
await
L1ERC20
.
balanceOf
(
L1StandardBridge
.
address
)
expect
(
bridgeBalance
).
to
.
equal
(
depositAmount
)
// Check the correct cross-chain call was sent:
...
...
packages/contracts/test/contracts/L1/rollup/CanonicalTransactionChain.gas.spec.ts
View file @
09eb322e
...
...
@@ -81,8 +81,7 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
// Use a larger FIP for blocks so that we can send a large number of
// enqueue() transactions without having to manipulate the block number.
const
forceInclusionPeriodBlocks
=
101
CanonicalTransactionChain
=
await
Factory__CanonicalTransactionChain
.
deploy
(
CanonicalTransactionChain
=
await
Factory__CanonicalTransactionChain
.
deploy
(
AddressManager
.
address
,
FORCE_INCLUSION_PERIOD_SECONDS
,
forceInclusionPeriodBlocks
,
...
...
@@ -116,8 +115,7 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
describe
(
'
appendSequencerBatch [ @skip-on-coverage ]
'
,
()
=>
{
beforeEach
(()
=>
{
CanonicalTransactionChain
=
CanonicalTransactionChain
.
connect
(
sequencer
)
CanonicalTransactionChain
=
CanonicalTransactionChain
.
connect
(
sequencer
)
})
it
(
'
200 transactions in a single context
'
,
async
()
=>
{
...
...
@@ -255,8 +253,7 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
let
ENQUEUE_L2_GAS_PREPAID
let
data
beforeEach
(
async
()
=>
{
CanonicalTransactionChain
=
CanonicalTransactionChain
.
connect
(
sequencer
)
CanonicalTransactionChain
=
CanonicalTransactionChain
.
connect
(
sequencer
)
ENQUEUE_L2_GAS_PREPAID
=
await
CanonicalTransactionChain
.
ENQUEUE_L2_GAS_PREPAID
()
data
=
'
0x
'
+
'
12
'
.
repeat
(
1234
)
...
...
packages/contracts/test/contracts/L1/rollup/CanonicalTransactionChain.spec.ts
View file @
09eb322e
...
...
@@ -128,8 +128,7 @@ describe('CanonicalTransactionChain', () => {
let
CanonicalTransactionChain
:
Contract
beforeEach
(
async
()
=>
{
CanonicalTransactionChain
=
await
Factory__CanonicalTransactionChain
.
deploy
(
CanonicalTransactionChain
=
await
Factory__CanonicalTransactionChain
.
deploy
(
AddressManager
.
address
,
FORCE_INCLUSION_PERIOD_SECONDS
,
FORCE_INCLUSION_PERIOD_BLOCKS
,
...
...
@@ -353,11 +352,7 @@ describe('CanonicalTransactionChain', () => {
data
)
await
CanonicalTransactionChain
.
enqueue
(
target
,
gasLimit
,
data
)
await
CanonicalTransactionChain
.
enqueue
(
target
,
gasLimit
,
data
)
}
else
{
await
CanonicalTransactionChain
.
enqueue
(
target
,
...
...
@@ -400,11 +395,7 @@ describe('CanonicalTransactionChain', () => {
data
)
await
CanonicalTransactionChain
.
enqueue
(
target
,
gasLimit
,
data
)
await
CanonicalTransactionChain
.
enqueue
(
target
,
gasLimit
,
data
)
}
else
{
await
CanonicalTransactionChain
.
enqueue
(
target
,
...
...
@@ -459,20 +450,14 @@ describe('CanonicalTransactionChain', () => {
describe
(
`when the queue has
${
size
}
elements`
,
()
=>
{
beforeEach
(
async
()
=>
{
for
(
let
i
=
0
;
i
<
size
;
i
++
)
{
await
CanonicalTransactionChain
.
enqueue
(
target
,
gasLimit
,
data
)
await
CanonicalTransactionChain
.
enqueue
(
target
,
gasLimit
,
data
)
}
})
describe
(
'
when the sequencer inclusion period has not passed
'
,
()
=>
{
it
(
'
should revert if not called by the sequencer
'
,
async
()
=>
{
await
expect
(
CanonicalTransactionChain
.
connect
(
signer
).
appendQueueBatch
(
1
)
CanonicalTransactionChain
.
connect
(
signer
).
appendQueueBatch
(
1
)
).
to
.
be
.
revertedWith
(
'
Queue transactions cannot be submitted during the sequencer inclusion period.
'
)
...
...
@@ -480,9 +465,7 @@ describe('CanonicalTransactionChain', () => {
it
(
'
should succeed if called by the sequencer
'
,
async
()
=>
{
await
expect
(
CanonicalTransactionChain
.
connect
(
sequencer
).
appendQueueBatch
(
1
)
CanonicalTransactionChain
.
connect
(
sequencer
).
appendQueueBatch
(
1
)
)
.
to
.
emit
(
CanonicalTransactionChain
,
'
QueueBatchAppended
'
)
.
withArgs
(
0
,
1
,
1
)
...
...
@@ -510,9 +493,7 @@ describe('CanonicalTransactionChain', () => {
})
it
(
`should be able to append
${
size
}
elements even if attempting to append
${
size
}
+ 1 elements`
,
async
()
=>
{
await
expect
(
CanonicalTransactionChain
.
appendQueueBatch
(
size
+
1
)
)
await
expect
(
CanonicalTransactionChain
.
appendQueueBatch
(
size
+
1
))
.
to
.
emit
(
CanonicalTransactionChain
,
'
QueueBatchAppended
'
)
.
withArgs
(
0
,
size
,
size
)
})
...
...
@@ -534,9 +515,7 @@ describe('CanonicalTransactionChain', () => {
const
blockNumber
=
await
ethers
.
provider
.
getBlockNumber
()
await
appendSequencerBatch
(
CanonicalTransactionChain
.
connect
(
sequencer
),
{
await
appendSequencerBatch
(
CanonicalTransactionChain
.
connect
(
sequencer
),
{
shouldStartAtElement
:
0
,
totalElementsToAppend
:
1
,
contexts
:
[
...
...
@@ -548,8 +527,7 @@ describe('CanonicalTransactionChain', () => {
},
],
transactions
:
[],
}
)
})
expect
(
await
CanonicalTransactionChain
.
verifyTransaction
(
...
...
@@ -638,9 +616,7 @@ describe('CanonicalTransactionChain', () => {
const
timestamp
=
(
await
getEthTime
(
ethers
.
provider
))
-
10
const
blockNumber
=
(
await
ethers
.
provider
.
getBlockNumber
())
-
1
await
appendSequencerBatch
(
CanonicalTransactionChain
.
connect
(
sequencer
),
{
await
appendSequencerBatch
(
CanonicalTransactionChain
.
connect
(
sequencer
),
{
shouldStartAtElement
:
0
,
totalElementsToAppend
:
1
,
contexts
:
[
...
...
@@ -652,8 +628,7 @@ describe('CanonicalTransactionChain', () => {
},
],
transactions
:
[
data
],
}
)
})
expect
(
await
CanonicalTransactionChain
.
verifyTransaction
(
...
...
@@ -691,8 +666,7 @@ describe('CanonicalTransactionChain', () => {
describe
(
'
appendSequencerBatch
'
,
()
=>
{
beforeEach
(()
=>
{
CanonicalTransactionChain
=
CanonicalTransactionChain
.
connect
(
sequencer
)
CanonicalTransactionChain
=
CanonicalTransactionChain
.
connect
(
sequencer
)
})
it
(
'
should revert if expected start does not match current total batches
'
,
async
()
=>
{
...
...
@@ -853,10 +827,7 @@ describe('CanonicalTransactionChain', () => {
totalElementsToAppend
:
size
,
})
)
.
to
.
emit
(
CanonicalTransactionChain
,
'
SequencerBatchAppended
'
)
.
to
.
emit
(
CanonicalTransactionChain
,
'
SequencerBatchAppended
'
)
.
withArgs
(
0
,
0
,
size
)
})
})
...
...
@@ -865,11 +836,7 @@ describe('CanonicalTransactionChain', () => {
describe
(
'
when inserting queue elements in between
'
,
()
=>
{
beforeEach
(
async
()
=>
{
for
(
let
i
=
0
;
i
<
size
;
i
++
)
{
await
CanonicalTransactionChain
.
enqueue
(
target
,
gasLimit
,
data
)
await
CanonicalTransactionChain
.
enqueue
(
target
,
gasLimit
,
data
)
}
})
...
...
@@ -904,10 +871,7 @@ describe('CanonicalTransactionChain', () => {
totalElementsToAppend
:
size
*
2
,
})
)
.
to
.
emit
(
CanonicalTransactionChain
,
'
SequencerBatchAppended
'
)
.
to
.
emit
(
CanonicalTransactionChain
,
'
SequencerBatchAppended
'
)
.
withArgs
(
0
,
size
,
size
*
2
)
})
})
...
...
@@ -944,10 +908,7 @@ describe('CanonicalTransactionChain', () => {
totalElementsToAppend
:
size
+
spacing
,
})
)
.
to
.
emit
(
CanonicalTransactionChain
,
'
SequencerBatchAppended
'
)
.
to
.
emit
(
CanonicalTransactionChain
,
'
SequencerBatchAppended
'
)
.
withArgs
(
0
,
spacing
,
size
+
spacing
)
})
})
...
...
@@ -993,9 +954,9 @@ describe('CanonicalTransactionChain', () => {
})
it
(
`should return
${
size
}
`
,
async
()
=>
{
expect
(
await
CanonicalTransactionChain
.
getTotalElements
()
)
.
to
.
equal
(
size
)
expect
(
await
CanonicalTransactionChain
.
getTotalElements
()).
to
.
equal
(
size
)
})
})
}
...
...
packages/contracts/test/contracts/L1/rollup/StateCommitmentChain.spec.ts
View file @
09eb322e
...
...
@@ -43,11 +43,7 @@ describe('StateCommitmentChain', () => {
await
ethers
.
getContractFactory
(
'
BondManager
'
)
)
await
setProxyTarget
(
AddressManager
,
'
BondManager
'
,
Mock__BondManager
)
await
setProxyTarget
(
AddressManager
,
'
BondManager
'
,
Mock__BondManager
)
Mock__BondManager
.
smocked
.
isCollateralized
.
will
.
return
.
with
(
true
)
...
...
@@ -141,8 +137,8 @@ describe('StateCommitmentChain', () => {
})
it
(
'
should append the state batch
'
,
async
()
=>
{
await
expect
(
StateCommitmentChain
.
appendStateBatch
(
batch
,
0
)).
to
.
not
.
be
.
reverted
await
expect
(
StateCommitmentChain
.
appendStateBatch
(
batch
,
0
)).
to
.
not
.
be
.
reverted
})
})
...
...
@@ -259,8 +255,8 @@ describe('StateCommitmentChain', () => {
describe
(
'
when the provided batch header is valid
'
,
()
=>
{
it
(
'
should remove the batch and all following batches
'
,
async
()
=>
{
await
expect
(
StateCommitmentChain
.
deleteStateBatch
(
batchHeader
))
.
to
.
not
.
be
.
reverted
await
expect
(
StateCommitmentChain
.
deleteStateBatch
(
batchHeader
))
.
to
.
not
.
be
.
reverted
})
})
})
...
...
packages/contracts/test/contracts/L2/messaging/L2CrossDomainMessenger.spec.ts
View file @
09eb322e
...
...
@@ -51,8 +51,7 @@ describe('L2CrossDomainMessenger', () => {
let
L2CrossDomainMessenger
:
Contract
beforeEach
(
async
()
=>
{
L2CrossDomainMessenger
=
await
Factory__L2CrossDomainMessenger
.
deploy
(
L2CrossDomainMessenger
=
await
Factory__L2CrossDomainMessenger
.
deploy
(
Mock__L1CrossDomainMessenger
.
address
)
})
...
...
@@ -188,10 +187,12 @@ describe('L2CrossDomainMessenger', () => {
)
const
reentrantMessage
=
L2CrossDomainMessenger
.
interface
.
encodeFunctionData
(
'
relayMessage
'
,
[
target
,
sender
,
message
,
1
]
)
L2CrossDomainMessenger
.
interface
.
encodeFunctionData
(
'
relayMessage
'
,
[
target
,
sender
,
message
,
1
,
])
// Calculate xDomainCallData used for indexing
// (within the first call to the L2 Messenger).
...
...
@@ -233,8 +234,7 @@ describe('L2CrossDomainMessenger', () => {
]
)
expect
(
await
L2CrossDomainMessenger
.
relayedMessages
(
relayId
)).
to
.
be
.
true
expect
(
await
L2CrossDomainMessenger
.
relayedMessages
(
relayId
)).
to
.
be
.
true
// Criteria 3: the target contract did not receive a call.
expect
(
Mock__TargetContract
.
smocked
.
setTarget
.
calls
[
0
]).
to
.
be
.
undefined
...
...
packages/contracts/test/contracts/L2/messaging/L2StandardBridge.spec.ts
View file @
09eb322e
...
...
@@ -66,12 +66,7 @@ describe('L2StandardBridge', () => {
// Deploy an L2 ERC20
L2ERC20
=
await
(
await
ethers
.
getContractFactory
(
'
L2StandardERC20
'
,
alice
)
).
deploy
(
L2StandardBridge
.
address
,
DUMMY_L1TOKEN_ADDRESS
,
'
L2Token
'
,
'
L2T
'
)
).
deploy
(
L2StandardBridge
.
address
,
DUMMY_L1TOKEN_ADDRESS
,
'
L2Token
'
,
'
L2T
'
)
})
// test the transfer flow of moving a token from L2 to L1
...
...
@@ -133,9 +128,7 @@ describe('L2StandardBridge', () => {
()
=>
DUMMY_L1BRIDGE_ADDRESS
)
await
L2StandardBridge
.
connect
(
l2MessengerImpersonator
).
finalizeDeposit
(
await
L2StandardBridge
.
connect
(
l2MessengerImpersonator
).
finalizeDeposit
(
DUMMY_L1TOKEN_ADDRESS
,
NonCompliantERC20
.
address
,
aliceAddress
,
...
...
@@ -173,9 +166,7 @@ describe('L2StandardBridge', () => {
()
=>
DUMMY_L1BRIDGE_ADDRESS
)
await
L2StandardBridge
.
connect
(
l2MessengerImpersonator
).
finalizeDeposit
(
await
L2StandardBridge
.
connect
(
l2MessengerImpersonator
).
finalizeDeposit
(
DUMMY_L1TOKEN_ADDRESS
,
L2ERC20
.
address
,
aliceAddress
,
...
...
packages/contracts/test/contracts/L2/predeploys/OVM_SequencerFeeVault.spec.ts
View file @
09eb322e
...
...
@@ -43,9 +43,7 @@ describe('OVM_SequencerFeeVault', () => {
await
expect
(
OVM_SequencerFeeVault
.
withdraw
()).
to
.
not
.
be
.
reverted
expect
(
Mock__L2StandardBridge
.
smocked
.
withdrawTo
.
calls
[
0
]
).
to
.
deep
.
equal
([
expect
(
Mock__L2StandardBridge
.
smocked
.
withdrawTo
.
calls
[
0
]).
to
.
deep
.
equal
([
predeploys
.
OVM_ETH
,
await
signer1
.
getAddress
(),
amount
,
...
...
@@ -66,9 +64,7 @@ describe('OVM_SequencerFeeVault', () => {
await
expect
(
OVM_SequencerFeeVault
.
withdraw
()).
to
.
not
.
be
.
reverted
expect
(
Mock__L2StandardBridge
.
smocked
.
withdrawTo
.
calls
[
0
]
).
to
.
deep
.
equal
([
expect
(
Mock__L2StandardBridge
.
smocked
.
withdrawTo
.
calls
[
0
]).
to
.
deep
.
equal
([
predeploys
.
OVM_ETH
,
await
signer1
.
getAddress
(),
amount
,
...
...
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