-
Notifications
You must be signed in to change notification settings - Fork 214
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
PFM transfer covering remote chain A's view of remote B's denoms #10006
Comments
A relevant detail: "chain A's view of remote B's denoms" is supposed to be called A WIP version is included in |
refs: #10006 refs: #10445 ## Description - adds `pfmEnabled: bool` to `CosmosChainInfo` to support multi-hop forwarding logic - adds and exports `withChainCapabilities` helper that mixes in `PfmEnabled` and `IcqEnabled` constants to `ChainInfo` - adds and exports `registerChainsAndAssets` helper that registers info in a `chainHub` in a contract `startFn` - implements `chainHub` initialization in `fast-usdc` and `send-anywhere` contracts ### Security Considerations - `chain-capabilities.js` is authoritative, but consumers have the ability to provide their own data. It's not published to vstorage and will be mixed in to local ChainHub's in example contracts that rely on it. ### Scaling Considerations - Authors must maintain `chain-capabilities.js` over time ### Documentation Considerations - documented via typedoc ### Testing Considerations - updates snapshot tests ### Upgrade Considerations Library code, part of an NPM Orch release
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.
The remaining work is:
This will include a commit like c35fac7 and ensuring tests continue to pass. It'd be nice if we included a test of a cosmos orch account performing a PFM transfer. |
FastUSDC doesn't depend on multi-hop COA support, right? Maybe split it out and close this? |
What is the Problem Being Solved?
Per @0xpatrickdev , we need and don't have any test scenarios for building PFM messages which require us to know RemoteChainA's view of RemoteChainB's denoms.
Description of the Design
#9491 made progress in pursuit of,
However this is smaller in scope. The scope of this is testing PFM and the pfm memo. (Perhaps through sendAnywhere contract)
Additional discussion
Tasks
CosmosChainInfo
includespfmEnabled: bool
#10329chainHub.makeTransferRoute()
#10584Security Considerations
Scaling Considerations
Test Plan
Upgrade Considerations
The text was updated successfully, but these errors were encountered: