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
59c9a79f
Unverified
Commit
59c9a79f
authored
Nov 22, 2022
by
mergify[bot]
Committed by
GitHub
Nov 22, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4053 from ethereum-optimism/sc/sdk-flakes-3
fix(sdk): final flake hotfix
parents
49685f81
3b0aff69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
deposit-erc20.ts
packages/sdk/tasks/deposit-erc20.ts
+7
-7
No files found.
packages/sdk/tasks/deposit-erc20.ts
View file @
59c9a79f
...
...
@@ -248,21 +248,21 @@ task('deposit-erc20', 'Deposits WETH9 onto L2.')
await
depositTx
.
wait
()
console
.
log
(
`ERC20 deposited -
${
depositTx
.
hash
}
`
)
// Deposit might get reorged, wait
1
0s and also log for reorgs.
// Deposit might get reorged, wait
3
0s and also log for reorgs.
let
prevBlockHash
:
string
=
''
for
(
let
i
=
0
;
i
<
1
0
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
0
;
i
++
)
{
const
messageReceipt
=
await
messenger
.
waitForMessageReceipt
(
depositTx
)
if
(
messageReceipt
.
receiptStatus
!==
1
)
{
throw
new
Error
(
'
deposit failed
'
)
}
if
(
i
>
0
&&
messageReceipt
.
transactionReceipt
.
blockHash
!==
prevBlockHash
)
{
if
(
messageReceipt
.
transactionReceipt
.
blockHash
!==
prevBlockHash
)
{
console
.
log
(
`Block
number
changed from
${
prevBlockHash
}
to
${
messageReceipt
.
transactionReceipt
.
blockHash
}
`
`Block
hash
changed from
${
prevBlockHash
}
to
${
messageReceipt
.
transactionReceipt
.
blockHash
}
`
)
// Wait for stability, we want at least 30 seconds after any reorg
i
=
0
}
prevBlockHash
=
messageReceipt
.
transactionReceipt
.
blockHash
...
...
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