Skip to content

chore: implement parseInboundTransfer #11375

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

Merged
merged 2 commits into from
May 15, 2025
Merged

Conversation

anilhelvaci
Copy link
Collaborator

closes: #11374

Description

This PR implements the design described at #11374. The need for such a design is surfaced during when we tried to handle any denom incoming to a contract's address hook. We are trying to unblock that functionality with this solution.

Security Considerations

None.

Scaling Considerations

No concerns about this.

Documentation Considerations

None.

Testing Considerations

We some unit tests that showcases this method's functionality. Ideally there should also be multichain test where a contract uses this method to make sense out of some incoming IBC transfer in its address hook. We do have an on-going effort for that. See #11304

Upgrade Considerations

None.

@anilhelvaci anilhelvaci requested a review from michaelfig May 14, 2025 09:03
@anilhelvaci anilhelvaci requested a review from a team as a code owner May 14, 2025 09:03
@anilhelvaci
Copy link
Collaborator Author

I moved parseInboundTransfer type definition from OrchestrationAccountCommon to LocalAccountMethods like below. FYI @michaelfig

parseInboundTransfer: (packet: Record<string, any>) => Promise<{
amount: DenomAmount;
fromAccount: AccountId;
toAccount: AccountId;
extra: Record<string, any>;
}>;

Copy link

cloudflare-workers-and-pages bot commented May 14, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8757717
Status: ✅  Deploy successful!
Preview URL: https://589fc85f.agoric-sdk.pages.dev
Branch Preview URL: https://anil-11374-parse-inbound.agoric-sdk.pages.dev

View logs

Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

Great work! LGTM.

@anilhelvaci anilhelvaci added the automerge:rebase Automatically rebase updates, then merge label May 15, 2025
@mergify mergify bot force-pushed the anil/11374-parse-inbound branch from 4f684b3 to 8757717 Compare May 15, 2025 06:21
@mergify mergify bot merged commit 7a15f90 into master May 15, 2025
90 checks passed
@mergify mergify bot deleted the anil/11374-parse-inbound branch May 15, 2025 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parse denoms of incoming ICS-20 transfers
2 participants