Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fetchDepositsByParentTxHashFromEventLog #2175

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fionnachan
Copy link
Member

Currently this PR only supports post-nitro txs
it covers all Orbit chains' use case as they have never used classic

Closes FS-1088

Copy link

vercel bot commented Jan 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
arbitrum-token-bridge ✅ Ready (Inspect) Visit Preview Jan 14, 2025 0:45am

parentChainId: number
): Promise<ParentTransactionReceipt | undefined> {
try {
const parentProvider = getProviderForChainId(Number(parentChainId))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parentChainId should already be a number according to type on L28. If we expect to receive other type, we should update L28. Otherwise we can remove the casting here.

Comment on lines 85 to 91
const parentToChildMessagesClassic = isClassic
? await parentTxReceipt.getParentToChildMessagesClassic(childProvider)
: ([] as ParentToChildMessageReaderClassic[])

const parentToChildMessages = isClassic
? ([] as ParentToChildMessageReader[])
: await parentTxReceipt.getParentToChildMessages(childProvider)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can run those 2 queries in parallel with Promise.all

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also add the third one below on L93

Comment on lines 57 to 59
expect(result.tokenDepositRetryables).toEqual(
expect.arrayContaining([
expect.objectContaining({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can call directly expect(result.tokenDepositRetryables).toEqual([{...}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants