-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
chainHub.makeTransferRoute()
(#10584)
refs: #10445 refs: #10006 ## Description Adds `.makeTransferRoute(destination: ChainAddress, amount: DenomAmount, holdingChainName: string)` to `ChainHub` to facilitate building IBC `MsgTransfer` parameters for single-hop and multi-hop (pfm) routes. Returns synchronously using local `chainHub` data to facilitate ease of use at call sites and support future plans to make every call synchronous. It achieves this by interfacing with the `chainInfos` and `connInfos` map stores directly instead of the public interface methods that currently fall back to remote calls to `agoricNames`. Assumes the longest route will only be 1 intermediary hop (through the issuing chain). Does not support unwinding nested denoms (e.g. noble uusdc sent directly from osmosis to agoric `agoric(osmosis(noble(uusdc)))`). ### Security Considerations An incorrect implementation could result in loss of funds. #9324 remains open to determine sensible defaults for timeout parameters. ### Scaling Considerations Nothing new, but each contract's `chainHub` will accumulate quite a bit of data . ### Documentation Considerations JSdoc and tests ### Testing Considerations Includes unit tests covering all codepaths and known scenarios. ### Upgrade Considerations N/A, library code. This feature is needed for FUSDC.
- Loading branch information
Showing
12 changed files
with
685 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+234 Bytes
(110%)
packages/builders/test/snapshots/orchestration-imports.test.js.snap
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-25 Bytes
(100%)
packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.