-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sdk): check for both v0 and v1 messages when looking for RelayedM…
…essages test: add one fix: linter fix: Failed to save file to change failed ones too fix: linter Fix --fork-block-number to correct network block number changeset
- Loading branch information
Will Cory
authored and
Will Cory
committed
Jun 29, 2023
1 parent
2e64d04
commit 89ca741
Showing
5 changed files
with
82 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@eth-optimism/sdk': minor | ||
--- | ||
|
||
Fixes issue with legacy withdrawal message status detection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { describe, expect, it } from 'vitest' | ||
|
||
import { CrossChainMessenger, MessageStatus } from '../src' | ||
import { l1Provider, l2Provider } from './testUtils/ethersProviders' | ||
|
||
const crossChainMessenger = new CrossChainMessenger({ | ||
l1SignerOrProvider: l1Provider, | ||
l2SignerOrProvider: l2Provider, | ||
l1ChainId: 5, | ||
l2ChainId: 420, | ||
bedrock: true, | ||
}) | ||
|
||
describe('prove message', () => { | ||
it(`should be able to correctly find a finalized withdrawal`, async () => { | ||
/** | ||
* Tx hash of legacy withdrawal that was claimed | ||
* | ||
* @see https://goerli-optimism.etherscan.io/tx/0xda9e9c8dfc7718bc1499e1e64d8df6cddbabc46e819475a6c755db286a41b9fa | ||
*/ | ||
const txWithdrawalHash = | ||
'0xda9e9c8dfc7718bc1499e1e64d8df6cddbabc46e819475a6c755db286a41b9fa' | ||
|
||
const txReceipt = await l2Provider.getTransactionReceipt(txWithdrawalHash) | ||
|
||
expect(txReceipt).toBeDefined() | ||
|
||
expect(await crossChainMessenger.getMessageStatus(txWithdrawalHash)).toBe( | ||
MessageStatus.RELAYED | ||
) | ||
}, 20_000) | ||
}) |