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
7c890f7d
Unverified
Commit
7c890f7d
authored
Jul 19, 2023
by
Wilson Cusack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
messageStatus tests
parent
774c4e24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
messageStatus.spec.ts
packages/sdk/test-next/messageStatus.spec.ts
+8
-13
No files found.
packages/sdk/test-next/messageStatus.ts
→
packages/sdk/test-next/messageStatus.
spec.
ts
View file @
7c890f7d
...
...
@@ -11,33 +11,28 @@ const crossChainMessenger = new CrossChainMessenger({
bedrock
:
true
,
})
describe
(
'
prove message
'
,
()
=>
{
describe
(
'
getMessageStatus
'
,
()
=>
{
it
(
`should be able to correctly find a finalized withdrawal`
,
async
()
=>
{
/**
* Tx hash of
legacy withdrawal that was claimed
* Tx hash of
a withdrawal
*
* @see https://goerli-optimism.etherscan.io/tx/0x
da9e9c8dfc7718bc1499e1e64d8df6cddbabc46e819475a6c755db286a41b9fa
* @see https://goerli-optimism.etherscan.io/tx/0x
8fb235a61079f3fa87da66e78c9da075281bc4ba5f1af4b95197dd9480e03bb5
*/
const
txWithdrawalHash
=
'
0x
da9e9c8dfc7718bc1499e1e64d8df6cddbabc46e819475a6c755db286a41b9fa
'
'
0x
8fb235a61079f3fa87da66e78c9da075281bc4ba5f1af4b95197dd9480e03bb5
'
const
txReceipt
=
await
l2Provider
.
getTransactionReceipt
(
txWithdrawalHash
)
expect
(
txReceipt
).
toBeDefined
()
expect
(
await
crossChainMessenger
.
getMessageStatus
(
txWithdrawalHash
)).
toBe
(
expect
(
await
crossChainMessenger
.
getMessageStatus
(
txWithdrawalHash
,
0
,
9370789
-
1000
,
9370789
)).
toBe
(
MessageStatus
.
RELAYED
)
},
20
_000
)
it
(
`should return null if not in block range`
,
async
()
=>
{
/**
* Tx hash of legacy withdrawal that was claimed
*
* @see https://goerli-optimism.etherscan.io/tx/0xda9e9c8dfc7718bc1499e1e64d8df6cddbabc46e819475a6c755db286a41b9fa
*/
it
(
`should return READY_FOR_RELAY if not in block range`
,
async
()
=>
{
const
txWithdrawalHash
=
'
0x
da9e9c8dfc7718bc1499e1e64d8df6cddbabc46e819475a6c755db286a41b9fa
'
'
0x
8fb235a61079f3fa87da66e78c9da075281bc4ba5f1af4b95197dd9480e03bb5
'
const
txReceipt
=
await
l2Provider
.
getTransactionReceipt
(
txWithdrawalHash
)
...
...
@@ -45,6 +40,6 @@ describe('prove message', () => {
expect
(
await
crossChainMessenger
.
getMessageStatus
(
txWithdrawalHash
,
0
,
0
,
0
)
).
toBe
(
MessageStatus
.
RE
LAYED
)
).
toBe
(
MessageStatus
.
RE
ADY_FOR_RELAY
)
},
20
_000
)
})
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