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
63fcc9c1
Unverified
Commit
63fcc9c1
authored
Jun 29, 2023
by
mergify[bot]
Committed by
GitHub
Jun 29, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into jg/game_prep_for_step
parents
cf6ed17c
e4ca19e1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
176 additions
and
75 deletions
+176
-75
cuddly-panthers-trade.md
.changeset/cuddly-panthers-trade.md
+5
-0
cross-chain-messenger.ts
packages/sdk/src/cross-chain-messenger.ts
+164
-70
cross-chain-messenger.spec.ts
packages/sdk/test/cross-chain-messenger.spec.ts
+7
-5
No files found.
.changeset/cuddly-panthers-trade.md
0 → 100644
View file @
63fcc9c1
---
'
@eth-optimism/sdk'
:
minor
---
Add support for claiming multicall3 withdrawals
packages/sdk/src/cross-chain-messenger.ts
View file @
63fcc9c1
This diff is collapsed.
Click to expand it.
packages/sdk/test/cross-chain-messenger.spec.ts
View file @
63fcc9c1
...
@@ -565,23 +565,25 @@ describe('CrossChainMessenger', () => {
...
@@ -565,23 +565,25 @@ describe('CrossChainMessenger', () => {
})
})
describe
(
'
when the transaction sent more than one message
'
,
()
=>
{
describe
(
'
when the transaction sent more than one message
'
,
()
=>
{
it
(
'
should
throw an error
'
,
async
()
=>
{
it
(
'
should
be able to get second message by passing in an idex
'
,
async
()
=>
{
const
messages
=
[...
Array
(
2
)].
map
(()
=>
{
const
messages
=
[...
Array
(
2
)].
map
(()
=>
{
return
DUMMY_MESSAGE
return
DUMMY_MESSAGE
})
})
const
tx
=
await
l1Messenger
.
triggerSentMessageEvents
(
messages
)
const
tx
=
await
l1Messenger
.
triggerSentMessageEvents
(
messages
)
await
expect
(
messenger
.
toCrossChainMessage
(
tx
)).
to
.
be
.
rejectedWith
(
const
foundCrossChainMessages
=
'
expected 1 message, got 2
'
await
messenger
.
getMessagesByTransaction
(
tx
)
expect
(
await
messenger
.
toCrossChainMessage
(
tx
,
1
)).
to
.
deep
.
eq
(
foundCrossChainMessages
[
1
]
)
)
})
})
})
})
describe
(
'
when the transaction sent no messages
'
,
()
=>
{
describe
(
'
when the transaction sent no messages
'
,
()
=>
{
it
(
'
should throw an error
'
,
async
()
=>
{
it
(
'
should throw an
out of bounds
error
'
,
async
()
=>
{
const
tx
=
await
l1Messenger
.
triggerSentMessageEvents
([])
const
tx
=
await
l1Messenger
.
triggerSentMessageEvents
([])
await
expect
(
messenger
.
toCrossChainMessage
(
tx
)).
to
.
be
.
rejectedWith
(
await
expect
(
messenger
.
toCrossChainMessage
(
tx
)).
to
.
be
.
rejectedWith
(
'
expected 1 message, got 0
'
`withdrawal index 0 out of bounds. There are 0 withdrawals`
)
)
})
})
})
})
...
...
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