Skip to content

portico: fetch swap event#724

Open
kev1n-peters wants to merge 5 commits into
mainfrom
usdt-bridge-swap-failure
Open

portico: fetch swap event#724
kev1n-peters wants to merge 5 commits into
mainfrom
usdt-bridge-swap-failure

Conversation

@kev1n-peters

Copy link
Copy Markdown
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);

@kev1n-peters kev1n-peters Oct 24, 2024

Copy link
Copy Markdown
Collaborator Author

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