Commit e4ca19e1 authored by OptimismBot's avatar OptimismBot Committed by GitHub

Merge pull request #6053 from ethereum-optimism/willc/multiwithdraw-no-test

fix(sdk): Fix multicall3 support for sdk
parents 13c710c7 19e70598
---
'@eth-optimism/sdk': minor
---
Add support for claiming multicall3 withdrawals
This diff is collapsed.
......@@ -565,23 +565,25 @@ describe('CrossChainMessenger', () => {
})
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(() => {
return DUMMY_MESSAGE
})
const tx = await l1Messenger.triggerSentMessageEvents(messages)
await expect(messenger.toCrossChainMessage(tx)).to.be.rejectedWith(
'expected 1 message, got 2'
const foundCrossChainMessages =
await messenger.getMessagesByTransaction(tx)
expect(await messenger.toCrossChainMessage(tx, 1)).to.deep.eq(
foundCrossChainMessages[1]
)
})
})
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([])
await expect(messenger.toCrossChainMessage(tx)).to.be.rejectedWith(
'expected 1 message, got 0'
`withdrawal index 0 out of bounds. There are 0 withdrawals`
)
})
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment