From dd51815770e621ea4826428e6bce67fe9b407f24 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 21 Oct 2024 13:48:07 -0400 Subject: [PATCH 01/15] feat: CosmosChainInfo includes `pfmEnabled?: boolean` - in order to determine whether its possible to route a transfer through a particular ibc chain, we must know if they have the PFM module installed --- packages/orchestration/src/cosmos-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/orchestration/src/cosmos-api.ts b/packages/orchestration/src/cosmos-api.ts index 2b8072a3c87..ce3bb84e90c 100644 --- a/packages/orchestration/src/cosmos-api.ts +++ b/packages/orchestration/src/cosmos-api.ts @@ -92,7 +92,7 @@ export type CosmosChainInfo = Readonly<{ connections?: Record; // chainId or wellKnownName // UNTIL https://github.com/Agoric/agoric-sdk/issues/9326 icqEnabled?: boolean; - + pfmEnabled?: boolean; /** * cf https://github.com/cosmos/chain-registry/blob/master/chain.schema.json#L117 */ From f5451a1a4be480cb380f1880dc17a00e76b122e7 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 29 Oct 2024 11:33:46 -0400 Subject: [PATCH 02/15] feat: chain-capabilities.js constants - adds `ICQ_ENABLED` and `PFM_ENABLED` constants to support `CosmosChainInfo` - this data is not available via a well-known registry like cosmos/chain-registry, but necessary for the Orchestration API --- multichain-testing/package.json | 1 + .../scripts/fetch-starship-chain-info.ts | 1 + multichain-testing/yarn.lock | 3 +- packages/orchestration/package.json | 1 + .../orchestration/scripts/fetch-chain-info.ts | 1 + .../orchestration/src/chain-capabilities.js | 45 +++++++++++++++++++ packages/orchestration/src/utils/registry.js | 10 ++++- 7 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 packages/orchestration/src/chain-capabilities.js diff --git a/multichain-testing/package.json b/multichain-testing/package.json index f666fd07867..693966a923e 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -25,6 +25,7 @@ "@cosmjs/stargate": "^0.32.4", "@endo/errors": "^1.2.5", "@endo/far": "^1.1.5", + "@endo/init": "1.1.4", "@endo/nat": "^5.0.10", "@endo/ses-ava": "^1.2.5", "@types/eslint": "^8", diff --git a/multichain-testing/scripts/fetch-starship-chain-info.ts b/multichain-testing/scripts/fetch-starship-chain-info.ts index e660039cad2..ae420b50765 100755 --- a/multichain-testing/scripts/fetch-starship-chain-info.ts +++ b/multichain-testing/scripts/fetch-starship-chain-info.ts @@ -1,6 +1,7 @@ #!/usr/bin/env tsx /* eslint-env node */ +import '@endo/init'; import fsp from 'node:fs/promises'; import prettier from 'prettier'; diff --git a/multichain-testing/yarn.lock b/multichain-testing/yarn.lock index 43128e1d183..f06c57d6a4f 100644 --- a/multichain-testing/yarn.lock +++ b/multichain-testing/yarn.lock @@ -320,7 +320,7 @@ __metadata: languageName: node linkType: hard -"@endo/init@npm:^1.1.2, @endo/init@npm:^1.1.4": +"@endo/init@npm:1.1.4, @endo/init@npm:^1.1.2, @endo/init@npm:^1.1.4": version: 1.1.4 resolution: "@endo/init@npm:1.1.4" dependencies: @@ -3902,6 +3902,7 @@ __metadata: "@cosmjs/stargate": "npm:^0.32.4" "@endo/errors": "npm:^1.2.5" "@endo/far": "npm:^1.1.5" + "@endo/init": "npm:1.1.4" "@endo/nat": "npm:^5.0.10" "@endo/ses-ava": "npm:^1.2.5" "@types/eslint": "npm:^8" diff --git a/packages/orchestration/package.json b/packages/orchestration/package.json index 7cf66699adf..c087288d268 100644 --- a/packages/orchestration/package.json +++ b/packages/orchestration/package.json @@ -60,6 +60,7 @@ "@cosmjs/proto-signing": "^0.32.3", "@endo/bundle-source": "^3.4.2", "@endo/import-bundle": "^1.3.1", + "@endo/init": "^1.1.6", "@endo/ses-ava": "^1.2.7", "ava": "^5.3.1", "c8": "^9.1.0", diff --git a/packages/orchestration/scripts/fetch-chain-info.ts b/packages/orchestration/scripts/fetch-chain-info.ts index 9634dfc884e..9f2771c0f25 100755 --- a/packages/orchestration/scripts/fetch-chain-info.ts +++ b/packages/orchestration/scripts/fetch-chain-info.ts @@ -1,5 +1,6 @@ #!/usr/bin/env tsx /** @file Fetch canonical chain info to generate the minimum needed for agoricNames */ +import '@endo/init'; import { ChainRegistryClient } from '@chain-registry/client'; import fsp from 'node:fs/promises'; import prettier from 'prettier'; diff --git a/packages/orchestration/src/chain-capabilities.js b/packages/orchestration/src/chain-capabilities.js new file mode 100644 index 00000000000..92790d1969b --- /dev/null +++ b/packages/orchestration/src/chain-capabilities.js @@ -0,0 +1,45 @@ +/** + * @file Contains ChainInfo that not available from a well-known chain registry. + * + * This is used to seed `agoricNames` and `ChainHub`. However, the data is + * dynamic and can change over time. (Remote chains can choose to add or + * remove ibc application modules with chain software upgrades and change + * allowlist settings.) + * + * Developers should use `ChainHubAdmin` as part of their creator or governed + * facet if they wish to have fine-grained control over the data in their + * local `ChainHub`. + * + * Last Updated November 11, 2024 + */ + +/** @import {KnownChains} from '@agoric/orchestration'; */ + +/** + * Chains with the async-icq (icq-1) module available. + * + * @satisfies {(keyof KnownChains)[]} + */ +export const ICQ_ENABLED = /** @type {const} } */ ['omniflixhub', 'osmosis']; +harden(ICQ_ENABLED); + +/** + * Chains with the packet-forward-middleware module available. + * + * @satisfies {(keyof KnownChains)[]} + */ +export const PFM_ENABLED = /** @type {const} } */ [ + 'agoric', + 'celestia', + 'cosmoshub', + 'juno', + 'neutron', + 'noble', + 'omniflixhub', + 'osmosis', + 'secretnetwork', + 'stargaze', + 'stride', + 'umee', +]; +harden(PFM_ENABLED); diff --git a/packages/orchestration/src/utils/registry.js b/packages/orchestration/src/utils/registry.js index 25789864729..9cf14614404 100644 --- a/packages/orchestration/src/utils/registry.js +++ b/packages/orchestration/src/utils/registry.js @@ -4,6 +4,7 @@ import { } from '@agoric/cosmic-proto/ibc/core/channel/v1/channel.js'; import { State as IBCConnectionState } from '@agoric/cosmic-proto/ibc/core/connection/v1/connection.js'; import assert from 'node:assert'; +import { ICQ_ENABLED, PFM_ENABLED } from '../chain-capabilities.js'; /** * @import {IBCChannelID, IBCConnectionID} from '@agoric/vats'; @@ -94,7 +95,14 @@ export const convertChainInfo = async registry => { chainId: chain.chain_id, stakingTokens: chain.staking?.staking_tokens, // UNTIL https://github.com/Agoric/agoric-sdk/issues/9326 - icqEnabled: chain.chain_name === 'osmosis', + icqEnabled: ICQ_ENABLED.includes( + // @ts-expect-error string not assignable to `ICQ_ENABLED` const + chain.chain_name, + ), + pfmEnabled: PFM_ENABLED.includes( + // @ts-expect-error string not assignable to `PFM_ENABLED` const + chain.chain_name, + ), }; } From 0938e9aef8420feffff81b5cdf31d9cfb4c4a2df Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 29 Oct 2024 11:54:15 -0400 Subject: [PATCH 03/15] fix: yarn codegen script - use `ts-blank-space` since `tsx` is no longer in `node_modules/.bin` - prefer yarn command instead of standalone script --- packages/orchestration/scripts/fetch-chain-info.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/orchestration/scripts/fetch-chain-info.ts b/packages/orchestration/scripts/fetch-chain-info.ts index 9f2771c0f25..66d71adc8f2 100755 --- a/packages/orchestration/scripts/fetch-chain-info.ts +++ b/packages/orchestration/scripts/fetch-chain-info.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env tsx +#!/usr/bin/env TS_BLANK_SPACE_EMIT=false node --import ts-blank-space/register /** @file Fetch canonical chain info to generate the minimum needed for agoricNames */ import '@endo/init'; import { ChainRegistryClient } from '@chain-registry/client'; From 4fbebf4076313f3c1aae10010be5491016c119ba Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 29 Oct 2024 11:56:48 -0400 Subject: [PATCH 04/15] chore: yarn codegen - add `pfmEnabled: boolean` data - update snapshot tests --- .../snapshots/orchestration.test.ts.md | 26 +++++++++--------- .../snapshots/orchestration.test.ts.snap | Bin 6957 -> 6980 bytes .../orchestration/src/fetched-chain-info.js | 15 +++++++++- .../snapshots/send-anywhere.test.ts.md | 1 + .../snapshots/send-anywhere.test.ts.snap | Bin 1702 -> 1714 bytes .../snapshots/staking-combinations.test.ts.md | 2 ++ .../staking-combinations.test.ts.snap | Bin 2743 -> 2754 bytes .../snapshots/unbond.contract.test.ts.md | 3 ++ .../snapshots/unbond.contract.test.ts.snap | Bin 2328 -> 2346 bytes .../test/snapshots/chain-info.test.js.md | 15 +++++++++- .../test/snapshots/chain-info.test.js.snap | Bin 1425 -> 1474 bytes 11 files changed, 47 insertions(+), 15 deletions(-) diff --git a/packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.md b/packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.md index 06537dd7550..42f4f640683 100644 --- a/packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.md +++ b/packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.md @@ -14,55 +14,55 @@ Generated by [AVA](https://avajs.dev). [ [ 'published.agoricNames.chain.agoric', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"agoric\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"agoric-3\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ubld\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"agoric\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"agoric-3\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ubld\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.celestia', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"celestia\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"celestia\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"utia\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"celestia\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"celestia\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"utia\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.cosmoshub', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"cosmos\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"cosmoshub-4\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uatom\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"cosmos\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"cosmoshub-4\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uatom\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.dydx', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"dydx\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"dydx-mainnet-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"adydx\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"dydx\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"dydx-mainnet-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"adydx\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.juno', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"juno\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"juno-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ujuno\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"juno\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"juno-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ujuno\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.neutron', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"neutron\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"neutron-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"untrn\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"neutron\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"neutron-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"untrn\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.noble', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"noble\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"noble-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"noble\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"noble-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":true}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.omniflixhub', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"omniflix\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"omniflixhub-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uflix\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"omniflix\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"omniflixhub-1\\\\\\",\\\\\\"icqEnabled\\\\\\":true,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uflix\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.osmosis', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"osmo\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"osmosis-1\\\\\\",\\\\\\"icqEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uosmo\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"osmo\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"osmosis-1\\\\\\",\\\\\\"icqEnabled\\\\\\":true,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uosmo\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.secretnetwork', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"secret\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"secret-4\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uscrt\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"secret\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"secret-4\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uscrt\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.stargaze', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"stars\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"stargaze-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustars\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"stars\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"stargaze-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustars\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.stride', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"stride\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"stride-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustrd\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"stride\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"stride-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustrd\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chain.umee', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"umee\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"umee-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uumee\\\\\\"}]}\\",\\"slots\\":[]}"]}', + '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"umee\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"umee-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"pfmEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uumee\\\\\\"}]}\\",\\"slots\\":[]}"]}', ], [ 'published.agoricNames.chainConnection.agoric-3_cosmoshub-4', diff --git a/packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.snap b/packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.snap index fb7233f1a0e18e3dd5f5a08ae0912fc8677150f7..ad21ae7d7c207c60b38dab61a12b0ee2c2c35d5f 100644 GIT binary patch delta 6885 zcma*qbyO4H-@tLU(a1oCbO=bvK zK}r~)f=WDme}DbX^T%_Z`}aNfkI%XHp7*O-1}B4j`1IjzW6u`|UuQ4B+y0W&Ad<{b z*Ti*=nvR(#ABuOAyY9(`4mBqJ^-8o0%kCwv(~fY*P?G#-fi|B7`B~3~UVdSRweVXV zi`{EbMtit_N>)1Tvhe6!uVcG`gEz;q=orl5ide-ZdufK=iSp!3krXnHFx(c^&+@e# zLh5K!4fD7RFXbdprKqdHQXoJcs>GjCI>A}LRz${}4?>vgY~qpn48ooYV&D8~q+?@kioNw-PoW;6=rCmcHaRzy7me4H<% zzT9R5dL?zc0?;94n?P<|0syfk&WCNVArT$qE7brx7iW!GpNU$Q9D>L=R!3oeeZ!KMS}uDgTnJOs>2Tt;5>T=KCcEVRf6tq zV`CJE|A0GdKs__4t2xvF{e4-|rpU0DJlGomD|KuTkF6IaMu5~o?SU}q3L_GDa07s3 z0&>v+^1*f93>*0qYRns zWgMWg)_idf#mV^PA>NfbUjRWHUQ3Tb_dbCXFuk+%Q`vaI^#%+XT_&ft9yf=Y9P#`>?2O$!E^$0IRUDiypTv)+}$FzY?Epe#b9!f}@3@^kGO8ss!rIWU&97+yM=syJsKW7({sc z9Xq&;I&5mhG3A|&ZDM0Sp-M!|?L-V>BT!>6@LTs`IUDqv6vRLZ;$sR}&L@ad6`AE6 z(5%Wa`XtcKn-k&ANlbeQ^;R)BKc&Sc$dKgbLcIY7O06`Qa+))9W|;L5uAoXCXP}=Vamyc#$q{_4NaL(PgZTqRW8MgI z1##d1rGn2sw2u}EBDj4cQB|gh%0qr)=u`5Z_>Jv8K@CngMOSisYGgkf@U*=Qht|Ip z^gjetDPu*0%?Yk~XGDH1B%P!O^Nzn}JvuHJWf6?J2(}98=rM5m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`$QEkHJ#285aFmVP~?{dI3q@48OU$g&P|5mgm zesObo|CCRM6lS~PV>>VD`a@kxXKfUTCT{9hhTV`L6fGVu-`TfruWTC@ytN!L$(csI z-{W#YF(9nf2~YL1(avd8H?f%niw=g=cD^t7?g@4I>h#!F7?kz#PqWoVWd))Q^)fOn zIxu&J9aDdhuI5w?7&<*FE&Ev^G`qhWfDdzwUOOta;I!du11?JRBF)wgOth~)HV+?o z|K3za5OA!ini-HzSToCe8}YF6&wx5??JS2fo51cFA6x3er+K|&yY?Uxb!juy>Tm}m zREAvE=`o+4hz)Q%%7maJ3qGrUd{gsm_*dfTE`3H$;_a~FY{?kL%XlGfl{mxq#U#69N{;u*#FLc&r zV=3i5-!7s46xWsG9h|P_&DB*VpklYpTNgLJbWU?oscvr&cl#NvL+mRKm-}-zSTSE> zt*h-cs8}7IC&>{v_RU*JLC@h2F&~G%7#1uGS5&?0T+XOF<@Z~i3qGC7d;>u9zW{KC BX{P`H diff --git a/packages/orchestration/src/fetched-chain-info.js b/packages/orchestration/src/fetched-chain-info.js index 651633fd1ad..7f2fbd23706 100644 --- a/packages/orchestration/src/fetched-chain-info.js +++ b/packages/orchestration/src/fetched-chain-info.js @@ -9,6 +9,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: false, + pfmEnabled: true, connections: { 'cosmoshub-4': { id: 'connection-8', @@ -147,6 +148,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: false, + pfmEnabled: true, connections: { 'neutron-1': { id: 'connection-7', @@ -249,6 +251,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: false, + pfmEnabled: true, connections: { 'agoric-3': { id: 'connection-649', @@ -423,6 +426,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: false, + pfmEnabled: false, connections: { 'neutron-1': { id: 'connection-17', @@ -525,6 +529,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: false, + pfmEnabled: true, connections: { 'cosmoshub-4': { id: 'connection-2', @@ -663,6 +668,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: false, + pfmEnabled: true, connections: { celestia: { id: 'connection-36', @@ -832,6 +838,7 @@ export default /** @type {const} } */ ({ bech32Prefix: 'noble', chainId: 'noble-1', icqEnabled: false, + pfmEnabled: true, connections: { 'agoric-3': { id: 'connection-40', @@ -1023,7 +1030,8 @@ export default /** @type {const} } */ ({ denom: 'uflix', }, ], - icqEnabled: false, + icqEnabled: true, + pfmEnabled: true, connections: { 'agoric-3': { id: 'connection-40', @@ -1108,6 +1116,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: true, + pfmEnabled: true, connections: { 'agoric-3': { id: 'connection-1649', @@ -1336,6 +1345,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: false, + pfmEnabled: true, connections: { 'agoric-3': { id: 'connection-80', @@ -1528,6 +1538,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: false, + pfmEnabled: true, connections: { celestia: { id: 'connection-296', @@ -1684,6 +1695,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: false, + pfmEnabled: true, connections: { 'agoric-3': { id: 'connection-118', @@ -1876,6 +1888,7 @@ export default /** @type {const} } */ ({ }, ], icqEnabled: false, + pfmEnabled: true, connections: { 'agoric-3': { id: 'connection-101', diff --git a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md b/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md index cb7e77f4a24..0b109ce5972 100644 --- a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md +++ b/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md @@ -43,6 +43,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'agoric', chainId: 'agoric-3', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'ubld', diff --git a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.snap b/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.snap index 019aa9a9d1af05779e75d69327a22ac5f66f262f..36dca60495e47024ce21d1812d7f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V6Zm|@TFiddS9P#p9tP$Ya;heY z%tsa^T4}nRPpprNX024AV5%F95sg2q8C`oY~9O zT9FuQc2=(zF}?kyjZE*bP@i_75)R`@>rY8fZ!2{mLda7NaM{l~%XZaaYtGVTRhNuO zv(%GmPB4mT_4f`;eO_3it9y=R4751T0j6=*v4Goya6fhbLM{$Leh>FqQ+{Xn_3hUh05#n zyvgnP#LhjIvRu3G5r^*+J9ppT`)BXxJsT6DjG$BN>VetAT&SRlG7kckHjm#p+Vol5 zHa9}0a|B1PP+7!<8ZHkbgrL)LTSAqrx{{}gp?@UW!&S7|4WuURkHELXHS{~MOqHyp zAMTH<0fJ zE_MUgx`A8WfVYRCw^c2}J1bVZrHya22N-7sd$|2^st1^1VFMiO@g5+9cv<1%#6rw$@KQA%!06xy%0ieDQOIK)i3B-7~=^$i{N|JXtxZ z?%J`Z;$xYavdo-W-T_PBq<6BX_tjKBXQuKgmR4V)?HFf?%}(N+su_+tz_4p~cOJGL z-%6{|Jes-BTg&TGVfPL9dOuAyT`HH+0ZG&+##c`~_n#AH*WR|S8F6mW+txWB_P}o2 z!8THTM(l|k|Nozl;tBMPo^m=S;||07YZ>y-b>D!7ucEt&ZmHPQoznWhT6+fkMse@`vAEQc)btk><7et;95UJ9ptF*^aFqF z2k!O*`v!o^1HkP8U}lh^j^6hgr1*5gpX;mRdgbGftAg`k2VA05ny@*cxD8+KEhCkxYh;2Tl4c)1&J!pTb1sW-7mI|TjiSHrkva=FSf3WYnMW*;-z%WzZIyg!g!SY&fbBvTMy$8>RFqc&3V*nlU+de`guh%7PFeLGOr$^Le10E&d{s;fWeL2h~bSG x-iYCi7~Y8C|7{FYS;$cNOtSQY=Tt_><%Aqf2@3|*Qq~W~{|hzvK@vwU005j3EbssT diff --git a/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.md b/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.md index fb15c9d00d8..5b4050a341a 100644 --- a/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.md +++ b/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.md @@ -41,6 +41,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'agoric', chainId: 'agoric-3', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'ubld', @@ -51,6 +52,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'osmo', chainId: 'osmosis-1', icqEnabled: true, + pfmEnabled: true, stakingTokens: [ { denom: 'uosmo', @@ -61,6 +63,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'stride', chainId: 'stride-1', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'ustrd', diff --git a/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.snap b/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.snap index 34fcdb2becaf24a5f414eec82c86caf5ac58d233..096e2b408950ddc0a6f0f10cafaabd9ab9ef4be9 100644 GIT binary patch literal 2346 zcmV+_3Dx#NRzV$666)~IAmP{J=A@hq1Jx2 zl2c-I@E?l^00000000BsT3c)!R~i1!dhhn$FZQl??M-N*2~BaFTMZB3ICT;lH^#XX zq?G9F%<+1%voo8SvvCq6XoO0IDpeJ#P^&`JR+aidr6N?dsZ?&_2@rz90|*pR1m#u` z5(t5WgvieB&d!{1>|N6r$Wvzj@B7Yw&iT*(|8vIAtyWcCs+-rIXI$YbVUT0pJM$-v#g+0RILsL4ZR9$dF))1W#5kFo_dl z|2LUTg2X^VAPHoMFH1&10x2?eq-D^m$|}pPs;Zc4mHQQbzOHEUF{;Tb>%n64s>*6i z{$QnT6Erd_OwtXR83PdGge(!DXO2+wiY6_p`nqL$)?o@uYgEyWwW^lo9hXJdxIrau zS&F{CC8itF8Z)^;xuR>9`5}kde@S0A+p8FR$_HHc0XKcXog={c5#YHI;4dRU$`5?h z4}9JayzB>l><9kt7gpBiUfD1iy*mKR27r11crgI{C;rB0Tc75O5;|jD>-7Vc^SQ;OAkW6afxJfR9B4i91D!kQM>> zE%<8@A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s2-qI-z|>)hBP6Hu_d4|Z4sZAg zq;X-;IMYJeYyINM(Aie5S!(2(Ihi)trtO`XlJ5~k;*x1`p^|a8&F-Rvolh$5bL)rv zPEzYhMb2y8nc*U}Y`xR-hIG}QnQFZmY`rTfsV2_!wkZj5Q>G8~xF^x};_jD6>2Xu0 z_sKQu|8i5jjYQ<@(M-1mZd+0c5x1?tTgh#r78w=`k7 z-Vv57{EWKNx^)dJp~*>L$0VRn0>7LD-k$`HmVnQfq)9#KnUs8CJ3(xlTKo*tFVyLi z^zyoCY5iUkjBljjxhW{R5*xtfiwDBZs;(|mVp)V$`u|`j^F7|=I^J|cWu+=vqYLb! y&dGMZ+~g$sCZB1$k<=h%YFsL|zu}k4q*5UjS|Tf)S|#WIK>QojNRmw&Apih{vw@`m diff --git a/packages/orchestration/test/snapshots/chain-info.test.js.md b/packages/orchestration/test/snapshots/chain-info.test.js.md index 10da37384c0..fd26c866581 100644 --- a/packages/orchestration/test/snapshots/chain-info.test.js.md +++ b/packages/orchestration/test/snapshots/chain-info.test.js.md @@ -15,6 +15,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'agoric', chainId: 'agoric-3', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'ubld', @@ -28,6 +29,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'celestia', chainId: 'celestia', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'utia', @@ -41,6 +43,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'cosmos', chainId: 'cosmoshub-4', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'uatom', @@ -54,6 +57,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'dydx', chainId: 'dydx-mainnet-1', icqEnabled: false, + pfmEnabled: false, stakingTokens: [ { denom: 'adydx', @@ -67,6 +71,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'juno', chainId: 'juno-1', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'ujuno', @@ -80,6 +85,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'neutron', chainId: 'neutron-1', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'untrn', @@ -93,6 +99,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'noble', chainId: 'noble-1', icqEnabled: false, + pfmEnabled: true, }, ], [ @@ -100,7 +107,8 @@ Generated by [AVA](https://avajs.dev). { bech32Prefix: 'omniflix', chainId: 'omniflixhub-1', - icqEnabled: false, + icqEnabled: true, + pfmEnabled: true, stakingTokens: [ { denom: 'uflix', @@ -114,6 +122,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'osmo', chainId: 'osmosis-1', icqEnabled: true, + pfmEnabled: true, stakingTokens: [ { denom: 'uosmo', @@ -127,6 +136,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'secret', chainId: 'secret-4', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'uscrt', @@ -140,6 +150,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'stars', chainId: 'stargaze-1', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'ustars', @@ -153,6 +164,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'stride', chainId: 'stride-1', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'ustrd', @@ -166,6 +178,7 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'umee', chainId: 'umee-1', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'uumee', diff --git a/packages/orchestration/test/snapshots/chain-info.test.js.snap b/packages/orchestration/test/snapshots/chain-info.test.js.snap index 4b0e2bddb25da500148fb466f6573912bd3fc760..145f73df8ac0068ee3fc7f6edc6fdf63a908fb45 100644 GIT binary patch literal 1474 zcmV;z1wHyfRzV_w3C6|1*2H-rm`jmf5A{X?g`om=;NhffY## zrtI#`d3(1vYrAuJN>Td6P7oj10|P@;f~?RY3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}_qbZ+e#6|dq1vyT_29v-+b#X0P2whrHZld# zBJTFwCRlP}6YpFREZgBJ$ksd$e3NBt(>Yi+OjEZymjw&=)l`IYk0IZ15!(a}b!iGh zT|4!BbH$r1XtYw!H<}tG+W0x^8!YOeK(PWpd*cUpo0m>scfbdom%IJvCD=N$pR9JD zSMxs6K3CSswRsA1Mck`NyB*6_L3f2cQxGg{UxM0gSc&nQQqYg`=#)%Z^U~F3${ZCm z*qNzVW9}`_f3LDl&`^K)go-Jl>3Nu)Z~g9}i7zRkMR`~%P)wqgc~~V-N}|v*jgTVni%7#|nopT#&=XdT}r#+$_W z`9kvtozOc4_@E#zlwo-X4V^2%dCB4)cC`SZqF`wcTTq0>lI1;YT@f}&R`Rf+B0MMA z3=ey|2!|!R*~3m1;jCoyJnZ)({4Lq79@bHUIVHgsd)R{|SR>gT9%h!nlB~;f`&Y!S z6zfp8At$Uy+kaKRuS2(7j&-fb~kv f3IHRG<^de!Us|;wpG>%6A3py9e*FJ=#uWen5 Date: Mon, 11 Nov 2024 17:03:23 -0600 Subject: [PATCH 05/15] add pfmEnabled to shape --- .../orchestration-imports.test.js.md | 3 +++ .../orchestration-imports.test.js.snap | Bin 3397 -> 3404 bytes packages/orchestration/src/typeGuards.js | 1 + 3 files changed, 4 insertions(+) diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.md b/packages/builders/test/snapshots/orchestration-imports.test.js.md index b0a30362b20..b08774246cf 100644 --- a/packages/builders/test/snapshots/orchestration-imports.test.js.md +++ b/packages/builders/test/snapshots/orchestration-imports.test.js.md @@ -143,6 +143,9 @@ Generated by [AVA](https://avajs.dev). icqEnabled: Object @match:kind { payload: 'boolean', }, + pfmEnabled: Object @match:kind { + payload: 'boolean', + }, stakingTokens: Object @match:arrayOf { payload: [ { diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.snap b/packages/builders/test/snapshots/orchestration-imports.test.js.snap index d6c502b9743f72f59e14b545cfd8b5a5fb45f1cc..a0c079da8ae91215e04b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goUhNsPeR;OQYEbfIXs~5O5+@Eutxgk9h_|z%V5) zE@9rsJQE>6CO$8vKJN$tmlD!<=nPyH01kTH^9uHuQ3>?Xnjv zWL(R+E^88eOqxpR<{WEgYh?}P*eTQ+Da~`O%_Uz(=C}^m3Sm%KM@{gsqt2exIBz$HUQT*01q?(`>13=!Q35e06uB}DjEs(_yQ-|8-XaLolrpQZv<9T+QNd4 zCmVt7jld<1&e(J^jZIfH0@qM`-=_9_4>baN8-dpvfy0eJYZGuv6EM^SB$|l)^n!)? zeiQJcCg6@H;OQpdwI<+wDqBWmPINgnTIOp8g3Z8!W?-P17+X;=CA=A!YzB5x>Ri*8>KR#-9Ig* zk_kyyRAEdXiiCt!pUo2-_iK4d8s#bb+ko{dvv0{y=Hzb4`E$k8;}~qzfK^&G#JPeu z@oXX1nuZYpsyE*vTwN=v`pkfXc7Z^fCDPU^s-ER+6F5FaO>i~$uHGde6`8!^Mxni2 z(903n~~#$6j4maq*PzdO7VQTTIHIaFYr!a@wfREdNFWQ{BV#Jv%I*rx3R?^GcfvR@We`|!*WdB}aSk1lz z3ac^1)`E7RhuZ2a`KTCZ2L>s+>Xe^Bjd)oHP}u==bPz**C6?1Nu|zP@ z*8!~R0LH0_l?5iMORQ_RIiM>$fL+wc8n>#*y&b^)RB^7G;)M=iKUG}dvJZXC^IivV zh-$uDN@I`F=QukF`p)vs2mJGiRc0=f9I)OiR0*5+*a2K$+3)tL6%ncVj z;CFNZmv#ZSbOFzH0q=JKfhdukS5Q@mMuFp^&Jk^TH-U{8i-myqMA@`*@rDzHe7CL_Xz3*mv=x0YE$anVQtCw|9z4g8WmU*DaoO5iVy&;} b1+Jl8PZmtmQKI|?W9 Date: Mon, 21 Oct 2024 13:48:07 -0400 Subject: [PATCH 06/15] feat: CosmosChainInfo includes `pfmEnabled?: boolean` - in order to determine whether its possible to route a transfer through a particular ibc chain, we must know if they have the PFM module installed --- packages/orchestration/src/cosmos-api.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/orchestration/src/cosmos-api.ts b/packages/orchestration/src/cosmos-api.ts index b718b7fa916..35dfea2d386 100644 --- a/packages/orchestration/src/cosmos-api.ts +++ b/packages/orchestration/src/cosmos-api.ts @@ -97,7 +97,11 @@ export type CosmosChainInfo = Readonly<{ connections?: Record; // chainId or wellKnownName // UNTIL https://github.com/Agoric/agoric-sdk/issues/9326 icqEnabled?: boolean; - + /** + * Note: developers must provide this value themselves for `.transfer` to work + * as expected. Please see examples for details. + */ + pfmEnabled?: boolean; /** * cf https://github.com/cosmos/chain-registry/blob/master/chain.schema.json#L117 */ From b11b3e6e440ed991cb5d8703d85eb69927d58db1 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 13 Nov 2024 17:26:20 -0500 Subject: [PATCH 07/15] feat: chain-capabilities.js constants - adds `ICQ_ENABLED` and `PFM_ENABLED` constants to support `CosmosChainInfo` - this data is not available via a well-known registry like cosmos/chain-registry, but necessary for the Orchestration API --- .../orchestration/src/chain-capabilities.js | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 packages/orchestration/src/chain-capabilities.js diff --git a/packages/orchestration/src/chain-capabilities.js b/packages/orchestration/src/chain-capabilities.js new file mode 100644 index 00000000000..92790d1969b --- /dev/null +++ b/packages/orchestration/src/chain-capabilities.js @@ -0,0 +1,45 @@ +/** + * @file Contains ChainInfo that not available from a well-known chain registry. + * + * This is used to seed `agoricNames` and `ChainHub`. However, the data is + * dynamic and can change over time. (Remote chains can choose to add or + * remove ibc application modules with chain software upgrades and change + * allowlist settings.) + * + * Developers should use `ChainHubAdmin` as part of their creator or governed + * facet if they wish to have fine-grained control over the data in their + * local `ChainHub`. + * + * Last Updated November 11, 2024 + */ + +/** @import {KnownChains} from '@agoric/orchestration'; */ + +/** + * Chains with the async-icq (icq-1) module available. + * + * @satisfies {(keyof KnownChains)[]} + */ +export const ICQ_ENABLED = /** @type {const} } */ ['omniflixhub', 'osmosis']; +harden(ICQ_ENABLED); + +/** + * Chains with the packet-forward-middleware module available. + * + * @satisfies {(keyof KnownChains)[]} + */ +export const PFM_ENABLED = /** @type {const} } */ [ + 'agoric', + 'celestia', + 'cosmoshub', + 'juno', + 'neutron', + 'noble', + 'omniflixhub', + 'osmosis', + 'secretnetwork', + 'stargaze', + 'stride', + 'umee', +]; +harden(PFM_ENABLED); From 15290f51b08c87dd1f23e6cdc2328a10b4b7389d Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 29 Oct 2024 11:54:15 -0400 Subject: [PATCH 08/15] fix: yarn codegen script - use `ts-blank-space` since `tsx` is no longer in `node_modules/.bin` - prefer yarn command instead of standalone script --- packages/orchestration/scripts/fetch-chain-info.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/orchestration/scripts/fetch-chain-info.ts b/packages/orchestration/scripts/fetch-chain-info.ts index 9634dfc884e..e304d6993d9 100755 --- a/packages/orchestration/scripts/fetch-chain-info.ts +++ b/packages/orchestration/scripts/fetch-chain-info.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env tsx +#!/usr/bin/env TS_BLANK_SPACE_EMIT=false node --import ts-blank-space/register /** @file Fetch canonical chain info to generate the minimum needed for agoricNames */ import { ChainRegistryClient } from '@chain-registry/client'; import fsp from 'node:fs/promises'; From 6121bed025de213654085b95650cd128a2968b42 Mon Sep 17 00:00:00 2001 From: Ikenna Omekam Date: Mon, 11 Nov 2024 17:03:23 -0600 Subject: [PATCH 09/15] add pfmEnabled to shape --- .../orchestration-imports.test.js.md | 3 +++ .../orchestration-imports.test.js.snap | Bin 3435 -> 3440 bytes packages/orchestration/src/typeGuards.js | 1 + 3 files changed, 4 insertions(+) diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.md b/packages/builders/test/snapshots/orchestration-imports.test.js.md index ecdfe224713..5275cf788fb 100644 --- a/packages/builders/test/snapshots/orchestration-imports.test.js.md +++ b/packages/builders/test/snapshots/orchestration-imports.test.js.md @@ -143,6 +143,9 @@ Generated by [AVA](https://avajs.dev). icqEnabled: Object @match:kind { payload: 'boolean', }, + pfmEnabled: Object @match:kind { + payload: 'boolean', + }, stakingTokens: Object @match:arrayOf { payload: [ { diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.snap b/packages/builders/test/snapshots/orchestration-imports.test.js.snap index 36954c0af3c647e00ebe7453400faf728314b59c..1b4911920138ef628f9067c589190e2f93cb6796 100644 GIT binary patch literal 3440 zcmV-$4Uh6cRzVyw zRV*G0)*p)q00000000BcT6t_7)fxZ2T_1bcd-(P`hY!~F+M$62$i)%INr)2?hhPE; zM;Pyp?ZLY+ub`co>r36+6@nix}>MY-E&t8lZq-O z7bUO^C55tJ$ceX3}CL5&^3R>i`Qewy_FmVqUQ7C<_f`lo?qc zQYSB(60)L+&vJNlNX~5%bccleMgrRmRpd#|p0&)8eGLghj&lIYMN$C@UE{?1wl; z$YeOXc%8!oCSJsjaaeR@)$s6?Aj@KUWOb2poTD^y6h|LTHQZngk|N7u(ijPED#o!| zoGgd63pifu$g1HnRgkp_Q60@1TyCYVUvi17o8z`nWP9r;1&!6XaA{ zR7XtiyS$;zs-i24i-sb#+zgCK8Bx=POx9!-Nh>%~cx?A7C6yb^>YT3`ju0BlWyREb zjbG^dIlLih?3A@aQb>s#MSV(1X(s0-j^j@mOSw+arcCHF4rx*Gn%!O`s;s&wRV1tY&ol zYB8xZPn7vGf}WgOuBhgF9s#Q|=|_CPQA)3iGQUL^ii!xB-_TVb z^aF?dz%f7YFFz0p5F6icPCx`KQ26vQPdoq&Qpr-cZY|yF0I;6w&UT%|03cDtO4msY z0Jl)Z`L2@~0QOVGhA3;AoDtO2a>>}b6GBov-+0W6yaxlop#bm}6^_xZ(&cmkT zBUW1Att$dPQBEo;NuD$jKZjJ$3h5b<>n>d9>dhJM@HTh&#!7INH4_|MH7;mY#6HTk z`i)le#5bY0`H_sPf@}>vP|r1+bHe$syx!Ht9q#bW?(k#o@avUej|o?YI9ShR#f#On z2?RrBSIkmHc~BN)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** zIm}s>900Zs5C>+Ky;t2c0DPBHw^q0pok6ZvEz$JnnSlyxePjSQO1qvcnWoP;AU5e^ N{~tzJ&16C>0008VblLy_ diff --git a/packages/orchestration/src/typeGuards.js b/packages/orchestration/src/typeGuards.js index 48d11aa7e43..c075c7b522f 100644 --- a/packages/orchestration/src/typeGuards.js +++ b/packages/orchestration/src/typeGuards.js @@ -99,6 +99,7 @@ export const CosmosChainInfoShape = M.splitRecord( stakingTokens: M.arrayOf({ denom: M.string() }), // UNTIL https://github.com/Agoric/agoric-sdk/issues/9326 icqEnabled: M.boolean(), + pfmEnabled: M.boolean(), }, ); From 6eebba09f31c461bd69684cd75a76c10b67e42c6 Mon Sep 17 00:00:00 2001 From: Ikenna Omekam Date: Thu, 14 Nov 2024 05:52:49 -0600 Subject: [PATCH 10/15] feat: isPFM and registerKnownChainsAndAssets addition --- packages/orchestration/index.js | 2 + packages/orchestration/src/cosmos-api.ts | 22 +- .../orchestration/src/exos/chain-hub-admin.js | 75 ++++-- .../src/exos/local-orchestration-account.js | 217 +++++++++++++++--- .../src/utils/chain-hub-helper.js | 89 +++++++ 5 files changed, 347 insertions(+), 58 deletions(-) create mode 100644 packages/orchestration/src/utils/chain-hub-helper.js diff --git a/packages/orchestration/index.js b/packages/orchestration/index.js index e124fcacb12..e18565fc235 100644 --- a/packages/orchestration/index.js +++ b/packages/orchestration/index.js @@ -9,3 +9,5 @@ export * from './src/exos/chain-hub-admin.js'; export * from './src/typeGuards.js'; export { withOrchestration } from './src/utils/start-helper.js'; + +export { registerKnownChainsAndAssets } from './src/utils/chain-hub-helper.js'; diff --git a/packages/orchestration/src/cosmos-api.ts b/packages/orchestration/src/cosmos-api.ts index ce3bb84e90c..5744ae3bddb 100644 --- a/packages/orchestration/src/cosmos-api.ts +++ b/packages/orchestration/src/cosmos-api.ts @@ -19,7 +19,7 @@ import type { } from '@agoric/cosmic-proto/tendermint/abci/types.js'; import type { Brand, Purse, Payment, Amount } from '@agoric/ertp/src/types.js'; import type { Port } from '@agoric/network'; -import type { IBCChannelID, IBCConnectionID } from '@agoric/vats'; +import type { IBCChannelID, IBCConnectionID, IBCPortID } from '@agoric/vats'; import type { TargetApp, TargetRegistration, @@ -334,3 +334,23 @@ export type CosmosChainAccountMethods = export type ICQQueryFunction = ( msgs: JsonSafe[], ) => Promise[]>; + +/** + * Message structure for PFM memo + * + * @see {@link https://github.com/cosmos/chain-registry/blob/58b603bbe01f70e911e3ad2bdb6b90c4ca665735/_memo_keys/ICS20_memo_keys.json#L38-L60} + */ +export interface ForwardInfo { + forward: { + receiver: ChainAddress['value']; + port: IBCPortID; + channel: IBCChannelID; + // TODO type me better e.g. '30min' + timeout: string; + /** default is 3? */ + retries: number; + next?: { + forward: ForwardInfo; + }; + }; +} diff --git a/packages/orchestration/src/exos/chain-hub-admin.js b/packages/orchestration/src/exos/chain-hub-admin.js index e790257b3b4..ffc211d36fd 100644 --- a/packages/orchestration/src/exos/chain-hub-admin.js +++ b/packages/orchestration/src/exos/chain-hub-admin.js @@ -1,13 +1,14 @@ /* we expect promises to resolved promptly, */ -/* eslint-disable no-restricted-syntax */ -import { heapVowE } from '@agoric/vow/vat.js'; + import { M } from '@endo/patterns'; +import { VowShape } from '@agoric/vow'; import { CosmosChainInfoShape } from '../typeGuards.js'; import { DenomDetailShape } from './chain-hub.js'; /** * @import {Zone} from '@agoric/zone'; - * @import {CosmosChainInfo, Denom, IBCConnectionInfo} from '@agoric/orchestration'; + * @import {CosmosChainInfo, Denom, IBCConnectionInfo, KnownChains} from '@agoric/orchestration'; + * * @import {ChainHub, DenomDetail} from './chain-hub.js'; */ @@ -20,10 +21,19 @@ import { DenomDetailShape } from './chain-hub.js'; * * ```js * const chainHubAdmin = prepareChainHubAdmin(zone, chainHub); - * chainHubAdmin.initChain( + * chainHubAdmin.registerChain( * 'hotNewChain', * hotNewChainInfo, - * agoricTohotNewChainConnectionInfo, + * ); + * chainHubAdmin.registerConnection( + * 'aWellKnownChainId' + * 'hotNewChainId', + * 'aWellKnownChainToHotNewChainConnectionInfo', + * ); + * chainHubAdmin.registerAsset( + * 'aWellKnownChainId' + * 'hotNewChainId', + * 'aWellKnownChainToHotNewChainConnectionInfo', * ); * ``` * @@ -35,31 +45,54 @@ export const prepareChainHubAdmin = (zone, chainHub) => { const makeCreatorFacet = zone.exo( 'ChainHub Admin', M.interface('ChainHub Admin', { - registerChain: M.callWhen( + populateChainsAndConnection: M.call(M.string(), M.string()).returns( + VowShape, + ), + registerChain: M.call(M.string(), CosmosChainInfoShape).returns( + M.undefined(), + ), + registerConnection: M.call( + M.string(), M.string(), - CosmosChainInfoShape, ConnectionInfoShape, ).returns(M.undefined()), - registerAsset: M.call(M.string(), DenomDetailShape).returns(M.promise()), + registerAsset: M.call(M.string(), DenomDetailShape).returns( + M.undefined(), + ), }), { /** - * Register information for a chain + * Sends query that populates local ChainHub with chain and connection + * info. + * + * @param {keyof KnownChains} primaryName + * @param {keyof KnownChains} counterName + */ + populateChainsAndConnection(primaryName, counterName) { + return chainHub.getChainsAndConnection(primaryName, counterName); + }, + /** + * Register information for a chain. * * @param {string} chainName - must not exist in chainHub * @param {CosmosChainInfo} chainInfo - * @param {IBCConnectionInfo} connectionInfo - from Agoric chain */ - async registerChain(chainName, chainInfo, connectionInfo) { + registerChain(chainName, chainInfo) { // when() because chainHub methods return vows. If this were inside // orchestrate() the membrane would wrap/unwrap automatically. - const agoricChainInfo = await heapVowE.when( - chainHub.getChainInfo('agoric'), - ); - chainHub.registerChain(chainName, chainInfo); - chainHub.registerConnection( - agoricChainInfo.chainId, - chainInfo.chainId, + return chainHub.registerChain(chainName, chainInfo); + }, + /** + * Register a connection between two chains. + * + * @param {string} primaryChainId + * @param {string} counterpartyChainId + * @param {IBCConnectionInfo} connectionInfo + */ + registerConnection(primaryChainId, counterpartyChainId, connectionInfo) { + return chainHub.registerConnection( + primaryChainId, + counterpartyChainId, connectionInfo, ); }, @@ -71,10 +104,8 @@ export const prepareChainHubAdmin = (zone, chainHub) => { * `detail.chainName` * @param {DenomDetail} detail - chainName and baseName must be registered */ - async registerAsset(denom, detail) { - // XXX async work necessary before the synchronous call - await heapVowE.when(chainHub.getChainInfo('agoric')); - chainHub.registerAsset(denom, detail); + registerAsset(denom, detail) { + return chainHub.registerAsset(denom, detail); }, }, ); diff --git a/packages/orchestration/src/exos/local-orchestration-account.js b/packages/orchestration/src/exos/local-orchestration-account.js index bc5e1f2a48a..6feee846e78 100644 --- a/packages/orchestration/src/exos/local-orchestration-account.js +++ b/packages/orchestration/src/exos/local-orchestration-account.js @@ -6,14 +6,16 @@ import { Shape as NetworkShape } from '@agoric/network'; import { M } from '@agoric/vat-data'; import { VowShape } from '@agoric/vow'; import { E } from '@endo/far'; -import { Fail, q } from '@endo/errors'; +import { Fail, q, makeError } from '@endo/errors'; import { AmountArgShape, AnyNatAmountsRecord, ChainAddressShape, + ChainInfoShape, DenomAmountShape, DenomShape, + IBCConnectionInfoShape, IBCTransferOptionsShape, TimestampProtoShape, TypedJsonShape, @@ -28,7 +30,7 @@ import { coerceCoin, coerceDenomAmount } from '../utils/amounts.js'; /** * @import {HostOf} from '@agoric/async-flow'; * @import {LocalChain, LocalChainAccount} from '@agoric/vats/src/localchain.js'; - * @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, IBCConnectionInfo, OrchestrationAccountI, LocalAccountMethods} from '@agoric/orchestration'; + * @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, IBCConnectionInfo, OrchestrationAccountI, LocalAccountMethods, ForwardInfo, ChainInfo, CosmosChainInfo} from '@agoric/orchestration'; * @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'. * @import {Zone} from '@agoric/zone'; * @import {Remote} from '@agoric/internal'; @@ -38,7 +40,7 @@ import { coerceCoin, coerceDenomAmount } from '../utils/amounts.js'; * @import {TypedJson, JsonSafe, ResponseTo} from '@agoric/cosmic-proto'; * @import {Coin} from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js'; * @import {Matcher} from '@endo/patterns'; - * @import {ChainHub} from './chain-hub.js'; + * @import {ChainHub, DenomDetail} from './chain-hub.js'; * @import {PacketTools} from './packet-tools.js'; * @import {ZoeTools} from '../utils/zoe-tools.js'; */ @@ -138,7 +140,8 @@ export const prepareLocalOrchestrationAccountKit = ( .optional({ destination: ChainAddressShape, opts: M.or(M.undefined(), IBCTransferOptionsShape), - amount: DenomAmountShape, + denomAmount: DenomAmountShape, + isPfm: M.boolean(), }) .returns(Vow$(M.record())), }), @@ -167,6 +170,24 @@ export const prepareLocalOrchestrationAccountKit = ( M.arrayOf(DenomAmountShape), ), }), + issuingChainInfoWatcher: M.interface('issuingChainInfoWatcher', { + onFulfilled: M.call(ChainInfoShape, { + baseName: M.string(), + denomAmount: DenomAmountShape, + destination: ChainAddressShape, + opts: M.or(IBCTransferOptionsShape, M.undefined()), + timeoutTimestampVowOrValue: M.any(), // TODO typeme + }).returns(VowShape), + }), + pfmConnectionsWatcher: M.interface('pfmConnectionsWatcher', { + onFulfilled: M.call([IBCConnectionInfoShape, IBCConnectionInfoShape], { + baseChainId: M.string(), + denomAmount: DenomAmountShape, + destination: ChainAddressShape, + opts: M.or(IBCTransferOptionsShape, M.undefined()), + timeoutTimestampVowOrValue: M.any(), // TODO typeme + }).returns(VowShape), + }), invitationMakers: M.interface('invitationMakers', { CloseAccount: M.call().returns(M.promise()), Delegate: M.call(M.string(), AmountShape).returns(M.promise()), @@ -352,12 +373,13 @@ export const prepareLocalOrchestrationAccountKit = ( * @param {{ * destination: ChainAddress; * opts?: IBCMsgTransferOptions; - * amount: DenomAmount; + * denomAmount: DenomAmount; + * isPfm: boolean; * }} ctx */ onFulfilled( [{ transferChannel }, timeoutTimestamp], - { opts, amount, destination }, + { opts, denomAmount, destination, isPfm }, ) { const transferMsg = typedJson( '/ibc.applications.transfer.v1.MsgTransfer', @@ -365,11 +387,11 @@ export const prepareLocalOrchestrationAccountKit = ( sourcePort: transferChannel.portId, sourceChannel: transferChannel.channelId, token: { - amount: String(amount.value), - denom: amount.denom, + amount: String(denomAmount.value), + denom: denomAmount.denom, }, sender: this.state.address.value, - receiver: destination.value, + receiver: !isPfm ? destination.value : 'pfm', timeoutHeight: opts?.timeoutHeight ?? { revisionHeight: 0n, revisionNumber: 0n, @@ -395,9 +417,7 @@ export const prepareLocalOrchestrationAccountKit = ( * first result */ extractFirstResultWatcher: { - /** - * @param {Record[]} results - */ + /** @param {Record[]} results */ onFulfilled(results) { results.length === 1 || Fail`expected exactly one result; got ${results}`; @@ -481,6 +501,133 @@ export const prepareLocalOrchestrationAccountKit = ( return harden(balances.map(toDenomAmount)); }, }, + issuingChainInfoWatcher: { + /** + * @param {ChainInfo} chainInfo + * @param {{ + * destination: ChainAddress; + * baseName: DenomDetail['baseName']; + * denomAmount: DenomAmount; + * opts?: IBCMsgTransferOptions; + * timeoutTimestampVowOrValue: Vow | bigint; + * }} ctx + */ + onFulfilled( + chainInfo, + { + destination, + baseName, + denomAmount, + opts, + timeoutTimestampVowOrValue, + }, + ) { + const { chainId: baseChainId, pfmEnabled } = + /** @type {CosmosChainInfo} */ (chainInfo); + + if (baseChainId !== destination.chainId && baseName !== 'agoric') { + if (!pfmEnabled) { + throw makeError( + `PFM not supported on ${q(baseName)} - ${q(baseChainId)}`, + ); + } + + const currToIssuerV = chainHub.getConnectionInfo( + this.state.address.chainId, + baseChainId, + ); + const issuerToDestV = chainHub.getConnectionInfo( + baseChainId, + destination.chainId, + ); + + return watch( + allVows([currToIssuerV, issuerToDestV]), + this.facets.pfmConnectionsWatcher, + { + baseChainId, + destination, + denomAmount, + opts, + timeoutTimestampVowOrValue, + }, + ); + } + + // Direct transfer case + const connectionInfoV = chainHub.getConnectionInfo( + this.state.address.chainId, + destination.chainId, + ); + + return watch( + allVows([connectionInfoV, timeoutTimestampVowOrValue]), + this.facets.transferWatcher, + { + opts, + denomAmount, + destination, + isPfm: false, + }, + ); + }, + }, + pfmConnectionsWatcher: { + /** + * @param {[IBCConnectionInfo, IBCConnectionInfo]} connections + * @param {{ + * baseChainId: string; + * destination: ChainAddress; + * denomAmount: DenomAmount; + * opts?: IBCMsgTransferOptions; + * timeoutTimestampVowOrValue: Vow | bigint; + * }} ctx + */ + onFulfilled( + [currToIssuer, issuerToDest], + { + baseChainId, + destination, + denomAmount, + opts, + timeoutTimestampVowOrValue, + }, + ) { + if (!currToIssuer.transferChannel) { + throw makeError( + `No transfer channel found between ${q(this.state.address.chainId)} and ${q(baseChainId)}`, + ); + } + + if (!issuerToDest.transferChannel) { + throw makeError( + `No transfer channel found between ${q(baseChainId)} and ${q(destination.chainId)}`, + ); + } + + /** @type {ForwardInfo} */ + const pfmMemo = { + forward: { + receiver: destination.value, + port: issuerToDest.transferChannel.portId, + channel: issuerToDest.transferChannel.channelId, + timeout: '10m', // TODO const + expose in MsgTransferOpts? + retries: 3, // TODO const + expose in MsgTransferOpts? + }, + }; + + return watch( + allVows([currToIssuer, timeoutTimestampVowOrValue]), + this.facets.transferWatcher, + { + opts: { ...opts, memo: JSON.stringify(pfmMemo) }, + denomAmount, + destination, + isPfm: true, + }, + ); + }, + }, holder: { /** @type {HostOf} */ asContinuingOffer() { @@ -504,9 +651,7 @@ export const prepareLocalOrchestrationAccountKit = ( }); }); }, - /** - * @type {HostOf} - */ + /** @type {HostOf} */ getBalance(denomArg) { return asVow(() => { const [brand, denom] = @@ -549,9 +694,7 @@ export const prepareLocalOrchestrationAccountKit = ( ); }, - /** - * @type {HostOf} - */ + /** @type {HostOf} */ getPublicTopics() { // getStoragePath resolves promptly (same run), so we don't need a watcher // eslint-disable-next-line no-restricted-syntax @@ -687,33 +830,37 @@ export const prepareLocalOrchestrationAccountKit = ( return asVow(() => { trace('Transferring funds from LCA over IBC'); - const connectionInfoV = watch( - chainHub.getConnectionInfo( - this.state.address.chainId, - destination.chainId, - ), - ); + const denomAmount = coerceDenomAmount(chainHub, amount); + const denomDetail = chainHub.getAsset(denomAmount.denom); + if (!denomDetail) { + throw makeError( + `Unable to fetch denom detail for ${denomAmount.denom}`, + ); + } + const { baseName, chainName } = denomDetail; + if (chainName !== 'agoric') { + throw makeError( + `Cannot transfer asset that's not present on ${this.state.address.chainId}. Ensure it's registered in ChainHub.`, + ); + } - // set a `timeoutTimestamp` if caller does not supply either `timeoutHeight` or `timeoutTimestamp` - // TODO #9324 what's a reasonable default? currently 5 minutes const timeoutTimestampVowOrValue = opts?.timeoutTimestamp ?? (opts?.timeoutHeight ? 0n - : E(timestampHelper).getTimeoutTimestampNS()); + : asVow(() => E(timestampHelper).getTimeoutTimestampNS())); - // don't resolve the vow until the transfer is confirmed on remote - // and reject vow if the transfer fails for any reason - const resultV = watch( - allVows([connectionInfoV, timeoutTimestampVowOrValue]), - this.facets.transferWatcher, + return watch( + chainHub.getChainInfo(baseName), + this.facets.issuingChainInfoWatcher, { - opts, - amount: coerceDenomAmount(chainHub, amount), destination, + baseName, + denomAmount, + opts, + timeoutTimestampVowOrValue, }, ); - return resultV; }); }, /** @type {HostOf} */ diff --git a/packages/orchestration/src/utils/chain-hub-helper.js b/packages/orchestration/src/utils/chain-hub-helper.js new file mode 100644 index 00000000000..43a8da65c20 --- /dev/null +++ b/packages/orchestration/src/utils/chain-hub-helper.js @@ -0,0 +1,89 @@ +import { E } from '@endo/far'; +import { makeTracer } from '@agoric/internal'; +import { denomHash } from './denomHash.js'; +import { registerChain } from '../chain-info.js'; + +const trace = makeTracer('ChainHubHelper', true); + +/** + * @import {ERef} from '@endo/far'; + * @import {KnownChains} from '../chain-info.js'; + * @import {ChainHubAdmin} from '../exos/chain-hub-admin.js'; + */ + +/** + * Consider this a sloppy hack until #9752 + * + * @param {{ + * agoricNamesAdmin?: ERef?; + * vowTools: import('@agoric/vow').VowTools; + * chainHubAdmin: ERef; + * }} powers + * @param {KnownChains} chainInfo + * @param {Record>} brands + */ +export const registerKnownChainsAndAssets = async ( + { vowTools, chainHubAdmin }, + chainInfo, + brands, +) => { + await vowTools.when( + vowTools.all([ + // multichain-e2e flows + E(chainHubAdmin).populateChainsAndConnection('agoric', 'cosmoshub'), + E(chainHubAdmin).populateChainsAndConnection('agoric', 'osmosis'), + E(chainHubAdmin).populateChainsAndConnection('cosmoshub', 'osmosis'), + // FastUSDC + E(chainHubAdmin).populateChainsAndConnection('agoric', 'noble'), + E(chainHubAdmin).populateChainsAndConnection('dydx', 'noble'), + ]), + ); + + await Promise.all([ + // agoric + E(chainHubAdmin).registerAsset('ubld', { + chainName: 'agoric', + baseName: 'agoric', + baseDenom: 'ubld', + brand: brands?.BLD, + }), + E(chainHubAdmin).registerAsset('uist', { + chainName: 'agoric', + baseName: 'agoric', + baseDenom: 'uist', + brand: brands?.IST, + }), + E(chainHubAdmin).registerAsset( + `ibc/${denomHash({ + channelId: + chainInfo.agoric.connections['noble-1'].transferChannel.channelId, + denom: 'uusdc', + })}`, + { + chainName: 'agoric', + baseName: 'noble', + baseDenom: 'uusdc', + brand: brands?.USDC, + }, + ), + // noble + E(chainHubAdmin).registerAsset('uusdc', { + chainName: 'noble', + baseName: 'noble', + baseDenom: 'uusdc', + }), + // dydx + E(chainHubAdmin).registerAsset( + `ibc/${denomHash({ + channelId: + chainInfo.dydx.connections['noble-1'].transferChannel.channelId, + denom: 'uusdc', + })}`, + { + chainName: 'dydx', + baseName: 'noble', + baseDenom: 'uusdc', + }, + ), + ]); +}; From 2d35e71db6a0236c3775035cb3bfae3f58836e0c Mon Sep 17 00:00:00 2001 From: Ikenna Omekam Date: Thu, 14 Nov 2024 10:06:52 -0500 Subject: [PATCH 11/15] test: fixing send-anywhere dependent tests --- .../orchestration/contract-upgrade.test.ts | 16 +- .../scripts/testing/start-send-anywhere.js | 7 + ...ndAnywhere.js => upgrade-send-anywhere.js} | 29 +-- .../src/examples/send-anywhere.contract.js | 35 +++- .../orchestration/src/utils/start-helper.js | 1 + .../test/examples/send-anywhere.test.ts | 9 +- .../snapshots/send-anywhere.test.ts.md | 190 ++++++++++++++++-- .../snapshots/send-anywhere.test.ts.snap | Bin 1714 -> 3224 bytes 8 files changed, 240 insertions(+), 47 deletions(-) rename packages/builders/scripts/testing/{fix-buggy-sendAnywhere.js => upgrade-send-anywhere.js} (81%) diff --git a/packages/boot/test/orchestration/contract-upgrade.test.ts b/packages/boot/test/orchestration/contract-upgrade.test.ts index 86f76a30102..dc092858195 100644 --- a/packages/boot/test/orchestration/contract-upgrade.test.ts +++ b/packages/boot/test/orchestration/contract-upgrade.test.ts @@ -44,9 +44,7 @@ test('resume', async t => { t.log('start sendAnywhere'); await evalProposal( - buildProposal( - '@agoric/builders/scripts/testing/start-buggy-sendAnywhere.js', - ), + buildProposal('@agoric/builders/scripts/testing/start-send-anywhere.js'), ); t.log('making offer'); @@ -70,16 +68,11 @@ test('resume', async t => { // XXX golden test const getLogged = () => - JSON.parse(storage.data.get('published.sendAnywhere.log')!).values; + JSON.parse(storage.data.get('published.send-anywhere.log')!).values; // This log shows the flow started, but didn't get past the name lookup t.deepEqual(getLogged(), ['sending {0} from cosmoshub to cosmos1whatever']); - t.log('upgrade sendAnywhere with fix'); - await evalProposal( - buildProposal('@agoric/builders/scripts/testing/fix-buggy-sendAnywhere.js'), - ); - t.deepEqual(getLogged(), [ 'sending {0} from cosmoshub to cosmos1whatever', 'got info for denoms: ibc/toyatom, ibc/toyusdc, ubld, uist', @@ -87,6 +80,11 @@ test('resume', async t => { 'completed transfer to localAccount', ]); + t.log('upgrade sendAnywhere with fix'); + await evalProposal( + buildProposal('@agoric/builders/scripts/testing/upgrade-send-anywhere.js'), + ); + // simulate ibc/MsgTransfer ack from remote chain, enabling `.transfer()` promise // to resolve await runInbound( diff --git a/packages/builders/scripts/testing/start-send-anywhere.js b/packages/builders/scripts/testing/start-send-anywhere.js index e29d043ccb8..fcda98e8884 100644 --- a/packages/builders/scripts/testing/start-send-anywhere.js +++ b/packages/builders/scripts/testing/start-send-anywhere.js @@ -27,6 +27,13 @@ const trace = makeTracer('StartSA', true); * sendAnywhere: Installation; * }; * }; + * issuer: { + * consume: { + * BLD: Brand<'nat'>; + * IST: Brand<'nat'>; + * USDC: Brand<'nat'>; + * }; + * }; * }} powers */ export const startSendAnywhere = async ({ diff --git a/packages/builders/scripts/testing/fix-buggy-sendAnywhere.js b/packages/builders/scripts/testing/upgrade-send-anywhere.js similarity index 81% rename from packages/builders/scripts/testing/fix-buggy-sendAnywhere.js rename to packages/builders/scripts/testing/upgrade-send-anywhere.js index 8daa2dbf516..0872ebea916 100644 --- a/packages/builders/scripts/testing/fix-buggy-sendAnywhere.js +++ b/packages/builders/scripts/testing/upgrade-send-anywhere.js @@ -7,14 +7,14 @@ import { makeTracer, NonNullish, } from '@agoric/internal'; -import { E, Far } from '@endo/far'; +import { E } from '@endo/far'; /// /** * @import {Installation, Instance} from '@agoric/zoe/src/zoeService/utils.js'; */ -const trace = makeTracer('FixBuggySA', true); +const trace = makeTracer('UpgradeSA', true); /** * @import {start as StartFn} from '@agoric/orchestration/src/examples/send-anywhere.contract.js'; @@ -30,7 +30,7 @@ const trace = makeTracer('FixBuggySA', true); * }} powers * @param {...any} rest */ -export const fixSendAnywhere = async ( +export const upgradeSendAnywhere = async ( { consume: { agoricNames, @@ -45,7 +45,7 @@ export const fixSendAnywhere = async ( }, { options: { sendAnywhereRef } }, ) => { - trace(fixSendAnywhere.name); + trace(upgradeSendAnywhere.name); const saInstance = await instances.consume.sendAnywhere; trace('saInstance', saInstance); @@ -53,28 +53,21 @@ export const fixSendAnywhere = async ( const marshaller = await E(board).getReadonlyMarshaller(); - // This apparently pointless wrapper is to maintain structural parity - // with the buggy core-eval's wrapper to make lookup() hang. - const agoricNamesResolves = Far('agoricNames that resolves', { - lookup: async (...args) => { - return E(agoricNames).lookup(...args); - }, - }); - const privateArgs = await deeplyFulfilledObject( harden({ - agoricNames: agoricNamesResolves, + agoricNames, localchain, marshaller, orchestrationService: cosmosInterchainService, storageNode: E(NonNullish(await chainStorage)).makeChildNode( - 'sendAnywhere', + 'send-anywhere', ), timerService: chainTimerService, }), ); trace('upgrading...'); + trace('ref', sendAnywhereRef); await E(saKit.adminFacet).upgradeContract( sendAnywhereRef.bundleID, privateArgs, @@ -82,13 +75,13 @@ export const fixSendAnywhere = async ( trace('done'); }; -harden(fixSendAnywhere); +harden(upgradeSendAnywhere); export const getManifestForValueVow = ({ restoreRef }, { sendAnywhereRef }) => { console.log('sendAnywhereRef', sendAnywhereRef); return { manifest: { - [fixSendAnywhere.name]: { + [upgradeSendAnywhere.name]: { consume: { agoricNames: true, board: true, @@ -120,7 +113,7 @@ export const getManifestForValueVow = ({ restoreRef }, { sendAnywhereRef }) => { export const defaultProposalBuilder = async ({ publishRef, install }) => harden({ // Somewhat unorthodox, source the exports from this builder module - sourceSpec: '@agoric/builders/scripts/testing/fix-buggy-sendAnywhere.js', + sourceSpec: '@agoric/builders/scripts/testing/upgrade-send-anywhere.js', getManifestCall: [ 'getManifestForValueVow', { @@ -139,5 +132,5 @@ export default async (homeP, endowments) => { const dspModule = await import('@agoric/deploy-script-support'); const { makeHelpers } = dspModule; const { writeCoreEval } = await makeHelpers(homeP, endowments); - await writeCoreEval(fixSendAnywhere.name, defaultProposalBuilder); + await writeCoreEval(upgradeSendAnywhere.name, defaultProposalBuilder); }; diff --git a/packages/orchestration/src/examples/send-anywhere.contract.js b/packages/orchestration/src/examples/send-anywhere.contract.js index 3cfab6ec922..61005a4bc75 100644 --- a/packages/orchestration/src/examples/send-anywhere.contract.js +++ b/packages/orchestration/src/examples/send-anywhere.contract.js @@ -1,11 +1,13 @@ import { InvitationShape } from '@agoric/zoe/src/typeGuards.js'; import { E } from '@endo/far'; import { M } from '@endo/patterns'; +import fetchedChainInfo from '../fetched-chain-info.js'; import { prepareChainHubAdmin } from '../exos/chain-hub-admin.js'; import { AnyNatAmountShape } from '../typeGuards.js'; import { withOrchestration } from '../utils/start-helper.js'; import * as flows from './send-anywhere.flows.js'; import * as sharedFlows from './shared.flows.js'; +import { registerKnownChainsAndAssets } from '../utils/chain-hub-helper.js'; /** * @import {Vow} from '@agoric/vow'; @@ -35,7 +37,7 @@ export const contract = async ( zcf, privateArgs, zone, - { chainHub, orchestrateAll, vowTools, zoeTools }, + { chainHub, orchestrateAll, vowTools, zoeTools, baggage }, ) => { const creatorFacet = prepareChainHubAdmin(zone, chainHub); @@ -65,6 +67,37 @@ export const contract = async ( zoeTools, }); + const incarnationKey = 'incarnation1'; + + await null; + + if (!baggage.has(incarnationKey)) { + baggage.init(incarnationKey, true); + + // register assets in ChainHub ourselves, + // UNTIL https://github.com/Agoric/agoric-sdk/issues/9752 + const assets = + /** @type {import('@agoric/vats/src/vat-bank.js').AssetInfo[]} */ ( + await E(E(privateArgs.agoricNames).lookup('vbankAsset')).values() + ); + + /** @type {Record>} */ + const brands = {}; + + for (const asset of assets) { + brands[asset.issuerName] = /** @type {Brand<'nat'>} */ (asset.brand); + } + + await registerKnownChainsAndAssets( + { + vowTools, + chainHubAdmin: creatorFacet, + }, + fetchedChainInfo, + brands, + ); + } + const publicFacet = zone.exo( 'Send PF', M.interface('Send PF', { diff --git a/packages/orchestration/src/utils/start-helper.js b/packages/orchestration/src/utils/start-helper.js index 366542e0e02..4cc9895b8ed 100644 --- a/packages/orchestration/src/utils/start-helper.js +++ b/packages/orchestration/src/utils/start-helper.js @@ -169,6 +169,7 @@ export const provideOrchestration = ( zcfTools, zoeTools, zone: zones.contract, + baggage, }; }; harden(provideOrchestration); diff --git a/packages/orchestration/test/examples/send-anywhere.test.ts b/packages/orchestration/test/examples/send-anywhere.test.ts index 7e3fa3d6f54..87f4e65dd64 100644 --- a/packages/orchestration/test/examples/send-anywhere.test.ts +++ b/packages/orchestration/test/examples/send-anywhere.test.ts @@ -18,6 +18,7 @@ import type { import { commonSetup } from '../supports.js'; import { SingleNatAmountRecord } from '../../src/examples/send-anywhere.contract.js'; import { registerChain } from '../../src/chain-info.js'; +import fetchedChainInfo from '../../src/fetched-chain-info.js'; const dirname = path.dirname(new URL(import.meta.url).pathname); @@ -90,7 +91,6 @@ test('send using arbitrary chain info', async t => { const hotChainInfo = harden({ chainId: 'hot-new-chain-0', stakingTokens: [{ denom: 'uhot' }], - ...chainInfoDefaults, }) as CosmosChainInfo; t.log('admin adds chain using creatorFacet', hotChainInfo.chainId); const agoricToHotConnection = { @@ -108,9 +108,10 @@ test('send using arbitrary chain info', async t => { }, } as IBCConnectionInfo; const chainName = 'hot'; - await E(sendKit.creatorFacet).registerChain( - chainName, - hotChainInfo, + await E(sendKit.creatorFacet).registerChain(chainName, hotChainInfo); + await E(sendKit.creatorFacet).registerConnection( + 'agoric-3', + hotChainInfo.chainId, agoricToHotConnection, ); diff --git a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md b/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md index 0b109ce5972..38d9cec79f8 100644 --- a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md +++ b/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md @@ -22,13 +22,9 @@ Generated by [AVA](https://avajs.dev). }, LogStore_kindHandle: 'Alleged: kind', StateUnwrapper_kindHandle: 'Alleged: kind', - asyncFuncEagerWakers: [ - Object @Alleged: asyncFlow flow {}, - ], + asyncFuncEagerWakers: [], asyncFuncFailures: {}, - flowForOutcomeVow: { - 'Alleged: VowInternalsKit vowV0': 'Alleged: asyncFlow flow', - }, + flowForOutcomeVow: {}, unwrapMap: 'Alleged: weakMapStore', }, chainHub: { @@ -36,8 +32,16 @@ Generated by [AVA](https://avajs.dev). ChainHub_singleton: 'Alleged: ChainHub', bech32PrefixToChainName: { agoric: 'agoric', + cosmos: 'cosmoshub', + dydx: 'dydx', + noble: 'noble', + osmo: 'osmosis', + }, + brandDenom: { + 'Alleged: BLD brand': 'ubld', + 'Alleged: IST brand': 'uist', + 'Alleged: USDC brand': 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9', }, - brandDenom: {}, chainInfos: { agoric: { bech32Prefix: 'agoric', @@ -50,9 +54,168 @@ Generated by [AVA](https://avajs.dev). }, ], }, + cosmoshub: { + bech32Prefix: 'cosmos', + chainId: 'cosmoshub-4', + icqEnabled: false, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'uatom', + }, + ], + }, + dydx: { + bech32Prefix: 'dydx', + chainId: 'dydx-mainnet-1', + icqEnabled: false, + pfmEnabled: false, + stakingTokens: [ + { + denom: 'adydx', + }, + ], + }, + noble: { + bech32Prefix: 'noble', + chainId: 'noble-1', + icqEnabled: false, + pfmEnabled: true, + }, + osmosis: { + bech32Prefix: 'osmo', + chainId: 'osmosis-1', + icqEnabled: true, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'uosmo', + }, + ], + }, + }, + connectionInfos: { + 'agoric-3_cosmoshub-4': { + client_id: '07-tendermint-6', + counterparty: { + client_id: '07-tendermint-927', + connection_id: 'connection-649', + }, + id: 'connection-8', + state: 3, + transferChannel: { + channelId: 'channel-5', + counterPartyChannelId: 'channel-405', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'agoric-3_noble-1': { + client_id: '07-tendermint-77', + counterparty: { + client_id: '07-tendermint-32', + connection_id: 'connection-40', + }, + id: 'connection-72', + state: 3, + transferChannel: { + channelId: 'channel-62', + counterPartyChannelId: 'channel-21', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'agoric-3_osmosis-1': { + client_id: '07-tendermint-1', + counterparty: { + client_id: '07-tendermint-2109', + connection_id: 'connection-1649', + }, + id: 'connection-1', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-320', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'cosmoshub-4_osmosis-1': { + client_id: '07-tendermint-259', + counterparty: { + client_id: '07-tendermint-1', + connection_id: 'connection-1', + }, + id: 'connection-257', + state: 3, + transferChannel: { + channelId: 'channel-141', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'dydx-mainnet-1_noble-1': { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-59', + connection_id: 'connection-57', + }, + id: 'connection-0', + state: 3, + transferChannel: { + channelId: 'channel-0', + counterPartyChannelId: 'channel-33', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + }, + denom: { + 'ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5': { + baseDenom: 'uusdc', + baseName: 'noble', + chainName: 'dydx', + }, + 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9': { + baseDenom: 'uusdc', + baseName: 'noble', + brand: Object @Alleged: USDC brand {}, + chainName: 'agoric', + }, + ubld: { + baseDenom: 'ubld', + baseName: 'agoric', + brand: Object @Alleged: BLD brand {}, + chainName: 'agoric', + }, + uist: { + baseDenom: 'uist', + baseName: 'agoric', + brand: Object @Alleged: IST brand {}, + chainName: 'agoric', + }, + uusdc: { + baseDenom: 'uusdc', + baseName: 'noble', + chainName: 'noble', + }, }, - connectionInfos: {}, - denom: {}, lookupChainInfo_kindHandle: 'Alleged: kind', lookupChainsAndConnection_kindHandle: 'Alleged: kind', lookupConnectionInfo_kindHandle: 'Alleged: kind', @@ -84,6 +247,7 @@ Generated by [AVA](https://avajs.dev). }, }, }, + incarnation1: true, orchestration: { 'Cosmos Orchestration Account Holder_kindHandle': 'Alleged: kind', 'Local Orchestration Account Kit_kindHandle': 'Alleged: kind', @@ -92,12 +256,8 @@ Generated by [AVA](https://avajs.dev). RemoteChainFacade_kindHandle: 'Alleged: kind', chainName: { agoric: { - pending: true, - vow: Object @Vow { - payload: { - vowV0: Object @Alleged: VowInternalsKit vowV0 {}, - }, - }, + pending: false, + value: Object @Alleged: LocalChainFacade public {}, }, }, ibcTools: { diff --git a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.snap b/packages/orchestration/test/examples/sn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ract.js | 49 +++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/packages/orchestration/src/examples/basic-flows.contract.js b/packages/orchestration/src/examples/basic-flows.contract.js index 60f58cadd1f..be8b3a29bca 100644 --- a/packages/orchestration/src/examples/basic-flows.contract.js +++ b/packages/orchestration/src/examples/basic-flows.contract.js @@ -4,9 +4,13 @@ */ import { InvitationShape } from '@agoric/zoe/src/typeGuards.js'; import { M } from '@endo/patterns'; +import { E } from '@endo/far'; import { preparePortfolioHolder } from '../exos/portfolio-holder-kit.js'; import { withOrchestration } from '../utils/start-helper.js'; import * as flows from './basic-flows.flows.js'; +import { prepareChainHubAdmin } from '../exos/chain-hub-admin.js'; +import { registerKnownChainsAndAssets } from '../utils/chain-hub-helper.js'; +import fetchedChainInfo from '../fetched-chain-info.js'; /** * @import {Zone} from '@agoric/zone'; @@ -17,21 +21,60 @@ import * as flows from './basic-flows.flows.js'; * @param {ZCF} zcf * @param {OrchestrationPowers & { * marshaller: Marshaller; - * }} _privateArgs + * }} privateArgs * @param {Zone} zone * @param {OrchestrationTools} tools */ const contract = async ( zcf, - _privateArgs, + privateArgs, zone, - { orchestrateAll, vowTools }, + { chainHub, orchestrateAll, vowTools, baggage }, ) => { const makePortfolioHolder = preparePortfolioHolder( zone.subZone('portfolio'), vowTools, ); + const creatorFacet = prepareChainHubAdmin(zone, chainHub); + + const incarnationKey = 'incarnation1'; + + await null; + + if (!baggage.has(incarnationKey)) { + baggage.init(incarnationKey, true); + + // register assets in ChainHub ourselves, + // UNTIL https://github.com/Agoric/agoric-sdk/issues/9752 + const assets = + /** @type {import('@agoric/vats/src/vat-bank.js').AssetInfo[]} */ ( + await E(E(privateArgs.agoricNames).lookup('vbankAsset')).values() + ); + + /** @type {Record>} */ + const brands = {}; + + for (const asset of assets) { + brands[asset.issuerName] = /** @type {Brand<'nat'>} */ (asset.brand); + } + + await registerKnownChainsAndAssets( + { + vowTools, + chainHubAdmin: creatorFacet, + }, + fetchedChainInfo, + brands, + ); + + await E(creatorFacet).registerAsset(`ibc/uusdchash`, { + chainName: 'agoric', + baseName: 'agoric', + baseDenom: 'uusdc', + }); + } + const orchFns = orchestrateAll(flows, { makePortfolioHolder }); const publicFacet = zone.exo( From e9ddea51e04a799d9a76b44c699e178a57455155 Mon Sep 17 00:00:00 2001 From: Ikenna Omekam Date: Thu, 14 Nov 2024 10:08:43 -0500 Subject: [PATCH 13/15] test: fixing orch unit tests --- .../orchestration-imports.test.js.md | 1 + .../orchestration-imports.test.js.snap | Bin 3404 -> 3451 bytes .../examples/staking-combinations.contract.js | 4 +- .../examples/auto-stake-it.contract.test.ts | 28 +++++- .../local-orchestration-account-kit.test.ts | 37 +++++++- .../test/exos/make-test-coa-kit.ts | 2 +- .../test/exos/make-test-loa-kit.ts | 4 +- .../test/snapshots/exports.test.ts.md | 1 + .../test/snapshots/exports.test.ts.snap | Bin 582 -> 607 bytes packages/orchestration/test/supports.ts | 80 +++++++++++++++++- 10 files changed, 147 insertions(+), 10 deletions(-) diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.md b/packages/builders/test/snapshots/orchestration-imports.test.js.md index b08774246cf..5afb2f658bb 100644 --- a/packages/builders/test/snapshots/orchestration-imports.test.js.md +++ b/packages/builders/test/snapshots/orchestration-imports.test.js.md @@ -529,5 +529,6 @@ Generated by [AVA](https://avajs.dev). }, prepareChainHubAdmin: Function prepareChainHubAdmin {}, prepareCosmosInterchainService: Function prepareCosmosInterchainService {}, + registerKnownChainsAndAssets: AsyncFunction {}, withOrchestration: Function withOrchestration {}, } diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.snap b/packages/builders/test/snapshots/orchestration-imports.test.js.snap index a0c079da8ae91215e04bcbdc6d662d8648c757f2..73243d913316e708772219a4d8ee78a76b4ef275 100644 GIT binary patch literal 3451 zcmV->4TSPRRzV5cP9~2CH!OMx!?Dld+uY-J@@S1H93)%<5TM1gMub%X<^U&K|U!f zVtkpb#8ZN*DZD1iQoFDxD=V5RsuG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7W@CUB z1Fk2;aR>3_Z?~mZg~2YB-V}3|grANTLecv%QdK<>KHq2{MXC%`F>fqjo;b~0?|R|^vx+B`ePM715S>Q zd3pzdI5C=b7`1opfR!OYGj(Y i>>aAG)(;K=57Dl-mrT=1qWmUf?EeAa-0rd%EC2w^$A-@U diff --git a/packages/orchestration/src/examples/staking-combinations.contract.js b/packages/orchestration/src/examples/staking-combinations.contract.js index 0f233c85fdf..baa9a41353c 100644 --- a/packages/orchestration/src/examples/staking-combinations.contract.js +++ b/packages/orchestration/src/examples/staking-combinations.contract.js @@ -79,14 +79,14 @@ const contract = async ( orchFns.depositAndDelegate(account, seat, validator), 'Deposit and delegate', undefined, - { + harden({ give: { Stake: AmountShape, }, want: {}, // user cannot exit their seat; contract must exit it. exit: { waived: M.null() }, - }, + }), ); }, /** diff --git a/packages/orchestration/test/examples/auto-stake-it.contract.test.ts b/packages/orchestration/test/examples/auto-stake-it.contract.test.ts index d462e7e236c..45c32bb1981 100644 --- a/packages/orchestration/test/examples/auto-stake-it.contract.test.ts +++ b/packages/orchestration/test/examples/auto-stake-it.contract.test.ts @@ -11,6 +11,8 @@ import { buildMsgResponseString, buildVTransferEvent, } from '../../tools/ibc-mocks.js'; +import { denomHash } from '../../src/utils/denomHash.js'; +import fetchedChainInfo from '../../src/fetched-chain-info.js'; const dirname = path.dirname(new URL(import.meta.url).pathname); @@ -24,6 +26,7 @@ test('make accounts, register tap, return invitationMakers', async t => { const { bootstrap: { storage }, commonPrivateArgs, + brands: { atom }, mocks: { transferBridge }, utils: { inspectLocalBridge, inspectDibcBridge, transmitTransferAck }, } = await commonSetup(t); @@ -36,12 +39,35 @@ test('make accounts, register tap, return invitationMakers', async t => { const storageNode = await E(storage.rootNode).makeChildNode(contractName); const autoAutoStakeItKit = await E(zoe).startInstance( installation, - undefined, + { Stable: atom.issuer }, {}, { ...commonPrivateArgs, storageNode }, ); const publicFacet = await E(zoe).getPublicFacet(autoAutoStakeItKit.instance); + const atomOnAgoric = `ibc/${denomHash({ + channelId: + fetchedChainInfo.agoric.connections['cosmoshub-4'].transferChannel + .channelId, + denom: 'uatom', + })}`; + + for (const chainName of ['agoric', 'cosmoshub']) { + await E(autoAutoStakeItKit.creatorFacet).registerChain( + chainName, + fetchedChainInfo[chainName], + ); + } + + await E(autoAutoStakeItKit.creatorFacet).registerAsset(atomOnAgoric, { + // we are only registering agoric assets, so safe to use denom and + // hardcode chainName + baseDenom: 'uatom', + baseName: 'agoric', + chainName: 'agoric', + brand: atom.brand, + }); + // make an offer to create an LocalOrchAcct and a CosmosOrchAccount const inv = E(publicFacet).makeAccountsInvitation(); const userSeat = E(zoe).offer(inv, {}, undefined, { diff --git a/packages/orchestration/test/exos/local-orchestration-account-kit.test.ts b/packages/orchestration/test/exos/local-orchestration-account-kit.test.ts index c1eed2f6730..8b429532c64 100644 --- a/packages/orchestration/test/exos/local-orchestration-account-kit.test.ts +++ b/packages/orchestration/test/exos/local-orchestration-account-kit.test.ts @@ -9,6 +9,7 @@ import { } from '@agoric/vats/tools/fake-bridge.js'; import { heapVowE as VE } from '@agoric/vow/vat.js'; import { withAmountUtils } from '@agoric/zoe/tools/test-utils.js'; +import type { IBCChannelID } from '@agoric/vats'; import type { ChainAddress, AmountArg } from '../../src/orchestration-api.js'; import { maxClockSkew } from '../../src/utils/cosmos.js'; import { NANOSECONDS_PER_SECOND } from '../../src/utils/time.js'; @@ -16,6 +17,8 @@ import { buildVTransferEvent } from '../../tools/ibc-mocks.js'; import { UNBOND_PERIOD_SECONDS } from '../ibc-mocks.js'; import { commonSetup } from '../supports.js'; import { prepareMakeTestLOAKit } from './make-test-loa-kit.js'; +import fetchedChainInfo from '../../src/fetched-chain-info.js'; +import { denomHash } from '../../src/utils/denomHash.js'; test('deposit, withdraw', async t => { const common = await commonSetup(t); @@ -127,7 +130,6 @@ test('transfer', async t => { value: 'cosmos1pleab', encoding: 'bech32', }; - const sourceChannel = 'channel-5'; // observed in toBridge VLOCALCHAIN_EXECUTE_TX sourceChannel, confirmed via fetched-chain-info.js /** The running tally of transfer messages that were sent over the bridge */ let lastSequence = 0n; @@ -163,7 +165,9 @@ test('transfer', async t => { buildVTransferEvent({ receiver: destination.value, sender, - sourceChannel, + sourceChannel: + fetchedChainInfo.agoric.connections[destination.chainId].transferChannel + .channelId, sequence: lastSequence, }), ); @@ -203,11 +207,13 @@ test('transfer', async t => { * @param amount * @param dest * @param opts + * @param sourceChannel */ const doTransfer = async ( amount: AmountArg, dest: ChainAddress, opts = {}, + sourceChannel?: IBCChannelID, ) => { const { transferP: promise } = await startTransfer(amount, dest, opts); // simulate incoming message so that promise resolves @@ -215,7 +221,10 @@ test('transfer', async t => { buildVTransferEvent({ receiver: dest.value, sender, - sourceChannel, + sourceChannel: + sourceChannel || + fetchedChainInfo.agoric.connections[dest.chainId].transferChannel + .channelId, sequence: lastSequence, }), ); @@ -244,6 +253,28 @@ test('transfer', async t => { }), 'accepts custom timeoutHeight', ); + + t.log('Transfer handles multi-hop transfers'); + await t.notThrowsAsync( + doTransfer( + { + denom: `ibc/${denomHash({ + channelId: + fetchedChainInfo.agoric.connections['noble-1'].transferChannel + .channelId, + denom: 'uusdc', + })}`, + value: 100n, + }, + { + chainId: 'dydx-mainnet-1', + encoding: 'bech32', + value: 'dydx1test', + }, + {}, + fetchedChainInfo.agoric.connections['noble-1'].transferChannel.channelId, + ), + ); }); test('monitor transfers', async t => { diff --git a/packages/orchestration/test/exos/make-test-coa-kit.ts b/packages/orchestration/test/exos/make-test-coa-kit.ts index 6042091b31a..95bcca86674 100644 --- a/packages/orchestration/test/exos/make-test-coa-kit.ts +++ b/packages/orchestration/test/exos/make-test-coa-kit.ts @@ -85,7 +85,7 @@ export const prepareMakeTestCOAKit = ( ); t.log('register Agoric chain and BLD in ChainHub'); - utils.registerAgoricBld(); + utils.registerAgoricAssets(); return holder; }; diff --git a/packages/orchestration/test/exos/make-test-loa-kit.ts b/packages/orchestration/test/exos/make-test-loa-kit.ts index ee718c5a997..9e3ea1cdd39 100644 --- a/packages/orchestration/test/exos/make-test-loa-kit.ts +++ b/packages/orchestration/test/exos/make-test-loa-kit.ts @@ -65,7 +65,9 @@ export const prepareMakeTestLOAKit = ( }); t.log('register Agoric chain and BLD in ChainHub'); - utils.registerAgoricBld(); + utils.registerAgoricAssets(); + t.log('register Noble and DYDX chains and USDC in ChainHub'); + utils.registerUSDC(); return account; }; }; diff --git a/packages/orchestration/test/snapshots/exports.test.ts.md b/packages/orchestration/test/snapshots/exports.test.ts.md index 2b058658b22..e00d55aaff3 100644 --- a/packages/orchestration/test/snapshots/exports.test.ts.md +++ b/packages/orchestration/test/snapshots/exports.test.ts.md @@ -34,5 +34,6 @@ Generated by [AVA](https://avajs.dev). 'chainFacadeMethods', 'prepareChainHubAdmin', 'prepareCosmosInterchainService', + 'registerKnownChainsAndAssets', 'withOrchestration', ] diff --git a/packages/orchestration/test/snapshots/exports.test.ts.snap b/packages/orchestration/test/snapshots/exports.test.ts.snap index fab9e78c6b8f5a3bdb92397e66bd3750bdb746a5..7e6de7444175f81bd4b608e76118563962ae07bd 100644 GIT binary patch literal 607 zcmV-l0-*gtRzVpWgTHU5thkl^mP1k7P4D zAeuhA+0(2@sldUvZHPV{T z8FR0Cy$)6by9>5~CJWGFAy~D+HlwMUNgL_$Vajv*Co|^sMkMFYxcy6&kia3$%ZPbN ziPFMBq4(*gJd=?Snv5y=RD3H163dY)=~btAXRJ}(N8grW| zSpwD^u+<}}rq_&p!?#-yS4z~JUMuvHw(hqPce>q_OG%TsS3)-YRxcsTHE#N07m$*Y zlEoxTR-2C6DO1aCb;q^iPIsWWG$Ydee8HA4wdKI|xclP3loQi%;%zzweT^q@_uk&_aK=AR7Cr(CDrj!0ZJ=^cS<#aMr$y;;rk!)sX zM41$Ho*BstlPYU2mO^mL-_(vmY-07XEq4C{fJ*?M0elDW8^A*bJYm3;0q+^`i2>gj z@QVT40q`gQMgg!0fMo!D4S=5k&z5ZBpX{Mxy#mZJE)pBqLpNIWxZgWh-fUb5Ph zr##_;PROQ87-tTAn+r_^*HkXm@q7}AJd;k{b?Sjr) => { t.log('bootstrap vat dependencies'); // The common setup cannot support a durable zone because many of the fakes are not durable. @@ -45,6 +58,8 @@ export const commonSetup = async (t: ExecutionContext) => { const bld = withAmountUtils(makeIssuerKit('BLD')); const ist = withAmountUtils(makeIssuerKit('IST')); + const usdc = withAmountUtils(makeIssuerKit('USDC')); + const atom = withAmountUtils(makeIssuerKit('ATOM')); const bankBridgeMessages = [] as any[]; const { bankManager, pourPayment } = await makeFakeBankManagerKit({ onToBridge: obj => bankBridgeMessages.push(obj), @@ -56,10 +71,19 @@ export const commonSetup = async (t: ExecutionContext) => { 'Inter Stable Token', ist.issuerKit, ); + await E(bankManager).addAsset('uatom', 'ATOM', 'ATOM', atom.issuerKit); + await E(bankManager).addAsset( + usdcOnAgoric, + 'USDC', + 'USD Coin', + usdc.issuerKit, + ); // These mints no longer stay in sync with bankManager. // Use pourPayment() for IST. const { mint: _b, ...bldSansMint } = bld; const { mint: _i, ...istSansMint } = ist; + const { mint: _a, ...atomSansMint } = atom; + const { mint: _u, ...usdcSansMint } = usdc; // XXX real bankManager does this. fake should too? // TODO https://github.com/Agoric/agoric-sdk/issues/9966 await makeWellKnownSpaces(agoricNamesAdmin, t.log, ['vbankAsset']); @@ -74,6 +98,17 @@ export const commonSetup = async (t: ExecutionContext) => { displayInfo: { IOU: true }, }), ); + await E(E(agoricNamesAdmin).lookupAdmin('vbankAsset')).update( + 'uatom', + /** @type {AssetInfo} */ harden({ + brand: atom.brand, + issuer: atom.issuer, + issuerName: 'ATOM', + denom: 'uatom', + proposedName: 'ATOM', + displayInfo: { IOU: true }, + }), + ); await E(E(agoricNamesAdmin).lookupAdmin('vbankAsset')).update( 'ubld', /** @type {AssetInfo} */ harden({ @@ -85,6 +120,17 @@ export const commonSetup = async (t: ExecutionContext) => { displayInfo: { IOU: true }, }), ); + await E(E(agoricNamesAdmin).lookupAdmin('vbankAsset')).update( + usdcOnAgoric, + /** @type {AssetInfo} */ harden({ + brand: usdc.brand, + issuer: usdc.issuer, + issuerName: 'USDC', + denom: usdcOnAgoric, + proposedName: 'USDC', + displayInfo: { IOU: true }, + }), + ); const vowTools = prepareSwingsetVowTools(rootZone.subZone('vows')); @@ -173,7 +219,7 @@ export const commonSetup = async (t: ExecutionContext) => { * Does not work with `withOrchestration` contracts, as these have their own * ChainHub. Use `ChainHubAdmin` instead. */ - const registerAgoricBld = () => { + const registerAgoricAssets = () => { if (!chainHub.getAsset('ubld')) { chainHub.registerChain('agoric', fetchedChainInfo.agoric); chainHub.registerAsset('ubld', { @@ -185,6 +231,33 @@ export const commonSetup = async (t: ExecutionContext) => { } }; + const registerUSDC = () => { + if (!chainHub.getAsset('uusdc')) { + chainHub.registerChain('noble', fetchedChainInfo.noble); + chainHub.registerAsset('uusdc', { + chainName: 'noble', + baseName: 'noble', + baseDenom: 'uusdc', + }); + } + if (!chainHub.getAsset(usdcOnAgoric)) { + chainHub.registerAsset(usdcOnAgoric, { + chainName: 'agoric', + baseName: 'noble', + baseDenom: 'uusdc', + brand: usdc.brand, + }); + } + if (!chainHub.getAsset(usdcOnDydx)) { + chainHub.registerChain('dydx', fetchedChainInfo.dydx); + chainHub.registerAsset(usdcOnDydx, { + chainName: 'dydx', + baseName: 'noble', + baseDenom: 'uusdc', + }); + } + }; + return { bootstrap: { agoricNames, @@ -202,6 +275,8 @@ export const commonSetup = async (t: ExecutionContext) => { brands: { bld: bldSansMint, ist: istSansMint, + usdc: usdcSansMint, + atom: atomSansMint, }, mocks: { ibcBridge, @@ -227,7 +302,8 @@ export const commonSetup = async (t: ExecutionContext) => { inspectLocalBridge: () => harden([...localBridgeMessages]), inspectDibcBridge: () => E(ibcBridge).inspectDibcBridge(), inspectBankBridge: () => harden([...bankBridgeMessages]), - registerAgoricBld, + registerAgoricAssets, + registerUSDC, transmitTransferAck, }, }; From dd376bf7ee76b22358d9334a98b831e4b902a16c Mon Sep 17 00:00:00 2001 From: Ikenna Omekam Date: Thu, 14 Nov 2024 10:09:10 -0500 Subject: [PATCH 14/15] chore: linting --- packages/orchestration/src/exos/chain-hub.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/orchestration/src/exos/chain-hub.js b/packages/orchestration/src/exos/chain-hub.js index 6b86cfe881a..c3fe93c0b8f 100644 --- a/packages/orchestration/src/exos/chain-hub.js +++ b/packages/orchestration/src/exos/chain-hub.js @@ -42,9 +42,7 @@ export const DenomDetailShape = M.splitRecord( { brand: BrandShape }, ); -/** - * @enum {(typeof HubName)[keyof typeof HubName]} - */ +/** @enum {(typeof HubName)[keyof typeof HubName]} */ export const HubName = /** @type {const} */ ({ /** agoricNames key for ChainInfo hub */ Chain: 'chain', From c51989836d7968fe37719943b41179b11eb2358a Mon Sep 17 00:00:00 2001 From: Ikenna Omekam Date: Thu, 14 Nov 2024 10:54:16 -0500 Subject: [PATCH 15/15] chore: linting --- .../orchestration-imports.test.js.snap | Bin 3451 -> 3478 bytes .../src/utils/chain-hub-helper.js | 4 ---- 2 files changed, 4 deletions(-) diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.snap b/packages/builders/test/snapshots/orchestration-imports.test.js.snap index 73243d913316e708772219a4d8ee78a76b4ef275..d6ebdacec11bce0bc8b4707c4dba1c6948a3af69 100644 GIT binary patch literal 3478 zcmV;H4QcX0RzVyeZ@cPk9~jv(65 z>RBdP-2tX&4)!@(i7tJ?4`oEqDry( ziW-{`HC+{SNs;G>()Y=|35-AHXR~hya4&%40A4j4 zfmQ|#F+gI#Z45ZZfR`C?jsfK!;4%-e#RGiZ103-HfA9eR^Z?afpx+B@^#U_q;65+# z?D^+2Uf@$NFs}%>z6hvb#pR4eS@BvWK9vw7kqB5BSR+_DW8WwODw!9|7iHxGNo7jb z2h{OR6GBQf@uM6b9gt_%3A)9~QXb_f6+A`TD8>{uZj#RMc7`SdNgjyDRZ-Kjc1nDl zD<)-F9#gXTLJqGSQnaL^4QQIEJ6V&ttUR`U%(24D#Dq9*E@PJP5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CkV9;;DhNH!H%VxW_~e z=aK1V)dHqKD#mwREa^#}xkhKPSaveQVk;P|R@L|^QA&=>Q-Y*2>nJd!Dn4VT@&S&U zV%ojC`LvkeHCbWCyNe|x%*t?qU^{;+)BJ>xww{K~TU#MDS&%{r%rs^T ziYBJLQq_3P+)DGA=IY&oq8g=1YqNAMWJi-01xec>ng(MGRFiWvtGj7l?HJURQ(RHn zg{zq6pq8s(=ca_IK}<5Vij0skZ-Hs1wN?`|f;_FQ7sO=B+&s52a3}{`g=uE^afE%Snlf8EUH2k;|mtGn!_~PPP!ns5Ow^QFU32#RT|l^t7#Ve{o%D49%cfX$Myy#=uK>27w`>gRj`&%C?cCL!pSCOSw3HAg zMM*dVx_&xXslzji%4TB67^t?8vm3Cb|1CobD8g=0KmVCb>G!4Z(do>Dz~cu(bz}dVpJcfX8}( z*QvR&qAUJKJ%B3;%#Q-YQD7v@V?RBd>*W~m8g(vNcKB9gen0kUPQ%>sW}0a0E3V@CjH|!?9`@zm!`?pR zmv*WCughRn7!BuGtd#}UV2$HTey z_5u5d(Ui@owQCRb*>~|{eYszvx=;22bNW+1S*3+V;kKn8Xs0x>OyPA!f5{^1DyG?^ z|5#QMB(@xoVr9GKnQhCNeD~Y^z#Y_q_TpQK{yVsS;5ka&S?0oX23b~>L=%^j{bknL dw-^X5CS6YzP19+j{5E~;{{wdP24r?D00781jFtcZ diff --git a/packages/orchestration/src/utils/chain-hub-helper.js b/packages/orchestration/src/utils/chain-hub-helper.js index 43a8da65c20..95a8eae6791 100644 --- a/packages/orchestration/src/utils/chain-hub-helper.js +++ b/packages/orchestration/src/utils/chain-hub-helper.js @@ -1,9 +1,5 @@ import { E } from '@endo/far'; -import { makeTracer } from '@agoric/internal'; import { denomHash } from './denomHash.js'; -import { registerChain } from '../chain-info.js'; - -const trace = makeTracer('ChainHubHelper', true); /** * @import {ERef} from '@endo/far';