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

portico: fetch swap event #724

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

kev1n-peters
Copy link
Collaborator

In addition to checking if the transfer was completed, we now check if the swap actually succeeded or failed. When the swap fails, the Wormhole-wrapped / highway token is received instead. If we can't find the swap event, then we assume it succeeded.

In addition to checking if the transfer was completed, we now check
if the swap actually succeeded or failed. When the swap fails,
the Wormhole-wrapped / highway token is received instead. If we can't
find the swap event, then we assume it succeeded.
);

// Search for the event in the last 15 minutes
const latestBlock = await EvmPlatform.getLatestBlock(this.provider);
Copy link
Collaborator Author

@kev1n-peters kev1n-peters Oct 24, 2024

Choose a reason for hiding this comment

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

We have to constrain the block range we're searching in otherwise the RPC may return an error

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

Successfully merging this pull request may close these issues.

1 participant