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: local-orch-account .transfer() supports pfm routes #10571

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

0xpatrickdev
Copy link
Member

@0xpatrickdev 0xpatrickdev commented Nov 26, 2024

closes: #10445

Description

  • leverages ChainHub.makeTransferRoute to support PFM routing in LocalOrchAccount.transfer()
  • updates test harness to supply chain and asset info for chainHub in exo and contract tests
  • refactors send-anywhere contract-upgrade.test.ts to no longer rely on a buggy agoricNames
  • updates several orchestration examples contracts to seed their own chainHub to facilitate boot and multichain testing

Security Considerations

No new considerations from these changes.

Scaling Considerations

No new considerations from these changes.

Documentation Considerations

None

Testing Considerations

Includes unit tests. See #10584 for more robust testing of the pfm route logic. Existing multichain-testing will cover potential regressions (single-hop) transfers. Multi-hop tests are forthcoming.

Upgrade Considerations

N/A, library code. Part of NPM Orch or FUSDC release.

Copy link

cloudflare-workers-and-pages bot commented Nov 26, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 81d1df5
Status: ✅  Deploy successful!
Preview URL: https://2ebaf7c9.agoric-sdk.pages.dev
Branch Preview URL: https://pc-10445-transfer-pfm.agoric-sdk.pages.dev

View logs

Base automatically changed from 10006-transfer-pfm to master November 26, 2024 17:06
Copy link

Base branch is changed to master. Please re-run the integration tests by adding 'force:integration' label.

0xpatrickdev and others added 4 commits November 27, 2024 21:40
- shape used for pfm ForwardInfo options
- provide `chainInfo` and `assetInfo` in commonPrivateArgs for contracts to use
- register common assets used in testing
- provide `populateChainHub` function for use in exo unit testing in favor of `registerAgoricBld`
0xpatrickdev and others added 12 commits November 27, 2024 21:52
this test can no longer rely on the IST brand being available, so we
 - added checks to ensure brands are accepted for `.transfer` and `.send`
 - filed #10449 since this surfaced a bug in `amountToCoin`
 - use Moolah issuer for "no denom for brand" failure path tests
- enables sending offers with brands
- chainInfo and assetInfo are provided as `commonPrivateArgs`. include them in `ContractMeta`
- auto-stake-it initializes `chainHub` with data so existing tests that use `.transfer()` pass
- no longer needed since we call `registerChainsAndAssets`
- no longer relies on buggy agoricNames
- continues to test async-flow resumability and cross-chain vow settlement across upgrade

Co-authored-by: 0xPatrick <[email protected]>
- test/bootstrapTests/orchestration.test.ts used a mixed of test and test.serial
- the test without `.serial` interleaved and was confusing to debug
- this mainly updates inline snapshots, which return different account and channel
  identifiers since all tests in this file share the same context
- basic-flows.contract.js is provided with chainInfo and assetInfo in privateArgs via builder options
- needed for tests that use localAccount.transfer(), now reliant on asset info, to pass
@0xpatrickdev 0xpatrickdev added the force:integration Force integration tests to run on PR label Nov 28, 2024
@0xpatrickdev 0xpatrickdev marked this pull request as ready for review November 28, 2024 04:44
@0xpatrickdev 0xpatrickdev requested a review from a team as a code owner November 28, 2024 04:44
- support both `yarn test:main` and `yarn test:fast-usdc` which have different chainInfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
force:integration Force integration tests to run on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

local-orchestration-account: transfer supports multi-hop pfm routes
2 participants