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: decode warp route information #176

Merged
merged 15 commits into from
Feb 5, 2025
Merged

feat: decode warp route information #176

merged 15 commits into from
Feb 5, 2025

Conversation

Xaroz
Copy link
Contributor

@Xaroz Xaroz commented Feb 4, 2025

Leverage #144, to implement this:

Decodes warp route message to show more information about the warp token transfer
Fixes #78

  • Update the store to include a WarpRouteChainAddressMap, this is a custom type that is of ChainMap<Record<Address, TokenArgs>>;, the last string would be the token symbol
  • Create parseWarpRouteDetails() function to decode the information about the warp transfer, a few checks are done to identify if the message is an actual warp route transfer
  • Upgrade hyperlane packages

image
image

Copy link

vercel bot commented Feb 4, 2025

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

Name Status Preview Comments Updated (UTC)
hyperlane-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2025 5:17pm

Copy link
Collaborator

@jmrossy jmrossy left a comment

Choose a reason for hiding this comment

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

Good progress but I suspect there are some issues still to fix

@@ -0,0 +1,95 @@
import Image from 'next/image';

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why have you left these spaces in the imports? The empty lines prevent the prettier-plugin-organize-imports from organizing the imports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, also did this for files where I saw there are still spaces

src/features/messages/queries/parse.ts Outdated Show resolved Hide resolved
src/features/messages/queries/parse.ts Outdated Show resolved Hide resolved
src/features/messages/queries/parse.ts Outdated Show resolved Hide resolved
src/images/icons/send-money.svg Outdated Show resolved Hide resolved
src/features/messages/queries/parse.ts Outdated Show resolved Hide resolved
src/features/messages/queries/parse.ts Outdated Show resolved Hide resolved
src/features/messages/queries/parse.ts Outdated Show resolved Hide resolved

return {
amount: fromWei(parsedMessage.amount.toString(), originMetadata.nativeToken?.decimals || 18),
totalPayment: fromWei(totalPayment, originMetadata.nativeToken?.decimals || 18),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you're maybe misunderstanding what totalPayment refers to. It's a properly of the message relating to IGP gas. It's not related to warp transfer amounts

Copy link
Contributor Author

@Xaroz Xaroz Feb 5, 2025

Choose a reason for hiding this comment

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

Removed totalPayment and let GasDetailsCards handle this

return {
amount: fromWei(parsedMessage.amount.toString(), originMetadata.nativeToken?.decimals || 18),
totalPayment: fromWei(totalPayment, originMetadata.nativeToken?.decimals || 18),
endRecipient: address,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
endRecipient: address,
recipient: address,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to transfer recipient

@Xaroz Xaroz requested a review from jmrossy February 5, 2025 17:10
@Xaroz Xaroz merged commit 28880e8 into main Feb 5, 2025
6 checks passed
@Xaroz Xaroz deleted the feat/decode-warp-route branch February 5, 2025 21:32
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.

Decode warp route messages
2 participants