From 8339df26533fd189dc576d92ed290c757cf048dc Mon Sep 17 00:00:00 2001 From: Luqi Pan Date: Wed, 20 Nov 2024 08:36:58 -0800 Subject: [PATCH 001/174] build(deps): bump cosmossdk.io/math to v1.4.0 --- golang/cosmos/go.mod | 6 +++--- golang/cosmos/go.sum | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/golang/cosmos/go.mod b/golang/cosmos/go.mod index f1c9174a507..1e0919c6a99 100644 --- a/golang/cosmos/go.mod +++ b/golang/cosmos/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( cosmossdk.io/errors v1.0.0-beta.7 - cosmossdk.io/math v1.0.0-rc.0 + cosmossdk.io/math v1.4.0 github.com/armon/go-metrics v0.4.1 github.com/cosmos/cosmos-sdk v0.46.16 github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.2 @@ -19,7 +19,7 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.14.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/tendermint/tendermint v0.34.29 github.com/tendermint/tm-db v0.6.7 google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 @@ -161,7 +161,7 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) replace ( diff --git a/golang/cosmos/go.sum b/golang/cosmos/go.sum index 7b5acee60ae..3428b14eeb3 100644 --- a/golang/cosmos/go.sum +++ b/golang/cosmos/go.sum @@ -193,8 +193,8 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/math v1.0.0-rc.0 h1:ml46ukocrAAoBpYKMidF0R2tQJ1Uxfns0yH8wqgMAFc= -cosmossdk.io/math v1.0.0-rc.0/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= +cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -1079,8 +1079,8 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1091,8 +1091,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= @@ -1872,6 +1872,6 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From 721071eeef60766ec59038c4e2ece861564e758e Mon Sep 17 00:00:00 2001 From: "Mark S. Miller" Date: Wed, 20 Nov 2024 15:25:34 -0800 Subject: [PATCH 002/174] doc: fix alphabetical order in env.md (#10542) closes: #XXXX refs: #XXXX ## Description Fix alphabetical order in env.md Only moved the sections. No edits to the content within the sections. ### Security Considerations none ### Scaling Considerations none ### Documentation Considerations Alphabetical order is good. ### Testing Considerations none ### Upgrade Considerations none --- docs/env.md | 98 ++++++++++++++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/docs/env.md b/docs/env.md index 5b510c4ba3d..f7fd2b37640 100644 --- a/docs/env.md +++ b/docs/env.md @@ -164,55 +164,6 @@ for the Prometheus scrape endpoint to export telemetry. Lifetime: until we decide not to support Prometheus for metrics export -## SOLO_BRIDGE_TARGET - -Affects: solo - -This enables a proxy so that the solo bridge interface (/wallet-bridge.html) is backed by the smart wallet (/wallet/bridge.html). Dapps designed for the solo bridge can enable this until they connect to the smart wallet directly. - -```sh -BRIDGE_TARGET=http://localhost:3001 make BASE_PORT=8002 scenario3-run -``` - -Lifetime: smart wallet transition period - -## SOLO_MNEMONIC - -Affects: solo init - -Seed phrase for HD key derivation. - -## SOLO_OTEL_EXPORTER_PROMETHEUS_PORT - -Affects: solo - -Same as `OTEL_EXPORTER_PROMETHEUS_PORT`, but for solo instead of chain. - -Lifetime: ? - -## SOLO_SLOGFILE - -Same as `SLOGFILE`, but for solo instead of chain. - -Lifetime: ? - -## SOLO_SLOGSENDER - -Same as `SLOGSENDER`, but for solo instead of chain. - -Lifetime: ? - -## SOLO_MAX_DEBUG_LENGTH - -Affects: solo - -Purpose: reduce the size of each individual `console.debug` output - -Description: defaults to no limit, set to a decimal byte count to reduce the -output - -Lifetime: Until CI no longer balks on long output, or our source bundles aren't delivered via messages to the sim-chain - ## SLOGFILE Affects: cosmic-swingset @@ -265,6 +216,55 @@ have any unexpected errors. The default is `undefined`. +## SOLO_BRIDGE_TARGET + +Affects: solo + +This enables a proxy so that the solo bridge interface (/wallet-bridge.html) is backed by the smart wallet (/wallet/bridge.html). Dapps designed for the solo bridge can enable this until they connect to the smart wallet directly. + +```sh +BRIDGE_TARGET=http://localhost:3001 make BASE_PORT=8002 scenario3-run +``` + +Lifetime: smart wallet transition period + +## SOLO_MAX_DEBUG_LENGTH + +Affects: solo + +Purpose: reduce the size of each individual `console.debug` output + +Description: defaults to no limit, set to a decimal byte count to reduce the +output + +Lifetime: Until CI no longer balks on long output, or our source bundles aren't delivered via messages to the sim-chain + +## SOLO_MNEMONIC + +Affects: solo init + +Seed phrase for HD key derivation. + +## SOLO_OTEL_EXPORTER_PROMETHEUS_PORT + +Affects: solo + +Same as `OTEL_EXPORTER_PROMETHEUS_PORT`, but for solo instead of chain. + +Lifetime: ? + +## SOLO_SLOGFILE + +Same as `SLOGFILE`, but for solo instead of chain. + +Lifetime: ? + +## SOLO_SLOGSENDER + +Same as `SLOGSENDER`, but for solo instead of chain. + +Lifetime: ? + ## SWINGSET_WORKER_TYPE Affects: solo, unit tests From 3bf01a279e5b2c72d6667704a07056501012260e Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 18 Nov 2024 14:37:29 -0600 Subject: [PATCH 003/174] feat(builders): fast-usdc oracleSet option for MAINNET, ... --- .../scripts/fast-usdc/init-fast-usdc.js | 58 +++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/packages/builders/scripts/fast-usdc/init-fast-usdc.js b/packages/builders/scripts/fast-usdc/init-fast-usdc.js index bfa527bcc38..05ea08d951e 100644 --- a/packages/builders/scripts/fast-usdc/init-fast-usdc.js +++ b/packages/builders/scripts/fast-usdc/init-fast-usdc.js @@ -19,12 +19,55 @@ import { parseArgs } from 'node:util'; * @import {FastUSDCConfig} from '@agoric/fast-usdc/src/fast-usdc.start.js' */ +const { keys } = Object; + +/** + * @type {Record>} + * + * TODO: determine OCW operator addresses + * meanwhile, use price oracle addresses (from updatePriceFeeds.js). + */ +const configurations = { + A3P_INTEGRATION: { + oracles: { + gov1: 'agoric1ee9hr0jyrxhy999y755mp862ljgycmwyp4pl7q', + gov2: 'agoric1wrfh296eu2z34p6pah7q04jjuyj3mxu9v98277', + gov3: 'agoric1ydzxwh6f893jvpaslmaz6l8j2ulup9a7x8qvvq', + }, + }, + MAINNET: { + oracles: { + DSRV: 'agoric144rrhh4m09mh7aaffhm6xy223ym76gve2x7y78', + Stakin: 'agoric19d6gnr9fyp6hev4tlrg87zjrzsd5gzr5qlfq2p', + '01node': 'agoric19uscwxdac6cf6z7d5e26e0jm0lgwstc47cpll8', + 'Simply Staking': 'agoric1krunjcqfrf7la48zrvdfeeqtls5r00ep68mzkr', + P2P: 'agoric1n4fcxsnkxe4gj6e24naec99hzmc4pjfdccy5nj', + }, + }, + DEVNET: { + oracles: { + DSRV: 'agoric1lw4e4aas9q84tq0q92j85rwjjjapf8dmnllnft', + Stakin: 'agoric1zj6vrrrjq4gsyr9lw7dplv4vyejg3p8j2urm82', + '01node': 'agoric1ra0g6crtsy6r3qnpu7ruvm7qd4wjnznyzg5nu4', + 'Simply Staking': 'agoric1qj07c7vfk3knqdral0sej7fa6eavkdn8vd8etf', + P2P: 'agoric10vjkvkmpp9e356xeh6qqlhrny2htyzp8hf88fk', + }, + }, + EMERYNET: { + oracles: { + gov1: 'agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce', + gov2: 'agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang', + }, + }, +}; + /** @type {ParseArgsConfig['options']} */ const options = { flatFee: { type: 'string', default: '0.01' }, variableRate: { type: 'string', default: '0.01' }, maxVariableFee: { type: 'string', default: '5' }, contractRate: { type: 'string', default: '0.2' }, + oracleSet: { type: 'string' }, oracle: { type: 'string', multiple: true }, usdcDenom: { type: 'string', @@ -32,13 +75,14 @@ const options = { 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9', }, }; -const oraclesRequiredUsage = 'use --oracle name:address ...'; +const oraclesUsage = 'use --oracle name:address ...'; /** * @typedef {{ * flatFee: string; * variableRate: string; * maxVariableFee: string; * contractRate: string; + * oracleSet?: string; * oracle?: string[]; * usdcDenom: string; * }} FastUSDCOpts @@ -82,15 +126,21 @@ export default async (homeP, endowments) => { /** @type {{ values: FastUSDCOpts }} */ // @ts-expect-error ensured by options const { - values: { oracle: oracleArgs, usdcDenom, ...fees }, + values: { oracle: oracleArgs, oracleSet, usdcDenom, ...fees }, } = parseArgs({ args: scriptArgs, options }); const parseOracleArgs = () => { - if (!oracleArgs) throw Error(oraclesRequiredUsage); + if (oracleSet) { + if (!(oracleSet in configurations)) { + throw Error(`${oracleSet} not in ${keys(configurations)}`); + } + return configurations[oracleSet].oracles; + } + if (!oracleArgs) throw Error(oraclesUsage); return Object.fromEntries( oracleArgs.map(arg => { const result = arg.match(/(?[^:]+):(?
.+)/); - if (!(result && result.groups)) throw Error(oraclesRequiredUsage); + if (!(result && result.groups)) throw Error(oraclesUsage); const { name, address } = result.groups; return [name, address]; }), From 2ae8e5158c71be731cc22cc125707f3fefaef784 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 18 Nov 2024 13:09:03 -0600 Subject: [PATCH 004/174] chore(f:fast-usdc): toward fast-usd: copy quickSend stuff from 8beb9db --- .../proposals/d:quick-send/.yarnrc.yml | 1 + .../proposals/d:quick-send/package.json | 27 + .../proposals/d:quick-send/quick-load.test.js | 20 + .../d:quick-send/test-lib/cosmos-api.js | 42 + .../d:quick-send/test-lib/vstorage-client.js | 34 + .../proposals/d:quick-send/test.sh | 2 + .../proposals/d:quick-send/yarn.lock | 2345 +++++++++++++++++ 7 files changed, 2471 insertions(+) create mode 100644 a3p-integration/proposals/d:quick-send/.yarnrc.yml create mode 100644 a3p-integration/proposals/d:quick-send/package.json create mode 100644 a3p-integration/proposals/d:quick-send/quick-load.test.js create mode 100644 a3p-integration/proposals/d:quick-send/test-lib/cosmos-api.js create mode 100644 a3p-integration/proposals/d:quick-send/test-lib/vstorage-client.js create mode 100755 a3p-integration/proposals/d:quick-send/test.sh create mode 100644 a3p-integration/proposals/d:quick-send/yarn.lock diff --git a/a3p-integration/proposals/d:quick-send/.yarnrc.yml b/a3p-integration/proposals/d:quick-send/.yarnrc.yml new file mode 100644 index 00000000000..3186f3f0795 --- /dev/null +++ b/a3p-integration/proposals/d:quick-send/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/a3p-integration/proposals/d:quick-send/package.json b/a3p-integration/proposals/d:quick-send/package.json new file mode 100644 index 00000000000..472220b5163 --- /dev/null +++ b/a3p-integration/proposals/d:quick-send/package.json @@ -0,0 +1,27 @@ +{ + "agoricProposal": { + "source": "subdir", + "sdk-generate": [ + "vats/init-orchestration.js", + "fast-usdc/init-quickSend.js" + ], + "type": "/agoric.swingset.CoreEvalProposal" + }, + "type": "module", + "license": "Apache-2.0", + "dependencies": { + "@agoric/synthetic-chain": "^0.3.0", + "ava": "^5.3.1" + }, + "ava": { + "concurrency": 1, + "timeout": "2m", + "files": [ + "!submission" + ] + }, + "scripts": { + "agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops" + }, + "packageManager": "yarn@4.2.2" +} diff --git a/a3p-integration/proposals/d:quick-send/quick-load.test.js b/a3p-integration/proposals/d:quick-send/quick-load.test.js new file mode 100644 index 00000000000..7f03e411b17 --- /dev/null +++ b/a3p-integration/proposals/d:quick-send/quick-load.test.js @@ -0,0 +1,20 @@ +// @ts-check +/* global globalThis */ +import test from 'ava'; +import { extractStreamCellValue } from '@agoric/synthetic-chain'; +import { localAPI, makeLCD } from './test-lib/cosmos-api.js'; +import { makeVStorage } from './test-lib/vstorage-client.js'; + +const io = { api: makeLCD(localAPI, { fetch: globalThis.fetch }) }; + +test('quickSend is in agoricNames.instance', async t => { + const vs = makeVStorage(io.api); + const data = await vs.readStorage('published.agoricNames.instance'); + const value = extractStreamCellValue(data); + assert.typeof(value, 'string'); + const capData = JSON.parse(value); + const encoding = JSON.parse(capData?.body.replace(/^#/, '')); + const byName = Object.fromEntries(encoding); + t.log('agoricNames.instance keys', Object.keys(byName)); + t.truthy(byName.quickSend); +}); diff --git a/a3p-integration/proposals/d:quick-send/test-lib/cosmos-api.js b/a3p-integration/proposals/d:quick-send/test-lib/cosmos-api.js new file mode 100644 index 00000000000..b4d6e1540c8 --- /dev/null +++ b/a3p-integration/proposals/d:quick-send/test-lib/cosmos-api.js @@ -0,0 +1,42 @@ +// @ts-check +const { freeze } = Object; + +/** + * @see {@link https://docs.cosmos.network/v0.46/core/grpc_rest.html#rest-server} + */ +export const defaultAPIPort = 1317; +export const localAPI = `http://localhost:${defaultAPIPort}`; + +/** + * @param {string} apiURL + * @param {object} io + * @param {typeof fetch} io.fetch + */ +export const makeLCD = (apiURL, { fetch }) => { + if (typeof apiURL !== 'string') throw TypeError(typeof apiURL); + + /** + * @param {string} href + * @param {object} [options] + * @param {Record} [options.headers] + */ + const getJSON = async (href, options = {}) => { + const opts = { + keepalive: true, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }; + const url = `${apiURL}${href}`; + const r = await fetch(url, opts); + if (!r.ok) throw Error(r.statusText); + return r.json(); + }; + + return freeze({ + getJSON, + latestBlock: () => getJSON(`/cosmos/base/tendermint/v1beta1/blocks/latest`), + }); +}; +/** @typedef {ReturnType} LCD */ diff --git a/a3p-integration/proposals/d:quick-send/test-lib/vstorage-client.js b/a3p-integration/proposals/d:quick-send/test-lib/vstorage-client.js new file mode 100644 index 00000000000..497e63fd2b5 --- /dev/null +++ b/a3p-integration/proposals/d:quick-send/test-lib/vstorage-client.js @@ -0,0 +1,34 @@ +// @ts-check + +/** + * @param {import("./cosmos-api").LCD} lcd + */ +export const makeVStorage = lcd => { + const getJSON = (href, options) => lcd.getJSON(href, options); + + // height=0 is the same as omitting height and implies the highest block + const href = (path = 'published', { kind = 'data' } = {}) => + `/agoric/vstorage/${kind}/${path}`; + const headers = height => + height ? { 'x-cosmos-block-height': `${height}` } : undefined; + + const readStorage = ( + path = 'published', + { kind = 'data', height = 0 } = {}, + ) => + getJSON(href(path, { kind }), { headers: headers(height) }).catch(err => { + throw Error( + `cannot read ${kind} of ${path}: ${err.message} ${err?.cause.message}`, + ); + }); + const readCell = (path, opts) => + readStorage(path, opts) + .then(data => data.value) + .then(s => (s === '' ? {} : JSON.parse(s))); + + return { + lcd, + readStorage, + readCell, + }; +}; diff --git a/a3p-integration/proposals/d:quick-send/test.sh b/a3p-integration/proposals/d:quick-send/test.sh new file mode 100755 index 00000000000..ff669d07327 --- /dev/null +++ b/a3p-integration/proposals/d:quick-send/test.sh @@ -0,0 +1,2 @@ +#!/bin/bash +yarn ava diff --git a/a3p-integration/proposals/d:quick-send/yarn.lock b/a3p-integration/proposals/d:quick-send/yarn.lock new file mode 100644 index 00000000000..33593f4224b --- /dev/null +++ b/a3p-integration/proposals/d:quick-send/yarn.lock @@ -0,0 +1,2345 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10c0 + +"@agoric/synthetic-chain@npm:^0.3.0": + version: 0.3.0 + resolution: "@agoric/synthetic-chain@npm:0.3.0" + dependencies: + "@endo/zip": "npm:^1.0.7" + better-sqlite3: "npm:^9.6.0" + chalk: "npm:^5.3.0" + cosmjs-types: "npm:^0.9.0" + execa: "npm:^9.3.1" + bin: + synthetic-chain: dist/cli/cli.js + checksum: 10c0/17c6241bdc48b8a2a7608c9d4d7c0a0c76fb10d4ee44a31a1150104a792bcd1133f4b1a7e8ab26673a07450b3ceabccd9911999117568221b49221b6ee4306a1 + languageName: node + linkType: hard + +"@endo/zip@npm:^1.0.7": + version: 1.0.8 + resolution: "@endo/zip@npm:1.0.8" + checksum: 10c0/bb74862121932cd27eef59326325c4b61671ce0962033a2ad18e6d6978a9e94bfe604dbfa8c0b039a38fa7eefc495e6a69c583c0e75929cd267979b2c65b775b + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10c0/b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e + languageName: node + linkType: hard + +"@nodelib/fs.scandir@npm:2.1.5": + version: 2.1.5 + resolution: "@nodelib/fs.scandir@npm:2.1.5" + dependencies: + "@nodelib/fs.stat": "npm:2.0.5" + run-parallel: "npm:^1.1.9" + checksum: 10c0/732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb + languageName: node + linkType: hard + +"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": + version: 2.0.5 + resolution: "@nodelib/fs.stat@npm:2.0.5" + checksum: 10c0/88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d + languageName: node + linkType: hard + +"@nodelib/fs.walk@npm:^1.2.3": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" + dependencies: + "@nodelib/fs.scandir": "npm:2.1.5" + fastq: "npm:^1.6.0" + checksum: 10c0/db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1 + languageName: node + linkType: hard + +"@npmcli/agent@npm:^2.0.0": + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^10.0.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10c0/325e0db7b287d4154ecd164c0815c08007abfb07653cc57bceded17bb7fd240998a3cbdbe87d700e30bef494885eccc725ab73b668020811d56623d145b524ae + languageName: node + linkType: hard + +"@npmcli/fs@npm:^3.1.0": + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" + dependencies: + semver: "npm:^7.3.5" + checksum: 10c0/c37a5b4842bfdece3d14dfdb054f73fe15ed2d3da61b34ff76629fb5b1731647c49166fd2a8bf8b56fcfa51200382385ea8909a3cbecdad612310c114d3f6c99 + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10c0/5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd + languageName: node + linkType: hard + +"@sec-ant/readable-stream@npm:^0.4.1": + version: 0.4.1 + resolution: "@sec-ant/readable-stream@npm:0.4.1" + checksum: 10c0/64e9e9cf161e848067a5bf60cdc04d18495dc28bb63a8d9f8993e4dd99b91ad34e4b563c85de17d91ffb177ec17a0664991d2e115f6543e73236a906068987af + languageName: node + linkType: hard + +"@sindresorhus/merge-streams@npm:^4.0.0": + version: 4.0.0 + resolution: "@sindresorhus/merge-streams@npm:4.0.0" + checksum: 10c0/482ee543629aa1933b332f811a1ae805a213681ecdd98c042b1c1b89387df63e7812248bb4df3910b02b3cc5589d3d73e4393f30e197c9dde18046ccd471fc6b + languageName: node + linkType: hard + +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 10c0/f742a5a107473946f426c691c08daba61a1d15942616f300b5d32fd735be88fef5cba24201757b6c407fd564555fb48c751cfa33519b2605c8a7aadd22baf372 + languageName: node + linkType: hard + +"acorn-walk@npm:^8.2.0": + version: 8.3.4 + resolution: "acorn-walk@npm:8.3.4" + dependencies: + acorn: "npm:^8.11.0" + checksum: 10c0/76537ac5fb2c37a64560feaf3342023dadc086c46da57da363e64c6148dc21b57d49ace26f949e225063acb6fb441eabffd89f7a3066de5ad37ab3e328927c62 + languageName: node + linkType: hard + +"acorn@npm:^8.11.0, acorn@npm:^8.8.2": + version: 8.13.0 + resolution: "acorn@npm:8.13.0" + bin: + acorn: bin/acorn + checksum: 10c0/f35dd53d68177c90699f4c37d0bb205b8abe036d955d0eb011ddb7f14a81e6fd0f18893731c457c1b5bd96754683f4c3d80d9a5585ddecaa53cdf84e0b3d68f7 + languageName: node + linkType: hard + +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": + version: 7.1.1 + resolution: "agent-base@npm:7.1.1" + dependencies: + debug: "npm:^4.3.4" + checksum: 10c0/e59ce7bed9c63bf071a30cc471f2933862044c97fd9958967bfe22521d7a0f601ce4ed5a8c011799d0c726ca70312142ae193bbebb60f576b52be19d4a363b50 + languageName: node + linkType: hard + +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: "npm:^2.0.0" + indent-string: "npm:^4.0.0" + checksum: 10c0/a42f67faa79e3e6687a4923050e7c9807db3848a037076f791d10e092677d65c1d2d863b7848560699f40fc0502c19f40963fb1cd1fb3d338a7423df8e45e039 + languageName: node + linkType: hard + +"aggregate-error@npm:^4.0.0": + version: 4.0.1 + resolution: "aggregate-error@npm:4.0.1" + dependencies: + clean-stack: "npm:^4.0.0" + indent-string: "npm:^5.0.0" + checksum: 10c0/75fd739f5c4c60a667cce35ccaf0edf135e147ef0be9a029cab75de14ac9421779b15339d562e58d25b233ea0ef2bbd4c916f149fdbcb73c2b9a62209e611343 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10c0/9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.1.0 + resolution: "ansi-regex@npm:6.1.0" + checksum: 10c0/a91daeddd54746338478eef88af3439a7edf30f8e23196e2d6ed182da9add559c601266dbef01c2efa46a958ad6f1f8b176799657616c702b5b02e799e7fd8dc + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 + languageName: node + linkType: hard + +"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c + languageName: node + linkType: hard + +"anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10c0/57b06ae984bc32a0d22592c87384cd88fe4511b1dd7581497831c56d41939c8a001b28e7b853e1450f2bf61992dfcaa8ae2d0d161a0a90c4fb631ef07098fbac + languageName: node + linkType: hard + +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10c0/b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de + languageName: node + linkType: hard + +"array-find-index@npm:^1.0.1": + version: 1.0.2 + resolution: "array-find-index@npm:1.0.2" + checksum: 10c0/86b9485c74ddd324feab807e10a6de3f9c1683856267236fac4bb4d4667ada6463e106db3f6c540ae6b720e0442b590ec701d13676df4c6af30ebf4da09b4f57 + languageName: node + linkType: hard + +"arrgv@npm:^1.0.2": + version: 1.0.2 + resolution: "arrgv@npm:1.0.2" + checksum: 10c0/7e6e782e6b749923ac7cbc4048ef6fe0844c4a59bfc8932fcd4c44566ba25eed46501f94dd7cf3c7297da88f3f599ca056bfb77d0c2484aebc92f04239f69124 + languageName: node + linkType: hard + +"arrify@npm:^3.0.0": + version: 3.0.0 + resolution: "arrify@npm:3.0.0" + checksum: 10c0/2e26601b8486f29780f1f70f7ac05a226755814c2a3ab42e196748f650af1dc310cd575a11dd4b9841c70fd7460b2dd2b8fe6fb7a3375878e2660706efafa58e + languageName: node + linkType: hard + +"ava@npm:^5.3.1": + version: 5.3.1 + resolution: "ava@npm:5.3.1" + dependencies: + acorn: "npm:^8.8.2" + acorn-walk: "npm:^8.2.0" + ansi-styles: "npm:^6.2.1" + arrgv: "npm:^1.0.2" + arrify: "npm:^3.0.0" + callsites: "npm:^4.0.0" + cbor: "npm:^8.1.0" + chalk: "npm:^5.2.0" + chokidar: "npm:^3.5.3" + chunkd: "npm:^2.0.1" + ci-info: "npm:^3.8.0" + ci-parallel-vars: "npm:^1.0.1" + clean-yaml-object: "npm:^0.1.0" + cli-truncate: "npm:^3.1.0" + code-excerpt: "npm:^4.0.0" + common-path-prefix: "npm:^3.0.0" + concordance: "npm:^5.0.4" + currently-unhandled: "npm:^0.4.1" + debug: "npm:^4.3.4" + emittery: "npm:^1.0.1" + figures: "npm:^5.0.0" + globby: "npm:^13.1.4" + ignore-by-default: "npm:^2.1.0" + indent-string: "npm:^5.0.0" + is-error: "npm:^2.2.2" + is-plain-object: "npm:^5.0.0" + is-promise: "npm:^4.0.0" + matcher: "npm:^5.0.0" + mem: "npm:^9.0.2" + ms: "npm:^2.1.3" + p-event: "npm:^5.0.1" + p-map: "npm:^5.5.0" + picomatch: "npm:^2.3.1" + pkg-conf: "npm:^4.0.0" + plur: "npm:^5.1.0" + pretty-ms: "npm:^8.0.0" + resolve-cwd: "npm:^3.0.0" + stack-utils: "npm:^2.0.6" + strip-ansi: "npm:^7.0.1" + supertap: "npm:^3.0.1" + temp-dir: "npm:^3.0.0" + write-file-atomic: "npm:^5.0.1" + yargs: "npm:^17.7.2" + peerDependencies: + "@ava/typescript": "*" + peerDependenciesMeta: + "@ava/typescript": + optional: true + bin: + ava: entrypoints/cli.mjs + checksum: 10c0/262cbdb9e8c3ce7177be91b92ba521e9d5aef577dcc8095cc591f86baaa291b91c88925928f5d26832c4d1b381a6ae99f2e8804077c592d0d32322c1212605cc + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee + languageName: node + linkType: hard + +"base64-js@npm:^1.3.1": + version: 1.5.1 + resolution: "base64-js@npm:1.5.1" + checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf + languageName: node + linkType: hard + +"better-sqlite3@npm:^9.6.0": + version: 9.6.0 + resolution: "better-sqlite3@npm:9.6.0" + dependencies: + bindings: "npm:^1.5.0" + node-gyp: "npm:latest" + prebuild-install: "npm:^7.1.1" + checksum: 10c0/8db9b38f414e26a56d4c40fc16e94a253118491dae0e2c054338a9e470f1a883c7eb4cb330f2f5737db30f704d4f2e697c59071ca04e03364ee9fe04375aa9c8 + languageName: node + linkType: hard + +"binary-extensions@npm:^2.0.0": + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10c0/75a59cafc10fb12a11d510e77110c6c7ae3f4ca22463d52487709ca7f18f69d886aa387557cc9864fbdb10153d0bdb4caacabf11541f55e89ed6e18d12ece2b5 + languageName: node + linkType: hard + +"bindings@npm:^1.5.0": + version: 1.5.0 + resolution: "bindings@npm:1.5.0" + dependencies: + file-uri-to-path: "npm:1.0.0" + checksum: 10c0/3dab2491b4bb24124252a91e656803eac24292473e56554e35bbfe3cc1875332cfa77600c3bac7564049dc95075bf6fcc63a4609920ff2d64d0fe405fcf0d4ba + languageName: node + linkType: hard + +"bl@npm:^4.0.3": + version: 4.1.0 + resolution: "bl@npm:4.1.0" + dependencies: + buffer: "npm:^5.5.0" + inherits: "npm:^2.0.4" + readable-stream: "npm:^3.4.0" + checksum: 10c0/02847e1d2cb089c9dc6958add42e3cdeaf07d13f575973963335ac0fdece563a50ac770ac4c8fa06492d2dd276f6cc3b7f08c7cd9c7a7ad0f8d388b2a28def5f + languageName: node + linkType: hard + +"blueimp-md5@npm:^2.10.0": + version: 2.19.0 + resolution: "blueimp-md5@npm:2.19.0" + checksum: 10c0/85d04343537dd99a288c62450341dcce7380d3454c81f8e5a971ddd80307d6f9ef51b5b92ad7d48aaaa92fd6d3a1f6b2f4fada068faae646887f7bfabc17a346 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f + languageName: node + linkType: hard + +"braces@npm:^3.0.3, braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 + languageName: node + linkType: hard + +"buffer@npm:^5.5.0": + version: 5.7.1 + resolution: "buffer@npm:5.7.1" + dependencies: + base64-js: "npm:^1.3.1" + ieee754: "npm:^1.1.13" + checksum: 10c0/27cac81cff434ed2876058d72e7c4789d11ff1120ef32c9de48f59eab58179b66710c488987d295ae89a228f835fc66d088652dffeb8e3ba8659f80eb091d55e + languageName: node + linkType: hard + +"cacache@npm:^18.0.0": + version: 18.0.4 + resolution: "cacache@npm:18.0.4" + dependencies: + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10c0/6c055bafed9de4f3dcc64ac3dc7dd24e863210902b7c470eb9ce55a806309b3efff78033e3d8b4f7dcc5d467f2db43c6a2857aaaf26f0094b8a351d44c42179f + languageName: node + linkType: hard + +"callsites@npm:^4.0.0": + version: 4.2.0 + resolution: "callsites@npm:4.2.0" + checksum: 10c0/8f7e269ec09fc0946bb22d838a8bc7932e1909ab4a833b964749f4d0e8bdeaa1f253287c4f911f61781f09620b6925ccd19a5ea4897489c4e59442c660c312a3 + languageName: node + linkType: hard + +"cbor@npm:^8.1.0": + version: 8.1.0 + resolution: "cbor@npm:8.1.0" + dependencies: + nofilter: "npm:^3.1.0" + checksum: 10c0/a836e2e7ea0efb1b9c4e5a4be906c57113d730cc42293a34072e0164ed110bb8ac035dc7dca2e3ebb641bd4b37e00fdbbf09c951aa864b3d4888a6ed8c6243f7 + languageName: node + linkType: hard + +"chalk@npm:^5.2.0, chalk@npm:^5.3.0": + version: 5.3.0 + resolution: "chalk@npm:5.3.0" + checksum: 10c0/8297d436b2c0f95801103ff2ef67268d362021b8210daf8ddbe349695333eb3610a71122172ff3b0272f1ef2cf7cc2c41fdaa4715f52e49ffe04c56340feed09 + languageName: node + linkType: hard + +"chokidar@npm:^3.5.3": + version: 3.6.0 + resolution: "chokidar@npm:3.6.0" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10c0/8361dcd013f2ddbe260eacb1f3cb2f2c6f2b0ad118708a343a5ed8158941a39cb8fb1d272e0f389712e74ee90ce8ba864eece9e0e62b9705cb468a2f6d917462 + languageName: node + linkType: hard + +"chownr@npm:^1.1.1": + version: 1.1.4 + resolution: "chownr@npm:1.1.4" + checksum: 10c0/ed57952a84cc0c802af900cf7136de643d3aba2eecb59d29344bc2f3f9bf703a301b9d84cdc71f82c3ffc9ccde831b0d92f5b45f91727d6c9da62f23aef9d9db + languageName: node + linkType: hard + +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: 10c0/594754e1303672171cc04e50f6c398ae16128eb134a88f801bf5354fd96f205320f23536a045d9abd8b51024a149696e51231565891d4efdab8846021ecf88e6 + languageName: node + linkType: hard + +"chunkd@npm:^2.0.1": + version: 2.0.1 + resolution: "chunkd@npm:2.0.1" + checksum: 10c0/4e0c5aac6048ecedfa4cd0a5f6c4f010c70a7b7645aeca7bfeb47cb0733c3463054f0ced3f2667b2e0e67edd75d68a8e05481b01115ba3f8a952a93026254504 + languageName: node + linkType: hard + +"ci-info@npm:^3.8.0": + version: 3.9.0 + resolution: "ci-info@npm:3.9.0" + checksum: 10c0/6f0109e36e111684291d46123d491bc4e7b7a1934c3a20dea28cba89f1d4a03acd892f5f6a81ed3855c38647e285a150e3c9ba062e38943bef57fee6c1554c3a + languageName: node + linkType: hard + +"ci-parallel-vars@npm:^1.0.1": + version: 1.0.1 + resolution: "ci-parallel-vars@npm:1.0.1" + checksum: 10c0/80952f699cbbc146092b077b4f3e28d085620eb4e6be37f069b4dbb3db0ee70e8eec3beef4ebe70ff60631e9fc743b9d0869678489f167442cac08b260e5ac08 + languageName: node + linkType: hard + +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 10c0/1f90262d5f6230a17e27d0c190b09d47ebe7efdd76a03b5a1127863f7b3c9aec4c3e6c8bb3a7bbf81d553d56a1fd35728f5a8ef4c63f867ac8d690109742a8c1 + languageName: node + linkType: hard + +"clean-stack@npm:^4.0.0": + version: 4.2.0 + resolution: "clean-stack@npm:4.2.0" + dependencies: + escape-string-regexp: "npm:5.0.0" + checksum: 10c0/2bdf981a0fef0a23c14255df693b30eb9ae27eedf212470d8c400a0c0b6fb82fbf1ff8c5216ccd5721e3670b700389c886b1dce5070776dc9fbcc040957758c0 + languageName: node + linkType: hard + +"clean-yaml-object@npm:^0.1.0": + version: 0.1.0 + resolution: "clean-yaml-object@npm:0.1.0" + checksum: 10c0/a6505310590038afb9f0adc7f17a4c66787719c94d23f8491267ea4d9c405cdd378bd576ae1926169b6d997d4c59a8b86516bf4d16ba228280cf615598c58e05 + languageName: node + linkType: hard + +"cli-truncate@npm:^3.1.0": + version: 3.1.0 + resolution: "cli-truncate@npm:3.1.0" + dependencies: + slice-ansi: "npm:^5.0.0" + string-width: "npm:^5.0.0" + checksum: 10c0/a19088878409ec0e5dc2659a5166929629d93cfba6d68afc9cde2282fd4c751af5b555bf197047e31c87c574396348d011b7aa806fec29c4139ea4f7f00b324c + languageName: node + linkType: hard + +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10c0/4bda0f09c340cbb6dfdc1ed508b3ca080f12992c18d68c6be4d9cf51756033d5266e61ec57529e610dacbf4da1c634423b0c1b11037709cc6b09045cbd815df5 + languageName: node + linkType: hard + +"code-excerpt@npm:^4.0.0": + version: 4.0.0 + resolution: "code-excerpt@npm:4.0.0" + dependencies: + convert-to-spaces: "npm:^2.0.1" + checksum: 10c0/b6c5a06e039cecd2ab6a0e10ee0831de8362107d1f298ca3558b5f9004cb8e0260b02dd6c07f57b9a0e346c76864d2873311ee1989809fdeb05bd5fbbadde773 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 + languageName: node + linkType: hard + +"common-path-prefix@npm:^3.0.0": + version: 3.0.0 + resolution: "common-path-prefix@npm:3.0.0" + checksum: 10c0/c4a74294e1b1570f4a8ab435285d185a03976c323caa16359053e749db4fde44e3e6586c29cd051100335e11895767cbbd27ea389108e327d62f38daf4548fdb + languageName: node + linkType: hard + +"concordance@npm:^5.0.4": + version: 5.0.4 + resolution: "concordance@npm:5.0.4" + dependencies: + date-time: "npm:^3.1.0" + esutils: "npm:^2.0.3" + fast-diff: "npm:^1.2.0" + js-string-escape: "npm:^1.0.1" + lodash: "npm:^4.17.15" + md5-hex: "npm:^3.0.1" + semver: "npm:^7.3.2" + well-known-symbols: "npm:^2.0.0" + checksum: 10c0/59b440f330df3a7c9aa148ba588b3e99aed86acab225b4f01ffcea34ace4cf11f817e31153254e8f38ed48508998dad40b9106951a743c334d751f7ab21afb8a + languageName: node + linkType: hard + +"convert-to-spaces@npm:^2.0.1": + version: 2.0.1 + resolution: "convert-to-spaces@npm:2.0.1" + checksum: 10c0/d90aa0e3b6a27f9d5265a8d32def3c5c855b3e823a9db1f26d772f8146d6b91020a2fdfd905ce8048a73fad3aaf836fef8188c67602c374405e2ae8396c4ac46 + languageName: node + linkType: hard + +"cosmjs-types@npm:^0.9.0": + version: 0.9.0 + resolution: "cosmjs-types@npm:0.9.0" + checksum: 10c0/bc20f4293fb34629d7c5f96bafe533987f753df957ff68eb078d0128ae5a418320cb945024441769a07bb9bc5dde9d22b972fd40d485933e5706ea191c43727b + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10c0/5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750 + languageName: node + linkType: hard + +"currently-unhandled@npm:^0.4.1": + version: 0.4.1 + resolution: "currently-unhandled@npm:0.4.1" + dependencies: + array-find-index: "npm:^1.0.1" + checksum: 10c0/32d197689ec32f035910202c1abb0dc6424dce01d7b51779c685119b380d98535c110ffff67a262fc7e367612a7dfd30d3d3055f9a6634b5a9dd1302de7ef11c + languageName: node + linkType: hard + +"date-time@npm:^3.1.0": + version: 3.1.0 + resolution: "date-time@npm:3.1.0" + dependencies: + time-zone: "npm:^1.0.0" + checksum: 10c0/aa3e2e930d74b0b9e90f69de7a16d3376e30f21f1f4ce9a2311d8fec32d760e776efea752dafad0ce188187265235229013036202be053fc2d7979813bfb6ded + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.3.4": + version: 4.3.7 + resolution: "debug@npm:4.3.7" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b + languageName: node + linkType: hard + +"decompress-response@npm:^6.0.0": + version: 6.0.0 + resolution: "decompress-response@npm:6.0.0" + dependencies: + mimic-response: "npm:^3.1.0" + checksum: 10c0/bd89d23141b96d80577e70c54fb226b2f40e74a6817652b80a116d7befb8758261ad073a8895648a29cc0a5947021ab66705cb542fa9c143c82022b27c5b175e + languageName: node + linkType: hard + +"deep-extend@npm:^0.6.0": + version: 0.6.0 + resolution: "deep-extend@npm:0.6.0" + checksum: 10c0/1c6b0abcdb901e13a44c7d699116d3d4279fdb261983122a3783e7273844d5f2537dc2e1c454a23fcf645917f93fbf8d07101c1d03c015a87faa662755212566 + languageName: node + linkType: hard + +"detect-libc@npm:^2.0.0": + version: 2.0.3 + resolution: "detect-libc@npm:2.0.3" + checksum: 10c0/88095bda8f90220c95f162bf92cad70bd0e424913e655c20578600e35b91edc261af27531cf160a331e185c0ced93944bc7e09939143225f56312d7fd800fdb7 + languageName: node + linkType: hard + +"dir-glob@npm:^3.0.1": + version: 3.0.1 + resolution: "dir-glob@npm:3.0.1" + dependencies: + path-type: "npm:^4.0.0" + checksum: 10c0/dcac00920a4d503e38bb64001acb19df4efc14536ada475725e12f52c16777afdee4db827f55f13a908ee7efc0cb282e2e3dbaeeb98c0993dd93d1802d3bf00c + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10c0/26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 + languageName: node + linkType: hard + +"emittery@npm:^1.0.1": + version: 1.0.3 + resolution: "emittery@npm:1.0.3" + checksum: 10c0/91605d044f3891dd1f8ab731aeb94b520488b21e707f7064dcbcf5303bac3b4e7133dfa23c343ede1fc970340bd78a9b1aed522b805bc15104606bba630dd71e + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10c0/b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10c0/af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: 10c0/36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039 + languageName: node + linkType: hard + +"end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1": + version: 1.4.4 + resolution: "end-of-stream@npm:1.4.4" + dependencies: + once: "npm:^1.4.0" + checksum: 10c0/870b423afb2d54bb8d243c63e07c170409d41e20b47eeef0727547aea5740bd6717aca45597a9f2745525667a6b804c1e7bede41f856818faee5806dd9ff3975 + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10c0/b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 10c0/ced4dd3a78e15897ed3be74e635110bbf3b08877b0a41be50dcb325ee0e0b5f65fc2d50e9845194d7c4633f327e2e1c6cce00a71b617c5673df0374201d67f65 + languageName: node + linkType: hard + +"escape-string-regexp@npm:5.0.0, escape-string-regexp@npm:^5.0.0": + version: 5.0.0 + resolution: "escape-string-regexp@npm:5.0.0" + checksum: 10c0/6366f474c6f37a802800a435232395e04e9885919873e382b157ab7e8f0feb8fed71497f84a6f6a81a49aab41815522f5839112bd38026d203aea0c91622df95 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^2.0.0": + version: 2.0.0 + resolution: "escape-string-regexp@npm:2.0.0" + checksum: 10c0/2530479fe8db57eace5e8646c9c2a9c80fa279614986d16dcc6bcaceb63ae77f05a851ba6c43756d816c61d7f4534baf56e3c705e3e0d884818a46808811c507 + languageName: node + linkType: hard + +"esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10c0/ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 + languageName: node + linkType: hard + +"esutils@npm:^2.0.3": + version: 2.0.3 + resolution: "esutils@npm:2.0.3" + checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 + languageName: node + linkType: hard + +"execa@npm:^9.3.1": + version: 9.4.1 + resolution: "execa@npm:9.4.1" + dependencies: + "@sindresorhus/merge-streams": "npm:^4.0.0" + cross-spawn: "npm:^7.0.3" + figures: "npm:^6.1.0" + get-stream: "npm:^9.0.0" + human-signals: "npm:^8.0.0" + is-plain-obj: "npm:^4.1.0" + is-stream: "npm:^4.0.1" + npm-run-path: "npm:^6.0.0" + pretty-ms: "npm:^9.0.0" + signal-exit: "npm:^4.1.0" + strip-final-newline: "npm:^4.0.0" + yoctocolors: "npm:^2.0.0" + checksum: 10c0/2166de02c8c940312481e480ef47f54636725b24a402d25bdbaeca97f6eeb82b21def1279e00378872fbe6a0c675d6b5cd144be4d52c1485a7a3895e611ac03e + languageName: node + linkType: hard + +"expand-template@npm:^2.0.3": + version: 2.0.3 + resolution: "expand-template@npm:2.0.3" + checksum: 10c0/1c9e7afe9acadf9d373301d27f6a47b34e89b3391b1ef38b7471d381812537ef2457e620ae7f819d2642ce9c43b189b3583813ec395e2938319abe356a9b2f51 + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 10c0/160456d2d647e6019640bd07111634d8c353038d9fa40176afb7cd49b0548bdae83b56d05e907c2cce2300b81cae35d800ef92fefb9d0208e190fa3b7d6bb579 + languageName: node + linkType: hard + +"fast-diff@npm:^1.2.0": + version: 1.3.0 + resolution: "fast-diff@npm:1.3.0" + checksum: 10c0/5c19af237edb5d5effda008c891a18a585f74bf12953be57923f17a3a4d0979565fc64dbc73b9e20926b9d895f5b690c618cbb969af0cf022e3222471220ad29 + languageName: node + linkType: hard + +"fast-glob@npm:^3.3.0": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" + dependencies: + "@nodelib/fs.stat": "npm:^2.0.2" + "@nodelib/fs.walk": "npm:^1.2.3" + glob-parent: "npm:^5.1.2" + merge2: "npm:^1.3.0" + micromatch: "npm:^4.0.4" + checksum: 10c0/42baad7b9cd40b63e42039132bde27ca2cb3a4950d0a0f9abe4639ea1aa9d3e3b40f98b1fe31cbc0cc17b664c9ea7447d911a152fa34ec5b72977b125a6fc845 + languageName: node + linkType: hard + +"fastq@npm:^1.6.0": + version: 1.17.1 + resolution: "fastq@npm:1.17.1" + dependencies: + reusify: "npm:^1.0.4" + checksum: 10c0/1095f16cea45fb3beff558bb3afa74ca7a9250f5a670b65db7ed585f92b4b48381445cd328b3d87323da81e43232b5d5978a8201bde84e0cd514310f1ea6da34 + languageName: node + linkType: hard + +"figures@npm:^5.0.0": + version: 5.0.0 + resolution: "figures@npm:5.0.0" + dependencies: + escape-string-regexp: "npm:^5.0.0" + is-unicode-supported: "npm:^1.2.0" + checksum: 10c0/ce0f17d4ea8b0fc429c5207c343534a2f5284ecfb22aa08607da7dc84ed9e1cf754f5b97760e8dcb98d3c9d1a1e4d3d578fe3b5b99c426f05d0f06c7ba618e16 + languageName: node + linkType: hard + +"figures@npm:^6.1.0": + version: 6.1.0 + resolution: "figures@npm:6.1.0" + dependencies: + is-unicode-supported: "npm:^2.0.0" + checksum: 10c0/9159df4264d62ef447a3931537de92f5012210cf5135c35c010df50a2169377581378149abfe1eb238bd6acbba1c0d547b1f18e0af6eee49e30363cedaffcfe4 + languageName: node + linkType: hard + +"file-uri-to-path@npm:1.0.0": + version: 1.0.0 + resolution: "file-uri-to-path@npm:1.0.0" + checksum: 10c0/3b545e3a341d322d368e880e1c204ef55f1d45cdea65f7efc6c6ce9e0c4d22d802d5629320eb779d006fe59624ac17b0e848d83cc5af7cd101f206cb704f5519 + languageName: node + linkType: hard + +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 + languageName: node + linkType: hard + +"find-up@npm:^6.0.0": + version: 6.3.0 + resolution: "find-up@npm:6.3.0" + dependencies: + locate-path: "npm:^7.1.0" + path-exists: "npm:^5.0.0" + checksum: 10c0/07e0314362d316b2b13f7f11ea4692d5191e718ca3f7264110127520f3347996349bf9e16805abae3e196805814bc66ef4bff2b8904dc4a6476085fc9b0eba07 + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.3.0 + resolution: "foreground-child@npm:3.3.0" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^4.0.1" + checksum: 10c0/028f1d41000553fcfa6c4bb5c372963bf3d9bf0b1f25a87d1a6253014343fb69dfb1b42d9625d7cf44c8ba429940f3d0ff718b62105d4d4a4f6ef8ca0a53faa2 + languageName: node + linkType: hard + +"fs-constants@npm:^1.0.0": + version: 1.0.0 + resolution: "fs-constants@npm:1.0.0" + checksum: 10c0/a0cde99085f0872f4d244e83e03a46aa387b74f5a5af750896c6b05e9077fac00e9932fdf5aef84f2f16634cd473c63037d7a512576da7d5c2b9163d1909f3a8 + languageName: node + linkType: hard + +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10c0/703d16522b8282d7299337539c3ed6edddd1afe82435e4f5b76e34a79cd74e488a8a0e26a636afc2440e1a23b03878e2122e3a2cfe375a5cf63c37d92b86a004 + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10c0/63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94 + languageName: node + linkType: hard + +"fsevents@npm:~2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10c0/a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10c0/c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde + languageName: node + linkType: hard + +"get-stream@npm:^9.0.0": + version: 9.0.1 + resolution: "get-stream@npm:9.0.1" + dependencies: + "@sec-ant/readable-stream": "npm:^0.4.1" + is-stream: "npm:^4.0.1" + checksum: 10c0/d70e73857f2eea1826ac570c3a912757dcfbe8a718a033fa0c23e12ac8e7d633195b01710e0559af574cbb5af101009b42df7b6f6b29ceec8dbdf7291931b948 + languageName: node + linkType: hard + +"github-from-package@npm:0.0.0": + version: 0.0.0 + resolution: "github-from-package@npm:0.0.0" + checksum: 10c0/737ee3f52d0a27e26332cde85b533c21fcdc0b09fb716c3f8e522cfaa9c600d4a631dec9fcde179ec9d47cca89017b7848ed4d6ae6b6b78f936c06825b1fcc12 + languageName: node + linkType: hard + +"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee + languageName: node + linkType: hard + +"glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.4.5 + resolution: "glob@npm:10.4.5" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e + languageName: node + linkType: hard + +"globby@npm:^13.1.4": + version: 13.2.2 + resolution: "globby@npm:13.2.2" + dependencies: + dir-glob: "npm:^3.0.1" + fast-glob: "npm:^3.3.0" + ignore: "npm:^5.2.4" + merge2: "npm:^1.4.1" + slash: "npm:^4.0.0" + checksum: 10c0/a8d7cc7cbe5e1b2d0f81d467bbc5bc2eac35f74eaded3a6c85fc26d7acc8e6de22d396159db8a2fc340b8a342e74cac58de8f4aee74146d3d146921a76062664 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 10c0/ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" + dependencies: + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10c0/4207b06a4580fb85dd6dff521f0abf6db517489e70863dca1a0291daa7f2d3d2d6015a57bd702af068ea5cf9f1f6ff72314f5f5b4228d299c0904135d2aef921 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.5 + resolution: "https-proxy-agent@npm:7.0.5" + dependencies: + agent-base: "npm:^7.0.2" + debug: "npm:4" + checksum: 10c0/2490e3acec397abeb88807db52cac59102d5ed758feee6df6112ab3ccd8325e8a1ce8bce6f4b66e5470eca102d31e425ace904242e4fa28dbe0c59c4bafa7b2c + languageName: node + linkType: hard + +"human-signals@npm:^8.0.0": + version: 8.0.0 + resolution: "human-signals@npm:8.0.0" + checksum: 10c0/e4dac4f7d3eb791ed04129fc6a85bd454a9102d3e3b76c911d0db7057ebd60b2956b435b5b5712aec18960488ede3c21ef7c56e42cdd70760c0d84d3c05cd92e + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10c0/98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 + languageName: node + linkType: hard + +"ieee754@npm:^1.1.13": + version: 1.2.1 + resolution: "ieee754@npm:1.2.1" + checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb + languageName: node + linkType: hard + +"ignore-by-default@npm:^2.1.0": + version: 2.1.0 + resolution: "ignore-by-default@npm:2.1.0" + checksum: 10c0/3a6040dac25ed9da39dee73bf1634fdd1e15b0eb7cf52a6bdec81c310565782d8811c104ce40acb3d690d61c5fc38a91c78e6baee830a8a2232424dbc6b66981 + languageName: node + linkType: hard + +"ignore@npm:^5.2.4": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 + languageName: node + linkType: hard + +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 10c0/1e1904ddb0cb3d6cce7cd09e27a90184908b7a5d5c21b92e232c93579d314f0b83c246ffb035493d0504b1e9147ba2c9b21df0030f48673fba0496ecd698161f + languageName: node + linkType: hard + +"indent-string@npm:^5.0.0": + version: 5.0.0 + resolution: "indent-string@npm:5.0.0" + checksum: 10c0/8ee77b57d92e71745e133f6f444d6fa3ed503ad0e1bcd7e80c8da08b42375c07117128d670589725ed07b1978065803fa86318c309ba45415b7fe13e7f170220 + languageName: node + linkType: hard + +"inherits@npm:^2.0.3, inherits@npm:^2.0.4": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 + languageName: node + linkType: hard + +"ini@npm:~1.3.0": + version: 1.3.8 + resolution: "ini@npm:1.3.8" + checksum: 10c0/ec93838d2328b619532e4f1ff05df7909760b6f66d9c9e2ded11e5c1897d6f2f9980c54dd638f88654b00919ce31e827040631eab0a3969e4d1abefa0719516a + languageName: node + linkType: hard + +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10c0/331cd07fafcb3b24100613e4b53e1a2b4feab11e671e655d46dc09ee233da5011284d09ca40c4ecbdfe1d0004f462958675c224a804259f2f78d2465a87824bc + languageName: node + linkType: hard + +"irregular-plurals@npm:^3.3.0": + version: 3.5.0 + resolution: "irregular-plurals@npm:3.5.0" + checksum: 10c0/7c033bbe7325e5a6e0a26949cc6863b6ce273403d4cd5b93bd99b33fecb6605b0884097c4259c23ed0c52c2133bf7d1cdcdd7a0630e8c325161fe269b3447918 + languageName: node + linkType: hard + +"is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10c0/a16eaee59ae2b315ba36fad5c5dcaf8e49c3e27318f8ab8fa3cdb8772bf559c8d1ba750a589c2ccb096113bb64497084361a25960899cb6172a6925ab6123d38 + languageName: node + linkType: hard + +"is-error@npm:^2.2.2": + version: 2.2.2 + resolution: "is-error@npm:2.2.2" + checksum: 10c0/475d3463968bf16e94485555d7cb7a879ed68685e08d365a3370972e626054f1846ebbb3934403091e06682445568601fe919e41646096e5007952d0c1f4fd9b + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10c0/bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^4.0.0": + version: 4.0.0 + resolution: "is-fullwidth-code-point@npm:4.0.0" + checksum: 10c0/df2a717e813567db0f659c306d61f2f804d480752526886954a2a3e2246c7745fd07a52b5fecf2b68caf0a6c79dcdace6166fdf29cc76ed9975cc334f0a018b8 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a + languageName: node + linkType: hard + +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 10c0/85fee098ae62ba6f1e24cf22678805473c7afd0fb3978a3aa260e354cb7bcb3a5806cf0a98403188465efedec41ab4348e8e4e79305d409601323855b3839d4d + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 + languageName: node + linkType: hard + +"is-plain-obj@npm:^4.1.0": + version: 4.1.0 + resolution: "is-plain-obj@npm:4.1.0" + checksum: 10c0/32130d651d71d9564dc88ba7e6fda0e91a1010a3694648e9f4f47bb6080438140696d3e3e15c741411d712e47ac9edc1a8a9de1fe76f3487b0d90be06ac9975e + languageName: node + linkType: hard + +"is-plain-object@npm:^5.0.0": + version: 5.0.0 + resolution: "is-plain-object@npm:5.0.0" + checksum: 10c0/893e42bad832aae3511c71fd61c0bf61aa3a6d853061c62a307261842727d0d25f761ce9379f7ba7226d6179db2a3157efa918e7fe26360f3bf0842d9f28942c + languageName: node + linkType: hard + +"is-promise@npm:^4.0.0": + version: 4.0.0 + resolution: "is-promise@npm:4.0.0" + checksum: 10c0/ebd5c672d73db781ab33ccb155fb9969d6028e37414d609b115cc534654c91ccd061821d5b987eefaa97cf4c62f0b909bb2f04db88306de26e91bfe8ddc01503 + languageName: node + linkType: hard + +"is-stream@npm:^4.0.1": + version: 4.0.1 + resolution: "is-stream@npm:4.0.1" + checksum: 10c0/2706c7f19b851327ba374687bc4a3940805e14ca496dc672b9629e744d143b1ad9c6f1b162dece81c7bfbc0f83b32b61ccc19ad2e05aad2dd7af347408f60c7f + languageName: node + linkType: hard + +"is-unicode-supported@npm:^1.2.0": + version: 1.3.0 + resolution: "is-unicode-supported@npm:1.3.0" + checksum: 10c0/b8674ea95d869f6faabddc6a484767207058b91aea0250803cbf1221345cb0c56f466d4ecea375dc77f6633d248d33c47bd296fb8f4cdba0b4edba8917e83d8a + languageName: node + linkType: hard + +"is-unicode-supported@npm:^2.0.0": + version: 2.1.0 + resolution: "is-unicode-supported@npm:2.1.0" + checksum: 10c0/a0f53e9a7c1fdbcf2d2ef6e40d4736fdffff1c9f8944c75e15425118ff3610172c87bf7bc6c34d3903b04be59790bb2212ddbe21ee65b5a97030fc50370545a5 + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10c0/228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10c0/9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 + languageName: node + linkType: hard + +"jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10c0/6acc10d139eaefdbe04d2f679e6191b3abf073f111edf10b1de5302c97ec93fffeb2fdd8681ed17f16268aa9dd4f8c588ed9d1d3bffbbfa6e8bf897cbb3149b9 + languageName: node + linkType: hard + +"js-string-escape@npm:^1.0.1": + version: 1.0.1 + resolution: "js-string-escape@npm:1.0.1" + checksum: 10c0/2c33b9ff1ba6b84681c51ca0997e7d5a1639813c95d5b61cb7ad47e55cc28fa4a0b1935c3d218710d8e6bcee5d0cd8c44755231e3a4e45fc604534d9595a3628 + languageName: node + linkType: hard + +"js-yaml@npm:^3.14.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10c0/6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b + languageName: node + linkType: hard + +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10c0/4f907fb78d7b712e11dea8c165fe0921f81a657d3443dde75359ed52eb2b5d33ce6773d97985a089f09a65edd80b11cb75c767b57ba47391fee4c969f7215c96 + languageName: node + linkType: hard + +"load-json-file@npm:^7.0.0": + version: 7.0.1 + resolution: "load-json-file@npm:7.0.1" + checksum: 10c0/7117459608a0b6329c7f78e6e1f541b3162dd901c29dd5af721fec8b270177d2e3d7999c971f344fff04daac368d052732e2c7146014bc84d15e0b636975e19a + languageName: node + linkType: hard + +"locate-path@npm:^7.1.0": + version: 7.2.0 + resolution: "locate-path@npm:7.2.0" + dependencies: + p-locate: "npm:^6.0.0" + checksum: 10c0/139e8a7fe11cfbd7f20db03923cacfa5db9e14fa14887ea121345597472b4a63c1a42a8a5187defeeff6acf98fd568da7382aa39682d38f0af27433953a97751 + languageName: node + linkType: hard + +"lodash@npm:^4.17.15": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb + languageName: node + linkType: hard + +"make-fetch-happen@npm:^13.0.0": + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" + dependencies: + "@npmcli/agent": "npm:^2.0.0" + cacache: "npm:^18.0.0" + http-cache-semantics: "npm:^4.1.1" + is-lambda: "npm:^1.0.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + proc-log: "npm:^4.2.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^10.0.0" + checksum: 10c0/df5f4dbb6d98153b751bccf4dc4cc500de85a96a9331db9805596c46aa9f99d9555983954e6c1266d9f981ae37a9e4647f42b9a4bb5466f867f4012e582c9e7e + languageName: node + linkType: hard + +"map-age-cleaner@npm:^0.1.3": + version: 0.1.3 + resolution: "map-age-cleaner@npm:0.1.3" + dependencies: + p-defer: "npm:^1.0.0" + checksum: 10c0/7495236c7b0950956c144fd8b4bc6399d4e78072a8840a4232fe1c4faccbb5eb5d842e5c0a56a60afc36d723f315c1c672325ca03c1b328650f7fcc478f385fd + languageName: node + linkType: hard + +"matcher@npm:^5.0.0": + version: 5.0.0 + resolution: "matcher@npm:5.0.0" + dependencies: + escape-string-regexp: "npm:^5.0.0" + checksum: 10c0/eda5471fc9d5b7264d63c81727824adc3585ddb5cfdc5fce5a9b7c86f946ff181610735d330b1c37a84811df872d1290bf4e9401d2be2a414204343701144b18 + languageName: node + linkType: hard + +"md5-hex@npm:^3.0.1": + version: 3.0.1 + resolution: "md5-hex@npm:3.0.1" + dependencies: + blueimp-md5: "npm:^2.10.0" + checksum: 10c0/ee2b4d8da16b527b3a3fe4d7a96720f43afd07b46a82d49421208b5a126235fb75cfb30b80d4029514772c8844273f940bddfbf4155c787f968f3be4060d01e4 + languageName: node + linkType: hard + +"mem@npm:^9.0.2": + version: 9.0.2 + resolution: "mem@npm:9.0.2" + dependencies: + map-age-cleaner: "npm:^0.1.3" + mimic-fn: "npm:^4.0.0" + checksum: 10c0/c2c56141399e520d8f0e50186bb7e4b49300b33984dc919682f3f13e53dec0e6608fbd327d5ae99494f45061a3a05a8ee04ccba6dcf795c3c215b5aa906eb41f + languageName: node + linkType: hard + +"merge2@npm:^1.3.0, merge2@npm:^1.4.1": + version: 1.4.1 + resolution: "merge2@npm:1.4.1" + checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb + languageName: node + linkType: hard + +"micromatch@npm:^4.0.4": + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" + dependencies: + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 + languageName: node + linkType: hard + +"mimic-fn@npm:^4.0.0": + version: 4.0.0 + resolution: "mimic-fn@npm:4.0.0" + checksum: 10c0/de9cc32be9996fd941e512248338e43407f63f6d497abe8441fa33447d922e927de54d4cc3c1a3c6d652857acd770389d5a3823f311a744132760ce2be15ccbf + languageName: node + linkType: hard + +"mimic-response@npm:^3.1.0": + version: 3.1.0 + resolution: "mimic-response@npm:3.1.0" + checksum: 10c0/0d6f07ce6e03e9e4445bee655202153bdb8a98d67ee8dc965ac140900d7a2688343e6b4c9a72cfc9ef2f7944dfd76eef4ab2482eb7b293a68b84916bac735362 + languageName: node + linkType: hard + +"minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed + languageName: node + linkType: hard + +"minimist@npm:^1.2.0, minimist@npm:^1.2.3": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 + languageName: node + linkType: hard + +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10c0/5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e + languageName: node + linkType: hard + +"minipass-fetch@npm:^3.0.0": + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^2.1.2" + dependenciesMeta: + encoding: + optional: true + checksum: 10c0/9d702d57f556274286fdd97e406fc38a2f5c8d15e158b498d7393b1105974b21249289ec571fa2b51e038a4872bfc82710111cf75fae98c662f3d6f95e72152b + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10c0/2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10c0/cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2 + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10c0/298f124753efdc745cfe0f2bdfdd81ba25b9f4e753ca4a2066eb17c821f25d48acea607dfc997633ee5bf7b6dfffb4eee4f2051eb168663f0b99fad2fa4829cb + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10c0/a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 10c0/a91d8043f691796a8ac88df039da19933ef0f633e3d7f0d35dcd5373af49131cf2399bfc355f41515dc495e3990369c3858cd319e5c2722b4753c90bf3152462 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: "npm:^3.0.0" + yallist: "npm:^4.0.0" + checksum: 10c0/64fae024e1a7d0346a1102bb670085b17b7f95bf6cfdf5b128772ec8faf9ea211464ea4add406a3a6384a7d87a0cd1a96263692134323477b4fb43659a6cab78 + languageName: node + linkType: hard + +"mkdirp-classic@npm:^0.5.2, mkdirp-classic@npm:^0.5.3": + version: 0.5.3 + resolution: "mkdirp-classic@npm:0.5.3" + checksum: 10c0/95371d831d196960ddc3833cc6907e6b8f67ac5501a6582f47dfae5eb0f092e9f8ce88e0d83afcae95d6e2b61a01741ba03714eeafb6f7a6e9dcc158ac85b168 + languageName: node + linkType: hard + +"mkdirp@npm:^1.0.3": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 10c0/46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf + languageName: node + linkType: hard + +"ms@npm:^2.1.3": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 + languageName: node + linkType: hard + +"napi-build-utils@npm:^1.0.1": + version: 1.0.2 + resolution: "napi-build-utils@npm:1.0.2" + checksum: 10c0/37fd2cd0ff2ad20073ce78d83fd718a740d568b225924e753ae51cb69d68f330c80544d487e5e5bd18e28702ed2ca469c2424ad948becd1862c1b0209542b2e9 + languageName: node + linkType: hard + +"negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: 10c0/3ec9fd413e7bf071c937ae60d572bc67155262068ed522cf4b3be5edbe6ddf67d095ec03a3a14ebf8fc8e95f8e1d61be4869db0dbb0de696f6b837358bd43fc2 + languageName: node + linkType: hard + +"node-abi@npm:^3.3.0": + version: 3.71.0 + resolution: "node-abi@npm:3.71.0" + dependencies: + semver: "npm:^7.3.5" + checksum: 10c0/dbd0792ea729329cd9d099f28a5681ff9e8a6db48cf64e1437bf6a7fd669009d1e758a784619a1c4cc8bfd1ed17162f042c787654edf19a1f64b5018457c9c1f + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 10.2.0 + resolution: "node-gyp@npm:10.2.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^13.0.0" + nopt: "npm:^7.0.0" + proc-log: "npm:^4.1.0" + semver: "npm:^7.3.5" + tar: "npm:^6.2.1" + which: "npm:^4.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10c0/00630d67dbd09a45aee0a5d55c05e3916ca9e6d427ee4f7bc392d2d3dc5fad7449b21fc098dd38260a53d9dcc9c879b36704a1994235d4707e7271af7e9a835b + languageName: node + linkType: hard + +"nofilter@npm:^3.1.0": + version: 3.1.0 + resolution: "nofilter@npm:3.1.0" + checksum: 10c0/92459f3864a067b347032263f0b536223cbfc98153913b5dce350cb39c8470bc1813366e41993f22c33cc6400c0f392aa324a4b51e24c22040635c1cdb046499 + languageName: node + linkType: hard + +"nopt@npm:^7.0.0": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" + dependencies: + abbrev: "npm:^2.0.0" + bin: + nopt: bin/nopt.js + checksum: 10c0/a069c7c736767121242037a22a788863accfa932ab285a1eb569eb8cd534b09d17206f68c37f096ae785647435e0c5a5a0a67b42ec743e481a455e5ae6a6df81 + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 10c0/e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046 + languageName: node + linkType: hard + +"npm-run-path@npm:^6.0.0": + version: 6.0.0 + resolution: "npm-run-path@npm:6.0.0" + dependencies: + path-key: "npm:^4.0.0" + unicorn-magic: "npm:^0.3.0" + checksum: 10c0/b223c8a0dcd608abf95363ea5c3c0ccc3cd877daf0102eaf1b0f2390d6858d8337fbb7c443af2403b067a7d2c116d10691ecd22ab3c5273c44da1ff8d07753bd + languageName: node + linkType: hard + +"once@npm:^1.3.1, once@npm:^1.4.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 10c0/5d48aca287dfefabd756621c5dfce5c91a549a93e9fdb7b8246bc4c4790aa2ec17b34a260530474635147aeb631a2dcc8b32c613df0675f96041cbb8244517d0 + languageName: node + linkType: hard + +"p-defer@npm:^1.0.0": + version: 1.0.0 + resolution: "p-defer@npm:1.0.0" + checksum: 10c0/ed603c3790e74b061ac2cb07eb6e65802cf58dce0fbee646c113a7b71edb711101329ad38f99e462bd2e343a74f6e9366b496a35f1d766c187084d3109900487 + languageName: node + linkType: hard + +"p-event@npm:^5.0.1": + version: 5.0.1 + resolution: "p-event@npm:5.0.1" + dependencies: + p-timeout: "npm:^5.0.2" + checksum: 10c0/2317171489537f316661fa863f3bb711b2ceb89182937238422cec10223cbb958c432d6c26a238446a622d788187bdd295b1d8ecedbe2e467e045930d60202b0 + languageName: node + linkType: hard + +"p-limit@npm:^4.0.0": + version: 4.0.0 + resolution: "p-limit@npm:4.0.0" + dependencies: + yocto-queue: "npm:^1.0.0" + checksum: 10c0/a56af34a77f8df2ff61ddfb29431044557fcbcb7642d5a3233143ebba805fc7306ac1d448de724352861cb99de934bc9ab74f0d16fe6a5460bdbdf938de875ad + languageName: node + linkType: hard + +"p-locate@npm:^6.0.0": + version: 6.0.0 + resolution: "p-locate@npm:6.0.0" + dependencies: + p-limit: "npm:^4.0.0" + checksum: 10c0/d72fa2f41adce59c198270aa4d3c832536c87a1806e0f69dffb7c1a7ca998fb053915ca833d90f166a8c082d3859eabfed95f01698a3214c20df6bb8de046312 + languageName: node + linkType: hard + +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10c0/592c05bd6262c466ce269ff172bb8de7c6975afca9b50c975135b974e9bdaafbfe80e61aaaf5be6d1200ba08b30ead04b88cfa7e25ff1e3b93ab28c9f62a2c75 + languageName: node + linkType: hard + +"p-map@npm:^5.5.0": + version: 5.5.0 + resolution: "p-map@npm:5.5.0" + dependencies: + aggregate-error: "npm:^4.0.0" + checksum: 10c0/410bce846b1e3db6bb2ccab6248372ecf4e635fc2b31331c8f56478e73fec9e146e8b4547585e635703160a3d252a6a65b8f855834aebc2c3408eb5789630cc4 + languageName: node + linkType: hard + +"p-timeout@npm:^5.0.2": + version: 5.1.0 + resolution: "p-timeout@npm:5.1.0" + checksum: 10c0/1b026cf9d5878c64bec4341ca9cda8ec6b8b3aea8a57885ca0fe2b35753a20d767fb6f9d3aa41e1252f42bc95432c05ea33b6b18f271fb10bfb0789591850a41 + languageName: node + linkType: hard + +"package-json-from-dist@npm:^1.0.0": + version: 1.0.1 + resolution: "package-json-from-dist@npm:1.0.1" + checksum: 10c0/62ba2785eb655fec084a257af34dbe24292ab74516d6aecef97ef72d4897310bc6898f6c85b5cd22770eaa1ce60d55a0230e150fb6a966e3ecd6c511e23d164b + languageName: node + linkType: hard + +"parse-ms@npm:^3.0.0": + version: 3.0.0 + resolution: "parse-ms@npm:3.0.0" + checksum: 10c0/056b4a32a9d3749f3f4cfffefb45c45540491deaa8e1d8ad43c2ddde7ba04edd076bd1b298f521238bb5fb084a9b2c4a2ebb78aefa651afbc4c2b0af4232fc54 + languageName: node + linkType: hard + +"parse-ms@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-ms@npm:4.0.0" + checksum: 10c0/a7900f4f1ebac24cbf5e9708c16fb2fd482517fad353aecd7aefb8c2ba2f85ce017913ccb8925d231770404780df46244ea6fec598b3bde6490882358b4d2d16 + languageName: node + linkType: hard + +"path-exists@npm:^5.0.0": + version: 5.0.0 + resolution: "path-exists@npm:5.0.0" + checksum: 10c0/b170f3060b31604cde93eefdb7392b89d832dfbc1bed717c9718cbe0f230c1669b7e75f87e19901da2250b84d092989a0f9e44d2ef41deb09aa3ad28e691a40a + languageName: node + linkType: hard + +"path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c + languageName: node + linkType: hard + +"path-key@npm:^4.0.0": + version: 4.0.0 + resolution: "path-key@npm:4.0.0" + checksum: 10c0/794efeef32863a65ac312f3c0b0a99f921f3e827ff63afa5cb09a377e202c262b671f7b3832a4e64731003fa94af0263713962d317b9887bd1e0c48a342efba3 + languageName: node + linkType: hard + +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d + languageName: node + linkType: hard + +"path-type@npm:^4.0.0": + version: 4.0.0 + resolution: "path-type@npm:4.0.0" + checksum: 10c0/666f6973f332f27581371efaf303fd6c272cc43c2057b37aa99e3643158c7e4b2626549555d88626e99ea9e046f82f32e41bbde5f1508547e9a11b149b52387c + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be + languageName: node + linkType: hard + +"pkg-conf@npm:^4.0.0": + version: 4.0.0 + resolution: "pkg-conf@npm:4.0.0" + dependencies: + find-up: "npm:^6.0.0" + load-json-file: "npm:^7.0.0" + checksum: 10c0/27d027609f27228edcde121f6f707b4ba1f5488e95e98f2e58652ae4e99792081bd1de67d591f4a0f05b02c0b66d745591d49f82041cbc8d41e2238ef5d73eb4 + languageName: node + linkType: hard + +"plur@npm:^5.1.0": + version: 5.1.0 + resolution: "plur@npm:5.1.0" + dependencies: + irregular-plurals: "npm:^3.3.0" + checksum: 10c0/26bb622b8545fcfd47bbf56fbcca66c08693708a232e403fa3589e00003c56c14231ac57c7588ca5db83ef4be1f61383402c4ea954000768f779f8aef6eb6da8 + languageName: node + linkType: hard + +"prebuild-install@npm:^7.1.1": + version: 7.1.2 + resolution: "prebuild-install@npm:7.1.2" + dependencies: + detect-libc: "npm:^2.0.0" + expand-template: "npm:^2.0.3" + github-from-package: "npm:0.0.0" + minimist: "npm:^1.2.3" + mkdirp-classic: "npm:^0.5.3" + napi-build-utils: "npm:^1.0.1" + node-abi: "npm:^3.3.0" + pump: "npm:^3.0.0" + rc: "npm:^1.2.7" + simple-get: "npm:^4.0.0" + tar-fs: "npm:^2.0.0" + tunnel-agent: "npm:^0.6.0" + bin: + prebuild-install: bin.js + checksum: 10c0/e64868ba9ef2068fd7264f5b03e5298a901e02a450acdb1f56258d88c09dea601eefdb3d1dfdff8513fdd230a92961712be0676192626a3b4d01ba154d48bdd3 + languageName: node + linkType: hard + +"pretty-ms@npm:^8.0.0": + version: 8.0.0 + resolution: "pretty-ms@npm:8.0.0" + dependencies: + parse-ms: "npm:^3.0.0" + checksum: 10c0/e960d633ecca45445cf5c6dffc0f5e4bef6744c92449ab0e8c6c704800675ab71e181c5e02ece5265e02137a33e313d3f3e355fbf8ea30b4b5b23de423329f8d + languageName: node + linkType: hard + +"pretty-ms@npm:^9.0.0": + version: 9.1.0 + resolution: "pretty-ms@npm:9.1.0" + dependencies: + parse-ms: "npm:^4.0.0" + checksum: 10c0/fd111aad8800a04dfd654e6016da69bdaa6fc6a4c280f8e727cffd8b5960558e94942f1a94d4aa6e4d179561a0fbb0366a9ebe0ccefbbb0f8ff853b129cdefb9 + languageName: node + linkType: hard + +"proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 10c0/17db4757c2a5c44c1e545170e6c70a26f7de58feb985091fb1763f5081cab3d01b181fb2dd240c9f4a4255a1d9227d163d5771b7e69c9e49a561692db865efb9 + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10c0/9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96 + languageName: node + linkType: hard + +"pump@npm:^3.0.0": + version: 3.0.2 + resolution: "pump@npm:3.0.2" + dependencies: + end-of-stream: "npm:^1.1.0" + once: "npm:^1.3.1" + checksum: 10c0/5ad655cb2a7738b4bcf6406b24ad0970d680649d996b55ad20d1be8e0c02394034e4c45ff7cd105d87f1e9b96a0e3d06fd28e11fae8875da26e7f7a8e2c9726f + languageName: node + linkType: hard + +"queue-microtask@npm:^1.2.2": + version: 1.2.3 + resolution: "queue-microtask@npm:1.2.3" + checksum: 10c0/900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102 + languageName: node + linkType: hard + +"rc@npm:^1.2.7": + version: 1.2.8 + resolution: "rc@npm:1.2.8" + dependencies: + deep-extend: "npm:^0.6.0" + ini: "npm:~1.3.0" + minimist: "npm:^1.2.0" + strip-json-comments: "npm:~2.0.1" + bin: + rc: ./cli.js + checksum: 10c0/24a07653150f0d9ac7168e52943cc3cb4b7a22c0e43c7dff3219977c2fdca5a2760a304a029c20811a0e79d351f57d46c9bde216193a0f73978496afc2b85b15 + languageName: node + linkType: hard + +"readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 + languageName: node + linkType: hard + +"readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 10c0/6fa848cf63d1b82ab4e985f4cf72bd55b7dcfd8e0a376905804e48c3634b7e749170940ba77b32804d5fe93b3cc521aa95a8d7e7d725f830da6d93f3669ce66b + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10c0/83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 + languageName: node + linkType: hard + +"resolve-cwd@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-cwd@npm:3.0.0" + dependencies: + resolve-from: "npm:^5.0.0" + checksum: 10c0/e608a3ebd15356264653c32d7ecbc8fd702f94c6703ea4ac2fb81d9c359180cba0ae2e6b71faa446631ed6145454d5a56b227efc33a2d40638ac13f8beb20ee4 + languageName: node + linkType: hard + +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10c0/b21cb7f1fb746de8107b9febab60095187781137fd803e6a59a76d421444b1531b641bba5857f5dc011974d8a5c635d61cec49e6bd3b7fc20e01f0fafc4efbf2 + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10c0/59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe + languageName: node + linkType: hard + +"reusify@npm:^1.0.4": + version: 1.0.4 + resolution: "reusify@npm:1.0.4" + checksum: 10c0/c19ef26e4e188f408922c46f7ff480d38e8dfc55d448310dfb518736b23ed2c4f547fb64a6ed5bdba92cd7e7ddc889d36ff78f794816d5e71498d645ef476107 + languageName: node + linkType: hard + +"root-workspace-0b6124@workspace:.": + version: 0.0.0-use.local + resolution: "root-workspace-0b6124@workspace:." + dependencies: + "@agoric/synthetic-chain": "npm:^0.3.0" + ava: "npm:^5.3.1" + languageName: unknown + linkType: soft + +"run-parallel@npm:^1.1.9": + version: 1.2.0 + resolution: "run-parallel@npm:1.2.0" + dependencies: + queue-microtask: "npm:^1.2.2" + checksum: 10c0/200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39 + languageName: node + linkType: hard + +"safe-buffer@npm:^5.0.1, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 + languageName: node + linkType: hard + +"semver@npm:^7.3.2, semver@npm:^7.3.5": + version: 7.6.3 + resolution: "semver@npm:7.6.3" + bin: + semver: bin/semver.js + checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf + languageName: node + linkType: hard + +"serialize-error@npm:^7.0.1": + version: 7.0.1 + resolution: "serialize-error@npm:7.0.1" + dependencies: + type-fest: "npm:^0.13.1" + checksum: 10c0/7982937d578cd901276c8ab3e2c6ed8a4c174137730f1fb0402d005af209a0e84d04acc874e317c936724c7b5b26c7a96ff7e4b8d11a469f4924a4b0ea814c05 + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 + languageName: node + linkType: hard + +"simple-concat@npm:^1.0.0": + version: 1.0.1 + resolution: "simple-concat@npm:1.0.1" + checksum: 10c0/62f7508e674414008910b5397c1811941d457dfa0db4fd5aa7fa0409eb02c3609608dfcd7508cace75b3a0bf67a2a77990711e32cd213d2c76f4fd12ee86d776 + languageName: node + linkType: hard + +"simple-get@npm:^4.0.0": + version: 4.0.1 + resolution: "simple-get@npm:4.0.1" + dependencies: + decompress-response: "npm:^6.0.0" + once: "npm:^1.3.1" + simple-concat: "npm:^1.0.0" + checksum: 10c0/b0649a581dbca741babb960423248899203165769747142033479a7dc5e77d7b0fced0253c731cd57cf21e31e4d77c9157c3069f4448d558ebc96cf9e1eebcf0 + languageName: node + linkType: hard + +"slash@npm:^4.0.0": + version: 4.0.0 + resolution: "slash@npm:4.0.0" + checksum: 10c0/b522ca75d80d107fd30d29df0549a7b2537c83c4c4ecd12cd7d4ea6c8aaca2ab17ada002e7a1d78a9d736a0261509f26ea5b489082ee443a3a810586ef8eff18 + languageName: node + linkType: hard + +"slice-ansi@npm:^5.0.0": + version: 5.0.0 + resolution: "slice-ansi@npm:5.0.0" + dependencies: + ansi-styles: "npm:^6.0.0" + is-fullwidth-code-point: "npm:^4.0.0" + checksum: 10c0/2d4d40b2a9d5cf4e8caae3f698fe24ae31a4d778701724f578e984dcb485ec8c49f0c04dab59c401821e80fcdfe89cace9c66693b0244e40ec485d72e543914f + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10c0/a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539 + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.3": + version: 8.0.4 + resolution: "socks-proxy-agent@npm:8.0.4" + dependencies: + agent-base: "npm:^7.1.1" + debug: "npm:^4.3.4" + socks: "npm:^2.8.3" + checksum: 10c0/345593bb21b95b0508e63e703c84da11549f0a2657d6b4e3ee3612c312cb3a907eac10e53b23ede3557c6601d63252103494caa306b66560f43af7b98f53957a + languageName: node + linkType: hard + +"socks@npm:^2.8.3": + version: 2.8.3 + resolution: "socks@npm:2.8.3" + dependencies: + ip-address: "npm:^9.0.5" + smart-buffer: "npm:^4.2.0" + checksum: 10c0/d54a52bf9325165770b674a67241143a3d8b4e4c8884560c4e0e078aace2a728dffc7f70150660f51b85797c4e1a3b82f9b7aa25e0a0ceae1a243365da5c51a7 + languageName: node + linkType: hard + +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10c0/09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec + languageName: node + linkType: hard + +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10c0/ecadcfe4c771890140da5023d43e190b7566d9cf8b2d238600f31bec0fc653f328da4450eb04bd59a431771a8e9cc0e118f0aa3974b683a4981b4e07abc2a5bb + languageName: node + linkType: hard + +"ssri@npm:^10.0.0": + version: 10.0.6 + resolution: "ssri@npm:10.0.6" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10c0/e5a1e23a4057a86a97971465418f22ea89bd439ac36ade88812dd920e4e61873e8abd6a9b72a03a67ef50faa00a2daf1ab745c5a15b46d03e0544a0296354227 + languageName: node + linkType: hard + +"stack-utils@npm:^2.0.6": + version: 2.0.6 + resolution: "stack-utils@npm:2.0.6" + dependencies: + escape-string-regexp: "npm:^2.0.0" + checksum: 10c0/651c9f87667e077584bbe848acaecc6049bc71979f1e9a46c7b920cad4431c388df0f51b8ad7cfd6eed3db97a2878d0fc8b3122979439ea8bac29c61c95eec8a + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b + languageName: node + linkType: hard + +"string-width@npm:^5.0.0, string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca + languageName: node + linkType: hard + +"string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 10c0/810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10c0/1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10c0/a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 + languageName: node + linkType: hard + +"strip-final-newline@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-final-newline@npm:4.0.0" + checksum: 10c0/b0cf2b62d597a1b0e3ebc42b88767f0a0d45601f89fd379a928a1812c8779440c81abba708082c946445af1d6b62d5f16e2a7cf4f30d9d6587b89425fae801ff + languageName: node + linkType: hard + +"strip-json-comments@npm:~2.0.1": + version: 2.0.1 + resolution: "strip-json-comments@npm:2.0.1" + checksum: 10c0/b509231cbdee45064ff4f9fd73609e2bcc4e84a4d508e9dd0f31f70356473fde18abfb5838c17d56fb236f5a06b102ef115438de0600b749e818a35fbbc48c43 + languageName: node + linkType: hard + +"supertap@npm:^3.0.1": + version: 3.0.1 + resolution: "supertap@npm:3.0.1" + dependencies: + indent-string: "npm:^5.0.0" + js-yaml: "npm:^3.14.1" + serialize-error: "npm:^7.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10c0/8164674f2e280cab875f0fef5bb36c15553c13e29697ff92f4e0d6bc62149f0303a89eee47535413ed145ea72e14a24d065bab233059d48a499ec5ebb4566b0f + languageName: node + linkType: hard + +"tar-fs@npm:^2.0.0": + version: 2.1.1 + resolution: "tar-fs@npm:2.1.1" + dependencies: + chownr: "npm:^1.1.1" + mkdirp-classic: "npm:^0.5.2" + pump: "npm:^3.0.0" + tar-stream: "npm:^2.1.4" + checksum: 10c0/871d26a934bfb7beeae4c4d8a09689f530b565f79bd0cf489823ff0efa3705da01278160da10bb006d1a793fa0425cf316cec029b32a9159eacbeaff4965fb6d + languageName: node + linkType: hard + +"tar-stream@npm:^2.1.4": + version: 2.2.0 + resolution: "tar-stream@npm:2.2.0" + dependencies: + bl: "npm:^4.0.3" + end-of-stream: "npm:^1.4.1" + fs-constants: "npm:^1.0.0" + inherits: "npm:^2.0.3" + readable-stream: "npm:^3.1.1" + checksum: 10c0/2f4c910b3ee7196502e1ff015a7ba321ec6ea837667220d7bcb8d0852d51cb04b87f7ae471008a6fb8f5b1a1b5078f62f3a82d30c706f20ada1238ac797e7692 + languageName: node + linkType: hard + +"tar@npm:^6.1.11, tar@npm:^6.2.1": + version: 6.2.1 + resolution: "tar@npm:6.2.1" + dependencies: + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^5.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: 10c0/a5eca3eb50bc11552d453488344e6507156b9193efd7635e98e867fab275d527af53d8866e2370cd09dfe74378a18111622ace35af6a608e5223a7d27fe99537 + languageName: node + linkType: hard + +"temp-dir@npm:^3.0.0": + version: 3.0.0 + resolution: "temp-dir@npm:3.0.0" + checksum: 10c0/a86978a400984cd5f315b77ebf3fe53bb58c61f192278cafcb1f3fb32d584a21dc8e08b93171d7874b7cc972234d3455c467306cc1bfc4524b622e5ad3bfd671 + languageName: node + linkType: hard + +"time-zone@npm:^1.0.0": + version: 1.0.0 + resolution: "time-zone@npm:1.0.0" + checksum: 10c0/d00ebd885039109011b6e2423ebbf225160927333c2ade6d833e9cc4676db20759f1f3855fafde00d1bd668c243a6aa68938ce71fe58aab0d514e820d59c1d81 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 + languageName: node + linkType: hard + +"tunnel-agent@npm:^0.6.0": + version: 0.6.0 + resolution: "tunnel-agent@npm:0.6.0" + dependencies: + safe-buffer: "npm:^5.0.1" + checksum: 10c0/4c7a1b813e7beae66fdbf567a65ec6d46313643753d0beefb3c7973d66fcec3a1e7f39759f0a0b4465883499c6dc8b0750ab8b287399af2e583823e40410a17a + languageName: node + linkType: hard + +"type-fest@npm:^0.13.1": + version: 0.13.1 + resolution: "type-fest@npm:0.13.1" + checksum: 10c0/0c0fa07ae53d4e776cf4dac30d25ad799443e9eef9226f9fddbb69242db86b08584084a99885cfa5a9dfe4c063ebdc9aa7b69da348e735baede8d43f1aeae93b + languageName: node + linkType: hard + +"unicorn-magic@npm:^0.3.0": + version: 0.3.0 + resolution: "unicorn-magic@npm:0.3.0" + checksum: 10c0/0a32a997d6c15f1c2a077a15b1c4ca6f268d574cf5b8975e778bb98e6f8db4ef4e86dfcae4e158cd4c7e38fb4dd383b93b13eefddc7f178dea13d3ac8a603271 + languageName: node + linkType: hard + +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: "npm:^4.0.0" + checksum: 10c0/6363e40b2fa758eb5ec5e21b3c7fb83e5da8dcfbd866cc0c199d5534c42f03b9ea9ab069769cc388e1d7ab93b4eeef28ef506ab5f18d910ef29617715101884f + languageName: node + linkType: hard + +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10c0/cb811d9d54eb5821b81b18205750be84cb015c20a4a44280794e915f5a0a70223ce39066781a354e872df3572e8155c228f43ff0cce94c7cbf4da2cc7cbdd635 + languageName: node + linkType: hard + +"util-deprecate@npm:^1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 10c0/41a5bdd214df2f6c3ecf8622745e4a366c4adced864bc3c833739791aeeeb1838119af7daed4ba36428114b5c67dcda034a79c882e97e43c03e66a4dd7389942 + languageName: node + linkType: hard + +"well-known-symbols@npm:^2.0.0": + version: 2.0.0 + resolution: "well-known-symbols@npm:2.0.0" + checksum: 10c0/cb6c12e98877e8952ec28d13ae6f4fdb54ae1cb49b16a728720276dadd76c930e6cb0e174af3a4620054dd2752546f842540122920c6e31410208abd4958ee6b + languageName: node + linkType: hard + +"which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10c0/66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f + languageName: node + linkType: hard + +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10c0/449fa5c44ed120ccecfe18c433296a4978a7583bf2391c50abce13f76878d2476defde04d0f79db8165bdf432853c1f8389d0485ca6e8ebce3bbcded513d5e6a + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10c0/138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 10c0/56fece1a4018c6a6c8e28fbc88c87e0fbf4ea8fd64fc6c63b18f4acc4bd13e0ad2515189786dd2c30d3eec9663d70f4ecf699330002f8ccb547e4a18231fc9f0 + languageName: node + linkType: hard + +"write-file-atomic@npm:^5.0.1": + version: 5.0.1 + resolution: "write-file-atomic@npm:5.0.1" + dependencies: + imurmurhash: "npm:^0.1.4" + signal-exit: "npm:^4.0.1" + checksum: 10c0/e8c850a8e3e74eeadadb8ad23c9d9d63e4e792bd10f4836ed74189ef6e996763959f1249c5650e232f3c77c11169d239cbfc8342fc70f3fe401407d23810505d + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10c0/4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10c0/2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a + languageName: node + linkType: hard + +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 + languageName: node + linkType: hard + +"yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 + languageName: node + linkType: hard + +"yocto-queue@npm:^1.0.0": + version: 1.1.1 + resolution: "yocto-queue@npm:1.1.1" + checksum: 10c0/cb287fe5e6acfa82690acb43c283de34e945c571a78a939774f6eaba7c285bacdf6c90fbc16ce530060863984c906d2b4c6ceb069c94d1e0a06d5f2b458e2a92 + languageName: node + linkType: hard + +"yoctocolors@npm:^2.0.0": + version: 2.1.1 + resolution: "yoctocolors@npm:2.1.1" + checksum: 10c0/85903f7fa96f1c70badee94789fade709f9d83dab2ec92753d612d84fcea6d34c772337a9f8914c6bed2f5fc03a428ac5d893e76fab636da5f1236ab725486d0 + languageName: node + linkType: hard From a181f9b3f7f677d770cda950bd1731aa741bc46a Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 18 Nov 2024 13:12:16 -0600 Subject: [PATCH 005/174] feat(f:fast-usdc): add fast-usdc to a3p-integration - d:quick-send -> f:fast-usdc - init-orch overtaken by u17 - punt test-lib in favor of @agoric/client-utils - --oracleSet option - @endo/init dep --- .../proposals/d:quick-send/quick-load.test.js | 20 - .../d:quick-send/test-lib/cosmos-api.js | 42 - .../d:quick-send/test-lib/vstorage-client.js | 34 - .../{d:quick-send => f:fast-usdc}/.yarnrc.yml | 0 .../proposals/f:fast-usdc/deploy.test.js | 18 + .../package.json | 7 +- .../{d:quick-send => f:fast-usdc}/test.sh | 0 .../{d:quick-send => f:fast-usdc}/yarn.lock | 2030 ++++++++++++++++- 8 files changed, 2030 insertions(+), 121 deletions(-) delete mode 100644 a3p-integration/proposals/d:quick-send/quick-load.test.js delete mode 100644 a3p-integration/proposals/d:quick-send/test-lib/cosmos-api.js delete mode 100644 a3p-integration/proposals/d:quick-send/test-lib/vstorage-client.js rename a3p-integration/proposals/{d:quick-send => f:fast-usdc}/.yarnrc.yml (100%) create mode 100644 a3p-integration/proposals/f:fast-usdc/deploy.test.js rename a3p-integration/proposals/{d:quick-send => f:fast-usdc}/package.json (71%) rename a3p-integration/proposals/{d:quick-send => f:fast-usdc}/test.sh (100%) rename a3p-integration/proposals/{d:quick-send => f:fast-usdc}/yarn.lock (51%) diff --git a/a3p-integration/proposals/d:quick-send/quick-load.test.js b/a3p-integration/proposals/d:quick-send/quick-load.test.js deleted file mode 100644 index 7f03e411b17..00000000000 --- a/a3p-integration/proposals/d:quick-send/quick-load.test.js +++ /dev/null @@ -1,20 +0,0 @@ -// @ts-check -/* global globalThis */ -import test from 'ava'; -import { extractStreamCellValue } from '@agoric/synthetic-chain'; -import { localAPI, makeLCD } from './test-lib/cosmos-api.js'; -import { makeVStorage } from './test-lib/vstorage-client.js'; - -const io = { api: makeLCD(localAPI, { fetch: globalThis.fetch }) }; - -test('quickSend is in agoricNames.instance', async t => { - const vs = makeVStorage(io.api); - const data = await vs.readStorage('published.agoricNames.instance'); - const value = extractStreamCellValue(data); - assert.typeof(value, 'string'); - const capData = JSON.parse(value); - const encoding = JSON.parse(capData?.body.replace(/^#/, '')); - const byName = Object.fromEntries(encoding); - t.log('agoricNames.instance keys', Object.keys(byName)); - t.truthy(byName.quickSend); -}); diff --git a/a3p-integration/proposals/d:quick-send/test-lib/cosmos-api.js b/a3p-integration/proposals/d:quick-send/test-lib/cosmos-api.js deleted file mode 100644 index b4d6e1540c8..00000000000 --- a/a3p-integration/proposals/d:quick-send/test-lib/cosmos-api.js +++ /dev/null @@ -1,42 +0,0 @@ -// @ts-check -const { freeze } = Object; - -/** - * @see {@link https://docs.cosmos.network/v0.46/core/grpc_rest.html#rest-server} - */ -export const defaultAPIPort = 1317; -export const localAPI = `http://localhost:${defaultAPIPort}`; - -/** - * @param {string} apiURL - * @param {object} io - * @param {typeof fetch} io.fetch - */ -export const makeLCD = (apiURL, { fetch }) => { - if (typeof apiURL !== 'string') throw TypeError(typeof apiURL); - - /** - * @param {string} href - * @param {object} [options] - * @param {Record} [options.headers] - */ - const getJSON = async (href, options = {}) => { - const opts = { - keepalive: true, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }; - const url = `${apiURL}${href}`; - const r = await fetch(url, opts); - if (!r.ok) throw Error(r.statusText); - return r.json(); - }; - - return freeze({ - getJSON, - latestBlock: () => getJSON(`/cosmos/base/tendermint/v1beta1/blocks/latest`), - }); -}; -/** @typedef {ReturnType} LCD */ diff --git a/a3p-integration/proposals/d:quick-send/test-lib/vstorage-client.js b/a3p-integration/proposals/d:quick-send/test-lib/vstorage-client.js deleted file mode 100644 index 497e63fd2b5..00000000000 --- a/a3p-integration/proposals/d:quick-send/test-lib/vstorage-client.js +++ /dev/null @@ -1,34 +0,0 @@ -// @ts-check - -/** - * @param {import("./cosmos-api").LCD} lcd - */ -export const makeVStorage = lcd => { - const getJSON = (href, options) => lcd.getJSON(href, options); - - // height=0 is the same as omitting height and implies the highest block - const href = (path = 'published', { kind = 'data' } = {}) => - `/agoric/vstorage/${kind}/${path}`; - const headers = height => - height ? { 'x-cosmos-block-height': `${height}` } : undefined; - - const readStorage = ( - path = 'published', - { kind = 'data', height = 0 } = {}, - ) => - getJSON(href(path, { kind }), { headers: headers(height) }).catch(err => { - throw Error( - `cannot read ${kind} of ${path}: ${err.message} ${err?.cause.message}`, - ); - }); - const readCell = (path, opts) => - readStorage(path, opts) - .then(data => data.value) - .then(s => (s === '' ? {} : JSON.parse(s))); - - return { - lcd, - readStorage, - readCell, - }; -}; diff --git a/a3p-integration/proposals/d:quick-send/.yarnrc.yml b/a3p-integration/proposals/f:fast-usdc/.yarnrc.yml similarity index 100% rename from a3p-integration/proposals/d:quick-send/.yarnrc.yml rename to a3p-integration/proposals/f:fast-usdc/.yarnrc.yml diff --git a/a3p-integration/proposals/f:fast-usdc/deploy.test.js b/a3p-integration/proposals/f:fast-usdc/deploy.test.js new file mode 100644 index 00000000000..2fc6fd8ec8d --- /dev/null +++ b/a3p-integration/proposals/f:fast-usdc/deploy.test.js @@ -0,0 +1,18 @@ +// @ts-check +/* global globalThis */ +import test from 'ava'; +import '@endo/init/legacy.js'; // axios compat +import { makeVstorageKit } from '@agoric/client-utils'; + +const io = { fetch: globalThis.fetch }; +const networkConfig = { + rpcAddrs: ['http://0.0.0.0:26657'], + chainName: 'agoriclocal', +}; + +test('fastUsdc is in agoricNames.instance', async t => { + const { agoricNames } = await makeVstorageKit(io, networkConfig); + + t.log('agoricNames.instance keys', Object.keys(agoricNames.instance)); + t.truthy(agoricNames.instance.fastUsdc); +}); diff --git a/a3p-integration/proposals/d:quick-send/package.json b/a3p-integration/proposals/f:fast-usdc/package.json similarity index 71% rename from a3p-integration/proposals/d:quick-send/package.json rename to a3p-integration/proposals/f:fast-usdc/package.json index 472220b5163..62a07aa7333 100644 --- a/a3p-integration/proposals/d:quick-send/package.json +++ b/a3p-integration/proposals/f:fast-usdc/package.json @@ -2,15 +2,16 @@ "agoricProposal": { "source": "subdir", "sdk-generate": [ - "vats/init-orchestration.js", - "fast-usdc/init-quickSend.js" + "fast-usdc/init-fast-usdc.js submission --oracleSet A3P_INTEGRATION" ], "type": "/agoric.swingset.CoreEvalProposal" }, "type": "module", "license": "Apache-2.0", "dependencies": { - "@agoric/synthetic-chain": "^0.3.0", + "@agoric/client-utils": "dev", + "@agoric/synthetic-chain": "^0.4.3", + "@endo/init": "^1.1.7", "ava": "^5.3.1" }, "ava": { diff --git a/a3p-integration/proposals/d:quick-send/test.sh b/a3p-integration/proposals/f:fast-usdc/test.sh similarity index 100% rename from a3p-integration/proposals/d:quick-send/test.sh rename to a3p-integration/proposals/f:fast-usdc/test.sh diff --git a/a3p-integration/proposals/d:quick-send/yarn.lock b/a3p-integration/proposals/f:fast-usdc/yarn.lock similarity index 51% rename from a3p-integration/proposals/d:quick-send/yarn.lock rename to a3p-integration/proposals/f:fast-usdc/yarn.lock index 33593f4224b..3f27fd9271b 100644 --- a/a3p-integration/proposals/d:quick-send/yarn.lock +++ b/a3p-integration/proposals/f:fast-usdc/yarn.lock @@ -5,9 +5,320 @@ __metadata: version: 8 cacheKey: 10c0 -"@agoric/synthetic-chain@npm:^0.3.0": - version: 0.3.0 - resolution: "@agoric/synthetic-chain@npm:0.3.0" +"@agoric/babel-generator@npm:^7.17.6": + version: 7.17.6 + resolution: "@agoric/babel-generator@npm:7.17.6" + dependencies: + "@babel/types": "npm:^7.17.0" + jsesc: "npm:^2.5.1" + source-map: "npm:^0.5.0" + checksum: 10c0/59db151ae737bd9b1f21c1589df4c7da9cbf484de5b5cc8352052825c2d977283d975303f55acb54d0210c176cb405da263073ceba1d3a6db65c6e21cc6e663f + languageName: node + linkType: hard + +"@agoric/base-zone@npm:0.1.1-dev-9c61393.0+9c61393": + version: 0.1.1-dev-9c61393.0 + resolution: "@agoric/base-zone@npm:0.1.1-dev-9c61393.0" + dependencies: + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/cb872856e25ddb0ea00714194d58db5058fefc306f6a74cb048de7fd75ff06e6283ad990e20c845b0633fadd9ef07f35d59e44a632dc763e9d506214772dc5d7 + languageName: node + linkType: hard + +"@agoric/casting@npm:0.4.3-dev-9c61393.0+9c61393": + version: 0.4.3-dev-9c61393.0 + resolution: "@agoric/casting@npm:0.4.3-dev-9c61393.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/notifier": "npm:0.6.3-dev-9c61393.0+9c61393" + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@cosmjs/encoding": "npm:^0.32.3" + "@cosmjs/proto-signing": "npm:^0.32.3" + "@cosmjs/stargate": "npm:^0.32.3" + "@cosmjs/tendermint-rpc": "npm:^0.32.3" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/lockdown": "npm:^1.0.13" + "@endo/marshal": "npm:^1.6.2" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/2d491ae19f8264ec368bdb16db5f120a8f94de7c8fd54614434439a7f457f7d5539c123e8429b7af5a28fefe13e9543cba177f48fe0b0feb469e2482c8c1b7b7 + languageName: node + linkType: hard + +"@agoric/client-utils@npm:dev": + version: 0.1.1-dev-9c61393.0 + resolution: "@agoric/client-utils@npm:0.1.1-dev-9c61393.0" + dependencies: + "@agoric/casting": "npm:0.4.3-dev-9c61393.0+9c61393" + "@agoric/ertp": "npm:0.16.3-dev-9c61393.0+9c61393" + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/smart-wallet": "npm:0.5.4-dev-9c61393.0+9c61393" + "@agoric/vats": "npm:0.15.2-dev-9c61393.0+9c61393" + "@cosmjs/stargate": "npm:^0.32.3" + "@cosmjs/tendermint-rpc": "npm:^0.32.3" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/41792664f534d9e07e442ce726d6af675e967b4986aedc1b66758b0315c7fd10b4fe1ad2b509f8ddf54759f218f1da2d8a5347c1514c13ccfe56288b6c63e257 + languageName: node + linkType: hard + +"@agoric/cosmic-proto@npm:0.4.1-dev-9c61393.0+9c61393": + version: 0.4.1-dev-9c61393.0 + resolution: "@agoric/cosmic-proto@npm:0.4.1-dev-9c61393.0" + dependencies: + "@endo/base64": "npm:^1.0.9" + "@endo/init": "npm:^1.1.7" + checksum: 10c0/55d09b61206feccfab98a67d41aa90381fa724d8b7018f5bf7d93db92f485f9fe8e1513c96be94be1e5377c3bc462d05aaf7a78064647166450e949150903603 + languageName: node + linkType: hard + +"@agoric/ertp@npm:0.16.3-dev-9c61393.0+9c61393": + version: 0.16.3-dev-9c61393.0 + resolution: "@agoric/ertp@npm:0.16.3-dev-9c61393.0" + dependencies: + "@agoric/notifier": "npm:0.6.3-dev-9c61393.0+9c61393" + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@agoric/vat-data": "npm:0.5.3-dev-9c61393.0+9c61393" + "@agoric/zone": "npm:0.2.3-dev-9c61393.0+9c61393" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/c54db24d131c3f703e8d363650e747fbaa0ffb91e675169a90073483d28a6a1324c80085eb3c2a382971a918990202bcbda9e8548549e37db9ea54adeafd26da + languageName: node + linkType: hard + +"@agoric/governance@npm:0.10.4-dev-9c61393.0+9c61393": + version: 0.10.4-dev-9c61393.0 + resolution: "@agoric/governance@npm:0.10.4-dev-9c61393.0" + dependencies: + "@agoric/ertp": "npm:0.16.3-dev-9c61393.0+9c61393" + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/notifier": "npm:0.6.3-dev-9c61393.0+9c61393" + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@agoric/time": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/vat-data": "npm:0.5.3-dev-9c61393.0+9c61393" + "@agoric/zoe": "npm:0.26.3-dev-9c61393.0+9c61393" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/captp": "npm:^4.4.3" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/promise-kit": "npm:^1.1.8" + import-meta-resolve: "npm:^2.2.1" + checksum: 10c0/374a3e54c2b332feb515dc25afeb316c0db8304337b07f9161e7ef9d833246d5f3a6bd89df23e143b3d6d78787028c47f38bfd77aafc215a4721aaa29b44e123 + languageName: node + linkType: hard + +"@agoric/internal@npm:0.3.3-dev-9c61393.0+9c61393": + version: 0.3.3-dev-9c61393.0 + resolution: "@agoric/internal@npm:0.3.3-dev-9c61393.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-9c61393.0+9c61393" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + "@endo/stream": "npm:^1.2.8" + anylogger: "npm:^0.21.0" + jessie.js: "npm:^0.3.4" + checksum: 10c0/5dab64b83cb6a6a311f53722ce5283e61a8a9a3142c2065d9e9baee277a1fecbc3f5edb6fd99e0c3215e897fdfb9e1dce00e5369797a9374e315b3a899dac64e + languageName: node + linkType: hard + +"@agoric/kmarshal@npm:0.1.1-dev-9c61393.0+9c61393": + version: 0.1.1-dev-9c61393.0 + resolution: "@agoric/kmarshal@npm:0.1.1-dev-9c61393.0" + dependencies: + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + checksum: 10c0/38006a8dc82a32e5445c7ef9253ef2a66e53d5ae9e58d6ca5224b79b3155878f3a3ef53e476878ea95270a494a582ce036af78a1440f7f4573a36ac78f456cf4 + languageName: node + linkType: hard + +"@agoric/network@npm:0.1.1-dev-9c61393.0+9c61393": + version: 0.1.1-dev-9c61393.0 + resolution: "@agoric/network@npm:0.1.1-dev-9c61393.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@agoric/vat-data": "npm:0.5.3-dev-9c61393.0+9c61393" + "@endo/base64": "npm:^1.0.9" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/935ec80ad05ea3297f456af1d4e5491eb89725b2bb9984dfdbcedc2ba757ae06e9927b3cfc94dd3b2bada4b8de4b33dedb2dd00cb33a1d6bf113c48a213afb3b + languageName: node + linkType: hard + +"@agoric/notifier@npm:0.6.3-dev-9c61393.0+9c61393": + version: 0.6.3-dev-9c61393.0 + resolution: "@agoric/notifier@npm:0.6.3-dev-9c61393.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/vat-data": "npm:0.5.3-dev-9c61393.0+9c61393" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/9e28ffad908521f8289afde305248ec93d386b631f0e9271ee64bf56940c67bfbc25cb874ce1aeb9177155331a27663ae1c45eb41bd82a2258a7b68e5953523c + languageName: node + linkType: hard + +"@agoric/smart-wallet@npm:0.5.4-dev-9c61393.0+9c61393": + version: 0.5.4-dev-9c61393.0 + resolution: "@agoric/smart-wallet@npm:0.5.4-dev-9c61393.0" + dependencies: + "@agoric/ertp": "npm:0.16.3-dev-9c61393.0+9c61393" + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/notifier": "npm:0.6.3-dev-9c61393.0+9c61393" + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@agoric/vat-data": "npm:0.5.3-dev-9c61393.0+9c61393" + "@agoric/vats": "npm:0.15.2-dev-9c61393.0+9c61393" + "@agoric/vow": "npm:0.1.1-dev-9c61393.0+9c61393" + "@agoric/zoe": "npm:0.26.3-dev-9c61393.0+9c61393" + "@agoric/zone": "npm:0.2.3-dev-9c61393.0+9c61393" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/2f197adcc84f5dbc32347e2d6e4c4b5626141c283a77793e33fd1562d412034c01d4f3c0110649dc05db843cc404a96213b2f96ee79cef21ee3ee56eb825453d + languageName: node + linkType: hard + +"@agoric/store@npm:0.9.3-dev-9c61393.0+9c61393": + version: 0.9.3-dev-9c61393.0 + resolution: "@agoric/store@npm:0.9.3-dev-9c61393.0" + dependencies: + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/3772d5502c47734edc27b7cc64ccf890fcaf3130c21804140b45e7d227dafb83ee1028dc02dff84ad0e14b3155bed1548e0852606dbde9bf414ab699ccadc504 + languageName: node + linkType: hard + +"@agoric/swing-store@npm:0.9.2-dev-9c61393.0+9c61393": + version: 0.9.2-dev-9c61393.0 + resolution: "@agoric/swing-store@npm:0.9.2-dev-9c61393.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@endo/base64": "npm:^1.0.9" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/check-bundle": "npm:^1.0.12" + "@endo/errors": "npm:^1.2.8" + "@endo/nat": "npm:^5.0.13" + better-sqlite3: "npm:^9.1.1" + checksum: 10c0/422c32d0efd6f053292d8207cc58a989da314ec613a333b6c8a5b415d9bb3df9adeb0c9b7864ff1b8995c53cbb1d1a9552cf1041b27a7a7f1992084014b20dc6 + languageName: node + linkType: hard + +"@agoric/swingset-liveslots@npm:0.10.3-dev-9c61393.0+9c61393": + version: 0.10.3-dev-9c61393.0 + resolution: "@agoric/swingset-liveslots@npm:0.10.3-dev-9c61393.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@endo/env-options": "npm:^1.1.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/576708817e95f8de695b0e7dfdc09d099b51aa71e708e485f4a324f9fdeacfff395057e0a1180711471c0d32d6c5cd46d84316f535654b32192b7e3f5338937d + languageName: node + linkType: hard + +"@agoric/swingset-vat@npm:0.32.3-dev-9c61393.0+9c61393": + version: 0.32.3-dev-9c61393.0 + resolution: "@agoric/swingset-vat@npm:0.32.3-dev-9c61393.0" + dependencies: + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/kmarshal": "npm:0.1.1-dev-9c61393.0+9c61393" + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@agoric/swing-store": "npm:0.9.2-dev-9c61393.0+9c61393" + "@agoric/swingset-liveslots": "npm:0.10.3-dev-9c61393.0+9c61393" + "@agoric/swingset-xsnap-supervisor": "npm:0.10.3-dev-9c61393.0+9c61393" + "@agoric/time": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/vat-data": "npm:0.5.3-dev-9c61393.0+9c61393" + "@agoric/xsnap-lockdown": "npm:0.14.1-dev-9c61393.0+9c61393" + "@endo/base64": "npm:^1.0.9" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/captp": "npm:^4.4.3" + "@endo/check-bundle": "npm:^1.0.12" + "@endo/compartment-mapper": "npm:^1.4.0" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/import-bundle": "npm:^1.3.2" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + "@endo/ses-ava": "npm:^1.2.8" + "@endo/stream": "npm:^1.2.8" + "@endo/zip": "npm:^1.0.9" + ansi-styles: "npm:^6.2.1" + anylogger: "npm:^0.21.0" + better-sqlite3: "npm:^9.1.1" + import-meta-resolve: "npm:^2.2.1" + microtime: "npm:^3.1.0" + semver: "npm:^6.3.0" + tmp: "npm:^0.2.1" + yargs-parser: "npm:^21.1.1" + peerDependencies: + "@agoric/xsnap": ^0.14.2 + ava: ^5.3.0 + bin: + vat: bin/vat + checksum: 10c0/64cc1dd51a40f7617a793b141dec9b8c4ea006b594e86691f06a859b163cb58ee289e11c4e8666faaa5c48b129b69ae4d0d86f561b861f06501c3ed838c125c0 + languageName: node + linkType: hard + +"@agoric/swingset-xsnap-supervisor@npm:0.10.3-dev-9c61393.0+9c61393": + version: 0.10.3-dev-9c61393.0 + resolution: "@agoric/swingset-xsnap-supervisor@npm:0.10.3-dev-9c61393.0" + checksum: 10c0/9710fbb28e35949b786835ecbcc4179853a968b0bb63a759213450993c1ca69d08b4cbdf3745c0710640b42d7790ea9984cec4ae2dc0631c1327b6019bb5c134 + languageName: node + linkType: hard + +"@agoric/synthetic-chain@npm:^0.4.3": + version: 0.4.3 + resolution: "@agoric/synthetic-chain@npm:0.4.3" dependencies: "@endo/zip": "npm:^1.0.7" better-sqlite3: "npm:^9.6.0" @@ -16,14 +327,669 @@ __metadata: execa: "npm:^9.3.1" bin: synthetic-chain: dist/cli/cli.js - checksum: 10c0/17c6241bdc48b8a2a7608c9d4d7c0a0c76fb10d4ee44a31a1150104a792bcd1133f4b1a7e8ab26673a07450b3ceabccd9911999117568221b49221b6ee4306a1 + checksum: 10c0/b904b531bf2d4066322e4b86b7653fa4fd88d52cce86d82d82ebaecedd526a83832488e1f82b5d0ece23cf5b13fa6bf4e49b4c25339a3c17a658c1302ef9321b languageName: node linkType: hard -"@endo/zip@npm:^1.0.7": - version: 1.0.8 - resolution: "@endo/zip@npm:1.0.8" - checksum: 10c0/bb74862121932cd27eef59326325c4b61671ce0962033a2ad18e6d6978a9e94bfe604dbfa8c0b039a38fa7eefc495e6a69c583c0e75929cd267979b2c65b775b +"@agoric/time@npm:0.3.3-dev-9c61393.0+9c61393": + version: 0.3.3-dev-9c61393.0 + resolution: "@agoric/time@npm:0.3.3-dev-9c61393.0" + dependencies: + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@endo/errors": "npm:^1.2.8" + "@endo/nat": "npm:^5.0.13" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/9c89e51041829351c9698b96f624362d3712d2c959780db1a3d5ce29d45f83077fba192b8157da4055e1832f269799e7c621ad0d526ce16b7be254004b5116cb + languageName: node + linkType: hard + +"@agoric/vat-data@npm:0.5.3-dev-9c61393.0+9c61393": + version: 0.5.3-dev-9c61393.0 + resolution: "@agoric/vat-data@npm:0.5.3-dev-9c61393.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-9c61393.0+9c61393" + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@agoric/swingset-liveslots": "npm:0.10.3-dev-9c61393.0+9c61393" + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/ba27f0acd8c148279067dd47755776a70a26d88b5e45e0675e5e23da610626b6c5169f057591c6992a7744d8ee05f7fd230fc6c20665da34502f5c787648f209 + languageName: node + linkType: hard + +"@agoric/vats@npm:0.15.2-dev-9c61393.0+9c61393": + version: 0.15.2-dev-9c61393.0 + resolution: "@agoric/vats@npm:0.15.2-dev-9c61393.0" + dependencies: + "@agoric/cosmic-proto": "npm:0.4.1-dev-9c61393.0+9c61393" + "@agoric/ertp": "npm:0.16.3-dev-9c61393.0+9c61393" + "@agoric/governance": "npm:0.10.4-dev-9c61393.0+9c61393" + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/network": "npm:0.1.1-dev-9c61393.0+9c61393" + "@agoric/notifier": "npm:0.6.3-dev-9c61393.0+9c61393" + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@agoric/swingset-vat": "npm:0.32.3-dev-9c61393.0+9c61393" + "@agoric/time": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/vat-data": "npm:0.5.3-dev-9c61393.0+9c61393" + "@agoric/vow": "npm:0.1.1-dev-9c61393.0+9c61393" + "@agoric/zoe": "npm:0.26.3-dev-9c61393.0+9c61393" + "@agoric/zone": "npm:0.2.3-dev-9c61393.0+9c61393" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/import-bundle": "npm:^1.3.2" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + import-meta-resolve: "npm:^2.2.1" + jessie.js: "npm:^0.3.4" + checksum: 10c0/e96d1c83c0b6907c69c0f85e87e3b477b50eba49f4d76db98cb4e7f605938f275e3830a5992c057882d12faa54f983ac63ad02e3e6c05d2ef2c9d3b2839caa09 + languageName: node + linkType: hard + +"@agoric/vow@npm:0.1.1-dev-9c61393.0+9c61393": + version: 0.1.1-dev-9c61393.0 + resolution: "@agoric/vow@npm:0.1.1-dev-9c61393.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-9c61393.0+9c61393" + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@endo/env-options": "npm:^1.1.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/7ad19095660f8312224b2a19e892d296da292e66146f3aab8127fdaf6e2ec999958401b5e8052b465e8eb97ff49a0db9f4db9aa445abbd8a51bc9a1216036f57 + languageName: node + linkType: hard + +"@agoric/xsnap-lockdown@npm:0.14.1-dev-9c61393.0+9c61393": + version: 0.14.1-dev-9c61393.0 + resolution: "@agoric/xsnap-lockdown@npm:0.14.1-dev-9c61393.0" + checksum: 10c0/f53416887d03a9b96586d96ac47917a898613722a99b6a1f9cb74712f788fd077d0f9530169b46bc40b40ec68fd001446561260799dc1d65a57eb08144069913 + languageName: node + linkType: hard + +"@agoric/zoe@npm:0.26.3-dev-9c61393.0+9c61393": + version: 0.26.3-dev-9c61393.0 + resolution: "@agoric/zoe@npm:0.26.3-dev-9c61393.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-9c61393.0+9c61393" + "@agoric/ertp": "npm:0.16.3-dev-9c61393.0+9c61393" + "@agoric/internal": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/notifier": "npm:0.6.3-dev-9c61393.0+9c61393" + "@agoric/store": "npm:0.9.3-dev-9c61393.0+9c61393" + "@agoric/swingset-liveslots": "npm:0.10.3-dev-9c61393.0+9c61393" + "@agoric/swingset-vat": "npm:0.32.3-dev-9c61393.0+9c61393" + "@agoric/time": "npm:0.3.3-dev-9c61393.0+9c61393" + "@agoric/vat-data": "npm:0.5.3-dev-9c61393.0+9c61393" + "@agoric/vow": "npm:0.1.1-dev-9c61393.0+9c61393" + "@agoric/zone": "npm:0.2.3-dev-9c61393.0+9c61393" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/captp": "npm:^4.4.3" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/far": "npm:^1.1.9" + "@endo/import-bundle": "npm:^1.3.2" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + yargs-parser: "npm:^21.1.1" + checksum: 10c0/945a3480ca196bf94552c63c37dba97eea5d8cb21e5f9aed4a6d8a6b627a07b83cc2ee0e8ebaa735e3b73e90a1dc1c645d06b89e61f62cc4e838f77ee2ce3e80 + languageName: node + linkType: hard + +"@agoric/zone@npm:0.2.3-dev-9c61393.0+9c61393": + version: 0.2.3-dev-9c61393.0 + resolution: "@agoric/zone@npm:0.2.3-dev-9c61393.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-9c61393.0+9c61393" + "@agoric/vat-data": "npm:0.5.3-dev-9c61393.0+9c61393" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" + checksum: 10c0/a3434bf4b2d8be2d2325af3a19fde83b06fdb6b6922e5ec1cf3355ffc15a79a9a4ee6c6968349d92f039808ab521dc7ec20830cc34d2356c5771d9f69c5e3e20 + languageName: node + linkType: hard + +"@babel/code-frame@npm:^7.25.9": + version: 7.26.2 + resolution: "@babel/code-frame@npm:7.26.2" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.25.9" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10c0/7d79621a6849183c415486af99b1a20b84737e8c11cd55b6544f688c51ce1fd710e6d869c3dd21232023da272a79b91efb3e83b5bc2dc65c1187c5fcd1b72ea8 + languageName: node + linkType: hard + +"@babel/generator@npm:^7.25.9": + version: 7.26.2 + resolution: "@babel/generator@npm:7.26.2" + dependencies: + "@babel/parser": "npm:^7.26.2" + "@babel/types": "npm:^7.26.0" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^3.0.2" + checksum: 10c0/167ebce8977142f5012fad6bd91da51ac52bcd752f2261a54b7ab605d928aebe57e21636cdd2a9c7757e552652c68d9fcb5d40b06fcb66e02d9ee7526e118a5c + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-string-parser@npm:7.25.9" + checksum: 10c0/7244b45d8e65f6b4338a6a68a8556f2cb161b782343e97281a5f2b9b93e420cad0d9f5773a59d79f61d0c448913d06f6a2358a87f2e203cf112e3c5b53522ee6 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-identifier@npm:7.25.9" + checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d + languageName: node + linkType: hard + +"@babel/parser@npm:^7.23.6, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.2": + version: 7.26.2 + resolution: "@babel/parser@npm:7.26.2" + dependencies: + "@babel/types": "npm:^7.26.0" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/751a743087b3a9172a7599f1421830d44c38f065ef781588d2bfb1c98f9b461719a226feb13c868d7a284783eee120c88ea522593118f2668f46ebfb1105c4d7 + languageName: node + linkType: hard + +"@babel/template@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/template@npm:7.25.9" + dependencies: + "@babel/code-frame": "npm:^7.25.9" + "@babel/parser": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10c0/ebe677273f96a36c92cc15b7aa7b11cc8bc8a3bb7a01d55b2125baca8f19cae94ff3ce15f1b1880fb8437f3a690d9f89d4e91f16fc1dc4d3eb66226d128983ab + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.23.6": + version: 7.25.9 + resolution: "@babel/traverse@npm:7.25.9" + dependencies: + "@babel/code-frame": "npm:^7.25.9" + "@babel/generator": "npm:^7.25.9" + "@babel/parser": "npm:^7.25.9" + "@babel/template": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10c0/e90be586a714da4adb80e6cb6a3c5cfcaa9b28148abdafb065e34cc109676fc3db22cf98cd2b2fff66ffb9b50c0ef882cab0f466b6844be0f6c637b82719bba1 + languageName: node + linkType: hard + +"@babel/types@npm:^7.17.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/types@npm:7.26.0" + dependencies: + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10c0/b694f41ad1597127e16024d766c33a641508aad037abd08d0d1f73af753e1119fa03b4a107d04b5f92cc19c095a594660547ae9bead1db2299212d644b0a5cb8 + languageName: node + linkType: hard + +"@confio/ics23@npm:^0.6.8": + version: 0.6.8 + resolution: "@confio/ics23@npm:0.6.8" + dependencies: + "@noble/hashes": "npm:^1.0.0" + protobufjs: "npm:^6.8.8" + checksum: 10c0/2f3f5032cd6a34c9b2fbd64bbf7e1cdec75ca71f348a770f7b5474b5027b12202bfbcd404eca931efddb5901f769af035a87cb8bddbf3f23d7e5d93c9d3d7f6f + languageName: node + linkType: hard + +"@cosmjs/amino@npm:^0.32.4": + version: 0.32.4 + resolution: "@cosmjs/amino@npm:0.32.4" + dependencies: + "@cosmjs/crypto": "npm:^0.32.4" + "@cosmjs/encoding": "npm:^0.32.4" + "@cosmjs/math": "npm:^0.32.4" + "@cosmjs/utils": "npm:^0.32.4" + checksum: 10c0/cd8e215b0406f5c7b73ab0a21106d06b6f76b1da12f1ab7b612884e1dd8bc626966dc67d4e7580090ade131546cbec70000f854e6596935299d054b788929a7e + languageName: node + linkType: hard + +"@cosmjs/crypto@npm:^0.32.4": + version: 0.32.4 + resolution: "@cosmjs/crypto@npm:0.32.4" + dependencies: + "@cosmjs/encoding": "npm:^0.32.4" + "@cosmjs/math": "npm:^0.32.4" + "@cosmjs/utils": "npm:^0.32.4" + "@noble/hashes": "npm:^1" + bn.js: "npm:^5.2.0" + elliptic: "npm:^6.5.4" + libsodium-wrappers-sumo: "npm:^0.7.11" + checksum: 10c0/94e742285eb8c7c5393055ba0635f10c06bf87710e953aedc71e3edc2b8e21a12a0d9b5e8eff37e326765f57c9eb3c7fd358f24f639efad4f1a6624eb8189534 + languageName: node + linkType: hard + +"@cosmjs/encoding@npm:^0.32.3, @cosmjs/encoding@npm:^0.32.4": + version: 0.32.4 + resolution: "@cosmjs/encoding@npm:0.32.4" + dependencies: + base64-js: "npm:^1.3.0" + bech32: "npm:^1.1.4" + readonly-date: "npm:^1.0.0" + checksum: 10c0/4a30d5ae1a2d1247d44bda46101ce208c7666d8801ca9a33de94edc35cc22460c16b4834ec84d5a65ffef5e2a4b58605e0a0a056c46bc0a042979ec84acf20cd + languageName: node + linkType: hard + +"@cosmjs/json-rpc@npm:^0.32.4": + version: 0.32.4 + resolution: "@cosmjs/json-rpc@npm:0.32.4" + dependencies: + "@cosmjs/stream": "npm:^0.32.4" + xstream: "npm:^11.14.0" + checksum: 10c0/b3ebd240f4fb21260e284d2e503ecc61bac898842187ab717f0efb9a5f21272f161f267cc145629caeb9735f80946844384e2bd410275a4744147a44518c0fa0 + languageName: node + linkType: hard + +"@cosmjs/math@npm:^0.32.4": + version: 0.32.4 + resolution: "@cosmjs/math@npm:0.32.4" + dependencies: + bn.js: "npm:^5.2.0" + checksum: 10c0/91e47015be5634d27d71d14c5a05899fb4992b69db02cab1558376dedf8254f96d5e24f097c5601804ae18ed33c7c25d023653ac2bf9d20250fd3e5637f6b101 + languageName: node + linkType: hard + +"@cosmjs/proto-signing@npm:^0.32.3, @cosmjs/proto-signing@npm:^0.32.4": + version: 0.32.4 + resolution: "@cosmjs/proto-signing@npm:0.32.4" + dependencies: + "@cosmjs/amino": "npm:^0.32.4" + "@cosmjs/crypto": "npm:^0.32.4" + "@cosmjs/encoding": "npm:^0.32.4" + "@cosmjs/math": "npm:^0.32.4" + "@cosmjs/utils": "npm:^0.32.4" + cosmjs-types: "npm:^0.9.0" + checksum: 10c0/6915059d2e6dbe1abda4a747c3b1abd47a9eff4f8cb2cf9a5545f939b656b4a15bbde2bfc1364357f9b2a081a066280c3b469f6d13dd5fc51b429b0f90a54913 + languageName: node + linkType: hard + +"@cosmjs/socket@npm:^0.32.4": + version: 0.32.4 + resolution: "@cosmjs/socket@npm:0.32.4" + dependencies: + "@cosmjs/stream": "npm:^0.32.4" + isomorphic-ws: "npm:^4.0.1" + ws: "npm:^7" + xstream: "npm:^11.14.0" + checksum: 10c0/2d94c1fb39016bea3c7c145f4565c8a0fed20c805ac569ea604cd3646c15147b82b8db18a4e3c832d6ae0c3dd14363d4db3d91bcacac922679efba164ed49386 + languageName: node + linkType: hard + +"@cosmjs/stargate@npm:^0.32.3": + version: 0.32.4 + resolution: "@cosmjs/stargate@npm:0.32.4" + dependencies: + "@confio/ics23": "npm:^0.6.8" + "@cosmjs/amino": "npm:^0.32.4" + "@cosmjs/encoding": "npm:^0.32.4" + "@cosmjs/math": "npm:^0.32.4" + "@cosmjs/proto-signing": "npm:^0.32.4" + "@cosmjs/stream": "npm:^0.32.4" + "@cosmjs/tendermint-rpc": "npm:^0.32.4" + "@cosmjs/utils": "npm:^0.32.4" + cosmjs-types: "npm:^0.9.0" + xstream: "npm:^11.14.0" + checksum: 10c0/c30a3519516aaa7eae58ba827c80fcf74c7fe7a9d3aa5cc8138c3a2768f5f241f59c2f5cec27e9037b4df12b1c6605b4fac9eadb4de97bd84edddc3a80a02e24 + languageName: node + linkType: hard + +"@cosmjs/stream@npm:^0.32.4": + version: 0.32.4 + resolution: "@cosmjs/stream@npm:0.32.4" + dependencies: + xstream: "npm:^11.14.0" + checksum: 10c0/c677c53f9101c2a36fa03a475d92dea2fa69c475f896751b5e18a5d07087eeecbf6bca2e62a8940003da53fa235a9b2dd78c8257bf19c3f96e3f69fa8d5f183d + languageName: node + linkType: hard + +"@cosmjs/tendermint-rpc@npm:^0.32.3, @cosmjs/tendermint-rpc@npm:^0.32.4": + version: 0.32.4 + resolution: "@cosmjs/tendermint-rpc@npm:0.32.4" + dependencies: + "@cosmjs/crypto": "npm:^0.32.4" + "@cosmjs/encoding": "npm:^0.32.4" + "@cosmjs/json-rpc": "npm:^0.32.4" + "@cosmjs/math": "npm:^0.32.4" + "@cosmjs/socket": "npm:^0.32.4" + "@cosmjs/stream": "npm:^0.32.4" + "@cosmjs/utils": "npm:^0.32.4" + axios: "npm:^1.6.0" + readonly-date: "npm:^1.0.0" + xstream: "npm:^11.14.0" + checksum: 10c0/5fae7afcdf98cc7dd36922aa1586254cc8c202cf8fe66804e61d793d31dcff816f40d33f7a0eb72c1b9226c7c361d4848e4ff12d0489f6fa66f47f0c86ae18dd + languageName: node + linkType: hard + +"@cosmjs/utils@npm:^0.32.4": + version: 0.32.4 + resolution: "@cosmjs/utils@npm:0.32.4" + checksum: 10c0/d5ff8b235094be1150853a715116049f73eb5cdfeea8ce8e22ecccc61ec99792db457404d4307782b1a2f935dcf438f5c485beabfcfbc1dc5df26eb6e6da9062 + languageName: node + linkType: hard + +"@endo/base64@npm:^1.0.9": + version: 1.0.9 + resolution: "@endo/base64@npm:1.0.9" + checksum: 10c0/63e487cf59b50a080fab389a8ab24d66264910ecf375dc19677c2ee7421d92a4be9c85e435b216b4adc9983384073a7eb753223f85ba77aec8d9fd3e0c1fe090 + languageName: node + linkType: hard + +"@endo/bundle-source@npm:^3.5.0": + version: 3.5.0 + resolution: "@endo/bundle-source@npm:3.5.0" + dependencies: + "@endo/base64": "npm:^1.0.9" + "@endo/compartment-mapper": "npm:^1.4.0" + "@endo/evasive-transform": "npm:^1.3.3" + "@endo/init": "npm:^1.1.7" + "@endo/promise-kit": "npm:^1.1.8" + "@endo/where": "npm:^1.0.9" + "@rollup/plugin-commonjs": "npm:^19.0.0" + "@rollup/plugin-json": "npm:^6.1.0" + "@rollup/plugin-node-resolve": "npm:^13.0.0" + acorn: "npm:^8.2.4" + rollup: "npm:^2.79.1" + ts-blank-space: "npm:^0.4.1" + bin: + bundle-source: ./src/tool.js + checksum: 10c0/7f97194c97eb28abbde6655f7de4410d5aae5d6a2a3d712e1418b9b4fd20823333b7fe8956401c2f201280340731e51e28d9c4fbe3b5a787b0abd00e3ac13b52 + languageName: node + linkType: hard + +"@endo/captp@npm:^4.4.3": + version: 4.4.3 + resolution: "@endo/captp@npm:4.4.3" + dependencies: + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/0647dd6acc39c7a54a42d9f168861d11dc28248321be72529dd8574b52989957be8f7a5ec9985fc76a24b37cd6b6d190e5bfbbc1481594e367c8517c31fce0e2 + languageName: node + linkType: hard + +"@endo/check-bundle@npm:^1.0.12": + version: 1.0.12 + resolution: "@endo/check-bundle@npm:1.0.12" + dependencies: + "@endo/base64": "npm:^1.0.9" + "@endo/compartment-mapper": "npm:^1.4.0" + "@endo/errors": "npm:^1.2.8" + checksum: 10c0/73e146d9d4d5ee23936b0df368e51ebb3658eecc5efe308a1894f70339502e6de8fa065185e8518d1445bf8fbc4c5fae54fc7dab8794f02397f6694a7ab9af9c + languageName: node + linkType: hard + +"@endo/cjs-module-analyzer@npm:^1.0.9": + version: 1.0.9 + resolution: "@endo/cjs-module-analyzer@npm:1.0.9" + checksum: 10c0/cb8c56d108b175f2f211c8292bac6cda35c44b9c16fb2763ab9a32b545895e1721633938b440bfe7a06f69e1f168e9b248ef103631a1d4c63fda8cbe580ca185 + languageName: node + linkType: hard + +"@endo/common@npm:^1.2.8": + version: 1.2.8 + resolution: "@endo/common@npm:1.2.8" + dependencies: + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/c9465721095d9f06278b6550909a02c330c7a69223f11aff29759067586d41b86054127639fa2c2c0345d0d0aa43518e5b72d5c547b67bfe8e802cd21756d87b + languageName: node + linkType: hard + +"@endo/compartment-mapper@npm:^1.4.0": + version: 1.4.0 + resolution: "@endo/compartment-mapper@npm:1.4.0" + dependencies: + "@endo/cjs-module-analyzer": "npm:^1.0.9" + "@endo/module-source": "npm:^1.1.2" + "@endo/trampoline": "npm:^1.0.3" + "@endo/zip": "npm:^1.0.9" + ses: "npm:^1.10.0" + checksum: 10c0/2c4999962016f57c0f3a40ce1445a064b826eb101a972d26ba56d9dba6d3d8f66744912e3f7e24754018bd2c633663a00ea5ab0d7658c4907c9372ddd3e56464 + languageName: node + linkType: hard + +"@endo/env-options@npm:^1.1.8": + version: 1.1.8 + resolution: "@endo/env-options@npm:1.1.8" + checksum: 10c0/2f519f48a5b966dbd9e66134d4abc89ff02b9791d21146b49031ceb694584f3f41c6119125b6bb4eb0d347f5bcd846473b5f3c4ae6bae3dac19402fcaf522520 + languageName: node + linkType: hard + +"@endo/errors@npm:^1.2.8": + version: 1.2.8 + resolution: "@endo/errors@npm:1.2.8" + dependencies: + ses: "npm:^1.10.0" + checksum: 10c0/3f33fc7119ab840ad0f5bdfb70e73cc99630f09593c31928e30de4d9c8e898c85397c5170964d54c819a757a74d3b005f6275480ff8d0f1aa2aa8ef872852e97 + languageName: node + linkType: hard + +"@endo/evasive-transform@npm:^1.3.3": + version: 1.3.3 + resolution: "@endo/evasive-transform@npm:1.3.3" + dependencies: + "@agoric/babel-generator": "npm:^7.17.6" + "@babel/parser": "npm:^7.23.6" + "@babel/traverse": "npm:^7.23.6" + source-map-js: "npm:^1.2.0" + checksum: 10c0/34fae4789ab3142ab73a5c94a46954908737bbc72f1e302c338941ca2556ab2127505ecee57a1c0d11e0b9c7070b4a579ce4e7e60585990161cec64ce0955211 + languageName: node + linkType: hard + +"@endo/eventual-send@npm:^1.2.8": + version: 1.2.8 + resolution: "@endo/eventual-send@npm:1.2.8" + dependencies: + "@endo/env-options": "npm:^1.1.8" + checksum: 10c0/d7c16c935441b67d029fcb6785f425a1194fb7f936e4b20dde21eb393266cb7366edf7a95d3fdfa96cd4a3246a3659a06d0dbb3c1217045e1718e1cf34c7a3bd + languageName: node + linkType: hard + +"@endo/exo@npm:^1.5.7": + version: 1.5.7 + resolution: "@endo/exo@npm:1.5.7" + dependencies: + "@endo/common": "npm:^1.2.8" + "@endo/env-options": "npm:^1.1.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/0193de0606a7f07f207f3dd8bb71ec6be0acfb0ff5ef570f03cbbcaed888db68e451082c34764de8ee301f8d2d175e6c5a5405e76367c27151d644536bdf57a4 + languageName: node + linkType: hard + +"@endo/far@npm:^1.0.0, @endo/far@npm:^1.1.9": + version: 1.1.9 + resolution: "@endo/far@npm:1.1.9" + dependencies: + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/pass-style": "npm:^1.4.7" + checksum: 10c0/e0d95743c25183b961aa1f11dd81c067739fd2fb3deeab58520e949961eacba9ed109bb01b9ed820d596e8a043b6721d650d9624abf0263296cca647e7286a2e + languageName: node + linkType: hard + +"@endo/import-bundle@npm:^1.3.2": + version: 1.3.2 + resolution: "@endo/import-bundle@npm:1.3.2" + dependencies: + "@endo/base64": "npm:^1.0.9" + "@endo/compartment-mapper": "npm:^1.4.0" + "@endo/errors": "npm:^1.2.8" + "@endo/where": "npm:^1.0.9" + ses: "npm:^1.10.0" + checksum: 10c0/cc38bb7858c4b3a3d1cfbf70b0af3b05b527019452eb922313b4adf87e5590f5cacf4ff5dbd7a44c172d3c220de41edc3fa8895551f76071c85f1450ff94b09a + languageName: node + linkType: hard + +"@endo/init@npm:^1.1.7": + version: 1.1.7 + resolution: "@endo/init@npm:1.1.7" + dependencies: + "@endo/base64": "npm:^1.0.9" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/lockdown": "npm:^1.0.13" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/6cfcc244f02da9883f65a8f34da9483a628d5350192983c53d5116b12403dc5693145c6349b6c3ca381b6b8d9590cee16f90440dc0e2da5f525e13079d6c9a2f + languageName: node + linkType: hard + +"@endo/lockdown@npm:^1.0.13": + version: 1.0.13 + resolution: "@endo/lockdown@npm:1.0.13" + dependencies: + ses: "npm:^1.10.0" + checksum: 10c0/9df04cc477595b368088a1d445f2241d8a152cb4dcf6a79d39d4804594dd8ff472380ab2bdf262adeb5b4b7cfc73effb6cc716c5a3aeca282801d57fe8a018a0 + languageName: node + linkType: hard + +"@endo/marshal@npm:^1.6.2": + version: 1.6.2 + resolution: "@endo/marshal@npm:1.6.2" + dependencies: + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/bdb634a77c2147c1359792531822aabe642a5e4d39f496dd57bb97367617a2f2d72edaaa50c51ed6a2ec1f2c08deab6a571c3dd8ffa260d441d25f53606902b1 + languageName: node + linkType: hard + +"@endo/module-source@npm:^1.1.2": + version: 1.1.2 + resolution: "@endo/module-source@npm:1.1.2" + dependencies: + "@agoric/babel-generator": "npm:^7.17.6" + "@babel/parser": "npm:^7.23.6" + "@babel/traverse": "npm:^7.23.6" + "@babel/types": "npm:^7.24.0" + ses: "npm:^1.10.0" + checksum: 10c0/3d64ff5430f288531a00e124ae0620e137dab0fdaba00f2d41066b8307eb2da30e3987d84fe450d55d844e0f96feafa36a825cecc615c05d96224a209832c95c + languageName: node + linkType: hard + +"@endo/nat@npm:^5.0.13": + version: 5.0.13 + resolution: "@endo/nat@npm:5.0.13" + checksum: 10c0/78578de4567c9bc4c6f50638c688886c07c38177a8d44192230d344221da06ccffc6d9ef8d423e27198d864ed7c57ef5ced9b1d05922eaa4e40bf82856b1aa11 + languageName: node + linkType: hard + +"@endo/pass-style@npm:^1.4.7": + version: 1.4.7 + resolution: "@endo/pass-style@npm:1.4.7" + dependencies: + "@endo/env-options": "npm:^1.1.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/promise-kit": "npm:^1.1.8" + "@fast-check/ava": "npm:^1.1.5" + checksum: 10c0/ee30e011fb08c292718a315f2ebd5ee2da6d918bf2cdaf2b269e123207c642fa1525493c41180db8c941e1a1959369730114b116656c99e8bb107ca5917f3f4e + languageName: node + linkType: hard + +"@endo/patterns@npm:^1.4.7": + version: 1.4.7 + resolution: "@endo/patterns@npm:1.4.7" + dependencies: + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/marshal": "npm:^1.6.2" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/358720438a019847406dfad9f23fc9b565c955ffd86d75693cea994c492dd46efaf189502f04b04f8870e6d50ffcb44ffa1e1dd3a0d6b2dfbbe57edeb994b83b + languageName: node + linkType: hard + +"@endo/promise-kit@npm:^1.1.8": + version: 1.1.8 + resolution: "@endo/promise-kit@npm:1.1.8" + dependencies: + ses: "npm:^1.10.0" + checksum: 10c0/3a51755822bd4112474bec584005b81f9ffe6a6b590faa16cff7a4994010d001d6d190f58a1e890d85b0feb0eb052d79ed2c5ed88977afb0e47ca53b6b199196 + languageName: node + linkType: hard + +"@endo/ses-ava@npm:^1.2.8": + version: 1.2.8 + resolution: "@endo/ses-ava@npm:1.2.8" + dependencies: + "@endo/env-options": "npm:^1.1.8" + "@endo/init": "npm:^1.1.7" + ses: "npm:^1.10.0" + peerDependencies: + ava: ^5.3.0 || ^6.1.2 + checksum: 10c0/c1ef65d182f3bfa1ec0d5d0434da9d28bb0925f485629fcd5c42dc89db99e65a5b44e352e1fd2a577778b2905d6f36b009e4f2953aa0257ec1b049019e37b2cf + languageName: node + linkType: hard + +"@endo/stream@npm:^1.2.8": + version: 1.2.8 + resolution: "@endo/stream@npm:1.2.8" + dependencies: + "@endo/eventual-send": "npm:^1.2.8" + "@endo/promise-kit": "npm:^1.1.8" + ses: "npm:^1.10.0" + checksum: 10c0/f435f7650020b32c10bb4cb139910b363b4d4f22bcf9e7a659d3d2eae694a3ea43c3af49c80370760a573370429e5fbe1619dec631251578d4c5eba9ff161613 + languageName: node + linkType: hard + +"@endo/trampoline@npm:^1.0.3": + version: 1.0.3 + resolution: "@endo/trampoline@npm:1.0.3" + checksum: 10c0/be0c3784b17f422ae04e28a6722e2abd193a5585a82acf5eb388476094c026aa5e76a383db887bdf6a032ccf0a12c38a967f5f1e71cef44a4659606be789b548 + languageName: node + linkType: hard + +"@endo/where@npm:^1.0.9": + version: 1.0.9 + resolution: "@endo/where@npm:1.0.9" + checksum: 10c0/dd8f8fb601fb54e7cef64d7b32f91595d01151acf1e63c46257c905afb75760d80f2eec5d71cfb1f9251e435990256d56f35d6f8b4851f5e6fbe6b393b535028 + languageName: node + linkType: hard + +"@endo/zip@npm:^1.0.7, @endo/zip@npm:^1.0.9": + version: 1.0.9 + resolution: "@endo/zip@npm:1.0.9" + checksum: 10c0/3fccea31bd5dad938a3b5f531454d3c49513892d6d5aba1f0af1034ff0ae54c3e28a346a9df08bd9e5201354acccd631e45c9c0e68fa2848a876a3919f3830dc + languageName: node + linkType: hard + +"@fast-check/ava@npm:^1.1.5": + version: 1.2.1 + resolution: "@fast-check/ava@npm:1.2.1" + dependencies: + fast-check: "npm:^3.0.0" + peerDependencies: + ava: ^4 || ^5 || ^6 + checksum: 10c0/3800098fd7e8098102544a2f7a595351d063a7ebaeca18ed4901df5ec2679da2330ba8c0db2c820721d4cbb3e23d817ba22fec6d058957930e229f44fa71a684 languageName: node linkType: hard @@ -41,6 +1007,55 @@ __metadata: languageName: node linkType: hard +"@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10c0/1be4fd4a6b0f41337c4f5fdf4afc3bd19e39c3691924817108b82ffcb9c9e609c273f936932b9fba4b3a298ce2eb06d9bff4eb1cc3bd81c4f4ee1b4917e25feb + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10c0/d502e6fb516b35032331406d4e962c21fe77cdf1cbdb49c6142bcbd9e30507094b18972778a6e27cbad756209cfe34b1a27729e6fa08a2eb92b33943f680cf1e + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10c0/2a5aa7b4b5c3464c895c802d8ae3f3d2b92fcbe84ad12f8d0bfbb1f5ad006717e7577ee1fd2eac00c088abe486c7adb27976f45d2941ff6b0b92b2c3302c60f4 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 10c0/2eb864f276eb1096c3c11da3e9bb518f6d9fc0023c78344cdc037abadc725172c70314bdb360f2d4b7bffec7f5d657ce006816bc5d4ecb35e61b66132db00c18 + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10c0/3d1ce6ebc69df9682a5a8896b414c6537e428a1d68b02fcc8363b04284a8ca0df04d0ee3013132252ab14f2527bc13bea6526a912ecb5658f0e39fd2860b4df4 + languageName: node + linkType: hard + +"@noble/hashes@npm:^1, @noble/hashes@npm:^1.0.0": + version: 1.5.0 + resolution: "@noble/hashes@npm:1.5.0" + checksum: 10c0/1b46539695fbfe4477c0822d90c881a04d4fa2921c08c552375b444a48cac9930cb1ee68de0a3c7859e676554d0f3771999716606dc4d8f826e414c11692cdd9 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -97,6 +1112,155 @@ __metadata: languageName: node linkType: hard +"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/aspromise@npm:1.1.2" + checksum: 10c0/a83343a468ff5b5ec6bff36fd788a64c839e48a07ff9f4f813564f58caf44d011cd6504ed2147bf34835bd7a7dd2107052af755961c6b098fd8902b4f6500d0f + languageName: node + linkType: hard + +"@protobufjs/base64@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/base64@npm:1.1.2" + checksum: 10c0/eec925e681081af190b8ee231f9bad3101e189abbc182ff279da6b531e7dbd2a56f1f306f37a80b1be9e00aa2d271690d08dcc5f326f71c9eed8546675c8caf6 + languageName: node + linkType: hard + +"@protobufjs/codegen@npm:^2.0.4": + version: 2.0.4 + resolution: "@protobufjs/codegen@npm:2.0.4" + checksum: 10c0/26ae337c5659e41f091606d16465bbcc1df1f37cc1ed462438b1f67be0c1e28dfb2ca9f294f39100c52161aef82edf758c95d6d75650a1ddf31f7ddee1440b43 + languageName: node + linkType: hard + +"@protobufjs/eventemitter@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/eventemitter@npm:1.1.0" + checksum: 10c0/1eb0a75180e5206d1033e4138212a8c7089a3d418c6dfa5a6ce42e593a4ae2e5892c4ef7421f38092badba4040ea6a45f0928869989411001d8c1018ea9a6e70 + languageName: node + linkType: hard + +"@protobufjs/fetch@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/fetch@npm:1.1.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.1" + "@protobufjs/inquire": "npm:^1.1.0" + checksum: 10c0/cda6a3dc2d50a182c5865b160f72077aac197046600091dbb005dd0a66db9cce3c5eaed6d470ac8ed49d7bcbeef6ee5f0bc288db5ff9a70cbd003e5909065233 + languageName: node + linkType: hard + +"@protobufjs/float@npm:^1.0.2": + version: 1.0.2 + resolution: "@protobufjs/float@npm:1.0.2" + checksum: 10c0/18f2bdede76ffcf0170708af15c9c9db6259b771e6b84c51b06df34a9c339dbbeec267d14ce0bddd20acc142b1d980d983d31434398df7f98eb0c94a0eb79069 + languageName: node + linkType: hard + +"@protobufjs/inquire@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/inquire@npm:1.1.0" + checksum: 10c0/64372482efcba1fb4d166a2664a6395fa978b557803857c9c03500e0ac1013eb4b1aacc9ed851dd5fc22f81583670b4f4431bae186f3373fedcfde863ef5921a + languageName: node + linkType: hard + +"@protobufjs/path@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/path@npm:1.1.2" + checksum: 10c0/cece0a938e7f5dfd2fa03f8c14f2f1cf8b0d6e13ac7326ff4c96ea311effd5fb7ae0bba754fbf505312af2e38500250c90e68506b97c02360a43793d88a0d8b4 + languageName: node + linkType: hard + +"@protobufjs/pool@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/pool@npm:1.1.0" + checksum: 10c0/eda2718b7f222ac6e6ad36f758a92ef90d26526026a19f4f17f668f45e0306a5bd734def3f48f51f8134ae0978b6262a5c517c08b115a551756d1a3aadfcf038 + languageName: node + linkType: hard + +"@protobufjs/utf8@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/utf8@npm:1.1.0" + checksum: 10c0/a3fe31fe3fa29aa3349e2e04ee13dc170cc6af7c23d92ad49e3eeaf79b9766264544d3da824dba93b7855bd6a2982fb40032ef40693da98a136d835752beb487 + languageName: node + linkType: hard + +"@rollup/plugin-commonjs@npm:^19.0.0": + version: 19.0.2 + resolution: "@rollup/plugin-commonjs@npm:19.0.2" + dependencies: + "@rollup/pluginutils": "npm:^3.1.0" + commondir: "npm:^1.0.1" + estree-walker: "npm:^2.0.1" + glob: "npm:^7.1.6" + is-reference: "npm:^1.2.1" + magic-string: "npm:^0.25.7" + resolve: "npm:^1.17.0" + peerDependencies: + rollup: ^2.38.3 + checksum: 10c0/9adccf77ad835cbe565da4385212f1e54c3e0dca2be174b5c2cfe89cfaeb240f42c7673e97e49b21b7c66ed901cc1c711552b6727f60b43a953ce996eb2868a7 + languageName: node + linkType: hard + +"@rollup/plugin-json@npm:^6.1.0": + version: 6.1.0 + resolution: "@rollup/plugin-json@npm:6.1.0" + dependencies: + "@rollup/pluginutils": "npm:^5.1.0" + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + checksum: 10c0/9400c431b5e0cf3088ba2eb2d038809a2b0fb2a84ed004997da85582f48cd64958ed3168893c4f2c8109e38652400ed68282d0c92bf8ec07a3b2ef2e1ceab0b7 + languageName: node + linkType: hard + +"@rollup/plugin-node-resolve@npm:^13.0.0": + version: 13.3.0 + resolution: "@rollup/plugin-node-resolve@npm:13.3.0" + dependencies: + "@rollup/pluginutils": "npm:^3.1.0" + "@types/resolve": "npm:1.17.1" + deepmerge: "npm:^4.2.2" + is-builtin-module: "npm:^3.1.0" + is-module: "npm:^1.0.0" + resolve: "npm:^1.19.0" + peerDependencies: + rollup: ^2.42.0 + checksum: 10c0/6caa32a8304a20f1c9953111b25e9543f4de7d254958d81ce0158ad909e4493946bc2060c4ace23d9748b560ebc84c920ee7bc1b7d50dbf8ba852ef13c91af58 + languageName: node + linkType: hard + +"@rollup/pluginutils@npm:^3.1.0": + version: 3.1.0 + resolution: "@rollup/pluginutils@npm:3.1.0" + dependencies: + "@types/estree": "npm:0.0.39" + estree-walker: "npm:^1.0.1" + picomatch: "npm:^2.2.2" + peerDependencies: + rollup: ^1.20.0||^2.0.0 + checksum: 10c0/7151753160d15ba2b259461a6c25b3932150994ea52dba8fd3144f634c7647c2e56733d986e2c15de67c4d96a9ee7d6278efa6d2e626a7169898fd64adc0f90c + languageName: node + linkType: hard + +"@rollup/pluginutils@npm:^5.1.0": + version: 5.1.3 + resolution: "@rollup/pluginutils@npm:5.1.3" + dependencies: + "@types/estree": "npm:^1.0.0" + estree-walker: "npm:^2.0.2" + picomatch: "npm:^4.0.2" + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + checksum: 10c0/ba46ad588733fb01d184ee3bc7a127d626158bc840b5874a94c129ff62689d12f16f537530709c54da6f3b71f67d705c4e09235b1dc9542e9d47ee8f2d0b8b9e + languageName: node + linkType: hard + "@sec-ant/readable-stream@npm:^0.4.1": version: 0.4.1 resolution: "@sec-ant/readable-stream@npm:0.4.1" @@ -111,6 +1275,45 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:*, @types/estree@npm:^1.0.0": + version: 1.0.6 + resolution: "@types/estree@npm:1.0.6" + checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a + languageName: node + linkType: hard + +"@types/estree@npm:0.0.39": + version: 0.0.39 + resolution: "@types/estree@npm:0.0.39" + checksum: 10c0/f0af6c95ac1988c4827964bd9d3b51d24da442e2188943f6dfcb1e1559103d5d024d564b2e9d3f84c53714a02a0a7435c7441138eb63d9af5de4dfc66cdc0d92 + languageName: node + linkType: hard + +"@types/long@npm:^4.0.1": + version: 4.0.2 + resolution: "@types/long@npm:4.0.2" + checksum: 10c0/42ec66ade1f72ff9d143c5a519a65efc7c1c77be7b1ac5455c530ae9acd87baba065542f8847522af2e3ace2cc999f3ad464ef86e6b7352eece34daf88f8c924 + languageName: node + linkType: hard + +"@types/node@npm:*, @types/node@npm:>=13.7.0": + version: 22.9.0 + resolution: "@types/node@npm:22.9.0" + dependencies: + undici-types: "npm:~6.19.8" + checksum: 10c0/3f46cbe0a49bab4ba30494025e4c8a6e699b98ac922857aa1f0209ce11a1313ee46e6808b8f13fe5b8b960a9d7796b77c8d542ad4e9810e85ef897d5593b5d51 + languageName: node + linkType: hard + +"@types/resolve@npm:1.17.1": + version: 1.17.1 + resolution: "@types/resolve@npm:1.17.1" + dependencies: + "@types/node": "npm:*" + checksum: 10c0/6eeb9c27d99bf4b393bf168d43208f63e78cefca5644662a0bdb2bdbf8352386f4f3aca66add138fc41bce5f66fd48a0de430a1473f11b612fbed0375ae78031 + languageName: node + linkType: hard + "abbrev@npm:^2.0.0": version: 2.0.0 resolution: "abbrev@npm:2.0.0" @@ -136,6 +1339,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.2.4": + version: 8.14.0 + resolution: "acorn@npm:8.14.0" + bin: + acorn: bin/acorn + checksum: 10c0/6d4ee461a7734b2f48836ee0fbb752903606e576cc100eb49340295129ca0b452f3ba91ddd4424a1d4406a98adfb2ebb6bd0ff4c49d7a0930c10e462719bbfd7 + languageName: node + linkType: hard + "agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": version: 7.1.1 resolution: "agent-base@npm:7.1.1" @@ -195,6 +1407,13 @@ __metadata: languageName: node linkType: hard +"anylogger@npm:^0.21.0": + version: 0.21.0 + resolution: "anylogger@npm:0.21.0" + checksum: 10c0/1ca7fcf5bc2b78d1e1d9b8c8cc7ce50b5c6cc67a8da5a28c9c975b7b46fff255a04abab02de38a5139190c9d8b34b3d6c59af6724521b077f7d7dfbad9b47a9c + languageName: node + linkType: hard + "anymatch@npm:~3.1.2": version: 3.1.3 resolution: "anymatch@npm:3.1.3" @@ -235,6 +1454,13 @@ __metadata: languageName: node linkType: hard +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: 10c0/d73e2ddf20c4eb9337e1b3df1a0f6159481050a5de457c55b14ea2e5cb6d90bb69e004c9af54737a5ee0917fcf2c9e25de67777bbe58261847846066ba75bc9d + languageName: node + linkType: hard + "ava@npm:^5.3.1": version: 5.3.1 resolution: "ava@npm:5.3.1" @@ -293,6 +1519,17 @@ __metadata: languageName: node linkType: hard +"axios@npm:^1.6.0": + version: 1.7.7 + resolution: "axios@npm:1.7.7" + dependencies: + follow-redirects: "npm:^1.15.6" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: 10c0/4499efc89e86b0b49ffddc018798de05fab26e3bf57913818266be73279a6418c3ce8f9e934c7d2d707ab8c095e837fc6c90608fb7715b94d357720b5f568af7 + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -300,14 +1537,21 @@ __metadata: languageName: node linkType: hard -"base64-js@npm:^1.3.1": +"base64-js@npm:^1.3.0, base64-js@npm:^1.3.1": version: 1.5.1 resolution: "base64-js@npm:1.5.1" checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf languageName: node linkType: hard -"better-sqlite3@npm:^9.6.0": +"bech32@npm:^1.1.4": + version: 1.1.4 + resolution: "bech32@npm:1.1.4" + checksum: 10c0/5f62ca47b8df99ace9c0e0d8deb36a919d91bf40066700aaa9920a45f86bb10eb56d537d559416fd8703aa0fb60dddb642e58f049701e7291df678b2033e5ee5 + languageName: node + linkType: hard + +"better-sqlite3@npm:^9.1.1, better-sqlite3@npm:^9.6.0": version: 9.6.0 resolution: "better-sqlite3@npm:9.6.0" dependencies: @@ -352,6 +1596,30 @@ __metadata: languageName: node linkType: hard +"bn.js@npm:^4.11.9": + version: 4.12.1 + resolution: "bn.js@npm:4.12.1" + checksum: 10c0/b7f37a0cd5e4b79142b6f4292d518b416be34ae55d6dd6b0f66f96550c8083a50ffbbf8bda8d0ab471158cb81aa74ea4ee58fe33c7802e4a30b13810e98df116 + languageName: node + linkType: hard + +"bn.js@npm:^5.2.0": + version: 5.2.1 + resolution: "bn.js@npm:5.2.1" + checksum: 10c0/bed3d8bd34ec89dbcf9f20f88bd7d4a49c160fda3b561c7bb227501f974d3e435a48fb9b61bc3de304acab9215a3bda0803f7017ffb4d0016a0c3a740a283caa + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10c0/695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 + languageName: node + linkType: hard + "brace-expansion@npm:^2.0.1": version: 2.0.1 resolution: "brace-expansion@npm:2.0.1" @@ -370,6 +1638,13 @@ __metadata: languageName: node linkType: hard +"brorand@npm:^1.1.0": + version: 1.1.0 + resolution: "brorand@npm:1.1.0" + checksum: 10c0/6f366d7c4990f82c366e3878492ba9a372a73163c09871e80d82fb4ae0d23f9f8924cb8a662330308206e6b3b76ba1d528b4601c9ef73c2166b440b2ea3b7571 + languageName: node + linkType: hard + "buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" @@ -380,6 +1655,13 @@ __metadata: languageName: node linkType: hard +"builtin-modules@npm:^3.3.0": + version: 3.3.0 + resolution: "builtin-modules@npm:3.3.0" + checksum: 10c0/2cb3448b4f7306dc853632a4fcddc95e8d4e4b9868c139400027b71938fc6806d4ff44007deffb362ac85724bd40c2c6452fb6a0aa4531650eeddb98d8e5ee8a + languageName: node + linkType: hard + "cacache@npm:^18.0.0": version: 18.0.4 resolution: "cacache@npm:18.0.4" @@ -546,6 +1828,15 @@ __metadata: languageName: node linkType: hard +"combined-stream@npm:^1.0.8": + version: 1.0.8 + resolution: "combined-stream@npm:1.0.8" + dependencies: + delayed-stream: "npm:~1.0.0" + checksum: 10c0/0dbb829577e1b1e839fa82b40c07ffaf7de8a09b935cadd355a73652ae70a88b4320db322f6634a4ad93424292fa80973ac6480986247f1734a1137debf271d5 + languageName: node + linkType: hard + "common-path-prefix@npm:^3.0.0": version: 3.0.0 resolution: "common-path-prefix@npm:3.0.0" @@ -553,6 +1844,20 @@ __metadata: languageName: node linkType: hard +"commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 10c0/33a124960e471c25ee19280c9ce31ccc19574b566dc514fe4f4ca4c34fa8b0b57cf437671f5de380e11353ea9426213fca17687dd2ef03134fea2dbc53809fd6 + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10c0/c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f + languageName: node + linkType: hard + "concordance@npm:^5.0.4": version: 5.0.4 resolution: "concordance@npm:5.0.4" @@ -583,7 +1888,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.0": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -594,6 +1899,17 @@ __metadata: languageName: node linkType: hard +"cross-spawn@npm:^7.0.3": + version: 7.0.6 + resolution: "cross-spawn@npm:7.0.6" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 + languageName: node + linkType: hard + "currently-unhandled@npm:^0.4.1": version: 0.4.1 resolution: "currently-unhandled@npm:0.4.1" @@ -612,7 +1928,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:^4.3.1, debug@npm:^4.3.4": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -640,6 +1956,42 @@ __metadata: languageName: node linkType: hard +"deepmerge@npm:^4.2.2": + version: 4.3.1 + resolution: "deepmerge@npm:4.3.1" + checksum: 10c0/e53481aaf1aa2c4082b5342be6b6d8ad9dfe387bc92ce197a66dea08bd4265904a087e75e464f14d1347cf2ac8afe1e4c16b266e0561cc5df29382d3c5f80044 + languageName: node + linkType: hard + +"define-data-property@npm:^1.0.1": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" + dependencies: + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + gopd: "npm:^1.0.1" + checksum: 10c0/dea0606d1483eb9db8d930d4eac62ca0fa16738b0b3e07046cddfacf7d8c868bbe13fa0cb263eb91c7d0d527960dc3f2f2471a69ed7816210307f6744fe62e37 + languageName: node + linkType: hard + +"define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" + dependencies: + define-data-property: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.0" + object-keys: "npm:^1.1.1" + checksum: 10c0/88a152319ffe1396ccc6ded510a3896e77efac7a1bfbaa174a7b00414a1747377e0bb525d303794a47cf30e805c2ec84e575758512c6e44a993076d29fd4e6c3 + languageName: node + linkType: hard + +"delayed-stream@npm:~1.0.0": + version: 1.0.0 + resolution: "delayed-stream@npm:1.0.0" + checksum: 10c0/d758899da03392e6712f042bec80aa293bbe9e9ff1b2634baae6a360113e708b91326594c8a486d475c69d6259afb7efacdc3537bfcda1c6c648e390ce601b19 + languageName: node + linkType: hard + "detect-libc@npm:^2.0.0": version: 2.0.3 resolution: "detect-libc@npm:2.0.3" @@ -663,6 +2015,21 @@ __metadata: languageName: node linkType: hard +"elliptic@npm:^6.5.4": + version: 6.6.1 + resolution: "elliptic@npm:6.6.1" + dependencies: + bn.js: "npm:^4.11.9" + brorand: "npm:^1.1.0" + hash.js: "npm:^1.0.0" + hmac-drbg: "npm:^1.0.1" + inherits: "npm:^2.0.4" + minimalistic-assert: "npm:^1.0.1" + minimalistic-crypto-utils: "npm:^1.0.1" + checksum: 10c0/8b24ef782eec8b472053793ea1e91ae6bee41afffdfcb78a81c0a53b191e715cbe1292aa07165958a9bbe675bd0955142560b1a007ffce7d6c765bcaf951a867 + languageName: node + linkType: hard + "emittery@npm:^1.0.1": version: 1.0.3 resolution: "emittery@npm:1.0.3" @@ -716,6 +2083,22 @@ __metadata: languageName: node linkType: hard +"es-define-property@npm:^1.0.0": + version: 1.0.0 + resolution: "es-define-property@npm:1.0.0" + dependencies: + get-intrinsic: "npm:^1.2.4" + checksum: 10c0/6bf3191feb7ea2ebda48b577f69bdfac7a2b3c9bcf97307f55fd6ef1bbca0b49f0c219a935aca506c993d8c5d8bddd937766cb760cd5e5a1071351f2df9f9aa4 + languageName: node + linkType: hard + +"es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.2.0 resolution: "escalade@npm:3.2.0" @@ -747,6 +2130,20 @@ __metadata: languageName: node linkType: hard +"estree-walker@npm:^1.0.1": + version: 1.0.1 + resolution: "estree-walker@npm:1.0.1" + checksum: 10c0/fa9e5f8c1bbe8d01e314c0f03067b64a4f22d4c58410fc5237060d0c15b81e58c23921c41acc60abbdab490f1fdfcbd6408ede2d03ca704454272e0244d61a55 + languageName: node + linkType: hard + +"estree-walker@npm:^2.0.1, estree-walker@npm:^2.0.2": + version: 2.0.2 + resolution: "estree-walker@npm:2.0.2" + checksum: 10c0/53a6c54e2019b8c914dc395890153ffdc2322781acf4bd7d1a32d7aedc1710807bdcd866ac133903d5629ec601fbb50abe8c2e5553c7f5a0afdd9b6af6c945af + languageName: node + linkType: hard + "esutils@npm:^2.0.3": version: 2.0.3 resolution: "esutils@npm:2.0.3" @@ -755,8 +2152,8 @@ __metadata: linkType: hard "execa@npm:^9.3.1": - version: 9.4.1 - resolution: "execa@npm:9.4.1" + version: 9.5.1 + resolution: "execa@npm:9.5.1" dependencies: "@sindresorhus/merge-streams": "npm:^4.0.0" cross-spawn: "npm:^7.0.3" @@ -770,7 +2167,7 @@ __metadata: signal-exit: "npm:^4.1.0" strip-final-newline: "npm:^4.0.0" yoctocolors: "npm:^2.0.0" - checksum: 10c0/2166de02c8c940312481e480ef47f54636725b24a402d25bdbaeca97f6eeb82b21def1279e00378872fbe6a0c675d6b5cd144be4d52c1485a7a3895e611ac03e + checksum: 10c0/1a628d535c5a088f9e17a735bb3143efc4198095392b319ba877b2975d5c3c57724536dccb6f68f1cd9b3af331c5a9e8c1aeb338d52ab316b1e008ff453374a7 languageName: node linkType: hard @@ -788,6 +2185,15 @@ __metadata: languageName: node linkType: hard +"fast-check@npm:^3.0.0": + version: 3.23.1 + resolution: "fast-check@npm:3.23.1" + dependencies: + pure-rand: "npm:^6.1.0" + checksum: 10c0/d61ee4a7a2e1abc5126bf2f1894413f532f686b3d1fc15c67fefb60dcca66024934b69a6454d3eba92e6568ac1abbb9882080e212d255865c3b3bbe52c5bf702 + languageName: node + linkType: hard + "fast-diff@npm:^1.2.0": version: 1.3.0 resolution: "fast-diff@npm:1.3.0" @@ -862,6 +2268,16 @@ __metadata: languageName: node linkType: hard +"follow-redirects@npm:^1.15.6": + version: 1.15.9 + resolution: "follow-redirects@npm:1.15.9" + peerDependenciesMeta: + debug: + optional: true + checksum: 10c0/5829165bd112c3c0e82be6c15b1a58fa9dcfaede3b3c54697a82fe4a62dd5ae5e8222956b448d2f98e331525f05d00404aba7d696de9e761ef6e42fdc780244f + languageName: node + linkType: hard + "foreground-child@npm:^3.1.0": version: 3.3.0 resolution: "foreground-child@npm:3.3.0" @@ -872,6 +2288,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:^4.0.0": + version: 4.0.1 + resolution: "form-data@npm:4.0.1" + dependencies: + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.8" + mime-types: "npm:^2.1.12" + checksum: 10c0/bb102d570be8592c23f4ea72d7df9daa50c7792eb0cf1c5d7e506c1706e7426a4e4ae48a35b109e91c85f1c0ec63774a21ae252b66f4eb981cb8efef7d0463c8 + languageName: node + linkType: hard + "fs-constants@npm:^1.0.0": version: 1.0.0 resolution: "fs-constants@npm:1.0.0" @@ -897,6 +2324,13 @@ __metadata: languageName: node linkType: hard +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10c0/444cf1291d997165dfd4c0d58b69f0e4782bfd9149fd72faa4fe299e68e0e93d6db941660b37dd29153bf7186672ececa3b50b7e7249477b03fdf850f287c948 + languageName: node + linkType: hard + "fsevents@npm:~2.3.2": version: 2.3.3 resolution: "fsevents@npm:2.3.3" @@ -916,6 +2350,13 @@ __metadata: languageName: node linkType: hard +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 + languageName: node + linkType: hard + "get-caller-file@npm:^2.0.5": version: 2.0.5 resolution: "get-caller-file@npm:2.0.5" @@ -923,6 +2364,19 @@ __metadata: languageName: node linkType: hard +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.4": + version: 1.2.4 + resolution: "get-intrinsic@npm:1.2.4" + dependencies: + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + has-proto: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + hasown: "npm:^2.0.0" + checksum: 10c0/0a9b82c16696ed6da5e39b1267104475c47e3a9bdbe8b509dfe1710946e38a87be70d759f4bb3cda042d76a41ef47fe769660f3b7c0d1f68750299344ffb15b7 + languageName: node + linkType: hard + "get-stream@npm:^9.0.0": version: 9.0.1 resolution: "get-stream@npm:9.0.1" @@ -965,6 +2419,37 @@ __metadata: languageName: node linkType: hard +"glob@npm:^7.1.6": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10c0/65676153e2b0c9095100fe7f25a778bf45608eeb32c6048cf307f579649bcc30353277b3b898a3792602c65764e5baa4f643714dfbdfd64ea271d210c7a425fe + languageName: node + linkType: hard + +"globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 10c0/758f9f258e7b19226bd8d4af5d3b0dcf7038780fb23d82e6f98932c44e239f884847f1766e8fa9cc5635ccb3204f7fa7314d4408dd4002a5e8ea827b4018f0a1 + languageName: node + linkType: hard + +"globalthis@npm:^1.0.1": + version: 1.0.4 + resolution: "globalthis@npm:1.0.4" + dependencies: + define-properties: "npm:^1.2.1" + gopd: "npm:^1.0.1" + checksum: 10c0/9d156f313af79d80b1566b93e19285f481c591ad6d0d319b4be5e03750d004dde40a39a0f26f7e635f9007a3600802f53ecd85a759b86f109e80a5f705e01846 + languageName: node + linkType: hard + "globby@npm:^13.1.4": version: 13.2.2 resolution: "globby@npm:13.2.2" @@ -978,6 +2463,15 @@ __metadata: languageName: node linkType: hard +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: "npm:^1.1.3" + checksum: 10c0/505c05487f7944c552cee72087bf1567debb470d4355b1335f2c262d218ebbff805cd3715448fe29b4b380bae6912561d0467233e4165830efd28da241418c63 + languageName: node + linkType: hard + "graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" @@ -985,6 +2479,59 @@ __metadata: languageName: node linkType: hard +"has-property-descriptors@npm:^1.0.0": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" + dependencies: + es-define-property: "npm:^1.0.0" + checksum: 10c0/253c1f59e80bb476cf0dde8ff5284505d90c3bdb762983c3514d36414290475fe3fd6f574929d84de2a8eec00d35cf07cb6776205ff32efd7c50719125f00236 + languageName: node + linkType: hard + +"has-proto@npm:^1.0.1": + version: 1.0.3 + resolution: "has-proto@npm:1.0.3" + checksum: 10c0/35a6989f81e9f8022c2f4027f8b48a552de714938765d019dbea6bb547bd49ce5010a3c7c32ec6ddac6e48fc546166a3583b128f5a7add8b058a6d8b4afec205 + languageName: node + linkType: hard + +"has-symbols@npm:^1.0.3": + version: 1.0.3 + resolution: "has-symbols@npm:1.0.3" + checksum: 10c0/e6922b4345a3f37069cdfe8600febbca791c94988c01af3394d86ca3360b4b93928bbf395859158f88099cb10b19d98e3bbab7c9ff2c1bd09cf665ee90afa2c3 + languageName: node + linkType: hard + +"hash.js@npm:^1.0.0, hash.js@npm:^1.0.3": + version: 1.1.7 + resolution: "hash.js@npm:1.1.7" + dependencies: + inherits: "npm:^2.0.3" + minimalistic-assert: "npm:^1.0.1" + checksum: 10c0/41ada59494eac5332cfc1ce6b7ebdd7b88a3864a6d6b08a3ea8ef261332ed60f37f10877e0c825aaa4bddebf164fbffa618286aeeec5296675e2671cbfa746c4 + languageName: node + linkType: hard + +"hasown@npm:^2.0.0, hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 + languageName: node + linkType: hard + +"hmac-drbg@npm:^1.0.1": + version: 1.0.1 + resolution: "hmac-drbg@npm:1.0.1" + dependencies: + hash.js: "npm:^1.0.3" + minimalistic-assert: "npm:^1.0.0" + minimalistic-crypto-utils: "npm:^1.0.1" + checksum: 10c0/f3d9ba31b40257a573f162176ac5930109816036c59a09f901eb2ffd7e5e705c6832bedfff507957125f2086a0ab8f853c0df225642a88bf1fcaea945f20600d + languageName: node + linkType: hard + "http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -1049,6 +2596,13 @@ __metadata: languageName: node linkType: hard +"import-meta-resolve@npm:^2.2.1": + version: 2.2.2 + resolution: "import-meta-resolve@npm:2.2.2" + checksum: 10c0/80873aebf0d2a66e824e278fb6cbb16a6660f86df49b367404e5de80928720ecb44f643243b46dc5c5fae506abb666ef54d6f281b45ee0f1034951acb2261eb5 + languageName: node + linkType: hard + "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -1070,7 +2624,17 @@ __metadata: languageName: node linkType: hard -"inherits@npm:^2.0.3, inherits@npm:^2.0.4": +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10c0/7faca22584600a9dc5b9fca2cd5feb7135ac8c935449837b315676b4c90aa4f391ec4f42240178244b5a34e8bede1948627fda392ca3191522fc46b34e985ab2 + languageName: node + linkType: hard + +"inherits@npm:2, inherits@npm:^2.0.3, inherits@npm:^2.0.4": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 @@ -1110,6 +2674,24 @@ __metadata: languageName: node linkType: hard +"is-builtin-module@npm:^3.1.0": + version: 3.2.1 + resolution: "is-builtin-module@npm:3.2.1" + dependencies: + builtin-modules: "npm:^3.3.0" + checksum: 10c0/5a66937a03f3b18803381518f0ef679752ac18cdb7dd53b5e23ee8df8d440558737bd8dcc04d2aae555909d2ecb4a81b5c0d334d119402584b61e6a003e31af1 + languageName: node + linkType: hard + +"is-core-module@npm:^2.13.0": + version: 2.15.1 + resolution: "is-core-module@npm:2.15.1" + dependencies: + hasown: "npm:^2.0.2" + checksum: 10c0/53432f10c69c40bfd2fa8914133a68709ff9498c86c3bf5fca3cdf3145a56fd2168cbf4a43b29843a6202a120a5f9c5ffba0a4322e1e3441739bc0b641682612 + languageName: node + linkType: hard + "is-error@npm:^2.2.2": version: 2.2.2 resolution: "is-error@npm:2.2.2" @@ -1154,6 +2736,13 @@ __metadata: languageName: node linkType: hard +"is-module@npm:^1.0.0": + version: 1.0.0 + resolution: "is-module@npm:1.0.0" + checksum: 10c0/795a3914bcae7c26a1c23a1e5574c42eac13429625045737bf3e324ce865c0601d61aee7a5afbca1bee8cb300c7d9647e7dc98860c9bdbc3b7fdc51d8ac0bffc + languageName: node + linkType: hard + "is-number@npm:^7.0.0": version: 7.0.0 resolution: "is-number@npm:7.0.0" @@ -1182,6 +2771,15 @@ __metadata: languageName: node linkType: hard +"is-reference@npm:^1.2.1": + version: 1.2.1 + resolution: "is-reference@npm:1.2.1" + dependencies: + "@types/estree": "npm:*" + checksum: 10c0/7dc819fc8de7790264a0a5d531164f9f5b9ef5aa1cd05f35322d14db39c8a2ec78fd5d4bf57f9789f3ddd2b3abeea7728432b759636157a42db12a9e8c3b549b + languageName: node + linkType: hard + "is-stream@npm:^4.0.1": version: 4.0.1 resolution: "is-stream@npm:4.0.1" @@ -1217,6 +2815,15 @@ __metadata: languageName: node linkType: hard +"isomorphic-ws@npm:^4.0.1": + version: 4.0.1 + resolution: "isomorphic-ws@npm:4.0.1" + peerDependencies: + ws: "*" + checksum: 10c0/7cb90dc2f0eb409825558982fb15d7c1d757a88595efbab879592f9d2b63820d6bbfb5571ab8abe36c715946e165a413a99f6aafd9f40ab1f514d73487bc9996 + languageName: node + linkType: hard + "jackspeak@npm:^3.1.2": version: 3.4.3 resolution: "jackspeak@npm:3.4.3" @@ -1230,6 +2837,15 @@ __metadata: languageName: node linkType: hard +"jessie.js@npm:^0.3.4": + version: 0.3.4 + resolution: "jessie.js@npm:0.3.4" + dependencies: + "@endo/far": "npm:^1.0.0" + checksum: 10c0/853ab3f8a0e30df11742882f5e11479d1303033a5a203a247d8ffbf4c6f3f3d4bcbefa53084ae4632e6ab106e348f23dc988280486cbeaaf5d16487fa3d40e96 + languageName: node + linkType: hard + "js-string-escape@npm:^1.0.1": version: 1.0.1 resolution: "js-string-escape@npm:1.0.1" @@ -1237,6 +2853,13 @@ __metadata: languageName: node linkType: hard +"js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed + languageName: node + linkType: hard + "js-yaml@npm:^3.14.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" @@ -1256,6 +2879,40 @@ __metadata: languageName: node linkType: hard +"jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 10c0/dbf59312e0ebf2b4405ef413ec2b25abb5f8f4d9bc5fb8d9f90381622ebca5f2af6a6aa9a8578f65903f9e33990a6dc798edd0ce5586894bf0e9e31803a1de88 + languageName: node + linkType: hard + +"jsesc@npm:^3.0.2": + version: 3.0.2 + resolution: "jsesc@npm:3.0.2" + bin: + jsesc: bin/jsesc + checksum: 10c0/ef22148f9e793180b14d8a145ee6f9f60f301abf443288117b4b6c53d0ecd58354898dc506ccbb553a5f7827965cd38bc5fb726575aae93c5e8915e2de8290e1 + languageName: node + linkType: hard + +"libsodium-sumo@npm:^0.7.15": + version: 0.7.15 + resolution: "libsodium-sumo@npm:0.7.15" + checksum: 10c0/5a1437ccff03c72669e7b49da702034e171df9ff6a4e65698297ab63ad0bf8f889d3dd51494e29418c643143526d8d7f08cbba3929d220334cddbe3e74a1560e + languageName: node + linkType: hard + +"libsodium-wrappers-sumo@npm:^0.7.11": + version: 0.7.15 + resolution: "libsodium-wrappers-sumo@npm:0.7.15" + dependencies: + libsodium-sumo: "npm:^0.7.15" + checksum: 10c0/6da919a13395346d54f2ce4841adda8feb3fbb8a8c378ec5c93b7e6dc6353b379289349e659f3e017a9f1995ef396bf43f89c7ab4aab4e3b5ed85df62407d810 + languageName: node + linkType: hard + "load-json-file@npm:^7.0.0": version: 7.0.1 resolution: "load-json-file@npm:7.0.1" @@ -1279,6 +2936,13 @@ __metadata: languageName: node linkType: hard +"long@npm:^4.0.0": + version: 4.0.0 + resolution: "long@npm:4.0.0" + checksum: 10c0/50a6417d15b06104dbe4e3d4a667c39b137f130a9108ea8752b352a4cfae047531a3ac351c181792f3f8768fe17cca6b0f406674a541a86fb638aaac560d83ed + languageName: node + linkType: hard + "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" @@ -1286,6 +2950,15 @@ __metadata: languageName: node linkType: hard +"magic-string@npm:^0.25.7": + version: 0.25.9 + resolution: "magic-string@npm:0.25.9" + dependencies: + sourcemap-codec: "npm:^1.4.8" + checksum: 10c0/37f5e01a7e8b19a072091f0b45ff127cda676232d373ce2c551a162dd4053c575ec048b9cbb4587a1f03adb6c5d0fd0dd49e8ab070cd2c83a4992b2182d9cb56 + languageName: node + linkType: hard + "make-fetch-happen@npm:^13.0.0": version: 13.0.1 resolution: "make-fetch-happen@npm:13.0.1" @@ -1360,6 +3033,33 @@ __metadata: languageName: node linkType: hard +"microtime@npm:^3.1.0": + version: 3.1.1 + resolution: "microtime@npm:3.1.1" + dependencies: + node-addon-api: "npm:^5.0.0" + node-gyp: "npm:latest" + node-gyp-build: "npm:^4.4.0" + checksum: 10c0/02512993de914c6f71424d3b8b28ce53de44ba5895b904a213420fd4fc86a084c1d08ec0876ac60cdae6427022766e1b9b86d9b3442bf408701120bd61455e26 + languageName: node + linkType: hard + +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa + languageName: node + linkType: hard + +"mime-types@npm:^2.1.12": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: "npm:1.52.0" + checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2 + languageName: node + linkType: hard + "mimic-fn@npm:^4.0.0": version: 4.0.0 resolution: "mimic-fn@npm:4.0.0" @@ -1374,6 +3074,29 @@ __metadata: languageName: node linkType: hard +"minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": + version: 1.0.1 + resolution: "minimalistic-assert@npm:1.0.1" + checksum: 10c0/96730e5601cd31457f81a296f521eb56036e6f69133c0b18c13fe941109d53ad23a4204d946a0d638d7f3099482a0cec8c9bb6d642604612ce43ee536be3dddd + languageName: node + linkType: hard + +"minimalistic-crypto-utils@npm:^1.0.1": + version: 1.0.1 + resolution: "minimalistic-crypto-utils@npm:1.0.1" + checksum: 10c0/790ecec8c5c73973a4fbf2c663d911033e8494d5fb0960a4500634766ab05d6107d20af896ca2132e7031741f19888154d44b2408ada0852446705441383e9f8 + languageName: node + linkType: hard + +"minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 + languageName: node + linkType: hard + "minimatch@npm:^9.0.4": version: 9.0.5 resolution: "minimatch@npm:9.0.5" @@ -1520,6 +3243,26 @@ __metadata: languageName: node linkType: hard +"node-addon-api@npm:^5.0.0": + version: 5.1.0 + resolution: "node-addon-api@npm:5.1.0" + dependencies: + node-gyp: "npm:latest" + checksum: 10c0/0eb269786124ba6fad9df8007a149e03c199b3e5a3038125dfb3e747c2d5113d406a4e33f4de1ea600aa2339be1f137d55eba1a73ee34e5fff06c52a5c296d1d + languageName: node + linkType: hard + +"node-gyp-build@npm:^4.4.0": + version: 4.8.3 + resolution: "node-gyp-build@npm:4.8.3" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 10c0/a7f43c4128d817db80bb0884f631121449ac586b4a3e708eab0db6fcb7fa0d2e66f6d7d4ee1f49469409de4a9b2e413926befe2dce70b850c6c583a3bbe228d2 + languageName: node + linkType: hard + "node-gyp@npm:latest": version: 10.2.0 resolution: "node-gyp@npm:10.2.0" @@ -1575,7 +3318,14 @@ __metadata: languageName: node linkType: hard -"once@npm:^1.3.1, once@npm:^1.4.0": +"object-keys@npm:^1.1.1": + version: 1.1.1 + resolution: "object-keys@npm:1.1.1" + checksum: 10c0/b11f7ccdbc6d406d1f186cdadb9d54738e347b2692a14439ca5ac70c225fa6db46db809711b78589866d47b25fc3e8dee0b4c722ac751e11180f9380e3d8601d + languageName: node + linkType: hard + +"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -1671,6 +3421,13 @@ __metadata: languageName: node linkType: hard +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10c0/127da03c82172a2a50099cddbf02510c1791fc2cc5f7713ddb613a56838db1e8168b121a920079d052e0936c23005562059756d653b7c544c53185efe53be078 + languageName: node + linkType: hard + "path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" @@ -1685,6 +3442,13 @@ __metadata: languageName: node linkType: hard +"path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 10c0/11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1 + languageName: node + linkType: hard + "path-scurry@npm:^1.11.1": version: 1.11.1 resolution: "path-scurry@npm:1.11.1" @@ -1702,13 +3466,27 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": +"picocolors@npm:^1.0.0": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be languageName: node linkType: hard +"picomatch@npm:^4.0.2": + version: 4.0.2 + resolution: "picomatch@npm:4.0.2" + checksum: 10c0/7c51f3ad2bb42c776f49ebf964c644958158be30d0a510efd5a395e8d49cb5acfed5b82c0c5b365523ce18e6ab85013c9ebe574f60305892ec3fa8eee8304ccc + languageName: node + linkType: hard + "pkg-conf@npm:^4.0.0": version: 4.0.0 resolution: "pkg-conf@npm:4.0.0" @@ -1760,11 +3538,11 @@ __metadata: linkType: hard "pretty-ms@npm:^9.0.0": - version: 9.1.0 - resolution: "pretty-ms@npm:9.1.0" + version: 9.2.0 + resolution: "pretty-ms@npm:9.2.0" dependencies: parse-ms: "npm:^4.0.0" - checksum: 10c0/fd111aad8800a04dfd654e6016da69bdaa6fc6a4c280f8e727cffd8b5960558e94942f1a94d4aa6e4d179561a0fbb0366a9ebe0ccefbbb0f8ff853b129cdefb9 + checksum: 10c0/ab6d066f90e9f77020426986e1b018369f41575674544c539aabec2e63a20fec01166d8cf6571d0e165ad11cfe5a8134a2a48a36d42ab291c59c6deca5264cbb languageName: node linkType: hard @@ -1785,6 +3563,37 @@ __metadata: languageName: node linkType: hard +"protobufjs@npm:^6.8.8": + version: 6.11.4 + resolution: "protobufjs@npm:6.11.4" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/long": "npm:^4.0.1" + "@types/node": "npm:>=13.7.0" + long: "npm:^4.0.0" + bin: + pbjs: bin/pbjs + pbts: bin/pbts + checksum: 10c0/c244d7b9b6d3258193da5c0d1e558dfb47f208ae345e209f90ec45c9dca911b90fa17e937892a9a39a4136ab9886981aae9efdf6039f7baff4f7225f5eeb9812 + languageName: node + linkType: hard + +"proxy-from-env@npm:^1.1.0": + version: 1.1.0 + resolution: "proxy-from-env@npm:1.1.0" + checksum: 10c0/fe7dd8b1bdbbbea18d1459107729c3e4a2243ca870d26d34c2c1bcd3e4425b7bcc5112362df2d93cc7fb9746f6142b5e272fd1cc5c86ddf8580175186f6ad42b + languageName: node + linkType: hard + "pump@npm:^3.0.0": version: 3.0.2 resolution: "pump@npm:3.0.2" @@ -1795,6 +3604,13 @@ __metadata: languageName: node linkType: hard +"pure-rand@npm:^6.1.0": + version: 6.1.0 + resolution: "pure-rand@npm:6.1.0" + checksum: 10c0/1abe217897bf74dcb3a0c9aba3555fe975023147b48db540aa2faf507aee91c03bf54f6aef0eb2bf59cc259a16d06b28eca37f0dc426d94f4692aeff02fb0e65 + languageName: node + linkType: hard + "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -1836,6 +3652,13 @@ __metadata: languageName: node linkType: hard +"readonly-date@npm:^1.0.0": + version: 1.0.0 + resolution: "readonly-date@npm:1.0.0" + checksum: 10c0/7ab32bf19f6bfec102584a524fa79a289e6ede0bf20c80fd90ab309962e45b71d19dd0e3915dff6e81edf226f08fda65e890539b4aca74668921790b10471356 + languageName: node + linkType: hard + "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -1859,6 +3682,32 @@ __metadata: languageName: node linkType: hard +"resolve@npm:^1.17.0, resolve@npm:^1.19.0": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10c0/07e179f4375e1fd072cfb72ad66d78547f86e6196c4014b31cb0b8bb1db5f7ca871f922d08da0fbc05b94e9fd42206f819648fa3b5b873ebbc8e1dc68fec433a + languageName: node + linkType: hard + +"resolve@patch:resolve@npm%3A^1.17.0#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10c0/0446f024439cd2e50c6c8fa8ba77eaa8370b4180f401a96abf3d1ebc770ac51c1955e12764cde449fde3fff480a61f84388e3505ecdbab778f4bef5f8212c729 + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -1873,11 +3722,27 @@ __metadata: languageName: node linkType: hard +"rollup@npm:^2.79.1": + version: 2.79.2 + resolution: "rollup@npm:2.79.2" + dependencies: + fsevents: "npm:~2.3.2" + dependenciesMeta: + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: 10c0/bc3746c988d903c2211266ddc539379d53d92689b9cc5c2b4e3ae161689de9af491957a567c629b6cc81f48d0928a7591fc4c383fba68a48d2966c9fb8a2bce9 + languageName: node + linkType: hard + "root-workspace-0b6124@workspace:.": version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: - "@agoric/synthetic-chain": "npm:^0.3.0" + "@agoric/client-utils": "npm:dev" + "@agoric/synthetic-chain": "npm:^0.4.3" + "@endo/init": "npm:^1.1.7" ava: "npm:^5.3.1" languageName: unknown linkType: soft @@ -1905,6 +3770,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^6.3.0": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: 10c0/e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d + languageName: node + linkType: hard + "semver@npm:^7.3.2, semver@npm:^7.3.5": version: 7.6.3 resolution: "semver@npm:7.6.3" @@ -1923,6 +3797,15 @@ __metadata: languageName: node linkType: hard +"ses@npm:^1.10.0": + version: 1.10.0 + resolution: "ses@npm:1.10.0" + dependencies: + "@endo/env-options": "npm:^1.1.8" + checksum: 10c0/83b92bc49e27af04eeb7ee01a2196a0c4b0906e4de51e70403aa9ffc82be1d27a0c3506f2d54da8d6d260be0855f2123a13a7e2c6896e81ec85899df1a428609 + languageName: node + linkType: hard + "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -2009,6 +3892,27 @@ __metadata: languageName: node linkType: hard +"source-map-js@npm:^1.2.0": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf + languageName: node + linkType: hard + +"source-map@npm:^0.5.0": + version: 0.5.7 + resolution: "source-map@npm:0.5.7" + checksum: 10c0/904e767bb9c494929be013017380cbba013637da1b28e5943b566031e29df04fba57edf3f093e0914be094648b577372bd8ad247fa98cfba9c600794cd16b599 + languageName: node + linkType: hard + +"sourcemap-codec@npm:^1.4.8": + version: 1.4.8 + resolution: "sourcemap-codec@npm:1.4.8" + checksum: 10c0/f099279fdaae070ff156df7414bbe39aad69cdd615454947ed3e19136bfdfcb4544952685ee73f56e17038f4578091e12b17b283ed8ac013882916594d95b9e6 + languageName: node + linkType: hard + "sprintf-js@npm:^1.1.3": version: 1.1.3 resolution: "sprintf-js@npm:1.1.3" @@ -2116,6 +4020,20 @@ __metadata: languageName: node linkType: hard +"supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 10c0/6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39 + languageName: node + linkType: hard + +"symbol-observable@npm:^2.0.3": + version: 2.0.3 + resolution: "symbol-observable@npm:2.0.3" + checksum: 10c0/03fb8766b75bfa65a3c7d68ae1e51a13a5ff71b40d6d53b17a0c9c77b1685c20a3bfbf45547ab36214a079665c3f551e250798f6b2f83a2a40762d864ed87f78 + languageName: node + linkType: hard + "tar-fs@npm:^2.0.0": version: 2.1.1 resolution: "tar-fs@npm:2.1.1" @@ -2169,6 +4087,13 @@ __metadata: languageName: node linkType: hard +"tmp@npm:^0.2.1": + version: 0.2.3 + resolution: "tmp@npm:0.2.3" + checksum: 10c0/3e809d9c2f46817475b452725c2aaa5d11985cf18d32a7a970ff25b568438e2c076c2e8609224feef3b7923fa9749b74428e3e634f6b8e520c534eef2fd24125 + languageName: node + linkType: hard + "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -2178,6 +4103,15 @@ __metadata: languageName: node linkType: hard +"ts-blank-space@npm:^0.4.1": + version: 0.4.3 + resolution: "ts-blank-space@npm:0.4.3" + dependencies: + typescript: "npm:5.1.6 - 5.6.x" + checksum: 10c0/362feac2e19cf8f1936cefdc658463558e0ef88568fdb7267910c50eb20b27ab2e21b4cf8100890f9ff1568a4e185daa68947c00dd4bfe176d61f554010266e1 + languageName: node + linkType: hard + "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" @@ -2194,6 +4128,33 @@ __metadata: languageName: node linkType: hard +"typescript@npm:5.1.6 - 5.6.x": + version: 5.6.3 + resolution: "typescript@npm:5.6.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/44f61d3fb15c35359bc60399cb8127c30bae554cd555b8e2b46d68fa79d680354b83320ad419ff1b81a0bdf324197b29affe6cc28988cd6a74d4ac60c94f9799 + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A5.1.6 - 5.6.x#optional!builtin": + version: 5.6.3 + resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=b45daf" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/ac8307bb06bbfd08ae7137da740769b7d8c3ee5943188743bb622c621f8ad61d244767480f90fbd840277fbf152d8932aa20c33f867dea1bb5e79b187ca1a92f + languageName: node + linkType: hard + +"undici-types@npm:~6.19.8": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 + languageName: node + linkType: hard + "unicorn-magic@npm:^0.3.0": version: 0.3.0 resolution: "unicorn-magic@npm:0.3.0" @@ -2294,6 +4255,31 @@ __metadata: languageName: node linkType: hard +"ws@npm:^7": + version: 7.5.10 + resolution: "ws@npm:7.5.10" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 10c0/bd7d5f4aaf04fae7960c23dcb6c6375d525e00f795dd20b9385902bd008c40a94d3db3ce97d878acc7573df852056ca546328b27b39f47609f80fb22a0a9b61d + languageName: node + linkType: hard + +"xstream@npm:^11.14.0": + version: 11.14.0 + resolution: "xstream@npm:11.14.0" + dependencies: + globalthis: "npm:^1.0.1" + symbol-observable: "npm:^2.0.3" + checksum: 10c0/7a28baedc64385dc17597d04c7130ec3135db298e66d6dcf33821eb1953d5ad1b83c5fa08f1ce4d36e75fd219f2e9ef81ee0721aa8d4ccf619acc1760ba37f71 + languageName: node + linkType: hard + "y18n@npm:^5.0.5": version: 5.0.8 resolution: "y18n@npm:5.0.8" From b4671735efa3b40af68c2216cc9b53eb453a56ba Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 19 Nov 2024 15:07:43 -0600 Subject: [PATCH 006/174] docs(a3p-i): how to get a chain running --- a3p-integration/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/a3p-integration/README.md b/a3p-integration/README.md index a9e6ff031ea..c5c2a3d4a29 100644 --- a/a3p-integration/README.md +++ b/a3p-integration/README.md @@ -1,8 +1,12 @@ -# Overview +# a3p-integration overview This directory contains an end-to-end integration test executed against a synthetic agoric-3 chain. The test performs a chain software upgrade to the software contained in the enclosing `agoric-sdk` repository, then executes a series of functional tests verifying the upgrade accomplished its goal. -# How to run +## Quick-Start: How to Get a Chain Running + +To get a chain running with an existing proposal such as `f:fast-usdc`, run `yarn test -m fast-usdc --debug`; likewise `yarn test -m --debug` for any other proposal name. + +## How to run The synthetic chain testing infrastructure relies on Docker, Docker Buildx extended build capabilities, and the experimental Buildx Bake extension. Make sure you have a recent Docker engine installed for your system. From 9b771d3270f2de22eae4f1a1ee9bc0752b8c8eac Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 20 Nov 2024 18:44:45 -0600 Subject: [PATCH 007/174] chore: put 'agoric' chain info in agorcNames UNTIL ... ... PFM / chainHub stuff --- a3p-integration/proposals/f:fast-usdc/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/a3p-integration/proposals/f:fast-usdc/package.json b/a3p-integration/proposals/f:fast-usdc/package.json index 62a07aa7333..f36242aeaac 100644 --- a/a3p-integration/proposals/f:fast-usdc/package.json +++ b/a3p-integration/proposals/f:fast-usdc/package.json @@ -1,7 +1,9 @@ { "agoricProposal": { "source": "subdir", + "$UNTIL": "write-chain-info to agoricNames until #10445 and chainHub setup", "sdk-generate": [ + "orchestration/write-chain-info.js", "fast-usdc/init-fast-usdc.js submission --oracleSet A3P_INTEGRATION" ], "type": "/agoric.swingset.CoreEvalProposal" From 6112a8b0fc5482e7930f5aa092a340dcef1a2a66 Mon Sep 17 00:00:00 2001 From: Usman Saleem <57341641+usmanmani1122@users.noreply.github.com> Date: Thu, 21 Nov 2024 10:36:27 +0500 Subject: [PATCH 008/174] `agd export` option for diagnosis (#10344) closes: #8420 ref: #8152 ## Description This PR adds a new optional flag `--swing-store-export-mode` to the `agd export` command which can be used to specify the nature of swing-store export ### Security Considerations None ### Scaling Considerations None ### Documentation Considerations An optional flag `--swing-store-export-mode` option is now supported for `agd export` to specify the kind of swing store export required: - `operational` (default) option will retain the existing behavior and export the swing-store artifacts using the latest height - `skip` option will not export any swing-store artifact - `debug` option will export all swing-store artifacts, starting from height `0` ### Testing Considerations Tested manually ### Upgrade Considerations None --- golang/cosmos/app/app.go | 33 ++++++-- golang/cosmos/daemon/cmd/root.go | 63 +++++++++++---- golang/cosmos/x/swingset/genesis.go | 120 +++++++++++++++++++++++----- golang/cosmos/x/swingset/module.go | 19 ++++- 4 files changed, 189 insertions(+), 46 deletions(-) diff --git a/golang/cosmos/app/app.go b/golang/cosmos/app/app.go index e5dc4a3c4fe..6f2d7d225b9 100644 --- a/golang/cosmos/app/app.go +++ b/golang/cosmos/app/app.go @@ -137,13 +137,22 @@ import ( const appName = "agoric" -// FlagSwingStoreExportDir defines the config flag used to specify where a -// genesis swing-store export is expected. For start from genesis, the default -// value is config/swing-store in the home directory. For genesis export, the -// value is always a "swing-store" directory sibling to the exported -// genesis.json file. -// TODO: document this flag in config, likely alongside the genesis path -const FlagSwingStoreExportDir = "swing-store-export-dir" +const ( + // FlagSwingStoreExportDir defines the config flag used to specify where a + // genesis swing-store export is expected. For start from genesis, the default + // value is config/swing-store in the home directory. For genesis export, the + // value is always a "swing-store" directory sibling to the exported + // genesis.json file. + // TODO: document this flag in config, likely alongside the genesis path + FlagSwingStoreExportDir = "swing-store-export-dir" + // FlagSwingStoreExportMode defines the export mode for the swing store + // Alongside the default mode `operational`, there are two other modes + // + // 1- `skip` mode will skip the swing store export altogether + // + // 2- `debug` mode will export all the available store + FlagSwingStoreExportMode = "swing-store-export-mode" +) var ( // DefaultNodeHome default home directories for the application daemon @@ -673,6 +682,7 @@ func NewAgoricApp( app.EvidenceKeeper = *evidenceKeeper swingStoreExportDir := cast.ToString(appOpts.Get(FlagSwingStoreExportDir)) + swingStoreExportMode := cast.ToString(appOpts.Get(FlagSwingStoreExportMode)) // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. @@ -702,7 +712,14 @@ func NewAgoricApp( icaModule, packetforward.NewAppModule(app.PacketForwardKeeper), vstorage.NewAppModule(app.VstorageKeeper), - swingset.NewAppModule(app.SwingSetKeeper, &app.SwingStoreExportsHandler, setBootstrapNeeded, app.ensureControllerInited, swingStoreExportDir), + swingset.NewAppModule( + app.SwingSetKeeper, + &app.SwingStoreExportsHandler, + setBootstrapNeeded, + app.ensureControllerInited, + swingStoreExportDir, + swingStoreExportMode, + ), vibcModule, vbankModule, vtransferModule, diff --git a/golang/cosmos/daemon/cmd/root.go b/golang/cosmos/daemon/cmd/root.go index 367cea44c07..07a46217348 100644 --- a/golang/cosmos/daemon/cmd/root.go +++ b/golang/cosmos/daemon/cmd/root.go @@ -386,6 +386,12 @@ const ( ExportedSwingStoreDirectoryName = "swing-store" ) +var allowedSwingSetExportModes = map[string]bool{ + swingset.SwingStoreExportModeDebug: true, + swingset.SwingStoreExportModeOperational: true, + swingset.SwingStoreExportModeSkip: true, +} + // extendCosmosExportCommand monkey-patches the "export" command added by // cosmos-sdk to add a required "export-dir" command-line flag, and create the // genesis export in the specified directory if the VM is running. @@ -396,31 +402,52 @@ func extendCosmosExportCommand(cmd *cobra.Command) { panic(err) } + var keys []string + for key := range allowedSwingSetExportModes { + keys = append(keys, key) + } + + cmd.Flags().String( + gaia.FlagSwingStoreExportMode, + swingset.SwingStoreExportModeOperational, + fmt.Sprintf( + "The mode for swingstore export (%s)", + strings.Join(keys, " | "), + ), + ) + originalRunE := cmd.RunE extendedRunE := func(cmd *cobra.Command, args []string) error { serverCtx := server.GetServerContextFromCmd(cmd) exportDir, _ := cmd.Flags().GetString(FlagExportDir) + swingStoreExportMode, _ := cmd.Flags().GetString(gaia.FlagSwingStoreExportMode) + err := os.MkdirAll(exportDir, os.ModePerm) if err != nil { return err } genesisPath := filepath.Join(exportDir, ExportedGenesisFileName) - swingStoreExportPath := filepath.Join(exportDir, ExportedSwingStoreDirectoryName) - err = os.MkdirAll(swingStoreExportPath, os.ModePerm) - if err != nil { - return err + // Since none mode doesn't perform any swing store export + // There is no point in creating the export directory + if swingStoreExportMode != swingset.SwingStoreExportModeSkip { + swingStoreExportPath := filepath.Join(exportDir, ExportedSwingStoreDirectoryName) + + err = os.MkdirAll(swingStoreExportPath, os.ModePerm) + if err != nil { + return err + } + // We unconditionally set FlagSwingStoreExportDir as for export, it makes + // little sense for users to control this location separately, and we don't + // want to override any swing-store artifacts that may be associated to the + // current genesis. + serverCtx.Viper.Set(gaia.FlagSwingStoreExportDir, swingStoreExportPath) } - // We unconditionally set FlagSwingStoreExportDir as for export, it makes - // little sense for users to control this location separately, and we don't - // want to override any swing-store artifacts that may be associated to the - // current genesis. - serverCtx.Viper.Set(gaia.FlagSwingStoreExportDir, swingStoreExportPath) - if hasVMController(serverCtx) { + if hasVMController(serverCtx) || swingStoreExportMode == swingset.SwingStoreExportModeSkip { // Capture the export in the genesisPath. // This will fail if a genesis.json already exists in the export-dir genesisFile, err := os.OpenFile( @@ -453,7 +480,16 @@ func (ac appCreator) appExport( jailAllowedAddrs []string, appOpts servertypes.AppOptions, ) (servertypes.ExportedApp, error) { - if OnExportHook != nil { + swingStoreExportMode, ok := appOpts.Get(gaia.FlagSwingStoreExportMode).(string) + if !(ok && allowedSwingSetExportModes[swingStoreExportMode]) { + return servertypes.ExportedApp{}, fmt.Errorf( + "export mode '%s' is not supported", + swingStoreExportMode, + ) + } + + // We don't have to launch VM in case the swing store export is not required + if swingStoreExportMode != swingset.SwingStoreExportModeSkip && OnExportHook != nil { if err := OnExportHook(ac.agdServer, logger, appOpts); err != nil { return servertypes.ExportedApp{}, err } @@ -464,10 +500,7 @@ func (ac appCreator) appExport( return servertypes.ExportedApp{}, errors.New("application home is not set") } - var loadLatest bool - if height == -1 { - loadLatest = true - } + loadLatest := height == -1 gaiaApp := gaia.NewAgoricApp( ac.sender, ac.agdServer, diff --git a/golang/cosmos/x/swingset/genesis.go b/golang/cosmos/x/swingset/genesis.go index 56c6e06e5ba..e8308e6e94e 100644 --- a/golang/cosmos/x/swingset/genesis.go +++ b/golang/cosmos/x/swingset/genesis.go @@ -1,13 +1,13 @@ package swingset import ( - // "os" "bytes" "crypto/sha256" "encoding/hex" "encoding/json" "fmt" "hash" + "io" "strings" agoric "github.com/Agoric/agoric-sdk/golang/cosmos/types" @@ -16,6 +16,20 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) +const ( + // SwingStoreExportModeSkip indicates swing store data should be + // excluded from the export. + SwingStoreExportModeSkip = "skip" + + // SwingStoreExportModeOperational (default) indicates export should + // have the minimal set of artifacts needed to operate a node. + SwingStoreExportModeOperational = "operational" + + // SwingStoreExportModeDebug indicates export should have the maximal + // set of artifacts available in the JS swing-store. + SwingStoreExportModeDebug = "debug" +) + func ValidateGenesis(data *types.GenesisState) error { if data == nil { return fmt.Errorf("swingset genesis data cannot be nil") @@ -130,36 +144,59 @@ func InitGenesis(ctx sdk.Context, k Keeper, swingStoreExportsHandler *SwingStore return false } -func ExportGenesis(ctx sdk.Context, k Keeper, swingStoreExportsHandler *SwingStoreExportsHandler, swingStoreExportDir string) *types.GenesisState { +func ExportGenesis( + ctx sdk.Context, + k Keeper, + swingStoreExportsHandler *SwingStoreExportsHandler, + swingStoreExportDir string, + swingStoreExportMode string, +) *types.GenesisState { gs := &types.GenesisState{ Params: k.GetParams(ctx), State: k.GetState(ctx), SwingStoreExportData: nil, } + // This will only be used in non skip mode + artifactMode := swingStoreExportMode + exportDataMode := keeper.SwingStoreExportDataModeSkip + hasher := sha256.New() snapshotHeight := uint64(ctx.BlockHeight()) - eventHandler := swingStoreGenesisEventHandler{exportDir: swingStoreExportDir, snapshotHeight: snapshotHeight, swingStore: k.GetSwingStore(ctx), hasher: sha256.New()} - - err := swingStoreExportsHandler.InitiateExport( - // The export will fail if the export of a historical height was requested - snapshotHeight, - eventHandler, - keeper.SwingStoreExportOptions{ - ArtifactMode: keeper.SwingStoreArtifactModeOperational, - ExportDataMode: keeper.SwingStoreExportDataModeSkip, - }, - ) - if err != nil { - panic(err) + if swingStoreExportMode == SwingStoreExportModeDebug { + exportDataMode = keeper.SwingStoreExportDataModeAll + snapshotHeight = 0 } - err = keeper.WaitUntilSwingStoreExportDone() - if err != nil { - panic(err) + if swingStoreExportMode != SwingStoreExportModeSkip { + eventHandler := swingStoreGenesisEventHandler{ + exportDir: swingStoreExportDir, + snapshotHeight: snapshotHeight, + swingStore: k.GetSwingStore(ctx), + hasher: hasher, + exportMode: swingStoreExportMode, + } + + err := swingStoreExportsHandler.InitiateExport( + // The export will fail if the export of a historical height was requested outside of debug mode + snapshotHeight, + eventHandler, + keeper.SwingStoreExportOptions{ + ArtifactMode: artifactMode, + ExportDataMode: exportDataMode, + }, + ) + if err != nil { + panic(err) + } + + err = keeper.WaitUntilSwingStoreExportDone() + if err != nil { + panic(err) + } } - gs.SwingStoreExportDataHash = fmt.Sprintf("sha256:%x", eventHandler.hasher.Sum(nil)) + gs.SwingStoreExportDataHash = fmt.Sprintf("sha256:%x", hasher.Sum(nil)) return gs } @@ -169,6 +206,7 @@ type swingStoreGenesisEventHandler struct { snapshotHeight uint64 swingStore sdk.KVStore hasher hash.Hash + exportMode string } func (eventHandler swingStoreGenesisEventHandler) OnExportStarted(height uint64, retrieveSwingStoreExport func() error) error { @@ -176,10 +214,12 @@ func (eventHandler swingStoreGenesisEventHandler) OnExportStarted(height uint64, } func (eventHandler swingStoreGenesisEventHandler) OnExportRetrieved(provider keeper.SwingStoreExportProvider) error { - if eventHandler.snapshotHeight != provider.BlockHeight { + if eventHandler.exportMode != SwingStoreExportModeDebug && eventHandler.snapshotHeight != provider.BlockHeight { return fmt.Errorf("snapshot block height (%d) doesn't match requested height (%d)", provider.BlockHeight, eventHandler.snapshotHeight) } + artifactsEnded := false + artifactsProvider := keeper.SwingStoreExportProvider{ GetExportDataReader: func() (agoric.KVEntryReader, error) { exportDataIterator := eventHandler.swingStore.Iterator(nil, nil) @@ -194,7 +234,45 @@ func (eventHandler swingStoreGenesisEventHandler) OnExportRetrieved(provider kee return nil }), nil }, - ReadNextArtifact: provider.ReadNextArtifact, + ReadNextArtifact: func() (types.SwingStoreArtifact, error) { + var ( + artifact types.SwingStoreArtifact + err error + encodedExportData bytes.Buffer + ) + + if !artifactsEnded { + artifact, err = provider.ReadNextArtifact() + } else { + return types.SwingStoreArtifact{}, io.EOF + } + + if err == io.EOF { + artifactsEnded = true + if eventHandler.exportMode == SwingStoreExportModeDebug { + exportDataReader, _ := provider.GetExportDataReader() + + defer exportDataReader.Close() + + err = agoric.EncodeKVEntryReaderToJsonl( + exportDataReader, + &encodedExportData, + ) + if err == nil { + artifact = types.SwingStoreArtifact{ + Data: encodedExportData.Bytes(), + Name: keeper.UntrustedExportDataArtifactName, + } + } + } + } + + return artifact, err + }, + } + + if eventHandler.exportMode == SwingStoreExportModeDebug { + artifactsProvider.BlockHeight = provider.BlockHeight } return keeper.WriteSwingStoreExportToDirectory(artifactsProvider, eventHandler.exportDir) diff --git a/golang/cosmos/x/swingset/module.go b/golang/cosmos/x/swingset/module.go index c8c646313f6..6a3465e88bf 100644 --- a/golang/cosmos/x/swingset/module.go +++ b/golang/cosmos/x/swingset/module.go @@ -80,10 +80,18 @@ type AppModule struct { setBootstrapNeeded func() ensureControllerInited func(sdk.Context) swingStoreExportDir string + swingStoreExportMode string } // NewAppModule creates a new AppModule Object -func NewAppModule(k Keeper, swingStoreExportsHandler *SwingStoreExportsHandler, setBootstrapNeeded func(), ensureControllerInited func(sdk.Context), swingStoreExportDir string) AppModule { +func NewAppModule( + k Keeper, + swingStoreExportsHandler *SwingStoreExportsHandler, + setBootstrapNeeded func(), + ensureControllerInited func(sdk.Context), + swingStoreExportDir string, + swingStoreExportMode string, +) AppModule { am := AppModule{ AppModuleBasic: AppModuleBasic{}, keeper: k, @@ -91,6 +99,7 @@ func NewAppModule(k Keeper, swingStoreExportsHandler *SwingStoreExportsHandler, setBootstrapNeeded: setBootstrapNeeded, ensureControllerInited: ensureControllerInited, swingStoreExportDir: swingStoreExportDir, + swingStoreExportMode: swingStoreExportMode, } return am } @@ -173,6 +182,12 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { am.checkSwingStoreExportSetup() - gs := ExportGenesis(ctx, am.keeper, am.swingStoreExportsHandler, am.swingStoreExportDir) + gs := ExportGenesis( + ctx, + am.keeper, + am.swingStoreExportsHandler, + am.swingStoreExportDir, + am.swingStoreExportMode, + ) return cdc.MustMarshalJSON(gs) } From 9d6cff17bb95ce5557758da242ca4646a87ac5b0 Mon Sep 17 00:00:00 2001 From: Samuel Siegart Date: Thu, 21 Nov 2024 11:11:57 -0800 Subject: [PATCH 009/174] feat(fast-usdc): write chain policies to vstorage (#10532) closes https://github.com/Agoric/agoric-sdk/issues/10512 ## Description Adds the shape/type for the chain policies, and makes the fast-usdc.start script write them to vstorage ### Security Considerations Only the start script and the contract have permission to write to the vstorage node ### Scaling Considerations This is a single invocation that runs once per core-eval, so shouldn't impact performance over time. ### Documentation Considerations There's an example policy in the test snapshot ### Testing Considerations Wrote a bootstrap test that reads vstorage to verify the chain policies are published. ### Upgrade Considerations The core eval would have to write to vstorage again to update the policies --- .../proposals/f:fast-usdc/package.json | 2 +- .../boot/test/fast-usdc/fast-usdc.test.ts | 20 ++++- .../fast-usdc/snapshots/fast-usdc.test.ts.md | 19 ++++ .../snapshots/fast-usdc.test.ts.snap | Bin 0 -> 585 bytes .../scripts/fast-usdc/init-fast-usdc.js | 82 ++++++++++++++++-- .../fast-usdc/src/exos/transaction-feed.js | 2 +- packages/fast-usdc/src/fast-usdc.start.js | 26 +++++- packages/fast-usdc/src/type-guards.js | 30 ++++++- packages/fast-usdc/src/types.ts | 17 ++++ 9 files changed, 182 insertions(+), 16 deletions(-) create mode 100644 packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md create mode 100644 packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap diff --git a/a3p-integration/proposals/f:fast-usdc/package.json b/a3p-integration/proposals/f:fast-usdc/package.json index f36242aeaac..50fe4c4fd59 100644 --- a/a3p-integration/proposals/f:fast-usdc/package.json +++ b/a3p-integration/proposals/f:fast-usdc/package.json @@ -4,7 +4,7 @@ "$UNTIL": "write-chain-info to agoricNames until #10445 and chainHub setup", "sdk-generate": [ "orchestration/write-chain-info.js", - "fast-usdc/init-fast-usdc.js submission --oracleSet A3P_INTEGRATION" + "fast-usdc/init-fast-usdc.js submission --net A3P_INTEGRATION" ], "type": "/agoric.swingset.CoreEvalProposal" }, diff --git a/packages/boot/test/fast-usdc/fast-usdc.test.ts b/packages/boot/test/fast-usdc/fast-usdc.test.ts index 4e944c92c2f..0c45352247f 100644 --- a/packages/boot/test/fast-usdc/fast-usdc.test.ts +++ b/packages/boot/test/fast-usdc/fast-usdc.test.ts @@ -2,6 +2,7 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import type { TestFn } from 'ava'; import type { FastUSDCKit } from '@agoric/fast-usdc/src/fast-usdc.start.js'; +import { documentStorageSchema } from '@agoric/governance/tools/storageDoc.js'; import { Fail } from '@endo/errors'; import { unmarshalFromVstorage } from '@agoric/internal/src/marshal.js'; import { makeMarshal } from '@endo/marshal'; @@ -36,11 +37,17 @@ test.serial( walletFactoryDriver: wd, } = t.context; - const watcherWallet = await wd.provideSmartWallet('agoric1watcher1'); + const [watcherWallet] = await Promise.all([ + wd.provideSmartWallet('agoric144rrhh4m09mh7aaffhm6xy223ym76gve2x7y78'), + wd.provideSmartWallet('agoric19d6gnr9fyp6hev4tlrg87zjrzsd5gzr5qlfq2p'), + wd.provideSmartWallet('agoric19uscwxdac6cf6z7d5e26e0jm0lgwstc47cpll8'), + wd.provideSmartWallet('agoric1krunjcqfrf7la48zrvdfeeqtls5r00ep68mzkr'), + wd.provideSmartWallet('agoric1n4fcxsnkxe4gj6e24naec99hzmc4pjfdccy5nj'), + ]); const materials = buildProposal( '@agoric/builders/scripts/fast-usdc/init-fast-usdc.js', - ['--oracle', 'a:agoric1watcher1'], + ['--net', 'MAINNET'], ); await evalProposal(materials); @@ -99,6 +106,15 @@ test.serial( }, ); +test.serial('writes feed policy to vstorage', async t => { + const { storage } = t.context; + const doc = { + node: 'fastUsdc.feedPolicy', + owner: 'the general and chain-specific policies for the Fast USDC feed', + }; + await documentStorageSchema(t, storage, doc); +}); + test.serial('restart contract', async t => { const { EV } = t.context.runUtils; await null; diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md new file mode 100644 index 00000000000..344b11a78a3 --- /dev/null +++ b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md @@ -0,0 +1,19 @@ +# Snapshot report for `test/fast-usdc/fast-usdc.test.ts` + +The actual snapshot is saved in `fast-usdc.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## writes feed policy to vstorage + +> Under "published", the "fastUsdc.feedPolicy" node is delegated to the general and chain-specific policies for the Fast USDC feed. +> The example below illustrates the schema of the data published there. +> +> See also board marshalling conventions (_to appear_). + + [ + [ + 'published.fastUsdc.feedPolicy', + '{"blockHeight":"0","values":["{\\"chainPolicies\\":{\\"Arbitrum\\":{\\"cctpTokenMessengerAddress\\":\\"0x19330d10D9Cc8751218eaf51E8885D058642E08A\\",\\"chainId\\":42161,\\"confirmations\\":2,\\"nobleContractAddress\\":\\"0x19330d10D9Cc8751218eaf51E8885D058642E08A\\"}},\\"nobleAgoricChannelId\\":\\"channel-21\\",\\"nobleDomainId\\":4}"]}', + ], + ] diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..bcd15339a6b1f84c45e0c80d3a028594068b77c9 GIT binary patch literal 585 zcmV-P0=E4@RzVQo(8)F%Xq((iXR1LV9fxI!uM?*mlZ&xa+C!m`sMY&wDIX$oM}lz?rcUnet4c z#u5U`=%xrS(Vzp(z)04tVc*v%RH4MZ?Nl_Obq)3-_`ojCX4A%&{myxX4A-!zHL@JF zy<$r1r4J6GbtA)z3Kzg^(L~Xx>``w_IqY{jXNU~6w=B2dBwK*<6=>} + * @type {Record>} * * TODO: determine OCW operator addresses * meanwhile, use price oracle addresses (from updatePriceFeeds.js). @@ -34,6 +34,19 @@ const configurations = { gov2: 'agoric1wrfh296eu2z34p6pah7q04jjuyj3mxu9v98277', gov3: 'agoric1ydzxwh6f893jvpaslmaz6l8j2ulup9a7x8qvvq', }, + feedPolicy: { + nobleAgoricChannelId: 'TODO', + nobleDomainId: 4, + chainPolicies: { + Arbitrum: { + cctpTokenMessengerAddress: + '0x19330d10D9Cc8751218eaf51E8885D058642E08A', + chainId: 42161, + confirmations: 2, + nobleContractAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', + }, + }, + }, }, MAINNET: { oracles: { @@ -43,6 +56,19 @@ const configurations = { 'Simply Staking': 'agoric1krunjcqfrf7la48zrvdfeeqtls5r00ep68mzkr', P2P: 'agoric1n4fcxsnkxe4gj6e24naec99hzmc4pjfdccy5nj', }, + feedPolicy: { + nobleAgoricChannelId: 'channel-21', + nobleDomainId: 4, + chainPolicies: { + Arbitrum: { + cctpTokenMessengerAddress: + '0x19330d10D9Cc8751218eaf51E8885D058642E08A', + chainId: 42161, + confirmations: 2, + nobleContractAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', + }, + }, + }, }, DEVNET: { oracles: { @@ -52,12 +78,36 @@ const configurations = { 'Simply Staking': 'agoric1qj07c7vfk3knqdral0sej7fa6eavkdn8vd8etf', P2P: 'agoric10vjkvkmpp9e356xeh6qqlhrny2htyzp8hf88fk', }, + feedPolicy: { + nobleAgoricChannelId: 'TODO', + nobleDomainId: 4, + chainPolicies: { + Arbitrum: { + cctpTokenMessengerAddress: '0xTODO', + chainId: 421614, + confirmations: 2, + nobleContractAddress: '0xTODO', + }, + }, + }, }, EMERYNET: { oracles: { gov1: 'agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce', gov2: 'agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang', }, + feedPolicy: { + nobleAgoricChannelId: 'TODO', + nobleDomainId: 4, + chainPolicies: { + Arbitrum: { + cctpTokenMessengerAddress: '0xTODO', + chainId: 421614, + confirmations: 2, + nobleContractAddress: '0xTODO', + }, + }, + }, }, }; @@ -67,7 +117,7 @@ const options = { variableRate: { type: 'string', default: '0.01' }, maxVariableFee: { type: 'string', default: '5' }, contractRate: { type: 'string', default: '0.2' }, - oracleSet: { type: 'string' }, + net: { type: 'string' }, oracle: { type: 'string', multiple: true }, usdcDenom: { type: 'string', @@ -76,15 +126,19 @@ const options = { }, }; const oraclesUsage = 'use --oracle name:address ...'; + +const feedPolicyUsage = 'use --feedPolicy ...'; + /** * @typedef {{ * flatFee: string; * variableRate: string; * maxVariableFee: string; * contractRate: string; - * oracleSet?: string; + * net?: string; * oracle?: string[]; * usdcDenom: string; + * feedPolicy?: string; * }} FastUSDCOpts */ @@ -126,15 +180,26 @@ export default async (homeP, endowments) => { /** @type {{ values: FastUSDCOpts }} */ // @ts-expect-error ensured by options const { - values: { oracle: oracleArgs, oracleSet, usdcDenom, ...fees }, + values: { oracle: oracleArgs, net, usdcDenom, feedPolicy, ...fees }, } = parseArgs({ args: scriptArgs, options }); + const parseFeedPolicy = () => { + if (net) { + if (!(net in configurations)) { + throw Error(`${net} not in ${keys(configurations)}`); + } + return configurations[net].feedPolicy; + } + if (!feedPolicy) throw Error(feedPolicyUsage); + return JSON.parse(feedPolicy); + }; + const parseOracleArgs = () => { - if (oracleSet) { - if (!(oracleSet in configurations)) { - throw Error(`${oracleSet} not in ${keys(configurations)}`); + if (net) { + if (!(net in configurations)) { + throw Error(`${net} not in ${keys(configurations)}`); } - return configurations[oracleSet].oracles; + return configurations[net].oracles; } if (!oracleArgs) throw Error(oraclesUsage); return Object.fromEntries( @@ -168,6 +233,7 @@ export default async (homeP, endowments) => { usdcDenom, }, feeConfig: parseFeeConfigArgs(), + feedPolicy: parseFeedPolicy(), }); await writeCoreEval('start-fast-usdc', utils => diff --git a/packages/fast-usdc/src/exos/transaction-feed.js b/packages/fast-usdc/src/exos/transaction-feed.js index e150b3d3826..782236d615f 100644 --- a/packages/fast-usdc/src/exos/transaction-feed.js +++ b/packages/fast-usdc/src/exos/transaction-feed.js @@ -68,7 +68,7 @@ export const prepareTransactionFeedKit = (zone, zcf) => { creator: { /** * An "operator invitation" is an invitation to be an operator in the - * oracle netowrk, with the able to submit data to submit evidence of + * oracle network, with the able to submit data to submit evidence of * CCTP transactions. * * @param {string} operatorId unique per contract instance diff --git a/packages/fast-usdc/src/fast-usdc.start.js b/packages/fast-usdc/src/fast-usdc.start.js index a074bd70964..96f14569dad 100644 --- a/packages/fast-usdc/src/fast-usdc.start.js +++ b/packages/fast-usdc/src/fast-usdc.start.js @@ -3,7 +3,11 @@ import { Fail } from '@endo/errors'; import { E } from '@endo/far'; import { makeMarshal } from '@endo/marshal'; import { M } from '@endo/patterns'; -import { FastUSDCTermsShape, FeeConfigShape } from './type-guards.js'; +import { + FastUSDCTermsShape, + FeeConfigShape, + FeedPolicyShape, +} from './type-guards.js'; import { fromExternalConfig } from './utils/config-marshal.js'; /** @@ -13,9 +17,10 @@ import { fromExternalConfig } from './utils/config-marshal.js'; * @import {Board} from '@agoric/vats' * @import {ManifestBundleRef} from '@agoric/deploy-script-support/src/externalTypes.js' * @import {BootstrapManifest} from '@agoric/vats/src/core/lib-boot.js' + * @import {Passable} from '@endo/marshal'; * @import {LegibleCapData} from './utils/config-marshal.js' * @import {FastUsdcSF, FastUsdcTerms} from './fast-usdc.contract.js' - * @import {FeeConfig} from './types.js' + * @import {FeeConfig, FeedPolicy} from './types.js' */ const trace = makeTracer('FUSD-Start', true); @@ -27,6 +32,7 @@ const contractName = 'fastUsdc'; * terms: FastUsdcTerms; * oracles: Record; * feeConfig: FeeConfig; + * feedPolicy: FeedPolicy & Passable; * }} FastUSDCConfig */ /** @type {TypedPattern} */ @@ -34,6 +40,7 @@ export const FastUSDCConfigShape = M.splitRecord({ terms: FastUSDCTermsShape, oracles: M.recordOf(M.string(), M.string()), feeConfig: FeeConfigShape, + feedPolicy: FeedPolicyShape, }); /** @@ -72,6 +79,17 @@ const publishDisplayInfo = async (brand, { board, chainStorage }) => { await E(node).setValue(JSON.stringify(aux)); }; +const FEED_POLICY = 'feedPolicy'; + +/** + * @param {ERef} node + * @param {FeedPolicy} policy + */ +const publishFeedPolicy = async (node, policy) => { + const feedPolicy = E(node).makeChildNode(FEED_POLICY); + await E(feedPolicy).setValue(JSON.stringify(policy)); +}; + /** * @typedef { PromiseSpaceOf<{ * fastUsdcKit: FastUSDCKit @@ -131,7 +149,7 @@ export const startFastUSDC = async ( USDC: await E(USDCissuer).getBrand(), }); - const { terms, oracles, feeConfig } = fromExternalConfig( + const { terms, oracles, feeConfig, feedPolicy } = fromExternalConfig( config?.options, // just in case config is missing somehow brands, FastUSDCConfigShape, @@ -182,6 +200,8 @@ export const startFastUSDC = async ( fastUsdcKit.resolve(harden({ ...kit, privateArgs })); const { instance, creatorFacet } = kit; + await publishFeedPolicy(storageNode, feedPolicy); + const { issuers: { PoolShares: shareIssuer }, brands: { PoolShares: shareBrand }, diff --git a/packages/fast-usdc/src/type-guards.js b/packages/fast-usdc/src/type-guards.js index 677144eeffe..425551bea65 100644 --- a/packages/fast-usdc/src/type-guards.js +++ b/packages/fast-usdc/src/type-guards.js @@ -6,7 +6,7 @@ import { PendingTxStatus } from './constants.js'; * @import {TypedPattern} from '@agoric/internal'; * @import {FastUsdcTerms} from './fast-usdc.contract.js'; * @import {USDCProposalShapes} from './pool-share-math.js'; - * @import {CctpTxEvidence, FeeConfig, PendingTx, PoolMetrics} from './types.js'; + * @import {CctpTxEvidence, FeeConfig, PendingTx, PoolMetrics, ChainPolicy, FeedPolicy} from './types.js'; */ /** @@ -93,3 +93,31 @@ export const PoolMetricsShape = { totalRepays: AmountShape, }; harden(PoolMetricsShape); + +/** @type {TypedPattern} */ +export const ChainPoliciesShape = M.splitRecord( + { + nobleContractAddress: EvmHashShape, + cctpTokenMessengerAddress: EvmHashShape, + confirmations: M.number(), + chainId: M.number(), + }, + { chainType: M.number() }, +); +harden(ChainPoliciesShape); + +/** + * @type {TypedPattern} + * + * Should be JSON serializable so CLI can specify policy. E.g. no bigint, + * undefined, remotable, etc. + */ +export const FeedPolicyShape = M.splitRecord( + { + nobleDomainId: M.number(), + nobleAgoricChannelId: M.string(), + chainPolicies: M.recordOf(M.string(), ChainPoliciesShape), + }, + { eventFilter: M.string() }, +); +harden(FeedPolicyShape); diff --git a/packages/fast-usdc/src/types.ts b/packages/fast-usdc/src/types.ts index c4b7820d4c8..ef9017c5b6b 100644 --- a/packages/fast-usdc/src/types.ts +++ b/packages/fast-usdc/src/types.ts @@ -5,6 +5,8 @@ import type { PendingTxStatus } from './constants.js'; export type EvmHash = `0x${string}`; export type NobleAddress = `noble1${string}`; +export type EvmChainID = number; +export type EvmChainName = string; export interface CctpTxEvidence { /** from Noble RPC */ @@ -55,4 +57,19 @@ export interface PoolMetrics extends PoolStats { shareWorth: Ratio; } +export interface ChainPolicy { + nobleContractAddress: EvmHash; + cctpTokenMessengerAddress: EvmHash; + confirmations: number; + chainId: EvmChainID; + chainType?: number; +} + +export interface FeedPolicy { + nobleDomainId: number; + nobleAgoricChannelId: string; + chainPolicies: Record; + eventFilter?: string; +} + export type * from './constants.js'; From 226eda9015ce915ea8bb7864bdf8ab51398433ae Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Wed, 20 Nov 2024 14:34:54 -0500 Subject: [PATCH 010/174] chore(cosmic-swingset): Type-check JS files --- packages/cosmic-swingset/tsconfig.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/cosmic-swingset/tsconfig.json b/packages/cosmic-swingset/tsconfig.json index 993dde391d7..ac54f062118 100644 --- a/packages/cosmic-swingset/tsconfig.json +++ b/packages/cosmic-swingset/tsconfig.json @@ -1,9 +1,6 @@ // This file can contain .js-specific Typescript compiler config. { "extends": "../../tsconfig.json", - "compilerOptions": { - "checkJs": false, - }, "include": [ "calc-*.js", "src/**/*.js", From a9fdcea5a6e05b3aa514653f53046f1086c8bcb7 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Wed, 20 Nov 2024 14:34:54 -0500 Subject: [PATCH 011/174] chore(cosmic-swingset): Fix lint issues --- .../cosmic-swingset/src/anylogger-agoric.js | 4 +- packages/cosmic-swingset/src/chain-main.js | 8 ++- packages/cosmic-swingset/src/entrypoint.js | 4 +- .../src/helpers/bufferedStorage.js | 20 ++++--- packages/cosmic-swingset/src/sim-chain.js | 54 ++++++++++++------- .../test/clean-core-eval.test.js | 2 + packages/cosmic-swingset/test/gov-code.js | 1 + .../test/provision-smartwallet.test.js | 3 +- .../cosmic-swingset/test/run-policy.test.js | 2 + packages/cosmic-swingset/tools/test-kit.js | 2 + packages/internal/src/chain-utils.js | 1 + packages/swingset-liveslots/src/liveslots.js | 2 +- 12 files changed, 65 insertions(+), 38 deletions(-) diff --git a/packages/cosmic-swingset/src/anylogger-agoric.js b/packages/cosmic-swingset/src/anylogger-agoric.js index d870c48cb3e..92353c40e0a 100644 --- a/packages/cosmic-swingset/src/anylogger-agoric.js +++ b/packages/cosmic-swingset/src/anylogger-agoric.js @@ -32,8 +32,8 @@ const selectedCode = anylogger.levels[selectedLevel]; const globalCode = selectedCode === undefined ? -Infinity : selectedCode; const oldExt = anylogger.ext; -anylogger.ext = (l, o) => { - l = oldExt(l, o); +anylogger.ext = logger => { + const l = oldExt(logger); l.enabledFor = lvl => globalCode >= anylogger.levels[lvl]; const prefix = l.name.replace(/:/g, ': '); diff --git a/packages/cosmic-swingset/src/chain-main.js b/packages/cosmic-swingset/src/chain-main.js index 2efd94998a8..5f65f771e62 100644 --- a/packages/cosmic-swingset/src/chain-main.js +++ b/packages/cosmic-swingset/src/chain-main.js @@ -1,6 +1,6 @@ // @ts-check -import path from 'node:path'; +import nativePath from 'node:path'; import v8 from 'node:v8'; import process from 'node:process'; import fs from 'node:fs'; @@ -167,7 +167,11 @@ const makePrefixedBridgeStorage = ( }); }; -export default async function main(progname, args, { env, homedir, agcc }) { +export default async function main( + progname, + args, + { env, homedir, path = nativePath, agcc }, +) { const portNums = {}; // TODO: use the 'basedir' pattern diff --git a/packages/cosmic-swingset/src/entrypoint.js b/packages/cosmic-swingset/src/entrypoint.js index 7e1b2de18b2..e6b305a496e 100755 --- a/packages/cosmic-swingset/src/entrypoint.js +++ b/packages/cosmic-swingset/src/entrypoint.js @@ -18,9 +18,9 @@ import main from './chain-main.js'; const log = anylogger('ag-chain-cosmos'); main(process.argv[1], process.argv.splice(2), { - path, - homedir: os.homedir(), env: process.env, + homedir: os.homedir(), + path, agcc, }).then( _res => 0, diff --git a/packages/cosmic-swingset/src/helpers/bufferedStorage.js b/packages/cosmic-swingset/src/helpers/bufferedStorage.js index 8d860e06f58..0233faa492d 100644 --- a/packages/cosmic-swingset/src/helpers/bufferedStorage.js +++ b/packages/cosmic-swingset/src/helpers/bufferedStorage.js @@ -5,7 +5,7 @@ import { assert, Fail } from '@endo/errors'; // XXX Do these "StorageAPI" functions belong in their own package? /** - * @template {unknown} [T=unknown] + * @template [T=unknown] * @typedef {{ * has: (key: string) => boolean, * get: (key: string) => T | undefined, @@ -16,7 +16,7 @@ import { assert, Fail } from '@endo/errors'; */ /** - * @template {unknown} [T=unknown] + * @template [T=unknown] * @typedef {KVStore & {commit: () => void, abort: () => void}} BufferedKVStore */ @@ -210,15 +210,13 @@ export function provideEnhancedKVStore(mapOrKvStore = new Map()) { * until told to commit (or abort) them. * * @template [T=unknown] - * @param {KVStore} kvStore The StorageAPI object to wrap - * @param {{ - * onGet?: (key: string, value: T | undefined) => void, // a callback invoked after getting a value from kvStore - * onPendingSet?: (key: string, value: T) => void, // a callback invoked after a new uncommitted value is set - * onPendingDelete?: (key: string) => void, // a callback invoked after a new uncommitted delete - * onCommit?: () => void, // a callback invoked after pending operations have been committed - * onAbort?: () => void, // a callback invoked after pending operations have been aborted - * }} listeners Optional callbacks to be invoked when respective events occur - * + * @param {KVStore} kvStore the StorageAPI object to wrap + * @param {object} [listeners] optional callbacks to be invoked when respective events occur + * @param {(key: string, value: T | undefined) => void} [listeners.onGet] a callback invoked after getting a value from kvStore + * @param {(key: string, value: T) => void} [listeners.onPendingSet] a callback invoked after a new uncommitted value is set + * @param {(key: string) => void} [listeners.onPendingDelete] a callback invoked after a new uncommitted delete + * @param {() => void} [listeners.onCommit] a callback invoked after pending operations have been committed + * @param {() => void} [listeners.onAbort] a callback invoked after pending operations have been aborted * @returns {{kvStore: KVStore} & Pick, 'commit' | 'abort'>} */ export function makeBufferedStorage(kvStore, listeners = {}) { diff --git a/packages/cosmic-swingset/src/sim-chain.js b/packages/cosmic-swingset/src/sim-chain.js index 93e5a98d4e5..2ffecc93914 100644 --- a/packages/cosmic-swingset/src/sim-chain.js +++ b/packages/cosmic-swingset/src/sim-chain.js @@ -19,8 +19,11 @@ import { launch } from './launch-chain.js'; import { getTelemetryProviders } from './kernel-stats.js'; import { DEFAULT_SIM_SWINGSET_PARAMS, QueueInbound } from './sim-params.js'; import { parseQueueSizes } from './params.js'; +import { makeKVStoreFromMap } from './helpers/bufferedStorage.js'; import { makeQueue, makeQueueStorageMock } from './helpers/make-queue.js'; +/** @import { Mailbox } from '@agoric/swingset-vat' */ + const console = anylogger('fake-chain'); const TELEMETRY_SERVICE_NAME = 'sim-cosmos'; @@ -28,10 +31,11 @@ const TELEMETRY_SERVICE_NAME = 'sim-cosmos'; const PRETEND_BLOCK_DELAY = 5; const scaleBlockTime = ms => Math.floor(ms / 1000); -async function makeMapStorage(file) { - let content; +async function makeMailboxStorageFromFile(file) { + /** @type {Map} */ const map = new Map(); - map.commit = async () => { + const kvStore = makeKVStoreFromMap(map); + const commit = async () => { const obj = {}; for (const [k, v] of map.entries()) { obj[k] = exportMailbox(v); @@ -39,20 +43,24 @@ async function makeMapStorage(file) { const json = stringify(obj); await fs.promises.writeFile(file, json); }; - - await (async () => { - content = await fs.promises.readFile(file); + const read = async () => { + const content = await fs.promises.readFile(file, 'utf8'); return JSON.parse(content); - })().then( - obj => { - for (const [k, v] of Object.entries(obj)) { - map.set(k, importMailbox(v)); - } - }, - () => {}, - ); + }; + const load = async obj => { + map.clear(); + for (const [k, v] of Object.entries(obj)) { + map.set(k, importMailbox(v)); + } + }; + const reset = async () => { + const obj = await read(); + await load(obj); + }; - return map; + await read().then(load, () => {}); + + return { ...kvStore, commit, abort: reset }; } export async function connectToFakeChain(basedir, GCI, delay, inbound) { @@ -61,7 +69,7 @@ export async function connectToFakeChain(basedir, GCI, delay, inbound) { const mailboxFile = path.join(basedir, `fake-chain-${GCI}-mailbox.json`); const bootAddress = `${GCI}-client`; - const mailboxStorage = await makeMapStorage(mailboxFile); + const mailboxStorage = await makeMailboxStorageFromFile(mailboxFile); const argv = { giveMeAllTheAgoricPowers: true, @@ -109,6 +117,7 @@ export async function connectToFakeChain(basedir, GCI, delay, inbound) { const actionQueue = makeQueue(actionQueueStorage); const s = await launch({ + bridgeOutbound: /** @type {any} */ (undefined), actionQueueStorage, highPriorityQueueStorage, kernelStateDBDir: stateDBdir, @@ -120,13 +129,20 @@ export async function connectToFakeChain(basedir, GCI, delay, inbound) { debugName: GCI, metricsProvider, slogSender, + swingsetConfig: {}, }); const { blockingSend, savedHeight } = s; let blockHeight = savedHeight; const intoChain = []; - let nextBlockTimeout = 0; + /** @type {undefined | ReturnType} */ + let nextBlockTimeout; + const resetNextBlockTimeout = () => { + if (nextBlockTimeout === undefined) return; + clearTimeout(nextBlockTimeout); + nextBlockTimeout = undefined; + }; const maximumDelay = (delay || PRETEND_BLOCK_DELAY) * 1000; @@ -172,7 +188,7 @@ export async function connectToFakeChain(basedir, GCI, delay, inbound) { // Done processing, "commit the block". await blockingSend({ type: 'COMMIT_BLOCK', blockHeight, blockTime }); - clearTimeout(nextBlockTimeout); + resetNextBlockTimeout(); nextBlockTimeout = setTimeout(simulateBlock, maximumDelay); // TODO: maybe add latency to the inbound messages. @@ -197,7 +213,7 @@ export async function connectToFakeChain(basedir, GCI, delay, inbound) { // Only actually simulate a block if we're not in bootstrap. let p; if (blockHeight && !delay) { - clearTimeout(nextBlockTimeout); + resetNextBlockTimeout(); p = simulateBlock(); } await p; diff --git a/packages/cosmic-swingset/test/clean-core-eval.test.js b/packages/cosmic-swingset/test/clean-core-eval.test.js index 9c0a9717f76..e04cb24f401 100644 --- a/packages/cosmic-swingset/test/clean-core-eval.test.js +++ b/packages/cosmic-swingset/test/clean-core-eval.test.js @@ -5,6 +5,8 @@ import { } from '../scripts/clean-core-eval.js'; test('defangEvaluableCode is working', t => { + /** @typedef {import('ava').ThrowsExpectation} EvaluationExpectation */ + /** @type {Array<[string, string?, EvaluationExpectation?, EvaluationExpectation?]>} */ const samples = [ [''], [ diff --git a/packages/cosmic-swingset/test/gov-code.js b/packages/cosmic-swingset/test/gov-code.js index a66d2b11994..dd52188eeeb 100644 --- a/packages/cosmic-swingset/test/gov-code.js +++ b/packages/cosmic-swingset/test/gov-code.js @@ -1,4 +1,5 @@ /* global E */ +/// /** * This file, along with the companion `gov-permit.json`, are used to test "big * hammer" chain governance. They don't have a functional purpose outside of diff --git a/packages/cosmic-swingset/test/provision-smartwallet.test.js b/packages/cosmic-swingset/test/provision-smartwallet.test.js index 2162550fe82..8fdea18bd30 100644 --- a/packages/cosmic-swingset/test/provision-smartwallet.test.js +++ b/packages/cosmic-swingset/test/provision-smartwallet.test.js @@ -40,7 +40,7 @@ test.before(async t => { const io = { spawn: ambientSpawn, cwd: makefileDir }; const pspawnMake = pspawn('make', io); const pspawnAgd = pspawn('bin/ag-chain-cosmos', io); - const scenario2 = makeScenario2({ pspawnMake, pspawnAgd, delay, log: t.log }); + const scenario2 = makeScenario2({ pspawnMake, pspawnAgd, log: t.log }); const walletTool = makeWalletTool({ runMake: scenario2.runMake, pspawnAgd, @@ -65,6 +65,7 @@ test.before(async t => { // if run with the test above. // TODO: https://github.com/Agoric/agoric-sdk/issues/6766 test.skip('integration test: smart wallet provision', async t => { + // @ts-expect-error context has unknown type const { scenario2, walletTool, soloAddr } = t.context; const enoughBlocksToProvision = 7; diff --git a/packages/cosmic-swingset/test/run-policy.test.js b/packages/cosmic-swingset/test/run-policy.test.js index e062b48f622..91157278905 100644 --- a/packages/cosmic-swingset/test/run-policy.test.js +++ b/packages/cosmic-swingset/test/run-policy.test.js @@ -15,6 +15,7 @@ import { makeVatCleanupBudgetFromKeywords, } from '../src/sim-params.js'; +/** @import { ManagerType, SwingSetConfig } from '@agoric/swingset-vat' */ /** @import { KVStore } from '../src/helpers/bufferedStorage.js' */ /** @@ -59,6 +60,7 @@ test('cleanup work must be limited by vat_cleanup_budget', async t => { bundles: makeSourceDescriptors({ puppet: '@agoric/swingset-vat/tools/vat-puppet.js', }), + /** @type {Partial} */ configOverrides: { // Aggressive GC. defaultReapInterval: 1, diff --git a/packages/cosmic-swingset/tools/test-kit.js b/packages/cosmic-swingset/tools/test-kit.js index ee14da4a4e7..175038c291c 100644 --- a/packages/cosmic-swingset/tools/test-kit.js +++ b/packages/cosmic-swingset/tools/test-kit.js @@ -35,6 +35,7 @@ const stripUndefined = obj => Object.entries(obj).filter(([_key, value]) => value !== undefined), ); +/** @type {InitMsg} */ export const defaultInitMessage = harden( makeInitMsg({ type: SwingsetMessageType.AG_COSMOS_INIT, @@ -59,6 +60,7 @@ export const defaultInitMessage = harden( ), }), ); +/** @type {InitMsg} */ export const defaultBootstrapMessage = harden({ ...deepCopyJsonable(defaultInitMessage), blockHeight: 1, diff --git a/packages/internal/src/chain-utils.js b/packages/internal/src/chain-utils.js index fe1716a6016..264c3391b1d 100644 --- a/packages/internal/src/chain-utils.js +++ b/packages/internal/src/chain-utils.js @@ -25,6 +25,7 @@ import * as _ActionType from './action-types.js'; * @typedef {BlockInfo & { * type: typeof _ActionType.AG_COSMOS_INIT; * chainID: string; + * isBootstrap?: boolean; * supplyCoins: { denom: string; amount: NatString }[]; * }} InitMsg * cosmosInitAction fields that are subject to consensus. See cosmosInitAction diff --git a/packages/swingset-liveslots/src/liveslots.js b/packages/swingset-liveslots/src/liveslots.js index 73855c704af..b0d82478a8f 100644 --- a/packages/swingset-liveslots/src/liveslots.js +++ b/packages/swingset-liveslots/src/liveslots.js @@ -1319,7 +1319,7 @@ function build( /** * @param {import('./types.js').VatDeliveryObject} delivery - * @returns {void | Promise} + * @returns {undefined | ReturnType} */ function dispatchToUserspace(delivery) { let result; From 9e19321ea8fed32d445d44169b32f5d94a93d61e Mon Sep 17 00:00:00 2001 From: Mujahid Khan <106528609+mujahidkay@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:38:24 +0500 Subject: [PATCH 012/174] fix(telemetry): event name typo --- packages/telemetry/src/slog-to-otel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/telemetry/src/slog-to-otel.js b/packages/telemetry/src/slog-to-otel.js index bf91db575aa..b539b7da8e4 100644 --- a/packages/telemetry/src/slog-to-otel.js +++ b/packages/telemetry/src/slog-to-otel.js @@ -976,7 +976,7 @@ export const makeSlogToOtelKit = (tracer, overrideAttrs = {}) => { spans.pop('timer-poll'); break; } - case 'cosmic-swinget-inject-kernel-upgrade-events': { + case 'cosmic-swingset-inject-kernel-upgrade-events': { spans.push('kernel-upgrade-events'); spans.pop('kernel-upgrade-events'); break; From 63744cbe7db9b93a97a3b2e9a015aeebe8026dba Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 15:38:01 -0800 Subject: [PATCH 013/174] chore(types): fix 'self' on this in prepareExo --- packages/vat-data/src/exo-utils.js | 5 ++++- packages/zoe/src/zoeService/installationStorage.js | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/vat-data/src/exo-utils.js b/packages/vat-data/src/exo-utils.js index c898bae3cce..867a63196e8 100644 --- a/packages/vat-data/src/exo-utils.js +++ b/packages/vat-data/src/exo-utils.js @@ -289,7 +289,10 @@ export const makeExoUtils = VatData => { * @param {Baggage} baggage * @param {string} kindName * @param {InterfaceGuard | undefined} interfaceGuard - * @param {M} methods + * @param {M & + * ThisType<{ + * self: RemotableObject & M; + * }>} methods * @param {DefineKindOptions<{ self: M }>} [options] * @returns {import('@endo/exo').Guarded} */ diff --git a/packages/zoe/src/zoeService/installationStorage.js b/packages/zoe/src/zoeService/installationStorage.js index f931c68838a..da6c53e6555 100644 --- a/packages/zoe/src/zoeService/installationStorage.js +++ b/packages/zoe/src/zoeService/installationStorage.js @@ -101,7 +101,6 @@ export const makeInstallationStorage = (getBundleCapForID, zoeBaggage) => { InstallationStorageI, { async installBundle(allegedBundle, bundleLabel) { - // @ts-expect-error TS doesn't understand context const { self } = this; // Bundle is a very open-ended type and we must decide here whether to // treat it as either a HashBundle or SourceBundle. So we have to @@ -149,7 +148,6 @@ export const makeInstallationStorage = (getBundleCapForID, zoeBaggage) => { } }, async getBundleIDFromInstallation(allegedInstallation) { - // @ts-expect-error TS doesn't understand context const { self } = this; const { bundleID } = await self.unwrapInstallation(allegedInstallation); // AWAIT From 0ca4a94974dfbc1640a166440ef356651ff1d7d6 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 14:52:32 -0800 Subject: [PATCH 014/174] build: license for fast-usdc package --- packages/fast-usdc/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/fast-usdc/package.json b/packages/fast-usdc/package.json index dd8dbed1d48..eaa7bb45b51 100644 --- a/packages/fast-usdc/package.json +++ b/packages/fast-usdc/package.json @@ -74,6 +74,7 @@ ], "timeout": "20m" }, + "license": "Apache-2.0", "publishConfig": { "access": "public" } From 960b9dc8133cb2df5cc4be266382946756de2951 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 14:41:41 -0800 Subject: [PATCH 015/174] test: remove obsolete resm support --- COVERAGE.md | 36 ++---------------------------------- scripts/ava-nesm.cjs | 16 ---------------- 2 files changed, 2 insertions(+), 50 deletions(-) delete mode 100755 scripts/ava-nesm.cjs diff --git a/COVERAGE.md b/COVERAGE.md index 59d8019d78d..10f16f202d2 100644 --- a/COVERAGE.md +++ b/COVERAGE.md @@ -2,17 +2,13 @@ ## Caveat -Until each module can be migrated to support Node.js's builtin ESM -implementation (`nesm`), the coverage line numbers will be out-of-sync with -reality. - -In addition, we will have to implement source maps in all of our +Lines from bundled code cannot be detected until we implement source maps in all of our source-to-source transforms (such as `@endo/bundle-source`, `@agoric/transform-metering`, and `@agoric/static-module-record`). ## Reports -Coverage reports for the current main branch (whose packages support `nesm`) are +Coverage reports for the current main branch are published by CI to: https://agoric-sdk-coverage.netlify.app You can create a report in any package (including the top-level directory): @@ -27,34 +23,6 @@ yarn c8 report --reporter=html-spa open coverage/html/index.html ``` -## Node.js ESM Support - -With the current `patches/esm+3.2.25.diff`, it is possible to migrate packages -to support both resm (`-r esm`) and nesm (Node.js ESM Support). If an -`agoric-sdk` package has dependencies that support nesm, you can attempt to make -it also support nesm by: - -1. Create `ava-nesm.config.js` removing `"require": ["esm"]`: - -```sh -../../scripts/ava-nesm.cjs > ava-nesm.config.js -``` - -2. Make the following changes to its `package.json` (omitting comments): - -```js -{ - // Enable nesm support. - "type": "module", - "scripts": { - // The following line enables coverage generation from the top. - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js" - } -} -``` - -3. Test that both `yarn test` and `yarn test:c8` run correctly. - ## Planned Implementation Our runtime source transforms can be conditional on the `$NODE_V8_COVERAGE` diff --git a/scripts/ava-nesm.cjs b/scripts/ava-nesm.cjs deleted file mode 100755 index 8b922b98ffc..00000000000 --- a/scripts/ava-nesm.cjs +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/env node -const fs = require('fs'); -const packageJson = fs.readFileSync('package.json', 'utf-8'); -const package = JSON.parse(packageJson); -const { ava: avaConfig } = package; -if (avaConfig.require) { - const newRequire = avaConfig.require.filter(m => m !== 'esm'); - if (newRequire.length) { - avaConfig.require = newRequire; - } else { - delete avaConfig.require; - } -} -process.stdout.write(`\ -export default ${JSON.stringify(avaConfig, undefined, 2)}; -`); From 9d728cfabed6e20cf393269f11b13c42e8e2520a Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 14:43:03 -0800 Subject: [PATCH 016/174] test: simplify test:c8 cmd --- packages/access-token/package.json | 2 +- packages/agoric-cli/package.json | 2 +- packages/async-flow/package.json | 2 +- packages/base-zone/package.json | 2 +- packages/cache/package.json | 2 +- packages/casting/package.json | 2 +- packages/client-utils/package.json | 2 +- packages/cosmic-swingset/package.json | 2 +- packages/create-dapp/package.json | 2 +- packages/fast-usdc/package.json | 2 +- packages/governance/package.json | 2 +- packages/import-manager/package.json | 2 +- packages/inter-protocol/package.json | 2 +- packages/kmarshal/package.json | 2 +- packages/notifier/package.json | 2 +- packages/orchestration/package.json | 2 +- packages/pegasus/package.json | 2 +- packages/solo/package.json | 2 +- packages/spawner/package.json | 2 +- packages/swing-store/package.json | 2 +- packages/swingset-runner/package.json | 2 +- packages/swingset-xsnap-supervisor/package.json | 2 +- packages/telemetry/package.json | 2 +- packages/vm-config/package.json | 2 +- packages/xsnap-lockdown/package.json | 2 +- packages/xsnap/package.json | 2 +- packages/zoe/package.json | 2 +- packages/zone/package.json | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/packages/access-token/package.json b/packages/access-token/package.json index 6651fff1643..2414b281cb7 100644 --- a/packages/access-token/package.json +++ b/packages/access-token/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/agoric-cli/package.json b/packages/agoric-cli/package.json index e8cd7299c88..2939395dba9 100644 --- a/packages/agoric-cli/package.json +++ b/packages/agoric-cli/package.json @@ -20,7 +20,7 @@ "scripts": { "build": "node ./scripts/get-sdk-package-names.js > src/sdk-package-names.js", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "integration-test": "ava --config .ava-integration-test.config.js", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/async-flow/package.json b/packages/async-flow/package.json index d1cb293a8e1..9a0f7ea3736 100644 --- a/packages/async-flow/package.json +++ b/packages/async-flow/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/base-zone/package.json b/packages/base-zone/package.json index f66978edb1c..64a7e316577 100644 --- a/packages/base-zone/package.json +++ b/packages/base-zone/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/cache/package.json b/packages/cache/package.json index de770f8d5ca..1f9412244a1 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/casting/package.json b/packages/casting/package.json index e73616edfc3..1d36a4ff19a 100644 --- a/packages/casting/package.json +++ b/packages/casting/package.json @@ -11,7 +11,7 @@ "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "demo": "node -e 'import(\"./test/fake-rpc-server.js\").then(ns => ns.develop())'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/client-utils/package.json b/packages/client-utils/package.json index 83effdc5a47..42b97cc4b65 100644 --- a/packages/client-utils/package.json +++ b/packages/client-utils/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/cosmic-swingset/package.json b/packages/cosmic-swingset/package.json index 7553af8ad4a..c7376a62994 100644 --- a/packages/cosmic-swingset/package.json +++ b/packages/cosmic-swingset/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/create-dapp/package.json b/packages/create-dapp/package.json index dd1112eff6d..54fc10fac58 100644 --- a/packages/create-dapp/package.json +++ b/packages/create-dapp/package.json @@ -12,7 +12,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/fast-usdc/package.json b/packages/fast-usdc/package.json index eaa7bb45b51..6cd3a29761c 100644 --- a/packages/fast-usdc/package.json +++ b/packages/fast-usdc/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/governance/package.json b/packages/governance/package.json index 2d76a3181e9..5b34b9158f7 100644 --- a/packages/governance/package.json +++ b/packages/governance/package.json @@ -13,7 +13,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/import-manager/package.json b/packages/import-manager/package.json index 18016783487..0ff854aa825 100644 --- a/packages/import-manager/package.json +++ b/packages/import-manager/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint": "yarn lint:eslint", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/inter-protocol/package.json b/packages/inter-protocol/package.json index f0fd36f4daa..e9abf2d4144 100644 --- a/packages/inter-protocol/package.json +++ b/packages/inter-protocol/package.json @@ -13,7 +13,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/kmarshal/package.json b/packages/kmarshal/package.json index c07b1c1bba4..c8e40c4fb09 100644 --- a/packages/kmarshal/package.json +++ b/packages/kmarshal/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/notifier/package.json b/packages/notifier/package.json index 115a664ec92..513139b570b 100644 --- a/packages/notifier/package.json +++ b/packages/notifier/package.json @@ -12,7 +12,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/orchestration/package.json b/packages/orchestration/package.json index aec0f9802c8..b513f94bbf5 100644 --- a/packages/orchestration/package.json +++ b/packages/orchestration/package.json @@ -14,7 +14,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint:types": "tsc", diff --git a/packages/pegasus/package.json b/packages/pegasus/package.json index 42ca7af6cda..29c75b0b0a6 100644 --- a/packages/pegasus/package.json +++ b/packages/pegasus/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/solo/package.json b/packages/solo/package.json index f0236ccea03..06df6dc06ef 100644 --- a/packages/solo/package.json +++ b/packages/solo/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/spawner/package.json b/packages/spawner/package.json index a8a0d8c0193..4c40756bd8f 100644 --- a/packages/spawner/package.json +++ b/packages/spawner/package.json @@ -11,7 +11,7 @@ "build": "yarn build:bundles", "build:bundles": "node scripts/build-bundles.js", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/swing-store/package.json b/packages/swing-store/package.json index a74bfc338e6..37efbd2ca5b 100644 --- a/packages/swing-store/package.json +++ b/packages/swing-store/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/swingset-runner/package.json b/packages/swingset-runner/package.json index 16c4452c52d..ed83c18f187 100644 --- a/packages/swingset-runner/package.json +++ b/packages/swingset-runner/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/swingset-xsnap-supervisor/package.json b/packages/swingset-xsnap-supervisor/package.json index 04b157e7157..6dda913e37d 100644 --- a/packages/swingset-xsnap-supervisor/package.json +++ b/packages/swingset-xsnap-supervisor/package.json @@ -19,7 +19,7 @@ "lint:types": "tsc", "lint-fix": "eslint --fix 'lib/**/*.js' 'src/**/*.js' 'scripts/**/*.js' 'test/**/*.js'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0" }, "devDependencies": { diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index 070b1f469b0..724dc39ed7f 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/vm-config/package.json b/packages/vm-config/package.json index de054026eb1..926243cdf9f 100644 --- a/packages/vm-config/package.json +++ b/packages/vm-config/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/xsnap-lockdown/package.json b/packages/xsnap-lockdown/package.json index b921b4c2888..db917d08cd9 100644 --- a/packages/xsnap-lockdown/package.json +++ b/packages/xsnap-lockdown/package.json @@ -16,7 +16,7 @@ "lint:types": "tsc", "lint-fix": "eslint --fix 'src/**/*.js' 'lib/**/*.js' 'scripts/**/*.js' 'test/**/*.js'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0" }, "devDependencies": { diff --git a/packages/xsnap/package.json b/packages/xsnap/package.json index c7126d0ae65..e6eda0dbd66 100644 --- a/packages/xsnap/package.json +++ b/packages/xsnap/package.json @@ -24,7 +24,7 @@ "lint:types": "tsc", "lint-fix": "eslint --fix 'src/**/*.js' 'test/**/*.js' api.js", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0" }, "dependencies": { diff --git a/packages/zoe/package.json b/packages/zoe/package.json index c7604a8446b..037f14a62be 100644 --- a/packages/zoe/package.json +++ b/packages/zoe/package.json @@ -13,7 +13,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava --verbose", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:unit": "ava 'test/unitTests' -T 1m --verbose", "test:swingset": "ava 'test/swingsetTests' -T 10m --verbose", "test:xs": "yarn test:xs-worker", diff --git a/packages/zone/package.json b/packages/zone/package.json index 9ee496592b2..59463ef9023 100644 --- a/packages/zone/package.json +++ b/packages/zone/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", + "test:c8": "c8 ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", From cba42ae4ec92826b76efb7f615aa424f291e2b2e Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 14:41:59 -0800 Subject: [PATCH 017/174] docs: help on code coverage --- COVERAGE.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/COVERAGE.md b/COVERAGE.md index 10f16f202d2..e5f926e023b 100644 --- a/COVERAGE.md +++ b/COVERAGE.md @@ -11,13 +11,18 @@ source-to-source transforms (such as `@endo/bundle-source`, Coverage reports for the current main branch are published by CI to: https://agoric-sdk-coverage.netlify.app -You can create a report in any package (including the top-level directory): +You can create a report in any package: +```sh +yarn test:c8 +``` + +For more flexibility: ```sh # Get options available for coverage: yarn c8 --help -# Run ava under Node.js coverage and display a summary: -yarn c8 -a ava +# Run a particular test +yarn c8 -a ava test/foo.test.js # Generate a nice, detailed HTML report: yarn c8 report --reporter=html-spa open coverage/html/index.html From d99b7d35fc1ef099265e9c2f4dd8ab560c235ff9 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 14:51:38 -0800 Subject: [PATCH 018/174] test: report src files that have zero coverage --- packages/access-token/package.json | 2 +- packages/agoric-cli/package.json | 2 +- packages/async-flow/package.json | 2 +- packages/base-zone/package.json | 2 +- packages/cache/package.json | 2 +- packages/casting/package.json | 2 +- packages/client-utils/package.json | 2 +- packages/cosmic-swingset/package.json | 2 +- packages/create-dapp/package.json | 2 +- packages/fast-usdc/package.json | 2 +- packages/governance/package.json | 2 +- packages/import-manager/package.json | 2 +- packages/inter-protocol/package.json | 2 +- packages/kmarshal/package.json | 2 +- packages/notifier/package.json | 2 +- packages/orchestration/package.json | 2 +- packages/pegasus/package.json | 2 +- packages/solo/package.json | 2 +- packages/spawner/package.json | 2 +- packages/swing-store/package.json | 2 +- packages/swingset-runner/package.json | 2 +- packages/swingset-xsnap-supervisor/package.json | 2 +- packages/telemetry/package.json | 2 +- packages/vm-config/package.json | 2 +- packages/xsnap-lockdown/package.json | 2 +- packages/xsnap/package.json | 2 +- packages/zoe/package.json | 2 +- packages/zone/package.json | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/packages/access-token/package.json b/packages/access-token/package.json index 2414b281cb7..ff1780ed630 100644 --- a/packages/access-token/package.json +++ b/packages/access-token/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/agoric-cli/package.json b/packages/agoric-cli/package.json index 2939395dba9..1124003d5d3 100644 --- a/packages/agoric-cli/package.json +++ b/packages/agoric-cli/package.json @@ -20,7 +20,7 @@ "scripts": { "build": "node ./scripts/get-sdk-package-names.js > src/sdk-package-names.js", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "integration-test": "ava --config .ava-integration-test.config.js", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/async-flow/package.json b/packages/async-flow/package.json index 9a0f7ea3736..f54c0954fa8 100644 --- a/packages/async-flow/package.json +++ b/packages/async-flow/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/base-zone/package.json b/packages/base-zone/package.json index 64a7e316577..5e2b784f210 100644 --- a/packages/base-zone/package.json +++ b/packages/base-zone/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/cache/package.json b/packages/cache/package.json index 1f9412244a1..f91ce31fc24 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/casting/package.json b/packages/casting/package.json index 1d36a4ff19a..efcea73073e 100644 --- a/packages/casting/package.json +++ b/packages/casting/package.json @@ -11,7 +11,7 @@ "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "demo": "node -e 'import(\"./test/fake-rpc-server.js\").then(ns => ns.develop())'", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/client-utils/package.json b/packages/client-utils/package.json index 42b97cc4b65..0311fe5a926 100644 --- a/packages/client-utils/package.json +++ b/packages/client-utils/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/cosmic-swingset/package.json b/packages/cosmic-swingset/package.json index c7376a62994..567b524da4e 100644 --- a/packages/cosmic-swingset/package.json +++ b/packages/cosmic-swingset/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/create-dapp/package.json b/packages/create-dapp/package.json index 54fc10fac58..2b45c0fad68 100644 --- a/packages/create-dapp/package.json +++ b/packages/create-dapp/package.json @@ -12,7 +12,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/fast-usdc/package.json b/packages/fast-usdc/package.json index 6cd3a29761c..6e3c3e1e7ff 100644 --- a/packages/fast-usdc/package.json +++ b/packages/fast-usdc/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/governance/package.json b/packages/governance/package.json index 5b34b9158f7..9b1057982cb 100644 --- a/packages/governance/package.json +++ b/packages/governance/package.json @@ -13,7 +13,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/import-manager/package.json b/packages/import-manager/package.json index 0ff854aa825..eeadee5aa50 100644 --- a/packages/import-manager/package.json +++ b/packages/import-manager/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint": "yarn lint:eslint", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/inter-protocol/package.json b/packages/inter-protocol/package.json index e9abf2d4144..f1fb8ca3b5b 100644 --- a/packages/inter-protocol/package.json +++ b/packages/inter-protocol/package.json @@ -13,7 +13,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/kmarshal/package.json b/packages/kmarshal/package.json index c8e40c4fb09..ba69513d627 100644 --- a/packages/kmarshal/package.json +++ b/packages/kmarshal/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/notifier/package.json b/packages/notifier/package.json index 513139b570b..278793d4d8e 100644 --- a/packages/notifier/package.json +++ b/packages/notifier/package.json @@ -12,7 +12,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/orchestration/package.json b/packages/orchestration/package.json index b513f94bbf5..9f02eb4f150 100644 --- a/packages/orchestration/package.json +++ b/packages/orchestration/package.json @@ -14,7 +14,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint:types": "tsc", diff --git a/packages/pegasus/package.json b/packages/pegasus/package.json index 29c75b0b0a6..623f29cd8b4 100644 --- a/packages/pegasus/package.json +++ b/packages/pegasus/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/solo/package.json b/packages/solo/package.json index 06df6dc06ef..bda3f1b61b7 100644 --- a/packages/solo/package.json +++ b/packages/solo/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/spawner/package.json b/packages/spawner/package.json index 4c40756bd8f..6d407c4363c 100644 --- a/packages/spawner/package.json +++ b/packages/spawner/package.json @@ -11,7 +11,7 @@ "build": "yarn build:bundles", "build:bundles": "node scripts/build-bundles.js", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/swing-store/package.json b/packages/swing-store/package.json index 37efbd2ca5b..66aa082debe 100644 --- a/packages/swing-store/package.json +++ b/packages/swing-store/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/swingset-runner/package.json b/packages/swingset-runner/package.json index ed83c18f187..ddbb83eddfd 100644 --- a/packages/swingset-runner/package.json +++ b/packages/swingset-runner/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/swingset-xsnap-supervisor/package.json b/packages/swingset-xsnap-supervisor/package.json index 6dda913e37d..6b26640c6c6 100644 --- a/packages/swingset-xsnap-supervisor/package.json +++ b/packages/swingset-xsnap-supervisor/package.json @@ -19,7 +19,7 @@ "lint:types": "tsc", "lint-fix": "eslint --fix 'lib/**/*.js' 'src/**/*.js' 'scripts/**/*.js' 'test/**/*.js'", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0" }, "devDependencies": { diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index 724dc39ed7f..2c06ceadcf7 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/vm-config/package.json b/packages/vm-config/package.json index 926243cdf9f..442487416ea 100644 --- a/packages/vm-config/package.json +++ b/packages/vm-config/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/xsnap-lockdown/package.json b/packages/xsnap-lockdown/package.json index db917d08cd9..11b1d56fbf8 100644 --- a/packages/xsnap-lockdown/package.json +++ b/packages/xsnap-lockdown/package.json @@ -16,7 +16,7 @@ "lint:types": "tsc", "lint-fix": "eslint --fix 'src/**/*.js' 'lib/**/*.js' 'scripts/**/*.js' 'test/**/*.js'", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0" }, "devDependencies": { diff --git a/packages/xsnap/package.json b/packages/xsnap/package.json index e6eda0dbd66..04dc7bfd5f5 100644 --- a/packages/xsnap/package.json +++ b/packages/xsnap/package.json @@ -24,7 +24,7 @@ "lint:types": "tsc", "lint-fix": "eslint --fix 'src/**/*.js' 'test/**/*.js' api.js", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0" }, "dependencies": { diff --git a/packages/zoe/package.json b/packages/zoe/package.json index 037f14a62be..eb5fc43c99a 100644 --- a/packages/zoe/package.json +++ b/packages/zoe/package.json @@ -13,7 +13,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava --verbose", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:unit": "ava 'test/unitTests' -T 1m --verbose", "test:swingset": "ava 'test/swingsetTests' -T 10m --verbose", "test:xs": "yarn test:xs-worker", diff --git a/packages/zone/package.json b/packages/zone/package.json index 59463ef9023..f7d61fd0162 100644 --- a/packages/zone/package.json +++ b/packages/zone/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", From e3e643cde0324a7e3e4e508bc19ca97c66eb7121 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 14:45:53 -0800 Subject: [PATCH 019/174] chore(deps): bump c8 to 10.1.2 only breaking change is requiring Node 18+ --- package.json | 2 +- packages/access-token/package.json | 2 +- packages/agoric-cli/package.json | 2 +- packages/boot/package.json | 2 +- packages/builders/package.json | 2 +- packages/cache/package.json | 2 +- packages/casting/package.json | 2 +- packages/client-utils/package.json | 2 +- packages/cosmic-swingset/package.json | 2 +- packages/create-dapp/package.json | 2 +- packages/fast-usdc/package.json | 2 +- packages/governance/package.json | 2 +- packages/import-manager/package.json | 2 +- packages/inter-protocol/package.json | 2 +- packages/network/package.json | 2 +- packages/notifier/package.json | 2 +- packages/orchestration/package.json | 2 +- packages/pegasus/package.json | 2 +- packages/solo/package.json | 2 +- packages/spawner/package.json | 2 +- packages/swing-store/package.json | 2 +- packages/swingset-runner/package.json | 2 +- .../swingset-xsnap-supervisor/package.json | 2 +- packages/telemetry/package.json | 2 +- packages/vats/package.json | 2 +- packages/vm-config/package.json | 2 +- packages/xsnap-lockdown/package.json | 2 +- packages/xsnap/package.json | 2 +- packages/zoe/package.json | 2 +- yarn.lock | 63 +++++++++++++++++-- 30 files changed, 87 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index d02ffa8caaa..0c1f8ff3799 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@types/express": "^4.17.17", "@types/node": "^22.0.0", "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "conventional-changelog-conventionalcommits": "^4.6.0", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", diff --git a/packages/access-token/package.json b/packages/access-token/package.json index ff1780ed630..a75717d7f87 100644 --- a/packages/access-token/package.json +++ b/packages/access-token/package.json @@ -26,7 +26,7 @@ "@types/n-readlines": "^1.0.3", "@types/proper-lockfile": "^4.1.2", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "publishConfig": { "access": "public" diff --git a/packages/agoric-cli/package.json b/packages/agoric-cli/package.json index 1124003d5d3..29ed18a9895 100644 --- a/packages/agoric-cli/package.json +++ b/packages/agoric-cli/package.json @@ -32,7 +32,7 @@ "@agoric/cosmic-swingset": "^0.41.3", "@agoric/deploy-script-support": "^0.10.3", "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "dd-trace": "^4.11.1" }, "dependencies": { diff --git a/packages/boot/package.json b/packages/boot/package.json index 53ec8d08419..5cf0ad71e72 100644 --- a/packages/boot/package.json +++ b/packages/boot/package.json @@ -58,7 +58,7 @@ "@endo/base64": "^1.0.9", "@endo/patterns": "^1.4.7", "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "ts-blank-space": "^0.4.1" }, "files": [ diff --git a/packages/builders/package.json b/packages/builders/package.json index f3658e483a2..dfc3a889763 100644 --- a/packages/builders/package.json +++ b/packages/builders/package.json @@ -53,7 +53,7 @@ "@agoric/swingset-liveslots": "^0.10.2", "@agoric/time": "^0.3.2", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "files": [ "CHANGELOG.md", diff --git a/packages/cache/package.json b/packages/cache/package.json index f91ce31fc24..0cf79b10bfb 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -29,7 +29,7 @@ "devDependencies": { "@agoric/zoe": "^0.26.2", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "publishConfig": { "access": "public" diff --git a/packages/casting/package.json b/packages/casting/package.json index efcea73073e..6575980ed1a 100644 --- a/packages/casting/package.json +++ b/packages/casting/package.json @@ -40,7 +40,7 @@ "@agoric/cosmic-proto": "^0.4.0", "@endo/ses-ava": "^1.2.8", "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "express": "^5.0.1", "ws": "^7.2.0" }, diff --git a/packages/client-utils/package.json b/packages/client-utils/package.json index 0311fe5a926..a6c09a05439 100644 --- a/packages/client-utils/package.json +++ b/packages/client-utils/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "ts-blank-space": "^0.4.1" }, "dependencies": { diff --git a/packages/cosmic-swingset/package.json b/packages/cosmic-swingset/package.json index 567b524da4e..9fac90c75de 100644 --- a/packages/cosmic-swingset/package.json +++ b/packages/cosmic-swingset/package.json @@ -51,7 +51,7 @@ }, "devDependencies": { "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "publishConfig": { "access": "public" diff --git a/packages/create-dapp/package.json b/packages/create-dapp/package.json index 2b45c0fad68..d6fe693055e 100644 --- a/packages/create-dapp/package.json +++ b/packages/create-dapp/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "dependencies": { "agoric": "^0.21.1" diff --git a/packages/fast-usdc/package.json b/packages/fast-usdc/package.json index 6e3c3e1e7ff..857ae443087 100644 --- a/packages/fast-usdc/package.json +++ b/packages/fast-usdc/package.json @@ -26,7 +26,7 @@ "@agoric/zone": "^0.2.2", "@fast-check/ava": "^2.0.1", "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "execa": "9.1.0", "ts-blank-space": "^0.4.1" }, diff --git a/packages/governance/package.json b/packages/governance/package.json index 9b1057982cb..1f393525ee2 100644 --- a/packages/governance/package.json +++ b/packages/governance/package.json @@ -53,7 +53,7 @@ "@endo/bundle-source": "^3.5.0", "@endo/init": "^1.1.7", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "files": [ "README.md", diff --git a/packages/import-manager/package.json b/packages/import-manager/package.json index eeadee5aa50..dda4e8c8c90 100644 --- a/packages/import-manager/package.json +++ b/packages/import-manager/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@agoric/swingset-vat": "^0.32.2", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "files": [ "src/", diff --git a/packages/inter-protocol/package.json b/packages/inter-protocol/package.json index f1fb8ca3b5b..acf9a77063e 100644 --- a/packages/inter-protocol/package.json +++ b/packages/inter-protocol/package.json @@ -59,7 +59,7 @@ "@endo/promise-kit": "^1.1.8", "@fast-check/ava": "^1.1.5", "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "deep-object-diff": "^1.1.9", "import-meta-resolve": "^2.2.1" }, diff --git a/packages/network/package.json b/packages/network/package.json index 651d0aad84b..4bbbda80dc7 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -38,7 +38,7 @@ "@agoric/zone": "^0.2.2", "@endo/bundle-source": "^3.5.0", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "exports": { ".": "./src/index.js" diff --git a/packages/notifier/package.json b/packages/notifier/package.json index 278793d4d8e..e94128382a1 100644 --- a/packages/notifier/package.json +++ b/packages/notifier/package.json @@ -49,7 +49,7 @@ "@endo/init": "^1.1.7", "@endo/ses-ava": "^1.2.8", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "exports": { ".": "./src/index.js", diff --git a/packages/orchestration/package.json b/packages/orchestration/package.json index 9f02eb4f150..5ec9275d6e0 100644 --- a/packages/orchestration/package.json +++ b/packages/orchestration/package.json @@ -62,7 +62,7 @@ "@endo/import-bundle": "^1.3.2", "@endo/ses-ava": "^1.2.8", "ava": "^5.3.1", - "c8": "^9.1.0", + "c8": "^10.1.2", "prettier": "^3.3.2", "ts-blank-space": "^0.4.1" }, diff --git a/packages/pegasus/package.json b/packages/pegasus/package.json index 623f29cd8b4..8ed5a06bdda 100644 --- a/packages/pegasus/package.json +++ b/packages/pegasus/package.json @@ -48,7 +48,7 @@ }, "devDependencies": { "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "import-meta-resolve": "^2.2.1", "@agoric/vat-data": "^0.5.2" }, diff --git a/packages/solo/package.json b/packages/solo/package.json index bda3f1b61b7..aca853a2679 100644 --- a/packages/solo/package.json +++ b/packages/solo/package.json @@ -58,7 +58,7 @@ "@agoric/ertp": "^0.16.2", "@endo/bundle-source": "^3.5.0", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "publishConfig": { "access": "public" diff --git a/packages/spawner/package.json b/packages/spawner/package.json index 6d407c4363c..41ff88e316d 100644 --- a/packages/spawner/package.json +++ b/packages/spawner/package.json @@ -42,7 +42,7 @@ "@endo/bundle-source": "^3.5.0", "@endo/init": "^1.1.7", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "files": [ "src/", diff --git a/packages/swing-store/package.json b/packages/swing-store/package.json index 66aa082debe..22dd844611c 100644 --- a/packages/swing-store/package.json +++ b/packages/swing-store/package.json @@ -33,7 +33,7 @@ "@endo/init": "^1.1.7", "@types/better-sqlite3": "^7.6.9", "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "tmp": "^0.2.1" }, "publishConfig": { diff --git a/packages/swingset-runner/package.json b/packages/swingset-runner/package.json index ddbb83eddfd..3ba6090a671 100644 --- a/packages/swingset-runner/package.json +++ b/packages/swingset-runner/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "import-meta-resolve": "^2.2.1" }, "publishConfig": { diff --git a/packages/swingset-xsnap-supervisor/package.json b/packages/swingset-xsnap-supervisor/package.json index 6b26640c6c6..9d60558bf2c 100644 --- a/packages/swingset-xsnap-supervisor/package.json +++ b/packages/swingset-xsnap-supervisor/package.json @@ -30,7 +30,7 @@ "@endo/init": "^1.1.7", "@endo/marshal": "^1.6.2", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "files": [ "LICENSE*", diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index 2c06ceadcf7..2d758acdd64 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -46,7 +46,7 @@ "@endo/lockdown": "^1.0.13", "@endo/ses-ava": "^1.2.8", "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "tmp": "^0.2.1" }, "publishConfig": { diff --git a/packages/vats/package.json b/packages/vats/package.json index eccd91f3c39..3f369d4cfdf 100644 --- a/packages/vats/package.json +++ b/packages/vats/package.json @@ -51,7 +51,7 @@ "@endo/bundle-source": "^3.5.0", "@endo/init": "^1.1.7", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "files": [ "CHANGELOG.md", diff --git a/packages/vm-config/package.json b/packages/vm-config/package.json index 442487416ea..f058e962ed2 100644 --- a/packages/vm-config/package.json +++ b/packages/vm-config/package.json @@ -21,7 +21,7 @@ "dependencies": {}, "devDependencies": { "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "files": [ "CHANGELOG.md", diff --git a/packages/xsnap-lockdown/package.json b/packages/xsnap-lockdown/package.json index 11b1d56fbf8..379bd23e067 100644 --- a/packages/xsnap-lockdown/package.json +++ b/packages/xsnap-lockdown/package.json @@ -23,7 +23,7 @@ "@endo/bundle-source": "^3.5.0", "@endo/init": "^1.1.7", "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "rollup": "^4.24.0", "rollup-plugin-string": "^3.0.0", "source-map": "^0.7.4" diff --git a/packages/xsnap/package.json b/packages/xsnap/package.json index 04dc7bfd5f5..af7de48d332 100644 --- a/packages/xsnap/package.json +++ b/packages/xsnap/package.json @@ -46,7 +46,7 @@ "@endo/nat": "^5.0.13", "@types/glob": "^8.1.0", "ava": "^5.3.0", - "c8": "^9.1.0" + "c8": "^10.1.2" }, "files": [ "LICENSE*", diff --git a/packages/zoe/package.json b/packages/zoe/package.json index eb5fc43c99a..9420f3b860d 100644 --- a/packages/zoe/package.json +++ b/packages/zoe/package.json @@ -73,7 +73,7 @@ "@endo/init": "^1.1.7", "@agoric/kmarshal": "^0.1.0", "ava": "^5.3.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "import-meta-resolve": "^2.2.1", "tsd": "^0.31.1" }, diff --git a/yarn.lock b/yarn.lock index 9e50299b5d4..f74213eaad8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4798,10 +4798,10 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== -c8@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/c8/-/c8-9.1.0.tgz#0e57ba3ab9e5960ab1d650b4a86f71e53cb68112" - integrity sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg== +c8@^10.1.2: + version "10.1.2" + resolved "https://registry.yarnpkg.com/c8/-/c8-10.1.2.tgz#7fe04ced150316e2a623612ab78378289f7e6a9f" + integrity sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw== dependencies: "@bcoe/v8-coverage" "^0.2.3" "@istanbuljs/schema" "^0.1.3" @@ -4810,7 +4810,7 @@ c8@^9.1.0: istanbul-lib-coverage "^3.2.0" istanbul-lib-report "^3.0.1" istanbul-reports "^3.1.6" - test-exclude "^6.0.0" + test-exclude "^7.0.1" v8-to-istanbul "^9.0.0" yargs "^17.7.2" yargs-parser "^21.1.1" @@ -7150,6 +7150,18 @@ glob@^10.0.0, glob@^10.2.2, glob@^10.3.7: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" +glob@^10.4.1: + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + glob@^7.0.0, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -8102,6 +8114,15 @@ jackspeak@^2.3.5: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + jake@^10.8.5: version "10.8.7" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.7.tgz#63a32821177940c33f356e0ba44ff9d34e1c7d8f" @@ -8619,6 +8640,11 @@ long@*, long@^5.0.0, long@^5.2.0, long@^5.2.1: resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== +lru-cache@^10.2.0: + version "10.4.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -9302,6 +9328,11 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== +minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" @@ -10100,6 +10131,11 @@ p-waterfall@^2.1.1: dependencies: p-reduce "^2.0.0" +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + pacote@^13.0.3, pacote@^13.6.1: version "13.6.2" resolved "https://registry.yarnpkg.com/pacote/-/pacote-13.6.2.tgz#0d444ba3618ab3e5cd330b451c22967bbd0ca48a" @@ -10277,6 +10313,14 @@ path-scurry@^1.10.1: lru-cache "^9.1.1 || ^10.0.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-to-regexp@^0.1.2: version "0.1.10" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" @@ -11849,6 +11893,15 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" +test-exclude@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-7.0.1.tgz#20b3ba4906ac20994e275bbcafd68d510264c2a2" + integrity sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^10.4.1" + minimatch "^9.0.4" + text-extensions@^1.0.0: version "1.9.0" resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" From 8efce304e7c4cd2df065887f00f8fb27e0595dbd Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 14:46:11 -0800 Subject: [PATCH 020/174] chore(deps): yarn-deduplicate --- yarn.lock | 120 +++--------------------------------------------------- 1 file changed, 6 insertions(+), 114 deletions(-) diff --git a/yarn.lock b/yarn.lock index f74213eaad8..dc3907130c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1599,23 +1599,11 @@ "@endo/zip" "^1.0.9" ses "^1.10.0" -"@endo/env-options@^1.1.7": - version "1.1.7" - resolved "https://registry.yarnpkg.com/@endo/env-options/-/env-options-1.1.7.tgz#f8f9186010cff12506fdd8f5c8cd4d9051830fd8" - integrity sha512-8twSTbM45rzIP0lHw99ei1EaW98H2BXYKjCTUcq1qgK2OvQWaoiXNcJvUQQo1g7i3oPwbXTQsY69L+nTNeCDyA== - "@endo/env-options@^1.1.8": version "1.1.8" resolved "https://registry.yarnpkg.com/@endo/env-options/-/env-options-1.1.8.tgz#dbfcfbf7574f2a793155281d035c8d6f809f5828" integrity sha512-Xtxw9n33I4guo8q0sDyZiRuxlfaopM454AKiELgU7l3tqsylCut6IBZ0fPy4ltSHsBib7M3yF7OEMoIuLwzWVg== -"@endo/errors@^1.2.7": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@endo/errors/-/errors-1.2.7.tgz#cd8513a8e5544f4caec3eb47dd2ec101b445ea8f" - integrity sha512-StTidOD6ermjj46VGXHdsRrPDyvD7+xsT1x20hZlYe+bZfUn0q/JvqMq51O2/fVA0UPuVu61uQXD7m5MH7sklw== - dependencies: - ses "^1.9.1" - "@endo/errors@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@endo/errors/-/errors-1.2.8.tgz#c2ead8072c92115d5959e2d9ca4d1e46b8e0d8fc" @@ -1643,13 +1631,6 @@ "@babel/traverse" "^7.23.6" source-map-js "^1.2.0" -"@endo/eventual-send@^1.2.7": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@endo/eventual-send/-/eventual-send-1.2.7.tgz#b4f5408bba1dd1974f147ecb8c346d443b5a31f5" - integrity sha512-5acCJhp2OBgQc9/Sp1BKpMu1xZHvaXaZa7UybRhc5qEKlC1AHt936wkVdypER96pEVllnNYJi1lBoqBfiV5zag== - dependencies: - "@endo/env-options" "^1.1.7" - "@endo/eventual-send@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@endo/eventual-send/-/eventual-send-1.2.8.tgz#83bf2ec4a940f2b8d2992eba6902d15eb43ec8f1" @@ -1670,16 +1651,7 @@ "@endo/pass-style" "^1.4.7" "@endo/patterns" "^1.4.7" -"@endo/far@^1.0.0": - version "1.1.8" - resolved "https://registry.yarnpkg.com/@endo/far/-/far-1.1.8.tgz#c8212b8182dd671719dc54e55f6406115f2966de" - integrity sha512-xtfKPj1bhefpMouI+6q6zjfwDSSnaCZaSDqjClBrx6SnEO1B3ARdxtmiMEOgCdsw1XakvQwq8HDUWqDWEusJFQ== - dependencies: - "@endo/errors" "^1.2.7" - "@endo/eventual-send" "^1.2.7" - "@endo/pass-style" "^1.4.6" - -"@endo/far@^1.1.9": +"@endo/far@^1.0.0", "@endo/far@^1.1.9": version "1.1.9" resolved "https://registry.yarnpkg.com/@endo/far/-/far-1.1.9.tgz#ef14b5d4137309498978f002d4412786c8a879b2" integrity sha512-R7EBw1T4Wqysh0Q/tNkpth0eb18Y+iigyzYVIbLIs0uZztr5GHLwAOUWGkceCJJ51dSgV9kYiDDeM0wBwv+ZoQ== @@ -1754,17 +1726,6 @@ "@endo/stream" "^1.2.8" ses "^1.10.0" -"@endo/pass-style@^1.4.6": - version "1.4.6" - resolved "https://registry.yarnpkg.com/@endo/pass-style/-/pass-style-1.4.6.tgz#75092d33ad5183be120fb662361eef44c28f7768" - integrity sha512-9Tjvi2ZEek9xOOsGy4C5n1yQc91ciqi1r2LNA8BERsl/1g2AuXOtRb/cIVgeUOt1uumO5E1Wg3yKVkcnwLeVqg== - dependencies: - "@endo/env-options" "^1.1.7" - "@endo/errors" "^1.2.7" - "@endo/eventual-send" "^1.2.7" - "@endo/promise-kit" "^1.1.7" - "@fast-check/ava" "^1.1.5" - "@endo/pass-style@^1.4.7": version "1.4.7" resolved "https://registry.yarnpkg.com/@endo/pass-style/-/pass-style-1.4.7.tgz#8a8fd5b23322a4ece80ac6d56502ab8049609263" @@ -1787,13 +1748,6 @@ "@endo/marshal" "^1.6.2" "@endo/promise-kit" "^1.1.8" -"@endo/promise-kit@^1.1.7": - version "1.1.7" - resolved "https://registry.yarnpkg.com/@endo/promise-kit/-/promise-kit-1.1.7.tgz#04c84ef2a2047b94925fcc8ad4feb22cb0a7b2a0" - integrity sha512-WuelSrrgyi01ieUAlaVmQPWOPcKWpifF6t6Cr6ef0Wrmpygp3d45/ucOqKkuVlBckfMQh24/KxAhsiovgy2N2A== - dependencies: - ses "^1.9.1" - "@endo/promise-kit@^1.1.8": version "1.1.8" resolved "https://registry.yarnpkg.com/@endo/promise-kit/-/promise-kit-1.1.8.tgz#412c7fc746b331fe9f3df2fe1ad5a0944a875013" @@ -3820,14 +3774,7 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@>=13.7.0", "@types/node@^22.0.0": - version "22.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.0.tgz#04862a2a71e62264426083abe1e27e87cac05a30" - integrity sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw== - dependencies: - undici-types "~6.11.1" - -"@types/node@22.7.5": +"@types/node@*", "@types/node@22.7.5", "@types/node@>=13.7.0", "@types/node@^22.0.0": version "22.7.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.5.tgz#cfde981727a7ab3611a481510b473ae54442b92b" integrity sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ== @@ -7139,18 +7086,7 @@ glob@8.0.3: minimatch "^5.0.1" once "^1.3.0" -glob@^10.0.0, glob@^10.2.2, glob@^10.3.7: - version "10.3.10" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" - integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g== - dependencies: - foreground-child "^3.1.0" - jackspeak "^2.3.5" - minimatch "^9.0.1" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry "^1.10.1" - -glob@^10.4.1: +glob@^10.0.0, glob@^10.2.2, glob@^10.3.7, glob@^10.4.1: version "10.4.5" resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== @@ -8105,15 +8041,6 @@ istanbul-reports@^3.1.6: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jackspeak@^2.3.5: - version "2.3.6" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" - integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== - dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - jackspeak@^3.1.2: version "3.4.3" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" @@ -8664,11 +8591,6 @@ lru-cache@^7.14.0, lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== -"lru-cache@^9.1.1 || ^10.0.0": - version "10.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.0.tgz#b9e2a6a72a129d81ab317202d93c7691df727e61" - integrity sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw== - lru-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" @@ -9213,7 +9135,7 @@ minimatch@5.1.0: dependencies: brace-expansion "^2.0.1" -"minimatch@6 || 7 || 8 || 9", minimatch@^9.0.1, minimatch@^9.0.4, minimatch@^9.0.5: +"minimatch@6 || 7 || 8 || 9", minimatch@^9.0.4, minimatch@^9.0.5: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -9323,12 +9245,7 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.3: - version "7.0.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" - integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== - -minipass@^7.1.2: +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.3, minipass@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== @@ -10305,14 +10222,6 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698" - integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ== - dependencies: - lru-cache "^9.1.1 || ^10.0.0" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry@^1.11.1: version "1.11.1" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" @@ -11185,13 +11094,6 @@ ses@^1.10.0: dependencies: "@endo/env-options" "^1.1.8" -ses@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ses/-/ses-1.9.1.tgz#54991a775cea5f9e27292bbb6706941a8203062a" - integrity sha512-izNBxTLopF1wi5CvMdJYfCLWRYZtHGCKEtr2cbBl/Dqz3qzmDFep24I3vUAWye0GYh8aUgLLuGHbfvs5IRKasg== - dependencies: - "@endo/env-options" "^1.1.7" - set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -12082,12 +11984,7 @@ tsimp@^2.0.11: sock-daemon "^1.4.2" walk-up-path "^3.0.1" -"tslib@1 || 2", tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - -tslib@2.7.0: +"tslib@1 || 2", tslib@2.7.0, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.6.2: version "2.7.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== @@ -12305,11 +12202,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~6.11.1: - version "6.11.1" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.11.1.tgz#432ea6e8efd54a48569705a699e62d8f4981b197" - integrity sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ== - undici-types@~6.19.2: version "6.19.8" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" From 9d561569f4461320a2cd5c563d465622cfb7582a Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 20:36:23 -0800 Subject: [PATCH 021/174] test: missed --all conversions --- packages/ERTP/package.json | 2 +- packages/network/package.json | 2 +- packages/vats/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ERTP/package.json b/packages/ERTP/package.json index bd13d062f32..71600300ce3 100644 --- a/packages/ERTP/package.json +++ b/packages/ERTP/package.json @@ -12,7 +12,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava", + "test:c8": "c8 --all ava", "test:xs": "yarn test:xs-worker", "test:xs-unit": "exit 0", "test:xs-worker": "SWINGSET_WORKER_TYPE=xs-worker ava -c 2 test/swingsetTests", diff --git a/packages/network/package.json b/packages/network/package.json index 4bbbda80dc7..d3358785d67 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/vats/package.json b/packages/vats/package.json index 3f369d4cfdf..48c402d2f71 100644 --- a/packages/vats/package.json +++ b/packages/vats/package.json @@ -11,7 +11,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 $C8_OPTIONS ava", + "test:c8": "c8 --all ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", From d8ef46c574ac3668409bb2cf89f35f110dc13a80 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 20:39:42 -0800 Subject: [PATCH 022/174] test: restore C8_OPTIONS needed for test:c8-all --- packages/ERTP/package.json | 2 +- packages/access-token/package.json | 2 +- packages/agoric-cli/package.json | 2 +- packages/async-flow/package.json | 2 +- packages/base-zone/package.json | 2 +- packages/cache/package.json | 2 +- packages/casting/package.json | 2 +- packages/client-utils/package.json | 2 +- packages/cosmic-swingset/package.json | 2 +- packages/create-dapp/package.json | 2 +- packages/fast-usdc/package.json | 2 +- packages/governance/package.json | 2 +- packages/import-manager/package.json | 2 +- packages/inter-protocol/package.json | 2 +- packages/kmarshal/package.json | 2 +- packages/network/package.json | 2 +- packages/notifier/package.json | 2 +- packages/orchestration/package.json | 2 +- packages/pegasus/package.json | 2 +- packages/solo/package.json | 2 +- packages/spawner/package.json | 2 +- packages/swing-store/package.json | 2 +- packages/swingset-runner/package.json | 2 +- packages/swingset-xsnap-supervisor/package.json | 2 +- packages/telemetry/package.json | 2 +- packages/vats/package.json | 2 +- packages/vm-config/package.json | 2 +- packages/xsnap-lockdown/package.json | 2 +- packages/xsnap/package.json | 2 +- packages/zoe/package.json | 2 +- packages/zone/package.json | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) diff --git a/packages/ERTP/package.json b/packages/ERTP/package.json index 71600300ce3..70a36391edd 100644 --- a/packages/ERTP/package.json +++ b/packages/ERTP/package.json @@ -12,7 +12,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "yarn test:xs-worker", "test:xs-unit": "exit 0", "test:xs-worker": "SWINGSET_WORKER_TYPE=xs-worker ava -c 2 test/swingsetTests", diff --git a/packages/access-token/package.json b/packages/access-token/package.json index a75717d7f87..6ff0d7bfc31 100644 --- a/packages/access-token/package.json +++ b/packages/access-token/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/agoric-cli/package.json b/packages/agoric-cli/package.json index 29ed18a9895..13241c53219 100644 --- a/packages/agoric-cli/package.json +++ b/packages/agoric-cli/package.json @@ -20,7 +20,7 @@ "scripts": { "build": "node ./scripts/get-sdk-package-names.js > src/sdk-package-names.js", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "integration-test": "ava --config .ava-integration-test.config.js", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/async-flow/package.json b/packages/async-flow/package.json index f54c0954fa8..bd0e7fba983 100644 --- a/packages/async-flow/package.json +++ b/packages/async-flow/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/base-zone/package.json b/packages/base-zone/package.json index 5e2b784f210..293d5b9ffb2 100644 --- a/packages/base-zone/package.json +++ b/packages/base-zone/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/cache/package.json b/packages/cache/package.json index 0cf79b10bfb..4467520d79b 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/casting/package.json b/packages/casting/package.json index 6575980ed1a..45e95f72256 100644 --- a/packages/casting/package.json +++ b/packages/casting/package.json @@ -11,7 +11,7 @@ "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "demo": "node -e 'import(\"./test/fake-rpc-server.js\").then(ns => ns.develop())'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/client-utils/package.json b/packages/client-utils/package.json index a6c09a05439..b4731e52a59 100644 --- a/packages/client-utils/package.json +++ b/packages/client-utils/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/cosmic-swingset/package.json b/packages/cosmic-swingset/package.json index 9fac90c75de..8099c2b7040 100644 --- a/packages/cosmic-swingset/package.json +++ b/packages/cosmic-swingset/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/create-dapp/package.json b/packages/create-dapp/package.json index d6fe693055e..bea7c4e6bc8 100644 --- a/packages/create-dapp/package.json +++ b/packages/create-dapp/package.json @@ -12,7 +12,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/fast-usdc/package.json b/packages/fast-usdc/package.json index 857ae443087..007e1e90140 100644 --- a/packages/fast-usdc/package.json +++ b/packages/fast-usdc/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/governance/package.json b/packages/governance/package.json index 1f393525ee2..5026586c369 100644 --- a/packages/governance/package.json +++ b/packages/governance/package.json @@ -13,7 +13,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/import-manager/package.json b/packages/import-manager/package.json index dda4e8c8c90..a1a278a5edc 100644 --- a/packages/import-manager/package.json +++ b/packages/import-manager/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint": "yarn lint:eslint", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/inter-protocol/package.json b/packages/inter-protocol/package.json index acf9a77063e..76f545f1e35 100644 --- a/packages/inter-protocol/package.json +++ b/packages/inter-protocol/package.json @@ -13,7 +13,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/kmarshal/package.json b/packages/kmarshal/package.json index ba69513d627..a7511c5e812 100644 --- a/packages/kmarshal/package.json +++ b/packages/kmarshal/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/network/package.json b/packages/network/package.json index d3358785d67..9ec6d9b1984 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/notifier/package.json b/packages/notifier/package.json index e94128382a1..b52f0499548 100644 --- a/packages/notifier/package.json +++ b/packages/notifier/package.json @@ -12,7 +12,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/orchestration/package.json b/packages/orchestration/package.json index 5ec9275d6e0..6aee32e2e0e 100644 --- a/packages/orchestration/package.json +++ b/packages/orchestration/package.json @@ -14,7 +14,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint:types": "tsc", diff --git a/packages/pegasus/package.json b/packages/pegasus/package.json index 8ed5a06bdda..532fddff733 100644 --- a/packages/pegasus/package.json +++ b/packages/pegasus/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/solo/package.json b/packages/solo/package.json index aca853a2679..fe9b8511aa4 100644 --- a/packages/solo/package.json +++ b/packages/solo/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/spawner/package.json b/packages/spawner/package.json index 41ff88e316d..d3ee4ae17d1 100644 --- a/packages/spawner/package.json +++ b/packages/spawner/package.json @@ -11,7 +11,7 @@ "build": "yarn build:bundles", "build:bundles": "node scripts/build-bundles.js", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint": "run-s --continue-on-error lint:*", "lint-fix": "yarn lint:eslint --fix", diff --git a/packages/swing-store/package.json b/packages/swing-store/package.json index 22dd844611c..b805068ce6c 100644 --- a/packages/swing-store/package.json +++ b/packages/swing-store/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/swingset-runner/package.json b/packages/swingset-runner/package.json index 3ba6090a671..c61f4109250 100644 --- a/packages/swingset-runner/package.json +++ b/packages/swingset-runner/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/swingset-xsnap-supervisor/package.json b/packages/swingset-xsnap-supervisor/package.json index 9d60558bf2c..4c4ee40a5f7 100644 --- a/packages/swingset-xsnap-supervisor/package.json +++ b/packages/swingset-xsnap-supervisor/package.json @@ -19,7 +19,7 @@ "lint:types": "tsc", "lint-fix": "eslint --fix 'lib/**/*.js' 'src/**/*.js' 'scripts/**/*.js' 'test/**/*.js'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0" }, "devDependencies": { diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index 2d758acdd64..e654f726b37 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/vats/package.json b/packages/vats/package.json index 48c402d2f71..74b223e0b47 100644 --- a/packages/vats/package.json +++ b/packages/vats/package.json @@ -11,7 +11,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/vm-config/package.json b/packages/vm-config/package.json index f058e962ed2..5f55cdd5e10 100644 --- a/packages/vm-config/package.json +++ b/packages/vm-config/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "exit 0", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", diff --git a/packages/xsnap-lockdown/package.json b/packages/xsnap-lockdown/package.json index 379bd23e067..fbd4bace7e7 100644 --- a/packages/xsnap-lockdown/package.json +++ b/packages/xsnap-lockdown/package.json @@ -16,7 +16,7 @@ "lint:types": "tsc", "lint-fix": "eslint --fix 'src/**/*.js' 'lib/**/*.js' 'scripts/**/*.js' 'test/**/*.js'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0" }, "devDependencies": { diff --git a/packages/xsnap/package.json b/packages/xsnap/package.json index af7de48d332..43200c28793 100644 --- a/packages/xsnap/package.json +++ b/packages/xsnap/package.json @@ -24,7 +24,7 @@ "lint:types": "tsc", "lint-fix": "eslint --fix 'src/**/*.js' 'test/**/*.js' api.js", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0" }, "dependencies": { diff --git a/packages/zoe/package.json b/packages/zoe/package.json index 9420f3b860d..5d95b51c287 100644 --- a/packages/zoe/package.json +++ b/packages/zoe/package.json @@ -13,7 +13,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava --verbose", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:unit": "ava 'test/unitTests' -T 1m --verbose", "test:swingset": "ava 'test/swingsetTests' -T 10m --verbose", "test:xs": "yarn test:xs-worker", diff --git a/packages/zone/package.json b/packages/zone/package.json index f7d61fd0162..611572c4b3a 100644 --- a/packages/zone/package.json +++ b/packages/zone/package.json @@ -10,7 +10,7 @@ "prepack": "tsc --build tsconfig.build.json", "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'", "test": "ava", - "test:c8": "c8 --all ava", + "test:c8": "c8 --all $C8_OPTIONS ava", "test:xs": "exit 0", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", From 3eb1a1d2d75b2b4a94807cd3bf759bc9fc531f05 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Nov 2024 20:42:23 -0800 Subject: [PATCH 023/174] docs: how test:c8-all works --- COVERAGE.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/COVERAGE.md b/COVERAGE.md index e5f926e023b..13ea60f18d5 100644 --- a/COVERAGE.md +++ b/COVERAGE.md @@ -8,9 +8,16 @@ source-to-source transforms (such as `@endo/bundle-source`, ## Reports +### Whole repo Coverage reports for the current main branch are published by CI to: https://agoric-sdk-coverage.netlify.app +It's made by a CI job calling `test:c8-all` in the project root. That in turn +calls `test:c8` in each package, with `$C8_OPTIONS` set to a common coverage +directory and to leave temp files so they can accumulate. The job then uses that +output in another call to c8 to generate a report. + +## Per package You can create a report in any package: ```sh From ab66c1592678e9a560d70267da16481c71c24f5b Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 23 Nov 2024 08:20:49 -0800 Subject: [PATCH 024/174] ci: c8 report all files in {src,tools} --- .github/workflows/after-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/after-merge.yml b/.github/workflows/after-merge.yml index 1c8747d8cee..de7c8a2d717 100644 --- a/.github/workflows/after-merge.yml +++ b/.github/workflows/after-merge.yml @@ -108,7 +108,7 @@ jobs: - name: generate coverage for all tests run: 'yarn test:c8-all || :' - name: generate coverage/html reports - run: mkdir -p coverage/tmp && yarn c8 report --reporter=html-spa --reports-dir=coverage/html --temp-directory=coverage/tmp + run: mkdir -p coverage/tmp && yarn c8 report --all --include 'packages/*/{src,tools}' --reporter=html-spa --reports-dir=coverage/html --temp-directory=coverage/tmp - uses: actions/upload-artifact@v4 with: name: coverage From 476f7a5111ea6d4635d312421cfc5d0db80bb81e Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 23 Nov 2024 08:34:15 -0800 Subject: [PATCH 025/174] refactor: single script for CI code coverage --- .github/workflows/after-merge.yml | 6 ++---- COVERAGE.md | 5 +---- package.json | 1 - scripts/ci/generate-test-coverage-report.sh | 17 +++++++++++++++++ 4 files changed, 20 insertions(+), 9 deletions(-) create mode 100755 scripts/ci/generate-test-coverage-report.sh diff --git a/.github/workflows/after-merge.yml b/.github/workflows/after-merge.yml index de7c8a2d717..50088971d23 100644 --- a/.github/workflows/after-merge.yml +++ b/.github/workflows/after-merge.yml @@ -105,10 +105,8 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: generate coverage for all tests - run: 'yarn test:c8-all || :' - - name: generate coverage/html reports - run: mkdir -p coverage/tmp && yarn c8 report --all --include 'packages/*/{src,tools}' --reporter=html-spa --reports-dir=coverage/html --temp-directory=coverage/tmp + - name: generate test coverage report + run: ./scripts/ci/generage-test-coverage-report.sh - uses: actions/upload-artifact@v4 with: name: coverage diff --git a/COVERAGE.md b/COVERAGE.md index 13ea60f18d5..3dcda91d4ed 100644 --- a/COVERAGE.md +++ b/COVERAGE.md @@ -12,10 +12,7 @@ source-to-source transforms (such as `@endo/bundle-source`, Coverage reports for the current main branch are published by CI to: https://agoric-sdk-coverage.netlify.app -It's made by a CI job calling `test:c8-all` in the project root. That in turn -calls `test:c8` in each package, with `$C8_OPTIONS` set to a common coverage -directory and to leave temp files so they can accumulate. The job then uses that -output in another call to c8 to generate a report. +See `scripts/ci/generate-test-coverage-report.sh` ## Per package You can create a report in any package: diff --git a/package.json b/package.json index 0c1f8ff3799..9a4ad3db134 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "lint": "run-s --continue-on-error lint:*", "lint:packages": "yarn lerna run --no-bail lint", "test": "yarn lerna run --no-bail test", - "test:c8-all": "rm -rf coverage/tmp && C8_OPTIONS=\"--clean=false --temp-directory=$PWD/coverage/tmp\" lerna run test:c8", "test:xs": "yarn workspaces run test:xs", "build": "yarn workspaces run build && scripts/agd-builder.sh stamp yarn-built", "postinstall": "patch-package && scripts/agd-builder.sh stamp yarn-installed", diff --git a/scripts/ci/generate-test-coverage-report.sh b/scripts/ci/generate-test-coverage-report.sh new file mode 100755 index 00000000000..032bfd86839 --- /dev/null +++ b/scripts/ci/generate-test-coverage-report.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# CI artifact export expects the files to be under `coverage` (same for /html below) +export NODE_V8_COVERAGE="$PWD/coverage/tmp" + +# clear out old coverage. c8 usually does this but we have to clean=false below so it accumulates across packages +rm -rf "$NODE_V8_COVERAGE" +mkdir -p "$NODE_V8_COVERAGE" + +# the package test:c8 commands will include this +export C8_OPTIONS="--clean=false" + +# XXX uses lerna when `yarn workspaces run` should work, but in v1 it always bails on missing script +yarn lerna run test:c8 + +# report over all src and tools files, not just the ones that were loaded during tests +yarn c8 report --all --include 'packages/*/{src,tools}' --reporter=html-spa --reports-dir=coverage/html From 42bb239150967b2b84139ad7a21da79089e83012 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 23 Nov 2024 16:51:04 -0800 Subject: [PATCH 026/174] ci: fix 'coverage' job --- .github/workflows/after-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/after-merge.yml b/.github/workflows/after-merge.yml index 50088971d23..ed37c3c2506 100644 --- a/.github/workflows/after-merge.yml +++ b/.github/workflows/after-merge.yml @@ -106,7 +106,7 @@ jobs: node-version: ${{ matrix.node-version }} - name: generate test coverage report - run: ./scripts/ci/generage-test-coverage-report.sh + run: ./scripts/ci/generate-test-coverage-report.sh - uses: actions/upload-artifact@v4 with: name: coverage From e63b369593ba0d4c610bd7f3cb5534141dab4b38 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 23 Nov 2024 16:52:41 -0800 Subject: [PATCH 027/174] chore(deps): bump typescript to 5.7 release --- package.json | 2 +- packages/cosmic-proto/package.json | 2 +- yarn.lock | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9a4ad3db134..1adb2ca3efd 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "type-coverage": "^2.27.1", "typedoc": "^0.26.7", "typedoc-plugin-markdown": "^4.2.1", - "typescript": "^5.6.2", + "typescript": "~5.7.1", "typescript-eslint": "^7.18.0" }, "resolutions": { diff --git a/packages/cosmic-proto/package.json b/packages/cosmic-proto/package.json index 4b4b507b6fa..aa4daca25b2 100644 --- a/packages/cosmic-proto/package.json +++ b/packages/cosmic-proto/package.json @@ -153,7 +153,7 @@ "rimraf": "^5.0.0", "tsd": "^0.31.1", "tsimp": "^2.0.11", - "typescript": "~5.6.2" + "typescript": "~5.7.1" }, "dependencies": { "@endo/base64": "^1.0.9", diff --git a/yarn.lock b/yarn.lock index dc3907130c3..36492bc3c11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12172,7 +12172,7 @@ typescript-eslint@^7.18.0, typescript-eslint@^7.3.1: "@typescript-eslint/parser" "7.18.0" "@typescript-eslint/utils" "7.18.0" -"typescript@5.1.6 - 5.6.x", typescript@^5.4.5, typescript@^5.6.2, typescript@~5.6.2, typescript@~5.6.3: +"typescript@5.1.6 - 5.6.x", typescript@^5.4.5, typescript@~5.6.2, typescript@~5.6.3: version "5.6.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== @@ -12182,6 +12182,11 @@ typescript-eslint@^7.18.0, typescript-eslint@^7.3.1: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@~5.7.1: + version "5.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" + integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== + uc.micro@^2.0.0, uc.micro@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" From 292d2f36bfd39b30290f67371c3d4d22ca57f30d Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Wed, 13 Nov 2024 17:33:29 -0800 Subject: [PATCH 028/174] chore(types): fix Buffer usage in TS 5.7 --- package.json | 2 +- .../supervisor-subprocess-node.js | 1 + packages/internal/src/netstring.js | 1 + .../lib/supervisor-subprocess-xsnap.js | 4 ++-- packages/xsnap/src/avaXS.js | 2 +- packages/xsnap/src/globals.d.ts | 4 ++-- yarn.lock | 20 ++++++++++++++++--- 7 files changed, 25 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 1adb2ca3efd..a3298917d17 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@google-cloud/monitoring": "^4.1.0", "@jessie.js/eslint-plugin": "^0.4.1", "@types/express": "^4.17.17", - "@types/node": "^22.0.0", + "@types/node": "^22.9.0", "ava": "^5.3.0", "c8": "^10.1.2", "conventional-changelog-conventionalcommits": "^4.6.0", diff --git a/packages/SwingSet/src/supervisors/subprocess-node/supervisor-subprocess-node.js b/packages/SwingSet/src/supervisors/subprocess-node/supervisor-subprocess-node.js index 8f1067b84ca..912ea44c231 100644 --- a/packages/SwingSet/src/supervisors/subprocess-node/supervisor-subprocess-node.js +++ b/packages/SwingSet/src/supervisors/subprocess-node/supervisor-subprocess-node.js @@ -36,6 +36,7 @@ workerLog(`supervisor started`); function makeNetstringReader({ fd, encoding }) { const input = Buffer.alloc(32 * 1024); + /** @type {Buffer} */ let buffered = Buffer.alloc(0); let decoded = []; diff --git a/packages/internal/src/netstring.js b/packages/internal/src/netstring.js index 38d4fff30ef..fe7d5b49b42 100644 --- a/packages/internal/src/netstring.js +++ b/packages/internal/src/netstring.js @@ -89,6 +89,7 @@ export function decode(data, optMaxChunkSize) { */ // input is a byte pipe, output is a sequence of Buffers export function netstringDecoderStream(optMaxChunkSize) { + /** @type {Buffer} */ let buffered = Buffer.from(''); /** * @param {Buffer} chunk diff --git a/packages/swingset-xsnap-supervisor/lib/supervisor-subprocess-xsnap.js b/packages/swingset-xsnap-supervisor/lib/supervisor-subprocess-xsnap.js index d7eb1325744..d150d8da078 100644 --- a/packages/swingset-xsnap-supervisor/lib/supervisor-subprocess-xsnap.js +++ b/packages/swingset-xsnap-supervisor/lib/supervisor-subprocess-xsnap.js @@ -100,11 +100,11 @@ const meterControl = makeMeterControl(); /** * Wrap byte-level protocols with tagged array codec. * - * @param {(cmd: ArrayBuffer) => ArrayBuffer} issueCommand as from xsnap + * @param {(cmd: ArrayBufferLike) => ArrayBuffer} issueCommand as from xsnap * @typedef { [unknown, ...unknown[]] } Tagged tagged array */ function managerPort(issueCommand) { - /** @type { (item: Tagged) => ArrayBuffer } */ + /** @type { (item: Tagged) => ArrayBufferLike } */ const encode = item => { let txt; try { diff --git a/packages/xsnap/src/avaXS.js b/packages/xsnap/src/avaXS.js index 28bb74df5b7..1025c9a9411 100644 --- a/packages/xsnap/src/avaXS.js +++ b/packages/xsnap/src/avaXS.js @@ -112,7 +112,7 @@ async function runTestScript( /** * Handle callback "command" from xsnap subprocess. * - * @type { (msg: ArrayBuffer) => Promise } + * @type { (msg: ArrayBuffer) => Promise> } */ async function handleCommand(message) { /** diff --git a/packages/xsnap/src/globals.d.ts b/packages/xsnap/src/globals.d.ts index 695d772ae08..ec7f661073f 100644 --- a/packages/xsnap/src/globals.d.ts +++ b/packages/xsnap/src/globals.d.ts @@ -1,5 +1,5 @@ -declare var issueCommand: (msg: ArrayBuffer) => ArrayBuffer; +declare var issueCommand: (msg: ArrayBufferLike) => ArrayBuffer; namespace global { - declare var issueCommand: (msg: ArrayBuffer) => ArrayBuffer; + declare var issueCommand: (msg: ArrayBufferLike) => ArrayBuffer; } diff --git a/yarn.lock b/yarn.lock index 36492bc3c11..4d2dd0490c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3774,13 +3774,27 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@22.7.5", "@types/node@>=13.7.0", "@types/node@^22.0.0": +"@types/node@*", "@types/node@>=13.7.0": + version "22.0.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.0.tgz#04862a2a71e62264426083abe1e27e87cac05a30" + integrity sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw== + dependencies: + undici-types "~6.11.1" + +"@types/node@22.7.5": version "22.7.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.5.tgz#cfde981727a7ab3611a481510b473ae54442b92b" integrity sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ== dependencies: undici-types "~6.19.2" +"@types/node@^22.9.0": + version "22.9.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365" + integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ== + dependencies: + undici-types "~6.19.8" + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -12172,7 +12186,7 @@ typescript-eslint@^7.18.0, typescript-eslint@^7.3.1: "@typescript-eslint/parser" "7.18.0" "@typescript-eslint/utils" "7.18.0" -"typescript@5.1.6 - 5.6.x", typescript@^5.4.5, typescript@~5.6.2, typescript@~5.6.3: +"typescript@5.1.6 - 5.6.x", typescript@^5.4.5, typescript@~5.6.3: version "5.6.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== @@ -12207,7 +12221,7 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~6.19.2: +undici-types@~6.19.2, undici-types@~6.19.8: version "6.19.8" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== From 9c28c531b8c1d93d4ae95e5c00024a8292305cb4 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 23 Nov 2024 17:54:31 -0800 Subject: [PATCH 029/174] chore(deps): yarn-deduplicate --- yarn.lock | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4d2dd0490c5..a8f323ee92c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3774,12 +3774,12 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@>=13.7.0": - version "22.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.0.tgz#04862a2a71e62264426083abe1e27e87cac05a30" - integrity sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw== +"@types/node@*", "@types/node@>=13.7.0", "@types/node@^22.9.0": + version "22.9.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365" + integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ== dependencies: - undici-types "~6.11.1" + undici-types "~6.19.8" "@types/node@22.7.5": version "22.7.5" @@ -3788,13 +3788,6 @@ dependencies: undici-types "~6.19.2" -"@types/node@^22.9.0": - version "22.9.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365" - integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ== - dependencies: - undici-types "~6.19.8" - "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -12186,7 +12179,7 @@ typescript-eslint@^7.18.0, typescript-eslint@^7.3.1: "@typescript-eslint/parser" "7.18.0" "@typescript-eslint/utils" "7.18.0" -"typescript@5.1.6 - 5.6.x", typescript@^5.4.5, typescript@~5.6.3: +"typescript@5.1.6 - 5.6.x", typescript@~5.6.3: version "5.6.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== @@ -12196,7 +12189,7 @@ typescript-eslint@^7.18.0, typescript-eslint@^7.3.1: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== -typescript@~5.7.1: +typescript@^5.4.5, typescript@~5.7.1: version "5.7.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== From 27ce0b0c5bc7543dca4d86ef644ce6e87f151d6c Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 23 Nov 2024 18:55:35 -0800 Subject: [PATCH 030/174] fix: makeReserveTerms doesn't actually take or return a timer --- packages/inter-protocol/src/reserve/params.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/inter-protocol/src/reserve/params.js b/packages/inter-protocol/src/reserve/params.js index 5da75a96fdc..f7e8aa2eac5 100644 --- a/packages/inter-protocol/src/reserve/params.js +++ b/packages/inter-protocol/src/reserve/params.js @@ -2,8 +2,10 @@ import { CONTRACT_ELECTORATE, ParamTypes } from '@agoric/governance'; -const makeReserveTerms = (poserInvitationAmount, timer) => ({ - timer, +/** + * @param {InvitationAmount} poserInvitationAmount + */ +const makeReserveTerms = poserInvitationAmount => ({ governedParams: harden({ [CONTRACT_ELECTORATE]: { type: ParamTypes.INVITATION, From 140ff5fb99ee5482cb9bb0b6ced80a81168234df Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sat, 23 Nov 2024 18:56:00 -0800 Subject: [PATCH 031/174] chore(types): hack makeProvisionPoolKit --- packages/inter-protocol/src/provisionPoolKit.js | 10 ++++++++++ packages/inter-protocol/test/psm/setupPsm.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/inter-protocol/src/provisionPoolKit.js b/packages/inter-protocol/src/provisionPoolKit.js index 4e1c71aa704..ee05ea5cc06 100644 --- a/packages/inter-protocol/src/provisionPoolKit.js +++ b/packages/inter-protocol/src/provisionPoolKit.js @@ -37,6 +37,15 @@ const FIRST_LOWER_NEAR_KEYWORD = /^[a-z][a-zA-Z0-9_$]*$/; * @import {Bank, BankManager} from '@agoric/vats/src/vat-bank.js' */ +// XXX when inferred, error TS2742: cannot be named without a reference to '../../../node_modules/@endo/exo/src/get-interface.js'. This is likely not portable. A type annotation is necessary. +/** + * @typedef {{ + * machine: any; + * helper: any; + * public: any; + * }} ProvisionPoolKit + */ + /** * @typedef {import('@agoric/zoe/src/zoeService/utils.js').Instance< * import('@agoric/inter-protocol/src/psm/psm.js').start @@ -506,6 +515,7 @@ export const prepareProvisionPoolKit = ( * @param {object} opts * @param {Brand<'nat'>} opts.poolBrand * @param {ERef} opts.storageNode + * @returns {Promise} */ const makeProvisionPoolKit = async ({ poolBrand, storageNode }) => { const fundPurse = await E(poolBank).getPurse(poolBrand); diff --git a/packages/inter-protocol/test/psm/setupPsm.js b/packages/inter-protocol/test/psm/setupPsm.js index f00a283c05b..895ff2679c6 100644 --- a/packages/inter-protocol/test/psm/setupPsm.js +++ b/packages/inter-protocol/test/psm/setupPsm.js @@ -100,8 +100,8 @@ export const setupPsm = async ( brand.produce.IST.resolve(istBrand); issuer.produce.IST.resolve(istIssuer); + // @ts-expect-error mock space.produce.provisionPoolStartResult.resolve({ - // @ts-expect-error mock creatorFacet: Far('dummy', { initPSM: () => { t.log('dummy provisionPool.initPSM'); From 136b33d3527459a88203d4526514f1ec6887f95d Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Mon, 25 Nov 2024 12:45:05 -0600 Subject: [PATCH 032/174] docs: prune outdated FIXME --- packages/orchestration/src/exos/packet-tools.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/orchestration/src/exos/packet-tools.js b/packages/orchestration/src/exos/packet-tools.js index a4ba79c2455..eaaad2a9736 100644 --- a/packages/orchestration/src/exos/packet-tools.js +++ b/packages/orchestration/src/exos/packet-tools.js @@ -327,8 +327,6 @@ export const preparePacketTools = (zone, vowTools) => { } this.state.pending = 0; this.state.upcallQueue = null; - // FIXME when it returns undefined this causes an error: - // In "unsubscribeFromTransfers" method of (PacketToolsKit utils): result: undefined "[undefined]" - Must be a promise return watch(this.facets.utils.unsubscribeFromTransfers()); }, subscribeToTransfers() { From 7b7799389018aa0536711a091502b4b28b59572b Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Mon, 25 Nov 2024 12:46:48 -0600 Subject: [PATCH 033/174] fix: subscribeToTransfers atomically --- .../orchestration/src/exos/packet-tools.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/orchestration/src/exos/packet-tools.js b/packages/orchestration/src/exos/packet-tools.js index eaaad2a9736..2b873ebc2eb 100644 --- a/packages/orchestration/src/exos/packet-tools.js +++ b/packages/orchestration/src/exos/packet-tools.js @@ -126,7 +126,7 @@ export const preparePacketTools = (zone, vowTools) => { const resolverToPattern = zone.detached().mapStore('resolverToPattern'); return { lca, - reg: /** @type {Remote | null} */ (null), + reg: /** @type {Vow | null} */ (null), resolverToPattern, upcallQueue: /** @type {any[] | null} */ (null), pending: 0, @@ -331,17 +331,15 @@ export const preparePacketTools = (zone, vowTools) => { }, subscribeToTransfers() { // Subscribe to the transfers for this account. - const { lca, reg } = this.state; - if (reg) { - return when(reg); + const { lca, reg: cachedReg } = this.state; + if (cachedReg) { + return when(cachedReg); } + // Atomically update the registration. const { tap } = this.facets; - // XXX racy; fails if subscribeToTransfers is called while this promise is in flight - // e.g. 'Target "agoric1fakeLCAAddress" already registered' - return when(E(lca).monitorTransfers(tap), r => { - this.state.reg = r; - return r; - }); + const reg = watch(E(lca).monitorTransfers(tap)); + this.state.reg = reg; + return when(reg); }, unsubscribeFromTransfers() { const { reg, monitor } = this.state; From e58d8210c5fdf158f4bea1edebda54852fa08cff Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 19 Nov 2024 17:49:14 -0600 Subject: [PATCH 034/174] refactor(fast-usdc): export LiquidityPoolKit from types.ts --- packages/fast-usdc/src/types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/fast-usdc/src/types.ts b/packages/fast-usdc/src/types.ts index ef9017c5b6b..e25536ff383 100644 --- a/packages/fast-usdc/src/types.ts +++ b/packages/fast-usdc/src/types.ts @@ -73,3 +73,4 @@ export interface FeedPolicy { } export type * from './constants.js'; +export type { LiquidityPoolKit } from './exos/liquidity-pool.js'; From 745d399eb3774542fb9b8c5329c13a4b30c7d68a Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 20 Nov 2024 17:48:18 -0500 Subject: [PATCH 035/174] docs: move status manager state diagrams --- packages/fast-usdc/README.md | 26 ++++++++++++++++++++++++++ packages/fast-usdc/src/exos/README.md | 26 -------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) delete mode 100644 packages/fast-usdc/src/exos/README.md diff --git a/packages/fast-usdc/README.md b/packages/fast-usdc/README.md index 09810e873cd..fe1794a5872 100644 --- a/packages/fast-usdc/README.md +++ b/packages/fast-usdc/README.md @@ -56,3 +56,29 @@ sequenceDiagram A->>TF: notify(evidence) ``` + +# Status Manager + +### Contract state diagram + +*Transactions are qualified by the OCW and EventFeed before arriving to the Advancer.* + +```mermaid +stateDiagram-v2 + [*] --> Advanced: Advancer .advance() + Advanced --> Settled: Settler .settle() after fees + [*] --> Observed: Advancer .observed() + Observed --> Settled: Settler .settle() sans fees + Settled --> [*] +``` + +### Complete state diagram (starting from OCW) + +```mermaid +stateDiagram-v2 + Observed --> Qualified + Observed --> Unqualified + Qualified --> Advanced + Advanced --> Settled + Qualified --> Settled +``` diff --git a/packages/fast-usdc/src/exos/README.md b/packages/fast-usdc/src/exos/README.md deleted file mode 100644 index f65fb20a958..00000000000 --- a/packages/fast-usdc/src/exos/README.md +++ /dev/null @@ -1,26 +0,0 @@ -## **StatusManager** state diagram, showing different transitions - - -### Contract state diagram - -*Transactions are qualified by the OCW and EventFeed before arriving to the Advancer.* - -```mermaid -stateDiagram-v2 - [*] --> Advanced: Advancer .advance() - Advanced --> Settled: Settler .settle() after fees - [*] --> Observed: Advancer .observed() - Observed --> Settled: Settler .settle() sans fees - Settled --> [*] -``` - -### Complete state diagram (starting from OCW) - -```mermaid -stateDiagram-v2 - Observed --> Qualified - Observed --> Unqualified - Qualified --> Advanced - Advanced --> Settled - Qualified --> Settled -``` From b63bd6f9e6030faad733c50be04b0037ccad10c3 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 22 Nov 2024 12:36:28 -0600 Subject: [PATCH 036/174] chore(fast-usdc): status manager: split out Advancing state - settle -> disburse --- packages/fast-usdc/README.md | 39 ++- packages/fast-usdc/src/constants.js | 18 +- packages/fast-usdc/src/exos/status-manager.js | 135 ++++++++-- .../test/exos/status-manager.test.ts | 233 ++++++++++++++---- 4 files changed, 344 insertions(+), 81 deletions(-) diff --git a/packages/fast-usdc/README.md b/packages/fast-usdc/README.md index fe1794a5872..8d31d5bdf5c 100644 --- a/packages/fast-usdc/README.md +++ b/packages/fast-usdc/README.md @@ -59,26 +59,41 @@ sequenceDiagram # Status Manager -### Contract state diagram +### Pending Advance State Diagram *Transactions are qualified by the OCW and EventFeed before arriving to the Advancer.* ```mermaid stateDiagram-v2 - [*] --> Advanced: Advancer .advance() - Advanced --> Settled: Settler .settle() after fees - [*] --> Observed: Advancer .observed() - Observed --> Settled: Settler .settle() sans fees - Settled --> [*] + [*] --> Observed: observe() + [*] --> Advancing: advancing() + + Advancing --> Advanced: advanceOutcome(...true) + Advancing --> AdvanceFailed: advanceOutcome(...false) + + Observed --> [*]: dequeueStatus() + Advanced --> [*]: dequeueStatus() + AdvanceFailed --> [*]: dequeueStatus() + + note right of [*] + After dequeueStatus(): + Transaction is removed + from pendingTxs store. + Settler will .disburse() + or .forward() + end note ``` -### Complete state diagram (starting from OCW) +### Complete state diagram (starting from Transaction Feed into Advancer) ```mermaid stateDiagram-v2 - Observed --> Qualified - Observed --> Unqualified - Qualified --> Advanced - Advanced --> Settled - Qualified --> Settled + Observed --> Advancing + Observed --> Forwarding:Minted + Forwarding --> Forwarded + Advancing --> Advanced + Advanced --> Disbursed + AdvanceFailed --> Forwarding + Advancing --> AdvanceFailed + Forwarding --> ForwardFailed ``` diff --git a/packages/fast-usdc/src/constants.js b/packages/fast-usdc/src/constants.js index 97fbd9c3f47..d341f6c650d 100644 --- a/packages/fast-usdc/src/constants.js +++ b/packages/fast-usdc/src/constants.js @@ -7,12 +7,22 @@ export const TxStatus = /** @type {const} */ ({ /** tx was observed but not advanced */ Observed: 'OBSERVED', /** IBC transfer is initiated */ + Advancing: 'ADVANCING', + /** IBC transfer is complete */ Advanced: 'ADVANCED', - /** settlement for matching advance received and funds dispersed */ - Settled: 'SETTLED', + /** IBC transfer failed (timed out) */ + AdvanceFailed: 'ADVANCE_FAILED', + /** settlement for matching advance received and funds disbursed */ + Disbursed: 'DISBURSED', + /** fallback: do not collect fees */ + Forwarded: 'FORWARDED', + /** failed to forward to EUD */ + ForwardFailed: 'FORWARD_FAILED', }); harden(TxStatus); +// TODO: define valid state transitions + /** * Status values for the StatusManager. * @@ -22,6 +32,10 @@ export const PendingTxStatus = /** @type {const} */ ({ /** tx was observed but not advanced */ Observed: 'OBSERVED', /** IBC transfer is initiated */ + Advancing: 'ADVANCING', + /** IBC transfer failed (timed out) */ + AdvanceFailed: 'ADVANCE_FAILED', + /** IBC transfer is complete */ Advanced: 'ADVANCED', }); harden(PendingTxStatus); diff --git a/packages/fast-usdc/src/exos/status-manager.js b/packages/fast-usdc/src/exos/status-manager.js index c77f6f0817f..c5f8f8da356 100644 --- a/packages/fast-usdc/src/exos/status-manager.js +++ b/packages/fast-usdc/src/exos/status-manager.js @@ -1,14 +1,18 @@ import { M } from '@endo/patterns'; -import { makeError, q } from '@endo/errors'; +import { Fail, makeError, q } from '@endo/errors'; import { appendToStoredArray } from '@agoric/store/src/stores/store-utils.js'; -import { CctpTxEvidenceShape, PendingTxShape } from '../type-guards.js'; +import { + CctpTxEvidenceShape, + EvmHashShape, + PendingTxShape, +} from '../type-guards.js'; import { PendingTxStatus } from '../constants.js'; /** * @import {MapStore, SetStore} from '@agoric/store'; * @import {Zone} from '@agoric/zone'; - * @import {CctpTxEvidence, NobleAddress, SeenTxKey, PendingTxKey, PendingTx} from '../types.js'; + * @import {CctpTxEvidence, NobleAddress, SeenTxKey, PendingTxKey, PendingTx, EvmHash} from '../types.js'; */ /** @@ -96,21 +100,69 @@ export const prepareStatusManager = zone => { return zone.exo( 'Fast USDC Status Manager', M.interface('StatusManagerI', { + // TODO: naming scheme for transition events advance: M.call(CctpTxEvidenceShape).returns(M.undefined()), + advanceOutcome: M.call(M.string(), M.nat(), M.boolean()).returns(), observe: M.call(CctpTxEvidenceShape).returns(M.undefined()), - hasPendingSettlement: M.call(M.string(), M.bigint()).returns(M.boolean()), - settle: M.call(M.string(), M.bigint()).returns(M.undefined()), + hasBeenObserved: M.call(CctpTxEvidenceShape).returns(M.boolean()), + dequeueStatus: M.call(M.string(), M.bigint()).returns( + M.or( + { + txHash: EvmHashShape, + status: M.or( + PendingTxStatus.Advanced, + PendingTxStatus.AdvanceFailed, + PendingTxStatus.Observed, + ), + }, + M.undefined(), + ), + ), + disbursed: M.call(EvmHashShape, M.string(), M.nat()).returns( + M.undefined(), + ), + forwarded: M.call(M.opt(EvmHashShape), M.string(), M.nat()).returns( + M.undefined(), + ), lookupPending: M.call(M.string(), M.bigint()).returns( M.arrayOf(PendingTxShape), ), }), { /** - * Add a new transaction with ADVANCED status + * Add a new transaction with ADVANCING status * @param {CctpTxEvidence} evidence */ advance(evidence) { - recordPendingTx(evidence, PendingTxStatus.Advanced); + recordPendingTx(evidence, PendingTxStatus.Advancing); + }, + + /** + * Record result of ADVANCING + * + * @param {NobleAddress} sender + * @param {import('@agoric/ertp').NatValue} amount + * @param {boolean} success - Advanced vs. AdvanceFailed + * @throws {Error} if nothing to advance + */ + advanceOutcome(sender, amount, success) { + const key = makePendingTxKey(sender, amount); + pendingTxs.has(key) || Fail`no advancing tx with ${{ sender, amount }}`; + const pending = pendingTxs.get(key); + const ix = pending.findIndex( + tx => tx.status === PendingTxStatus.Advancing, + ); + ix >= 0 || Fail`no advancing tx with ${{ sender, amount }}`; + const [prefix, tx, suffix] = [ + pending.slice(0, ix), + pending[ix], + pending.slice(ix + 1), + ]; + const status = success + ? PendingTxStatus.Advanced + : PendingTxStatus.AdvanceFailed; + const txpost = { ...tx, status }; + pendingTxs.set(key, harden([...prefix, txpost, ...suffix])); }, /** @@ -122,41 +174,76 @@ export const prepareStatusManager = zone => { }, /** - * Find an `ADVANCED` or `OBSERVED` tx waiting to be `SETTLED` + * Note: ADVANCING state implies tx has been OBSERVED * - * @param {NobleAddress} address - * @param {bigint} amount - * @returns {boolean} + * @param {CctpTxEvidence} evidence */ - hasPendingSettlement(address, amount) { - const key = makePendingTxKey(address, amount); - const pending = pendingTxs.get(key); - return !!pending.length; + hasBeenObserved(evidence) { + const seenKey = seenTxKeyOf(evidence); + return seenTxs.has(seenKey); }, /** - * Mark an `ADVANCED` or `OBSERVED` transaction as `SETTLED` and remove it + * Remove and return an `ADVANCED` or `OBSERVED` tx waiting to be `SETTLED`. * * @param {NobleAddress} address * @param {bigint} amount + * @returns {Pick | undefined} undefined if nothing + * with this address and amount has been marked pending. */ - settle(address, amount) { + dequeueStatus(address, amount) { const key = makePendingTxKey(address, amount); + if (!pendingTxs.has(key)) return undefined; const pending = pendingTxs.get(key); - if (!pending.length) { - throw makeError(`No unsettled entry for ${q(key)}`); + const dequeueIdx = pending.findIndex( + x => x.status !== PendingTxStatus.Advancing, + ); + if (dequeueIdx < 0) return undefined; + + if (pending.length > 1) { + const pendingCopy = [...pending]; + pendingCopy.splice(dequeueIdx, 1); + pendingTxs.set(key, harden(pendingCopy)); + } else { + pendingTxs.delete(key); } - const pendingCopy = [...pending]; - pendingCopy.shift(); - // TODO, vstorage update for `TxStatus.Settled` - pendingTxs.set(key, harden(pendingCopy)); + const { status, txHash } = pending[dequeueIdx]; + // TODO: store txHash -> evidence for txs pending settlement? + // If necessary for vstorage writes in `forwarded` and `settled` + return harden({ status, txHash }); + }, + + /** + * Mark a transaction as `DISBURSED` + * + * @param {EvmHash} txHash + * @param {NobleAddress} address + * @param {bigint} amount + */ + disbursed(txHash, address, amount) { + // TODO: store txHash -> evidence for txs pending settlement? + console.log('TODO: vstorage update', { txHash, address, amount }); + }, + + /** + * Mark a transaction as `FORWARDED` + * + * @param {EvmHash | undefined} txHash - undefined in case mint before observed + * @param {NobleAddress} address + * @param {bigint} amount + */ + forwarded(txHash, address, amount) { + // TODO: store txHash -> evidence for txs pending settlement? + console.log('TODO: vstorage update', { txHash, address, amount }); }, /** * Lookup all pending entries for a given address and amount * + * XXX only used in tests. should we remove? + * * @param {NobleAddress} address * @param {bigint} amount * @returns {PendingTx[]} @@ -164,7 +251,7 @@ export const prepareStatusManager = zone => { lookupPending(address, amount) { const key = makePendingTxKey(address, amount); if (!pendingTxs.has(key)) { - throw makeError(`Key ${q(key)} not yet observed`); + return harden([]); } return pendingTxs.get(key); }, diff --git a/packages/fast-usdc/test/exos/status-manager.test.ts b/packages/fast-usdc/test/exos/status-manager.test.ts index 8b87fe23ddb..1d78f02fc67 100644 --- a/packages/fast-usdc/test/exos/status-manager.test.ts +++ b/packages/fast-usdc/test/exos/status-manager.test.ts @@ -5,7 +5,7 @@ import { provideDurableZone } from '../supports.js'; import { MockCctpTxEvidences } from '../fixtures.js'; import type { CctpTxEvidence } from '../../src/types.js'; -test('advance creates new entry with ADVANCED status', t => { +test('advancing creates new entry with ADVANCING status', t => { const zone = provideDurableZone('status-test'); const statusManager = prepareStatusManager(zone.subZone('status-manager')); @@ -17,9 +17,9 @@ test('advance creates new entry with ADVANCED status', t => { evidence.tx.amount, ); - t.is(entries[0]?.status, PendingTxStatus.Advanced); + t.is(entries[0]?.status, PendingTxStatus.Advancing); }); -test.todo('ADVANCED transactions are published to vstorage'); +test.todo('ADVANCING transactions are published to vstorage'); test('observe creates new entry with OBSERVED status', t => { const zone = provideDurableZone('status-test'); @@ -60,54 +60,176 @@ test('cannot process same tx twice', t => { t.notThrows(() => statusManager.advance({ ...evidence, chainId: 9999 })); }); -test('settle removes entries from PendingTxs', t => { +test('isSeen checks if a tx has been processed', t => { const zone = provideDurableZone('status-test'); const statusManager = prepareStatusManager(zone.subZone('status-manager')); - const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); - statusManager.advance(evidence); - statusManager.observe({ ...evidence, txHash: '0xtest1' }); + const e1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); + t.false(statusManager.hasBeenObserved(e1)); + statusManager.advance(e1); + t.true(statusManager.hasBeenObserved(e1)); - statusManager.settle(evidence.tx.forwardingAddress, evidence.tx.amount); - statusManager.settle(evidence.tx.forwardingAddress, evidence.tx.amount); + const e2 = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); + t.false(statusManager.hasBeenObserved(e2)); + statusManager.observe(e2); + t.true(statusManager.hasBeenObserved(e2)); +}); - const entries = statusManager.lookupPending( - evidence.tx.forwardingAddress, - evidence.tx.amount, +test('dequeueStatus removes entries from PendingTxs', t => { + const zone = provideDurableZone('status-test'); + const statusManager = prepareStatusManager(zone.subZone('status-manager')); + + const e1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); + const e2 = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); + + statusManager.advance(e1); + statusManager.advanceOutcome(e1.tx.forwardingAddress, e1.tx.amount, true); + statusManager.advance(e2); + statusManager.advanceOutcome(e2.tx.forwardingAddress, e2.tx.amount, false); + statusManager.observe({ ...e1, txHash: '0xtest1' }); + + t.deepEqual( + statusManager.dequeueStatus(e1.tx.forwardingAddress, e1.tx.amount), + { + txHash: e1.txHash, + status: PendingTxStatus.Advanced, + }, + ); + + t.deepEqual( + statusManager.dequeueStatus(e2.tx.forwardingAddress, e2.tx.amount), + { + txHash: e2.txHash, + status: PendingTxStatus.AdvanceFailed, + }, + ); + + t.deepEqual( + statusManager.dequeueStatus(e1.tx.forwardingAddress, e1.tx.amount), + { + txHash: '0xtest1', + status: PendingTxStatus.Observed, + }, + ); + + t.is( + statusManager.lookupPending(e1.tx.forwardingAddress, e1.tx.amount).length, + 0, + 'Settled entries should be deleted', + ); + + t.is( + statusManager.lookupPending(e2.tx.forwardingAddress, e2.tx.amount).length, + 0, + 'Settled entry should be deleted', ); - t.is(entries.length, 0, 'Settled entry should be deleted'); }); -test('cannot SETTLE without an ADVANCED or OBSERVED entry', t => { +test('cannot advanceOutcome without ADVANCING entry', t => { const zone = provideDurableZone('status-test'); const statusManager = prepareStatusManager(zone.subZone('status-manager')); - const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); + const e1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); + const advanceOutcomeFn = () => + statusManager.advanceOutcome(e1.tx.forwardingAddress, e1.tx.amount, true); + const expectedErrMsg = + 'no advancing tx with {"amount":"[150000000n]","sender":"noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelqkd"}'; + + t.throws(advanceOutcomeFn, { + message: expectedErrMsg, + }); + + statusManager.observe(e1); + t.throws(advanceOutcomeFn, { + message: expectedErrMsg, + }); + + const e2 = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); + statusManager.advance(e2); + t.notThrows(() => + statusManager.advanceOutcome(e2.tx.forwardingAddress, e2.tx.amount, true), + ); +}); + +test('advanceOutcome transitions to ADVANCED and ADVANCE_FAILED', t => { + const zone = provideDurableZone('status-test'); + const statusManager = prepareStatusManager(zone.subZone('status-manager')); + const e1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); + const e2 = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); + + statusManager.advance(e1); + statusManager.advanceOutcome(e1.tx.forwardingAddress, e1.tx.amount, true); + t.like(statusManager.lookupPending(e1.tx.forwardingAddress, e1.tx.amount), [ + { + status: PendingTxStatus.Advanced, + }, + ]); - t.throws( - () => - statusManager.settle(evidence.tx.forwardingAddress, evidence.tx.amount), + statusManager.advance(e2); + statusManager.advanceOutcome(e2.tx.forwardingAddress, e2.tx.amount, false); + t.like(statusManager.lookupPending(e2.tx.forwardingAddress, e2.tx.amount), [ { - message: - 'key "pendingTx:[\\"noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelqkd\\",\\"150000000\\"]" not found in collection "PendingTxs"', + status: PendingTxStatus.AdvanceFailed, }, + ]); +}); +test.todo('ADVANCED transactions are published to vstorage'); + +test('dequeueStatus returns undefined when nothing is settleable', t => { + const zone = provideDurableZone('status-test'); + const statusManager = prepareStatusManager(zone.subZone('status-manager')); + + const e1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); + + t.is( + statusManager.dequeueStatus(e1.tx.forwardingAddress, e1.tx.amount), + undefined, ); }); -test('settle SETTLES first matched entry', t => { +test('dequeueStatus returns first (earliest) matched entry', t => { const zone = provideDurableZone('status-test'); const statusManager = prepareStatusManager(zone.subZone('status-manager')); const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); - // advance two + // advance two txs statusManager.advance(evidence); statusManager.advance({ ...evidence, txHash: '0xtest2' }); - // also settles OBSERVED statuses + + // cannot dequeue ADVANCING pendingTx + t.is( + statusManager.dequeueStatus( + evidence.tx.forwardingAddress, + evidence.tx.amount, + ), + undefined, + ); + + statusManager.advanceOutcome( + evidence.tx.forwardingAddress, + evidence.tx.amount, + true, + ); + statusManager.advanceOutcome( + evidence.tx.forwardingAddress, + evidence.tx.amount, + true, + ); + + // also can dequeue OBSERVED statuses statusManager.observe({ ...evidence, txHash: '0xtest3' }); - // settle will settle the first match - statusManager.settle(evidence.tx.forwardingAddress, evidence.tx.amount); + // dequeue will return the first match + t.like( + statusManager.dequeueStatus( + evidence.tx.forwardingAddress, + evidence.tx.amount, + ), + { + status: PendingTxStatus.Advanced, + }, + ); const entries0 = statusManager.lookupPending( evidence.tx.forwardingAddress, evidence.tx.amount, @@ -125,10 +247,26 @@ test('settle SETTLES first matched entry', t => { 'order of remaining entries preserved', ); - // settle again wih same args settles 2nd advance - statusManager.settle(evidence.tx.forwardingAddress, evidence.tx.amount); - // settle again wih same args settles remaining observe - statusManager.settle(evidence.tx.forwardingAddress, evidence.tx.amount); + // dequeue again wih same args to settle 2nd advance + t.like( + statusManager.dequeueStatus( + evidence.tx.forwardingAddress, + evidence.tx.amount, + ), + { + status: 'ADVANCED', + }, + ); + // dequeue again wih same ags to settle remaining observe + t.like( + statusManager.dequeueStatus( + evidence.tx.forwardingAddress, + evidence.tx.amount, + ), + { + status: 'OBSERVED', + }, + ); const entries1 = statusManager.lookupPending( evidence.tx.forwardingAddress, evidence.tx.amount, @@ -136,26 +274,24 @@ test('settle SETTLES first matched entry', t => { // TODO, check vstorage for TxStatus.Settled t.is(entries1?.length, 0, 'settled entries are deleted'); - t.throws( - () => - statusManager.settle(evidence.tx.forwardingAddress, evidence.tx.amount), - { - message: - 'No unsettled entry for "pendingTx:[\\"noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelqkd\\",\\"150000000\\"]"', - }, + t.is( + statusManager.dequeueStatus( + evidence.tx.forwardingAddress, + evidence.tx.amount, + ), + undefined, 'No more matches to settle', ); }); -test('lookup throws when presented a key it has not seen', t => { +test('lookupPending returns empty array when presented a key it has not seen', t => { const zone = provideDurableZone('status-test'); const statusManager = prepareStatusManager(zone.subZone('status-manager')); - t.throws(() => statusManager.lookupPending('noble123', 1n), { - message: 'Key "pendingTx:[\\"noble123\\",\\"1\\"]" not yet observed', - }); + t.deepEqual(statusManager.lookupPending('noble123', 1n), []); }); +// TODO: remove? this doesn't seem to hold it's weight test('StatusManagerKey logic handles addresses with hyphens', async t => { const zone = provideDurableZone('status-test'); const statusManager = prepareStatusManager(zone.subZone('status-manager')); @@ -171,12 +307,23 @@ test('StatusManagerKey logic handles addresses with hyphens', async t => { ); t.is(entries.length, 1); - t.is(entries[0]?.status, PendingTxStatus.Advanced); + t.is(entries[0]?.status, PendingTxStatus.Advancing); + + statusManager.advanceOutcome( + evidence.tx.forwardingAddress, + evidence.tx.amount, + true, + ); - statusManager.settle(evidence.tx.forwardingAddress, evidence.tx.amount); + statusManager.dequeueStatus( + evidence.tx.forwardingAddress, + evidence.tx.amount, + ); const remainingEntries = statusManager.lookupPending( evidence.tx.forwardingAddress, evidence.tx.amount, ); - t.is(remainingEntries.length, 0, 'Entry should be settled'); + t.is(remainingEntries.length, 0, 'Entry should be dequeued from pending'); }); + +test.todo('ADVANCE_FAILED -> FORWARDED transition'); From 9a652f4168a9e033f38edaa6bdb393cfe387473e Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 22 Nov 2024 12:37:01 -0600 Subject: [PATCH 037/174] chore(fast-usdc): advancer: split ADVANCING state --- packages/fast-usdc/src/exos/advancer.js | 119 ++++++---- packages/fast-usdc/src/exos/liquidity-pool.js | 7 +- packages/fast-usdc/test/exos/advancer.test.ts | 207 ++++++++---------- 3 files changed, 164 insertions(+), 169 deletions(-) diff --git a/packages/fast-usdc/src/exos/advancer.js b/packages/fast-usdc/src/exos/advancer.js index ceb4bc09ef8..902cc890283 100644 --- a/packages/fast-usdc/src/exos/advancer.js +++ b/packages/fast-usdc/src/exos/advancer.js @@ -6,12 +6,14 @@ import { VowShape } from '@agoric/vow'; import { q } from '@endo/errors'; import { E } from '@endo/far'; import { M } from '@endo/patterns'; -import { CctpTxEvidenceShape, EudParamShape } from '../type-guards.js'; +import { + CctpTxEvidenceShape, + EudParamShape, + EvmHashShape, +} from '../type-guards.js'; import { addressTools } from '../utils/address.js'; import { makeFeeTools } from '../utils/fees.js'; -const { isGTE } = AmountMath; - /** * @import {HostInterface} from '@agoric/async-flow'; * @import {NatAmount} from '@agoric/ertp'; @@ -19,7 +21,7 @@ const { isGTE } = AmountMath; * @import {ZoeTools} from '@agoric/orchestration/src/utils/zoe-tools.js'; * @import {VowTools} from '@agoric/vow'; * @import {Zone} from '@agoric/zone'; - * @import {CctpTxEvidence, FeeConfig, LogFn} from '../types.js'; + * @import {CctpTxEvidence, EvmHash, FeeConfig, LogFn, NobleAddress} from '../types.js'; * @import {StatusManager} from './status-manager.js'; * @import {LiquidityPoolKit} from './liquidity-pool.js'; */ @@ -46,12 +48,16 @@ const AdvancerKitI = harden({ onFulfilled: M.call(M.undefined(), { amount: AmountShape, destination: ChainAddressShape, + forwardingAddress: M.string(), tmpSeat: M.remotable(), + txHash: EvmHashShape, }).returns(VowShape), onRejected: M.call(M.error(), { amount: AmountShape, destination: ChainAddressShape, + forwardingAddress: M.string(), tmpSeat: M.remotable(), + txHash: EvmHashShape, }).returns(), }), transferHandler: M.interface('TransferHandlerI', { @@ -59,14 +65,27 @@ const AdvancerKitI = harden({ onFulfilled: M.call(M.undefined(), { amount: AmountShape, destination: ChainAddressShape, + forwardingAddress: M.string(), + txHash: EvmHashShape, }).returns(M.undefined()), onRejected: M.call(M.error(), { amount: AmountShape, destination: ChainAddressShape, + forwardingAddress: M.string(), + txHash: EvmHashShape, }).returns(M.undefined()), }), }); +/** + * @typedef {{ + * amount: NatAmount; + * destination: ChainAddress; + * forwardingAddress: NobleAddress; + * txHash: EvmHash; + * }} AdvancerVowCtx + */ + /** * @param {Zone} zone * @param {AdvancerKitPowers} caps @@ -100,6 +119,7 @@ export const prepareAdvancerKit = ( AdvancerKitI, /** * @param {{ + * notifyFacet: import('./settler.js').SettlerKit['notify']; * borrowerFacet: LiquidityPoolKit['borrower']; * poolAccount: HostInterface>; * }} config @@ -120,51 +140,32 @@ export const prepareAdvancerKit = ( async handleTransactionEvent(evidence) { await null; try { + if (statusManager.hasBeenObserved(evidence)) { + log('txHash already seen:', evidence.txHash); + return; + } + const { borrowerFacet, poolAccount } = this.state; const { recipientAddress } = evidence.aux; + // throws if EUD is not found const { EUD } = addressTools.getQueryParams( recipientAddress, EudParamShape, ); - - // this will throw if the bech32 prefix is not found, but is handled by the catch + // throws if the bech32 prefix is not found const destination = chainHub.makeChainAddress(EUD); + const requestedAmount = toAmount(evidence.tx.amount); + // throws if requested does not exceed fees const advanceAmount = feeTools.calculateAdvance(requestedAmount); - // TODO: consider skipping and using `borrow()`s internal balance check - const poolBalance = borrowerFacet.getBalance(); - if (!isGTE(poolBalance, requestedAmount)) { - log( - `Insufficient pool funds`, - `Requested ${q(advanceAmount)} but only have ${q(poolBalance)}`, - ); - statusManager.observe(evidence); - return; - } - - try { - // Mark as Advanced since `transferV` initiates the advance. - // Will throw if we've already .skipped or .advanced this evidence. - statusManager.advance(evidence); - } catch (e) { - // Only anticipated error is `assertNotSeen`, so intercept the - // catch so we don't call .skip which also performs this check - log('Advancer error:', q(e).toString()); - return; - } - const { zcfSeat: tmpSeat } = zcf.makeEmptySeatKit(); const amountKWR = harden({ USDC: advanceAmount }); - try { - borrowerFacet.borrow(tmpSeat, amountKWR); - } catch (e) { - // We do not expect this to fail since there are no turn boundaries - // between .getBalance() and .borrow(). - // We catch to report outside of the normal error flow since this is - // not expected. - log('🚨 advance borrow failed', q(e).toString()); - } + // throws if the pool has insufficient funds + borrowerFacet.borrow(tmpSeat, amountKWR); + + // this cannot throw since `.isSeen()` is called in the same turn + statusManager.advance(evidence); const depositV = localTransfer( tmpSeat, @@ -175,7 +176,9 @@ export const prepareAdvancerKit = ( void watch(depositV, this.facets.depositHandler, { amount: advanceAmount, destination, + forwardingAddress: evidence.tx.forwardingAddress, tmpSeat, + txHash: evidence.txHash, }); } catch (e) { log('Advancer error:', q(e).toString()); @@ -186,10 +189,11 @@ export const prepareAdvancerKit = ( depositHandler: { /** * @param {undefined} result - * @param {{ amount: Amount<'nat'>; destination: ChainAddress; tmpSeat: ZCFSeat }} ctx + * @param {AdvancerVowCtx & { tmpSeat: ZCFSeat }} ctx */ - onFulfilled(result, { amount, destination }) { + onFulfilled(result, ctx) { const { poolAccount } = this.state; + const { amount, destination, forwardingAddress, txHash } = ctx; const transferV = E(poolAccount).transfer(destination, { denom: usdc.denom, value: amount.value, @@ -197,11 +201,13 @@ export const prepareAdvancerKit = ( return watch(transferV, this.facets.transferHandler, { destination, amount, + forwardingAddress, + txHash, }); }, /** * @param {Error} error - * @param {{ amount: Amount<'nat'>; destination: ChainAddress; tmpSeat: ZCFSeat }} ctx + * @param {AdvancerVowCtx & { tmpSeat: ZCFSeat }} ctx */ onRejected(error, { tmpSeat }) { // TODO return seat allocation from ctx to LP? @@ -217,25 +223,44 @@ export const prepareAdvancerKit = ( transferHandler: { /** * @param {undefined} result TODO confirm this is not a bigint (sequence) - * @param {{ destination: ChainAddress; amount: NatAmount; }} ctx + * @param {AdvancerVowCtx} ctx */ - onFulfilled(result, { destination, amount }) { - // TODO vstorage update? We don't currently have a status for - // Advanced + transferV settled + onFulfilled(result, ctx) { + const { notifyFacet } = this.state; + const { amount, destination, forwardingAddress, txHash } = ctx; log( 'Advance transfer fulfilled', q({ amount, destination, result }).toString(), ); + notifyFacet.notifyAdvancingResult( + txHash, + forwardingAddress, + amount.value, + destination.value, + true, + ); }, - onRejected(error) { - // TODO #10510 (comprehensive error testing) determine - // course of action here. This might fail due to timeout. + /** + * @param {Error} error + * @param {AdvancerVowCtx} ctx + */ + onRejected(error, ctx) { + const { notifyFacet } = this.state; + const { amount, destination, forwardingAddress, txHash } = ctx; log('Advance transfer rejected', q(error).toString()); + notifyFacet.notifyAdvancingResult( + txHash, + forwardingAddress, + amount.value, + destination.value, + false, + ); }, }, }, { stateShape: harden({ + notifyFacet: M.remotable(), borrowerFacet: M.remotable(), poolAccount: M.remotable(), }), diff --git a/packages/fast-usdc/src/exos/liquidity-pool.js b/packages/fast-usdc/src/exos/liquidity-pool.js index b280ab08412..d8b2991a4df 100644 --- a/packages/fast-usdc/src/exos/liquidity-pool.js +++ b/packages/fast-usdc/src/exos/liquidity-pool.js @@ -1,4 +1,4 @@ -import { AmountMath, AmountShape } from '@agoric/ertp'; +import { AmountMath } from '@agoric/ertp'; import { makeRecorderTopic, TopicsRecordShape, @@ -84,7 +84,6 @@ export const prepareLiquidityPoolKit = (zone, zcf, USDC, tools) => { 'Liquidity Pool', { borrower: M.interface('borrower', { - getBalance: M.call().returns(AmountShape), borrow: M.call( SeatShape, harden({ USDC: makeNatAmountShape(USDC, 1n) }), @@ -152,10 +151,6 @@ export const prepareLiquidityPoolKit = (zone, zcf, USDC, tools) => { }, { borrower: { - getBalance() { - const { poolSeat } = this.state; - return poolSeat.getAmountAllocated('USDC', USDC); - }, /** * @param {ZCFSeat} toSeat * @param {{ USDC: Amount<'nat'>}} amountKWR diff --git a/packages/fast-usdc/test/exos/advancer.test.ts b/packages/fast-usdc/test/exos/advancer.test.ts index fb21deabf86..fcfbe85c7ef 100644 --- a/packages/fast-usdc/test/exos/advancer.test.ts +++ b/packages/fast-usdc/test/exos/advancer.test.ts @@ -8,10 +8,13 @@ import { Far } from '@endo/pass-style'; import { makePromiseKit } from '@endo/promise-kit'; import type { NatAmount } from '@agoric/ertp'; import { type ZoeTools } from '@agoric/orchestration/src/utils/zoe-tools.js'; +import { q } from '@endo/errors'; import { PendingTxStatus } from '../../src/constants.js'; import { prepareAdvancer } from '../../src/exos/advancer.js'; +import type { SettlerKit } from '../../src/exos/settler.js'; import { prepareStatusManager } from '../../src/exos/status-manager.js'; - +import { makeFeeTools } from '../../src/utils/fees.js'; +import { addressTools } from '../../src/utils/address.js'; import { commonSetup } from '../supports.js'; import { MockCctpTxEvidences } from '../fixtures.js'; import { @@ -33,7 +36,6 @@ const createTestExtensions = (t, common: CommonSetup) => { bootstrap: { rootZone, vowTools }, facadeServices: { chainHub }, brands: { usdc }, - utils: { pourPayment }, } = common; const { log, inspectLogs } = makeTestLogger(t.log); @@ -83,33 +85,33 @@ const createTestExtensions = (t, common: CommonSetup) => { zcf: mockZCF, }); - /** pretend we have 1M USDC in pool deposits */ - let mockPoolBalance = usdc.units(1_000_000); - /** - * adjust balance from 1M default to test insufficient funds - * @param value - */ - const setMockPoolBalance = (value: bigint) => { - mockPoolBalance = usdc.make(value); - }; + type NotifyArgs = Parameters; + const notifyAdvancingResultCalls: NotifyArgs[] = []; + const mockNotifyF = Far('Settler Notify Facet', { + notifyAdvancingResult: (...args: NotifyArgs) => { + console.log('Settler.notifyAdvancingResult called with', args); + notifyAdvancingResultCalls.push(args); + }, + }); - const borrowUnderlyingPK = makePromiseKit(); - const resolveBorrowUnderlyingP = () => { - // pretend funds are allocated to tmpSeat provided to borrow - return borrowUnderlyingPK.resolve(); - }; - const rejectBorrowUnderlyingP = () => - borrowUnderlyingPK.reject('Mock unable to borrow.'); + const mockBorrowerF = Far('LiquidityPool Borrow Facet', { + borrow: (seat: ZCFSeat, amounts: { USDC: NatAmount }) => { + console.log('LP.borrow called with', amounts); + }, + }); + + const mockBorrowerErrorF = Far('LiquidityPool Borrow Facet', { + borrow: (seat: ZCFSeat, amounts: { USDC: NatAmount }) => { + console.log('LP.borrow called with', amounts); + throw new Error( + `Cannot borrow. Requested ${q(amounts.USDC)} must be less than pool balance ${q(usdc.make(1n))}.`, + ); + }, + }); const advancer = makeAdvancer({ - borrowerFacet: Far('LiquidityPool Borrow Facet', { - getBalance: () => mockPoolBalance, - borrow: (seat: ZCFSeat, amounts: { USDC: NatAmount }) => { - t.log('borrowUnderlying called with', amounts); - return borrowUnderlyingPK.promise; - }, - repay: () => Promise.resolve(), - }), + borrowerFacet: mockBorrowerF, + notifyFacet: mockNotifyF, poolAccount: mockAccounts.mockPoolAccount.account, }); @@ -120,18 +122,19 @@ const createTestExtensions = (t, common: CommonSetup) => { }, helpers: { inspectLogs, + inspectNotifyCalls: () => harden(notifyAdvancingResultCalls), }, mocks: { ...mockAccounts, - setMockPoolBalance, - resolveBorrowUnderlyingP, - rejectBorrowUnderlyingP, + mockBorrowerErrorF, + mockNotifyF, resolveLocalTransferV, }, services: { advancer, makeAdvancer, statusManager, + feeTools: makeFeeTools(feeConfig), }, } as const; }; @@ -150,29 +153,24 @@ test.beforeEach(async t => { }; }); -test('updates status to ADVANCED in happy path', async t => { +test('updates status to ADVANCING in happy path', async t => { const { extensions: { - services: { advancer, statusManager }, - helpers: { inspectLogs }, - mocks: { - mockPoolAccount, - resolveBorrowUnderlyingP, - resolveLocalTransferV, - }, + services: { advancer, feeTools, statusManager }, + helpers: { inspectLogs, inspectNotifyCalls }, + mocks: { mockPoolAccount, resolveLocalTransferV }, }, brands: { usdc }, } = t.context; const mockEvidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); - const handleTxP = advancer.handleTransactionEvent(mockEvidence); + void advancer.handleTransactionEvent(mockEvidence); - resolveBorrowUnderlyingP(); + // pretend borrow succeeded and funds were depositing to the LCA resolveLocalTransferV(); - await eventLoopIteration(); + // pretend the IBC Transfer settled mockPoolAccount.transferVResolver.resolve(); - - await handleTxP; + // wait for handleTransactionEvent to do work await eventLoopIteration(); const entries = statusManager.lookupPending( @@ -182,7 +180,7 @@ test('updates status to ADVANCED in happy path', async t => { t.deepEqual( entries, - [{ ...mockEvidence, status: PendingTxStatus.Advanced }], + [{ ...mockEvidence, status: PendingTxStatus.Advancing }], 'ADVANCED status in happy path', ); @@ -190,63 +188,39 @@ test('updates status to ADVANCED in happy path', async t => { 'Advance transfer fulfilled', '{"amount":{"brand":"[Alleged: USDC brand]","value":"[146999999n]"},"destination":{"chainId":"osmosis-1","encoding":"bech32","value":"osmo183dejcnmkka5dzcu9xw6mywq0p2m5peks28men"},"result":"[undefined]"}', ]); -}); - -test('updates status to OBSERVED on insufficient pool funds', async t => { - const { - extensions: { - services: { advancer, statusManager }, - helpers: { inspectLogs }, - mocks: { setMockPoolBalance }, - }, - } = t.context; - - const mockEvidence = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); - const handleTxP = advancer.handleTransactionEvent(mockEvidence); - - setMockPoolBalance(1n); - await handleTxP; - - const entries = statusManager.lookupPending( - mockEvidence.tx.forwardingAddress, - mockEvidence.tx.amount, - ); - t.deepEqual( - entries, - [{ ...mockEvidence, status: PendingTxStatus.Observed }], - 'OBSERVED status on insufficient pool funds', - ); - - t.deepEqual(inspectLogs(0), [ - 'Insufficient pool funds', - 'Requested {"brand":"[Alleged: USDC brand]","value":"[294999999n]"} but only have {"brand":"[Alleged: USDC brand]","value":"[1n]"}', + // We expect to see an `Advanced` update, but that is now Settler's job. + // but we can ensure it's called + t.deepEqual(inspectNotifyCalls(), [ + [ + mockEvidence.txHash, + mockEvidence.tx.forwardingAddress, + feeTools.calculateAdvance(usdc.make(mockEvidence.tx.amount)).value, + addressTools.getQueryParams(mockEvidence.aux.recipientAddress).EUD, + true, // indicates transfer succeeded + ], ]); }); -test('updates status to OBSERVED if balance query fails', async t => { +test('updates status to OBSERVED on insufficient pool funds', async t => { const { extensions: { services: { makeAdvancer, statusManager }, helpers: { inspectLogs }, - mocks: { mockPoolAccount }, + mocks: { mockPoolAccount, mockBorrowerErrorF, mockNotifyF }, }, - brands: { usdc }, } = t.context; // make a new advancer that intentionally throws const advancer = makeAdvancer({ - // @ts-expect-error mock - borrowerFacet: Far('LiquidityPool Borrow Facet', { - getBalance: () => { - throw new Error('lookupBalance failed'); - }, - }), + borrowerFacet: mockBorrowerErrorF, + notifyFacet: mockNotifyF, poolAccount: mockPoolAccount.account, }); const mockEvidence = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); - await advancer.handleTransactionEvent(mockEvidence); + void advancer.handleTransactionEvent(mockEvidence); + await eventLoopIteration(); const entries = statusManager.lookupPending( mockEvidence.tx.forwardingAddress, @@ -256,12 +230,12 @@ test('updates status to OBSERVED if balance query fails', async t => { t.deepEqual( entries, [{ ...mockEvidence, status: PendingTxStatus.Observed }], - 'OBSERVED status on balance query failure', + 'OBSERVED status on insufficient pool funds', ); t.deepEqual(inspectLogs(0), [ 'Advancer error:', - '"[Error: lookupBalance failed]"', + '"[Error: Cannot borrow. Requested {\\"brand\\":\\"[Alleged: USDC brand]\\",\\"value\\":\\"[294999999n]\\"} must be less than pool balance {\\"brand\\":\\"[Alleged: USDC brand]\\",\\"value\\":\\"[1n]\\"}.]"', ]); }); @@ -293,29 +267,21 @@ test('updates status to OBSERVED if makeChainAddress fails', async t => { ]); }); -// TODO #10510 this failure should be handled differently -test('does not update status on failed transfer', async t => { +test('calls notifyAdvancingResult (AdvancedFailed) on failed transfer', async t => { const { extensions: { - services: { advancer, statusManager }, - helpers: { inspectLogs }, - mocks: { - mockPoolAccount, - resolveBorrowUnderlyingP, - resolveLocalTransferV, - }, + services: { advancer, feeTools, statusManager }, + helpers: { inspectLogs, inspectNotifyCalls }, + mocks: { mockPoolAccount, resolveLocalTransferV }, }, brands: { usdc }, } = t.context; const mockEvidence = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); - const handleTxP = advancer.handleTransactionEvent(mockEvidence); + void advancer.handleTransactionEvent(mockEvidence); - resolveBorrowUnderlyingP(); + // pretend borrow and deposit to LCA succeed resolveLocalTransferV(); - mockPoolAccount.transferVResolver.reject(new Error('simulated error')); - - await handleTxP; await eventLoopIteration(); const entries = statusManager.lookupPending( @@ -323,20 +289,33 @@ test('does not update status on failed transfer', async t => { mockEvidence.tx.amount, ); - // TODO, this failure should be handled differently t.deepEqual( entries, - [{ ...mockEvidence, status: PendingTxStatus.Advanced }], - 'tx status is still ADVANCED even though advance failed', + [{ ...mockEvidence, status: PendingTxStatus.Advancing }], + 'tx is Advancing', ); + mockPoolAccount.transferVResolver.reject(new Error('simulated error')); + await eventLoopIteration(); + t.deepEqual(inspectLogs(0), [ 'Advance transfer rejected', '"[Error: simulated error]"', ]); + + // We expect to see an `AdvancedFailed` update, but that is now Settler's job. + // but we can ensure it's called + t.deepEqual(inspectNotifyCalls(), [ + [ + mockEvidence.txHash, + mockEvidence.tx.forwardingAddress, + feeTools.calculateAdvance(usdc.make(mockEvidence.tx.amount)).value, + addressTools.getQueryParams(mockEvidence.aux.recipientAddress).EUD, + false, // this indicates transfer succeeded + ], + ]); }); -// TODO: might be consideration of `EventFeed` test('updates status to OBSERVED if pre-condition checks fail', async t => { const { extensions: { @@ -371,22 +350,16 @@ test('will not advance same txHash:chainId evidence twice', async t => { extensions: { services: { advancer }, helpers: { inspectLogs }, - mocks: { - mockPoolAccount, - resolveBorrowUnderlyingP, - resolveLocalTransferV, - }, + mocks: { mockPoolAccount, resolveLocalTransferV }, }, } = t.context; const mockEvidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); // First attempt - const handleTxP = advancer.handleTransactionEvent(mockEvidence); - resolveBorrowUnderlyingP(); + void advancer.handleTransactionEvent(mockEvidence); resolveLocalTransferV(); mockPoolAccount.transferVResolver.resolve(); - await handleTxP; await eventLoopIteration(); t.deepEqual(inspectLogs(0), [ @@ -395,12 +368,14 @@ test('will not advance same txHash:chainId evidence twice', async t => { ]); // Second attempt - await advancer.handleTransactionEvent(mockEvidence); - + void advancer.handleTransactionEvent(mockEvidence); + await eventLoopIteration(); t.deepEqual(inspectLogs(1), [ - 'Advancer error:', - '"[Error: Transaction already seen: \\"seenTx:[\\\\\\"0xc81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761702\\\\\\",1]\\"]"', + 'txHash already seen:', + '0xc81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761702', ]); }); -test.todo('zoeTools.localTransfer fails to deposit borrowed USDC to LOA'); +test.todo( + '#10510 zoeTools.localTransfer fails to deposit borrowed USDC to LOA', +); From 17b04238a73ff14a2617e73cf03c52d79d733ebc Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 22 Nov 2024 12:37:18 -0600 Subject: [PATCH 038/174] feat(fast-usdc): settler disburses or forwards funds --- packages/fast-usdc/src/exos/settler.js | 308 ++++++++++++++---- packages/fast-usdc/test/exos/settler.test.ts | 320 ++++++++++++++++--- packages/fast-usdc/test/mocks.ts | 13 + 3 files changed, 537 insertions(+), 104 deletions(-) diff --git a/packages/fast-usdc/src/exos/settler.js b/packages/fast-usdc/src/exos/settler.js index d3096e72476..84707a0867a 100644 --- a/packages/fast-usdc/src/exos/settler.js +++ b/packages/fast-usdc/src/exos/settler.js @@ -1,97 +1,291 @@ -import { assertAllDefined } from '@agoric/internal'; +import { AmountMath } from '@agoric/ertp'; +import { assertAllDefined, makeTracer } from '@agoric/internal'; import { atob } from '@endo/base64'; -import { makeError, q } from '@endo/errors'; +import { E } from '@endo/far'; import { M } from '@endo/patterns'; +import { PendingTxStatus } from '../constants.js'; import { addressTools } from '../utils/address.js'; +import { makeFeeTools } from '../utils/fees.js'; +import { EvmHashShape } from '../type-guards.js'; /** * @import {FungibleTokenPacketData} from '@agoric/cosmic-proto/ibc/applications/transfer/v2/packet.js'; - * @import {Denom} from '@agoric/orchestration'; + * @import {Denom, OrchestrationAccount, ChainHub} from '@agoric/orchestration'; + * @import {WithdrawToSeat} from '@agoric/orchestration/src/utils/zoe-tools' * @import {IBCChannelID, VTransferIBCEvent} from '@agoric/vats'; * @import {Zone} from '@agoric/zone'; - * @import {NobleAddress} from '../types.js'; + * @import {HostOf, HostInterface} from '@agoric/async-flow'; + * @import {TargetRegistration} from '@agoric/vats/src/bridge-target.js'; + * @import {NobleAddress, LiquidityPoolKit, FeeConfig, EvmHash} from '../types.js'; * @import {StatusManager} from './status-manager.js'; */ +const trace = makeTracer('Settler'); + +/** + * NOTE: not meant to be parsable. + * + * @param {NobleAddress} addr + * @param {bigint} amount + */ +const makeMintedEarlyKey = (addr, amount) => + `pendingTx:${JSON.stringify([addr, String(amount)])}`; + /** * @param {Zone} zone * @param {object} caps * @param {StatusManager} caps.statusManager + * @param {Brand<'nat'>} caps.USDC + * @param {Pick} caps.zcf + * @param {FeeConfig} caps.feeConfig + * @param {HostOf} caps.withdrawToSeat + * @param {import('@agoric/vow').VowTools} caps.vowTools + * @param {ChainHub} caps.chainHub */ -export const prepareSettler = (zone, { statusManager }) => { +export const prepareSettler = ( + zone, + { statusManager, USDC, zcf, feeConfig, withdrawToSeat, vowTools, chainHub }, +) => { assertAllDefined({ statusManager }); - return zone.exoClass( + return zone.exoClassKit( 'Fast USDC Settler', - M.interface('SettlerI', { - receiveUpcall: M.call(M.record()).returns(M.promise()), - }), + { + creator: M.interface('SettlerCreatorI', { + monitorMintingDeposits: M.callWhen().returns(M.any()), + }), + tap: M.interface('SettlerTapI', { + receiveUpcall: M.call(M.record()).returns(M.promise()), + }), + notify: M.interface('SettlerNotifyI', { + notifyAdvancingResult: M.call( + M.string(), + M.nat(), + M.boolean(), + ).returns(), + }), + self: M.interface('SettlerSelfI', { + disburse: M.call(EvmHashShape, M.string(), M.nat()).returns( + M.promise(), + ), + forward: M.call( + M.opt(EvmHashShape), + M.string(), + M.nat(), + M.string(), + ).returns(), + }), + transferHandler: M.interface('SettlerTransferI', { + onFulfilled: M.call(M.any(), M.record()).returns(), + onRejected: M.call(M.any(), M.record()).returns(), + }), + }, /** - * * @param {{ * sourceChannel: IBCChannelID; - * remoteDenom: Denom + * remoteDenom: Denom; + * repayer: LiquidityPoolKit['repayer']; + * settlementAccount: HostInterface> * }} config */ - config => harden(config), + config => { + return { + ...config, + /** @type {HostInterface|undefined} */ + registration: undefined, + /** @type {SetStore>} */ + mintedEarly: zone.detached().setStore('mintedEarly'), + }; + }, { - /** @param {VTransferIBCEvent} event */ - async receiveUpcall(event) { - if (event.packet.source_channel !== this.state.sourceChannel) { - // TODO #10390 log all early returns - // only interested in packets from the issuing chain - return; - } - const tx = /** @type {FungibleTokenPacketData} */ ( - JSON.parse(atob(event.packet.data)) - ); - if (tx.denom !== this.state.remoteDenom) { - // only interested in uusdc - return; - } - - if (!addressTools.hasQueryParams(tx.receiver)) { - // only interested in receivers with query params - return; - } - - const { EUD } = addressTools.getQueryParams(tx.receiver); - if (!EUD) { - // only interested in receivers with EUD parameter - return; - } - - // TODO discern between SETTLED and OBSERVED; each has different fees/destinations - const hasPendingSettlement = statusManager.hasPendingSettlement( + creator: { + async monitorMintingDeposits() { + const { settlementAccount } = this.state; + const registration = await vowTools.when( + settlementAccount.monitorTransfers(this.facets.tap), + ); + assert.typeof(registration, 'object'); + this.state.registration = registration; + }, + }, + tap: { + /** @param {VTransferIBCEvent} event */ + async receiveUpcall(event) { + const { sourceChannel, remoteDenom } = this.state; + const { packet } = event; + if (packet.source_channel !== sourceChannel) { + const { source_channel: actual } = packet; + trace('unexpected channel', { actual, expected: sourceChannel }); + return; + } + + // TODO: why is it safe to cast this without a runtime check? + const tx = /** @type {FungibleTokenPacketData} */ ( + JSON.parse(atob(packet.data)) + ); + // given the sourceChannel check, we can be certain of this cast - /** @type {NobleAddress} */ (tx.sender), - BigInt(tx.amount), - ); - if (!hasPendingSettlement) { - // TODO FAILURE PATH -> put money in recovery account or .transfer to receiver - // TODO should we have an ORPHANED TxStatus for this? - throw makeError( - `🚨 No pending settlement found for ${q(tx.sender)} ${q(tx.amount)}`, + const sender = /** @type {NobleAddress} */ (tx.sender); + + if (tx.denom !== remoteDenom) { + const { denom: actual } = tx; + trace('unexpected denom', { actual, expected: remoteDenom }); + return; + } + + if (!addressTools.hasQueryParams(tx.receiver)) { + console.log('not query params', tx.receiver); + return; + } + + const { EUD } = addressTools.getQueryParams(tx.receiver); + if (!EUD) { + console.log('no EUD parameter', tx.receiver); + return; + } + + const amount = BigInt(tx.amount); // TODO: what if this throws? + + const { self } = this.facets; + const found = statusManager.dequeueStatus(sender, amount); + trace('dequeued', found, 'for', sender, amount); + switch (found?.status) { + case PendingTxStatus.Advanced: + return self.disburse(found.txHash, sender, amount); + + case PendingTxStatus.Advancing: + this.state.mintedEarly.add(makeMintedEarlyKey(sender, amount)); + return; + + case undefined: + case PendingTxStatus.Observed: + case PendingTxStatus.AdvanceFailed: + default: + return self.forward(found?.txHash, sender, amount, EUD); + } + }, + }, + notify: { + /** + * @param {EvmHash} txHash + * @param {NobleAddress} sender + * @param {NatValue} amount + * @param {string} EUD + * @param {boolean} success + * @returns {void} + */ + notifyAdvancingResult(txHash, sender, amount, EUD, success) { + const { mintedEarly } = this.state; + const key = makeMintedEarlyKey(sender, amount); + if (mintedEarly.has(key)) { + mintedEarly.delete(key); + if (success) { + void this.facets.self.disburse(txHash, sender, amount); + } else { + void this.facets.self.forward(txHash, sender, amount, EUD); + } + } else { + statusManager.advanceOutcome(sender, amount, success); + } + }, + }, + self: { + /** + * @param {EvmHash} txHash + * @param {NobleAddress} sender + * @param {NatValue} amount + */ + async disburse(txHash, sender, amount) { + const { repayer, settlementAccount } = this.state; + const received = AmountMath.make(USDC, amount); + const { zcfSeat: settlingSeat } = zcf.makeEmptySeatKit(); + const { calculateSplit } = makeFeeTools(feeConfig); + const split = calculateSplit(received); + trace('disbursing', split); + + // TODO: what if this throws? + // arguably, it cannot. Even if deposits + // and notifications get out of order, + // we don't ever withdraw more than has been deposited. + await vowTools.when( + withdrawToSeat( + // @ts-expect-error Vow vs. Promise stuff. TODO: is this OK??? + settlementAccount, + settlingSeat, + harden({ In: received }), + ), + ); + zcf.atomicRearrange( + harden([[settlingSeat, settlingSeat, { In: received }, split]]), ); - } + repayer.repay(settlingSeat, split); - // TODO disperse funds - // ~1. fee to contractFeeAccount - // ~2. remainder in poolAccount + // update status manager, marking tx `SETTLED` + statusManager.disbursed(txHash, sender, amount); + }, + /** + * @param {EvmHash | undefined} txHash + * @param {NobleAddress} sender + * @param {NatValue} amount + * @param {string} EUD + */ + forward(txHash, sender, amount, EUD) { + const { settlementAccount } = this.state; - // update status manager, marking tx `SETTLED` - statusManager.settle( - /** @type {NobleAddress} */ (tx.sender), - BigInt(tx.amount), - ); + const dest = chainHub.makeChainAddress(EUD); + + // TODO? statusManager.forwarding(txHash, sender, amount); + const txfrV = E(settlementAccount).transfer( + dest, + AmountMath.make(USDC, amount), + ); + void vowTools.watch(txfrV, this.facets.transferHandler, { + txHash, + sender, + amount, + }); + }, + }, + transferHandler: { + /** + * @param {unknown} result + * @param {SettlerTransferCtx} ctx + * + * @typedef {{ + * txHash: EvmHash; + * sender: NobleAddress; + * amount: NatValue; + * }} SettlerTransferCtx + */ + onFulfilled(result, ctx) { + const { txHash, sender, amount } = ctx; + statusManager.forwarded(txHash, sender, amount); + }, + /** + * @param {unknown} _result + * @param {SettlerTransferCtx} _ctx + */ + onRejected(_result, _ctx) { + // const { txHash, sender, amount } = ctx; + // TODO: statusManager.forwardFailed(txHash, sender, amount); + }, }, }, { stateShape: harden({ + repayer: M.remotable('Repayer'), + settlementAccount: M.remotable('Account'), + registration: M.or(M.undefined(), M.remotable('Registration')), sourceChannel: M.string(), remoteDenom: M.string(), + mintedEarly: M.remotable('mintedEarly'), }), }, ); }; harden(prepareSettler); + +/** + * XXX consider using pickFacet (do we have pickFacets?) + * @typedef {ReturnType>} SettlerKit + */ diff --git a/packages/fast-usdc/test/exos/settler.test.ts b/packages/fast-usdc/test/exos/settler.test.ts index e8ff695f0b1..ef942ad572a 100644 --- a/packages/fast-usdc/test/exos/settler.test.ts +++ b/packages/fast-usdc/test/exos/settler.test.ts @@ -1,32 +1,80 @@ -import type { TestFn } from 'ava'; import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; +import type { TestFn } from 'ava'; import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js'; -import type { IBCChannelID } from '@agoric/vats'; -import type { Denom } from '@agoric/orchestration'; +import type { Zone } from '@agoric/zone'; +import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import { PendingTxStatus } from '../../src/constants.js'; -import { prepareStatusManager } from '../../src/exos/status-manager.js'; import { prepareSettler } from '../../src/exos/settler.js'; - -import { provideDurableZone } from '../supports.js'; -import { MockCctpTxEvidences, MockVTransferEvents } from '../fixtures.js'; +import { prepareStatusManager } from '../../src/exos/status-manager.js'; import type { CctpTxEvidence } from '../../src/types.js'; +import { MockCctpTxEvidences, MockVTransferEvents } from '../fixtures.js'; +import { prepareMockOrchAccounts } from '../mocks.js'; +import { commonSetup, provideDurableZone } from '../supports.js'; +import { makeFeeTools } from '../../src/utils/fees.js'; -const test = anyTest as TestFn<{ - makeSettler: ReturnType; - statusManager: ReturnType; - defaultSettlerParams: { - sourceChannel: IBCChannelID; - remoteDenom: Denom; - }; - simulateAdvance: (evidence?: CctpTxEvidence) => CctpTxEvidence; -}>; +const mockZcf = (zone: Zone) => { + const callLog = [] as any[]; + + const makeSeatKit = zone.exoClassKit('MockSeatKit', undefined, () => ({}), { + zcfSeat: { + getCurrentAllocation() { + return {}; + }, + }, + userSeat: {}, + }); -test.before(t => { - const zone = provideDurableZone('settler-test'); + const zcf = zone.exo('MockZCF', undefined, { + atomicRearrange(parts) { + callLog.push({ method: 'atomicRearrange', parts }); + }, + makeEmptySeatKit() { + const kit = makeSeatKit() as unknown as ZcfSeatKit; + return kit; + }, + }); + return { zcf, callLog }; +}; + +const makeTestContext = async t => { + const common = await commonSetup(t); + const { rootZone: zone } = common.bootstrap; const statusManager = prepareStatusManager(zone.subZone('status-manager')); + + const { zcf, callLog } = mockZcf(zone.subZone('Mock ZCF')); + + const { rootZone, vowTools } = common.bootstrap; + const { usdc } = common.brands; + const mockAccounts = prepareMockOrchAccounts(rootZone.subZone('accounts'), { + vowTools, + log: t.log, + usdc, + }); + + const mockWithdrawToSeat = (account, seat, amounts) => { + callLog.push( + harden({ + function: 'withdrawToSeat', + account, + allocations: seat.getCurrentAllocation(), + amounts, + }), + ); + return vowTools.asVow(() => {}); + }; + + const { chainHub } = common.facadeServices; + chainHub.registerChain('dydx', fetchedChainInfo.dydx); + chainHub.registerChain('osmosis', fetchedChainInfo.osmosis); const makeSettler = prepareSettler(zone.subZone('settler'), { statusManager, + USDC: usdc.brand, + zcf, + withdrawToSeat: mockWithdrawToSeat, + feeConfig: common.commonPrivateArgs.feeConfig, + vowTools: common.bootstrap.vowTools, + chainHub, }); const defaultSettlerParams = harden({ @@ -36,50 +84,192 @@ test.before(t => { remoteDenom: 'uusdc', }); - const simulateAdvance = (evidence: CctpTxEvidence) => { - const cctpTxEvidence: CctpTxEvidence = { - ...MockCctpTxEvidences.AGORIC_PLUS_OSMO(), - ...evidence, - }; - t.log('Mock CCTP Evidence:', cctpTxEvidence); - t.log('Pretend we initiated advance, mark as `ADVANCED`'); - statusManager.advance(cctpTxEvidence); + const simulate = harden({ + advance: (evidence?: CctpTxEvidence) => { + const cctpTxEvidence: CctpTxEvidence = { + ...MockCctpTxEvidences.AGORIC_PLUS_OSMO(), + ...evidence, + }; + t.log('Mock CCTP Evidence:', cctpTxEvidence); + t.log('Pretend we initiated advance, mark as `ADVANCED`'); + statusManager.advance(cctpTxEvidence); + const { forwardingAddress, amount } = cctpTxEvidence.tx; + statusManager.advanceOutcome(forwardingAddress, BigInt(amount), true); - return cctpTxEvidence; - }; + return cctpTxEvidence; + }, + + observe: (evidence?: CctpTxEvidence) => { + const cctpTxEvidence: CctpTxEvidence = { + ...MockCctpTxEvidences.AGORIC_PLUS_OSMO(), + ...evidence, + }; + t.log('Mock CCTP Evidence:', cctpTxEvidence); + t.log('Pretend we `OBSERVED`'); + statusManager.observe(cctpTxEvidence); + + return cctpTxEvidence; + }, + }); - t.context = { + const repayer = zone.exo('Repayer Mock', undefined, { + repay(fromSeat: ZCFSeat, amounts: AmountKeywordRecord) { + callLog.push(harden({ method: 'repay', fromSeat, amounts })); + }, + }); + + return { + common, makeSettler, statusManager, defaultSettlerParams, - simulateAdvance, + simulate, + repayer, + peekCalls: () => harden([...callLog]), + accounts: mockAccounts, }; +}; + +const test = anyTest as TestFn>>; + +test.beforeEach(async t => (t.context = await makeTestContext(t))); + +test('happy path: disburse to LPs; StatusManager removes tx', async t => { + const { + common, + makeSettler, + statusManager, + defaultSettlerParams, + repayer, + simulate, + accounts, + peekCalls, + } = t.context; + const { usdc } = common.brands; + const { feeConfig } = common.commonPrivateArgs; + + const settler = makeSettler({ + repayer, + settlementAccount: accounts.settlement.account, + ...defaultSettlerParams, + }); + + const cctpTxEvidence = simulate.advance(); + t.deepEqual( + statusManager.lookupPending( + cctpTxEvidence.tx.forwardingAddress, + cctpTxEvidence.tx.amount, + ), + [{ ...cctpTxEvidence, status: PendingTxStatus.Advanced }], + 'statusManager shows this tx advanced', + ); + + t.log('Simulate incoming IBC settlement'); + void settler.tap.receiveUpcall(MockVTransferEvents.AGORIC_PLUS_OSMO()); + await eventLoopIteration(); + + t.log('Funds were disbursed to LP.'); + const calls = peekCalls(); + t.is(calls.length, 3); + const [withdraw, rearrange, repay] = calls; + + t.deepEqual( + withdraw, + { + function: 'withdrawToSeat', + account: accounts.settlement.account, + allocations: {}, + amounts: { In: usdc.units(150) }, + }, + '1. settler called withdrawToSeat', + ); + + // see also AGORIC_PLUS_OSMO in fees.test.ts + const In = usdc.units(150); + const expectedSplit = makeFeeTools(feeConfig).calculateSplit(In); + t.deepEqual(expectedSplit, { + ContractFee: usdc.make(600000n), + PoolFee: usdc.make(2400001n), + Principal: usdc.make(146999999n), + }); + + t.like( + rearrange, + { method: 'atomicRearrange' }, + '2. settler called atomicRearrange ', + ); + t.is(rearrange.parts.length, 1); + const [s1, s2, a1, a2] = rearrange.parts[0]; + t.is(s1, s2, 'src and dest seat are the same'); + t.deepEqual([a1, a2], [{ In }, expectedSplit]); + + t.like( + repay, + { + method: 'repay', + amounts: expectedSplit, + }, + '3. settler called repay() on liquidity pool repayer facet', + ); + t.is(repay.fromSeat, s1); + + t.deepEqual( + statusManager.lookupPending( + cctpTxEvidence.tx.forwardingAddress, + cctpTxEvidence.tx.amount, + ), + [], + 'SETTLED entry removed from StatusManger', + ); + // TODO, confirm vstorage write for TxStatus.SETTLED }); -test('StatusManger gets `SETTLED` update in happy path', async t => { - const { makeSettler, statusManager, defaultSettlerParams, simulateAdvance } = - t.context; - const settler = makeSettler(defaultSettlerParams); +test('slow path: forward to EUD; remove pending tx', async t => { + const { + common, + makeSettler, + statusManager, + defaultSettlerParams, + repayer, + simulate, + accounts, + peekCalls, + } = t.context; + const { usdc } = common.brands; - const cctpTxEvidence = simulateAdvance(); + const settler = makeSettler({ + repayer, + settlementAccount: accounts.settlement.account, + ...defaultSettlerParams, + }); + + const cctpTxEvidence = simulate.observe(); t.deepEqual( statusManager.lookupPending( cctpTxEvidence.tx.forwardingAddress, cctpTxEvidence.tx.amount, ), - [ - { - ...cctpTxEvidence, - status: PendingTxStatus.Advanced, - }, - ], + [{ ...cctpTxEvidence, status: PendingTxStatus.Observed }], + 'statusManager shows this tx is only observed', ); t.log('Simulate incoming IBC settlement'); - void settler.receiveUpcall(MockVTransferEvents.AGORIC_PLUS_OSMO()); + void settler.tap.receiveUpcall(MockVTransferEvents.AGORIC_PLUS_OSMO()); + await eventLoopIteration(); - t.log('TODO test funds settled in right places'); - // TODO, test settlement of funds + t.log('funds are forwarded; no interaction with LP'); + t.deepEqual(peekCalls(), []); + t.deepEqual(accounts.settlement.callLog, [ + [ + 'transfer', + { + chainId: 'osmosis-1', + encoding: 'bech32', + value: 'osmo183dejcnmkka5dzcu9xw6mywq0p2m5peks28men', + }, + usdc.units(150), + ], + ]); t.deepEqual( statusManager.lookupPending( @@ -92,8 +282,44 @@ test('StatusManger gets `SETTLED` update in happy path', async t => { // TODO, confirm vstorage write for TxStatus.SETTLED }); -test.todo("StatusManager does not receive update when we can't settle"); +test('Settlement for unknown transaction', async t => { + const { + common, + makeSettler, + statusManager, + defaultSettlerParams, + repayer, + simulate, + accounts, + peekCalls, + } = t.context; + const { usdc } = common.brands; -test.todo('settler disperses funds'); + const settler = makeSettler({ + repayer, + settlementAccount: accounts.settlement.account, + ...defaultSettlerParams, + }); + + t.log('Simulate incoming IBC settlement'); + void settler.tap.receiveUpcall(MockVTransferEvents.AGORIC_PLUS_OSMO()); + await eventLoopIteration(); -test.todo('Observed -> Settle flow'); + t.log('USDC was forwarded'); + t.deepEqual(peekCalls(), []); + t.deepEqual(accounts.settlement.callLog, [ + [ + 'transfer', + { + chainId: 'osmosis-1', + encoding: 'bech32', + value: 'osmo183dejcnmkka5dzcu9xw6mywq0p2m5peks28men', + }, + usdc.units(150), + ], + ]); + + // TODO, confirm vstorage write for TxStatus.FORWARDED +}); + +test.todo("StatusManager does not receive update when we can't settle"); diff --git a/packages/fast-usdc/test/mocks.ts b/packages/fast-usdc/test/mocks.ts index ad82a2665cf..d6196d3b7d5 100644 --- a/packages/fast-usdc/test/mocks.ts +++ b/packages/fast-usdc/test/mocks.ts @@ -44,11 +44,24 @@ export const prepareMockOrchAccounts = ( OrchestrationAccount<{ chainId: 'agoric' }> >; + const settlementCallLog = [] as any[]; + const settlementAccountMock = zone.exo('Mock Settlement Account', undefined, { + transfer(...args) { + settlementCallLog.push(harden(['transfer', ...args])); + }, + }); + const settlementAccount = settlementAccountMock as unknown as HostInterface< + OrchestrationAccount<{ chainId: 'agoric' }> + >; return { mockPoolAccount: { account: poolAccount, transferVResolver: poolAccountTransferVK.resolver, }, + settlement: { + account: settlementAccount, + callLog: settlementCallLog, + }, }; }; From d060a251ef197fe8f6cda1a0481bd1785f7f5c77 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 22 Nov 2024 12:37:26 -0600 Subject: [PATCH 039/174] chore(fast-usdc): update contract for exo APIs settler, advancer --- packages/fast-usdc/src/fast-usdc.contract.js | 47 +++++++++++++++----- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/packages/fast-usdc/src/fast-usdc.contract.js b/packages/fast-usdc/src/fast-usdc.contract.js index 0d838534184..952d26480d1 100644 --- a/packages/fast-usdc/src/fast-usdc.contract.js +++ b/packages/fast-usdc/src/fast-usdc.contract.js @@ -71,14 +71,28 @@ export const contract = async (zcf, privateArgs, zone, tools) => { const terms = zcf.getTerms(); assert('USDC' in terms.brands, 'no USDC brand'); assert('usdcDenom' in terms, 'no usdcDenom'); + const { feeConfig, marshaller } = privateArgs; const { makeRecorderKit } = prepareRecorderKitMakers( zone.mapStore('vstorage'), marshaller, ); + const statusManager = prepareStatusManager(zone); - const makeSettler = prepareSettler(zone, { statusManager }); + + const { USDC } = terms.brands; + const { withdrawToSeat } = tools.zoeTools; const { chainHub, orchestrateAll, vowTools } = tools; + const makeSettler = prepareSettler(zone, { + statusManager, + USDC, + withdrawToSeat, + feeConfig, + vowTools: tools.vowTools, + zcf, + chainHub, + }); + const { localTransfer } = makeZoeTools(zcf, vowTools); const makeAdvancer = prepareAdvancer(zone, { chainHub, @@ -92,8 +106,10 @@ export const contract = async (zcf, privateArgs, zone, tools) => { vowTools, zcf, }); + const makeFeedKit = prepareTransactionFeedKit(zone, zcf); assertAllDefined({ makeFeedKit, makeAdvancer, makeSettler, statusManager }); + const makeLiquidityPoolKit = prepareLiquidityPoolKit( zone, zcf, @@ -111,7 +127,6 @@ export const contract = async (zcf, privateArgs, zone, tools) => { const creatorFacet = zone.exo('Fast USDC Creator', undefined, { /** @type {(operatorId: string) => Promise>} */ async makeOperatorInvitation(operatorId) { - // eslint-disable-next-line no-use-before-define return feedKit.creator.makeOperatorInvitation(operatorId); }, /** @@ -157,7 +172,6 @@ export const contract = async (zcf, privateArgs, zone, tools) => { * @param {CctpTxEvidence} evidence */ makeTestPushInvitation(evidence) { - // eslint-disable-next-line no-use-before-define void advancer.handleTransactionEvent(evidence); return makeTestInvitation(); }, @@ -200,18 +214,27 @@ export const contract = async (zcf, privateArgs, zone, tools) => { const feedKit = zone.makeOnce('Feed Kit', () => makeFeedKit()); - const poolAccountV = - // cast to HostInterface - /** @type { Vow>>} */ ( - /** @type {unknown}*/ ( - zone.makeOnce('Pool Local Orch Account', () => makeLocalAccount()) - ) - ); - const poolAccount = await vowTools.when(poolAccountV); + const poolAccountV = zone.makeOnce('PoolAccount', () => makeLocalAccount()); + const settleAccountV = zone.makeOnce('SettleAccount', () => + makeLocalAccount(), + ); + // when() is OK here since this clearly resolves promptly. + /** @type {HostInterface>[]} */ + const [poolAccount, settlementAccount] = await vowTools.when( + vowTools.all([poolAccountV, settleAccountV]), + ); + + const settlerKit = makeSettler({ + repayer: poolKit.repayer, + sourceChannel: 'channel-1234', // TODO: fix this as soon as testing needs it', + remoteDenom: 'uusdc', + settlementAccount, + }); const advancer = zone.makeOnce('Advancer', () => makeAdvancer({ borrowerFacet: poolKit.borrower, + notifyFacet: settlerKit.notify, poolAccount, }), ); @@ -226,6 +249,8 @@ export const contract = async (zcf, privateArgs, zone, tools) => { }, }); + await settlerKit.creator.monitorMintingDeposits(); + return harden({ creatorFacet, publicFacet }); }; harden(contract); From d67cd2291fe768234cb921ecaef9c2bb9cd703a1 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 22 Nov 2024 12:37:32 -0600 Subject: [PATCH 040/174] chore(fast-usdc): update test snapshots --- .../snapshots/fast-usdc.contract.test.ts.md | 3 ++- .../snapshots/fast-usdc.contract.test.ts.snap | Bin 2028 -> 2028 bytes 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md index 382c6399d37..e508daf0f99 100644 --- a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md +++ b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md @@ -82,8 +82,9 @@ Generated by [AVA](https://avajs.dev). 'Liquidity Pool_kindHandle': 'Alleged: kind', 'Operator Kit_kindHandle': 'Alleged: kind', PendingTxs: {}, - 'Pool Local Orch Account': 'Vow', + PoolAccount: 'Vow', SeenTxs: [], + SettleAccount: 'Vow', mint: { PoolShare: 'Alleged: zcfMint', }, diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap index de372333f822012eba0a396755e4eff2ea8585db..5428f409065f1cc146eb00cb8b3eb4e35d236f29 100644 GIT binary patch literal 2028 zcmVvcwNkkfn+)z#oeU00000000BUSzU-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uo1U_jZd3VNM^NQxb!qqVKdes5Puy z(-NKBmnh=iLox1!b-c1FrEP8)s$pyAO76)Cec7;dFVA0=9#__l+kHbf#9nKYbF6w-j?jkZ!$|atj@K&j!Nv>yUsOgwyxOPPHRQec;6Df zJb7c(YrZehWw#i!T&@x!jk44+?i!Z2X`hmw&hU}(p2FwL6FbmnByqOq+3gCxEeUdW z9Kmhc@$Q?P;?zf0xwFe1*P(#i_pEi1n+I#YL!4*EdlaQS#1ydP^0`HPjcQb%x_MX} zn=*ZoJ9?Gva>1rs{y~=fN)D?Qx={ZnhsS7Z*El!5fG=0Zl0uJaT_#4tB1lHP1KhUq zDiikJaL_tT4|_C*B2pHX!hLKAt>*5g&36rl-K0X>nf~N7Z}7n-OEBA_rgMmsvf!?J zT^OcwupnKQ_Pc4zjwu~pjwFlkyHj0Pnuq_ZMsKN{-?RQxj^P?reigIX+|A< z689^>bL#TBi6k=-lGiK1PgRoqM3T}(>72Sm>a7a!b_MuH1*lh*rOFYD&Q^hstFVR0 z*f*#G_o~1*tH2Mdz?)Uzohp#1DXK>%ntNUzMG~iKz$5AcCnhe?ia7YW8bDQ& zhbEGoQc03utpQ)J0dJ^8%aQdm3&8Ax0(&?TrsW0T%mTm{fFG#vMPiZt0@H}|w+^QS)ZDwyVOK0|B z8XKdnU1d(+6oFjJY(lCjP2YE@*=O!9KhXrvH4$ocW+!!~9}FEgW%iN}PTuva zK*)M?^dnNjX##sqB~Hcv+6j1X|AN`L-!^q-(l#^i9`%2cX^noyYSC@M?3N>_E&c Date: Mon, 25 Nov 2024 16:18:31 -0800 Subject: [PATCH 041/174] test: reclaim stuck payment failing --- a3p-integration/proposals/z:acceptance/wallet.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/a3p-integration/proposals/z:acceptance/wallet.test.js b/a3p-integration/proposals/z:acceptance/wallet.test.js index 529bfb1df01..f3487a9f10d 100644 --- a/a3p-integration/proposals/z:acceptance/wallet.test.js +++ b/a3p-integration/proposals/z:acceptance/wallet.test.js @@ -57,8 +57,10 @@ test.serial(`send invitation via namesByAddress`, async t => { ); }); -test.serial('exitOffer tool reclaims stuck payment', async t => { +// FIXME https://github.com/Agoric/agoric-sdk/issues/10565 +test.failing('exitOffer tool reclaims stuck payment', async t => { const istBalanceBefore = await getBalances([GOV1ADDR], 'uist'); + t.log('istBalanceBefore', istBalanceBefore); const offerId = 'bad-invitation-15'; // offer submitted on proposal upgrade-15 with an incorrect method name await agdWalletUtils.broadcastBridgeAction(GOV1ADDR, { @@ -73,6 +75,8 @@ test.serial('exitOffer tool reclaims stuck payment', async t => { { log: t.log, setTimeout, retryIntervalMs: 5000, maxRetries: 15 }, ); + t.log('istBalanceAfter', istBalanceAfter); + t.true( istBalanceAfter > istBalanceBefore, 'The IST balance should increase after reclaiming the stuck payment', From f680b157b34a32e1f1738bfd2a546203df45d3dc Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 25 Nov 2024 11:32:25 -0800 Subject: [PATCH 042/174] test: Add test for readFully method binding independence --- packages/client-utils/test/vstorage.test.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 packages/client-utils/test/vstorage.test.js diff --git a/packages/client-utils/test/vstorage.test.js b/packages/client-utils/test/vstorage.test.js new file mode 100644 index 00000000000..be268ae18ca --- /dev/null +++ b/packages/client-utils/test/vstorage.test.js @@ -0,0 +1,15 @@ +/* eslint-env node */ +// @ts-check +import test from 'ava'; +import { makeVStorage } from '../src/vstorage-kit.js'; + +test('readFully can be used without instance binding', async t => { + const vstorage = makeVStorage({ fetch: () => {} }, { rpcAddrs: [''] }); + const { readFully } = vstorage; + + // Mock implementation to avoid actual network calls + vstorage.readAt = async () => ({ blockHeight: 0, values: ['test'] }); + + // This would throw if readFully required 'this' binding + await t.notThrowsAsync(() => readFully('some/path')); +}); From 2c4e2e3cbfe6a2bfad77f908abd1424081031464 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 25 Nov 2024 11:33:31 -0800 Subject: [PATCH 043/174] feat: vstorage without instance binding --- packages/client-utils/src/vstorage-kit.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/client-utils/src/vstorage-kit.js b/packages/client-utils/src/vstorage-kit.js index 71863eccf9a..f1718cc9c48 100644 --- a/packages/client-utils/src/vstorage-kit.js +++ b/packages/client-utils/src/vstorage-kit.js @@ -48,7 +48,7 @@ export const makeVStorage = (powers, config) => { return data; }); - return { + const vstorage = { url, decode({ result: { response } }) { const { code } = response; @@ -65,11 +65,11 @@ export const makeVStorage = (powers, config) => { */ async readLatest(path = 'published') { const raw = await readStorage(path, { kind: 'data' }); - return this.decode(raw); + return vstorage.decode(raw); }, async keys(path = 'published') { const raw = await readStorage(path, { kind: 'children' }); - return JSON.parse(this.decode(raw)).children; + return JSON.parse(vstorage.decode(raw)).children; }, /** * @param {string} path @@ -78,7 +78,7 @@ export const makeVStorage = (powers, config) => { */ async readAt(path, height = undefined) { const raw = await readStorage(path, { kind: 'data', height }); - const txt = this.decode(raw); + const txt = vstorage.decode(raw); /** @type {{ value: string }} */ const { value } = JSON.parse(txt); return JSON.parse(value); @@ -99,7 +99,7 @@ export const makeVStorage = (powers, config) => { // console.debug('READING', { blockHeight }); let values; try { - ({ blockHeight, values } = await this.readAt( + ({ blockHeight, values } = await vstorage.readAt( path, blockHeight && Number(blockHeight) - 1, )); @@ -127,6 +127,7 @@ export const makeVStorage = (powers, config) => { return parts.flat(); }, }; + return vstorage; }; /** @typedef {ReturnType} VStorage */ From 8d5309db622e5d2851cead947c313df02265f7ab Mon Sep 17 00:00:00 2001 From: "Turadg Aleahmad (aider)" Date: Mon, 25 Nov 2024 11:34:39 -0800 Subject: [PATCH 044/174] refactor: Extract makeVStorage to separate vstorage.js file --- packages/client-utils/src/vstorage-kit.js | 122 +-------------------- packages/client-utils/src/vstorage.js | 125 ++++++++++++++++++++++ 2 files changed, 126 insertions(+), 121 deletions(-) create mode 100644 packages/client-utils/src/vstorage.js diff --git a/packages/client-utils/src/vstorage-kit.js b/packages/client-utils/src/vstorage-kit.js index f1718cc9c48..72feb949bdb 100644 --- a/packages/client-utils/src/vstorage-kit.js +++ b/packages/client-utils/src/vstorage-kit.js @@ -1,8 +1,8 @@ -/* global Buffer */ import { boardSlottingMarshaller, makeBoardRemote, } from '@agoric/vats/tools/board-utils.js'; +import { makeVStorage } from './vstorage.js'; export { boardSlottingMarshaller }; @@ -11,126 +11,6 @@ export { boardSlottingMarshaller }; * @import {TypedPublished} from './types.js'; */ -/** - * @param {object} powers - * @param {typeof window.fetch} powers.fetch - * @param {MinimalNetworkConfig} config - */ -export const makeVStorage = (powers, config) => { - /** @param {string} path */ - const getJSON = path => { - const url = config.rpcAddrs[0] + path; - // console.warn('fetching', url); - return powers.fetch(url, { keepalive: true }).then(res => res.json()); - }; - // height=0 is the same as omitting height and implies the highest block - const url = (path = 'published', { kind = 'children', height = 0 } = {}) => - `/abci_query?path=%22/custom/vstorage/${kind}/${path}%22&height=${height}`; - - const readStorage = (path = 'published', { kind = 'children', height = 0 }) => - getJSON(url(path, { kind, height })) - .catch(err => { - throw Error(`cannot read ${kind} of ${path}: ${err.message}`); - }) - .then(data => { - const { - result: { response }, - } = data; - if (response?.code !== 0) { - /** @type {any} */ - const err = Error( - `error code ${response?.code} reading ${kind} of ${path}: ${response.log}`, - ); - err.code = response?.code; - err.codespace = response?.codespace; - throw err; - } - return data; - }); - - const vstorage = { - url, - decode({ result: { response } }) { - const { code } = response; - if (code !== 0) { - throw response; - } - const { value } = response; - return Buffer.from(value, 'base64').toString(); - }, - /** - * - * @param {string} path - * @returns {Promise} latest vstorage value at path - */ - async readLatest(path = 'published') { - const raw = await readStorage(path, { kind: 'data' }); - return vstorage.decode(raw); - }, - async keys(path = 'published') { - const raw = await readStorage(path, { kind: 'children' }); - return JSON.parse(vstorage.decode(raw)).children; - }, - /** - * @param {string} path - * @param {number} [height] default is highest - * @returns {Promise<{blockHeight: number, values: string[]}>} - */ - async readAt(path, height = undefined) { - const raw = await readStorage(path, { kind: 'data', height }); - const txt = vstorage.decode(raw); - /** @type {{ value: string }} */ - const { value } = JSON.parse(txt); - return JSON.parse(value); - }, - /** - * Read values going back as far as available - * - * @param {string} path - * @param {number | string} [minHeight] - * @returns {Promise} - */ - async readFully(path, minHeight = undefined) { - const parts = []; - // undefined the first iteration, to query at the highest - let blockHeight; - await null; - do { - // console.debug('READING', { blockHeight }); - let values; - try { - ({ blockHeight, values } = await vstorage.readAt( - path, - blockHeight && Number(blockHeight) - 1, - )); - // console.debug('readAt returned', { blockHeight }); - } catch (err) { - if ( - // CosmosSDK ErrInvalidRequest with particular message text; - // misrepresentation of pruned data - // TODO replace after incorporating a fix to - // https://github.com/cosmos/cosmos-sdk/issues/19992 - err.codespace === 'sdk' && - err.code === 18 && - err.message.match(/pruned/) - ) { - // console.error(err); - break; - } - throw err; - } - parts.push(values); - // console.debug('PUSHED', values); - // console.debug('NEW', { blockHeight, minHeight }); - if (minHeight && Number(blockHeight) <= Number(minHeight)) break; - } while (blockHeight > 0); - return parts.flat(); - }, - }; - return vstorage; -}; -/** @typedef {ReturnType} VStorage */ - /** @deprecated */ export const makeFromBoard = () => { const cache = new Map(); diff --git a/packages/client-utils/src/vstorage.js b/packages/client-utils/src/vstorage.js new file mode 100644 index 00000000000..45afd4d8590 --- /dev/null +++ b/packages/client-utils/src/vstorage.js @@ -0,0 +1,125 @@ +/* global Buffer */ + +/** + * @import {MinimalNetworkConfig} from './rpc.js'; + */ + +/** + * @param {object} powers + * @param {typeof window.fetch} powers.fetch + * @param {MinimalNetworkConfig} config + */ +export const makeVStorage = (powers, config) => { + /** @param {string} path */ + const getJSON = path => { + const url = config.rpcAddrs[0] + path; + // console.warn('fetching', url); + return powers.fetch(url, { keepalive: true }).then(res => res.json()); + }; + // height=0 is the same as omitting height and implies the highest block + const url = (path = 'published', { kind = 'children', height = 0 } = {}) => + `/abci_query?path=%22/custom/vstorage/${kind}/${path}%22&height=${height}`; + + const readStorage = (path = 'published', { kind = 'children', height = 0 }) => + getJSON(url(path, { kind, height })) + .catch(err => { + throw Error(`cannot read ${kind} of ${path}: ${err.message}`); + }) + .then(data => { + const { + result: { response }, + } = data; + if (response?.code !== 0) { + /** @type {any} */ + const err = Error( + `error code ${response?.code} reading ${kind} of ${path}: ${response.log}`, + ); + err.code = response?.code; + err.codespace = response?.codespace; + throw err; + } + return data; + }); + + const vstorage = { + url, + decode({ result: { response } }) { + const { code } = response; + if (code !== 0) { + throw response; + } + const { value } = response; + return Buffer.from(value, 'base64').toString(); + }, + /** + * + * @param {string} path + * @returns {Promise} latest vstorage value at path + */ + async readLatest(path = 'published') { + const raw = await readStorage(path, { kind: 'data' }); + return vstorage.decode(raw); + }, + async keys(path = 'published') { + const raw = await readStorage(path, { kind: 'children' }); + return JSON.parse(vstorage.decode(raw)).children; + }, + /** + * @param {string} path + * @param {number} [height] default is highest + * @returns {Promise<{blockHeight: number, values: string[]}>} + */ + async readAt(path, height = undefined) { + const raw = await readStorage(path, { kind: 'data', height }); + const txt = vstorage.decode(raw); + /** @type {{ value: string }} */ + const { value } = JSON.parse(txt); + return JSON.parse(value); + }, + /** + * Read values going back as far as available + * + * @param {string} path + * @param {number | string} [minHeight] + * @returns {Promise} + */ + async readFully(path, minHeight = undefined) { + const parts = []; + // undefined the first iteration, to query at the highest + let blockHeight; + await null; + do { + // console.debug('READING', { blockHeight }); + let values; + try { + ({ blockHeight, values } = await vstorage.readAt( + path, + blockHeight && Number(blockHeight) - 1, + )); + // console.debug('readAt returned', { blockHeight }); + } catch (err) { + if ( + // CosmosSDK ErrInvalidRequest with particular message text; + // misrepresentation of pruned data + // TODO replace after incorporating a fix to + // https://github.com/cosmos/cosmos-sdk/issues/19992 + err.codespace === 'sdk' && + err.code === 18 && + err.message.match(/pruned/) + ) { + // console.error(err); + break; + } + throw err; + } + parts.push(values); + // console.debug('PUSHED', values); + // console.debug('NEW', { blockHeight, minHeight }); + if (minHeight && Number(blockHeight) <= Number(minHeight)) break; + } while (blockHeight > 0); + return parts.flat(); + }, + }; + return vstorage; +}; +/** @typedef {ReturnType} VStorage */ From 13656e59fc20bd6654ce86d4dd7be32fbc9c060d Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 25 Nov 2024 11:38:33 -0800 Subject: [PATCH 045/174] refactor: extract vstorage.js --- packages/client-utils/src/main.js | 1 + packages/client-utils/src/vstorage-kit.js | 1 + packages/client-utils/test/vstorage.test.js | 9 ++++++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/client-utils/src/main.js b/packages/client-utils/src/main.js index baf2ecde2d5..be9b4869eb8 100644 --- a/packages/client-utils/src/main.js +++ b/packages/client-utils/src/main.js @@ -1,5 +1,6 @@ export * from './rpc.js'; export * from './sync-tools.js'; +export * from './vstorage.js'; export * from './vstorage-kit.js'; export * from './wallet-utils.js'; diff --git a/packages/client-utils/src/vstorage-kit.js b/packages/client-utils/src/vstorage-kit.js index 72feb949bdb..74598d82914 100644 --- a/packages/client-utils/src/vstorage-kit.js +++ b/packages/client-utils/src/vstorage-kit.js @@ -9,6 +9,7 @@ export { boardSlottingMarshaller }; /** * @import {MinimalNetworkConfig} from './rpc.js'; * @import {TypedPublished} from './types.js'; + * @import {VStorage} from './vstorage.js'; */ /** @deprecated */ diff --git a/packages/client-utils/test/vstorage.test.js b/packages/client-utils/test/vstorage.test.js index be268ae18ca..17de8f02700 100644 --- a/packages/client-utils/test/vstorage.test.js +++ b/packages/client-utils/test/vstorage.test.js @@ -1,12 +1,15 @@ /* eslint-env node */ // @ts-check import test from 'ava'; -import { makeVStorage } from '../src/vstorage-kit.js'; +import { makeVStorage } from '../src/vstorage.js'; + +/** @type {any} */ +const fetch = () => Promise.resolve({}); test('readFully can be used without instance binding', async t => { - const vstorage = makeVStorage({ fetch: () => {} }, { rpcAddrs: [''] }); + const vstorage = makeVStorage({ fetch }, { chainName: '', rpcAddrs: [''] }); const { readFully } = vstorage; - + // Mock implementation to avoid actual network calls vstorage.readAt = async () => ({ blockHeight: 0, values: ['test'] }); From e1c35da96da8e12ea79a99aafad6163b3993e238 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 21 Oct 2024 13:48:07 -0400 Subject: [PATCH 046/174] 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 83d97c9eef6..298878634b9 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 52ff70a187df1fadc89ccc506228bc6d0ca48da6 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 13 Nov 2024 17:26:20 -0500 Subject: [PATCH 047/174] feat: chain-capabilities.js constants - adds `IcqEnabled` and `PfmEnabled` constants to support `CosmosChainInfo` - this data is not available via a well-known registry like cosmos/chain-registry, but necessary for the Orchestration API - exports `withChainCapabilities` helper so consumers can include this data with fetched-chain-info.js --- .../orchestration-imports.test.js.md | 1 + .../orchestration-imports.test.js.snap | Bin 3559 -> 3581 bytes packages/orchestration/index.js | 1 + .../orchestration/src/chain-capabilities.js | 60 ++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 packages/orchestration/src/chain-capabilities.js diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.md b/packages/builders/test/snapshots/orchestration-imports.test.js.md index 56bb4121208..88cab919fe1 100644 --- a/packages/builders/test/snapshots/orchestration-imports.test.js.md +++ b/packages/builders/test/snapshots/orchestration-imports.test.js.md @@ -544,5 +544,6 @@ Generated by [AVA](https://avajs.dev). denomHash: Function denomHash {}, prepareChainHubAdmin: Function prepareChainHubAdmin {}, prepareCosmosInterchainService: Function prepareCosmosInterchainService {}, + withChainCapabilities: Function withChainCapabilities {}, 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 a35cad38f33f5ec70a5deaaf9901a15251d9b6c7..8a0d66b2c7ad25733d49a6eee706480afe78e471 100644 GIT binary patch literal 3581 zcmVe~1w z_GJ#B${&je00000000BcT6t_7)fxZ2-L<`kj~yTJZHVo}H%XI*n>LOEi9-@Qa(scR z#iu0Q&_qL4mE)xyX;m|HSy#lgKBXG^<$Dte(GWKez34{;%s&=n9XA8`F@OgEyaXV? zfF1^{U_goiH!!YbzL&ttnU}Hir6~Hv1*n}NomrW$~@scju2fgDQb## z`y<|6i{XC6g7Q2bw(vZ*gu{fTyCbG;fRsZk#%cyZpDNu@?g^#zfs23?UKfs zS;{e6#xh1s%_xbyb1Ow9k(9Jii<{xNk#S8m)Wvy2w{c+I2010^hL}oQtUT#)j#RT@ z$1*iBJC-&$cRuC_)f;BhQeu_PFNp=gJYE|&*VI{JTuex7Bx6cV=oV)S#|b6ONna`I zQxldaSJzB0yt==uY<>#0YRARV?)!#0apFDpq(X%9RLUM1UJ3 zz`YURsR-~EwQzR9im0vx>MIFtjlk+BGoqF_RW>)qgcz4rm|wFZ|4=2cxDr@Rg`22- zf4mZqD}l=>_1pqiepCtEN@?eLjnc0xfrqH#LJx)inM&Y=O5j7Pio4xuMxD7o^I^s! z2hYkVR`_HWabI{r(cnY0S_$o^gd}1`FJYy4pdwRow0f9zh&o7W9h6DOs$YQhFD0sl-p|9vY+Bl=B`x4UP0|BZbGbb5&5IjISBVhfdfQVPwe|1jRKDoQX_TZ=_v4A6nKpgkEg`9qQHAm z0D_x1Kpz_s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Q92WwYrUvqDs-d9M~6F z(jH$|3Tj@lbc2lP!<3MB%j-3Q?|f}3C`+>7eOquZd)_H|@0RK*`MoVokNw6r+8|mT zZ(gL{?T=TS=usH}cY`RvP9A5-rsf zJ4kzrX(^VwU3QV?)^%x^P9fLZua|G7qbaCTvrek6!TkhERopDuZaQd*prMLly|D|o zlI9Mp@*1ErC8X+dJE292vgqC`?ZzI-p?QltILY z)hyKa_{4Hbp>UO|d1-UR+|Y82l+hi>l)`+~O5=PvWk}Piay*K?a>SLSA+55ZIUM5c zZ~l6`jg2((HYP&tHaNl#$(H7~_qh>Z2j{oeQeee9?5`dHuHnpteTi_3%9b5es@LFF zCpTFe0Zxqow~Y9czz%;B=r@@Od^z#{5#U4Ii~fvgtGoiTtyU8J`oa#g^_daii`>>| z)7!%LM}TvjK2cvxh>6f|M}XgPYPOk|A?LHR`e~O-MuDDDrr*(g6)zYCc5?pChINkm zX}EC|$aC?fwS~{=8W`RuBPaNY9=TH_HVWde;n#}^+vut#4 z3_J#}%>wV>lKtL8zof3H8jY4Q5w)_w%~{|RS>T&l;6JiJbds5PYuzn;bP|}F1olk= zH%$WfOakBFvSW3nfhQ+{pHBJ*eghx)vy;H{jC7LE^-Gh$?fmv0Hvp|m1)|!-6Z=P*f zB7F~Oj@iFA)}%%Y0biuDb^Y}53&~mb^epfUcVKhFdsXWk&^E`Yg(ml+*O044HJ<)V h%r#l-gLA-9-gU8VnqK9AIBt*q{{a+nZyC8Q000TF5bgi~ diff --git a/packages/orchestration/index.js b/packages/orchestration/index.js index 9440115c5e6..20eeee0da9d 100644 --- a/packages/orchestration/index.js +++ b/packages/orchestration/index.js @@ -10,3 +10,4 @@ export * from './src/typeGuards.js'; export * from './src/utils/denomHash.js'; export { withOrchestration } from './src/utils/start-helper.js'; +export { withChainCapabilities } from './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..20dfbdc4e07 --- /dev/null +++ b/packages/orchestration/src/chain-capabilities.js @@ -0,0 +1,60 @@ +/** + * @file Contains ChainInfo that not available from a well-known chain registry. + */ + +import { objectMap } from '@endo/patterns'; + +/** @import {CosmosChainInfo, KnownChains} from '@agoric/orchestration'; */ + +/** + * Chains with the async-icq (icq-1) module available. + * + * @satisfies {Partial>} + */ +const IcqEnabled = /** @type {const} */ ({ + omniflixhub: true, + osmosis: true, +}); +harden(IcqEnabled); + +/** + * Chains with the packet-forward-middleware module available. + * + * @satisfies {Partial>} + */ +const PfmEnabled = /** @type {const} */ ({ + agoric: true, + celestia: true, + cosmoshub: true, + juno: true, + neutron: true, + noble: true, + omniflixhub: true, + osmosis: true, + secretnetwork: true, + stargaze: true, + stride: true, + umee: true, +}); +harden(PfmEnabled); + +/** + * @param {Record} chainInfo + * @param {{ + * PfmEnabled: Record; + * IcqEnabled: Record; + * }} [opts] + */ +export const withChainCapabilities = ( + chainInfo, + opts = { + PfmEnabled, + IcqEnabled, + }, +) => { + return objectMap(chainInfo, (info, name) => ({ + ...info, + pfmEnabled: !!opts.PfmEnabled[name], + icqEnabled: !!opts.IcqEnabled[name], + })); +}; From 9eea3fd6da2624fc787336c5d735de5ae7da885d Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 29 Oct 2024 11:54:15 -0400 Subject: [PATCH 048/174] 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 c1b406c6091881885389b2e11da1ec1122b0924f Mon Sep 17 00:00:00 2001 From: Ikenna Omekam Date: Mon, 11 Nov 2024 17:03:23 -0600 Subject: [PATCH 049/174] add pfmEnabled to shape --- .../orchestration-imports.test.js.md | 3 +++ .../orchestration-imports.test.js.snap | Bin 3581 -> 3589 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 88cab919fe1..98f5036fd98 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 8a0d66b2c7ad25733d49a6eee706480afe78e471..bf125767898472199d34606ebef3b0f2cf52c4f9 100644 GIT binary patch literal 3589 zcmV+g4*KyyRzV@mIB&CZ^L>@Ir~FeU==V6y?TNU|X$ zF(3*(GrhY_X1a&&o=p}Hf*j(-A%co25i}x}h!&x=5~YZsp*+eHsWMuEmRh2CQH9_Y z>F$}H*KcMTiYlwzKc;rR-|zRn_Z|Jd_r9LH=hHbov&X#V9>r3voU*U~YLYr)zsvIxu{#_HFsyTvL#=9Y9x#%*nc7_2JQfG0KnG({1QM! z03!l8PXKuV+$MlS0{E!_o)aE(rnqL%`=kzz;*fpF%(?3~UMmau~QF4BQ(A zj)j3gy!5>>0!&7LOC!Lw5nzRAY!yNhja&3=F{dPxNr)DReu!2fJ{ti#L>Qt$60OsD zy{K8!#==F5azSzM?-N{_)|R)*mdmP8o*|0Uloi7Bgpk~%XnLL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xNk|j2 zB7FwB8PT2NK03c-_B4lss`9zC1v~mSj#RBlGqQPRbJ@*kF??+%6_fb?-1N@Fk&U7|?OrDe#K3WD@`SU%%%RRuy zJwR74aCR@C^b!;63U1-o_5wHd0{8R+Pxb;I^aAaDM7E)zG;nGku(Z$J@vqU2uj&KF z327@G>n(l2g?)fQh*K`&r(eC6*+l@SlKG83cY*hpeYvRgTpuZV{wS5!NTY>vR-0I+BP zIDG(EG2q@H=g=@`J+g9hXZEjk6v04Sb$6 zHG4?fCJu2Xay7cJb?J{Vc4Q#8g`XNgZrYzU|Mgj{fYtDl!+I^xI+|rg7<=3N*Uvrk zzeU{+GGE&u&^hQHzP93r%e)ewVK>LTW()$0h|z5>qt1#xebBwaCkL}X8unj52<#jL zel|#Esl6alKRO6JPHEF6%Bn997A=wfoof!7ziU<`g)aou4e=#Zb^E4;+*vj<1dI+5 z2Re%0tJEPNL#fFU_oB~`tCcG>{keXq#9Z$m0uInerwWGYQx1qtX5aq@HGh)LAua#_ D7rd>a diff --git a/packages/orchestration/src/typeGuards.js b/packages/orchestration/src/typeGuards.js index bb36b011516..bc3142ce0e0 100644 --- a/packages/orchestration/src/typeGuards.js +++ b/packages/orchestration/src/typeGuards.js @@ -100,6 +100,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 e72782dcc748b9e6a2879179cccf9866718f4e00 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 25 Nov 2024 19:01:33 -0500 Subject: [PATCH 050/174] feat: registerChainsAndAssets - helper function that takes chainInfo and assetInfo and registers the data in ChainHub --- .../orchestration-imports.test.js.md | 1 + .../orchestration-imports.test.js.snap | Bin 3589 -> 3636 bytes packages/orchestration/index.js | 1 + .../src/utils/chain-hub-helper.js | 53 ++++++++++++++++++ .../test/snapshots/exports.test.ts.md | 2 + .../test/snapshots/exports.test.ts.snap | Bin 613 -> 654 bytes 6 files changed, 57 insertions(+) create mode 100644 packages/orchestration/src/utils/chain-hub-helper.js diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.md b/packages/builders/test/snapshots/orchestration-imports.test.js.md index 98f5036fd98..e831da4a395 100644 --- a/packages/builders/test/snapshots/orchestration-imports.test.js.md +++ b/packages/builders/test/snapshots/orchestration-imports.test.js.md @@ -547,6 +547,7 @@ Generated by [AVA](https://avajs.dev). denomHash: Function denomHash {}, prepareChainHubAdmin: Function prepareChainHubAdmin {}, prepareCosmosInterchainService: Function prepareCosmosInterchainService {}, + registerChainsAndAssets: Function registerChainsAndAssets {}, withChainCapabilities: Function withChainCapabilities {}, 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 bf125767898472199d34606ebef3b0f2cf52c4f9..90441888f07938e004013b3a65473804e275fe17 100644 GIT binary patch literal 3636 zcmV-44$JXDRzVv%`w(&aNaQf&ts0)qAuU91*1|DJQtfHm-^w zg#Z^x42dm5QkX{^b@xoq=`%A8MOCW2Kc;s2`@VC}eVu#G?RjK5oij3P);(vWt=Tzw za%h*jVwhTHyJ2QlrDdC{tr_}=JXtVI+tMsuEm*6DZQb)oHmlm|(QSn&8sPkixY+U_ zfUg4h8vri>hzlSkfExvHw*bB*fF}fSUI1?jpgRIw9Rco)0QW|KKaBv-M1a>Kz+e>E z7X@S#_?;;5^(gTDDDd-3-xD!lM-2FQ4EXG&|Nkrobcp&EArw)6z{sxWWLsMsL^H%N zM2iqViUFM>3Q?zsmifG~uG{nG$}OvELAv`MZY@i5so-$QOvM_?#N^__O$RKp zVy+}$?-JcChl~@_Bxdr2*}t@Ir;T+zTXt@rs%LZ3Ty(i-Xp@Ib!!~x74gC`VI}U4k zY1wMN;Ihi3HwdZq@X6gqc5|s<6L)6fWI_*b7G(CL7F`m@2;QD?*3=#~qh{p+X|Ebt z%j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-=_};X12S7VXG$WrBAmEm(!;^hS^2XfndW&1K_|rnWnU^=M!2xNiP~=o+@CRAJpx=m;y<-| z_%-#-Bf#w=z+H?u#2?Pjj{sj{q)|>fJOVtzNB7#m!|>N5!0)-_9Pgn|s|%_|qh(Yy zhDL$tC@?q*%#H$AjshPUWhO4Hs?)zb3VdZ0_|Yiv!YHt6444^XvK>{I2bYfl^JD&j zzl{&PFa|6!(q(+E_m2TLi~)Bt;-ZiE@&(vN_nN@F?>so>zXpDCtQ?iZIJ+8c8Yfqy zub>ZaL!UYx_)hZt@mG^tHpu^r+;Z>u%Vxsw`ag2_i*?=gR_)NZ|K9)bI9c#!yBE(w zc$dD{;XG1Wdi$3)5!Y@_!E{jx)v0J5z0yJWEWJZ}H+z>7Nkdxry>4{Ne=4%YMTCH{`G)PD8_FnU$FISkffQ zfuPI&H%$8MpR98%ZJY!)Px_~?ulC_GT<0_H=h(%@B(R$qy~1bI+tKMs{|^7qWa+2H z;X{+a;Yr|!lWdjxt0MIuCV{_l+MYTWuhFTRm#D3zIcop>} brands + * @param {Record | undefined} chainInfo + * @param {Record | undefined} assetInfo + */ +export const registerChainsAndAssets = ( + chainHub, + brands, + chainInfo, + assetInfo, +) => { + if (!chainInfo) { + console.log('No chain info provided, returning early.'); + return; + } + + const conns = {}; + for (const [chainName, allInfo] of Object.entries(chainInfo)) { + const { connections, ...info } = allInfo; + chainHub.registerChain(chainName, info); + conns[info.chainId] = connections; + } + const registeredPairs = new Set(); + for (const [pChainId, connInfos] of Object.entries(conns)) { + for (const [cChainId, connInfo] of Object.entries(connInfos)) { + const pair = [pChainId, cChainId].sort().join(''); + if (!registeredPairs.has(pair)) { + chainHub.registerConnection(pChainId, cChainId, connInfo); + registeredPairs.add(pair); + } + } + } + + if (!assetInfo) { + console.log('No asset info provided, returning early.'); + return; + } + for (const [denom, info] of Object.entries(assetInfo)) { + const infoWithBrand = info.brandKey + ? { ...info, brand: brands[info.brandKey] } + : info; + chainHub.registerAsset(denom, infoWithBrand); + } +}; diff --git a/packages/orchestration/test/snapshots/exports.test.ts.md b/packages/orchestration/test/snapshots/exports.test.ts.md index f4b67ef7a73..be240c69462 100644 --- a/packages/orchestration/test/snapshots/exports.test.ts.md +++ b/packages/orchestration/test/snapshots/exports.test.ts.md @@ -36,5 +36,7 @@ Generated by [AVA](https://avajs.dev). 'denomHash', 'prepareChainHubAdmin', 'prepareCosmosInterchainService', + 'registerChainsAndAssets', + 'withChainCapabilities', 'withOrchestration', ] diff --git a/packages/orchestration/test/snapshots/exports.test.ts.snap b/packages/orchestration/test/snapshots/exports.test.ts.snap index 41d0880b01a0e52d92b73f9695ef982645924ac1..88ddb6e567c6c6fd6c7c9246f62fcd1a929ed326 100644 GIT binary patch literal 654 zcmV;90&)F8RzVvt8!XJwW00000000AR)4OgHK@(R zZm?%oGvg#KQ_{c-P!I}gC@3lEDG?1V4}e4o*@YRhPF$_^e>!t^&e`*WZcio8&DmSB zne7o}QqXB;B+pH%tT{Uuf?NKq_BF%=iXWR~x8DGG2jDY+9{}bUaF+pl3^-=MYX*E` zz;_1xX23=OJP3d!0A2*ZhXD8%0KWp@P6+IVz)=Xi3W4__@FfI(Ui`1ufcrIoYQW2j z=Z`g@$;KOOEYg|}8FNqddL3*UY!hr2O%`B@gt{gG#^64_KWHbIYT3d0Paw)0T+OCjU zf2)_s=oxeVWecRFq@;M0ky7(ctyI-$wYqbwt*yADxikl)+j(KDlUi_arWHTgHPwx2 zxNxnlla!3r>IXVy7PRgbUgwn<`rxijcSqMu2p)}7jPs@&q1w4}>p_emdTiEnDd&rH){W-RHltcj#3 ozYpKpO$V1xGMknt<~i?Xz079h*)6}B1*=T(5BT#U!2$&U06rl)82|tP literal 613 zcmV-r0-F6nRzVCBlq=lrlgP}#9Ldr!8o z1EN9-IxURkrOA~wXXiq2%b(R=#hAt9$L83rw*cM&_zd7XfI0*2FrdQ#$$&Qu_{4y3 z4EV)>Rs`ISfaei#76Bh4;A;f@jDW2ecn|~q7f3^nPtpP7;K#R>Z zSv}F3j~R1cjYb1(0qiE&5?U<68jHc|O}3m2)kxYzA06bpq<=AEE^j7s{FvLnDj<;~ zt&7AwrA%qzQ0(ipb6&_q2u;QWb!xtqilp*T1$o`&Yi(tQ$|S~+y`*NQ)YY|SooejT zfR4B=lnlU}11q~E)$odI&-->Oap{N!moHR#kS+SxNO#)poJ&cAbT=SN{#7rK=`*hR z%TADzlCsH7rb;b4wH~VJY7OT$(w%lsb7>Aqcgu+lC$-|>V%mPPXTptXx^T0rvz(08 z)$8u76VhRsRVTN*BimOaDgHOt;Zh7pr_Q$gk^5R%buTEi=HIGU49QqNEGreD>we_D z(;X$o-O`5btowoX#wCeIW@;riT)vu3cIqL|xS&0 Date: Mon, 25 Nov 2024 21:10:45 -0500 Subject: [PATCH 051/174] feat: `withOrchestration` returns `baggage` - `withOrchestration` the baggage that was provided to it by the original caller - needed so users of `withOrchestration` can access baggage --- packages/orchestration/src/utils/start-helper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/orchestration/src/utils/start-helper.js b/packages/orchestration/src/utils/start-helper.js index 902c7194808..e6c36bd523c 100644 --- a/packages/orchestration/src/utils/start-helper.js +++ b/packages/orchestration/src/utils/start-helper.js @@ -164,6 +164,7 @@ export const provideOrchestration = ( return { ...defaultOrchestrateKit, makeOrchestrateKit, + baggage, chainHub, vowTools, asyncFlowTools, From 2dfddb3fb2018d769b1acc1b32f4ff3b4c7f67b7 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 25 Nov 2024 20:55:35 -0500 Subject: [PATCH 052/174] feat: export `DenomDetailShape` --- .../orchestration-imports.test.js.md | 22 ++++++++++++++++++ .../orchestration-imports.test.js.snap | Bin 3636 -> 3753 bytes .../orchestration/src/exos/chain-hub-admin.js | 3 +-- packages/orchestration/src/exos/chain-hub.js | 7 +----- .../orchestration/src/orchestration-api.ts | 3 +++ packages/orchestration/src/typeGuards.js | 9 +++++++ .../test/snapshots/exports.test.ts.md | 1 + .../test/snapshots/exports.test.ts.snap | Bin 654 -> 662 bytes 8 files changed, 37 insertions(+), 8 deletions(-) diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.md b/packages/builders/test/snapshots/orchestration-imports.test.js.md index e831da4a395..7749e126b16 100644 --- a/packages/builders/test/snapshots/orchestration-imports.test.js.md +++ b/packages/builders/test/snapshots/orchestration-imports.test.js.md @@ -218,6 +218,28 @@ Generated by [AVA](https://avajs.dev). payload: [], }, }, + DenomDetailShape: Object @match:splitRecord { + payload: [ + { + baseDenom: Object @match:string { + payload: [], + }, + baseName: Object @match:string { + payload: [], + }, + chainName: Object @match:string { + payload: [], + }, + }, + { + brand: Object @match:remotable { + payload: { + label: 'Brand', + }, + }, + }, + ], + }, DenomInfoShape: { base: Object @match:remotable { payload: { diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.snap b/packages/builders/test/snapshots/orchestration-imports.test.js.snap index 90441888f07938e004013b3a65473804e275fe17..e3536ba0aecf546bded44c857e96d8a48817649f 100644 GIT binary patch literal 3753 zcmV;a4p#9&RzVrVNZXb&X00000000BcT77UF<$3?TcPHs|U(%gq>-z)Ql5Bkk66yj0WZA|t*z&gn z4slj@D{1lF?yDeXOFm=gPG__woUet8cPz+Tn8cUjKoH&)sNv3q;)I(u3!1@zW(f=m^ z9t7}p0OtTC1TZOpIRPvS-~j9Ohtf$5#Uo1;PH3noQi29TeX;HsZ%Pr^S=H_OIBt#!X zN{BZjK&uEt)TKpgx}Ytq=Cr=JZ%Hc3Ha<{S!PC>~>MqH2SQW|!LTRBCW3Qam^qfuF zOYO`oNs2n1%jvRVRP3A}l$1@GRTs1h{sh5WXEdXr8PkR#n_kwd)vOw}+UhH;rY&+_ zUbKg_LYO6l<}I?S6?nJjsu){jQ&RGzLxhpC8D1w&6Fg?)73>Vb(zBaqW|kyXmGiS( zDwJmlrG-#DZTy^&S}l^Ms&dxqD>e1sgtgYo@>m;bsPNimH_z)a9b2%l6#ezC1sjD=4bXx`D8I%Pf1I z&#I=Z+s*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Mk0t2(majoXi_}k%% z+4pm%77t0!#8G0Rbc>g8OaG)0$7f4hSk9s}?Q71z5tkKnAKdM;PLx@vimap%r=5SJ zq|MJ(bvrI1-*O4)CV)6~pu{2gDJl@BasV$_di5 GE&u?xu_<-{ diff --git a/packages/orchestration/src/exos/chain-hub-admin.js b/packages/orchestration/src/exos/chain-hub-admin.js index e790257b3b4..2a365508ebe 100644 --- a/packages/orchestration/src/exos/chain-hub-admin.js +++ b/packages/orchestration/src/exos/chain-hub-admin.js @@ -2,8 +2,7 @@ /* eslint-disable no-restricted-syntax */ import { heapVowE } from '@agoric/vow/vat.js'; import { M } from '@endo/patterns'; -import { CosmosChainInfoShape } from '../typeGuards.js'; -import { DenomDetailShape } from './chain-hub.js'; +import { CosmosChainInfoShape, DenomDetailShape } from '../typeGuards.js'; /** * @import {Zone} from '@agoric/zone'; diff --git a/packages/orchestration/src/exos/chain-hub.js b/packages/orchestration/src/exos/chain-hub.js index 2a55b35605c..a782294256c 100644 --- a/packages/orchestration/src/exos/chain-hub.js +++ b/packages/orchestration/src/exos/chain-hub.js @@ -7,6 +7,7 @@ import { VowShape } from '@agoric/vow'; import { ChainAddressShape, CosmosChainInfoShape, + DenomDetailShape, IBCConnectionInfoShape, } from '../typeGuards.js'; import { getBech32Prefix } from '../utils/address.js'; @@ -19,7 +20,6 @@ import { getBech32Prefix } from '../utils/address.js'; * @import {ChainInfo, KnownChains} from '../chain-info.js'; * @import {ChainAddress, Denom} from '../orchestration-api.js'; * @import {Remote} from '@agoric/internal'; - * @import {TypedPattern} from '@agoric/internal'; */ /** @@ -40,11 +40,6 @@ import { getBech32Prefix } from '../utils/address.js'; * @property {Brand<'nat'>} [brand] - vbank brand, if registered * @see {ChainHub} `registerAsset` method */ -/** @type {TypedPattern} */ -export const DenomDetailShape = M.splitRecord( - { chainName: M.string(), baseName: M.string(), baseDenom: M.string() }, - { brand: BrandShape }, -); /** * @enum {(typeof HubName)[keyof typeof HubName]} diff --git a/packages/orchestration/src/orchestration-api.ts b/packages/orchestration/src/orchestration-api.ts index 9bf49592a3a..50830862c05 100644 --- a/packages/orchestration/src/orchestration-api.ts +++ b/packages/orchestration/src/orchestration-api.ts @@ -102,6 +102,9 @@ export interface Chain { // TODO provide a way to get the local denom/brand/whatever for this chain } +/** + * Used with `orch.getDenomInfo('ibc/1234')`. See {@link Orchestrator.getDenomInfo} + */ export interface DenomInfo< HoldingChain extends keyof KnownChains, IssuingChain extends keyof KnownChains, diff --git a/packages/orchestration/src/typeGuards.js b/packages/orchestration/src/typeGuards.js index bc3142ce0e0..721345c0d9f 100644 --- a/packages/orchestration/src/typeGuards.js +++ b/packages/orchestration/src/typeGuards.js @@ -1,3 +1,4 @@ +import { BrandShape } from '@agoric/ertp/src/typeGuards.js'; import { VowShape } from '@agoric/vow'; import { M } from '@endo/patterns'; @@ -7,6 +8,7 @@ import { M } from '@endo/patterns'; * @import {Any as Proto3Msg} from '@agoric/cosmic-proto/google/protobuf/any.js'; * @import {TxBody} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js'; * @import {TypedJson} from '@agoric/cosmic-proto'; + * @import {DenomDetail} from './exos/chain-hub.js'; */ /** @@ -119,6 +121,13 @@ export const DenomInfoShape = { }; harden(DenomInfoShape); +/** @type {TypedPattern} */ +export const DenomDetailShape = M.splitRecord( + { chainName: M.string(), baseName: M.string(), baseDenom: M.string() }, + { brand: BrandShape }, +); +harden(DenomDetailShape); + /** @type {TypedPattern} */ export const DenomAmountShape = { denom: DenomShape, value: M.nat() }; harden(DenomAmountShape); diff --git a/packages/orchestration/test/snapshots/exports.test.ts.md b/packages/orchestration/test/snapshots/exports.test.ts.md index be240c69462..c57931aa11b 100644 --- a/packages/orchestration/test/snapshots/exports.test.ts.md +++ b/packages/orchestration/test/snapshots/exports.test.ts.md @@ -18,6 +18,7 @@ Generated by [AVA](https://avajs.dev). 'CosmosChainInfoShape', 'DelegationShape', 'DenomAmountShape', + 'DenomDetailShape', 'DenomInfoShape', 'DenomShape', 'IBCChannelIDShape', diff --git a/packages/orchestration/test/snapshots/exports.test.ts.snap b/packages/orchestration/test/snapshots/exports.test.ts.snap index 88ddb6e567c6c6fd6c7c9246f62fcd1a929ed326..acdc30319ea66e263ba980fca052e20ce47d0ff2 100644 GIT binary patch literal 662 zcmV;H0%`q0RzVZ(wHnwQ*mbZ4G+2aX7K2sm>~b6;Byq?JM z18)DSfJBZo&Jy#8`brCjVqd43@=PW|Xfh_KQ}L~oq%99rkXK#4+*D?$Okxb#b82cr zU0iG0salH$bjWR{WB_IySZtA0!warG8;TZLo(%#q=Py)>b4|>zxx?7dB$b`90gKRQop$CM5&rntD%~#w&>hid%M}yT$%&YoxHH&Eb9)= zx0?@lO}JA_E?n>EeoDsb^8NSJ5$Ui@!^w@#$oAAoivP{+a480)+s-cgBlonj>Q+!_ z#lKZI8eg7-rI`t4?h>RqlCPTGHjQ`=p;`ec#kIKQm2- wnX#nHvL=zD{0I5YHXU3!%4}MqCeL{<8)P;k&$j$#7A%vt8!XJwW00000000AR)4OgHK@(R zZm?%oGvg#KQ_{c-P!I}gC@3lEDG?1V4}e4o*@YRhPF$_^e>!t^&e`*WZcio8&DmSB zne7o}QqXB;B+pH%tT{Uuf?NKq_BF%=iXWR~x8DGG2jDY+9{}bUaF+pl3^-=MYX*E` zz;_1xX23=OJP3d!0A2*ZhXD8%0KWp@P6+IVz)=Xi3W4__@FfI(Ui`1ufcrIoYQW2j z=Z`g@$;KOOEYg|}8FNqddL3*UY!hr2O%`B@gt{gG#^64_KWHbIYT3d0Paw)0T+OCjU zf2)_s=oxeVWecRFq@;M0ky7(ctyI-$wYqbwt*yADxikl)+j(KDlUi_arWHTgHPwx2 zxNxnlla!3r>IXVy7PRgbUgwn<`rxijcSqMu2p)}7jPs@&q1w4}>p_emdTiEnDd&rH){W-RHltcj#3 ozYpKpO$V1xGMknt<~i?Xz079h*)6}B1*=T(5BT#U!2$&U06rl)82|tP From e5a8b6489368f0bf3a099ce4c5ddf9607a6192c1 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 25 Nov 2024 19:13:54 -0500 Subject: [PATCH 053/174] feat: parameterize fusdc with chainInfo and assetInfo --- .../scripts/fast-usdc/init-fast-usdc.js | 29 +++++++++++++++++- packages/fast-usdc/src/fast-usdc.contract.js | 24 +++++++++++++-- packages/fast-usdc/src/fast-usdc.start.js | 19 +++++++++--- .../snapshots/fast-usdc.contract.test.ts.md | 1 + .../snapshots/fast-usdc.contract.test.ts.snap | Bin 2028 -> 2050 bytes packages/fast-usdc/test/supports.ts | 2 ++ 6 files changed, 66 insertions(+), 9 deletions(-) diff --git a/packages/builders/scripts/fast-usdc/init-fast-usdc.js b/packages/builders/scripts/fast-usdc/init-fast-usdc.js index 08a5d996cdb..5786cb0f0b0 100644 --- a/packages/builders/scripts/fast-usdc/init-fast-usdc.js +++ b/packages/builders/scripts/fast-usdc/init-fast-usdc.js @@ -124,11 +124,17 @@ const options = { default: 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9', }, + chainInfo: { type: 'string' }, + assetInfo: { type: 'string' }, }; const oraclesUsage = 'use --oracle name:address ...'; const feedPolicyUsage = 'use --feedPolicy ...'; +const chainInfoUsage = 'use --chainInfo chainName:CosmosChainInfo ...'; +const assetInfoUsage = + 'use --assetInfo denom:DenomInfo & {brandKey?: string} ...'; + /** * @typedef {{ * flatFee: string; @@ -139,6 +145,8 @@ const feedPolicyUsage = 'use --feedPolicy ...'; * oracle?: string[]; * usdcDenom: string; * feedPolicy?: string; + * chainInfo: string; + * assetInfo: string; * }} FastUSDCOpts */ @@ -180,7 +188,15 @@ export default async (homeP, endowments) => { /** @type {{ values: FastUSDCOpts }} */ // @ts-expect-error ensured by options const { - values: { oracle: oracleArgs, net, usdcDenom, feedPolicy, ...fees }, + values: { + oracle: oracleArgs, + net, + usdcDenom, + feedPolicy, + chainInfo, + assetInfo, + ...fees + }, } = parseArgs({ args: scriptArgs, options }); const parseFeedPolicy = () => { @@ -226,6 +242,15 @@ export default async (homeP, endowments) => { }; }; + const parseChainInfo = () => { + if (!chainInfo) throw Error(chainInfoUsage); + return JSON.parse(chainInfo); + }; + const parseAssetInfo = () => { + if (!assetInfo) throw Error(assetInfoUsage); + return JSON.parse(assetInfo); + }; + /** @type {FastUSDCConfig} */ const config = harden({ oracles: parseOracleArgs(), @@ -234,6 +259,8 @@ export default async (homeP, endowments) => { }, feeConfig: parseFeeConfigArgs(), feedPolicy: parseFeedPolicy(), + chainInfo: parseChainInfo(), + assetInfo: parseAssetInfo(), }); await writeCoreEval('start-fast-usdc', utils => diff --git a/packages/fast-usdc/src/fast-usdc.contract.js b/packages/fast-usdc/src/fast-usdc.contract.js index 952d26480d1..50dd0de2f18 100644 --- a/packages/fast-usdc/src/fast-usdc.contract.js +++ b/packages/fast-usdc/src/fast-usdc.contract.js @@ -6,7 +6,10 @@ import { } from '@agoric/internal'; import { observeIteration, subscribeEach } from '@agoric/notifier'; import { + CosmosChainInfoShape, + DenomDetailShape, OrchestrationPowersShape, + registerChainsAndAssets, withOrchestration, } from '@agoric/orchestration'; import { provideSingleton } from '@agoric/zoe/src/contractSupport/durability.js'; @@ -27,9 +30,8 @@ import * as flows from './fast-usdc.flows.js'; const trace = makeTracer('FastUsdc'); /** - * @import {Denom} from '@agoric/orchestration'; * @import {HostInterface} from '@agoric/async-flow'; - * @import {OrchestrationAccount} from '@agoric/orchestration'; + * @import {CosmosChainInfo, Denom, DenomDetail, OrchestrationAccount} from '@agoric/orchestration'; * @import {OrchestrationPowers, OrchestrationTools} from '@agoric/orchestration/src/utils/start-helper.js'; * @import {Vow} from '@agoric/vow'; * @import {Zone} from '@agoric/zone'; @@ -53,6 +55,8 @@ export const meta = { ...OrchestrationPowersShape, feeConfig: FeeConfigShape, marshaller: M.remotable(), + chainInfo: M.recordOf(M.string(), CosmosChainInfoShape), + assetInfo: M.recordOf(M.string(), DenomDetailShape), }, }; harden(meta); @@ -62,6 +66,8 @@ harden(meta); * @param {OrchestrationPowers & { * marshaller: Marshaller; * feeConfig: FeeConfig; + * chainInfo: Record; + * assetInfo: Record; * }} privateArgs * @param {Zone} zone * @param {OrchestrationTools} tools @@ -82,7 +88,7 @@ export const contract = async (zcf, privateArgs, zone, tools) => { const { USDC } = terms.brands; const { withdrawToSeat } = tools.zoeTools; - const { chainHub, orchestrateAll, vowTools } = tools; + const { baggage, chainHub, orchestrateAll, vowTools } = tools; const makeSettler = prepareSettler(zone, { statusManager, USDC, @@ -212,6 +218,18 @@ export const contract = async (zcf, privateArgs, zone, tools) => { makeLiquidityPoolKit(shareMint, privateArgs.storageNode), ); + /** Chain, connection, and asset info can only be registered once */ + const firstIncarnationKey = 'firstIncarnationKey'; + if (!baggage.has(firstIncarnationKey)) { + baggage.init(firstIncarnationKey, true); + registerChainsAndAssets( + chainHub, + terms.brands, + privateArgs.chainInfo, + privateArgs.assetInfo, + ); + } + const feedKit = zone.makeOnce('Feed Kit', () => makeFeedKit()); const poolAccountV = zone.makeOnce('PoolAccount', () => makeLocalAccount()); diff --git a/packages/fast-usdc/src/fast-usdc.start.js b/packages/fast-usdc/src/fast-usdc.start.js index 96f14569dad..0dce7f375e2 100644 --- a/packages/fast-usdc/src/fast-usdc.start.js +++ b/packages/fast-usdc/src/fast-usdc.start.js @@ -1,4 +1,5 @@ import { deeplyFulfilledObject, makeTracer, objectMap } from '@agoric/internal'; +import { CosmosChainInfoShape, DenomDetailShape } from '@agoric/orchestration'; import { Fail } from '@endo/errors'; import { E } from '@endo/far'; import { makeMarshal } from '@endo/marshal'; @@ -13,6 +14,7 @@ import { fromExternalConfig } from './utils/config-marshal.js'; /** * @import {DepositFacet} from '@agoric/ertp/src/types.js' * @import {TypedPattern} from '@agoric/internal' + * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration'; * @import {Instance, StartParams} from '@agoric/zoe/src/zoeService/utils' * @import {Board} from '@agoric/vats' * @import {ManifestBundleRef} from '@agoric/deploy-script-support/src/externalTypes.js' @@ -33,6 +35,8 @@ const contractName = 'fastUsdc'; * oracles: Record; * feeConfig: FeeConfig; * feedPolicy: FeedPolicy & Passable; + * chainInfo: Record; + * assetInfo: Record; * }} FastUSDCConfig */ /** @type {TypedPattern} */ @@ -41,6 +45,8 @@ export const FastUSDCConfigShape = M.splitRecord({ oracles: M.recordOf(M.string(), M.string()), feeConfig: FeeConfigShape, feedPolicy: FeedPolicyShape, + chainInfo: M.recordOf(M.string(), CosmosChainInfoShape), + assetInfo: M.recordOf(M.string(), DenomDetailShape), }); /** @@ -149,11 +155,12 @@ export const startFastUSDC = async ( USDC: await E(USDCissuer).getBrand(), }); - const { terms, oracles, feeConfig, feedPolicy } = fromExternalConfig( - config?.options, // just in case config is missing somehow - brands, - FastUSDCConfigShape, - ); + const { terms, oracles, feeConfig, feedPolicy, chainInfo, assetInfo } = + fromExternalConfig( + config?.options, // just in case config is missing somehow + brands, + FastUSDCConfigShape, + ); trace('using terms', terms); trace('using fee config', feeConfig); @@ -187,6 +194,8 @@ export const startFastUSDC = async ( storageNode, timerService, marshaller, + chainInfo, + assetInfo, }), ); diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md index e508daf0f99..ec82b58c800 100644 --- a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md +++ b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md @@ -100,6 +100,7 @@ Generated by [AVA](https://avajs.dev). Recorder_kindHandle: 'Alleged: kind', }, }, + firstIncarnationKey: true, orchestration: { 'Cosmos Orchestration Account Holder_kindHandle': 'Alleged: kind', 'Local Orchestration Account Kit_kindHandle': 'Alleged: kind', diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap index 5428f409065f1cc146eb00cb8b3eb4e35d236f29..5e8c6efc2ee166cdb8debd759e505f5ff9a38a96 100644 GIT binary patch literal 2050 zcmV+d2>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k_blN*i{BXbn9CAH zdYdsTs$cL>UvJOf?r62%q>T7o3^~m zD5F^Xp;hj5xYM{IlQ)JAG&Z<-wC+5_`OsyqQS%VWV~h!lE}vWB*QrMJi93t=15+li zfJ;|dhYL2@^7m8dFLGG5&}}uEeCqFs$8@zwf63n)!=^W#v%)0Ad7l!E^ zEl8%c-*sDdOlkizB=&R}xKma}khn6vc+%vGZPR^{@IOsYPX{tzGdWVzm!{OIDE3Mj zcvW3KGnOP9A^B|?_=8H48%t6gE1g!CNc^)5paRq?z$YroQl*GRPga1NDr`0~6Mnk_ z+^qmVssQg)fO{1nR|QU271g=1=AIZAuH|sJNbEutcwAlJZWefWR)L+3glTOSxHJpgnFW5O!rvcZJuwHIo>O2CjrHP# zk?EW$>6&XXi+T5h`zV2tuoP`^+t8G+KD0CGl08XM)LEB1hVV!| z`444Hw&zt%Z<-rrc#)7Z3(`*5tV{QYRG*Rr(|tqi>Nf2MYmIO@J7|=)cc~pXI1@Pd zd2MIY?QMeiJSWl5bZDEo7y7UxaB;E!^V`M1)SoXLdX&P$;>E{S-LUU4dz)E0vyao* z7)|Xeb9$yY?tK{{7&FhP*pY#)Z5=cnNAoB{lJ716_ZEN?HDIj5z0?&G2y4n=ENG)Ac{mB_in)RdCqUn*a%0neys<$=iM_gW2jvj+T0 zg`SJtFbU;2PsuO6B6%HxroC5NdQeh5)Whf1OUuxnTC)bl$%DpbyaBT=jcSgd?ZJS_ z+stxC=2?|a@J@O}f%L~c*@Oor6Oy;6*<) => { marshaller, timerService: timer, feeConfig: makeTestFeeConfig(usdc), + chainInfo: {}, + assetInfo: {}, }, facadeServices: { agoricNames, From afb4f34518124b3809d1df07ea706743fa47f2b1 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 25 Nov 2024 19:36:16 -0500 Subject: [PATCH 054/174] feat: fusdc assetInfo and chainInfo by netname --- .../scripts/fast-usdc/init-fast-usdc.js | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/packages/builders/scripts/fast-usdc/init-fast-usdc.js b/packages/builders/scripts/fast-usdc/init-fast-usdc.js index 5786cb0f0b0..783ce078f43 100644 --- a/packages/builders/scripts/fast-usdc/init-fast-usdc.js +++ b/packages/builders/scripts/fast-usdc/init-fast-usdc.js @@ -6,6 +6,8 @@ import { getManifestForFastUSDC, } from '@agoric/fast-usdc/src/fast-usdc.start.js'; import { toExternalConfig } from '@agoric/fast-usdc/src/utils/config-marshal.js'; +import { denomHash, withChainCapabilities } from '@agoric/orchestration'; +import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js'; import { multiplyBy, parseRatio, @@ -17,12 +19,35 @@ import { parseArgs } from 'node:util'; * @import {CoreEvalBuilder, DeployScriptFunction} from '@agoric/deploy-script-support/src/externalTypes.js' * @import {ParseArgsConfig} from 'node:util' * @import {FastUSDCConfig} from '@agoric/fast-usdc/src/fast-usdc.start.js' + * @import {Passable} from '@endo/marshal'; + * @import {CosmosChainInfo} from '@agoric/orchestration'; */ const { keys } = Object; +const defaultAssetInfo = { + uusdc: { + baseName: 'noble', + chainName: 'noble', + baseDenom: 'uusdc', + }, + [`ibc/${denomHash({ denom: 'uusdc', channelId: fetchedChainInfo.agoric.connections['noble-1'].transferChannel.channelId })}`]: + { + baseName: 'noble', + chainName: 'agoric', + baseDenom: 'uusdc', + brandKey: 'USDC', + }, + [`ibc/${denomHash({ denom: 'uusdc', channelId: fetchedChainInfo.osmosis.connections['noble-1'].transferChannel.channelId })}`]: + { + baseName: 'noble', + chainName: 'osmosis', + baseDenom: 'uusdc', + }, +}; + /** - * @type {Record>} + * @type {Record>} * * TODO: determine OCW operator addresses * meanwhile, use price oracle addresses (from updatePriceFeeds.js). @@ -47,6 +72,10 @@ const configurations = { }, }, }, + chainInfo: /** @type {Record} */ ( + withChainCapabilities(fetchedChainInfo) + ), + assetInfo: defaultAssetInfo, }, MAINNET: { oracles: { @@ -69,6 +98,10 @@ const configurations = { }, }, }, + chainInfo: /** @type {Record} */ ( + withChainCapabilities(fetchedChainInfo) + ), + assetInfo: defaultAssetInfo, }, DEVNET: { oracles: { @@ -90,6 +123,10 @@ const configurations = { }, }, }, + chainInfo: /** @type {Record} */ ( + withChainCapabilities(fetchedChainInfo) // TODO: use devnet values + ), + assetInfo: defaultAssetInfo, // TODO: use emerynet values }, EMERYNET: { oracles: { @@ -108,6 +145,10 @@ const configurations = { }, }, }, + chainInfo: /** @type {Record} */ ( + withChainCapabilities(fetchedChainInfo) // TODO: use emerynet values + ), + assetInfo: defaultAssetInfo, // TODO: use emerynet values }, }; @@ -243,10 +284,22 @@ export default async (homeP, endowments) => { }; const parseChainInfo = () => { + if (net) { + if (!(net in configurations)) { + throw Error(`${net} not in ${keys(configurations)}`); + } + return configurations[net].chainInfo; + } if (!chainInfo) throw Error(chainInfoUsage); return JSON.parse(chainInfo); }; const parseAssetInfo = () => { + if (net) { + if (!(net in configurations)) { + throw Error(`${net} not in ${keys(configurations)}`); + } + return configurations[net].assetInfo; + } if (!assetInfo) throw Error(assetInfoUsage); return JSON.parse(assetInfo); }; From 032f98ab7b2536ac9c9abbaf4a5b33e9299e3cc2 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 25 Nov 2024 18:10:56 -0500 Subject: [PATCH 055/174] feat: support builderOpts --- multichain-testing/test/support.ts | 3 ++- multichain-testing/tools/deploy.ts | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/multichain-testing/test/support.ts b/multichain-testing/test/support.ts index 9c2a297296e..f98b5a13f08 100644 --- a/multichain-testing/test/support.ts +++ b/multichain-testing/test/support.ts @@ -89,6 +89,7 @@ export const commonSetup = async (t: ExecutionContext) => { const startContract = async ( contractName: string, contractBuilder: string, + builderOpts?: Record, ) => { const { vstorageClient } = tools; const instances = Object.fromEntries( @@ -98,7 +99,7 @@ export const commonSetup = async (t: ExecutionContext) => { return t.log('Contract found. Skipping installation...'); } t.log('bundle and install contract', contractName); - await deployBuilder(contractBuilder); + await deployBuilder(contractBuilder, builderOpts); await retryUntilCondition( () => vstorageClient.queryData(`published.agoricNames.instance`), res => contractName in Object.fromEntries(res), diff --git a/multichain-testing/tools/deploy.ts b/multichain-testing/tools/deploy.ts index 17b70cf5bb4..52a460f6094 100755 --- a/multichain-testing/tools/deploy.ts +++ b/multichain-testing/tools/deploy.ts @@ -2,6 +2,7 @@ import { createRequire } from 'module'; import type { AgdTools } from './agd-tools.js'; import type { CoreEvalPlan } from '@agoric/deploy-script-support/src/writeCoreEvalParts.js'; +import { flags } from './agd-lib.js'; const nodeRequire = createRequire(import.meta.url); @@ -10,10 +11,16 @@ export const makeDeployBuilder = ( readJSON: typeof import('fs-extra').readJSON, execa: typeof import('execa').execa, ) => - async function deployBuilder(builder: string) { + async function deployBuilder( + builder: string, + builderOpts?: Record, + ) { console.log(`building plan: ${builder}`); - // build the plan - const { stdout } = await execa`agoric run ${builder}`; + const args = ['run', builder]; + if (builderOpts) { + args.push(...flags(builderOpts)); + } + const { stdout } = await execa('agoric', args); const match = stdout.match(/ (?[-\w]+)-permit.json/); if (!(match && match.groups)) { throw Error('no permit found'); From 2fa2f7512b2a1a19d47f47b59e3206619794be18 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 25 Nov 2024 18:56:02 -0500 Subject: [PATCH 056/174] feat: send-anywhere inits chainHub - split start-send-anywhere.js into proposal and start script so we can pass options - init-send-anywhere.js takes `--chainInfo` and `--assetInfo` options - send-anywhere.contrac.js registers chainInfo and assetInfo from privateArgs in ChainHub --- multichain-testing/test/send-anywhere.test.ts | 35 +++++++- .../orchestration/restart-contracts.test.ts | 2 +- .../scripts/testing/init-send-anywhere.js | 67 +++++++++++++++ .../src/examples/send-anywhere.contract.js | 11 +++ .../src/proposals}/start-send-anywhere.js | 85 ++++++++----------- 5 files changed, 146 insertions(+), 54 deletions(-) create mode 100644 packages/builders/scripts/testing/init-send-anywhere.js rename packages/{builders/scripts/testing => orchestration/src/proposals}/start-send-anywhere.js (53%) diff --git a/multichain-testing/test/send-anywhere.test.ts b/multichain-testing/test/send-anywhere.test.ts index 717e1b5282e..376853600f0 100644 --- a/multichain-testing/test/send-anywhere.test.ts +++ b/multichain-testing/test/send-anywhere.test.ts @@ -10,6 +10,8 @@ import { createWallet } from '../tools/wallet.js'; import { AmountMath } from '@agoric/ertp'; import { makeQueryClient } from '../tools/query.js'; import type { Amount } from '@agoric/ertp/src/types.js'; +import chainInfo from '../starship-chain-info.js'; +import { denomHash, withChainCapabilities } from '@agoric/orchestration'; const test = anyTest as TestFn; @@ -17,7 +19,7 @@ const accounts = ['osmosis1', 'osmosis2', 'cosmoshub1', 'cosmoshub2']; const contractName = 'sendAnywhere'; const contractBuilder = - '../packages/builders/scripts/testing/start-send-anywhere.js'; + '../packages/builders/scripts/testing/init-send-anywhere.js'; test.before(async t => { const { deleteTestKeys, setupTestKeys, ...rest } = await commonSetup(t); @@ -25,7 +27,36 @@ test.before(async t => { const wallets = await setupTestKeys(accounts); t.context = { ...rest, wallets, deleteTestKeys }; const { startContract } = rest; - await startContract(contractName, contractBuilder); + + const assetInfo = { + uosmo: { + baseName: 'osmosis', + chainName: 'osmosis', + baseDenom: 'uosmo', + }, + [`ibc/${denomHash({ denom: 'uosmo', channelId: chainInfo.agoric.connections['osmosislocal'].transferChannel.channelId })}`]: + { + baseName: 'osmosis', + chainName: 'agoric', + baseDenom: 'uosmo', + }, + uatom: { + baseName: 'cosmoshub', + chainName: 'cosmoshub', + baseDenom: 'uatom', + }, + [`ibc/${denomHash({ denom: 'uatom', channelId: chainInfo.agoric.connections['gaialocal'].transferChannel.channelId })}`]: + { + baseName: 'cosmoshub', + chainName: 'agoric', + baseDenom: 'uatom', + }, + }; + + await startContract(contractName, contractBuilder, { + chainInfo: JSON.stringify(withChainCapabilities(chainInfo)), + assetInfo: JSON.stringify(assetInfo), + }); }); test.after(async t => { diff --git a/packages/boot/test/orchestration/restart-contracts.test.ts b/packages/boot/test/orchestration/restart-contracts.test.ts index a8f5f56511a..790f58e5d44 100644 --- a/packages/boot/test/orchestration/restart-contracts.test.ts +++ b/packages/boot/test/orchestration/restart-contracts.test.ts @@ -32,7 +32,7 @@ test.serial('send-anywhere', async t => { t.log('start send-anywhere'); await evalProposal( - buildProposal('@agoric/builders/scripts/testing/start-send-anywhere.js'), + buildProposal('@agoric/builders/scripts/testing/init-send-anywhere.js'), ); t.log('making offer'); diff --git a/packages/builders/scripts/testing/init-send-anywhere.js b/packages/builders/scripts/testing/init-send-anywhere.js new file mode 100644 index 00000000000..fb953768ea2 --- /dev/null +++ b/packages/builders/scripts/testing/init-send-anywhere.js @@ -0,0 +1,67 @@ +import { makeHelpers } from '@agoric/deploy-script-support'; +import { + getManifest, + startSendAnywhere, +} from '@agoric/orchestration/src/proposals/start-send-anywhere.js'; +import { parseArgs } from 'node:util'; + +/** + * @import {ParseArgsConfig} from 'node:util' + */ + +/** @type {ParseArgsConfig['options']} */ +const parserOpts = { + chainInfo: { type: 'string' }, + assetInfo: { type: 'string' }, +}; + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ +export const defaultProposalBuilder = async ( + { publishRef, install }, + options, +) => + harden({ + sourceSpec: '@agoric/orchestration/src/proposals/start-send-anywhere.js', + getManifestCall: [ + getManifest.name, + { + installationRef: publishRef( + install( + '@agoric/orchestration/src/examples/send-anywhere.contract.js', + ), + ), + options, + }, + ], + }); + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ +export default async (homeP, endowments) => { + const { scriptArgs } = endowments; + + const { + values: { chainInfo, assetInfo }, + } = parseArgs({ + args: scriptArgs, + options: parserOpts, + }); + + const parseChainInfo = () => { + if (typeof chainInfo !== 'string') return undefined; + return JSON.parse(chainInfo); + }; + const parseAssetInfo = () => { + if (typeof assetInfo !== 'string') return undefined; + return JSON.parse(assetInfo); + }; + const opts = harden({ + chainInfo: parseChainInfo(), + assetInfo: parseAssetInfo(), + }); + + const { writeCoreEval } = await makeHelpers(homeP, endowments); + + await writeCoreEval(startSendAnywhere.name, utils => + defaultProposalBuilder(utils, opts), + ); +}; diff --git a/packages/orchestration/src/examples/send-anywhere.contract.js b/packages/orchestration/src/examples/send-anywhere.contract.js index 3cfab6ec922..3d2065de836 100644 --- a/packages/orchestration/src/examples/send-anywhere.contract.js +++ b/packages/orchestration/src/examples/send-anywhere.contract.js @@ -4,6 +4,7 @@ import { M } from '@endo/patterns'; import { prepareChainHubAdmin } from '../exos/chain-hub-admin.js'; import { AnyNatAmountShape } from '../typeGuards.js'; import { withOrchestration } from '../utils/start-helper.js'; +import { registerChainsAndAssets } from '../utils/chain-hub-helper.js'; import * as flows from './send-anywhere.flows.js'; import * as sharedFlows from './shared.flows.js'; @@ -11,6 +12,7 @@ import * as sharedFlows from './shared.flows.js'; * @import {Vow} from '@agoric/vow'; * @import {Zone} from '@agoric/zone'; * @import {OrchestrationPowers, OrchestrationTools} from '../utils/start-helper.js'; + * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration'; */ export const SingleNatAmountRecord = M.and( @@ -27,6 +29,8 @@ harden(SingleNatAmountRecord); * @param {ZCF} zcf * @param {OrchestrationPowers & { * marshaller: Marshaller; + * chainInfo?: Record; + * assetInfo?: Record; * }} privateArgs * @param {Zone} zone * @param {OrchestrationTools} tools @@ -82,6 +86,13 @@ export const contract = async ( }, ); + registerChainsAndAssets( + chainHub, + zcf.getTerms().brands, + privateArgs.chainInfo, + privateArgs.assetInfo, + ); + return { publicFacet, creatorFacet }; }; harden(contract); diff --git a/packages/builders/scripts/testing/start-send-anywhere.js b/packages/orchestration/src/proposals/start-send-anywhere.js similarity index 53% rename from packages/builders/scripts/testing/start-send-anywhere.js rename to packages/orchestration/src/proposals/start-send-anywhere.js index e29d043ccb8..a50d87f3f7f 100644 --- a/packages/builders/scripts/testing/start-send-anywhere.js +++ b/packages/orchestration/src/proposals/start-send-anywhere.js @@ -1,7 +1,3 @@ -/** - * @file This is for use in tests in a3p-integration - * Unlike most builder scripts, this one includes the proposal exports as well. - */ import { deeplyFulfilledObject, makeTracer, @@ -12,6 +8,7 @@ import { E } from '@endo/far'; /// /** * @import {Installation} from '@agoric/zoe/src/zoeService/utils.js'; + * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration'; */ const trace = makeTracer('StartSA', true); @@ -28,28 +25,37 @@ const trace = makeTracer('StartSA', true); * }; * }; * }} powers + * @param {{ + * options: { + * chainInfo: Record; + * assetInfo: Record; + * }; + * }} config */ -export const startSendAnywhere = async ({ - consume: { - agoricNames, - board, - chainStorage, - chainTimerService, - cosmosInterchainService, - localchain, - startUpgradable, - }, - installation: { - consume: { sendAnywhere }, - }, - instance: { - // @ts-expect-error unknown instance - produce: { sendAnywhere: produceInstance }, - }, - issuer: { - consume: { IST }, +export const startSendAnywhere = async ( + { + consume: { + agoricNames, + board, + chainStorage, + chainTimerService, + cosmosInterchainService, + localchain, + startUpgradable, + }, + installation: { + consume: { sendAnywhere }, + }, + instance: { + // @ts-expect-error unknown instance + produce: { sendAnywhere: produceInstance }, + }, + issuer: { + consume: { IST }, + }, }, -}) => { + { options: { chainInfo, assetInfo } }, +) => { trace(startSendAnywhere.name); const marshaller = await E(board).getReadonlyMarshaller(); @@ -64,6 +70,8 @@ export const startSendAnywhere = async ({ 'send-anywhere', ), timerService: chainTimerService, + chainInfo, + assetInfo, }), ); @@ -78,7 +86,7 @@ export const startSendAnywhere = async ({ }; harden(startSendAnywhere); -export const getManifest = ({ restoreRef }, { installationRef }) => { +export const getManifest = ({ restoreRef }, { installationRef, options }) => { return { manifest: { [startSendAnywhere.name]: { @@ -106,31 +114,6 @@ export const getManifest = ({ restoreRef }, { installationRef }) => { installations: { sendAnywhere: restoreRef(installationRef), }, + options, }; }; - -/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ -export const defaultProposalBuilder = async ({ publishRef, install }) => - harden({ - // Somewhat unorthodox, source the exports from this builder module - sourceSpec: '@agoric/builders/scripts/testing/start-send-anywhere.js', - getManifestCall: [ - getManifest.name, - { - installationRef: publishRef( - install( - '@agoric/orchestration/src/examples/send-anywhere.contract.js', - ), - ), - }, - ], - }); - -/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ -export default async (homeP, endowments) => { - // import dynamically so the module can work in CoreEval environment - const dspModule = await import('@agoric/deploy-script-support'); - const { makeHelpers } = dspModule; - const { writeCoreEval } = await makeHelpers(homeP, endowments); - await writeCoreEval(startSendAnywhere.name, defaultProposalBuilder); -}; From 118bc6a304bdf3e084885653c8d049f446bd2b5a Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 26 Nov 2024 11:22:55 -0500 Subject: [PATCH 057/174] test: disable exitOffer tool reclaims stuck payment - this test is flaky and will be addressed as part of #10565 --- a3p-integration/proposals/z:acceptance/wallet.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a3p-integration/proposals/z:acceptance/wallet.test.js b/a3p-integration/proposals/z:acceptance/wallet.test.js index f3487a9f10d..9a2e18d1395 100644 --- a/a3p-integration/proposals/z:acceptance/wallet.test.js +++ b/a3p-integration/proposals/z:acceptance/wallet.test.js @@ -58,7 +58,7 @@ test.serial(`send invitation via namesByAddress`, async t => { }); // FIXME https://github.com/Agoric/agoric-sdk/issues/10565 -test.failing('exitOffer tool reclaims stuck payment', async t => { +test.skip('exitOffer tool reclaims stuck payment', async t => { const istBalanceBefore = await getBalances([GOV1ADDR], 'uist'); t.log('istBalanceBefore', istBalanceBefore); From 23120a923c2bd3ca182291df2080214fbd5f20ca Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Tue, 26 Nov 2024 14:05:17 -0500 Subject: [PATCH 058/174] chore(.github): Add release verification prompts to PR template section "Upgrade Considerations" (#10444) ## Description A topic in last week's kernel meeting was the burden of verifying releases, and even of determining _what_ to verify and _how_ to do so. This is an attempt to make that explicit at a much earlier point in development, with hints regarding future automation potential but no firm commitment of such. Assuming this lands, I expect release instructions to include collecting steps from all constituent PRs and post-release cleanup of any relevant scripts. ### Security Considerations n/a ### Scaling Considerations n/a ### Documentation Considerations n/a ### Testing Considerations n/a ### Upgrade Considerations This is intended to increase the maturity of our upgrade process. --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 40cda1dc8a9..dc1ce3900b3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -32,4 +32,4 @@ refs: #XXXX ### Upgrade Considerations - + From f7f084c1f3be598353f93956207c4ab4bee95bcc Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 25 Nov 2024 21:03:29 -0800 Subject: [PATCH 059/174] build: bump yarn (4.5.3) --- a3p-integration/package.json | 2 +- a3p-integration/proposals/f:fast-usdc/package.json | 2 +- a3p-integration/proposals/f:fast-usdc/yarn.lock | 4 ++-- a3p-integration/proposals/n:upgrade-next/package.json | 2 +- a3p-integration/proposals/p:upgrade-19/package.json | 2 +- a3p-integration/proposals/p:upgrade-19/yarn.lock | 4 ++-- a3p-integration/proposals/s:stake-bld/package.json | 2 +- a3p-integration/proposals/z:acceptance/package.json | 2 +- multichain-testing/package.json | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/a3p-integration/package.json b/a3p-integration/package.json index aff94c5d6a0..7c36b3494af 100644 --- a/a3p-integration/package.json +++ b/a3p-integration/package.json @@ -19,6 +19,6 @@ "@agoric/synthetic-chain": "^0.4.3", "@types/better-sqlite3": "^7.6.11" }, - "packageManager": "yarn@4.5.1", + "packageManager": "yarn@4.5.3", "license": "Apache-2.0" } diff --git a/a3p-integration/proposals/f:fast-usdc/package.json b/a3p-integration/proposals/f:fast-usdc/package.json index 50fe4c4fd59..6d5c1a0fc64 100644 --- a/a3p-integration/proposals/f:fast-usdc/package.json +++ b/a3p-integration/proposals/f:fast-usdc/package.json @@ -26,5 +26,5 @@ "scripts": { "agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops" }, - "packageManager": "yarn@4.2.2" + "packageManager": "yarn@4.5.3" } diff --git a/a3p-integration/proposals/f:fast-usdc/yarn.lock b/a3p-integration/proposals/f:fast-usdc/yarn.lock index 3f27fd9271b..ade53b2d760 100644 --- a/a3p-integration/proposals/f:fast-usdc/yarn.lock +++ b/a3p-integration/proposals/f:fast-usdc/yarn.lock @@ -4140,11 +4140,11 @@ __metadata: "typescript@patch:typescript@npm%3A5.1.6 - 5.6.x#optional!builtin": version: 5.6.3 - resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=b45daf" + resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=8c6c40" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/ac8307bb06bbfd08ae7137da740769b7d8c3ee5943188743bb622c621f8ad61d244767480f90fbd840277fbf152d8932aa20c33f867dea1bb5e79b187ca1a92f + checksum: 10c0/7c9d2e07c81226d60435939618c91ec2ff0b75fbfa106eec3430f0fcf93a584bc6c73176676f532d78c3594fe28a54b36eb40b3d75593071a7ec91301533ace7 languageName: node linkType: hard diff --git a/a3p-integration/proposals/n:upgrade-next/package.json b/a3p-integration/proposals/n:upgrade-next/package.json index 7249ebf007b..7a3510e8791 100644 --- a/a3p-integration/proposals/n:upgrade-next/package.json +++ b/a3p-integration/proposals/n:upgrade-next/package.json @@ -29,7 +29,7 @@ "scripts": { "agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops" }, - "packageManager": "yarn@4.5.1", + "packageManager": "yarn@4.5.3", "devDependencies": { "eslint": "^8.57.0", "npm-run-all": "^4.1.5", diff --git a/a3p-integration/proposals/p:upgrade-19/package.json b/a3p-integration/proposals/p:upgrade-19/package.json index c46d72c02ed..e2f705ad798 100644 --- a/a3p-integration/proposals/p:upgrade-19/package.json +++ b/a3p-integration/proposals/p:upgrade-19/package.json @@ -29,7 +29,7 @@ "scripts": { "agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops" }, - "packageManager": "yarn@4.2.2", + "packageManager": "yarn@4.5.3", "devDependencies": { "eslint": "^8.57.0", "npm-run-all": "^4.1.5", diff --git a/a3p-integration/proposals/p:upgrade-19/yarn.lock b/a3p-integration/proposals/p:upgrade-19/yarn.lock index a26a3f0090e..f74d4368e0e 100644 --- a/a3p-integration/proposals/p:upgrade-19/yarn.lock +++ b/a3p-integration/proposals/p:upgrade-19/yarn.lock @@ -5899,11 +5899,11 @@ __metadata: "typescript@patch:typescript@npm%3A5.1.6 - 5.6.x#optional!builtin, typescript@patch:typescript@npm%3A^5.6.3#optional!builtin": version: 5.6.3 - resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=b45daf" + resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=8c6c40" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/ac8307bb06bbfd08ae7137da740769b7d8c3ee5943188743bb622c621f8ad61d244767480f90fbd840277fbf152d8932aa20c33f867dea1bb5e79b187ca1a92f + checksum: 10c0/7c9d2e07c81226d60435939618c91ec2ff0b75fbfa106eec3430f0fcf93a584bc6c73176676f532d78c3594fe28a54b36eb40b3d75593071a7ec91301533ace7 languageName: node linkType: hard diff --git a/a3p-integration/proposals/s:stake-bld/package.json b/a3p-integration/proposals/s:stake-bld/package.json index 389fd3300bf..ba0c30abf43 100644 --- a/a3p-integration/proposals/s:stake-bld/package.json +++ b/a3p-integration/proposals/s:stake-bld/package.json @@ -23,7 +23,7 @@ "ava": { "concurrency": 1 }, - "packageManager": "yarn@4.5.1", + "packageManager": "yarn@4.5.3", "devDependencies": { "@types/node": "^22.0.0" } diff --git a/a3p-integration/proposals/z:acceptance/package.json b/a3p-integration/proposals/z:acceptance/package.json index c1f8a54ce1d..e95b55a26a5 100644 --- a/a3p-integration/proposals/z:acceptance/package.json +++ b/a3p-integration/proposals/z:acceptance/package.json @@ -90,7 +90,7 @@ "scripts": { "agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops" }, - "packageManager": "yarn@4.5.1", + "packageManager": "yarn@4.5.3", "devDependencies": { "eslint": "^8.57.0", "npm-run-all": "^4.1.5", diff --git a/multichain-testing/package.json b/multichain-testing/package.json index fd2e9f30afe..7dd607339da 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -17,7 +17,7 @@ "starship:stop": "make stop", "postinstall": "patch-package" }, - "packageManager": "yarn@4.1.1", + "packageManager": "yarn@4.5.3", "devDependencies": { "@agoric/cosmic-proto": "0.4.1-dev-08f8549.0", "@cosmjs/crypto": "^0.32.4", From db44cbffd106a8f0afbb2315d7202782e3389425 Mon Sep 17 00:00:00 2001 From: "Turadg Aleahmad (aider)" Date: Mon, 25 Nov 2024 19:57:28 -0800 Subject: [PATCH 060/174] refactor: Extract config commands to a separate file --- packages/fast-usdc/src/cli/cli.js | 104 +---------------- packages/fast-usdc/src/cli/config-commands.js | 109 ++++++++++++++++++ 2 files changed, 111 insertions(+), 102 deletions(-) create mode 100644 packages/fast-usdc/src/cli/config-commands.js diff --git a/packages/fast-usdc/src/cli/cli.js b/packages/fast-usdc/src/cli/cli.js index 42d63045f56..93945060cbc 100644 --- a/packages/fast-usdc/src/cli/cli.js +++ b/packages/fast-usdc/src/cli/cli.js @@ -1,4 +1,5 @@ import { assertParsableNumber } from '@agoric/zoe/src/contractSupport/ratio.js'; +import { addConfigCommands } from './config-commands.js'; import { Command, InvalidArgumentError, @@ -45,108 +46,7 @@ export const initProgram = ( `${defaultHome}/.fast-usdc/`, ); - const config = program.command('config').description('Manage config'); - - const configFilename = 'config.json'; - const getConfigPath = () => { - const { home: configDir } = program.opts(); - return configDir + configFilename; - }; - - const makeConfigFile = () => - makeFile(getConfigPath(), readFile, writeFile, mkdir, exists); - - config - .command('show') - .description('Show current config') - .action(async () => { - await configHelpers.show(makeConfigFile()); - }); - - config - .command('init') - .description('Set initial config values') - .requiredOption( - '--noble-seed ', - 'Seed phrase for Noble account. CAUTION: Stored unencrypted in file system', - ) - .requiredOption( - '--eth-seed ', - 'Seed phrase for Ethereum account. CAUTION: Stored unencrypted in file system', - ) - .requiredOption( - '--agoric-seed ', - 'Seed phrase for Agoric LP account. CAUTION: Stored unencrypted in file system', - ) - .option( - '--agoric-rpc [url]', - 'Agoric RPC endpoint', - 'http://127.0.0.1:26656', - ) - .option( - '--agoric-api [url]', - 'Agoric RPC endpoint', - 'http://127.0.0.1:1317', - ) - .option('--noble-rpc [url]', 'Noble RPC endpoint', 'http://127.0.0.1:26657') - .option('--noble-api [url]', 'Noble API endpoint', 'http://127.0.0.1:1318') - .option('--eth-rpc [url]', 'Ethereum RPC Endpoint', 'http://127.0.0.1:8545') - .option( - '--noble-to-agoric-channel [channel]', - 'Channel ID on Noble for Agoric', - 'channel-21', - ) - .option( - '--token-messenger-address [address]', - 'Address of TokenMessenger contract', - // Default to ETH mainnet contract address. For ETH sepolia, use 0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5 - '0xbd3fa81b58ba92a82136038b25adec7066af3155', - ) - .option( - '--token-contract-address [address]', - 'Address of USDC token contract', - // Detault to ETH mainnet token address. For ETH sepolia, use 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238 - '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', - ) - .action(async options => { - await configHelpers.init(makeConfigFile(), options); - }); - - config - .command('update') - .description('Update config values') - .option( - '--noble-seed [string]', - 'Seed phrase for Noble account. CAUTION: Stored unencrypted in file system', - ) - .option( - '--eth-seed [string]', - 'Seed phrase for Ethereum account. CAUTION: Stored unencrypted in file system', - ) - .option( - '--agoric-seed ', - 'Seed phrase for Agoric LP account. CAUTION: Stored unencrypted in file system', - ) - .option('--agoric-rpc [url]', 'Agoric RPC endpoint') - .option('--agoric-api [url]', 'Agoric API endpoint') - .option('--noble-rpc [url]', 'Noble RPC endpoint') - .option('--noble-api [url]', 'Noble API endpoint') - .option('--eth-rpc [url]', 'Ethereum RPC Endpoint') - .option( - '--noble-to-agoric-channel [channel]', - 'Channel ID on Noble for Agoric', - ) - .option( - '--token-messenger-address [address]', - 'Address of TokenMessenger contract', - ) - .option( - '--token-contract-address [address]', - 'Address of USDC token contract', - ) - .action(async options => { - await configHelpers.update(makeConfigFile(), options); - }); + addConfigCommands(program, configHelpers, readFile, writeFile, mkdir, exists); /** @param {string} value */ const parseDecimal = value => { diff --git a/packages/fast-usdc/src/cli/config-commands.js b/packages/fast-usdc/src/cli/config-commands.js new file mode 100644 index 00000000000..e6123ecb69b --- /dev/null +++ b/packages/fast-usdc/src/cli/config-commands.js @@ -0,0 +1,109 @@ +import { Command } from 'commander'; +import { makeFile } from '../util/file.js'; + +export const addConfigCommands = (program, configHelpers, readFile, writeFile, mkdir, exists) => { + const config = program.command('config').description('Manage config'); + + const configFilename = 'config.json'; + const getConfigPath = () => { + const { home: configDir } = program.opts(); + return configDir + configFilename; + }; + + const makeConfigFile = () => + makeFile(getConfigPath(), readFile, writeFile, mkdir, exists); + + config + .command('show') + .description('Show current config') + .action(async () => { + await configHelpers.show(makeConfigFile()); + }); + + config + .command('init') + .description('Set initial config values') + .requiredOption( + '--noble-seed ', + 'Seed phrase for Noble account. CAUTION: Stored unencrypted in file system', + ) + .requiredOption( + '--eth-seed ', + 'Seed phrase for Ethereum account. CAUTION: Stored unencrypted in file system', + ) + .requiredOption( + '--agoric-seed ', + 'Seed phrase for Agoric LP account. CAUTION: Stored unencrypted in file system', + ) + .option( + '--agoric-rpc [url]', + 'Agoric RPC endpoint', + 'http://127.0.0.1:26656', + ) + .option( + '--agoric-api [url]', + 'Agoric RPC endpoint', + 'http://127.0.0.1:1317', + ) + .option('--noble-rpc [url]', 'Noble RPC endpoint', 'http://127.0.0.1:26657') + .option('--noble-api [url]', 'Noble API endpoint', 'http://127.0.0.1:1318') + .option('--eth-rpc [url]', 'Ethereum RPC Endpoint', 'http://127.0.0.1:8545') + .option( + '--noble-to-agoric-channel [channel]', + 'Channel ID on Noble for Agoric', + 'channel-21', + ) + .option( + '--token-messenger-address [address]', + 'Address of TokenMessenger contract', + // Default to ETH mainnet contract address. For ETH sepolia, use 0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5 + '0xbd3fa81b58ba92a82136038b25adec7066af3155', + ) + .option( + '--token-contract-address [address]', + 'Address of USDC token contract', + // Detault to ETH mainnet token address. For ETH sepolia, use 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238 + '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + ) + .action(async options => { + await configHelpers.init(makeConfigFile(), options); + }); + + config + .command('update') + .description('Update config values') + .option( + '--noble-seed [string]', + 'Seed phrase for Noble account. CAUTION: Stored unencrypted in file system', + ) + .option( + '--eth-seed [string]', + 'Seed phrase for Ethereum account. CAUTION: Stored unencrypted in file system', + ) + .option( + '--agoric-seed ', + 'Seed phrase for Agoric LP account. CAUTION: Stored unencrypted in file system', + ) + .option('--agoric-rpc [url]', 'Agoric RPC endpoint') + .option('--agoric-api [url]', 'Agoric API endpoint') + .option('--noble-rpc [url]', 'Noble RPC endpoint') + .option('--noble-api [url]', 'Noble API endpoint') + .option('--eth-rpc [url]', 'Ethereum RPC Endpoint') + .option( + '--noble-to-agoric-channel [channel]', + 'Channel ID on Noble for Agoric', + ) + .option( + '--token-messenger-address [address]', + 'Address of TokenMessenger contract', + ) + .option( + '--token-contract-address [address]', + 'Address of USDC token contract', + ) + .action(async options => { + await configHelpers.update(makeConfigFile(), options); + }); + + return config; +}; From 9c48833822aeecefe6e5c9dfc627ad33f97fabfc Mon Sep 17 00:00:00 2001 From: "Turadg Aleahmad (aider)" Date: Mon, 25 Nov 2024 20:00:45 -0800 Subject: [PATCH 061/174] refactor: Simplify addConfigCommands by moving makeConfigFile to cli.js --- packages/fast-usdc/src/cli/cli.js | 10 +++++++++- packages/fast-usdc/src/cli/config-commands.js | 12 +----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/fast-usdc/src/cli/cli.js b/packages/fast-usdc/src/cli/cli.js index 93945060cbc..ee5fc52deb4 100644 --- a/packages/fast-usdc/src/cli/cli.js +++ b/packages/fast-usdc/src/cli/cli.js @@ -46,7 +46,15 @@ export const initProgram = ( `${defaultHome}/.fast-usdc/`, ); - addConfigCommands(program, configHelpers, readFile, writeFile, mkdir, exists); + const makeConfigFile = () => { + const getConfigPath = () => { + const { home: configDir } = program.opts(); + return configDir + 'config.json'; + }; + return makeFile(getConfigPath(), readFile, writeFile, mkdir, exists); + }; + + addConfigCommands(program, configHelpers, makeConfigFile); /** @param {string} value */ const parseDecimal = value => { diff --git a/packages/fast-usdc/src/cli/config-commands.js b/packages/fast-usdc/src/cli/config-commands.js index e6123ecb69b..16c7146bfd5 100644 --- a/packages/fast-usdc/src/cli/config-commands.js +++ b/packages/fast-usdc/src/cli/config-commands.js @@ -1,18 +1,8 @@ import { Command } from 'commander'; -import { makeFile } from '../util/file.js'; -export const addConfigCommands = (program, configHelpers, readFile, writeFile, mkdir, exists) => { +export const addConfigCommands = (program, configHelpers, makeConfigFile) => { const config = program.command('config').description('Manage config'); - const configFilename = 'config.json'; - const getConfigPath = () => { - const { home: configDir } = program.opts(); - return configDir + configFilename; - }; - - const makeConfigFile = () => - makeFile(getConfigPath(), readFile, writeFile, mkdir, exists); - config .command('show') .description('Show current config') From 4787cca52ca5bee76156b7cb9164fe7ddbae4e39 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 25 Nov 2024 20:08:46 -0800 Subject: [PATCH 062/174] refactor: named exports of config --- packages/fast-usdc/src/cli/cli.js | 6 +++--- packages/fast-usdc/src/cli/config-commands.js | 13 +++++++++++-- packages/fast-usdc/src/cli/config.js | 14 ++++++-------- packages/fast-usdc/src/cli/transfer.js | 4 ++-- packages/fast-usdc/src/util/file.js | 2 +- packages/fast-usdc/test/cli/config.test.ts | 2 +- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/packages/fast-usdc/src/cli/cli.js b/packages/fast-usdc/src/cli/cli.js index ee5fc52deb4..3cbd30b4661 100644 --- a/packages/fast-usdc/src/cli/cli.js +++ b/packages/fast-usdc/src/cli/cli.js @@ -1,5 +1,4 @@ import { assertParsableNumber } from '@agoric/zoe/src/contractSupport/ratio.js'; -import { addConfigCommands } from './config-commands.js'; import { Command, InvalidArgumentError, @@ -13,7 +12,8 @@ import { readFile as readAsync, writeFile as writeAsync, } from 'node:fs/promises'; -import configLib from './config.js'; +import { addConfigCommands } from './config-commands.js'; +import * as configLib from './config.js'; import transferLib from './transfer.js'; import { makeFile } from '../util/file.js'; @@ -49,7 +49,7 @@ export const initProgram = ( const makeConfigFile = () => { const getConfigPath = () => { const { home: configDir } = program.opts(); - return configDir + 'config.json'; + return `${configDir}config.json`; }; return makeFile(getConfigPath(), readFile, writeFile, mkdir, exists); }; diff --git a/packages/fast-usdc/src/cli/config-commands.js b/packages/fast-usdc/src/cli/config-commands.js index 16c7146bfd5..e2f39d6f7d0 100644 --- a/packages/fast-usdc/src/cli/config-commands.js +++ b/packages/fast-usdc/src/cli/config-commands.js @@ -1,5 +1,14 @@ -import { Command } from 'commander'; - +/** + * @import {Command} from 'commander'; + * @import {File} from '../util/file.js'; + * @import * as ConfigHelpers from './config.js'; + */ +/** + * + * @param {Command} program + * @param {ConfigHelpers} configHelpers + * @param {() => File} makeConfigFile + */ export const addConfigCommands = (program, configHelpers, makeConfigFile) => { const config = program.command('config').description('Manage config'); diff --git a/packages/fast-usdc/src/cli/config.js b/packages/fast-usdc/src/cli/config.js index be11dad838d..2dd63fdad2d 100644 --- a/packages/fast-usdc/src/cli/config.js +++ b/packages/fast-usdc/src/cli/config.js @@ -15,10 +15,10 @@ import { stdin as input, stdout as output } from 'node:process'; }} ConfigOpts */ -/** @import { file } from '../util/file' */ +/** @import { File } from '../util/file' */ -const init = async ( - /** @type {file} */ configFile, +export const init = async ( + /** @type {File} */ configFile, /** @type {ConfigOpts} */ options, out = console, rl = readline.createInterface({ input, output }), @@ -52,8 +52,8 @@ const init = async ( await writeConfig(); }; -const update = async ( - /** @type {file} */ configFile, +export const update = async ( + /** @type {File} */ configFile, /** @type {Partial} */ options, out = console, ) => { @@ -83,7 +83,7 @@ const update = async ( await updateConfig({ ...JSON.parse(file), ...options }); }; -const show = async (/** @type {file} */ configFile, out = console) => { +export const show = async (/** @type {File} */ configFile, out = console) => { let contents; await null; try { @@ -97,5 +97,3 @@ const show = async (/** @type {file} */ configFile, out = console) => { out.log(`Config found at ${configFile.path}:`); out.log(contents); }; - -export default { init, update, show }; diff --git a/packages/fast-usdc/src/cli/transfer.js b/packages/fast-usdc/src/cli/transfer.js index fc6947181a2..f27004f5cc0 100644 --- a/packages/fast-usdc/src/cli/transfer.js +++ b/packages/fast-usdc/src/cli/transfer.js @@ -9,13 +9,13 @@ import { } from '../util/noble.js'; import { queryFastUSDCLocalChainAccount } from '../util/agoric.js'; -/** @import { file } from '../util/file' */ +/** @import { File } from '../util/file' */ /** @import { VStorage } from '@agoric/client-utils' */ /** @import { SigningStargateClient } from '@cosmjs/stargate' */ /** @import { JsonRpcProvider as ethProvider } from 'ethers' */ const transfer = async ( - /** @type {file} */ configFile, + /** @type {File} */ configFile, /** @type {string} */ amount, /** @type {string} */ destination, out = console, diff --git a/packages/fast-usdc/src/util/file.js b/packages/fast-usdc/src/util/file.js index a239988cf03..fd8134b420b 100644 --- a/packages/fast-usdc/src/util/file.js +++ b/packages/fast-usdc/src/util/file.js @@ -27,4 +27,4 @@ export const makeFile = ( return { read, write, exists, path }; }; -/** @typedef {ReturnType} file */ +/** @typedef {ReturnType} File */ diff --git a/packages/fast-usdc/test/cli/config.test.ts b/packages/fast-usdc/test/cli/config.test.ts index fd0dc7acad4..a592ceca73e 100644 --- a/packages/fast-usdc/test/cli/config.test.ts +++ b/packages/fast-usdc/test/cli/config.test.ts @@ -1,5 +1,5 @@ import test from 'ava'; -import config from '../../src/cli/config.js'; +import * as config from '../../src/cli/config.js'; import { mockOut, mockrl, mockFile } from '../../testing/mocks.js'; test('show reads the config file', async t => { From 36375fd2ecf41fc171133186969a29d872e8012b Mon Sep 17 00:00:00 2001 From: "Turadg Aleahmad (aider)" Date: Mon, 25 Nov 2024 20:13:53 -0800 Subject: [PATCH 063/174] feat: scaffold operator commands --- packages/fast-usdc/src/cli/cli.js | 2 ++ .../fast-usdc/src/cli/operator-commands.js | 34 ++++++++++++++++++ .../test/cli/snapshots/cli.test.ts.md | 1 + .../test/cli/snapshots/cli.test.ts.snap | Bin 1535 -> 1557 bytes 4 files changed, 37 insertions(+) create mode 100644 packages/fast-usdc/src/cli/operator-commands.js diff --git a/packages/fast-usdc/src/cli/cli.js b/packages/fast-usdc/src/cli/cli.js index 3cbd30b4661..56a74fbc25b 100644 --- a/packages/fast-usdc/src/cli/cli.js +++ b/packages/fast-usdc/src/cli/cli.js @@ -13,6 +13,7 @@ import { writeFile as writeAsync, } from 'node:fs/promises'; import { addConfigCommands } from './config-commands.js'; +import { addOperatorCommands } from './operator-commands.js'; import * as configLib from './config.js'; import transferLib from './transfer.js'; import { makeFile } from '../util/file.js'; @@ -55,6 +56,7 @@ export const initProgram = ( }; addConfigCommands(program, configHelpers, makeConfigFile); + addOperatorCommands(program); /** @param {string} value */ const parseDecimal = value => { diff --git a/packages/fast-usdc/src/cli/operator-commands.js b/packages/fast-usdc/src/cli/operator-commands.js new file mode 100644 index 00000000000..a7a8719d2b8 --- /dev/null +++ b/packages/fast-usdc/src/cli/operator-commands.js @@ -0,0 +1,34 @@ +/** + * @import {Command} from 'commander'; + */ + +/** + * @param {Command} program + */ +export const addOperatorCommands = program => { + const operator = program + .command('operator') + .description('Oracle operator commands'); + + operator + .command('accept') + .description('Accept invitation to be an operator') + .action(async options => { + const { requestId } = options; + console.error('TODO: Implement accept logic for request:', requestId); + }); + + operator + .command('attest') + .description('Attest to an observed Fast USDC transfer') + .requiredOption('--previousOfferId ', 'Offer id', String) + .action(async options => { + const { previousOfferId } = options; + console.error( + 'TODO: Implement attest logic for request:', + previousOfferId, + ); + }); + + return operator; +}; diff --git a/packages/fast-usdc/test/cli/snapshots/cli.test.ts.md b/packages/fast-usdc/test/cli/snapshots/cli.test.ts.md index 021b8a03a2e..ed8f08e0f82 100644 --- a/packages/fast-usdc/test/cli/snapshots/cli.test.ts.md +++ b/packages/fast-usdc/test/cli/snapshots/cli.test.ts.md @@ -20,6 +20,7 @@ Generated by [AVA](https://avajs.dev). ␊ Commands:␊ config Manage config␊ + operator Oracle operator commands␊ deposit [options] Offer assets to the liquidity pool␊ withdraw [options] Withdraw assets from the liquidity pool␊ transfer Transfer USDC from Ethereum/L2 to Cosmos via Fast␊ diff --git a/packages/fast-usdc/test/cli/snapshots/cli.test.ts.snap b/packages/fast-usdc/test/cli/snapshots/cli.test.ts.snap index 7f35de78c2acb2ab79293b7f221965bb140af8b2..2150beaaf1008567472a39ea2e1411ad7bedd15b 100644 GIT binary patch literal 1557 zcmV+w2I~1iRzV3h~XCGT;{y0t{og2#|qD7+g>l@I(O-qa;G6B$bTBGT=)7^49Z+ zB0p~Y@zL7tHQm-fUi)O@_l;9YMz{w)k*c0Z&xHYx73EBx!NBEFM3{HxIQ`=zP#h>z zD2S`lmEbXv3Qk`f_93LN6Y5cQ2{GrP?NcYVXYClOEdJ5CGQpGWFv6Qmm1S5vxU zQF^ybsj)Ei?6D)K3iC2ys^Qy0d!fI$i4e%tRg6+*g_<6RD*Z}Hm}5RCVS+j~lh`8) zi{nqTFOvhya-K){=5)eSe3h)Vi4N1$vM$WUjc3jqrUMBFIarFiLTu3TC4! zY-I-2IdT@|Vf#c`@Ef+-W!XOdh*_6=+^0&|XfXs_I zWopsfebqJtrQ*G4Erm@skiKA5mU z%p$^oICy?^-9+>Z1|66)X@ILh)LcBeMi{-${f5(J?rzKNwp+d7cGqortzGXvY2z*qn=Wp5n_V2<@6Eg3U$uFu_|EiHoaCv#A{pQM z%}U1aZdE1Y$ydY#KGH{2)p_^BPsQVIJ*+zIQX|Eu$CP*2s;|_~CvfMrlS<5g zTSxStYbD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@uuk-O`WetXpIkH~(9^gHd{UTe2M z>U4>V&R(n6Bi?Si+co^jflYI#=udhpN~cVGSqUU*jrzU){kGHVwELsop3`>Q`|dr` z!F?RH9Ng`-dN{h*pLbEeZu3&{m(x>mlBfEbWPIxnBN@NDRhNv*w+PFcdW)#d#6uxt z%Ep!Oy4g%zhwA@K{J~sUG7~SEK8smn^`y6YrutX;Wj$G8t;hNr4%Bs>cr}lY^bu8e z-u?J<@wnRz>Q1}VNb%`0S{@GK!s6o)r3@q*foNuky<=}kP1QB7-D># zP?a9?f-N+ZXc{?=`^(?}$}UJiU0rLcVu=haBaKB{vL_JIYY8+Mmo~ApdTc|jlbct3 zmGCy#YPYZ!9vjFHH1dfCu3e}U2&f-bv5 l)&M*)0N$?$SbcodV0^F&##AXa5Z5NRe*l7|-H(GD001wC@c94$ From 9bdba57d18672ef8d40b8a38cb54a082e1b89e50 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 25 Nov 2024 20:25:41 -0800 Subject: [PATCH 064/174] feat: fetchEnvNetworkConfig --- packages/agoric-cli/src/commands/auction.js | 7 ++- packages/agoric-cli/src/commands/gov.js | 5 +-- packages/agoric-cli/src/commands/inter.js | 7 ++- packages/agoric-cli/src/commands/oracle.js | 9 ++-- packages/agoric-cli/src/commands/perf.js | 4 +- packages/agoric-cli/src/commands/psm.js | 11 +++-- packages/agoric-cli/src/commands/reserve.js | 5 +-- .../agoric-cli/src/commands/test-upgrade.js | 7 ++- packages/agoric-cli/src/commands/vaults.js | 5 +-- packages/agoric-cli/src/commands/wallet.js | 9 ++-- packages/agoric-cli/src/helpers.js | 3 +- packages/agoric-cli/src/lib/network-config.js | 41 ----------------- packages/client-utils/src/cli.js | 20 +++++++++ packages/client-utils/src/main.js | 2 + packages/client-utils/src/network-config.js | 42 ++++++++++++++++++ packages/client-utils/src/rpc.js | 2 +- packages/client-utils/src/vstorage-kit.js | 2 +- packages/client-utils/src/vstorage.js | 2 +- packages/client-utils/src/wallet-utils.js | 2 +- .../test/snapshots/exports.test.js.md | 6 +++ .../test/snapshots/exports.test.js.snap | Bin 489 -> 584 bytes 21 files changed, 110 insertions(+), 81 deletions(-) delete mode 100644 packages/agoric-cli/src/lib/network-config.js create mode 100644 packages/client-utils/src/cli.js create mode 100644 packages/client-utils/src/network-config.js diff --git a/packages/agoric-cli/src/commands/auction.js b/packages/agoric-cli/src/commands/auction.js index 5746ce2263d..ac9306ffb45 100644 --- a/packages/agoric-cli/src/commands/auction.js +++ b/packages/agoric-cli/src/commands/auction.js @@ -1,17 +1,16 @@ // @ts-check /* eslint-env node */ -import { InvalidArgumentError } from 'commander'; +import { fetchEnvNetworkConfig, makeVstorageKit } from '@agoric/client-utils'; import { Fail } from '@endo/errors'; -import { makeVstorageKit } from '@agoric/client-utils'; +import { InvalidArgumentError } from 'commander'; import { outputActionAndHint } from '../lib/wallet.js'; -import { getNetworkConfig } from '../lib/network-config.js'; /** * @import {ParamTypesMap, ParamTypesMapFromRecord} from '@agoric/governance/src/contractGovernance/typedParamManager.js' * @import {ParamValueForType} from '@agoric/governance/src/types.js' */ -const networkConfig = await getNetworkConfig({ env: process.env, fetch }); +const networkConfig = await fetchEnvNetworkConfig({ env: process.env, fetch }); /** * @template {ParamTypesMap} M diff --git a/packages/agoric-cli/src/commands/gov.js b/packages/agoric-cli/src/commands/gov.js index f9611c75390..be116b87514 100644 --- a/packages/agoric-cli/src/commands/gov.js +++ b/packages/agoric-cli/src/commands/gov.js @@ -1,11 +1,10 @@ // @ts-check /* eslint-disable func-names */ /* eslint-env node */ -import { makeVstorageKit } from '@agoric/client-utils'; +import { fetchEnvNetworkConfig, makeVstorageKit } from '@agoric/client-utils'; import { execFileSync as execFileSyncAmbient } from 'child_process'; import { Command, CommanderError } from 'commander'; import { normalizeAddressWithOptions, pollBlocks } from '../lib/chain.js'; -import { getNetworkConfig } from '../lib/network-config.js'; import { findContinuingIds, getCurrent, @@ -26,7 +25,7 @@ const collectValues = (val, memo) => { const defaultKeyring = process.env.AGORIC_KEYRING_BACKEND || 'test'; -const networkConfig = await getNetworkConfig({ env: process.env, fetch }); +const networkConfig = await fetchEnvNetworkConfig({ env: process.env, fetch }); /** * @param {import('anylogger').Logger} _logger diff --git a/packages/agoric-cli/src/commands/inter.js b/packages/agoric-cli/src/commands/inter.js index 41e0d42eb05..013e1b9af0d 100644 --- a/packages/agoric-cli/src/commands/inter.js +++ b/packages/agoric-cli/src/commands/inter.js @@ -4,20 +4,19 @@ */ // @ts-check -import { makeWalletUtils } from '@agoric/client-utils'; +import { fetchEnvNetworkConfig, makeWalletUtils } from '@agoric/client-utils'; import { makeOfferSpecShape } from '@agoric/inter-protocol/src/auction/auctionBook.js'; import { Offers } from '@agoric/inter-protocol/src/clientSupport.js'; import { objectMap } from '@agoric/internal'; import { M, matches } from '@endo/patterns'; import { CommanderError, InvalidArgumentError } from 'commander'; import { normalizeAddressWithOptions, pollBlocks } from '../lib/chain.js'; -import { getCurrent, outputActionAndHint, sendAction } from '../lib/wallet.js'; import { asBoardRemote, bigintReplacer, makeAmountFormatter, } from '../lib/format.js'; -import { getNetworkConfig } from '../lib/network-config.js'; +import { getCurrent, outputActionAndHint, sendAction } from '../lib/wallet.js'; const { values } = Object; @@ -232,7 +231,7 @@ export const makeInterCommand = ( try { // XXX pass fetch to getNetworkConfig() explicitly // await null above makes this await safe - const networkConfig = await getNetworkConfig({ env, fetch }); + const networkConfig = await fetchEnvNetworkConfig({ env, fetch }); return makeWalletUtils({ fetch, delay }, networkConfig); } catch (err) { // CommanderError is a class constructor, and so diff --git a/packages/agoric-cli/src/commands/oracle.js b/packages/agoric-cli/src/commands/oracle.js index 9eaf3f9de52..9b72a1f8595 100644 --- a/packages/agoric-cli/src/commands/oracle.js +++ b/packages/agoric-cli/src/commands/oracle.js @@ -2,6 +2,7 @@ /* eslint-disable func-names */ /* eslint-env node */ import { + fetchEnvNetworkConfig, makeVstorageKit, makeWalletUtils, storageHelper, @@ -14,14 +15,13 @@ import * as cp from 'child_process'; import { Command } from 'commander'; import { inspect } from 'util'; import { normalizeAddressWithOptions } from '../lib/chain.js'; -import { getNetworkConfig } from '../lib/network-config.js'; +import { bigintReplacer } from '../lib/format.js'; import { getCurrent, outputAction, sendAction, sendHint, } from '../lib/wallet.js'; -import { bigintReplacer } from '../lib/format.js'; /** @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js'; */ @@ -86,7 +86,10 @@ export const makeOracleCommand = (logger, io = {}) => { const rpcTools = async () => { // XXX pass fetch to getNetworkConfig() explicitly - const networkConfig = await getNetworkConfig({ env: process.env, fetch }); + const networkConfig = await fetchEnvNetworkConfig({ + env: process.env, + fetch, + }); const utils = await makeVstorageKit({ fetch }, networkConfig); const lookupPriceAggregatorInstance = ([brandIn, brandOut]) => { diff --git a/packages/agoric-cli/src/commands/perf.js b/packages/agoric-cli/src/commands/perf.js index ef4ee2b531e..957561cad61 100644 --- a/packages/agoric-cli/src/commands/perf.js +++ b/packages/agoric-cli/src/commands/perf.js @@ -7,6 +7,7 @@ import { makeFollower, makeLeaderFromRpcAddresses, } from '@agoric/casting'; +import { fetchEnvNetworkConfig } from '@agoric/client-utils'; import { slotToRemotable } from '@agoric/internal/src/storage-test-utils.js'; import { boardSlottingMarshaller } from '@agoric/vats/tools/board-utils.js'; import { Command } from 'commander'; @@ -17,12 +18,11 @@ import { execSwingsetTransaction, normalizeAddressWithOptions, } from '../lib/chain.js'; -import { getNetworkConfig } from '../lib/network-config.js'; // tight for perf testing but less than this tends to hang. const SLEEP_SECONDS = 0.1; -const networkConfig = await getNetworkConfig({ env: process.env, fetch }); +const networkConfig = await fetchEnvNetworkConfig({ env: process.env, fetch }); /** * @param {import('anylogger').Logger} logger diff --git a/packages/agoric-cli/src/commands/psm.js b/packages/agoric-cli/src/commands/psm.js index 3a601db299a..a59a8b81639 100644 --- a/packages/agoric-cli/src/commands/psm.js +++ b/packages/agoric-cli/src/commands/psm.js @@ -1,14 +1,17 @@ // @ts-check /* eslint-disable func-names */ /* eslint-env node */ -import { makeVstorageKit, storageHelper } from '@agoric/client-utils'; +import { + fetchEnvNetworkConfig, + makeVstorageKit, + storageHelper, +} from '@agoric/client-utils'; import { Offers } from '@agoric/inter-protocol/src/clientSupport.js'; import { Command } from 'commander'; -import { getNetworkConfig } from '../lib/network-config.js'; -import { outputExecuteOfferAction } from '../lib/wallet.js'; import { asPercent } from '../lib/format.js'; +import { outputExecuteOfferAction } from '../lib/wallet.js'; -const networkConfig = await getNetworkConfig({ env: process.env, fetch }); +const networkConfig = await fetchEnvNetworkConfig({ env: process.env, fetch }); // Adapted from https://gist.github.com/dckc/8b5b2f16395cb4d7f2ff340e0bc6b610#file-psm-tool diff --git a/packages/agoric-cli/src/commands/reserve.js b/packages/agoric-cli/src/commands/reserve.js index 7c709d0d27f..eebb6c7d73d 100644 --- a/packages/agoric-cli/src/commands/reserve.js +++ b/packages/agoric-cli/src/commands/reserve.js @@ -1,13 +1,12 @@ // @ts-check /* eslint-disable func-names */ /* eslint-env node */ -import { makeVstorageKit } from '@agoric/client-utils'; +import { fetchEnvNetworkConfig, makeVstorageKit } from '@agoric/client-utils'; import { Offers } from '@agoric/inter-protocol/src/clientSupport.js'; import { Command } from 'commander'; -import { getNetworkConfig } from '../lib/network-config.js'; import { outputActionAndHint } from '../lib/wallet.js'; -const networkConfig = await getNetworkConfig({ env: process.env, fetch }); +const networkConfig = await fetchEnvNetworkConfig({ env: process.env, fetch }); /** * @param {import('anylogger').Logger} _logger diff --git a/packages/agoric-cli/src/commands/test-upgrade.js b/packages/agoric-cli/src/commands/test-upgrade.js index b9dd5d6e76d..328f019bd6e 100644 --- a/packages/agoric-cli/src/commands/test-upgrade.js +++ b/packages/agoric-cli/src/commands/test-upgrade.js @@ -1,12 +1,11 @@ // @ts-check /* eslint-env node */ -import { makeWalletUtils } from '@agoric/client-utils'; +import { fetchEnvNetworkConfig, makeWalletUtils } from '@agoric/client-utils'; import { Fail } from '@endo/errors'; import { CommanderError } from 'commander'; import { normalizeAddressWithOptions } from '../lib/chain.js'; -import { getNetworkConfig } from '../lib/network-config.js'; -import { sendAction } from '../lib/wallet.js'; import { bigintReplacer } from '../lib/format.js'; +import { sendAction } from '../lib/wallet.js'; /** * Make commands for testing. @@ -39,7 +38,7 @@ export const makeTestCommand = ( try { // XXX pass fetch to getNetworkConfig() explicitly // await null above makes this await safe - const networkConfig = await getNetworkConfig({ env, fetch }); + const networkConfig = await fetchEnvNetworkConfig({ env, fetch }); return makeWalletUtils({ fetch, delay }, networkConfig); } catch (err) { // CommanderError is a class constructor, and so diff --git a/packages/agoric-cli/src/commands/vaults.js b/packages/agoric-cli/src/commands/vaults.js index 8d47ba9a3c2..51032d89482 100644 --- a/packages/agoric-cli/src/commands/vaults.js +++ b/packages/agoric-cli/src/commands/vaults.js @@ -1,7 +1,7 @@ // @ts-check /* eslint-disable func-names */ /* eslint-env node */ -import { makeVstorageKit } from '@agoric/client-utils'; +import { fetchEnvNetworkConfig, makeVstorageKit } from '@agoric/client-utils'; import { lookupOfferIdForVault, Offers, @@ -9,9 +9,8 @@ import { import { Command } from 'commander'; import { normalizeAddressWithOptions } from '../lib/chain.js'; import { getCurrent, outputExecuteOfferAction } from '../lib/wallet.js'; -import { getNetworkConfig } from '../lib/network-config.js'; -const networkConfig = await getNetworkConfig({ env: process.env, fetch }); +const networkConfig = await fetchEnvNetworkConfig({ env: process.env, fetch }); /** * @param {import('anylogger').Logger} logger diff --git a/packages/agoric-cli/src/commands/wallet.js b/packages/agoric-cli/src/commands/wallet.js index d6747b43dc0..e41258716d4 100644 --- a/packages/agoric-cli/src/commands/wallet.js +++ b/packages/agoric-cli/src/commands/wallet.js @@ -8,7 +8,7 @@ import { makeLeader, makeLeaderFromRpcAddresses, } from '@agoric/casting'; -import { makeVstorageKit } from '@agoric/client-utils'; +import { makeVstorageKit, fetchEnvNetworkConfig } from '@agoric/client-utils'; import { execFileSync } from 'child_process'; import fs from 'fs'; import util from 'util'; @@ -19,15 +19,14 @@ import { fetchSwingsetParams, normalizeAddressWithOptions, } from '../lib/chain.js'; -import { getNetworkConfig } from '../lib/network-config.js'; -import { coalesceWalletState, getCurrent } from '../lib/wallet.js'; import { - summarize, fmtRecordOfLines, parseFiniteNumber, + summarize, } from '../lib/format.js'; +import { coalesceWalletState, getCurrent } from '../lib/wallet.js'; -const networkConfig = await getNetworkConfig({ env: process.env, fetch }); +const networkConfig = await fetchEnvNetworkConfig({ env: process.env, fetch }); const SLEEP_SECONDS = 3; diff --git a/packages/agoric-cli/src/helpers.js b/packages/agoric-cli/src/helpers.js index 37183a0ba35..444e8a4fe4d 100644 --- a/packages/agoric-cli/src/helpers.js +++ b/packages/agoric-cli/src/helpers.js @@ -3,7 +3,8 @@ /** @import { ChildProcess } from 'child_process' */ -export { getNetworkConfig } from './lib/network-config.js'; +// Backwards compatibility +export { fetchEnvNetworkConfig as getNetworkConfig } from '@agoric/client-utils'; export const getSDKBinaries = ({ jsPfx = '../..', diff --git a/packages/agoric-cli/src/lib/network-config.js b/packages/agoric-cli/src/lib/network-config.js deleted file mode 100644 index 8fae9b51f2d..00000000000 --- a/packages/agoric-cli/src/lib/network-config.js +++ /dev/null @@ -1,41 +0,0 @@ -import { NonNullish } from '@agoric/internal'; - -/** - * @import {MinimalNetworkConfig} from '@agoric/client-utils'; - */ - -export const networkConfigUrl = agoricNetSubdomain => - `https://${agoricNetSubdomain}.agoric.net/network-config`; -export const rpcUrl = agoricNetSubdomain => - `https://${agoricNetSubdomain}.rpc.agoric.net:443`; - -/** - * @param {string} str - * @param {{ fetch: typeof fetch }} io - * @returns {Promise} - */ -const fromAgoricNet = (str, { fetch }) => { - const [netName, chainName] = str.split(','); - if (chainName) { - return Promise.resolve({ chainName, rpcAddrs: [rpcUrl(netName)] }); - } - return fetch(networkConfigUrl(netName)).then(res => res.json()); -}; - -/** - * @param {{ env: typeof process.env, fetch: typeof fetch }} io - * @returns {Promise} - */ -export const getNetworkConfig = async ({ env, fetch }) => { - if (!('AGORIC_NET' in env) || env.AGORIC_NET === 'local') { - return { rpcAddrs: ['http://0.0.0.0:26657'], chainName: 'agoriclocal' }; - } - - return fromAgoricNet(NonNullish(env.AGORIC_NET), { fetch }).catch(err => { - throw Error( - `cannot get network config (${env.AGORIC_NET || 'local'}): ${ - err.message - }`, - ); - }); -}; diff --git a/packages/client-utils/src/cli.js b/packages/client-utils/src/cli.js new file mode 100644 index 00000000000..f59c5a31e5a --- /dev/null +++ b/packages/client-utils/src/cli.js @@ -0,0 +1,20 @@ +import { LOCAL_CONFIG_KEY, fetchNetworkConfig } from './network-config.js'; + +/** + * @import {MinimalNetworkConfig} from './network-config.js'; + */ + +/** + * Fetch the network config for the AGORIC_NET environment variable. + * + * If none is set or it's 'local', return a local chain config. + * + * @param {{ env: typeof process.env, fetch: typeof fetch }} io + * @returns {Promise} + */ + +export const fetchEnvNetworkConfig = async ({ env, fetch }) => { + const net = env.AGORIC_NET || LOCAL_CONFIG_KEY; + + return fetchNetworkConfig(net, { fetch }); +}; diff --git a/packages/client-utils/src/main.js b/packages/client-utils/src/main.js index be9b4869eb8..fad3e63225e 100644 --- a/packages/client-utils/src/main.js +++ b/packages/client-utils/src/main.js @@ -1,3 +1,5 @@ +export * from './cli.js'; +export * from './network-config.js'; export * from './rpc.js'; export * from './sync-tools.js'; export * from './vstorage.js'; diff --git a/packages/client-utils/src/network-config.js b/packages/client-utils/src/network-config.js new file mode 100644 index 00000000000..0d56fb4aa7e --- /dev/null +++ b/packages/client-utils/src/network-config.js @@ -0,0 +1,42 @@ +/** + * @typedef {{ rpcAddrs: string[], chainName: string }} MinimalNetworkConfig + */ + +export const toNetworkConfigUrl = agoricNetSubdomain => + `https://${agoricNetSubdomain}.agoric.net/network-config`; + +export const toRpcUrl = agoricNetSubdomain => + `https://${agoricNetSubdomain}.rpc.agoric.net:443`; + +/** @satisfies {MinimalNetworkConfig} */ +export const LOCAL_CONFIG = { + rpcAddrs: ['http://0.0.0.0:26657'], + chainName: 'agoriclocal', +}; + +export const LOCAL_CONFIG_KEY = 'local'; + +/** + * Fetches the network config for the given network specifier. + * + * @param {string} spec + * @param {{ fetch: typeof fetch }} io + * @returns {Promise} + */ +export const fetchNetworkConfig = async (spec, { fetch }) => { + const [netName, chainName] = spec.split(','); + + if (netName === LOCAL_CONFIG_KEY) { + return LOCAL_CONFIG; + } + + if (chainName) { + return { chainName, rpcAddrs: [toRpcUrl(netName)] }; + } + + return fetch(toNetworkConfigUrl(netName)) + .then(res => res.json()) + .catch(err => { + throw Error(`cannot get network config (${spec}): ${err.message}`); + }); +}; diff --git a/packages/client-utils/src/rpc.js b/packages/client-utils/src/rpc.js index 7ca6330b0d7..9e1bb03dafb 100644 --- a/packages/client-utils/src/rpc.js +++ b/packages/client-utils/src/rpc.js @@ -3,7 +3,7 @@ import { StargateClient } from '@cosmjs/stargate'; import { Tendermint34Client } from '@cosmjs/tendermint-rpc'; /** - * @typedef {{ rpcAddrs: string[], chainName: string }} MinimalNetworkConfig + * @import {MinimalNetworkConfig} from './network-config.js'; */ // TODO distribute load diff --git a/packages/client-utils/src/vstorage-kit.js b/packages/client-utils/src/vstorage-kit.js index 74598d82914..bca8d7b074e 100644 --- a/packages/client-utils/src/vstorage-kit.js +++ b/packages/client-utils/src/vstorage-kit.js @@ -7,7 +7,7 @@ import { makeVStorage } from './vstorage.js'; export { boardSlottingMarshaller }; /** - * @import {MinimalNetworkConfig} from './rpc.js'; + * @import {MinimalNetworkConfig} from './network-config.js'; * @import {TypedPublished} from './types.js'; * @import {VStorage} from './vstorage.js'; */ diff --git a/packages/client-utils/src/vstorage.js b/packages/client-utils/src/vstorage.js index 45afd4d8590..b8eec61330e 100644 --- a/packages/client-utils/src/vstorage.js +++ b/packages/client-utils/src/vstorage.js @@ -1,7 +1,7 @@ /* global Buffer */ /** - * @import {MinimalNetworkConfig} from './rpc.js'; + * @import {MinimalNetworkConfig} from './network-config.js'; */ /** diff --git a/packages/client-utils/src/wallet-utils.js b/packages/client-utils/src/wallet-utils.js index cee34f6aa90..2cd63a1498d 100644 --- a/packages/client-utils/src/wallet-utils.js +++ b/packages/client-utils/src/wallet-utils.js @@ -6,7 +6,7 @@ import { boardSlottingMarshaller, makeVstorageKit } from './vstorage-kit.js'; /** * @import {Amount, Brand} from '@agoric/ertp/src/types.js' * @import {CurrentWalletRecord, UpdateRecord} from '@agoric/smart-wallet/src/smartWallet.js'; - * @import {MinimalNetworkConfig} from './rpc.js'; + * @import {MinimalNetworkConfig} from './network-config.js'; */ // XXX this is really a SmartWalletKit diff --git a/packages/client-utils/test/snapshots/exports.test.js.md b/packages/client-utils/test/snapshots/exports.test.js.md index 7ff15cea05e..22f45e43b82 100644 --- a/packages/client-utils/test/snapshots/exports.test.js.md +++ b/packages/client-utils/test/snapshots/exports.test.js.md @@ -9,7 +9,11 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 [ + 'LOCAL_CONFIG', + 'LOCAL_CONFIG_KEY', 'boardSlottingMarshaller', + 'fetchEnvNetworkConfig', + 'fetchNetworkConfig', 'makeAgoricNames', 'makeFromBoard', 'makeStargateClient', @@ -21,6 +25,8 @@ Generated by [AVA](https://avajs.dev). 'retryUntilCondition', 'sleep', 'storageHelper', + 'toNetworkConfigUrl', + 'toRpcUrl', 'waitUntilAccountFunded', 'waitUntilContractDeployed', 'waitUntilElectionResult', diff --git a/packages/client-utils/test/snapshots/exports.test.js.snap b/packages/client-utils/test/snapshots/exports.test.js.snap index f995fc8c424bd77a5bd2e4529824dcf8f0a565a6..c6c052973b55a0c534312dd6feb121c4e29772d8 100644 GIT binary patch literal 584 zcmV-O0=NA^RzVzzwbyJN=lk0ZK)6+fe9q$a3oNrBvM0)Iu+;6 zNv$~c$@h{rV9Q2imN7?+dAW2FH zsS|M_GtJZN%uqJJOcGA~B>Wj-9r?qGZ2tp*PXN9FxB~D8z#|6K8PI3IoB>}LaK(V% z3@8P_;{a#{KpFt=1K?`_{0M+w0ZrVu+^SqIgKdC4 z04t%&0@PRtR;aMjVJE5|o<^N^^Wf!8$e2sFZl|ZM#)%Vw6MKEbZPHbSNb2EhZnHD4 zl&}tl4(<#D#b*sYZ3{X#b`%*skVD7rIJSMw{%H!%l*fD|>O*5?+~#AEIk4uyW)7Ox zjGyPtxp>{z$m1??JLDuHC50wuiq7oj=8e#auw$v|$Gjwj7JTfq(&~QZ@RQ<1=(3olT?w>i6m*XL-!pjWJ-wC zy)OG9-L&;esC0Q>TYgAnR&JqZl`|D*ie!$`_*Sy*$9K*pUH4UwV>8jzoajXOtEf7+ z?_FdxSsv31kt#D=(whI%JZ&fu=O;Z9*+luF>^S()!vj5)#1}Lca=P4g*WsGSoxwoZ W#)YJ%+WU`M6#fgE`*l_W1ONbY!4nSv literal 489 zcmV7&4$mT$e$G|o#VGt8wpAsc4k zcw$VTjUS5$00000000AZ(Xnn5K@bMuf7Un&!QpTm1tH!5N_YWd90egjiW4Ks&E42p zdA)nu8=JU7X?X~wP*Ly>JOK?4K*d8)Mu)R|a=}%r`@fr=nY*5xTc6LWtFJ6ZEVFS1 zUz*D4vbyk6U0oN27X3l}ZDAYrLp#(f0W1N00q_IBZvcvbCj=Z5Uo3iz&oUkd2aR+rlS5cG;Dp0X?h?Sl3}9rQ@yfLfq-mmZ#b9g30lBF0VM z=ull~YdPFHq6o9Oo^gNbgUR3OIad*=2=;1l6#V=}T`|V381L8dNOYKL;ej>mB$_+X z9MDtkCYBwH<4|>Wm-P-7MT&>gBCVjrW0p8bR%9$9OM%hXAOOwxr zt|+}}ZoeDTUSJ8UGbhFlyeo_t?;_fbs9jm+GQPf-mUP?JG260Pawjd|qc-xdazD@g z!pYIX6`Yp27u}=e2Hr`~xxD1k`c*^kryrc?&~je)dcxJhrm?aJA1C Date: Mon, 25 Nov 2024 20:50:38 -0800 Subject: [PATCH 065/174] feat: operator accept cmd --- packages/fast-usdc/src/cli/bridge-action.js | 32 ++++++++++++ .../fast-usdc/src/cli/operator-commands.js | 50 +++++++++++++++++-- 2 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 packages/fast-usdc/src/cli/bridge-action.js diff --git a/packages/fast-usdc/src/cli/bridge-action.js b/packages/fast-usdc/src/cli/bridge-action.js new file mode 100644 index 00000000000..582028f23bf --- /dev/null +++ b/packages/fast-usdc/src/cli/bridge-action.js @@ -0,0 +1,32 @@ +import { boardSlottingMarshaller } from '@agoric/client-utils'; + +/** + * @import {BridgeAction} from '@agoric/smart-wallet/src/smartWallet.js'; + */ + +const marshaller = boardSlottingMarshaller(); + +/** + * @param {BridgeAction} bridgeAction + * @param {Pick} stdout + */ +const outputAction = (bridgeAction, stdout) => { + const capData = marshaller.toCapData(harden(bridgeAction)); + stdout.write(JSON.stringify(capData)); + stdout.write('\n'); +}; + +export const sendHint = + 'Now use `agoric wallet send ...` to sign and broadcast the offer.\n'; + +/** + * @param {BridgeAction} bridgeAction + * @param {{ + * stdout: Pick, + * stderr: Pick, + * }} io + */ +export const outputActionAndHint = (bridgeAction, { stdout, stderr }) => { + outputAction(bridgeAction, stdout); + stderr.write(sendHint); +}; diff --git a/packages/fast-usdc/src/cli/operator-commands.js b/packages/fast-usdc/src/cli/operator-commands.js index a7a8719d2b8..3542bdcf074 100644 --- a/packages/fast-usdc/src/cli/operator-commands.js +++ b/packages/fast-usdc/src/cli/operator-commands.js @@ -1,7 +1,14 @@ +/* eslint-env node */ /** * @import {Command} from 'commander'; + * @import {OfferSpec} from '@agoric/smart-wallet/src/offers.js'; + * @import {ExecuteOfferAction} from '@agoric/smart-wallet/src/smartWallet.js'; */ +import { fetchEnvNetworkConfig, makeVstorageKit } from '@agoric/client-utils'; +import { INVITATION_MAKERS_DESC } from '../exos/transaction-feed.js'; +import { outputActionAndHint } from './bridge-action.js'; + /** * @param {Command} program */ @@ -13,9 +20,46 @@ export const addOperatorCommands = program => { operator .command('accept') .description('Accept invitation to be an operator') - .action(async options => { - const { requestId } = options; - console.error('TODO: Implement accept logic for request:', requestId); + .addHelpText( + 'after', + '\nPipe the STDOUT to a file such as accept.json, then use the Agoric CLI to broadcast it:\n agoric wallet send --offer accept.json --from gov1 --keyring-backend="test"', + ) + .option( + '--offerId ', + 'Offer id', + String, + `operatorAccept-${Date.now()}`, + ) + .action(async opts => { + const networkConfig = await fetchEnvNetworkConfig({ + env: process.env, + fetch, + }); + const vsk = await makeVstorageKit({ fetch }, networkConfig); + const instance = vsk.agoricNames.instance.fastUsdc; + assert(instance, 'fastUsdc instance not in agoricNames'); + + /** @type {OfferSpec} */ + const offer = { + id: opts.offerId, + invitationSpec: { + source: 'purse', + instance, + description: INVITATION_MAKERS_DESC, + }, + proposal: {}, + }; + + /** @type {ExecuteOfferAction} */ + const bridgeAction = { + method: 'executeOffer', + offer, + }; + + outputActionAndHint(bridgeAction, { + stderr: process.stderr, + stdout: process.stdout, + }); }); operator From 18a82194431cfd94b3f02c4c64dc53891186accf Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 25 Nov 2024 20:59:17 -0800 Subject: [PATCH 066/174] test: fast-usdc CLI --- a3p-integration/proposals/f:fast-usdc/test-cli.sh | 15 +++++++++++++++ a3p-integration/proposals/f:fast-usdc/test.sh | 3 +++ 2 files changed, 18 insertions(+) create mode 100755 a3p-integration/proposals/f:fast-usdc/test-cli.sh diff --git a/a3p-integration/proposals/f:fast-usdc/test-cli.sh b/a3p-integration/proposals/f:fast-usdc/test-cli.sh new file mode 100755 index 00000000000..eb7bbc315ee --- /dev/null +++ b/a3p-integration/proposals/f:fast-usdc/test-cli.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# FIXME these commands are run against the `@agoric/fast-usdc` pulled from NPM +# but should be run against the local SDK. The `yarn link` command described in +# a3p-integration/README.md is supposed to make that work but it's not working. + +yarn @agoric/fast-usdc operator accept >| accept.json +cat accept.json +yarn agoric wallet send --offer accept.json --from gov1 --keyring-backend="test" +ACCEPT_OFFER_ID=$(agoric wallet extract-id --offer accept.json) + +# FIXME attest something +yarn @agoric/fast-usdc operator attest --previousOfferId "$ACCEPT_OFFER_ID" >| attest.json +cat attest.json +yarn agoric wallet send --offer attest.json --from gov1 --keyring-backend="test" diff --git a/a3p-integration/proposals/f:fast-usdc/test.sh b/a3p-integration/proposals/f:fast-usdc/test.sh index ff669d07327..eb9d0be8634 100755 --- a/a3p-integration/proposals/f:fast-usdc/test.sh +++ b/a3p-integration/proposals/f:fast-usdc/test.sh @@ -1,2 +1,5 @@ #!/bin/bash yarn ava + +# TODO get CLI test passing and part of CI +./test-cli.sh || echo "CLI test failed" From 419df4ee7ce03499f30e7327c74e95a338201023 Mon Sep 17 00:00:00 2001 From: Samuel Siegart Date: Wed, 27 Nov 2024 10:02:01 -0800 Subject: [PATCH 067/174] feat(fast-usdc): write status updates to vstorage (#10552) closes https://github.com/Agoric/agoric-sdk/issues/10508 --- .../boot/test/fast-usdc/fast-usdc.test.ts | 30 ++++ .../fast-usdc/snapshots/fast-usdc.test.ts.md | 18 +++ .../snapshots/fast-usdc.test.ts.snap | Bin 585 -> 806 bytes packages/fast-usdc/src/exos/settler.js | 6 +- packages/fast-usdc/src/exos/status-manager.js | 57 +++++-- packages/fast-usdc/src/fast-usdc.contract.js | 6 +- packages/fast-usdc/test/exos/advancer.test.ts | 4 +- packages/fast-usdc/test/exos/settler.test.ts | 37 +++-- .../test/exos/status-manager.test.ts | 148 ++++++++++++++---- 9 files changed, 244 insertions(+), 62 deletions(-) diff --git a/packages/boot/test/fast-usdc/fast-usdc.test.ts b/packages/boot/test/fast-usdc/fast-usdc.test.ts index 0c45352247f..c75205d5cb4 100644 --- a/packages/boot/test/fast-usdc/fast-usdc.test.ts +++ b/packages/boot/test/fast-usdc/fast-usdc.test.ts @@ -2,6 +2,8 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import type { TestFn } from 'ava'; import type { FastUSDCKit } from '@agoric/fast-usdc/src/fast-usdc.start.js'; +import type { CctpTxEvidence } from '@agoric/fast-usdc/src/types.js'; +import { MockCctpTxEvidences } from '@agoric/fast-usdc/test/fixtures.js'; import { documentStorageSchema } from '@agoric/governance/tools/storageDoc.js'; import { Fail } from '@endo/errors'; import { unmarshalFromVstorage } from '@agoric/internal/src/marshal.js'; @@ -115,6 +117,34 @@ test.serial('writes feed policy to vstorage', async t => { await documentStorageSchema(t, storage, doc); }); +test.serial('writes status updates to vstorage', async t => { + const { walletFactoryDriver: wd, storage } = t.context; + const wallet = await wd.provideSmartWallet( + 'agoric144rrhh4m09mh7aaffhm6xy223ym76gve2x7y78', + ); + const submitMockEvidence = (mockEvidence: CctpTxEvidence) => + wallet.sendOffer({ + id: 'submit-mock-evidence', + invitationSpec: { + source: 'agoricContract', + instancePath: ['fastUsdc'], + callPipe: [['makeTestPushInvitation', [mockEvidence]]], + }, + proposal: {}, + }); + const mockEvidence1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); + const mockEvidence2 = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); + + await submitMockEvidence(mockEvidence1); + await submitMockEvidence(mockEvidence2); + + const doc = { + node: `fastUsdc.status`, + owner: `the statuses of fast USDC transfers identified by their tx hashes`, + }; + await documentStorageSchema(t, storage, doc); +}); + test.serial('restart contract', async t => { const { EV } = t.context.runUtils; await null; diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md index 344b11a78a3..fb98a2008c2 100644 --- a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md +++ b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md @@ -17,3 +17,21 @@ Generated by [AVA](https://avajs.dev). '{"blockHeight":"0","values":["{\\"chainPolicies\\":{\\"Arbitrum\\":{\\"cctpTokenMessengerAddress\\":\\"0x19330d10D9Cc8751218eaf51E8885D058642E08A\\",\\"chainId\\":42161,\\"confirmations\\":2,\\"nobleContractAddress\\":\\"0x19330d10D9Cc8751218eaf51E8885D058642E08A\\"}},\\"nobleAgoricChannelId\\":\\"channel-21\\",\\"nobleDomainId\\":4}"]}', ], ] + +## writes status updates to vstorage + +> Under "published", the "fastUsdc.status" node is delegated to the statuses of fast USDC transfers identified by their tx hashes. +> The example below illustrates the schema of the data published there. +> +> See also board marshalling conventions (_to appear_). + + [ + [ + 'published.fastUsdc.status.0xc81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761702', + '{"blockHeight":"0","values":["OBSERVED"]}', + ], + [ + 'published.fastUsdc.status.0xd81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761799', + '{"blockHeight":"0","values":["OBSERVED"]}', + ], + ] diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap index bcd15339a6b1f84c45e0c80d3a028594068b77c9..9282a421d07b53e46e7250e0c04444c0fb5ddd81 100644 GIT binary patch literal 806 zcmV+>1KIpRRzVU|_VzjtM! ztvK?p-(yfg{$8U)?0v#?J8*LeBoSx3__80UTdvSg+3x9-ja{LFTg=xpAwvDk9-;XWy+<=cHkU<&+WEao$WN9S*OHa#f?GTHgAnIv-?Th`f7C(J3n`~V$WBod4YQQ&!Lg% zC_BG;)}x_9%0BS|j2bJEDo-V9obiCNNmC=Ap+Uzr8t(fVg({U;$4)gNw64`Y z=04EFgUMbS%l_803Mnr6yw*qy)b=G+S}%NXyoqj8;YEdWPHoxFnxN8izs-`v{?^t3 zBIVj!T3GHRopa|auC+2VDy%t1(>?;d`yyD%>l(Rxaj$;{%AE};KJc*cbWzK7^GjLz z>p!e?BLK(%;NexgbXs1Xt_yDv5}J{;d%OjJ4*>8jxeT4_r2CWr{6YXeUJ!P#WNi8g z#@2`KM@x~%g~;M4EwYFwgB>vxX~ac5%;O9TA=5OAzNrt+=ny|G(_~3$P&a^lkQo(8)F%Xq((iXR1LV9fxI!uM?*mlZ&xa+C!m`sMY&wDIX$oM}lz?rcUnet4c z#u5U`=%xrS(Vzp(z)04tVc*v%RH4MZ?Nl_Obq)3-_`ojCX4A%&{myxX4A-!zHL@JF zy<$r1r4J6GbtA)z3Kzg^(L~Xx>``w_IqY{jXNU~6w=B2dBwK*<6= { return `seenTx:${JSON.stringify([txHash, chainId])}`; }; +/** + * @typedef {{ + * log?: LogFn; + * }} StatusManagerPowers + */ + /** * The `StatusManager` keeps track of Pending and Seen Transactions * via {@link PendingTxStatus} states, aiding in coordination between the `Advancer` @@ -61,8 +68,16 @@ const seenTxKeyOf = evidence => { * XXX consider separate facets for `Advancing` and `Settling` capabilities. * * @param {Zone} zone + * @param {() => Promise} makeStatusNode + * @param {StatusManagerPowers} caps */ -export const prepareStatusManager = zone => { +export const prepareStatusManager = ( + zone, + makeStatusNode, + { + log = makeTracer('Advancer', true), + } = /** @type {StatusManagerPowers} */ ({}), +) => { /** @type {MapStore} */ const pendingTxs = zone.mapStore('PendingTxs', { keyShape: M.string(), @@ -74,6 +89,17 @@ export const prepareStatusManager = zone => { keyShape: M.string(), }); + /** + * @param {CctpTxEvidence['txHash']} hash + * @param {TxStatus} status + */ + const recordStatus = (hash, status) => { + const statusNodeP = makeStatusNode(); + const txnNodeP = E(statusNodeP).makeChildNode(hash); + // Don't await, just writing to vstorage. + void E(txnNodeP).setValue(status); + }; + /** * Ensures that `txHash+chainId` has not been processed * and adds entry to `seenTxs` set. @@ -95,6 +121,7 @@ export const prepareStatusManager = zone => { pendingTxKeyOf(evidence), harden({ ...evidence, status }), ); + recordStatus(evidence.txHash, status); }; return zone.exo( @@ -118,9 +145,7 @@ export const prepareStatusManager = zone => { M.undefined(), ), ), - disbursed: M.call(EvmHashShape, M.string(), M.nat()).returns( - M.undefined(), - ), + disbursed: M.call(EvmHashShape).returns(M.undefined()), forwarded: M.call(M.opt(EvmHashShape), M.string(), M.nat()).returns( M.undefined(), ), @@ -163,6 +188,7 @@ export const prepareStatusManager = zone => { : PendingTxStatus.AdvanceFailed; const txpost = { ...tx, status }; pendingTxs.set(key, harden([...prefix, txpost, ...suffix])); + recordStatus(tx.txHash, status); }, /** @@ -219,12 +245,9 @@ export const prepareStatusManager = zone => { * Mark a transaction as `DISBURSED` * * @param {EvmHash} txHash - * @param {NobleAddress} address - * @param {bigint} amount */ - disbursed(txHash, address, amount) { - // TODO: store txHash -> evidence for txs pending settlement? - console.log('TODO: vstorage update', { txHash, address, amount }); + disbursed(txHash) { + recordStatus(txHash, TxStatus.Disbursed); }, /** @@ -235,8 +258,14 @@ export const prepareStatusManager = zone => { * @param {bigint} amount */ forwarded(txHash, address, amount) { - // TODO: store txHash -> evidence for txs pending settlement? - console.log('TODO: vstorage update', { txHash, address, amount }); + if (txHash) { + recordStatus(txHash, TxStatus.Forwarded); + } else { + // TODO store (early) `Minted` transactions to check against incoming evidence + log( + `⚠️ Forwarded minted amount ${amount} from account ${address} before it was observed.`, + ); + } }, /** diff --git a/packages/fast-usdc/src/fast-usdc.contract.js b/packages/fast-usdc/src/fast-usdc.contract.js index 50dd0de2f18..0863dcdc210 100644 --- a/packages/fast-usdc/src/fast-usdc.contract.js +++ b/packages/fast-usdc/src/fast-usdc.contract.js @@ -29,6 +29,8 @@ import * as flows from './fast-usdc.flows.js'; const trace = makeTracer('FastUsdc'); +const STATUS_NODE = 'status'; + /** * @import {HostInterface} from '@agoric/async-flow'; * @import {CosmosChainInfo, Denom, DenomDetail, OrchestrationAccount} from '@agoric/orchestration'; @@ -84,7 +86,9 @@ export const contract = async (zcf, privateArgs, zone, tools) => { marshaller, ); - const statusManager = prepareStatusManager(zone); + const makeStatusNode = () => + E(privateArgs.storageNode).makeChildNode(STATUS_NODE); + const statusManager = prepareStatusManager(zone, makeStatusNode); const { USDC } = terms.brands; const { withdrawToSeat } = tools.zoeTools; diff --git a/packages/fast-usdc/test/exos/advancer.test.ts b/packages/fast-usdc/test/exos/advancer.test.ts index fcfbe85c7ef..14f1fe4b3ea 100644 --- a/packages/fast-usdc/test/exos/advancer.test.ts +++ b/packages/fast-usdc/test/exos/advancer.test.ts @@ -1,11 +1,9 @@ import type { TestFn } from 'ava'; import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; - import { denomHash } from '@agoric/orchestration'; import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js'; import { Far } from '@endo/pass-style'; -import { makePromiseKit } from '@endo/promise-kit'; import type { NatAmount } from '@agoric/ertp'; import { type ZoeTools } from '@agoric/orchestration/src/utils/zoe-tools.js'; import { q } from '@endo/errors'; @@ -36,6 +34,7 @@ const createTestExtensions = (t, common: CommonSetup) => { bootstrap: { rootZone, vowTools }, facadeServices: { chainHub }, brands: { usdc }, + commonPrivateArgs: { storageNode }, } = common; const { log, inspectLogs } = makeTestLogger(t.log); @@ -45,6 +44,7 @@ const createTestExtensions = (t, common: CommonSetup) => { const statusManager = prepareStatusManager( rootZone.subZone('status-manager'), + async () => storageNode.makeChildNode('status'), ); const mockAccounts = prepareMockOrchAccounts(rootZone.subZone('accounts'), { diff --git a/packages/fast-usdc/test/exos/settler.test.ts b/packages/fast-usdc/test/exos/settler.test.ts index ef942ad572a..6ca8491db2f 100644 --- a/packages/fast-usdc/test/exos/settler.test.ts +++ b/packages/fast-usdc/test/exos/settler.test.ts @@ -7,10 +7,10 @@ import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import { PendingTxStatus } from '../../src/constants.js'; import { prepareSettler } from '../../src/exos/settler.js'; import { prepareStatusManager } from '../../src/exos/status-manager.js'; -import type { CctpTxEvidence } from '../../src/types.js'; +import { commonSetup } from '../supports.js'; import { MockCctpTxEvidences, MockVTransferEvents } from '../fixtures.js'; -import { prepareMockOrchAccounts } from '../mocks.js'; -import { commonSetup, provideDurableZone } from '../supports.js'; +import type { CctpTxEvidence } from '../../src/types.js'; +import { makeTestLogger, prepareMockOrchAccounts } from '../mocks.js'; import { makeFeeTools } from '../../src/utils/fees.js'; const mockZcf = (zone: Zone) => { @@ -40,8 +40,12 @@ const mockZcf = (zone: Zone) => { const makeTestContext = async t => { const common = await commonSetup(t); const { rootZone: zone } = common.bootstrap; - const statusManager = prepareStatusManager(zone.subZone('status-manager')); - + const { log, inspectLogs } = makeTestLogger(t.log); + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + async () => common.commonPrivateArgs.storageNode.makeChildNode('status'), + { log }, + ); const { zcf, callLog } = mockZcf(zone.subZone('Mock ZCF')); const { rootZone, vowTools } = common.bootstrap; @@ -126,7 +130,9 @@ const makeTestContext = async t => { simulate, repayer, peekCalls: () => harden([...callLog]), + inspectLogs, accounts: mockAccounts, + storage: common.bootstrap.storage, }; }; @@ -221,7 +227,12 @@ test('happy path: disburse to LPs; StatusManager removes tx', async t => { [], 'SETTLED entry removed from StatusManger', ); - // TODO, confirm vstorage write for TxStatus.SETTLED + await eventLoopIteration(); + const vstorage = t.context.storage.data; + t.is( + vstorage.get(`mockChainStorageRoot.status.${cctpTxEvidence.txHash}`), + 'DISBURSED', + ); }); test('slow path: forward to EUD; remove pending tx', async t => { @@ -279,19 +290,22 @@ test('slow path: forward to EUD; remove pending tx', async t => { [], 'SETTLED entry removed from StatusManger', ); - // TODO, confirm vstorage write for TxStatus.SETTLED + const vstorage = t.context.storage.data; + t.is( + vstorage.get(`mockChainStorageRoot.status.${cctpTxEvidence.txHash}`), + 'FORWARDED', + ); }); test('Settlement for unknown transaction', async t => { const { common, makeSettler, - statusManager, defaultSettlerParams, repayer, - simulate, accounts, peekCalls, + inspectLogs, } = t.context; const { usdc } = common.brands; @@ -318,8 +332,9 @@ test('Settlement for unknown transaction', async t => { usdc.units(150), ], ]); - - // TODO, confirm vstorage write for TxStatus.FORWARDED + t.deepEqual(inspectLogs(0), [ + '⚠️ Forwarded minted amount 150000000 from account noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelqkd before it was observed.', + ]); }); test.todo("StatusManager does not receive update when we can't settle"); diff --git a/packages/fast-usdc/test/exos/status-manager.test.ts b/packages/fast-usdc/test/exos/status-manager.test.ts index 1d78f02fc67..d37015f0d57 100644 --- a/packages/fast-usdc/test/exos/status-manager.test.ts +++ b/packages/fast-usdc/test/exos/status-manager.test.ts @@ -1,13 +1,36 @@ -import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; +import type { TestFn } from 'ava'; +import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; +import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js'; +import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import { PendingTxStatus } from '../../src/constants.js'; import { prepareStatusManager } from '../../src/exos/status-manager.js'; -import { provideDurableZone } from '../supports.js'; +import { commonSetup, provideDurableZone } from '../supports.js'; import { MockCctpTxEvidences } from '../fixtures.js'; import type { CctpTxEvidence } from '../../src/types.js'; -test('advancing creates new entry with ADVANCING status', t => { +type Common = Awaited>; +type TestContext = { + makeStatusNode: () => Promise; + storage: Common['bootstrap']['storage']; +}; + +const test = anyTest as TestFn; + +test.beforeEach(async t => { + const common = await commonSetup(t); + t.context = { + makeStatusNode: async () => + common.commonPrivateArgs.storageNode.makeChildNode('status'), + storage: common.bootstrap.storage, + }; +}); + +test('advance creates new entry with ADVANCED status', t => { const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); statusManager.advance(evidence); @@ -19,12 +42,31 @@ test('advancing creates new entry with ADVANCING status', t => { t.is(entries[0]?.status, PendingTxStatus.Advancing); }); -test.todo('ADVANCING transactions are published to vstorage'); -test('observe creates new entry with OBSERVED status', t => { +test('ADVANCED transactions are published to vstorage', async t => { const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); + const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); + statusManager.advance(evidence); + await eventLoopIteration(); + + const vstorage = t.context.storage.data; + t.is( + vstorage.get(`mockChainStorageRoot.status.${evidence.txHash}`), + 'ADVANCING', + ); +}); + +test('observe creates new entry with OBSERVED status', t => { + const zone = provideDurableZone('status-test'); + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); statusManager.observe(evidence); @@ -35,12 +77,31 @@ test('observe creates new entry with OBSERVED status', t => { t.is(entries[0]?.status, PendingTxStatus.Observed); }); -test.todo('OBSERVED transactions are published to vstorage'); -test('cannot process same tx twice', t => { +test('OBSERVED transactions are published to vstorage', async t => { const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); + + const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); + statusManager.observe(evidence); + await eventLoopIteration(); + + const vstorage = t.context.storage.data; + t.is( + vstorage.get(`mockChainStorageRoot.status.${evidence.txHash}`), + 'OBSERVED', + ); +}); +test('cannot process same tx twice', t => { + const zone = provideDurableZone('status-test'); + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); statusManager.advance(evidence); @@ -62,7 +123,10 @@ test('cannot process same tx twice', t => { test('isSeen checks if a tx has been processed', t => { const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); const e1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); t.false(statusManager.hasBeenObserved(e1)); @@ -77,8 +141,10 @@ test('isSeen checks if a tx has been processed', t => { test('dequeueStatus removes entries from PendingTxs', t => { const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); - + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); const e1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); const e2 = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); @@ -127,8 +193,10 @@ test('dequeueStatus removes entries from PendingTxs', t => { test('cannot advanceOutcome without ADVANCING entry', t => { const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); - + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); const e1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); const advanceOutcomeFn = () => statusManager.advanceOutcome(e1.tx.forwardingAddress, e1.tx.amount, true); @@ -151,9 +219,13 @@ test('cannot advanceOutcome without ADVANCING entry', t => { ); }); -test('advanceOutcome transitions to ADVANCED and ADVANCE_FAILED', t => { +test('advanceOutcome transitions to ADVANCED and ADVANCE_FAILED', async t => { + const vstorage = t.context.storage.data; const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); const e1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); const e2 = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); @@ -164,6 +236,11 @@ test('advanceOutcome transitions to ADVANCED and ADVANCE_FAILED', t => { status: PendingTxStatus.Advanced, }, ]); + await eventLoopIteration(); + t.is( + vstorage.get(`mockChainStorageRoot.status.${e1.txHash}`), + PendingTxStatus.Advanced, + ); statusManager.advance(e2); statusManager.advanceOutcome(e2.tx.forwardingAddress, e2.tx.amount, false); @@ -172,13 +249,19 @@ test('advanceOutcome transitions to ADVANCED and ADVANCE_FAILED', t => { status: PendingTxStatus.AdvanceFailed, }, ]); + await eventLoopIteration(); + t.is( + vstorage.get(`mockChainStorageRoot.status.${e2.txHash}`), + PendingTxStatus.AdvanceFailed, + ); }); -test.todo('ADVANCED transactions are published to vstorage'); test('dequeueStatus returns undefined when nothing is settleable', t => { const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); - + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); const e1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); t.is( @@ -187,10 +270,12 @@ test('dequeueStatus returns undefined when nothing is settleable', t => { ); }); -test('dequeueStatus returns first (earliest) matched entry', t => { +test('dequeueStatus returns first (earliest) matched entry', async t => { const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); - + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); // advance two txs @@ -235,7 +320,6 @@ test('dequeueStatus returns first (earliest) matched entry', t => { evidence.tx.amount, ); t.is(entries0.length, 2); - // TODO, check vstorage for PendingTxStatus.Settled for 1st tx t.is( entries0?.[0].status, PendingTxStatus.Advanced, @@ -271,7 +355,6 @@ test('dequeueStatus returns first (earliest) matched entry', t => { evidence.tx.forwardingAddress, evidence.tx.amount, ); - // TODO, check vstorage for TxStatus.Settled t.is(entries1?.length, 0, 'settled entries are deleted'); t.is( @@ -286,16 +369,19 @@ test('dequeueStatus returns first (earliest) matched entry', t => { test('lookupPending returns empty array when presented a key it has not seen', t => { const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); - + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); t.deepEqual(statusManager.lookupPending('noble123', 1n), []); }); -// TODO: remove? this doesn't seem to hold it's weight -test('StatusManagerKey logic handles addresses with hyphens', async t => { +test('StatusManagerKey logic handles addresses with hyphens', t => { const zone = provideDurableZone('status-test'); - const statusManager = prepareStatusManager(zone.subZone('status-manager')); - + const statusManager = prepareStatusManager( + zone.subZone('status-manager'), + t.context.makeStatusNode, + ); const evidence: CctpTxEvidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); evidence.tx.forwardingAddress = 'noble1-foo'; From 1d5cb990533dd737923e17c9537fe3963b06d5c5 Mon Sep 17 00:00:00 2001 From: Chris Hibbert Date: Wed, 27 Nov 2024 10:46:57 -0800 Subject: [PATCH 068/174] chore: upgrade v8, the priceAuthorityRegistry (#10418) closes: #10401 ## Description Upgrade the priceAuthorityRegistry ### Security Considerations N/A ### Scaling Considerations N/A ### Documentation Considerations Does need to be mentioned in the upgrade description. ### Testing Considerations As issue #10401 directs, we verify that `quoteWanted()` continues to work. Existing tests in `z:acceptance` verify that prices continue to be received by vaults. ### Upgrade Considerations This should be included in upgrade 19. --- .../proposals/n:upgrade-next/registry.test.js | 20 +++++++ golang/cosmos/app/upgrade.go | 3 + .../scripts/vats/upgrade-paRegistry.js | 21 +++++++ .../proposals/upgrade-paRegistry-proposal.js | 57 +++++++++++++++++++ 4 files changed, 101 insertions(+) create mode 100644 a3p-integration/proposals/n:upgrade-next/registry.test.js create mode 100644 packages/builders/scripts/vats/upgrade-paRegistry.js create mode 100644 packages/vats/src/proposals/upgrade-paRegistry-proposal.js diff --git a/a3p-integration/proposals/n:upgrade-next/registry.test.js b/a3p-integration/proposals/n:upgrade-next/registry.test.js new file mode 100644 index 00000000000..a0d4adb84ed --- /dev/null +++ b/a3p-integration/proposals/n:upgrade-next/registry.test.js @@ -0,0 +1,20 @@ +// @ts-check +import test from 'ava'; +import '@endo/init/debug.js'; + +import { + getDetailsMatchingVats, + getIncarnation, +} from '@agoric/synthetic-chain'; + +/** + * @file + * A test of upgrading vat-priceAuthority, which is planned to ship in Upgrade 9 + */ + +test('priceAuthorityRegistry upgrade', async t => { + t.is(await getIncarnation('priceAuthority'), 1); + + const priceAuthorityVats = await getDetailsMatchingVats('priceAuthority'); + t.is(priceAuthorityVats.length, 1); +}); diff --git a/golang/cosmos/app/upgrade.go b/golang/cosmos/app/upgrade.go index 818c1fd63ce..1396a18879b 100644 --- a/golang/cosmos/app/upgrade.go +++ b/golang/cosmos/app/upgrade.go @@ -219,6 +219,9 @@ func unreleasedUpgradeHandler(app *GaiaApp, targetUpgrade string) func(sdk.Conte vm.CoreProposalStepForModules( "@agoric/builders/scripts/inter-protocol/replace-feeDistributor.js", ), + vm.CoreProposalStepForModules( + "@agoric/builders/scripts/vats/upgrade-paRegistry.js", + ), ) } diff --git a/packages/builders/scripts/vats/upgrade-paRegistry.js b/packages/builders/scripts/vats/upgrade-paRegistry.js new file mode 100644 index 00000000000..9f353134a77 --- /dev/null +++ b/packages/builders/scripts/vats/upgrade-paRegistry.js @@ -0,0 +1,21 @@ +import { makeHelpers } from '@agoric/deploy-script-support'; + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ +export const defaultProposalBuilder = async ({ publishRef, install }) => + harden({ + sourceSpec: '@agoric/vats/src/proposals/upgrade-paRegistry-proposal.js', + getManifestCall: [ + 'getManifestForUpgradingRegistry', + { + registryRef: publishRef( + install('@agoric/vats/src/vat-priceAuthority.js'), + ), + }, + ], + }); + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ +export default async (homeP, endowments) => { + const { writeCoreEval } = await makeHelpers(homeP, endowments); + await writeCoreEval('upgrade-paRegistry', defaultProposalBuilder); +}; diff --git a/packages/vats/src/proposals/upgrade-paRegistry-proposal.js b/packages/vats/src/proposals/upgrade-paRegistry-proposal.js new file mode 100644 index 00000000000..81387d7193b --- /dev/null +++ b/packages/vats/src/proposals/upgrade-paRegistry-proposal.js @@ -0,0 +1,57 @@ +// @ts-check +import { E } from '@endo/far'; +import { AmountMath } from '@agoric/ertp'; +import { Stable } from '@agoric/internal/src/tokens.js'; + +/** + * @param {BootstrapPowers} powers + * @param {object} options + * @param {{ registryRef: VatSourceRef }} options.options + */ +export const upgradePriceAuthorityRegistry = async ( + { + consume: { vatAdminSvc, vatStore, priceAuthority, agoricNames }, + brand: { + consume: { [Stable.symbol]: stableBrandP }, + }, + }, + options, +) => { + const { registryRef } = options.options; + + assert(registryRef.bundleID); + console.log(`PriceAuthorityRegistry BUNDLE ID: `, registryRef.bundleID); + + const [{ adminNode }, stableBrand, atomBrand, bundleCap] = await Promise.all([ + E(vatStore).get('priceAuthority'), + stableBrandP, + E(agoricNames).lookup('brand', 'ATOM'), + E(vatAdminSvc).getBundleCap(registryRef.bundleID), + ]); + + await E(adminNode).upgrade(bundleCap, {}); + + const oneATOM = AmountMath.make(atomBrand, 1_000_000n); + const quoteAtom = await E(priceAuthority).quoteGiven(oneATOM, stableBrand); + console.log('paRegistry quote', quoteAtom); + + assert(quoteAtom.quoteAmount.value, 'insist on getting a quote'); +}; + +const par = 'paRegistry'; +export const getManifestForUpgradingRegistry = (_powers, { registryRef }) => ({ + manifest: { + [upgradePriceAuthorityRegistry.name]: { + consume: { + agoricNames: par, + vatAdminSvc: par, + vatStore: par, + priceAuthority: par, + }, + brand: { consume: { [Stable.symbol]: par } }, + }, + }, + options: { + registryRef, + }, +}); From 5c1219c58862959ba7f4d4cf57674ad61f10c32a Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 26 Nov 2024 13:39:26 -0600 Subject: [PATCH 069/174] fix(orchestration): harden result of reverseConnInfo non-hardened objects can't go in stores such as `connectionInfos`. --- packages/orchestration/src/exos/chain-hub.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/orchestration/src/exos/chain-hub.js b/packages/orchestration/src/exos/chain-hub.js index a782294256c..39cd3626d83 100644 --- a/packages/orchestration/src/exos/chain-hub.js +++ b/packages/orchestration/src/exos/chain-hub.js @@ -98,7 +98,7 @@ export const connectionKey = (chainId1, chainId2) => { */ const reverseConnInfo = connInfo => { const { transferChannel } = connInfo; - return { + return harden({ id: connInfo.counterparty.connection_id, client_id: connInfo.counterparty.client_id, counterparty: { @@ -113,7 +113,7 @@ const reverseConnInfo = connInfo => { portId: transferChannel.counterPartyPortId, counterPartyPortId: transferChannel.portId, }, - }; + }); }; /** From c5521e5290903474b76b7c311cc9a150923bf306 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 26 Nov 2024 13:43:19 -0600 Subject: [PATCH 070/174] chore(orchestration): log keys of registered chains, assets, ... --- packages/orchestration/src/utils/chain-hub-helper.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/orchestration/src/utils/chain-hub-helper.js b/packages/orchestration/src/utils/chain-hub-helper.js index be01c8b3ef7..9e75248c6e3 100644 --- a/packages/orchestration/src/utils/chain-hub-helper.js +++ b/packages/orchestration/src/utils/chain-hub-helper.js @@ -18,8 +18,8 @@ export const registerChainsAndAssets = ( chainInfo, assetInfo, ) => { + console.log('chainHub: registering chains', Object.keys(chainInfo || {})); if (!chainInfo) { - console.log('No chain info provided, returning early.'); return; } @@ -32,16 +32,17 @@ export const registerChainsAndAssets = ( const registeredPairs = new Set(); for (const [pChainId, connInfos] of Object.entries(conns)) { for (const [cChainId, connInfo] of Object.entries(connInfos)) { - const pair = [pChainId, cChainId].sort().join(''); + const pair = [pChainId, cChainId].sort().join('<->'); if (!registeredPairs.has(pair)) { chainHub.registerConnection(pChainId, cChainId, connInfo); registeredPairs.add(pair); } } } + console.log('chainHub: registered connections', [...registeredPairs].sort()); + console.log('chainHub: registering assets', Object.keys(assetInfo || {})); if (!assetInfo) { - console.log('No asset info provided, returning early.'); return; } for (const [denom, info] of Object.entries(assetInfo)) { From 8cb50189b2a3d30934af7a24ab7e2530b995a28f Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 22 Nov 2024 23:48:13 -0600 Subject: [PATCH 071/174] chore(fast-usdc): chainInfo, assetinfo in test/supports privateArgs - realistic USDC denom in test supports --- packages/fast-usdc/test/supports.ts | 61 ++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/packages/fast-usdc/test/supports.ts b/packages/fast-usdc/test/supports.ts index e7977de6963..174a28ceed9 100644 --- a/packages/fast-usdc/test/supports.ts +++ b/packages/fast-usdc/test/supports.ts @@ -2,8 +2,16 @@ import { makeIssuerKit } from '@agoric/ertp'; import { VTRANSFER_IBC_EVENT } from '@agoric/internal/src/action-types.js'; import { makeFakeStorageKit } from '@agoric/internal/src/storage-test-utils.js'; import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; +import { + denomHash, + type CosmosChainInfo, + type Denom, +} from '@agoric/orchestration'; import { registerKnownChains } from '@agoric/orchestration/src/chain-info.js'; -import { makeChainHub } from '@agoric/orchestration/src/exos/chain-hub.js'; +import { + makeChainHub, + type DenomDetail, +} from '@agoric/orchestration/src/exos/chain-hub.js'; import { prepareCosmosInterchainService } from '@agoric/orchestration/src/exos/cosmos-interchain-service.js'; import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js'; import { setupFakeNetwork } from '@agoric/orchestration/test/network-fakes.js'; @@ -35,6 +43,36 @@ export { makeFakeTransferBridge, } from '@agoric/vats/tools/fake-bridge.js'; +const assetOn = ( + baseDenom: Denom, + baseName: string, + chainName?: string, + infoOf?: Record, + brandKey?: string, +): [string, DenomDetail & { brandKey?: string }] => { + if (!chainName) { + return [baseDenom, { baseName, chainName: baseName, baseDenom }]; + } + if (!infoOf) throw Error(`must provide infoOf`); + const issuerInfo = infoOf[baseName]; + const holdingInfo = infoOf[chainName]; + if (!holdingInfo) throw Error(`${chainName} missing`); + if (!holdingInfo.connections) + throw Error(`connections missing for ${chainName}`); + const { channelId } = + holdingInfo.connections[issuerInfo.chainId].transferChannel; + const denom = `ibc/${denomHash({ denom: baseDenom, channelId })}`; + return [denom, { baseName, chainName, baseDenom, brandKey }]; +}; + +export const [uusdcOnAgoric, agUSDCDetail] = assetOn( + 'uusdc', + 'noble', + 'agoric', + fetchedChainInfo, + 'USDC', +); + export const commonSetup = async (t: ExecutionContext) => { t.log('bootstrap vat dependencies'); // The common setup cannot support a durable zone because many of the fakes are not durable. @@ -52,7 +90,7 @@ export const commonSetup = async (t: ExecutionContext) => { onToBridge: obj => bankBridgeMessages.push(obj), }); await E(bankManager).addAsset( - 'ibc/usdconagoric', + uusdcOnAgoric, 'USDC', 'USD Circle Stablecoin', usdc.issuerKit, @@ -64,7 +102,7 @@ export const commonSetup = async (t: ExecutionContext) => { // TODO https://github.com/Agoric/agoric-sdk/issues/9966 await makeWellKnownSpaces(agoricNamesAdmin, t.log, ['vbankAsset']); await E(E(agoricNamesAdmin).lookupAdmin('vbankAsset')).update( - 'ibc/usdconagoric', + uusdcOnAgoric, /** @type {AssetInfo} */ harden({ brand: usdc.brand, issuer: usdc.issuer, @@ -157,6 +195,19 @@ export const commonSetup = async (t: ExecutionContext) => { vowTools, ); + const chainInfo = harden(() => { + const { agoric, osmosis, noble } = fetchedChainInfo; + return { agoric, osmosis, noble }; + })(); + + const assetInfo = harden( + Object.fromEntries([ + assetOn('uusdc', 'noble'), + [uusdcOnAgoric, agUSDCDetail], + assetOn('uusdc', 'noble', 'osmosis', fetchedChainInfo), + ]), + ); + return { bootstrap: { agoricNames, @@ -186,8 +237,8 @@ export const commonSetup = async (t: ExecutionContext) => { marshaller, timerService: timer, feeConfig: makeTestFeeConfig(usdc), - chainInfo: {}, - assetInfo: {}, + chainInfo, + assetInfo, }, facadeServices: { agoricNames, From 3807763c2422c8c9112e62b568e6904d2ec4eb10 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 22 Nov 2024 23:49:55 -0600 Subject: [PATCH 072/174] style: lint / organize imports in settler.test --- packages/fast-usdc/test/exos/settler.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/fast-usdc/test/exos/settler.test.ts b/packages/fast-usdc/test/exos/settler.test.ts index 6ca8491db2f..d4c82a7652b 100644 --- a/packages/fast-usdc/test/exos/settler.test.ts +++ b/packages/fast-usdc/test/exos/settler.test.ts @@ -1,17 +1,17 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import type { TestFn } from 'ava'; +import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js'; import type { Zone } from '@agoric/zone'; -import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import { PendingTxStatus } from '../../src/constants.js'; import { prepareSettler } from '../../src/exos/settler.js'; import { prepareStatusManager } from '../../src/exos/status-manager.js'; -import { commonSetup } from '../supports.js'; -import { MockCctpTxEvidences, MockVTransferEvents } from '../fixtures.js'; import type { CctpTxEvidence } from '../../src/types.js'; -import { makeTestLogger, prepareMockOrchAccounts } from '../mocks.js'; import { makeFeeTools } from '../../src/utils/fees.js'; +import { MockCctpTxEvidences, MockVTransferEvents } from '../fixtures.js'; +import { makeTestLogger, prepareMockOrchAccounts } from '../mocks.js'; +import { commonSetup } from '../supports.js'; const mockZcf = (zone: Zone) => { const callLog = [] as any[]; From 61067a74c7d2fe410e13a048a00d64091ad5948a Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 22 Nov 2024 23:50:12 -0600 Subject: [PATCH 073/174] chore: settler: log on rejection --- packages/fast-usdc/src/exos/settler.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/fast-usdc/src/exos/settler.js b/packages/fast-usdc/src/exos/settler.js index 9083a80b420..c7e509628e0 100644 --- a/packages/fast-usdc/src/exos/settler.js +++ b/packages/fast-usdc/src/exos/settler.js @@ -262,10 +262,11 @@ export const prepareSettler = ( statusManager.forwarded(txHash, sender, amount); }, /** - * @param {unknown} _result - * @param {SettlerTransferCtx} _ctx + * @param {unknown} reason + * @param {SettlerTransferCtx} ctx */ - onRejected(_result, _ctx) { + onRejected(reason, ctx) { + trace('transfer rejected!', reason, ctx); // const { txHash, sender, amount } = ctx; // TODO: statusManager.forwardFailed(txHash, sender, amount); }, From 661b05b9ad16a94b4bff6ba470018d50647b4498 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Sun, 24 Nov 2024 21:08:58 -0600 Subject: [PATCH 074/174] chore: parameterize settler LogFn --- packages/fast-usdc/src/exos/settler.js | 30 +++++++++++++++++--------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/packages/fast-usdc/src/exos/settler.js b/packages/fast-usdc/src/exos/settler.js index c7e509628e0..355d35798f2 100644 --- a/packages/fast-usdc/src/exos/settler.js +++ b/packages/fast-usdc/src/exos/settler.js @@ -17,12 +17,10 @@ import { EvmHashShape } from '../type-guards.js'; * @import {Zone} from '@agoric/zone'; * @import {HostOf, HostInterface} from '@agoric/async-flow'; * @import {TargetRegistration} from '@agoric/vats/src/bridge-target.js'; - * @import {NobleAddress, LiquidityPoolKit, FeeConfig, EvmHash} from '../types.js'; + * @import {NobleAddress, LiquidityPoolKit, FeeConfig, EvmHash, LogFn} from '../types.js'; * @import {StatusManager} from './status-manager.js'; */ -const trace = makeTracer('Settler'); - /** * NOTE: not meant to be parsable. * @@ -42,10 +40,20 @@ const makeMintedEarlyKey = (addr, amount) => * @param {HostOf} caps.withdrawToSeat * @param {import('@agoric/vow').VowTools} caps.vowTools * @param {ChainHub} caps.chainHub + * @param {LogFn} [caps.log] */ export const prepareSettler = ( zone, - { statusManager, USDC, zcf, feeConfig, withdrawToSeat, vowTools, chainHub }, + { + chainHub, + feeConfig, + log = makeTracer('Settler', true), + statusManager, + USDC, + vowTools, + withdrawToSeat, + zcf, + }, ) => { assertAllDefined({ statusManager }); return zone.exoClassKit( @@ -89,6 +97,7 @@ export const prepareSettler = ( * }} config */ config => { + log('config', config); return { ...config, /** @type {HostInterface|undefined} */ @@ -111,11 +120,12 @@ export const prepareSettler = ( tap: { /** @param {VTransferIBCEvent} event */ async receiveUpcall(event) { + log('upcall event', event.packet.sequence, event.blockTime); const { sourceChannel, remoteDenom } = this.state; const { packet } = event; if (packet.source_channel !== sourceChannel) { const { source_channel: actual } = packet; - trace('unexpected channel', { actual, expected: sourceChannel }); + log('unexpected channel', { actual, expected: sourceChannel }); return; } @@ -129,7 +139,7 @@ export const prepareSettler = ( if (tx.denom !== remoteDenom) { const { denom: actual } = tx; - trace('unexpected denom', { actual, expected: remoteDenom }); + log('unexpected denom', { actual, expected: remoteDenom }); return; } @@ -148,7 +158,7 @@ export const prepareSettler = ( const { self } = this.facets; const found = statusManager.dequeueStatus(sender, amount); - trace('dequeued', found, 'for', sender, amount); + log('dequeued', found, 'for', sender, amount); switch (found?.status) { case PendingTxStatus.Advanced: return self.disburse(found.txHash, sender, amount); @@ -201,7 +211,7 @@ export const prepareSettler = ( const { zcfSeat: settlingSeat } = zcf.makeEmptySeatKit(); const { calculateSplit } = makeFeeTools(feeConfig); const split = calculateSplit(received); - trace('disbursing', split); + log('disbursing', split); // TODO: what if this throws? // arguably, it cannot. Even if deposits @@ -266,9 +276,9 @@ export const prepareSettler = ( * @param {SettlerTransferCtx} ctx */ onRejected(reason, ctx) { - trace('transfer rejected!', reason, ctx); + log('⚠️ transfer rejected!', reason, ctx); // const { txHash, sender, amount } = ctx; - // TODO: statusManager.forwardFailed(txHash, sender, amount); + // TODO(#10510): statusManager.forwardFailed(txHash, sender, amount); }, }, }, From c4546a27a943475cc6e3f8c469c0122fb10c184f Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 25 Nov 2024 19:31:12 -0600 Subject: [PATCH 075/174] chore: sync notifyAdvancingResult interface guard --- packages/fast-usdc/src/exos/settler.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/fast-usdc/src/exos/settler.js b/packages/fast-usdc/src/exos/settler.js index 355d35798f2..8d6b5b8ad78 100644 --- a/packages/fast-usdc/src/exos/settler.js +++ b/packages/fast-usdc/src/exos/settler.js @@ -67,8 +67,10 @@ export const prepareSettler = ( }), notify: M.interface('SettlerNotifyI', { notifyAdvancingResult: M.call( + M.string(), M.string(), M.nat(), + M.string(), M.boolean(), ).returns(), }), From 3f0036b2d77fd476c19283ba985599bc69b59d9d Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 25 Nov 2024 20:25:51 -0600 Subject: [PATCH 076/174] chore: report fullAmount from settler to advanceOutcome --- packages/fast-usdc/src/exos/settler.js | 61 +++++++++++++++----------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/packages/fast-usdc/src/exos/settler.js b/packages/fast-usdc/src/exos/settler.js index 8d6b5b8ad78..ac74679cc06 100644 --- a/packages/fast-usdc/src/exos/settler.js +++ b/packages/fast-usdc/src/exos/settler.js @@ -11,7 +11,7 @@ import { EvmHashShape } from '../type-guards.js'; /** * @import {FungibleTokenPacketData} from '@agoric/cosmic-proto/ibc/applications/transfer/v2/packet.js'; - * @import {Denom, OrchestrationAccount, ChainHub} from '@agoric/orchestration'; + * @import {Denom, OrchestrationAccount, ChainHub, ChainAddress} from '@agoric/orchestration'; * @import {WithdrawToSeat} from '@agoric/orchestration/src/utils/zoe-tools' * @import {IBCChannelID, VTransferIBCEvent} from '@agoric/vats'; * @import {Zone} from '@agoric/zone'; @@ -67,10 +67,7 @@ export const prepareSettler = ( }), notify: M.interface('SettlerNotifyI', { notifyAdvancingResult: M.call( - M.string(), - M.string(), - M.nat(), - M.string(), + M.record(), // XXX fill in details TODO M.boolean(), ).returns(), }), @@ -179,25 +176,39 @@ export const prepareSettler = ( }, notify: { /** - * @param {EvmHash} txHash - * @param {NobleAddress} sender - * @param {NatValue} amount - * @param {string} EUD + * @param {object} ctx + * @param {EvmHash} ctx.txHash + * @param {NobleAddress} ctx.forwardingAddress + * @param {Amount<'nat'>} ctx.fullAmount + * @param {ChainAddress} ctx.destination * @param {boolean} success * @returns {void} */ - notifyAdvancingResult(txHash, sender, amount, EUD, success) { + notifyAdvancingResult( + { txHash, forwardingAddress, fullAmount, destination }, + success, + ) { const { mintedEarly } = this.state; - const key = makeMintedEarlyKey(sender, amount); + const { value: fullValue } = fullAmount; + const key = makeMintedEarlyKey(forwardingAddress, fullValue); if (mintedEarly.has(key)) { mintedEarly.delete(key); if (success) { - void this.facets.self.disburse(txHash, sender, amount); + void this.facets.self.disburse( + txHash, + forwardingAddress, + fullValue, + ); } else { - void this.facets.self.forward(txHash, sender, amount, EUD); + void this.facets.self.forward( + txHash, + forwardingAddress, + fullValue, + destination.value, + ); } } else { - statusManager.advanceOutcome(sender, amount, success); + statusManager.advanceOutcome(forwardingAddress, fullValue, success); } }, }, @@ -205,11 +216,11 @@ export const prepareSettler = ( /** * @param {EvmHash} txHash * @param {NobleAddress} sender - * @param {NatValue} amount + * @param {NatValue} fullValue */ - async disburse(txHash, sender, amount) { + async disburse(txHash, sender, fullValue) { const { repayer, settlementAccount } = this.state; - const received = AmountMath.make(USDC, amount); + const received = AmountMath.make(USDC, fullValue); const { zcfSeat: settlingSeat } = zcf.makeEmptySeatKit(); const { calculateSplit } = makeFeeTools(feeConfig); const split = calculateSplit(received); @@ -238,10 +249,10 @@ export const prepareSettler = ( /** * @param {EvmHash | undefined} txHash * @param {NobleAddress} sender - * @param {NatValue} amount + * @param {NatValue} fullValue * @param {string} EUD */ - forward(txHash, sender, amount, EUD) { + forward(txHash, sender, fullValue, EUD) { const { settlementAccount } = this.state; const dest = chainHub.makeChainAddress(EUD); @@ -249,12 +260,12 @@ export const prepareSettler = ( // TODO? statusManager.forwarding(txHash, sender, amount); const txfrV = E(settlementAccount).transfer( dest, - AmountMath.make(USDC, amount), + AmountMath.make(USDC, fullValue), ); void vowTools.watch(txfrV, this.facets.transferHandler, { txHash, sender, - amount, + fullValue, }); }, }, @@ -264,14 +275,14 @@ export const prepareSettler = ( * @param {SettlerTransferCtx} ctx * * @typedef {{ - * txHash: EvmHash; + * txHash: EvmHash | undefined; * sender: NobleAddress; - * amount: NatValue; + * fullValue: NatValue; * }} SettlerTransferCtx */ onFulfilled(_result, ctx) { - const { txHash, sender, amount } = ctx; - statusManager.forwarded(txHash, sender, amount); + const { txHash, sender, fullValue } = ctx; + statusManager.forwarded(txHash, sender, fullValue); }, /** * @param {unknown} reason From 32d362b220aa4260ccd62722a7f524a399ee1c0c Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 25 Nov 2024 20:27:20 -0600 Subject: [PATCH 077/174] chore: provide fullAmount from advancer to settler.notify... --- packages/fast-usdc/src/exos/advancer.js | 97 +++++++++++-------------- 1 file changed, 42 insertions(+), 55 deletions(-) diff --git a/packages/fast-usdc/src/exos/advancer.js b/packages/fast-usdc/src/exos/advancer.js index 902cc890283..f5a9f8afd09 100644 --- a/packages/fast-usdc/src/exos/advancer.js +++ b/packages/fast-usdc/src/exos/advancer.js @@ -1,6 +1,6 @@ -import { AmountMath, AmountShape } from '@agoric/ertp'; +import { AmountMath } from '@agoric/ertp'; import { assertAllDefined, makeTracer } from '@agoric/internal'; -import { ChainAddressShape } from '@agoric/orchestration'; +import { AnyNatAmountShape, ChainAddressShape } from '@agoric/orchestration'; import { pickFacet } from '@agoric/vat-data'; import { VowShape } from '@agoric/vow'; import { q } from '@endo/errors'; @@ -16,6 +16,7 @@ import { makeFeeTools } from '../utils/fees.js'; /** * @import {HostInterface} from '@agoric/async-flow'; + * @import {TypedPattern} from '@agoric/internal' * @import {NatAmount} from '@agoric/ertp'; * @import {ChainAddress, ChainHub, Denom, OrchestrationAccount} from '@agoric/orchestration'; * @import {ZoeTools} from '@agoric/orchestration/src/utils/zoe-tools.js'; @@ -39,47 +40,40 @@ import { makeFeeTools } from '../utils/fees.js'; * }} AdvancerKitPowers */ +/** @type {TypedPattern} */ +const AdvancerVowCtxShape = M.splitRecord( + { + fullAmount: AnyNatAmountShape, + advanceAmount: AnyNatAmountShape, + destination: ChainAddressShape, + forwardingAddress: M.string(), + txHash: EvmHashShape, + }, + { tmpSeat: M.remotable() }, +); + /** type guards internal to the AdvancerKit */ const AdvancerKitI = harden({ advancer: M.interface('AdvancerI', { handleTransactionEvent: M.callWhen(CctpTxEvidenceShape).returns(), }), depositHandler: M.interface('DepositHandlerI', { - onFulfilled: M.call(M.undefined(), { - amount: AmountShape, - destination: ChainAddressShape, - forwardingAddress: M.string(), - tmpSeat: M.remotable(), - txHash: EvmHashShape, - }).returns(VowShape), - onRejected: M.call(M.error(), { - amount: AmountShape, - destination: ChainAddressShape, - forwardingAddress: M.string(), - tmpSeat: M.remotable(), - txHash: EvmHashShape, - }).returns(), + onFulfilled: M.call(M.undefined(), AdvancerVowCtxShape).returns(VowShape), + onRejected: M.call(M.error(), AdvancerVowCtxShape).returns(), }), transferHandler: M.interface('TransferHandlerI', { // TODO confirm undefined, and not bigint (sequence) - onFulfilled: M.call(M.undefined(), { - amount: AmountShape, - destination: ChainAddressShape, - forwardingAddress: M.string(), - txHash: EvmHashShape, - }).returns(M.undefined()), - onRejected: M.call(M.error(), { - amount: AmountShape, - destination: ChainAddressShape, - forwardingAddress: M.string(), - txHash: EvmHashShape, - }).returns(M.undefined()), + onFulfilled: M.call(M.undefined(), AdvancerVowCtxShape).returns( + M.undefined(), + ), + onRejected: M.call(M.error(), AdvancerVowCtxShape).returns(M.undefined()), }), }); /** * @typedef {{ - * amount: NatAmount; + * fullAmount: NatAmount; + * advanceAmount: NatAmount; * destination: ChainAddress; * forwardingAddress: NobleAddress; * txHash: EvmHash; @@ -155,9 +149,9 @@ export const prepareAdvancerKit = ( // throws if the bech32 prefix is not found const destination = chainHub.makeChainAddress(EUD); - const requestedAmount = toAmount(evidence.tx.amount); + const fullAmount = toAmount(evidence.tx.amount); // throws if requested does not exceed fees - const advanceAmount = feeTools.calculateAdvance(requestedAmount); + const advanceAmount = feeTools.calculateAdvance(fullAmount); const { zcfSeat: tmpSeat } = zcf.makeEmptySeatKit(); const amountKWR = harden({ USDC: advanceAmount }); @@ -174,7 +168,8 @@ export const prepareAdvancerKit = ( amountKWR, ); void watch(depositV, this.facets.depositHandler, { - amount: advanceAmount, + fullAmount, + advanceAmount, destination, forwardingAddress: evidence.tx.forwardingAddress, tmpSeat, @@ -193,16 +188,15 @@ export const prepareAdvancerKit = ( */ onFulfilled(result, ctx) { const { poolAccount } = this.state; - const { amount, destination, forwardingAddress, txHash } = ctx; + const { destination, advanceAmount, ...detail } = ctx; const transferV = E(poolAccount).transfer(destination, { denom: usdc.denom, - value: amount.value, + value: advanceAmount.value, }); return watch(transferV, this.facets.transferHandler, { destination, - amount, - forwardingAddress, - txHash, + advanceAmount, + ...detail, }); }, /** @@ -222,23 +216,23 @@ export const prepareAdvancerKit = ( }, transferHandler: { /** - * @param {undefined} result TODO confirm this is not a bigint (sequence) + * @param {unknown} result TODO confirm this is not a bigint (sequence) * @param {AdvancerVowCtx} ctx */ onFulfilled(result, ctx) { const { notifyFacet } = this.state; - const { amount, destination, forwardingAddress, txHash } = ctx; + const { advanceAmount, destination, ...detail } = ctx; log( 'Advance transfer fulfilled', - q({ amount, destination, result }).toString(), - ); - notifyFacet.notifyAdvancingResult( - txHash, - forwardingAddress, - amount.value, - destination.value, - true, + q({ advanceAmount, destination, result }).toString(), ); + // During development, due to a bug, this call threw. + // The failure was silent (no diagnostics) due to: + // - #10576 Vows do not report unhandled rejections + // For now, the advancer kit relies on consistency between + // notifyFacet, statusManager, and callers of handleTransactionEvent(). + // TODO: revisit #10576 during #10510 + notifyFacet.notifyAdvancingResult({ destination, ...detail }, true); }, /** * @param {Error} error @@ -246,15 +240,8 @@ export const prepareAdvancerKit = ( */ onRejected(error, ctx) { const { notifyFacet } = this.state; - const { amount, destination, forwardingAddress, txHash } = ctx; log('Advance transfer rejected', q(error).toString()); - notifyFacet.notifyAdvancingResult( - txHash, - forwardingAddress, - amount.value, - destination.value, - false, - ); + notifyFacet.notifyAdvancingResult(ctx, false); }, }, }, From 3f5210d9f229931d2c1d6c8f42651ff18253cdf9 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 26 Nov 2024 00:27:43 -0600 Subject: [PATCH 078/174] test: advancer: use fullAmount / advanceAmount (WIP) --- packages/fast-usdc/test/exos/advancer.test.ts | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/packages/fast-usdc/test/exos/advancer.test.ts b/packages/fast-usdc/test/exos/advancer.test.ts index 14f1fe4b3ea..0921fb4838f 100644 --- a/packages/fast-usdc/test/exos/advancer.test.ts +++ b/packages/fast-usdc/test/exos/advancer.test.ts @@ -186,17 +186,22 @@ test('updates status to ADVANCING in happy path', async t => { t.deepEqual(inspectLogs(0), [ 'Advance transfer fulfilled', - '{"amount":{"brand":"[Alleged: USDC brand]","value":"[146999999n]"},"destination":{"chainId":"osmosis-1","encoding":"bech32","value":"osmo183dejcnmkka5dzcu9xw6mywq0p2m5peks28men"},"result":"[undefined]"}', + '{"advanceAmount":{"brand":"[Alleged: USDC brand]","value":"[146999999n]"},"destination":{"chainId":"osmosis-1","encoding":"bech32","value":"osmo183dejcnmkka5dzcu9xw6mywq0p2m5peks28men"},"result":"[undefined]"}', ]); // We expect to see an `Advanced` update, but that is now Settler's job. // but we can ensure it's called - t.deepEqual(inspectNotifyCalls(), [ + t.like(inspectNotifyCalls(), [ [ - mockEvidence.txHash, - mockEvidence.tx.forwardingAddress, - feeTools.calculateAdvance(usdc.make(mockEvidence.tx.amount)).value, - addressTools.getQueryParams(mockEvidence.aux.recipientAddress).EUD, + { + txHash: mockEvidence.txHash, + forwardingAddress: mockEvidence.tx.forwardingAddress, + fullAmount: usdc.make(mockEvidence.tx.amount), + destination: { + value: addressTools.getQueryParams(mockEvidence.aux.recipientAddress) + .EUD, + }, + }, true, // indicates transfer succeeded ], ]); @@ -305,13 +310,21 @@ test('calls notifyAdvancingResult (AdvancedFailed) on failed transfer', async t // We expect to see an `AdvancedFailed` update, but that is now Settler's job. // but we can ensure it's called - t.deepEqual(inspectNotifyCalls(), [ + t.like(inspectNotifyCalls(), [ [ - mockEvidence.txHash, - mockEvidence.tx.forwardingAddress, - feeTools.calculateAdvance(usdc.make(mockEvidence.tx.amount)).value, - addressTools.getQueryParams(mockEvidence.aux.recipientAddress).EUD, - false, // this indicates transfer succeeded + { + txHash: mockEvidence.txHash, + forwardingAddress: mockEvidence.tx.forwardingAddress, + fullAmount: usdc.make(mockEvidence.tx.amount), + advanceAmount: feeTools.calculateAdvance( + usdc.make(mockEvidence.tx.amount), + ), + destination: { + value: addressTools.getQueryParams(mockEvidence.aux.recipientAddress) + .EUD, + }, + }, + false, // this indicates transfer failed ], ]); }); @@ -364,7 +377,7 @@ test('will not advance same txHash:chainId evidence twice', async t => { t.deepEqual(inspectLogs(0), [ 'Advance transfer fulfilled', - '{"amount":{"brand":"[Alleged: USDC brand]","value":"[146999999n]"},"destination":{"chainId":"osmosis-1","encoding":"bech32","value":"osmo183dejcnmkka5dzcu9xw6mywq0p2m5peks28men"},"result":"[undefined]"}', + '{"advanceAmount":{"brand":"[Alleged: USDC brand]","value":"[146999999n]"},"destination":{"chainId":"osmosis-1","encoding":"bech32","value":"osmo183dejcnmkka5dzcu9xw6mywq0p2m5peks28men"},"result":"[undefined]"}', ]); // Second attempt From d9a9791f5ef364074c44f64f067c2ed65e2bf166 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 22 Nov 2024 23:51:00 -0600 Subject: [PATCH 079/174] chore: real sourceChannel for settler --- packages/fast-usdc/src/fast-usdc.contract.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/fast-usdc/src/fast-usdc.contract.js b/packages/fast-usdc/src/fast-usdc.contract.js index 0863dcdc210..d7f886cec7a 100644 --- a/packages/fast-usdc/src/fast-usdc.contract.js +++ b/packages/fast-usdc/src/fast-usdc.contract.js @@ -246,9 +246,12 @@ export const contract = async (zcf, privateArgs, zone, tools) => { vowTools.all([poolAccountV, settleAccountV]), ); + const [_agoric, _noble, agToNoble] = await vowTools.when( + chainHub.getChainsAndConnection('agoric', 'noble'), + ); const settlerKit = makeSettler({ repayer: poolKit.repayer, - sourceChannel: 'channel-1234', // TODO: fix this as soon as testing needs it', + sourceChannel: agToNoble.transferChannel.counterPartyChannelId, remoteDenom: 'uusdc', settlementAccount, }); From 4652d3201f1c803f2ea48a4fbccd464019443437 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 22 Nov 2024 19:14:01 -0600 Subject: [PATCH 080/174] test(fast-usdc): contract flow tests 10 tests passed 1 known failure 2 tests skipped 7 tests todo Done in 3.43s. - [skip] LP borrow - TODO: move to exo test - [skip] LP repay - TODO: move to exo test - [todo] PERF: Target: settlement completes in a few minutes (after USDC is minted) - [todo] C21 - Contract MUST log / timestamp each step in the transaction flow - [todo] document metrics storage schema - [todo] get metrics from vstorage - [todo] C12 - Contract MUST only pay back the Pool only if they started the advance before USDC is minted - [todo] C18 - forward - MUST log and alert these incidents - [todo] fee levels MUST be visible to external parties - i.e., written to public storage - known failure: unknown transaction settler should Leave funds in SettlementAccount. - use oracle, customer in advance happy path - factor out makeOracleOperator - registerAsset() from the test jig doesn't work: brands in the contract are in a different "address space" - use realistic USDC denom - shared context for contract tests - customer sends before LPs deposit - racer tests - flatten makeLP - don't mix with pourPayment - derive publicFacet etc. from instance as client would - skip LP test that used test-only methods - prune outdated Oracle rights test --- .../fast-usdc/test/fast-usdc.contract.test.ts | 980 ++++++++++++------ 1 file changed, 678 insertions(+), 302 deletions(-) diff --git a/packages/fast-usdc/test/fast-usdc.contract.test.ts b/packages/fast-usdc/test/fast-usdc.contract.test.ts index e697b9118da..38e80e76e71 100644 --- a/packages/fast-usdc/test/fast-usdc.contract.test.ts +++ b/packages/fast-usdc/test/fast-usdc.contract.test.ts @@ -1,36 +1,48 @@ -import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js'; -import type { ExecutionContext } from 'ava'; +import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; +import type { ExecutionContext, TestFn } from 'ava'; import { AmountMath } from '@agoric/ertp/src/amountMath.js'; +import { deeplyFulfilledObject } from '@agoric/internal'; import { eventLoopIteration, inspectMapStore, } from '@agoric/internal/src/testing-utils.js'; +import { + makePublishKit, + observeIteration, + subscribeEach, + type Subscriber, +} from '@agoric/notifier'; +import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js'; +import { buildVTransferEvent } from '@agoric/orchestration/tools/ibc-mocks.js'; +import { heapVowE as VE } from '@agoric/vow/vat.js'; import { divideBy, multiplyBy, parseRatio, } from '@agoric/zoe/src/contractSupport/ratio.js'; +import type { Instance } from '@agoric/zoe/src/zoeService/utils.js'; import { setUpZoeForTest } from '@agoric/zoe/tools/setup-zoe.js'; import { E } from '@endo/far'; +import { matches, objectMap } from '@endo/patterns'; +import { makePromiseKit } from '@endo/promise-kit'; import path from 'path'; -import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js'; -import { objectMap } from '@endo/patterns'; -import { deeplyFulfilledObject } from '@agoric/internal'; -import type { Subscriber } from '@agoric/notifier'; -import { MockCctpTxEvidences } from './fixtures.js'; -import { commonSetup } from './supports.js'; -import type { FastUsdcTerms } from '../src/fast-usdc.contract.js'; -import { makeFeeTools } from '../src/utils/fees.js'; -import type { PoolMetrics } from '../src/types.js'; +import type { OperatorKit } from '../src/exos/operator-kit.js'; +import type { FastUsdcSF } from '../src/fast-usdc.contract.js'; +import { PoolMetricsShape } from '../src/type-guards.js'; +import type { CctpTxEvidence, FeeConfig, PoolMetrics } from '../src/types.js'; import { addressTools } from '../src/utils/address.js'; +import { makeFeeTools } from '../src/utils/fees.js'; +import { MockCctpTxEvidences } from './fixtures.js'; +import { commonSetup, uusdcOnAgoric } from './supports.js'; const dirname = path.dirname(new URL(import.meta.url).pathname); const contractFile = `${dirname}/../src/fast-usdc.contract.js`; -type StartFn = typeof import('../src/fast-usdc.contract.js').start; -const { add, isGTE, subtract } = AmountMath; +const agToNoble = fetchedChainInfo.agoric.connections['noble-1']; + +const { add, isGTE, make, subtract, min } = AmountMath; const getInvitationProperties = async ( zoe: ZoeService, @@ -43,76 +55,184 @@ const getInvitationProperties = async ( type CommonSetup = Awaited>; const startContract = async ( - common: Pick, + common: Pick, + operatorQty = 1, ) => { const { brands: { usdc }, commonPrivateArgs, } = common; - const { zoe, bundleAndInstall } = await setUpZoeForTest({ - setJig: jig => { - jig.chainHub.registerChain('osmosis', fetchedChainInfo.osmosis); - jig.chainHub.registerChain('agoric', fetchedChainInfo.agoric); - // TODO #10445 register noble<>agoric and noble<>osmosis instead - // for PFM routing. also will need to call `registerAsset` - jig.chainHub.registerConnection( - fetchedChainInfo.agoric.chainId, - fetchedChainInfo.osmosis.chainId, - fetchedChainInfo.agoric.connections['osmosis-1'], - ); - }, - }); - const installation: Installation = + const { zoe, bundleAndInstall } = await setUpZoeForTest(); + const installation: Installation = await bundleAndInstall(contractFile); const startKit = await E(zoe).startInstance( installation, { USDC: usdc.issuer }, - { - usdcDenom: 'ibc/usdconagoric', - }, + { usdcDenom: uusdcOnAgoric }, commonPrivateArgs, ); - return { ...startKit, zoe }; + const terms = await E(zoe).getTerms(startKit.instance); + + const { subscriber: metricsSub } = E.get( + E.get(E(startKit.publicFacet).getPublicTopics()).poolMetrics, + ); + + const opInvs = await Promise.all( + [...Array(operatorQty).keys()].map(opIx => + E(startKit.creatorFacet).makeOperatorInvitation(`operator-${opIx}`), + ), + ); + + return { + ...startKit, + terms, + zoe, + metricsSub, + invitations: { operator: opInvs }, + }; }; -test('oracle operators have closely-held rights to submit evidence of CCTP transactions', async t => { +const makeTestContext = async (t: ExecutionContext) => { const common = await commonSetup(t); - const { creatorFacet, zoe } = await startContract(common); - const operatorId = 'operator-1'; + const startKit = await startContract(common, 2); + + const { transferBridge } = common.mocks; + const evm = makeEVM(); + + const { inspectBankBridge, inspectLocalBridge } = common.utils; + const snapshot = () => ({ + bank: inspectBankBridge().length, + local: inspectLocalBridge().length, + }); + const since = ix => ({ + bank: inspectBankBridge().slice(ix.bank), + local: inspectLocalBridge().slice(ix.local), + }); + + const sync = { + ocw: makePromiseKit>[]>(), + lp: makePromiseKit>>(), + }; + + const { brands, utils } = common; + const { bankManager } = common.bootstrap; + const receiveUSDCAt = async (addr: string, amount: NatValue) => { + const pmt = await utils.pourPayment(make(brands.usdc.brand, amount)); + const purse = E(E(bankManager).getBankForAddress(addr)).getPurse( + brands.usdc.brand, + ); + return E(purse).deposit(pmt); + }; + + const mint = async (e: CctpTxEvidence) => { + const settlerAddr = 'agoric1fakeLCAAddress1'; // TODO: get from contract + const rxd = await receiveUSDCAt(settlerAddr, e.tx.amount); + await VE(transferBridge).fromBridge( + buildVTransferEvent({ + receiver: e.aux.recipientAddress, + target: settlerAddr, + sourceChannel: agToNoble.transferChannel.counterPartyChannelId, + denom: 'uusdc', + amount: e.tx.amount, + sender: e.tx.forwardingAddress, + }), + ); + await eventLoopIteration(); // let settler do work + return rxd; + }; + + return { bridges: { snapshot, since }, common, evm, mint, startKit, sync }; +}; + +const test = anyTest as TestFn>>; +test.before(async t => (t.context = await makeTestContext(t))); + +test('baggage', async t => { + const { + brands: { usdc }, + commonPrivateArgs, + } = await commonSetup(t); + + let contractBaggage; + const setJig = ({ baggage }) => { + contractBaggage = baggage; + }; + + const { zoe, bundleAndInstall } = await setUpZoeForTest({ setJig }); + const installation: Installation = + await bundleAndInstall(contractFile); + + await E(zoe).startInstance( + installation, + { USDC: usdc.issuer }, + { usdcDenom: uusdcOnAgoric }, + commonPrivateArgs, + ); + + const tree = inspectMapStore(contractBaggage); + t.snapshot(tree, 'contract baggage after start'); +}); - const opInv = await E(creatorFacet).makeOperatorInvitation(operatorId); +const purseOf = + (issuer: Issuer, { pourPayment }) => + async (value: bigint) => { + const brand = await E(issuer).getBrand(); + const purse = E(issuer).makeEmptyPurse(); + const pmt = await pourPayment(make(brand, value)); + await E(purse).deposit(pmt); + return purse; + }; +const makeOracleOperator = async ( + opInv: Invitation, + txSubscriber: Subscriber, + zoe: ZoeService, + t: ExecutionContext, +) => { + let done = 0; + const failures = [] as any[]; t.like(await getInvitationProperties(zoe, opInv), { description: 'oracle operator invitation', }); + // operator only gets `.invitationMakers` + // but for testing, we need `.admin` too. UNTIL #????? const operatorKit = await E(E(zoe).offer(opInv)).getOfferResult(); - t.deepEqual(Object.keys(operatorKit), [ 'admin', 'invitationMakers', 'operator', ]); - - const e1 = MockCctpTxEvidences.AGORIC_NO_PARAMS(); - - { - const inv = await E(operatorKit.invitationMakers).SubmitEvidence(e1); - const res = await E(E(zoe).offer(inv)).getOfferResult(); - t.is(res, 'inert; nothing should be expected from this offer'); - } - - // what removeOperator will do - await E(operatorKit.admin).disable(); - - await t.throwsAsync(E(operatorKit.invitationMakers).SubmitEvidence(e1), { - message: 'submitEvidence for disabled operator', + const { invitationMakers } = operatorKit; + + return harden({ + watch: () => { + void observeIteration(subscribeEach(txSubscriber), { + updateState: tx => + // KLUDGE: tx wouldn't include aux. OCW looks it up + E.when( + E(invitationMakers).SubmitEvidence(tx), + inv => + E.when(E(E(zoe).offer(inv)).getOfferResult(), res => { + t.is(res, 'inert; nothing should be expected from this offer'); + done += 1; + }), + reason => { + failures.push(reason.message); + }, + ), + }); + }, + getDone: () => done, + getFailures: () => harden([...failures]), + // operator only gets .invitationMakers + getKit: () => operatorKit, }); -}); +}; const logAmt = amt => [ Number(amt.value), @@ -127,170 +247,94 @@ const scaleAmount = (frac: number, amount: Amount<'nat'>) => { return multiplyBy(amount, asRatio); }; -const makeLpTools = ( - t: ExecutionContext, - common: Pick, - { - zoe, - terms, - subscriber, - publicFacet, - }: { - zoe: ZoeService; - subscriber: ERef>; - publicFacet: StartedInstanceKit['publicFacet']; - terms: StandardTerms & FastUsdcTerms; - }, +const makeLP = async ( + name: string, + usdcPurse: ERef, + zoe: ZoeService, + instance: Instance, ) => { - const { - brands: { usdc }, - utils, - } = common; - const makeLP = (name, usdcPurse: ERef) => { - const sharePurse = E(terms.issuers.PoolShares).makeEmptyPurse(); - let deposited = AmountMath.makeEmpty(usdc.brand); - const me = harden({ - deposit: async (qty: bigint) => { - const { - value: { shareWorth }, - } = await E(subscriber).getUpdateSince(); - const give = { USDC: usdc.make(qty) }; - const proposal = harden({ - give, - want: { PoolShare: divideBy(give.USDC, shareWorth) }, - }); - t.log(name, 'deposits', ...logAmt(proposal.give.USDC)); - const toDeposit = await E(publicFacet).makeDepositInvitation(); - const payments = { USDC: await E(usdcPurse).withdraw(give.USDC) }; - const payout = await E(zoe) - .offer(toDeposit, proposal, payments) - .then(seat => E(seat).getPayout('PoolShare')) - .then(pmt => E(sharePurse).deposit(pmt)) - .then(a => a as Amount<'nat'>); - t.log(name, 'deposit payout', ...logAmt(payout)); - t.true(isGTE(payout, proposal.want.PoolShare)); - deposited = add(deposited, give.USDC); - }, - - withdraw: async (portion: number) => { - const myShares = await E(sharePurse) - .getCurrentAmount() - .then(a => a as Amount<'nat'>); - const give = { PoolShare: scaleAmount(portion, myShares) }; - const { - value: { shareWorth }, - } = await E(subscriber).getUpdateSince(); - const myUSDC = multiplyBy(myShares, shareWorth); - const myFees = subtract(myUSDC, deposited); - t.log(name, 'sees fees earned', ...logAmt(myFees)); - const proposal = harden({ - give, - want: { USDC: multiplyBy(give.PoolShare, shareWorth) }, - }); - const pct = portion * 100; - t.log(name, 'withdraws', pct, '%:', ...logAmt(proposal.give.PoolShare)); - const toWithdraw = await E(publicFacet).makeWithdrawInvitation(); - const usdcPmt = await E(sharePurse) - .withdraw(proposal.give.PoolShare) - .then(pmt => E(zoe).offer(toWithdraw, proposal, { PoolShare: pmt })) - .then(seat => E(seat).getPayout('USDC')); - const amt = await E(usdcPurse).deposit(usdcPmt); - t.log(name, 'withdraw payout', ...logAmt(amt)); - t.true(isGTE(amt, proposal.want.USDC)); - }, - }); - return me; - }; - const purseOf = (value: bigint) => - E(terms.issuers.USDC) - .makeEmptyPurse() - .then(async p => { - const pmt = await utils.pourPayment(usdc.make(value)); - await p.deposit(pmt); - return p; - }); - return { makeLP, purseOf }; -}; - -test('LP deposits, earns fees, withdraws', async t => { - const common = await commonSetup(t); - const { - commonPrivateArgs, - brands: { usdc }, - utils, - } = common; - - const { instance, creatorFacet, publicFacet, zoe } = - await startContract(common); - const terms = await E(zoe).getTerms(instance); - + const publicFacet = E(zoe).getPublicFacet(instance); const { subscriber } = E.get( E.get(E(publicFacet).getPublicTopics()).poolMetrics, ); + const terms = await E(zoe).getTerms(instance); + const { USDC } = terms.brands; + const sharePurse = E(terms.issuers.PoolShares).makeEmptyPurse(); + let investment = AmountMath.makeEmpty(USDC); + const me = harden({ + deposit: async (t: ExecutionContext, qty: bigint) => { + const { + value: { shareWorth }, + } = await E(subscriber).getUpdateSince(); + const give = { USDC: make(USDC, qty) }; + const proposal = harden({ + give, + want: { PoolShare: divideBy(give.USDC, shareWorth) }, + }); + t.log(name, 'deposits', ...logAmt(proposal.give.USDC)); + const toDeposit = await E(publicFacet).makeDepositInvitation(); + const payments = { USDC: await E(usdcPurse).withdraw(give.USDC) }; + const payout = await E(zoe) + .offer(toDeposit, proposal, payments) + .then(seat => E(seat).getPayout('PoolShare')) + .then(pmt => E(sharePurse).deposit(pmt)) + .then(a => a as Amount<'nat'>); + t.log(name, 'deposit payout', ...logAmt(payout)); + t.true(isGTE(payout, proposal.want.PoolShare)); + investment = add(investment, give.USDC); + }, - const { makeLP, purseOf } = makeLpTools(t, common, { - publicFacet, - subscriber, - terms, - zoe, + withdraw: async (t: ExecutionContext, portion: number) => { + const myShares = await E(sharePurse) + .getCurrentAmount() + .then(a => a as Amount<'nat'>); + const give = { PoolShare: scaleAmount(portion, myShares) }; + const { + value: { shareWorth }, + } = await E(subscriber).getUpdateSince(); + const myUSDC = multiplyBy(myShares, shareWorth); + const myFees = subtract(myUSDC, investment); + t.log(name, 'sees fees earned', ...logAmt(myFees)); + const proposal = harden({ + give, + want: { USDC: multiplyBy(give.PoolShare, shareWorth) }, + }); + const pct = portion * 100; + t.log(name, 'withdraws', pct, '%:', ...logAmt(proposal.give.PoolShare)); + const toWithdraw = await E(publicFacet).makeWithdrawInvitation(); + const usdcPmt = await E(sharePurse) + .withdraw(proposal.give.PoolShare) + .then(pmt => E(zoe).offer(toWithdraw, proposal, { PoolShare: pmt })) + .then(seat => E(seat).getPayout('USDC')); + const amt = await E(usdcPurse).deposit(usdcPmt); + t.log(name, 'withdraw payout', ...logAmt(amt)); + t.true(isGTE(amt, proposal.want.USDC)); + // min() in case things changed between checking metrics and withdrawing + investment = subtract(investment, min(amt, investment)); + return amt; + }, }); - const lps = { - alice: makeLP('Alice', purseOf(60n)), - bob: makeLP('Bob', purseOf(50n)), - }; - - await Promise.all([lps.alice.deposit(60n), lps.bob.deposit(40n)]); - - { - t.log('simulate borrow and repay so pool accrues fees'); - const feeTools = makeFeeTools(commonPrivateArgs.feeConfig); - const requestedAmount = usdc.make(50n); - const splits = feeTools.calculateSplit(requestedAmount); - - const amt = await E(creatorFacet).testBorrow({ USDC: splits.Principal }); - t.deepEqual( - amt.USDC, - splits.Principal, - 'testBorrow returns requested amount', - ); - const repayPayments = await deeplyFulfilledObject( - objectMap(splits, utils.pourPayment), - ); - const remaining = await E(creatorFacet).testRepay(splits, repayPayments); - for (const r of Object.values(remaining)) { - t.is(r.value, 0n, 'testRepay consumes all payments'); - } - } - await Promise.all([lps.alice.withdraw(0.2), lps.bob.withdraw(0.8)]); -}); + return me; +}; -test('LP borrow', async t => { +test.skip('LP borrow - TODO: move to exo test', async t => { const common = await commonSetup(t); const { brands: { usdc }, + utils, } = common; - const { instance, creatorFacet, publicFacet, zoe } = + const { instance, creatorFacet, zoe, metricsSub, terms } = await startContract(common); - const terms = await E(zoe).getTerms(instance); - const { subscriber } = E.get( - E.get(E(publicFacet).getPublicTopics()).poolMetrics, - ); - - const { makeLP, purseOf } = makeLpTools(t, common, { - publicFacet, - subscriber, - terms, - zoe, - }); + const usdcPurse = purseOf(terms.issuers.USDC, utils); const lps = { - alice: makeLP('Alice', purseOf(100n)), + alice: makeLP('Alice', usdcPurse(100n), zoe, instance), }; // seed pool with funds - await lps.alice.deposit(100n); + await E(lps.alice).deposit(t, 100n); - const { value } = await E(subscriber).getUpdateSince(); + const { value } = await E(metricsSub).getUpdateSince(); const { shareWorth, encumberedBalance } = value; const poolSeatAllocation = subtract( subtract(shareWorth.numerator, encumberedBalance), @@ -328,13 +372,13 @@ test('LP borrow', async t => { ); // LPs can still withdraw (contract did not shutdown) - await lps.alice.withdraw(0.5); + await E(lps.alice).withdraw(t, 0.5); const amt = await E(creatorFacet).testBorrow({ USDC: usdc.make(30n) }); t.deepEqual(amt, { USDC: usdc.make(30n) }, 'borrow succeeds'); await eventLoopIteration(); - t.like(await E(subscriber).getUpdateSince(), { + t.like(await E(metricsSub).getUpdateSince(), { value: { encumberedBalance: { value: 30n, @@ -349,7 +393,7 @@ test('LP borrow', async t => { }); }); -test('LP repay', async t => { +test.skip('LP repay - TODO: move to exo test', async t => { const common = await commonSetup(t); const { commonPrivateArgs, @@ -357,29 +401,18 @@ test('LP repay', async t => { utils, } = common; - const { instance, creatorFacet, publicFacet, zoe } = + const { instance, creatorFacet, zoe, metricsSub, terms } = await startContract(common); - const terms = await E(zoe).getTerms(instance); - - const { subscriber } = E.get( - E.get(E(publicFacet).getPublicTopics()).poolMetrics, - ); - const feeTools = makeFeeTools(commonPrivateArgs.feeConfig); - const { makeLP, purseOf } = makeLpTools(t, common, { - publicFacet, - subscriber, - terms, - zoe, - }); + const usdcPurse = purseOf(terms.issuers.USDC, utils); const lps = { - alice: makeLP('Alice', purseOf(100n)), + alice: makeLP('Alice', usdcPurse(100n), zoe, instance), }; // seed pool with funds - await lps.alice.deposit(100n); + await E(lps.alice).deposit(t, 100n); // borrow funds from pool to increase encumbered balance await E(creatorFacet).testBorrow({ USDC: usdc.make(50n) }); - + const feeTools = makeFeeTools(commonPrivateArgs.feeConfig); { t.log('cannot repay more than encumbered balance'); const repayAmounts = feeTools.calculateSplit(usdc.make(100n)); @@ -484,7 +517,7 @@ test('LP repay', async t => { } await eventLoopIteration(); - t.like(await E(subscriber).getUpdateSince(), { + t.like(await E(metricsSub).getUpdateSince(), { value: { encumberedBalance: { value: 0n, @@ -510,115 +543,458 @@ test('LP repay', async t => { }); // LPs can still withdraw (contract did not shutdown) - await lps.alice.withdraw(1); + await E(lps.alice).withdraw(t, 1); }); -test('baggage', async t => { - const { - brands: { usdc }, - commonPrivateArgs, - } = await commonSetup(t); - - let contractBaggage; - const setJig = ({ baggage }) => { - contractBaggage = baggage; +const makeEVM = (template = MockCctpTxEvidences.AGORIC_PLUS_OSMO()) => { + const [settleAddr] = template.aux.recipientAddress.split('?'); + let nonce = 0; + + const makeTx = (amount: bigint, recipientAddress: string): CctpTxEvidence => { + nonce += 1; + + const tx: CctpTxEvidence = harden({ + ...template, + txHash: `0x00000${nonce}`, + blockNumber: template.blockNumber + BigInt(nonce), + blockTimestamp: template.blockTimestamp + BigInt(nonce * 3), + tx: { ...template.tx, amount }, + // KLUDGE: CCTP doesn't know about aux; it would be added by OCW + aux: { ...template.aux, recipientAddress }, + }); + return tx; }; - const { zoe, bundleAndInstall } = await setUpZoeForTest({ setJig }); - const installation: Installation = - await bundleAndInstall(contractFile); + const txPub = makePublishKit(); - await E(zoe).startInstance( - installation, - { USDC: usdc.issuer }, - { - usdcDenom: 'ibc/usdconagoric', + return harden({ cctp: { makeTx }, txPub }); +}; + +const makeCustomer = ( + who: string, + cctp: ReturnType['cctp'], + txPublisher: Publisher, + feeConfig: FeeConfig, // TODO: get from vstorage (or at least: a subscriber) +) => { + const USDC = feeConfig.flat.brand; + const feeTools = makeFeeTools(feeConfig); + const sent = [] as CctpTxEvidence[]; + + // TODO: get settlerAddr from vstorage + const [settleAddr] = + MockCctpTxEvidences.AGORIC_PLUS_OSMO().aux.recipientAddress.split('?'); + + const me = harden({ + checkPoolAvailable: async ( + t: ExecutionContext, + want: NatValue, + metricsSub: ERef>, + ) => { + const { value: m } = await E(metricsSub).getUpdateSince(); + const { numerator: poolBalance } = m.shareWorth; // XXX awkward API? + const enough = poolBalance.value > want; + t.log(who, 'sees', poolBalance.value, enough ? '>' : 'NOT >', want); + return enough; }, - commonPrivateArgs, - ); + sendFast: async (t: ExecutionContext, amount: bigint, EUD: string) => { + const recipientAddress = `${settleAddr}?EUD=${EUD}`; + // KLUDGE: UI would ask noble for a forwardingAddress + // "cctp" here has some noble stuff mixed in. + const tx = cctp.makeTx(amount, recipientAddress); + t.log(who, 'signs CCTP for', amount, 'uusdc w/EUD:', EUD); + txPublisher.publish(tx); + sent.push(tx); + await eventLoopIteration(); + return tx; + }, + checkSent: ( + t: ExecutionContext, + { bank = [] as any[], local = [] as any[] } = {}, + forward?: unknown, + ) => { + const evidence = sent.shift(); + if (!evidence) throw t.fail('nothing sent'); + + // C3 - Contract MUST calculate AdvanceAmount by ... + // Mostly, see unit tests for calculateAdvance, calculateSplit + const toReceive = forward + ? { value: evidence.tx.amount } + : feeTools.calculateAdvance(AmountMath.make(USDC, evidence.tx.amount)); + + if (forward) { + t.log(who, 'waits for fallback / forward'); + t.deepEqual(bank, []); // no vbank GIVE / GRAB + } + + const { EUD } = addressTools.getQueryParams( + evidence.aux.recipientAddress, + ); - const tree = inspectMapStore(contractBaggage); - t.snapshot(tree, 'contract baggage after start'); -}); + const myMsg = local.find(lm => { + if (lm.type !== 'VLOCALCHAIN_EXECUTE_TX') return false; + const [ibcTransferMsg] = lm.messages; + return ( + ibcTransferMsg['@type'] === + '/ibc.applications.transfer.v1.MsgTransfer' && + ibcTransferMsg.receiver === EUD + ); + }); + if (!myMsg) { + if (forward) return; + throw t.fail(`no MsgTransfer to ${EUD}`); + } + const [ibcTransferMsg] = myMsg.messages; + // C4 - Contract MUST release funds to the end user destination address + // in response to invocation by the off-chain watcher that + // an acceptable Fast USDC Transaction has been initiated. + t.deepEqual( + ibcTransferMsg.token, + { amount: String(toReceive.value), denom: uusdcOnAgoric }, + 'C4', + ); -test('advancing happy path', async t => { - const common = await commonSetup(t); - const { - brands: { usdc }, - commonPrivateArgs, - utils: { inspectLocalBridge, inspectBankBridge, transmitTransferAck }, - } = common; + t.log(who, 'sees', ibcTransferMsg.token, 'sent to', EUD); + // TODO #10445 expect PFM memo + t.is(ibcTransferMsg.memo, '', 'TODO expecting PFM memo'); - const { instance, publicFacet, zoe } = await startContract(common); - const terms = await E(zoe).getTerms(instance); - const { subscriber } = E.get( - E.get(E(publicFacet).getPublicTopics()).poolMetrics, - ); - const feeTools = makeFeeTools(commonPrivateArgs.feeConfig); - const { makeLP, purseOf } = makeLpTools(t, common, { - publicFacet, - subscriber, - terms, - zoe, + // TODO #10445 expect routing through noble, not osmosis + t.is( + ibcTransferMsg.sourceChannel, + fetchedChainInfo.agoric.connections['osmosis-1'].transferChannel + .channelId, + 'TODO expecting routing through Noble', + ); + }, }); + return me; +}; - const evidence = await E(MockCctpTxEvidences.AGORIC_PLUS_OSMO)(); - - // seed pool with funds - const alice = makeLP('Alice', purseOf(evidence.tx.amount)); - await alice.deposit(evidence.tx.amount); - - // the invitation maker itself pushes the evidence - const inv = await E(publicFacet).makeTestPushInvitation(evidence); - const seat = await E(zoe).offer(inv); - t.is( - await E(seat).getOfferResult(), - 'inert; nothing should be expected from this offer', +test.serial('OCW operators redeem invitations and start watching', async t => { + const { + startKit: { zoe, invitations }, + evm: { txPub }, + sync, + } = t.context; + const operators = await Promise.all( + invitations.operator.map(async opInv => { + const op = makeOracleOperator(opInv, txPub.subscriber, zoe, t); + await E(op).watch(); + return op; + }), ); + sync.ocw.resolve(operators); +}); - // calculate advance net of fees - const expectedAdvance = feeTools.calculateAdvance( - usdc.make(evidence.tx.amount), - ); - t.log('Expecting to observe advance of', expectedAdvance); +// XXX: replace test.serial() with promise synchronization? + +test.serial('C25 - LPs can deposit USDC', async t => { + const { + startKit: { zoe, instance, metricsSub }, + common: { + utils, + brands: { usdc }, + }, + sync, + } = t.context; + const usdcPurse = purseOf(usdc.issuer, utils); + // C25 - MUST support multiple liquidity providers + const lp = { + lp50: makeLP('Logan', usdcPurse(50_000_000n), zoe, instance), + lp200: makeLP('Larry', usdcPurse(200_000_000n), zoe, instance), + }; - await eventLoopIteration(); // let Advancer do work + const { + value: { + shareWorth: { numerator: balance0 }, + }, + } = await E(metricsSub).getUpdateSince(); + + await Promise.all([ + E(lp.lp200).deposit(t, 200_000_000n), + E(lp.lp50).deposit(t, 50_000_000n), + ]); + + sync.lp.resolve(lp); + const { + value: { + shareWorth: { numerator: poolBalance }, + }, + } = await E(metricsSub).getUpdateSince(); + t.deepEqual(poolBalance, make(usdc.brand, 250_000_000n + balance0.value)); +}); - // advance sent from PoolSeat to PoolAccount +test.serial('STORY01: advancing happy path for 100 USDC', async t => { + const { + common: { + brands: { usdc }, + commonPrivateArgs: { feeConfig }, + utils: { inspectBankBridge, transmitTransferAck }, + }, + evm: { cctp, txPub }, + startKit: { metricsSub }, + bridges: { snapshot, since }, + mint, + } = t.context; + const cust1 = makeCustomer('Carl', cctp, txPub.publisher, feeConfig); + + const bridgePos = snapshot(); + const sent1 = await cust1.sendFast(t, 108_000_000n, 'osmo1234advanceHappy'); + await transmitTransferAck(); // ack IBC transfer for advance + // Nothing we can check here, unless we want to inspect calls to `trace`. + // `test/exos/advancer.test.ts` covers calls to `log: LogFn` with mocks. + // This is still helpful to call, so we can observe "Advance transfer + // fulfilled" in the test output. + + const { calculateAdvance, calculateSplit } = makeFeeTools(feeConfig); + const expectedAdvance = calculateAdvance(usdc.make(sent1.tx.amount)); + t.log('advancer sent to PoolAccount', expectedAdvance); t.deepEqual(inspectBankBridge().at(-1), { amount: String(expectedAdvance.value), - denom: 'ibc/usdconagoric', + denom: uusdcOnAgoric, recipient: 'agoric1fakeLCAAddress', type: 'VBANK_GIVE', }); - // ibc transfer sent over localChain bridge - const localBridgeMsg = inspectLocalBridge().at(-1); - const ibcTransferMsg = localBridgeMsg.messages[0]; - t.is(ibcTransferMsg['@type'], '/ibc.applications.transfer.v1.MsgTransfer'); + cust1.checkSent(t, since(bridgePos)); - const expectedReceiver = addressTools.getQueryParams( - evidence.aux.recipientAddress, - ).EUD; - t.is(ibcTransferMsg.receiver, expectedReceiver, 'sent to correct address'); - t.deepEqual(ibcTransferMsg.token, { - amount: String(expectedAdvance.value), - denom: 'ibc/usdconagoric', - }); + const emptyMetrics = { + encumberedBalance: usdc.makeEmpty(), + shareWorth: { + numerator: usdc.make(1n), + denominator: { value: 1n }, + }, + totalBorrows: usdc.makeEmpty(), + totalContractFees: usdc.makeEmpty(), + totalPoolFees: usdc.makeEmpty(), + totalRepays: usdc.makeEmpty(), + }; + const par250 = { + numerator: usdc.make(250_000_001n), + denominator: { value: 250_000_001n }, + }; - // TODO #10445 expect PFM memo - t.is(ibcTransferMsg.memo, '', 'TODO expecting PFM memo'); + t.like( + await E(metricsSub) + .getUpdateSince() + .then(r => r.value), + { + ...emptyMetrics, + encumberedBalance: expectedAdvance, + shareWorth: par250, + totalBorrows: expectedAdvance, + }, + 'metrics while advancing', + ); - // TODO #10445 expect routing through noble, not osmosis - t.is( - ibcTransferMsg.sourceChannel, - fetchedChainInfo.agoric.connections['osmosis-1'].transferChannel.channelId, - 'TODO expecting routing through Noble', + await mint(sent1); + + // C8 - "Contract MUST be able to initialize settlement process when Noble mints USDC." + // The metrics are a useful proxy, but the contract could lie. + // The real test of whether the contract turns minted funds into liquidity is + // the ability to advance the funds (in later tests). + const split = calculateSplit(usdc.make(sent1.tx.amount)); + t.like( + await E(metricsSub) + .getUpdateSince() + .then(r => r.value), + { + ...emptyMetrics, + shareWorth: { + ...par250, + numerator: add(par250.numerator, split.PoolFee), + }, + totalBorrows: { value: 105839999n }, + totalContractFees: { value: 432000n }, + totalPoolFees: { value: 1728001n }, + totalRepays: { value: 105839999n }, + }, + 'metrics after advancing', ); +}); + +// most likely in exo unit tests +test.todo( + 'C21 - Contract MUST log / timestamp each step in the transaction flow', +); + +test.serial('STORY03: see accounting metrics', async t => { + const { + common: { + brands: { usdc }, + }, + startKit: { metricsSub }, + } = t.context; + const { value: metrics } = await E(metricsSub).getUpdateSince(); + t.log(metrics); + t.true(matches(metrics, PoolMetricsShape)); +}); +test.todo('document metrics storage schema'); +test.todo('get metrics from vstorage'); + +test.serial('STORY05: LP collects fees on 100 USDC', async t => { + const { + sync, + common: { + brands: { usdc }, + }, + } = t.context; + + const lp = await sync.lp.promise; + const got = await E(lp.lp200).withdraw(t, 0.5); // redeem 1/2 my shares + + // C3 - Contract MUST calculate ... + // Mostly, see unit tests for calculateAdvance, calculateSplit + // TODO: add a feeTools unit test for the magic number below. + t.deepEqual(got, add(usdc.units(100), usdc.make(691_200n))); + + await E(lp.lp200).deposit(t, 100_000_000n); // put all but the fees back in +}); + +test.serial('With 250 available, 3 race to get ~100', async t => { + const { + bridges: { snapshot, since }, + evm: { cctp, txPub }, + common: { + commonPrivateArgs: { feeConfig }, + utils: { transmitTransferAck }, + }, + startKit: { metricsSub }, + mint, + } = t.context; + + const cust = { + racer1: makeCustomer('Racer1', cctp, txPub.publisher, feeConfig), + racer2: makeCustomer('Racer2', cctp, txPub.publisher, feeConfig), + racer3: makeCustomer('Racer3', cctp, txPub.publisher, feeConfig), + }; + + await cust.racer3.checkPoolAvailable(t, 125_000_000n, metricsSub); + + const bridgePos = snapshot(); + const [sent1, sent2, sent3] = await Promise.all([ + cust.racer1.sendFast(t, 110_000_000n, 'osmo1234a'), + cust.racer2.sendFast(t, 120_000_000n, 'osmo1234b'), + cust.racer3.sendFast(t, 125_000_000n, 'osmo1234c'), + ]); + cust.racer1.checkSent(t, since(bridgePos)); + cust.racer2.checkSent(t, since(bridgePos)); + // TODO/WIP: cust.racer3.checkSent(t, since(bridgePos), 'forward - LP depleted'); await transmitTransferAck(); - // Nothing we can check here, unless we want to inspect calls to `trace`. - // `test/exos/advancer.test.ts` covers calls to `log: LogFn` with mocks. - // This is still helpful to call, so we can observe "Advance transfer - // fulfilled" in the test output. + await transmitTransferAck(); + await transmitTransferAck(); + await Promise.all([mint(sent1), mint(sent2), mint(sent3)]); +}); + +test.serial('STORY05(cont): LPs withdraw all liquidity', async t => { + const { + sync, + common: { + brands: { usdc }, + }, + } = t.context; + + const lp = await sync.lp.promise; + const [a, b] = await Promise.all([ + E(lp.lp200).withdraw(t, 1), + E(lp.lp50).withdraw(t, 1), + ]); + t.log({ a, b, sum: add(a, b) }); + t.truthy(a); + t.truthy(b); }); + +test.serial('STORY09: insufficient liquidity: no FastUSDC option', async t => { + // STORY09 - As the Fast USDC end user, + // I should see the option to use Fast USDC unavailable + // on the UI (and unusable) if there are not funds in the + // MarketMaker’s account + const { + common: { + commonPrivateArgs: { feeConfig }, + }, + evm: { cctp, txPub }, + startKit: { metricsSub }, + } = t.context; + const early = makeCustomer('Unice', cctp, txPub.publisher, feeConfig); + const available = await early.checkPoolAvailable(t, 5_000_000n, metricsSub); + t.false(available); +}); + +test.serial('C20 - Contract MUST function with an empty pool', async t => { + const { + common: { + commonPrivateArgs: { feeConfig }, + utils: { transmitTransferAck }, + }, + evm: { cctp, txPub }, + startKit: { metricsSub }, + bridges: { snapshot, since }, + mint, + } = t.context; + const custEmpty = makeCustomer('Earl', cctp, txPub.publisher, feeConfig); + const bridgePos = snapshot(); + const sent = await custEmpty.sendFast(t, 150_000_000n, 'osmo123'); + const bridgeTraffic = since(bridgePos); + await mint(sent); + custEmpty.checkSent(t, bridgeTraffic, 'forward'); + t.log('No advancement, just settlement'); + await transmitTransferAck(); // ack IBC transfer for forward +}); + +// advancedEarly stuff +test.todo( + 'C12 - Contract MUST only pay back the Pool only if they started the advance before USDC is minted', +); + +test.todo('C18 - forward - MUST log and alert these incidents'); + +test.serial('Settlement for unknown transaction (operator down)', async t => { + const { + sync, + bridges: { snapshot, since }, + evm: { cctp, txPub }, + common: { + commonPrivateArgs: { feeConfig }, + utils: { transmitTransferAck }, + }, + mint, + } = t.context; + const operators = await sync.ocw.promise; + + const opDown = makeCustomer('Otto', cctp, txPub.publisher, feeConfig); + + // what removeOperator will do + await E(E.get(E(operators[1]).getKit()).admin).disable(); + const bridgePos = snapshot(); + const sent = await opDown.sendFast(t, 20_000_000n, 'osmo12345'); + await mint(sent); + const bridgeTraffic = since(bridgePos); + + t.like( + bridgeTraffic.bank, + [ + { + amount: '20000000', + sender: 'faucet', + type: 'VBANK_GRAB', + }, + { + amount: '20000000', + recipient: 'agoric1fakeLCAAddress1', + type: 'VBANK_GIVE', + }, + ], + '20 USDC arrive at the settlement account', + ); + t.deepEqual(bridgeTraffic.local, [], 'no IBC transfers'); + + await transmitTransferAck(); + t.deepEqual(await E(operators[1]).getFailures(), [ + 'submitEvidence for disabled operator', + ]); +}); + +test.todo( + 'fee levels MUST be visible to external parties - i.e., written to public storage', +); From 49bd809cf188e37467321d45a296721e4bffd81f Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 26 Nov 2024 15:01:17 -0600 Subject: [PATCH 081/174] chore: update snapshots for chainInfo --- .../snapshots/fast-usdc.contract.test.ts.md | 513 +++++++++++++++++- .../snapshots/fast-usdc.contract.test.ts.snap | Bin 2050 -> 5662 bytes 2 files changed, 510 insertions(+), 3 deletions(-) diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md index ec82b58c800..42cfa097928 100644 --- a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md +++ b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md @@ -32,8 +32,12 @@ Generated by [AVA](https://avajs.dev). ChainHub_singleton: 'Alleged: ChainHub', bech32PrefixToChainName: { agoric: 'agoric', + noble: 'noble', + osmo: 'osmosis', + }, + brandDenom: { + 'Alleged: USDC brand': 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9', }, - brandDenom: {}, chainInfos: { agoric: { bech32Prefix: 'agoric', @@ -45,9 +49,512 @@ Generated by [AVA](https://avajs.dev). }, ], }, + noble: { + bech32Prefix: 'noble', + chainId: 'noble-1', + icqEnabled: false, + }, + osmosis: { + bech32Prefix: 'osmo', + chainId: 'osmosis-1', + icqEnabled: 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_omniflixhub-1': { + client_id: '07-tendermint-73', + counterparty: { + client_id: '07-tendermint-47', + connection_id: 'connection-40', + }, + id: 'connection-67', + state: 3, + transferChannel: { + channelId: 'channel-58', + counterPartyChannelId: 'channel-30', + 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', + }, + }, + 'agoric-3_secret-4': { + client_id: '07-tendermint-17', + counterparty: { + client_id: '07-tendermint-111', + connection_id: 'connection-80', + }, + id: 'connection-17', + state: 3, + transferChannel: { + channelId: 'channel-10', + counterPartyChannelId: 'channel-51', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'agoric-3_stride-1': { + client_id: '07-tendermint-74', + counterparty: { + client_id: '07-tendermint-129', + connection_id: 'connection-118', + }, + id: 'connection-68', + state: 3, + transferChannel: { + channelId: 'channel-59', + counterPartyChannelId: 'channel-148', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'agoric-3_umee-1': { + client_id: '07-tendermint-18', + counterparty: { + client_id: '07-tendermint-152', + connection_id: 'connection-101', + }, + id: 'connection-18', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-42', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'celestia_osmosis-1': { + client_id: '07-tendermint-10', + counterparty: { + client_id: '07-tendermint-3012', + connection_id: 'connection-2503', + }, + id: 'connection-2', + state: 3, + transferChannel: { + channelId: 'channel-2', + counterPartyChannelId: 'channel-6994', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'cosmoshub-4_noble-1': { + client_id: '07-tendermint-1116', + counterparty: { + client_id: '07-tendermint-4', + connection_id: 'connection-12', + }, + id: 'connection-790', + state: 3, + transferChannel: { + channelId: 'channel-536', + counterPartyChannelId: 'channel-4', + 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', + }, + }, + 'dydx-mainnet-1_osmosis-1': { + client_id: '07-tendermint-3', + counterparty: { + client_id: '07-tendermint-3009', + connection_id: 'connection-2500', + }, + id: 'connection-7', + state: 3, + transferChannel: { + channelId: 'channel-3', + counterPartyChannelId: 'channel-6787', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'juno-1_noble-1': { + client_id: '07-tendermint-334', + counterparty: { + client_id: '07-tendermint-3', + connection_id: 'connection-8', + }, + id: 'connection-322', + state: 3, + transferChannel: { + channelId: 'channel-224', + counterPartyChannelId: 'channel-3', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'juno-1_osmosis-1': { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-1457', + connection_id: 'connection-1142', + }, + id: 'connection-0', + state: 3, + transferChannel: { + channelId: 'channel-0', + counterPartyChannelId: 'channel-42', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'neutron-1_noble-1': { + client_id: '07-tendermint-40', + counterparty: { + client_id: '07-tendermint-25', + connection_id: 'connection-34', + }, + id: 'connection-31', + state: 3, + transferChannel: { + channelId: 'channel-30', + counterPartyChannelId: 'channel-18', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'neutron-1_osmosis-1': { + client_id: '07-tendermint-19', + counterparty: { + client_id: '07-tendermint-2823', + connection_id: 'connection-2338', + }, + id: 'connection-18', + state: 3, + transferChannel: { + channelId: 'channel-10', + counterPartyChannelId: 'channel-874', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'noble-1_omniflixhub-1': { + client_id: '07-tendermint-68', + counterparty: { + client_id: '07-tendermint-51', + connection_id: 'connection-49', + }, + id: 'connection-65', + state: 3, + transferChannel: { + channelId: 'channel-44', + counterPartyChannelId: 'channel-38', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'noble-1_osmosis-1': { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-2704', + connection_id: 'connection-2241', + }, + id: 'connection-2', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-750', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'noble-1_secret-4': { + client_id: '07-tendermint-24', + counterparty: { + client_id: '07-tendermint-170', + connection_id: 'connection-127', + }, + id: 'connection-33', + state: 3, + transferChannel: { + channelId: 'channel-17', + counterPartyChannelId: 'channel-88', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'noble-1_stargaze-1': { + client_id: '07-tendermint-16', + counterparty: { + client_id: '07-tendermint-287', + connection_id: 'connection-214', + }, + id: 'connection-25', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-204', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'noble-1_umee-1': { + client_id: '07-tendermint-73', + counterparty: { + client_id: '07-tendermint-248', + connection_id: 'connection-210', + }, + id: 'connection-74', + state: 3, + transferChannel: { + channelId: 'channel-51', + counterPartyChannelId: 'channel-120', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'omniflixhub-1_osmosis-1': { + client_id: '07-tendermint-8', + counterparty: { + client_id: '07-tendermint-1829', + connection_id: 'connection-1431', + }, + id: 'connection-8', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-199', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'osmosis-1_secret-4': { + client_id: '07-tendermint-1588', + counterparty: { + client_id: '07-tendermint-2', + connection_id: 'connection-1', + }, + id: 'connection-1244', + state: 3, + transferChannel: { + channelId: 'channel-88', + counterPartyChannelId: 'channel-1', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'osmosis-1_stargaze-1': { + client_id: '07-tendermint-1562', + counterparty: { + client_id: '07-tendermint-0', + connection_id: 'connection-0', + }, + id: 'connection-1223', + state: 3, + transferChannel: { + channelId: 'channel-75', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'osmosis-1_stride-1': { + client_id: '07-tendermint-2119', + counterparty: { + client_id: '07-tendermint-1', + connection_id: 'connection-2', + }, + id: 'connection-1657', + state: 3, + transferChannel: { + channelId: 'channel-326', + counterPartyChannelId: 'channel-5', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'osmosis-1_umee-1': { + client_id: '07-tendermint-1805', + counterparty: { + client_id: '07-tendermint-6', + connection_id: 'connection-0', + }, + id: 'connection-1410', + state: 3, + transferChannel: { + channelId: 'channel-184', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + }, + denom: { + 'ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4': { + baseDenom: 'uusdc', + baseName: 'noble', + brandKey: undefined, + chainName: 'osmosis', + }, + 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9': { + baseDenom: 'uusdc', + baseName: 'noble', + brand: Object @Alleged: USDC brand {}, + brandKey: 'USDC', + chainName: 'agoric', + }, + uusdc: { + baseDenom: 'uusdc', + baseName: 'noble', + chainName: 'noble', + }, }, - connectionInfos: {}, - denom: {}, lookupChainInfo_kindHandle: 'Alleged: kind', lookupChainsAndConnection_kindHandle: 'Alleged: kind', lookupConnectionInfo_kindHandle: 'Alleged: kind', diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap index 5e8c6efc2ee166cdb8debd759e505f5ff9a38a96..dcb9a05cb2547cce336ef8a28f82ece5c24e5a80 100644 GIT binary patch literal 5662 zcmV+(7UAhZRzVo*{p=?5ITH!h)b_~MaisQvq0v~xeKo+ zjR5Uq`X7r300000000B!oq2TJ)pf@|BU$@uOR}uRSQspMldaijEMu(2Lb4=Vi}y|b zY33(stkH}-GxEk_C(S}3IR%%}(4TVwu~UEkEO*ApD8>-L0( z#yviFr{Z&a)hMi}#p_i^RriLvaGM~bY(RDS18y~t1hLp)xX}R7<~${M(&y^%`j2Z( z-_bSYy2ccbuXAcxYpKf6xA=XbfZ_^?c8que!BCgar38FR$m92Qt0%R#j1o=8$8<7^ z`~laP8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zd7heS0#${7GpfDU+_=DaSXc>Lt@Y5{*FE^Jw|k*%OYoE|Y5m2efO#I$0k-!g>Fy(5ZC{ zAb)?2##xSHOi$wkKRR+46T%=eo5!tw*| zNRoVq>TTu@gawe4dO>(S=O%OQ!~V>6ng(|vf+AEi=0}^{5wx1v8@AXp9rhS?_1(!& zPUEKNUFR;dIklWqoRk@F-5aiHIVTI!m!$n}*s^0v`1qv0Yk zy9OMn3!ERjfEIG_TQ%VOD#?YhBo|eZ_)lxVFKWQTj6!sGXuTUVz$aALrBIlh8Q^dR zczFi+w+g>6#JX|@c=U_{yML?~?+Z=mL`m0Ni*e@P58k5$B4H`o61J%;Ujt~7kY~;u zWw9)cd(zh=X<85Z(jp=Mlmx}#;@uFvU}}6|R-)|;dcX+#=C^Ii9qP>tC+%zfa$Y2a zON(Th!nXVCdy;QRlA^&n!ZBT+)R+H8)?^2M)%2&ixd_9HgltOB(>CkS!vWQ2B|)iY zy1Rx=d&9LNT+a3zrLA3R4;?HI9sHEOv*z_S!}z=*(U~A6oLlzQgP-#tmklrm-=b`X+O_mV4U!GDI+Do>8%pfvs;GH617OC_|Es zI-u2ol{(T=p~#Od6w?)QK4L8K#*RV0MyXXR&MI%aWp+fFCPE9E( z!KLzpI`EQuR_+R2e(%rC$*Id01AB_Eue=U1MPFE<9iNyT1m0B@*qD*V?@z<)J3oQ=Cp%U~95 gGV5R=_;p7c{3@o=9hcdf<5JuG4>(V4Mmie+0Fxi;;Q#;t From dcc6feb1a9234df55fc92c0d9f537d9c1b371850 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 27 Nov 2024 10:55:24 -0600 Subject: [PATCH 082/174] chore: settler: don't forward without evidence --- packages/fast-usdc/src/exos/settler.js | 10 +++++---- packages/fast-usdc/test/exos/settler.test.ts | 23 +++++++++----------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/packages/fast-usdc/src/exos/settler.js b/packages/fast-usdc/src/exos/settler.js index ac74679cc06..72f1e1f9626 100644 --- a/packages/fast-usdc/src/exos/settler.js +++ b/packages/fast-usdc/src/exos/settler.js @@ -166,11 +166,13 @@ export const prepareSettler = ( this.state.mintedEarly.add(makeMintedEarlyKey(sender, amount)); return; - case undefined: case PendingTxStatus.Observed: case PendingTxStatus.AdvanceFailed: + return self.forward(found.txHash, sender, amount, EUD); + + case undefined: default: - return self.forward(found?.txHash, sender, amount, EUD); + log('⚠️ tap: no status for ', sender, amount); } }, }, @@ -247,7 +249,7 @@ export const prepareSettler = ( statusManager.disbursed(txHash); }, /** - * @param {EvmHash | undefined} txHash + * @param {EvmHash} txHash * @param {NobleAddress} sender * @param {NatValue} fullValue * @param {string} EUD @@ -275,7 +277,7 @@ export const prepareSettler = ( * @param {SettlerTransferCtx} ctx * * @typedef {{ - * txHash: EvmHash | undefined; + * txHash: EvmHash; * sender: NobleAddress; * fullValue: NatValue; * }} SettlerTransferCtx diff --git a/packages/fast-usdc/test/exos/settler.test.ts b/packages/fast-usdc/test/exos/settler.test.ts index d4c82a7652b..c970f55eaed 100644 --- a/packages/fast-usdc/test/exos/settler.test.ts +++ b/packages/fast-usdc/test/exos/settler.test.ts @@ -79,6 +79,7 @@ const makeTestContext = async t => { feeConfig: common.commonPrivateArgs.feeConfig, vowTools: common.bootstrap.vowTools, chainHub, + log, }); const defaultSettlerParams = harden({ @@ -307,7 +308,6 @@ test('Settlement for unknown transaction', async t => { peekCalls, inspectLogs, } = t.context; - const { usdc } = common.brands; const settler = makeSettler({ repayer, @@ -319,22 +319,19 @@ test('Settlement for unknown transaction', async t => { void settler.tap.receiveUpcall(MockVTransferEvents.AGORIC_PLUS_OSMO()); await eventLoopIteration(); - t.log('USDC was forwarded'); + t.log('Nothing was transferrred'); t.deepEqual(peekCalls(), []); - t.deepEqual(accounts.settlement.callLog, [ + t.deepEqual(accounts.settlement.callLog, []); + t.like(inspectLogs(), [ + ['config', { sourceChannel: 'channel-21' }], + ['upcall event'], + ['dequeued', undefined], [ - 'transfer', - { - chainId: 'osmosis-1', - encoding: 'bech32', - value: 'osmo183dejcnmkka5dzcu9xw6mywq0p2m5peks28men', - }, - usdc.units(150), + '⚠️ tap: no status for ', + 'noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelqkd', + 150000000n, ], ]); - t.deepEqual(inspectLogs(0), [ - '⚠️ Forwarded minted amount 150000000 from account noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelqkd before it was observed.', - ]); }); test.todo("StatusManager does not receive update when we can't settle"); From 08b2e13921514258de566c52aeda737a28ed44c7 Mon Sep 17 00:00:00 2001 From: samsiegart Date: Wed, 27 Nov 2024 11:17:39 -0800 Subject: [PATCH 083/174] feat(fast-usdc): publish feeConfig to vstorage --- .../boot/test/fast-usdc/fast-usdc.test.ts | 9 +++++++ .../fast-usdc/snapshots/fast-usdc.test.ts.md | 14 +++++++++++ .../snapshots/fast-usdc.test.ts.snap | Bin 806 -> 1010 bytes packages/fast-usdc/src/fast-usdc.contract.js | 22 ++++++++++++++---- 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/packages/boot/test/fast-usdc/fast-usdc.test.ts b/packages/boot/test/fast-usdc/fast-usdc.test.ts index c75205d5cb4..73d8b4e6baf 100644 --- a/packages/boot/test/fast-usdc/fast-usdc.test.ts +++ b/packages/boot/test/fast-usdc/fast-usdc.test.ts @@ -117,6 +117,15 @@ test.serial('writes feed policy to vstorage', async t => { await documentStorageSchema(t, storage, doc); }); +test.serial('writes fee config to vstorage', async t => { + const { storage } = t.context; + const doc = { + node: 'fastUsdc.feeConfig', + owner: 'the fee configuration for Fast USDC', + }; + await documentStorageSchema(t, storage, doc); +}); + test.serial('writes status updates to vstorage', async t => { const { walletFactoryDriver: wd, storage } = t.context; const wallet = await wd.provideSmartWallet( diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md index fb98a2008c2..08400eda5f5 100644 --- a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md +++ b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md @@ -18,6 +18,20 @@ Generated by [AVA](https://avajs.dev). ], ] +## writes fee config to vstorage + +> Under "published", the "fastUsdc.feeConfig" node is delegated to the fee configuration for Fast USDC. +> The example below illustrates the schema of the data published there. +> +> See also board marshalling conventions (_to appear_). + + [ + [ + 'published.fastUsdc.feeConfig', + '{"blockHeight":"0","values":["{\\"body\\":\\"#{\\\\\\"contractRate\\\\\\":{\\\\\\"denominator\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0.Alleged: USDC brand\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+10\\\\\\"},\\\\\\"numerator\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+2\\\\\\"}},\\\\\\"flat\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+10000\\\\\\"},\\\\\\"maxVariable\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+5000000\\\\\\"},\\\\\\"variableRate\\\\\\":{\\\\\\"denominator\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+100\\\\\\"},\\\\\\"numerator\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+1\\\\\\"}}}\\",\\"slots\\":[\\"board01029\\"]}"]}', + ], + ] + ## writes status updates to vstorage > Under "published", the "fastUsdc.status" node is delegated to the statuses of fast USDC transfers identified by their tx hashes. diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap index 9282a421d07b53e46e7250e0c04444c0fb5ddd81..2a1d52ca9c2583ea874af629b23823841ca7e292 100644 GIT binary patch literal 1010 zcmVSuC=?)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AE};KJc*cbWzK7^GjLz z>p!e?BLK(%;NexgbXs1Xt_yDv5}J{;d%OjJ4*>8jxeT4_r2CWr{6YXeUJ!P#WNi8g z#@2`KM@x~%g~;M4EwYFwgB>vxX~ac5%;O9TA=5OAzNrt+=ny|G(_~3$P&a^lk} node + * @param {ERef} marshaller + * @param {FeeConfig} feeConfig + */ +const publishFeeConfig = async (node, marshaller, feeConfig) => { + const feeNode = E(node).makeChildNode(FEE_NODE); + const value = await E(marshaller).toCapData(feeConfig); + return E(feeNode).setValue(JSON.stringify(value)); +}; + /** * @param {ZCF} zcf * @param {OrchestrationPowers & { @@ -80,14 +93,13 @@ export const contract = async (zcf, privateArgs, zone, tools) => { assert('USDC' in terms.brands, 'no USDC brand'); assert('usdcDenom' in terms, 'no usdcDenom'); - const { feeConfig, marshaller } = privateArgs; + const { feeConfig, marshaller, storageNode } = privateArgs; const { makeRecorderKit } = prepareRecorderKitMakers( zone.mapStore('vstorage'), marshaller, ); - const makeStatusNode = () => - E(privateArgs.storageNode).makeChildNode(STATUS_NODE); + const makeStatusNode = () => E(storageNode).makeChildNode(STATUS_NODE); const statusManager = prepareStatusManager(zone, makeStatusNode); const { USDC } = terms.brands; @@ -209,6 +221,8 @@ export const contract = async (zcf, privateArgs, zone, tools) => { // So we use zone.exoClassKit above to define the liquidity pool kind // and pass the shareMint into the maker / init function. + void publishFeeConfig(storageNode, marshaller, feeConfig); + const shareMint = await provideSingleton( zone.mapStore('mint'), 'PoolShare', From 07d12d489208735a8304866e3c59e9dc0cd19f13 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 27 Nov 2024 15:08:09 -0600 Subject: [PATCH 084/174] feat: showValue option for documentStorageSchema --- packages/internal/src/storage-test-utils.js | 37 ++++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/packages/internal/src/storage-test-utils.js b/packages/internal/src/storage-test-utils.js index f224c47ad93..143a6bbd444 100644 --- a/packages/internal/src/storage-test-utils.js +++ b/packages/internal/src/storage-test-utils.js @@ -7,6 +7,7 @@ import { makeTracer } from './debug.js'; import { isStreamCell, makeChainStorageRoot } from './lib-chainStorage.js'; import { bindAllMethods } from './method-tools.js'; import { eventLoopIteration } from './testing-utils.js'; +import { NonNullish } from './errors.js'; /** * @import {TotalMap} from './types.js'; @@ -250,30 +251,48 @@ export const makeMockChainStorageRoot = () => { * @param {import('ava').ExecutionContext} t * @param {MockChainStorageRoot | FakeStorageKit} storage * @param {({ note: string } | { node: string; owner: string }) & - * ({ pattern: string; replacement: string } | {})} opts + * ({ pattern: string; replacement: string } | {}) & { + * showValue?: (v: string) => unknown; + * }} opts */ export const documentStorageSchema = async (t, storage, opts) => { // chainStorage publication is unsynchronized await eventLoopIteration(); + const getLast = (/** @type {string} */ cell) => + JSON.parse(cell).values.at(-1) || assert.fail(); + const { showValue = s => s } = opts; + /** @type {(d: Map, k: string) => unknown} */ + const getBodyDefault = (d, k) => showValue(getLast(NonNullish(d.get(k)))); + const [keys, getBody] = 'keys' in storage ? [storage.keys(), (/** @type {string} */ k) => storage.getBody(k)] - : [storage.data.keys(), (/** @type {string} */ k) => storage.data.get(k)]; + : [ + storage.data.keys(), + (/** @type {string} */ k) => getBodyDefault(storage.data, k), + ]; const { pattern, replacement } = 'pattern' in opts ? opts : { pattern: 'mockChainStorageRoot.', replacement: 'published.' }; - const illustration = [...keys].sort().map( + + const pruned = [...keys] + .sort() + .filter( + 'node' in opts + ? key => + key + .replace(pattern, replacement) + .startsWith(`published.${opts.node}`) + : _entry => true, + ); + + const illustration = pruned.map( /** @type {(k: string) => [string, unknown]} */ key => [key.replace(pattern, replacement), getBody(key)], ); - const pruned = illustration.filter( - 'node' in opts - ? ([key, _]) => key.startsWith(`published.${opts.node}`) - : _entry => true, - ); const note = 'note' in opts @@ -283,5 +302,5 @@ export const documentStorageSchema = async (t, storage, opts) => { The example below illustrates the schema of the data published there. See also board marshalling conventions (_to appear_).`; - t.snapshot(pruned, note + boilerplate); + t.snapshot(illustration, note + boilerplate); }; From 4dc9720fafb515b03c6ceab665bdeec9684e14b6 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 27 Nov 2024 15:10:01 -0600 Subject: [PATCH 085/174] chore: show parsed feedPolicy in storage snapshot --- packages/boot/test/fast-usdc/fast-usdc.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/boot/test/fast-usdc/fast-usdc.test.ts b/packages/boot/test/fast-usdc/fast-usdc.test.ts index 73d8b4e6baf..e13f95849e7 100644 --- a/packages/boot/test/fast-usdc/fast-usdc.test.ts +++ b/packages/boot/test/fast-usdc/fast-usdc.test.ts @@ -8,6 +8,7 @@ import { documentStorageSchema } from '@agoric/governance/tools/storageDoc.js'; import { Fail } from '@endo/errors'; import { unmarshalFromVstorage } from '@agoric/internal/src/marshal.js'; import { makeMarshal } from '@endo/marshal'; +import { defaultMarshaller } from '@agoric/internal/src/storage-test-utils.js'; import { makeWalletFactoryContext, type WalletFactoryTestContext, @@ -110,11 +111,12 @@ test.serial( test.serial('writes feed policy to vstorage', async t => { const { storage } = t.context; - const doc = { + const opts = { node: 'fastUsdc.feedPolicy', owner: 'the general and chain-specific policies for the Fast USDC feed', + showValue: JSON.parse, }; - await documentStorageSchema(t, storage, doc); + await documentStorageSchema(t, storage, opts); }); test.serial('writes fee config to vstorage', async t => { @@ -122,6 +124,7 @@ test.serial('writes fee config to vstorage', async t => { const doc = { node: 'fastUsdc.feeConfig', owner: 'the fee configuration for Fast USDC', + showValue: v => defaultMarshaller.fromCapData(JSON.parse(v)), }; await documentStorageSchema(t, storage, doc); }); From c252da2b16908a5d2d2e68772c7015197b6057f9 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 27 Nov 2024 15:39:19 -0600 Subject: [PATCH 086/174] chore: regen snapshots with parsed feedPolicy etc. --- .../fast-usdc/snapshots/fast-usdc.test.ts.md | 48 ++++++++++++++++-- .../snapshots/fast-usdc.test.ts.snap | Bin 1010 -> 1242 bytes 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md index 08400eda5f5..f953f9ea514 100644 --- a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md +++ b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md @@ -14,7 +14,18 @@ Generated by [AVA](https://avajs.dev). [ [ 'published.fastUsdc.feedPolicy', - '{"blockHeight":"0","values":["{\\"chainPolicies\\":{\\"Arbitrum\\":{\\"cctpTokenMessengerAddress\\":\\"0x19330d10D9Cc8751218eaf51E8885D058642E08A\\",\\"chainId\\":42161,\\"confirmations\\":2,\\"nobleContractAddress\\":\\"0x19330d10D9Cc8751218eaf51E8885D058642E08A\\"}},\\"nobleAgoricChannelId\\":\\"channel-21\\",\\"nobleDomainId\\":4}"]}', + { + chainPolicies: { + Arbitrum: { + cctpTokenMessengerAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', + chainId: 42161, + confirmations: 2, + nobleContractAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', + }, + }, + nobleAgoricChannelId: 'channel-21', + nobleDomainId: 4, + }, ], ] @@ -28,7 +39,36 @@ Generated by [AVA](https://avajs.dev). [ [ 'published.fastUsdc.feeConfig', - '{"blockHeight":"0","values":["{\\"body\\":\\"#{\\\\\\"contractRate\\\\\\":{\\\\\\"denominator\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0.Alleged: USDC brand\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+10\\\\\\"},\\\\\\"numerator\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+2\\\\\\"}},\\\\\\"flat\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+10000\\\\\\"},\\\\\\"maxVariable\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+5000000\\\\\\"},\\\\\\"variableRate\\\\\\":{\\\\\\"denominator\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+100\\\\\\"},\\\\\\"numerator\\\\\\":{\\\\\\"brand\\\\\\":\\\\\\"$0\\\\\\",\\\\\\"value\\\\\\":\\\\\\"+1\\\\\\"}}}\\",\\"slots\\":[\\"board01029\\"]}"]}', + { + contractRate: { + denominator: { + brand: Object @Alleged: USDC brand {}, + value: 10n, + }, + numerator: { + brand: Object @Alleged: USDC brand {}, + value: 2n, + }, + }, + flat: { + brand: Object @Alleged: USDC brand {}, + value: 10000n, + }, + maxVariable: { + brand: Object @Alleged: USDC brand {}, + value: 5000000n, + }, + variableRate: { + denominator: { + brand: Object @Alleged: USDC brand {}, + value: 100n, + }, + numerator: { + brand: Object @Alleged: USDC brand {}, + value: 1n, + }, + }, + }, ], ] @@ -42,10 +82,10 @@ Generated by [AVA](https://avajs.dev). [ [ 'published.fastUsdc.status.0xc81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761702', - '{"blockHeight":"0","values":["OBSERVED"]}', + 'OBSERVED', ], [ 'published.fastUsdc.status.0xd81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761799', - '{"blockHeight":"0","values":["OBSERVED"]}', + 'OBSERVED', ], ] diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap index 2a1d52ca9c2583ea874af629b23823841ca7e292..9489b8bc7ff297097930bdd8547b32b0ecc731b5 100644 GIT binary patch literal 1242 zcmV<01SR`HRzVvF^1fmy?oVXwmQW5gok8ZsA zAO#8bV68p#oB6%*%x`=%3X&|`RBzuR9qWWTPh6F;CdDEm!CF}ohuchNY)k1(@;b#T zH|KIfVG~fgv0!|{n&u@G^kFDel($92Y+W~W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n*0jk%;& z>66J^Q_1|$T|NlgLm^-UY)~KY@^Q;u{F=++kD}1s=KhhKjzO=6{x_J|qtq~^p!V_z zQ5c4&xQyxS3DunD0xpl0gyG-O4i->X*vu7tU&+oz_0G+GNEo54%b}-E4pg%+3gdnj z?48PrU;ay0)GAyN6(<&(Y9EX~7?z>%|Hy+oi##xv+NmMa39A=h`R)AuR3l4Nq`f4Gd)=rP#%Hq# z-(4L=Uwpi?{piW|R*Iyk7781)ROIgMJDC0Pnl$;Q#;t From 237994ea50e336c057d02b895b630ea70a247969 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 27 Nov 2024 17:11:30 -0600 Subject: [PATCH 087/174] chore(boot): show parsed agoricNames chain info --- packages/boot/test/bootstrapTests/orchestration.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/boot/test/bootstrapTests/orchestration.test.ts b/packages/boot/test/bootstrapTests/orchestration.test.ts index a4f0f3dadfa..f18260cc417 100644 --- a/packages/boot/test/bootstrapTests/orchestration.test.ts +++ b/packages/boot/test/bootstrapTests/orchestration.test.ts @@ -1,7 +1,10 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import { Fail } from '@endo/errors'; -import { documentStorageSchema } from '@agoric/internal/src/storage-test-utils.js'; +import { + defaultMarshaller, + documentStorageSchema, +} from '@agoric/internal/src/storage-test-utils.js'; import type { CosmosValidatorAddress } from '@agoric/orchestration'; import type { start as startStakeIca } from '@agoric/orchestration/src/examples/stake-ica.contract.js'; import type { Instance } from '@agoric/zoe/src/zoeService/utils.js'; @@ -52,6 +55,7 @@ test.serial('config', async t => { await documentStorageSchema(t, storage, { note: 'Chain info for Orchestration', node: 'agoricNames.chain', + showValue: v => defaultMarshaller.fromCapData(JSON.parse(v)), }); } @@ -73,6 +77,7 @@ test.serial('config', async t => { await documentStorageSchema(t, storage, { note: 'Chain connections for Orchestration', node: 'agoricNames.chainConnection', + showValue: v => defaultMarshaller.fromCapData(JSON.parse(v)), }); } { From fe1df439cd874664c37c5a5571408eabdbd406b0 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 27 Nov 2024 17:12:13 -0600 Subject: [PATCH 088/174] chore(boot): update snapshots with parsed agoricNames chainInfo --- .../snapshots/orchestration.test.ts.md | 2076 ++++++++++++++++- .../snapshots/orchestration.test.ts.snap | Bin 6957 -> 14961 bytes 2 files changed, 1961 insertions(+), 115 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..bcc520982e9 100644 --- a/packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.md +++ b/packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.md @@ -14,259 +14,1238 @@ 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\\":[]}"]}', + { + bech32Prefix: 'agoric', + chainId: 'agoric-3', + icqEnabled: false, + stakingTokens: [ + { + denom: 'ubld', + }, + ], + }, ], [ 'published.agoricNames.chain.celestia', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"celestia\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"celestia\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"utia\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'celestia', + chainId: 'celestia', + icqEnabled: false, + stakingTokens: [ + { + denom: 'utia', + }, + ], + }, ], [ 'published.agoricNames.chain.cosmoshub', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"cosmos\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"cosmoshub-4\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uatom\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'cosmos', + chainId: 'cosmoshub-4', + icqEnabled: false, + stakingTokens: [ + { + denom: 'uatom', + }, + ], + }, ], [ 'published.agoricNames.chain.dydx', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"dydx\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"dydx-mainnet-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"adydx\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'dydx', + chainId: 'dydx-mainnet-1', + icqEnabled: false, + stakingTokens: [ + { + denom: 'adydx', + }, + ], + }, ], [ 'published.agoricNames.chain.juno', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"juno\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"juno-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ujuno\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'juno', + chainId: 'juno-1', + icqEnabled: false, + stakingTokens: [ + { + denom: 'ujuno', + }, + ], + }, ], [ 'published.agoricNames.chain.neutron', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"neutron\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"neutron-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"untrn\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'neutron', + chainId: 'neutron-1', + icqEnabled: false, + stakingTokens: [ + { + denom: 'untrn', + }, + ], + }, ], [ 'published.agoricNames.chain.noble', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"noble\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"noble-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'noble', + chainId: 'noble-1', + icqEnabled: false, + }, ], [ 'published.agoricNames.chain.omniflixhub', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"omniflix\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"omniflixhub-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uflix\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'omniflix', + chainId: 'omniflixhub-1', + icqEnabled: false, + stakingTokens: [ + { + denom: 'uflix', + }, + ], + }, ], [ 'published.agoricNames.chain.osmosis', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"osmo\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"osmosis-1\\\\\\",\\\\\\"icqEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uosmo\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'osmo', + chainId: 'osmosis-1', + icqEnabled: true, + stakingTokens: [ + { + denom: 'uosmo', + }, + ], + }, ], [ 'published.agoricNames.chain.secretnetwork', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"secret\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"secret-4\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uscrt\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'secret', + chainId: 'secret-4', + icqEnabled: false, + stakingTokens: [ + { + denom: 'uscrt', + }, + ], + }, ], [ 'published.agoricNames.chain.stargaze', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"stars\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"stargaze-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustars\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'stars', + chainId: 'stargaze-1', + icqEnabled: false, + stakingTokens: [ + { + denom: 'ustars', + }, + ], + }, ], [ 'published.agoricNames.chain.stride', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"stride\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"stride-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustrd\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'stride', + chainId: 'stride-1', + icqEnabled: false, + stakingTokens: [ + { + denom: 'ustrd', + }, + ], + }, ], [ 'published.agoricNames.chain.umee', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"bech32Prefix\\\\\\":\\\\\\"umee\\\\\\",\\\\\\"chainId\\\\\\":\\\\\\"umee-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uumee\\\\\\"}]}\\",\\"slots\\":[]}"]}', + { + bech32Prefix: 'umee', + chainId: 'umee-1', + icqEnabled: false, + stakingTokens: [ + { + denom: 'uumee', + }, + ], + }, ], [ 'published.agoricNames.chainConnection.agoric-3_cosmoshub-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"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\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + 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', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_noble-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"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\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + 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', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_omniflixhub-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-73\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-47\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-40\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-67\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-58\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-30\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-73', + counterparty: { + client_id: '07-tendermint-47', + connection_id: 'connection-40', + }, + id: 'connection-67', + state: 3, + transferChannel: { + channelId: 'channel-58', + counterPartyChannelId: 'channel-30', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"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\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + 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', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-17\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-111\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-80\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-17\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-10\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-51\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-17', + counterparty: { + client_id: '07-tendermint-111', + connection_id: 'connection-80', + }, + id: 'connection-17', + state: 3, + transferChannel: { + channelId: 'channel-10', + counterPartyChannelId: 'channel-51', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-74\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-129\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-118\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-68\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-59\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-148\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-74', + counterparty: { + client_id: '07-tendermint-129', + connection_id: 'connection-118', + }, + id: 'connection-68', + state: 3, + transferChannel: { + channelId: 'channel-59', + counterPartyChannelId: 'channel-148', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-18\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-152\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-101\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-18\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-11\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-42\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-18', + counterparty: { + client_id: '07-tendermint-152', + connection_id: 'connection-101', + }, + id: 'connection-18', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-42', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.celestia_neutron-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-29\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-48\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-36\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-7\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-8\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-35\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-29', + counterparty: { + client_id: '07-tendermint-48', + connection_id: 'connection-36', + }, + id: 'connection-7', + state: 3, + transferChannel: { + channelId: 'channel-8', + counterPartyChannelId: 'channel-35', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.celestia_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-10\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3012\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2503\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-2\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-2\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-6994\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-10', + counterparty: { + client_id: '07-tendermint-3012', + connection_id: 'connection-2503', + }, + id: 'connection-2', + state: 3, + transferChannel: { + channelId: 'channel-2', + counterPartyChannelId: 'channel-6994', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.celestia_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-52\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-174\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-131\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-15\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-14\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-91\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-52', + counterparty: { + client_id: '07-tendermint-174', + connection_id: 'connection-131', + }, + id: 'connection-15', + state: 3, + transferChannel: { + channelId: 'channel-14', + counterPartyChannelId: 'channel-91', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.celestia_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-86\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-359\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-296\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-56\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-33\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-291\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-86', + counterparty: { + client_id: '07-tendermint-359', + connection_id: 'connection-296', + }, + id: 'connection-56', + state: 3, + transferChannel: { + channelId: 'channel-33', + counterPartyChannelId: 'channel-291', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.celestia_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-137\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-125\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-4\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-4\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-162\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-137', + connection_id: 'connection-125', + }, + id: 'connection-4', + state: 3, + transferChannel: { + channelId: 'channel-4', + counterPartyChannelId: 'channel-162', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_juno-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-439\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-372\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-207\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-439', + counterparty: { + client_id: '07-tendermint-3', + connection_id: 'connection-2', + }, + id: 'connection-372', + state: 3, + transferChannel: { + channelId: 'channel-207', + counterPartyChannelId: 'channel-1', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_neutron-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1119\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-0\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-809\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-569\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1119', + counterparty: { + client_id: '07-tendermint-0', + connection_id: 'connection-0', + }, + id: 'connection-809', + state: 3, + transferChannel: { + channelId: 'channel-569', + counterPartyChannelId: 'channel-1', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_noble-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1116\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-4\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-12\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-790\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-536\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-4\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1116', + counterparty: { + client_id: '07-tendermint-4', + connection_id: 'connection-12', + }, + id: 'connection-790', + state: 3, + transferChannel: { + channelId: 'channel-536', + counterPartyChannelId: 'channel-4', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_omniflixhub-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-656\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-23\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-19\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-501\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-306\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-12\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-656', + counterparty: { + client_id: '07-tendermint-23', + connection_id: 'connection-19', + }, + id: 'connection-501', + state: 3, + transferChannel: { + channelId: 'channel-306', + counterPartyChannelId: 'channel-12', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"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\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + 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', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-492\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-0\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-401\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-235\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-492', + counterparty: { + client_id: '07-tendermint-1', + connection_id: 'connection-0', + }, + id: 'connection-401', + state: 3, + transferChannel: { + channelId: 'channel-235', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1188\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-320\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-256\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-918\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-730\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-239\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1188', + counterparty: { + client_id: '07-tendermint-320', + connection_id: 'connection-256', + }, + id: 'connection-918', + state: 3, + transferChannel: { + channelId: 'channel-730', + counterPartyChannelId: 'channel-239', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-913\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-0\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-635\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-391\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-913', + counterparty: { + client_id: '07-tendermint-0', + connection_id: 'connection-0', + }, + id: 'connection-635', + state: 3, + transferChannel: { + channelId: 'channel-391', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.dydx-mainnet-1_neutron-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-11\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-72\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-51\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-17\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-11\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-48\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-11', + counterparty: { + client_id: '07-tendermint-72', + connection_id: 'connection-51', + }, + id: 'connection-17', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-48', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.dydx-mainnet-1_noble-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"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\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + 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', + }, + }, ], [ 'published.agoricNames.chainConnection.dydx-mainnet-1_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3009\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2500\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-7\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-3\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-6787\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-3', + counterparty: { + client_id: '07-tendermint-3009', + connection_id: 'connection-2500', + }, + id: 'connection-7', + state: 3, + transferChannel: { + channelId: 'channel-3', + counterPartyChannelId: 'channel-6787', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.dydx-mainnet-1_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-133\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-123\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-160\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1', + counterparty: { + client_id: '07-tendermint-133', + connection_id: 'connection-123', + }, + id: 'connection-1', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-160', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.dydx-mainnet-1_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-8\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-244\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-208\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-13\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-8\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-118\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-8', + counterparty: { + client_id: '07-tendermint-244', + connection_id: 'connection-208', + }, + id: 'connection-13', + state: 3, + transferChannel: { + channelId: 'channel-8', + counterPartyChannelId: 'channel-118', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_neutron-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-557\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-97\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-71\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-524\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-548\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-4328\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-557', + counterparty: { + client_id: '07-tendermint-97', + connection_id: 'connection-71', + }, + id: 'connection-524', + state: 3, + transferChannel: { + channelId: 'channel-548', + counterPartyChannelId: 'channel-4328', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_noble-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-334\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-8\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-322\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-224\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-3\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-334', + counterparty: { + client_id: '07-tendermint-3', + connection_id: 'connection-8', + }, + id: 'connection-322', + state: 3, + transferChannel: { + channelId: 'channel-224', + counterPartyChannelId: 'channel-3', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1457\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-1142\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-0\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-42\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-1457', + connection_id: 'connection-1142', + }, + id: 'connection-0', + state: 3, + transferChannel: { + channelId: 'channel-0', + counterPartyChannelId: 'channel-42', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-108\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-23\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-9\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-68\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-48\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-8\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-108', + counterparty: { + client_id: '07-tendermint-23', + connection_id: 'connection-9', + }, + id: 'connection-68', + state: 3, + transferChannel: { + channelId: 'channel-48', + counterPartyChannelId: 'channel-8', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-44\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-13\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-11\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-30\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-20\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-5\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-44', + counterparty: { + client_id: '07-tendermint-13', + connection_id: 'connection-11', + }, + id: 'connection-30', + state: 3, + transferChannel: { + channelId: 'channel-20', + counterPartyChannelId: 'channel-5', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-263\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-31\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-19\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-205\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-139\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-24\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-263', + counterparty: { + client_id: '07-tendermint-31', + connection_id: 'connection-19', + }, + id: 'connection-205', + state: 3, + transferChannel: { + channelId: 'channel-139', + counterPartyChannelId: 'channel-24', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.neutron-1_noble-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-40\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-25\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-34\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-31\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-30\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-18\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-40', + counterparty: { + client_id: '07-tendermint-25', + connection_id: 'connection-34', + }, + id: 'connection-31', + state: 3, + transferChannel: { + channelId: 'channel-30', + counterPartyChannelId: 'channel-18', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.neutron-1_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-19\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2823\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2338\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-18\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-10\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-874\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-19', + counterparty: { + client_id: '07-tendermint-2823', + connection_id: 'connection-2338', + }, + id: 'connection-18', + state: 3, + transferChannel: { + channelId: 'channel-10', + counterPartyChannelId: 'channel-874', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.neutron-1_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-85\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-199\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-192\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-63\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-1551\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-144\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-85', + counterparty: { + client_id: '07-tendermint-199', + connection_id: 'connection-192', + }, + id: 'connection-63', + state: 3, + transferChannel: { + channelId: 'channel-1551', + counterPartyChannelId: 'channel-144', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.neutron-1_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-31\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-283\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-211\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-23\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-18\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-191\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-31', + counterparty: { + client_id: '07-tendermint-283', + connection_id: 'connection-211', + }, + id: 'connection-23', + state: 3, + transferChannel: { + channelId: 'channel-18', + counterPartyChannelId: 'channel-191', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.neutron-1_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-18\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-125\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-113\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-15\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-8\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-123\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-18', + counterparty: { + client_id: '07-tendermint-125', + connection_id: 'connection-113', + }, + id: 'connection-15', + state: 3, + transferChannel: { + channelId: 'channel-8', + counterPartyChannelId: 'channel-123', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.noble-1_omniflixhub-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-68\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-51\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-49\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-65\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-44\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-38\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-68', + counterparty: { + client_id: '07-tendermint-51', + connection_id: 'connection-49', + }, + id: 'connection-65', + state: 3, + transferChannel: { + channelId: 'channel-44', + counterPartyChannelId: 'channel-38', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.noble-1_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2704\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2241\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-2\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-750\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-2704', + connection_id: 'connection-2241', + }, + id: 'connection-2', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-750', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.noble-1_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-24\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-170\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-127\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-33\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-17\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-88\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-24', + counterparty: { + client_id: '07-tendermint-170', + connection_id: 'connection-127', + }, + id: 'connection-33', + state: 3, + transferChannel: { + channelId: 'channel-17', + counterPartyChannelId: 'channel-88', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.noble-1_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-16\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-287\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-214\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-25\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-11\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-204\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-16', + counterparty: { + client_id: '07-tendermint-287', + connection_id: 'connection-214', + }, + id: 'connection-25', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-204', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.noble-1_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-73\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-248\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-210\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-74\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-51\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-120\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-73', + counterparty: { + client_id: '07-tendermint-248', + connection_id: 'connection-210', + }, + id: 'connection-74', + state: 3, + transferChannel: { + channelId: 'channel-51', + counterPartyChannelId: 'channel-120', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.omniflixhub-1_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-8\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1829\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-1431\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-8\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-199\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-8', + counterparty: { + client_id: '07-tendermint-1829', + connection_id: 'connection-1431', + }, + id: 'connection-8', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-199', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.osmosis-1_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1588\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-1\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1244\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-88\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1588', + counterparty: { + client_id: '07-tendermint-2', + connection_id: 'connection-1', + }, + id: 'connection-1244', + state: 3, + transferChannel: { + channelId: 'channel-88', + counterPartyChannelId: 'channel-1', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.osmosis-1_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1562\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-0\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1223\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-75\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1562', + counterparty: { + client_id: '07-tendermint-0', + connection_id: 'connection-0', + }, + id: 'connection-1223', + state: 3, + transferChannel: { + channelId: 'channel-75', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.osmosis-1_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2119\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1657\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-326\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-5\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-2119', + counterparty: { + client_id: '07-tendermint-1', + connection_id: 'connection-2', + }, + id: 'connection-1657', + state: 3, + transferChannel: { + channelId: 'channel-326', + counterPartyChannelId: 'channel-5', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.osmosis-1_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1805\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-6\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-0\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1410\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-184\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1805', + counterparty: { + client_id: '07-tendermint-6', + connection_id: 'connection-0', + }, + id: 'connection-1410', + state: 3, + transferChannel: { + channelId: 'channel-184', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.secret-4_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-43\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-177\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-110\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-25\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-19\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-48\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-43', + counterparty: { + client_id: '07-tendermint-177', + connection_id: 'connection-110', + }, + id: 'connection-25', + state: 3, + transferChannel: { + channelId: 'channel-19', + counterPartyChannelId: 'channel-48', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.secret-4_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-75\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-37\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-25\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-40\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-37\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-40\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-75', + counterparty: { + client_id: '07-tendermint-37', + connection_id: 'connection-25', + }, + id: 'connection-40', + state: 3, + transferChannel: { + channelId: 'channel-37', + counterPartyChannelId: 'channel-40', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.secret-4_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-193\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-249\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-213\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-188\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-126\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-123\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-193', + counterparty: { + client_id: '07-tendermint-249', + connection_id: 'connection-213', + }, + id: 'connection-188', + state: 3, + transferChannel: { + channelId: 'channel-126', + counterPartyChannelId: 'channel-123', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.stargaze-1_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-195\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-30\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-18\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-128\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-106\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-19\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-195', + counterparty: { + client_id: '07-tendermint-30', + connection_id: 'connection-18', + }, + id: 'connection-128', + state: 3, + transferChannel: { + channelId: 'channel-106', + counterPartyChannelId: 'channel-19', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.stride-1_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-32\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-64\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-45\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-20\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-29\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-34\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-32', + counterparty: { + client_id: '07-tendermint-64', + connection_id: 'connection-45', + }, + id: 'connection-20', + state: 3, + transferChannel: { + channelId: 'channel-29', + counterPartyChannelId: 'channel-34', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], ] @@ -278,206 +1257,1073 @@ Generated by [AVA](https://avajs.dev). [ [ 'published.agoricNames.chainConnection.agoric-3_cosmoshub-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"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\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + 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', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_noble-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"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\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + 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', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_omniflixhub-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-73\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-47\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-40\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-67\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-58\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-30\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-73', + counterparty: { + client_id: '07-tendermint-47', + connection_id: 'connection-40', + }, + id: 'connection-67', + state: 3, + transferChannel: { + channelId: 'channel-58', + counterPartyChannelId: 'channel-30', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"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\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + 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', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-17\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-111\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-80\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-17\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-10\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-51\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-17', + counterparty: { + client_id: '07-tendermint-111', + connection_id: 'connection-80', + }, + id: 'connection-17', + state: 3, + transferChannel: { + channelId: 'channel-10', + counterPartyChannelId: 'channel-51', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-74\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-129\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-118\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-68\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-59\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-148\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-74', + counterparty: { + client_id: '07-tendermint-129', + connection_id: 'connection-118', + }, + id: 'connection-68', + state: 3, + transferChannel: { + channelId: 'channel-59', + counterPartyChannelId: 'channel-148', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.agoric-3_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-18\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-152\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-101\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-18\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-11\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-42\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-18', + counterparty: { + client_id: '07-tendermint-152', + connection_id: 'connection-101', + }, + id: 'connection-18', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-42', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.celestia_neutron-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-29\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-48\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-36\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-7\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-8\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-35\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-29', + counterparty: { + client_id: '07-tendermint-48', + connection_id: 'connection-36', + }, + id: 'connection-7', + state: 3, + transferChannel: { + channelId: 'channel-8', + counterPartyChannelId: 'channel-35', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.celestia_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-10\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3012\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2503\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-2\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-2\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-6994\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-10', + counterparty: { + client_id: '07-tendermint-3012', + connection_id: 'connection-2503', + }, + id: 'connection-2', + state: 3, + transferChannel: { + channelId: 'channel-2', + counterPartyChannelId: 'channel-6994', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.celestia_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-52\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-174\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-131\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-15\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-14\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-91\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-52', + counterparty: { + client_id: '07-tendermint-174', + connection_id: 'connection-131', + }, + id: 'connection-15', + state: 3, + transferChannel: { + channelId: 'channel-14', + counterPartyChannelId: 'channel-91', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.celestia_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-86\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-359\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-296\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-56\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-33\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-291\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-86', + counterparty: { + client_id: '07-tendermint-359', + connection_id: 'connection-296', + }, + id: 'connection-56', + state: 3, + transferChannel: { + channelId: 'channel-33', + counterPartyChannelId: 'channel-291', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.celestia_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-137\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-125\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-4\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-4\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-162\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-137', + connection_id: 'connection-125', + }, + id: 'connection-4', + state: 3, + transferChannel: { + channelId: 'channel-4', + counterPartyChannelId: 'channel-162', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_juno-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-439\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-372\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-207\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-439', + counterparty: { + client_id: '07-tendermint-3', + connection_id: 'connection-2', + }, + id: 'connection-372', + state: 3, + transferChannel: { + channelId: 'channel-207', + counterPartyChannelId: 'channel-1', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_neutron-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1119\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-0\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-809\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-569\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1119', + counterparty: { + client_id: '07-tendermint-0', + connection_id: 'connection-0', + }, + id: 'connection-809', + state: 3, + transferChannel: { + channelId: 'channel-569', + counterPartyChannelId: 'channel-1', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_noble-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1116\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-4\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-12\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-790\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-536\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-4\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1116', + counterparty: { + client_id: '07-tendermint-4', + connection_id: 'connection-12', + }, + id: 'connection-790', + state: 3, + transferChannel: { + channelId: 'channel-536', + counterPartyChannelId: 'channel-4', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_omniflixhub-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-656\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-23\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-19\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-501\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-306\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-12\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-656', + counterparty: { + client_id: '07-tendermint-23', + connection_id: 'connection-19', + }, + id: 'connection-501', + state: 3, + transferChannel: { + channelId: 'channel-306', + counterPartyChannelId: 'channel-12', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"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\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + 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', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-492\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-0\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-401\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-235\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-492', + counterparty: { + client_id: '07-tendermint-1', + connection_id: 'connection-0', + }, + id: 'connection-401', + state: 3, + transferChannel: { + channelId: 'channel-235', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1188\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-320\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-256\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-918\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-730\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-239\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1188', + counterparty: { + client_id: '07-tendermint-320', + connection_id: 'connection-256', + }, + id: 'connection-918', + state: 3, + transferChannel: { + channelId: 'channel-730', + counterPartyChannelId: 'channel-239', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.cosmoshub-4_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-913\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-0\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-635\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-391\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-913', + counterparty: { + client_id: '07-tendermint-0', + connection_id: 'connection-0', + }, + id: 'connection-635', + state: 3, + transferChannel: { + channelId: 'channel-391', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.dydx-mainnet-1_neutron-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-11\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-72\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-51\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-17\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-11\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-48\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-11', + counterparty: { + client_id: '07-tendermint-72', + connection_id: 'connection-51', + }, + id: 'connection-17', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-48', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.dydx-mainnet-1_noble-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"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\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + 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', + }, + }, ], [ 'published.agoricNames.chainConnection.dydx-mainnet-1_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3009\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2500\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-7\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-3\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-6787\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-3', + counterparty: { + client_id: '07-tendermint-3009', + connection_id: 'connection-2500', + }, + id: 'connection-7', + state: 3, + transferChannel: { + channelId: 'channel-3', + counterPartyChannelId: 'channel-6787', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.dydx-mainnet-1_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-133\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-123\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-160\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1', + counterparty: { + client_id: '07-tendermint-133', + connection_id: 'connection-123', + }, + id: 'connection-1', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-160', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.dydx-mainnet-1_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-8\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-244\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-208\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-13\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-8\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-118\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-8', + counterparty: { + client_id: '07-tendermint-244', + connection_id: 'connection-208', + }, + id: 'connection-13', + state: 3, + transferChannel: { + channelId: 'channel-8', + counterPartyChannelId: 'channel-118', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_neutron-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-557\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-97\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-71\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-524\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-548\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-4328\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-557', + counterparty: { + client_id: '07-tendermint-97', + connection_id: 'connection-71', + }, + id: 'connection-524', + state: 3, + transferChannel: { + channelId: 'channel-548', + counterPartyChannelId: 'channel-4328', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_noble-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-334\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-8\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-322\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-224\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-3\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-334', + counterparty: { + client_id: '07-tendermint-3', + connection_id: 'connection-8', + }, + id: 'connection-322', + state: 3, + transferChannel: { + channelId: 'channel-224', + counterPartyChannelId: 'channel-3', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1457\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-1142\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-0\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-42\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-1457', + connection_id: 'connection-1142', + }, + id: 'connection-0', + state: 3, + transferChannel: { + channelId: 'channel-0', + counterPartyChannelId: 'channel-42', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-108\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-23\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-9\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-68\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-48\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-8\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-108', + counterparty: { + client_id: '07-tendermint-23', + connection_id: 'connection-9', + }, + id: 'connection-68', + state: 3, + transferChannel: { + channelId: 'channel-48', + counterPartyChannelId: 'channel-8', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-44\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-13\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-11\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-30\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-20\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-5\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-44', + counterparty: { + client_id: '07-tendermint-13', + connection_id: 'connection-11', + }, + id: 'connection-30', + state: 3, + transferChannel: { + channelId: 'channel-20', + counterPartyChannelId: 'channel-5', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.juno-1_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-263\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-31\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-19\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-205\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-139\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-24\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-263', + counterparty: { + client_id: '07-tendermint-31', + connection_id: 'connection-19', + }, + id: 'connection-205', + state: 3, + transferChannel: { + channelId: 'channel-139', + counterPartyChannelId: 'channel-24', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.neutron-1_noble-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-40\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-25\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-34\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-31\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-30\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-18\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-40', + counterparty: { + client_id: '07-tendermint-25', + connection_id: 'connection-34', + }, + id: 'connection-31', + state: 3, + transferChannel: { + channelId: 'channel-30', + counterPartyChannelId: 'channel-18', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.neutron-1_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-19\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2823\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2338\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-18\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-10\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-874\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-19', + counterparty: { + client_id: '07-tendermint-2823', + connection_id: 'connection-2338', + }, + id: 'connection-18', + state: 3, + transferChannel: { + channelId: 'channel-10', + counterPartyChannelId: 'channel-874', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.neutron-1_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-85\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-199\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-192\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-63\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-1551\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-144\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-85', + counterparty: { + client_id: '07-tendermint-199', + connection_id: 'connection-192', + }, + id: 'connection-63', + state: 3, + transferChannel: { + channelId: 'channel-1551', + counterPartyChannelId: 'channel-144', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.neutron-1_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-31\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-283\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-211\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-23\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-18\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-191\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-31', + counterparty: { + client_id: '07-tendermint-283', + connection_id: 'connection-211', + }, + id: 'connection-23', + state: 3, + transferChannel: { + channelId: 'channel-18', + counterPartyChannelId: 'channel-191', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.neutron-1_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-18\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-125\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-113\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-15\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-8\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-123\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-18', + counterparty: { + client_id: '07-tendermint-125', + connection_id: 'connection-113', + }, + id: 'connection-15', + state: 3, + transferChannel: { + channelId: 'channel-8', + counterPartyChannelId: 'channel-123', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.noble-1_omniflixhub-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-68\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-51\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-49\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-65\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-44\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-38\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-68', + counterparty: { + client_id: '07-tendermint-51', + connection_id: 'connection-49', + }, + id: 'connection-65', + state: 3, + transferChannel: { + channelId: 'channel-44', + counterPartyChannelId: 'channel-38', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.noble-1_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2704\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2241\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-2\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-750\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-2704', + connection_id: 'connection-2241', + }, + id: 'connection-2', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-750', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.noble-1_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-24\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-170\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-127\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-33\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-17\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-88\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-24', + counterparty: { + client_id: '07-tendermint-170', + connection_id: 'connection-127', + }, + id: 'connection-33', + state: 3, + transferChannel: { + channelId: 'channel-17', + counterPartyChannelId: 'channel-88', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.noble-1_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-16\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-287\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-214\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-25\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-11\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-204\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-16', + counterparty: { + client_id: '07-tendermint-287', + connection_id: 'connection-214', + }, + id: 'connection-25', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-204', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.noble-1_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-73\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-248\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-210\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-74\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-51\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-120\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-73', + counterparty: { + client_id: '07-tendermint-248', + connection_id: 'connection-210', + }, + id: 'connection-74', + state: 3, + transferChannel: { + channelId: 'channel-51', + counterPartyChannelId: 'channel-120', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.omniflixhub-1_osmosis-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-8\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1829\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-1431\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-8\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-199\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-8', + counterparty: { + client_id: '07-tendermint-1829', + connection_id: 'connection-1431', + }, + id: 'connection-8', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-199', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.osmosis-1_secret-4', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1588\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-1\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1244\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-88\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1588', + counterparty: { + client_id: '07-tendermint-2', + connection_id: 'connection-1', + }, + id: 'connection-1244', + state: 3, + transferChannel: { + channelId: 'channel-88', + counterPartyChannelId: 'channel-1', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.osmosis-1_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1562\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-0\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-0\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1223\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-75\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1562', + counterparty: { + client_id: '07-tendermint-0', + connection_id: 'connection-0', + }, + id: 'connection-1223', + state: 3, + transferChannel: { + channelId: 'channel-75', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.osmosis-1_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2119\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-2\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1657\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-326\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-5\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-2119', + counterparty: { + client_id: '07-tendermint-1', + connection_id: 'connection-2', + }, + id: 'connection-1657', + state: 3, + transferChannel: { + channelId: 'channel-326', + counterPartyChannelId: 'channel-5', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.osmosis-1_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-1805\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-6\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-0\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1410\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-184\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-1805', + counterparty: { + client_id: '07-tendermint-6', + connection_id: 'connection-0', + }, + id: 'connection-1410', + state: 3, + transferChannel: { + channelId: 'channel-184', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.secret-4_stargaze-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-43\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-177\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-110\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-25\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-19\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-48\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-43', + counterparty: { + client_id: '07-tendermint-177', + connection_id: 'connection-110', + }, + id: 'connection-25', + state: 3, + transferChannel: { + channelId: 'channel-19', + counterPartyChannelId: 'channel-48', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.secret-4_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-75\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-37\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-25\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-40\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-37\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-40\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-75', + counterparty: { + client_id: '07-tendermint-37', + connection_id: 'connection-25', + }, + id: 'connection-40', + state: 3, + transferChannel: { + channelId: 'channel-37', + counterPartyChannelId: 'channel-40', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.secret-4_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-193\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-249\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-213\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-188\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-126\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-123\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-193', + counterparty: { + client_id: '07-tendermint-249', + connection_id: 'connection-213', + }, + id: 'connection-188', + state: 3, + transferChannel: { + channelId: 'channel-126', + counterPartyChannelId: 'channel-123', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.stargaze-1_stride-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-195\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-30\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-18\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-128\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-106\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-19\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-195', + counterparty: { + client_id: '07-tendermint-30', + connection_id: 'connection-18', + }, + id: 'connection-128', + state: 3, + transferChannel: { + channelId: 'channel-106', + counterPartyChannelId: 'channel-19', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], [ 'published.agoricNames.chainConnection.stride-1_umee-1', - '{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-32\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-64\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-45\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-20\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-29\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-34\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', + { + client_id: '07-tendermint-32', + counterparty: { + client_id: '07-tendermint-64', + connection_id: 'connection-45', + }, + id: 'connection-20', + state: 3, + transferChannel: { + channelId: 'channel-29', + counterPartyChannelId: 'channel-34', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, ], ] diff --git a/packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.snap b/packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.snap index fb7233f1a0e18e3dd5f5a08ae0912fc8677150f7..d018a0d07a009ba20614ceb6aaeff66e1cefe4aa 100644 GIT binary patch literal 14961 zcmZA6Wl&sA8$W0m7+~<=F2Nl_kl+^Fg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!&e89`q$XwB;WjppILD?Kt{m5k8GPC|Bp_x!Cd=53LzvUVIhH{`= zh6hPzEl!HmGofE6f6nQ@k~7&P*dIdhdD!_D+rw#T)5MzAuA@Tk6HdCXwcc&fA!fU% z+7mmd;nvmlGt^Xg&PKC(^Jlh6wH`k4enZ5uNmsInF5=Zd^n`=K4b^EeGH=Dl(alUs zP$E2K*FNix2jyD%jOO!Um2c7JNcT@Rt0FqP#I#eo{id6 z;@~$bxj3<_R@b5#D$%%T;G46ifzwV~v%KH%LI|_$>uj0&Y`BkYFyw#Cm$zbARN(deb>I1d8KA!}xV%7*BBp0Yy5mX)eReXcOt){5R`-~NFi*yX!BgiM{}KFgly z_0i55?)To#2uS1K=KDVic<9Uk$`-kcH!0F5oc`$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 From 05fe5154de7cccb0c606dcc76c058badc5526cdb Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 27 Nov 2024 13:55:28 -0500 Subject: [PATCH 089/174] feat: `assetOn` `DenomDetail` helper Co-authored-by: Dan Connolly --- packages/orchestration/src/utils/asset.js | 34 +++++++++++++++++++ .../src/utils/chain-hub-helper.js | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 packages/orchestration/src/utils/asset.js diff --git a/packages/orchestration/src/utils/asset.js b/packages/orchestration/src/utils/asset.js new file mode 100644 index 00000000000..3a39da7135b --- /dev/null +++ b/packages/orchestration/src/utils/asset.js @@ -0,0 +1,34 @@ +import { denomHash } from './denomHash.js'; + +/** + * @import {ChainHub, CosmosChainInfo, Denom, DenomDetail} from '../types.js'; + */ + +/** + * Helper function for creating {@link DenomDetail} data for {@link ChainHub} + * asset registration. + * + * TODO #10580 remove 'brandKey' in favor of `LegibleCapData` + * + * @param {Denom} baseDenom + * @param {string} baseName + * @param {string} [chainName] + * @param {Record} [infoOf] + * @param {string} [brandKey] + * @returns {[string, DenomDetail & { brandKey?: string }]} + */ +export const assetOn = (baseDenom, baseName, chainName, infoOf, brandKey) => { + if (!chainName) { + return [baseDenom, { baseName, chainName: baseName, baseDenom }]; + } + if (!infoOf) throw Error(`must provide infoOf`); + const issuerInfo = infoOf[baseName]; + const holdingInfo = infoOf[chainName]; + if (!holdingInfo) throw Error(`${chainName} missing`); + if (!holdingInfo.connections) + throw Error(`connections missing for ${chainName}`); + const { channelId } = + holdingInfo.connections[issuerInfo.chainId].transferChannel; + const denom = `ibc/${denomHash({ denom: baseDenom, channelId })}`; + return [denom, { baseName, chainName, baseDenom, brandKey }]; +}; diff --git a/packages/orchestration/src/utils/chain-hub-helper.js b/packages/orchestration/src/utils/chain-hub-helper.js index 9e75248c6e3..1ae2e0ffaf8 100644 --- a/packages/orchestration/src/utils/chain-hub-helper.js +++ b/packages/orchestration/src/utils/chain-hub-helper.js @@ -7,6 +7,8 @@ * * If either is not provided, registration will be skipped. * + * TODO #10580 remove 'brandKey' in favor of `LegibleCapData` + * * @param {ChainHub} chainHub * @param {Record>} brands * @param {Record | undefined} chainInfo From a6c1e9ec5001630f114e16d307b3ce09415bea77 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 27 Nov 2024 14:29:54 -0500 Subject: [PATCH 090/174] types: `ForwardInfo` - json structure of pfm memo --- packages/orchestration/src/cosmos-api.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/orchestration/src/cosmos-api.ts b/packages/orchestration/src/cosmos-api.ts index 298878634b9..060e99f6409 100644 --- a/packages/orchestration/src/cosmos-api.ts +++ b/packages/orchestration/src/cosmos-api.ts @@ -23,6 +23,7 @@ import type { Port } from '@agoric/network'; import type { IBCChannelID, IBCConnectionID, + IBCPortID, VTransferIBCEvent, } from '@agoric/vats'; import type { @@ -352,3 +353,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; + /** e.g. '10min' */ + timeout: string; + /** default is 3? */ + retries: number; + next?: { + forward: ForwardInfo; + }; + }; +} From 9a654781d53576ae0b3d1fa37f7a96579bfda848 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 27 Nov 2024 19:17:30 -0500 Subject: [PATCH 091/174] fix: `brandKey` not part of `DenomDetail` - also, dont iterate over connections if there arent any --- .../snapshots/fast-usdc.contract.test.ts.md | 2 -- .../snapshots/fast-usdc.contract.test.ts.snap | Bin 5662 -> 5637 bytes .../src/utils/chain-hub-helper.js | 9 +++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md index 42cfa097928..62804cfa992 100644 --- a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md +++ b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md @@ -539,14 +539,12 @@ Generated by [AVA](https://avajs.dev). 'ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4': { baseDenom: 'uusdc', baseName: 'noble', - brandKey: undefined, chainName: 'osmosis', }, 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9': { baseDenom: 'uusdc', baseName: 'noble', brand: Object @Alleged: USDC brand {}, - brandKey: 'USDC', chainName: 'agoric', }, uusdc: { diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap index dcb9a05cb2547cce336ef8a28f82ece5c24e5a80..084687b3bab0cbb2441b180c061d6ebbda934d4e 100644 GIT binary patch literal 5637 zcmV+g7W(NyRzVySGFG3Tef6blEK37mu$^@#x{nrWcevumi&HS z&0I-ijqb=ZBU=U%Od43lkd-D7C<#fLG$|n=K(l}nl0{%8O(0DOkFb>pmR}s&Vze$=jzDww6@RV&j_@~f0fTZf`*cUWue80rp(VttLWh1mMhBD3Z$B6sIfD8pe-CZZ8SY) zYAOo!sUdyyP`A-imuGH?=<%o;h>Ldggrc$d7CoRwbu}J}=-ae2Mq6HmA>&SyjIu~H z(5J=XQ3Gf+|EsBa`l-n2SYph}8m7Tz)8P0t_}n!3#WYwr9ir3W*6Hxw=}?*v_I%ir z55xI_5Arg7P^6UHmk$r-!z=l)ya2iiAW{G~6~H|O@bvh&e-XU;?*Gj*;F=lm=nN<4qAD4#G{R-FtVLwaDN+N(wPsr_0sW}qH1p{mlT zHZ>F;ifT#756zICaO8AbB)W4b9*7KRdnJF)7&5GER|iwy)TB*2t*QO(>Yy2jir&K+lMblP}E-*C~Z`{+>+R~W9G^!&% z2tqEAp}9wow1}3drp6-|5IrObV?_@UEH3d;K%1roCt!?`pagOiP%jCPI#ZXWGfC|E z$F@t0$HTdMXMssVT#XOK8rxMp5xH^|H2=JUr0!jorF)qiW7)b)%eE-tszfGev;@ry zdRs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cegs}P zBG7k8nzF~Ca2&217ofW&P5yD18i#ww;lel+cww~{`n}-u3iREQroZySN4;=Pgzl9z z{mBapCZK5oMknBJCg95x@ZS^g#|eSHPttU)4_5nNzfXW3kTiYx9mrq$;0YhR8K(K6 z%MX)&_^@A~ACxpb>W9bt@N*G5BxzbY3D-p_3pEQbf}WXY+BqIq(9|^j1&q0UB2@UyVm&vpOZ4Tu@YO?7 z9?6dmtxZ%iyGvp`lXyKbA3S17Zjq$t5vy3(OwuD}u^@CsdPJ%RHaU~>Nqq4y^~fbo z_aq~i*)%V_vQT#qeGJ0;e|)esrkcbNiA^2{4pA$fKaybaQKwjMoqID0KQ>S8SRxgy zlJto5y7-Fph*;=yNDuCk*iFplluz&}R#jp_&mlb}y&~NrW?iWlx{|Iv&V-=Uwv(9! zHZK>7y(zh~V%$P8S&}`Sq+1cTTj#~;M67h##a<^-=`tmIKA8z#Vk(j3N^#7Kl_Gwl zP|E-3_KC@u@;0Ah^>HSPme%pSaEeq2PsS;!Uou{zQ;hTDK1+JFpXBXH{1bii|JI&j zbc*I(kzNr_^2wFyFQo!`@qHo5gZ#X>VU)kZn4&vUj#~EA-Ve>MdT`qH`IPTV%%)4c zFPRswx#Yhr^e!!rnQg#viFL>S@9QJika6}Xd_;VkStLH~%y{f5JR!msN`K%>{4Q1G zU%HC^wqR=5>rMifH5L9so9b1DRqu(~=s#;%H~r5+)+r+)HBcA+W6z=g0W*L7c{6eV E01pQU2><{9 diff --git a/packages/orchestration/src/utils/chain-hub-helper.js b/packages/orchestration/src/utils/chain-hub-helper.js index 1ae2e0ffaf8..306a5ecef56 100644 --- a/packages/orchestration/src/utils/chain-hub-helper.js +++ b/packages/orchestration/src/utils/chain-hub-helper.js @@ -29,7 +29,7 @@ export const registerChainsAndAssets = ( for (const [chainName, allInfo] of Object.entries(chainInfo)) { const { connections, ...info } = allInfo; chainHub.registerChain(chainName, info); - conns[info.chainId] = connections; + if (connections) conns[info.chainId] = connections; } const registeredPairs = new Set(); for (const [pChainId, connInfos] of Object.entries(conns)) { @@ -48,9 +48,10 @@ export const registerChainsAndAssets = ( return; } for (const [denom, info] of Object.entries(assetInfo)) { - const infoWithBrand = info.brandKey - ? { ...info, brand: brands[info.brandKey] } - : info; + const { brandKey, ...rest } = info; + const infoWithBrand = brandKey + ? { ...rest, brand: brands[brandKey] } + : rest; chainHub.registerAsset(denom, infoWithBrand); } }; From 0215b6f172e523a813bfbf6234991856ec60601c Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 26 Nov 2024 10:57:13 -0500 Subject: [PATCH 092/174] feat: `chainHub.makeTransferRoute` - chainHub helper to return .transfer details for ibc transfer that can have multiple hops (via pfm) --- packages/orchestration/src/cosmos-api.ts | 26 ++ packages/orchestration/src/exos/chain-hub.js | 146 ++++++- packages/orchestration/src/typeGuards.js | 34 +- .../orchestration/test/exos/chain-hub.test.ts | 372 +++++++++++++++++- 4 files changed, 573 insertions(+), 5 deletions(-) diff --git a/packages/orchestration/src/cosmos-api.ts b/packages/orchestration/src/cosmos-api.ts index 060e99f6409..cbbe4658760 100644 --- a/packages/orchestration/src/cosmos-api.ts +++ b/packages/orchestration/src/cosmos-api.ts @@ -35,7 +35,9 @@ import type { RemoteIbcAddress, } from '@agoric/vats/tools/ibc-utils.js'; import type { QueryDelegationTotalRewardsResponse } from '@agoric/cosmic-proto/cosmos/distribution/v1beta1/query.js'; +import type { Coin } from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js'; import type { AmountArg, ChainAddress, Denom, DenomAmount } from './types.js'; +import { PFM_RECEIVER } from './exos/chain-hub.js'; /** An address for a validator on some blockchain, e.g., cosmos, eth, etc. */ export type CosmosValidatorAddress = ChainAddress & { @@ -373,3 +375,27 @@ export interface ForwardInfo { }; }; } + +/** + * Object used to help build MsgTransfer parameters for IBC transfers. + * + * If `forwardInfo` is present: + * - it must be stringified and provided as the `memo` field value for + * use with `MsgTransfer`. + * - `receiver` will be set to `"pfm"` - purposely invalid bech32. see {@link https://github.com/cosmos/ibc-apps/blob/26f3ad8f58e4ffc7769c6766cb42b954181dc100/middleware/packet-forward-middleware/README.md#minimal-example---chain-forward-a-b-c} + */ +export type TransferRoute = { + /** typically, `transfer` */ + sourcePort: string; + sourceChannel: IBCChannelID; + token: Coin; +} & ( + | { + receiver: typeof PFM_RECEIVER; + /** contains PFM forwarding info */ + forwardInfo: ForwardInfo; + } + | { + receiver: string; + } +); diff --git a/packages/orchestration/src/exos/chain-hub.js b/packages/orchestration/src/exos/chain-hub.js index 39cd3626d83..f74d9eda964 100644 --- a/packages/orchestration/src/exos/chain-hub.js +++ b/packages/orchestration/src/exos/chain-hub.js @@ -6,8 +6,12 @@ import { BrandShape } from '@agoric/ertp/src/typeGuards.js'; import { VowShape } from '@agoric/vow'; import { ChainAddressShape, + CoinShape, CosmosChainInfoShape, + DenomAmountShape, DenomDetailShape, + ForwardInfoShape, + IBCChannelIDShape, IBCConnectionInfoShape, } from '../typeGuards.js'; import { getBech32Prefix } from '../utils/address.js'; @@ -16,12 +20,15 @@ import { getBech32Prefix } from '../utils/address.js'; * @import {NameHub} from '@agoric/vats'; * @import {Vow, VowTools} from '@agoric/vow'; * @import {Zone} from '@agoric/zone'; - * @import {CosmosAssetInfo, CosmosChainInfo, IBCConnectionInfo} from '../cosmos-api.js'; + * @import {CosmosAssetInfo, CosmosChainInfo, ForwardInfo, IBCConnectionInfo, TransferRoute} from '../cosmos-api.js'; * @import {ChainInfo, KnownChains} from '../chain-info.js'; - * @import {ChainAddress, Denom} from '../orchestration-api.js'; - * @import {Remote} from '@agoric/internal'; + * @import {ChainAddress, Denom, DenomAmount} from '../orchestration-api.js'; + * @import {Remote, TypedPattern} from '@agoric/internal'; */ +/** receiver address value for ibc transfers that involve PFM */ +export const PFM_RECEIVER = /** @type {const} */ ('pfm'); + /** * If K matches a known chain, narrow the type from generic ChainInfo * @@ -167,6 +174,26 @@ const ChainIdArgShape = M.or( ), ); +// TODO #9324 determine timeout defaults +const DefaultPfmTimeoutOpts = harden( + /** @type {const} */ ({ + retries: 3, + timeout: '10min', + }), +); + +/** @type {TypedPattern} */ +export const TransferRouteShape = M.splitRecord( + { + sourcePort: M.string(), + sourceChannel: IBCChannelIDShape, + token: CoinShape, + receiver: M.string(), + }, + { forwardInfo: ForwardInfoShape }, + {}, +); + const ChainHubI = M.interface('ChainHub', { registerChain: M.call(M.string(), CosmosChainInfoShape).returns(), getChainInfo: M.call(M.string()).returns(VowShape), @@ -181,6 +208,12 @@ const ChainHubI = M.interface('ChainHub', { getAsset: M.call(M.string()).returns(M.or(DenomDetailShape, M.undefined())), getDenom: M.call(BrandShape).returns(M.or(M.string(), M.undefined())), makeChainAddress: M.call(M.string()).returns(ChainAddressShape), + makeTransferRoute: M.call(ChainAddressShape, DenomAmountShape, M.string()) + .optional({ + timeout: M.string(), + retries: M.number(), + }) + .returns(M.or(M.undefined(), TransferRouteShape)), }); /** @@ -454,6 +487,113 @@ export const makeChainHub = (zone, agoricNames, vowTools) => { encoding: /** @type {const} */ ('bech32'), }); }, + /** + * Determine the transfer route for a destination and amount given the + * current holding chain. + * + * XXX consider accepting AmountArg #10449 + * + * @param {ChainAddress} destination + * @param {DenomAmount} denomAmount + * @param {string} holdingChainName + * @param {Pick} [forwardOpts] + * @returns {TransferRoute} single hop, multi hop + * @throws {Error} if unable to determine route + */ + makeTransferRoute(destination, denomAmount, holdingChainName, forwardOpts) { + chainInfos.has(holdingChainName) || + Fail`chain info not found for holding chain: ${q(holdingChainName)}`; + + const denomDetail = chainHub.getAsset(denomAmount.denom); + denomDetail || + Fail`no denom detail for: ${q(denomAmount.denom)}. ensure it is registered in chainHub.`; + + const { baseName, chainName } = /** @type {DenomDetail} */ (denomDetail); + chainName === holdingChainName || + Fail`cannot transfer asset ${q(denomAmount.denom)}. held on ${q(chainName)} not ${q(holdingChainName)}.`; + + // currently unreachable since we can't register an asset before a chain + chainInfos.has(baseName) || + Fail`chain info not found for issuing chain: ${q(baseName)}`; + + const { chainId: baseChainId, pfmEnabled } = chainInfos.get(baseName); + + const holdingChainId = chainInfos.get(holdingChainName).chainId; + + // asset is transferring to or from the issuing chain, return direct route + if ( + baseChainId === destination.chainId || + baseName === holdingChainName + ) { + // TODO use getConnectionInfo once its sync + const connKey = connectionKey(holdingChainId, destination.chainId); + connectionInfos.has(connKey) || + Fail`no connection info found for ${q(connKey)}`; + + const { transferChannel } = denormalizeConnectionInfo( + holdingChainId, // from chain (primary) + destination.chainId, // to chain (counterparty) + connectionInfos.get(connKey), + ); + return harden({ + sourcePort: transferChannel.portId, + sourceChannel: transferChannel.channelId, + token: { + amount: String(denomAmount.value), + denom: denomAmount.denom, + }, + receiver: destination.value, + }); + } + + // asset is issued on a 3rd chain, attempt pfm route + pfmEnabled || Fail`pfm not enabled on issuing chain: ${q(baseName)}`; + + // TODO use getConnectionInfo once its sync + const currToIssuerKey = connectionKey(holdingChainId, baseChainId); + connectionInfos.has(currToIssuerKey) || + Fail`no connection info found for ${q(currToIssuerKey)}`; + + const issuerToDestKey = connectionKey(baseChainId, destination.chainId); + connectionInfos.has(issuerToDestKey) || + Fail`no connection info found for ${q(issuerToDestKey)}`; + + const currToIssuer = denormalizeConnectionInfo( + holdingChainId, + baseChainId, + connectionInfos.get(currToIssuerKey), + ); + const issuerToDest = denormalizeConnectionInfo( + baseChainId, + destination.chainId, + connectionInfos.get(issuerToDestKey), + ); + + /** @type {ForwardInfo} */ + const forwardInfo = harden({ + forward: { + receiver: destination.value, + port: issuerToDest.transferChannel.portId, + channel: issuerToDest.transferChannel.channelId, + ...DefaultPfmTimeoutOpts, + ...forwardOpts, + }, + }); + return harden({ + sourcePort: currToIssuer.transferChannel.portId, + sourceChannel: currToIssuer.transferChannel.channelId, + token: { + amount: String(denomAmount.value), + denom: denomAmount.denom, + }, + /** + * purposely using invalid bech32 + * {@link https://github.com/cosmos/ibc-apps/blob/26f3ad8f58e4ffc7769c6766cb42b954181dc100/middleware/packet-forward-middleware/README.md#minimal-example---chain-forward-a-b-c} + */ + receiver: PFM_RECEIVER, + forwardInfo, + }); + }, }); return chainHub; diff --git a/packages/orchestration/src/typeGuards.js b/packages/orchestration/src/typeGuards.js index 721345c0d9f..f97f2bb24c0 100644 --- a/packages/orchestration/src/typeGuards.js +++ b/packages/orchestration/src/typeGuards.js @@ -4,9 +4,10 @@ import { M } from '@endo/patterns'; /** * @import {TypedPattern} from '@agoric/internal'; - * @import {ChainAddress, CosmosAssetInfo, Chain, ChainInfo, CosmosChainInfo, DenomAmount, DenomInfo, AmountArg, CosmosValidatorAddress, OrchestrationPowers} from './types.js'; + * @import {ChainAddress, CosmosAssetInfo, Chain, ChainInfo, CosmosChainInfo, DenomAmount, DenomInfo, AmountArg, CosmosValidatorAddress, OrchestrationPowers, ForwardInfo} from './types.js'; * @import {Any as Proto3Msg} from '@agoric/cosmic-proto/google/protobuf/any.js'; * @import {TxBody} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js'; + * @import {Coin} from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js'; * @import {TypedJson} from '@agoric/cosmic-proto'; * @import {DenomDetail} from './exos/chain-hub.js'; */ @@ -112,6 +113,14 @@ export const ChainInfoShape = M.splitRecord({ }); export const DenomShape = M.string(); +/** @type {TypedPattern} */ +export const CoinShape = { + /** json-safe stringified bigint */ + amount: M.string(), + denom: DenomShape, +}; +harden(CoinShape); + /** @type {TypedPattern>} */ export const DenomInfoShape = { chain: M.remotable('Chain'), @@ -215,3 +224,26 @@ export const OrchestrationPowersShape = { timerService: M.remotable(), }; harden(OrchestrationPowersShape); + +const ForwardArgsShape = { + receiver: M.string(), + port: 'transfer', + channel: M.string(), + timeout: M.string(), + retries: M.number(), +}; +harden(ForwardArgsShape); + +/** @type {TypedPattern} */ +export const ForwardInfoShape = { + forward: M.splitRecord(ForwardArgsShape, { + /** + * Protocol allows us to recursively include `next` keys, but this only + * supports one. In practice, this is all we currently need. + */ + next: { + forward: ForwardArgsShape, + }, + }), +}; +harden(ForwardInfoShape); diff --git a/packages/orchestration/test/exos/chain-hub.test.ts b/packages/orchestration/test/exos/chain-hub.test.ts index b4f4823be97..b93e4e34464 100644 --- a/packages/orchestration/test/exos/chain-hub.test.ts +++ b/packages/orchestration/test/exos/chain-hub.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @jessie.js/safe-await-separator -- XXX irrelevant for tests */ import '@agoric/swingset-liveslots/tools/prepare-test-env.js'; import test from '@endo/ses-ava/prepare-endo.js'; @@ -7,6 +6,8 @@ import { prepareSwingsetVowTools } from '@agoric/vow/vat.js'; import { E } from '@endo/far'; import { makeIssuerKit } from '@agoric/ertp'; import { withAmountUtils } from '@agoric/zoe/tools/test-utils.js'; +import { typedJson } from '@agoric/cosmic-proto'; +import { objectMap } from '@endo/patterns'; import { makeChainHub, registerAssets } from '../../src/exos/chain-hub.js'; import { provideFreshRootZone } from '../durability.js'; import { @@ -19,6 +20,10 @@ import type { IBCConnectionInfo, } from '../../src/cosmos-api.js'; import { assets as assetFixture } from '../assets.fixture.js'; +import { registerChainsAndAssets } from '../../src/utils/chain-hub-helper.js'; +import { assetOn } from '../../src/utils/asset.js'; +import { withChainCapabilities } from '../../src/chain-capabilities.js'; +import type { ChainAddress, DenomAmount } from '../../src/orchestration-api.js'; // fresh state for each test const setup = () => { @@ -191,3 +196,368 @@ test('makeChainAddress', async t => { message: 'Missing prefix for "1notbech32"', }); }); + +const [uusdcOnAgoric, agDetail] = assetOn( + 'uusdc', + 'noble', + 'agoric', + knownChains, +); +const [uusdcOnOsmosis, osDetail] = assetOn( + 'uusdc', + 'noble', + 'osmosis', + knownChains, +); + +test('makeTransferRoute - to issuing chain', async t => { + const { chainHub } = setup(); + registerChainsAndAssets( + chainHub, + {}, + withChainCapabilities(knownChains), // adds pfmEnabled + harden({ [uusdcOnAgoric]: agDetail, [uusdcOnOsmosis]: osDetail }), + ); + + const dest: ChainAddress = chainHub.makeChainAddress('noble1234'); + { + // 100 USDC on agoric -> noble + const amt: DenomAmount = harden({ denom: uusdcOnAgoric, value: 100n }); + t.deepEqual(chainHub.makeTransferRoute(dest, amt, 'agoric'), { + receiver: 'noble1234', + sourceChannel: 'channel-62', + sourcePort: 'transfer', + token: { + amount: '100', + denom: + 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9', + }, + }); + } + { + // 100 USDC on osmosis -> noble + const amt: DenomAmount = harden({ denom: uusdcOnOsmosis, value: 100n }); + t.deepEqual(chainHub.makeTransferRoute(dest, amt, 'osmosis'), { + receiver: 'noble1234', + sourceChannel: 'channel-750', + sourcePort: 'transfer', + token: { + amount: '100', + denom: + 'ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4', + }, + }); + } +}); + +test('makeTransferRoute - from issuing chain', async t => { + const { chainHub } = setup(); + + registerChainsAndAssets( + chainHub, + {}, + withChainCapabilities(knownChains), // adds pfmEnabled + harden( + Object.fromEntries([ + assetOn('uist', 'agoric'), + assetOn('uosmo', 'osmosis'), + ]), + ), + ); + + const dest: ChainAddress = chainHub.makeChainAddress('noble1234'); + { + // IST on agoric -> noble + const amt: DenomAmount = harden({ denom: 'uist', value: 100n }); + t.deepEqual(chainHub.makeTransferRoute(dest, amt, 'agoric'), { + receiver: 'noble1234', + sourceChannel: 'channel-62', + sourcePort: 'transfer', + token: { + amount: '100', + denom: 'uist', + }, + }); + } + { + // OSMO on osmosis -> noble + const amt: DenomAmount = harden({ denom: 'uosmo', value: 100n }); + t.deepEqual(chainHub.makeTransferRoute(dest, amt, 'osmosis'), { + receiver: 'noble1234', + sourceChannel: 'channel-750', + sourcePort: 'transfer', + token: { + amount: '100', + denom: 'uosmo', + }, + }); + } +}); + +test('makeTransferRoute - through issuing chain', async t => { + const { chainHub } = setup(); + + registerChainsAndAssets( + chainHub, + {}, + withChainCapabilities(knownChains), // adds pfmEnabled + harden({ [uusdcOnAgoric]: agDetail }), + ); + + const dest: ChainAddress = chainHub.makeChainAddress('osmo1234'); + const amt: DenomAmount = harden({ denom: uusdcOnAgoric, value: 100n }); + + // 100 USDC on agoric -> osmosis + const route = chainHub.makeTransferRoute(dest, amt, 'agoric'); + t.deepEqual(route, { + sourcePort: 'transfer', + sourceChannel: 'channel-62', + token: { + amount: '100', + denom: + 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9', + }, + receiver: 'pfm', + forwardInfo: { + forward: { + receiver: 'osmo1234', + port: 'transfer', + channel: 'channel-1', + retries: 3, + timeout: '10min', + }, + }, + }); + + // use TransferRoute to build a MsgTransfer + if (!route || !('forwardInfo' in route)) { + throw new Error('forwardInfo not returned'); // appease tsc... + } + + const { forwardInfo, ...rest } = route; + const transferMsg = typedJson('/ibc.applications.transfer.v1.MsgTransfer', { + ...rest, + memo: JSON.stringify(forwardInfo), + // callers of `.makeTransferRoute` will provide these fields themselves: + sender: 'agoric123', + timeoutHeight: { + revisionHeight: 0n, + revisionNumber: 0n, + }, + timeoutTimestamp: 0n, + }); + t.like(transferMsg, { + memo: '{"forward":{"receiver":"osmo1234","port":"transfer","channel":"channel-1","retries":3,"timeout":"10min"}}', + receiver: 'pfm', + }); +}); + +test('makeTransferRoute - takes forwardOpts', t => { + const { chainHub } = setup(); + + registerChainsAndAssets( + chainHub, + {}, + withChainCapabilities(knownChains), // adds pfmEnabled + harden({ [uusdcOnOsmosis]: osDetail }), + ); + + const dest: ChainAddress = chainHub.makeChainAddress('agoric1234'); + const amt: DenomAmount = harden({ denom: uusdcOnOsmosis, value: 100n }); + const forwardOpts = harden({ + retries: 1, + timeout: '3min', + }); + + // 100 USDC on osmosis -> agoric + const route = chainHub.makeTransferRoute(dest, amt, 'osmosis', forwardOpts); + t.like(route, { + sourceChannel: 'channel-750', + token: { + denom: uusdcOnOsmosis, + }, + forwardInfo: { + forward: { + channel: 'channel-21', + ...forwardOpts, + }, + }, + }); + + // test that typeGuard works + t.throws( + () => + chainHub.makeTransferRoute( + dest, + amt, + 'osmosis', + harden({ + ...forwardOpts, + forward: JSON.stringify('stringified nested forward data'), + }), + ), + { message: /Must not have unexpected properties/ }, + ); +}); + +const nobleDest: ChainAddress = harden({ + value: 'noble1234', + chainId: 'noble-1', + encoding: 'bech32', +}); + +test('makeTransferRoute - no chain info', t => { + const { chainHub } = setup(); + + const amt: DenomAmount = harden({ denom: 'uist', value: 100n }); + t.throws(() => chainHub.makeTransferRoute(nobleDest, amt, 'agoric'), { + message: 'chain info not found for holding chain: "agoric"', + }); +}); + +test('makeTransferRoute - no asset info', t => { + const { chainHub } = setup(); + + registerChainsAndAssets( + chainHub, + {}, + withChainCapabilities(knownChains), // adds pfmEnabled + undefined, // do not supply asset info + ); + + t.throws( + () => + chainHub.makeTransferRoute( + nobleDest, + harden({ denom: 'uist', value: 100n }), + 'agoric', + ), + { + message: + 'no denom detail for: "uist". ensure it is registered in chainHub.', + }, + ); + + t.throws( + () => + chainHub.makeTransferRoute( + nobleDest, + harden({ denom: uusdcOnAgoric, value: 100n }), + 'agoric', + ), + { + message: + 'no denom detail for: "ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9". ensure it is registered in chainHub.', + }, + ); +}); + +const knownChainsSansConns = objectMap( + withChainCapabilities(knownChains), + ({ connections, ...rest }) => rest, +); + +test('makeTransferRoute - no connection info single hop', t => { + const { chainHub } = setup(); + + registerChainsAndAssets( + chainHub, + {}, + knownChainsSansConns, // omit connections + harden({ [uusdcOnAgoric]: agDetail }), + ); + + t.throws( + () => + chainHub.makeTransferRoute( + nobleDest, + harden({ denom: uusdcOnAgoric, value: 100n }), + 'agoric', + ), + { message: 'no connection info found for "agoric-3_noble-1"' }, + ); +}); + +test('makeTransferRoute - no connection info multi hop', t => { + const { chainHub } = setup(); + + // only agoric has connection info; osmosis<>noble will be missing + const chainInfo = { ...knownChainsSansConns, agoric: knownChains.agoric }; + registerChainsAndAssets( + chainHub, + {}, + harden(chainInfo), + harden({ [uusdcOnAgoric]: agDetail, [uusdcOnOsmosis]: osDetail }), + ); + + const osmoDest = chainHub.makeChainAddress('osmo1234'); + const agoricDest = chainHub.makeChainAddress('agoric1234'); + + t.throws( + () => + chainHub.makeTransferRoute( + osmoDest, + harden({ denom: uusdcOnAgoric, value: 100n }), + 'agoric', + ), + { message: 'no connection info found for "noble-1_osmosis-1"' }, + ); + + // transfer USDC on osmosis to agoric + t.throws( + () => + chainHub.makeTransferRoute( + agoricDest, + harden({ denom: uusdcOnOsmosis, value: 100n }), + 'osmosis', + ), + { message: 'no connection info found for "noble-1_osmosis-1"' }, + ); +}); + +test('makeTransferRoute - asset not on holding chain', t => { + const { chainHub } = setup(); + + registerChainsAndAssets( + chainHub, + {}, + withChainCapabilities(knownChains), + harden({ [uusdcOnAgoric]: agDetail }), + ); + + // transfer USDC on agoric from osmosis to noble (impossible) + t.throws( + () => + chainHub.makeTransferRoute( + nobleDest, + harden({ denom: uusdcOnAgoric, value: 100n }), + 'osmosis', + ), + { + message: + 'cannot transfer asset "ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9". held on "agoric" not "osmosis".', + }, + ); +}); + +test('makeTransferRoute - no PFM path', t => { + const { chainHub } = setup(); + + registerChainsAndAssets( + chainHub, + {}, + knownChains, // intentionally omit pfmEnabled + harden({ [uusdcOnAgoric]: agDetail }), + ); + + // transfer USDC on agoric to osmosis + t.throws( + () => + chainHub.makeTransferRoute( + chainHub.makeChainAddress('osmo1234'), + harden({ denom: uusdcOnAgoric, value: 100n }), + 'agoric', + ), + { message: 'pfm not enabled on issuing chain: "noble"' }, + ); +}); From 1717b2aa7859a26bf6acdb9ba87d8c9cf1f86a2e Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 27 Nov 2024 15:06:10 -0500 Subject: [PATCH 093/174] chore: include `ForwardInfoShape` and `CoinShape` in snapshots --- .../orchestration-imports.test.js.md | 48 ++++++++++++++++++ .../orchestration-imports.test.js.snap | Bin 3753 -> 3987 bytes .../test/snapshots/exports.test.ts.md | 2 + .../test/snapshots/exports.test.ts.snap | Bin 662 -> 689 bytes 4 files changed, 50 insertions(+) diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.md b/packages/builders/test/snapshots/orchestration-imports.test.js.md index 7749e126b16..879f4029b18 100644 --- a/packages/builders/test/snapshots/orchestration-imports.test.js.md +++ b/packages/builders/test/snapshots/orchestration-imports.test.js.md @@ -85,6 +85,14 @@ Generated by [AVA](https://avajs.dev). }, ], }, + CoinShape: { + amount: Object @match:string { + payload: [], + }, + denom: Object @match:string { + payload: [], + }, + }, CosmosAssetInfoShape: Object @match:splitRecord { payload: [ { @@ -270,6 +278,46 @@ Generated by [AVA](https://avajs.dev). DenomShape: Object @match:string { payload: [], }, + ForwardInfoShape: { + forward: Object @match:splitRecord { + payload: [ + { + channel: Object @match:string { + payload: [], + }, + port: 'transfer', + receiver: Object @match:string { + payload: [], + }, + retries: Object @match:kind { + payload: 'number', + }, + timeout: Object @match:string { + payload: [], + }, + }, + { + next: { + forward: { + channel: Object @match:string { + payload: [], + }, + port: 'transfer', + receiver: Object @match:string { + payload: [], + }, + retries: Object @match:kind { + payload: 'number', + }, + timeout: Object @match:string { + payload: [], + }, + }, + }, + }, + ], + }, + }, IBCChannelIDShape: Object @match:string { payload: [], }, diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.snap b/packages/builders/test/snapshots/orchestration-imports.test.js.snap index e3536ba0aecf546bded44c857e96d8a48817649f..dba58251741462f8c1e1c312743d2c4078823f05 100644 GIT binary patch literal 3987 zcmV;E4{Y#3RzVl^@5?Nd_NUaM8Vm0+TpC=< zdyCiKnIDS?00000000BcTYGR^)p`G&-IcV`YFAqA%C_DTw)HT2%Ynu`Vp+D4P5i(% z5ED~#wR^R?c=z7r-YeM()Q%IT9!Oh4I}8kNLQDWBZJeY-!{ot0!cf|zWhRr9CWO*J z+<}r#pe`h&kd$)o-M#zWZ+EW=Go6Y4*wLQf@AsYWyuS0DbEH%Ab6G8Q$T)t#Y$|3} zKGL;O%4oWh8q@UDf^3+&WGb54D<8>gx@jneD&>s@%`}d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HV!<+6@%pWbgSj1J81J?9tVEF z`5S|F$s5=zid+~6-W&(Q6F_RhyOKV_w@tg%x{e8;Zvxmj0eo-*xQ59N*O1ZAs0i(t z0CrC>$2H&3xXVGAct2-!>Ckmd+)GT9Z#rZ4T}51oKbUY|`%R!c>|e0{4cV-S{ou#+*!Yb91(h^MT7!=%k;YP$VSruT0Xz)x8Cx@#X+gFc@zFDEKO7bbu=nbD%hs5_&> zlinFVFgTgHzRKr(LYGegS8=NDQ--~V+^=5c>C}NKpRvAu3OLD|Hmbt( TE(gRxtMC5{XXopq=r8~P1@TL_ diff --git a/packages/orchestration/test/snapshots/exports.test.ts.md b/packages/orchestration/test/snapshots/exports.test.ts.md index c57931aa11b..f4a36635d08 100644 --- a/packages/orchestration/test/snapshots/exports.test.ts.md +++ b/packages/orchestration/test/snapshots/exports.test.ts.md @@ -14,6 +14,7 @@ Generated by [AVA](https://avajs.dev). 'AnyNatAmountsRecord', 'ChainAddressShape', 'ChainInfoShape', + 'CoinShape', 'CosmosAssetInfoShape', 'CosmosChainInfoShape', 'DelegationShape', @@ -21,6 +22,7 @@ Generated by [AVA](https://avajs.dev). 'DenomDetailShape', 'DenomInfoShape', 'DenomShape', + 'ForwardInfoShape', 'IBCChannelIDShape', 'IBCChannelInfoShape', 'IBCConnectionIDShape', diff --git a/packages/orchestration/test/snapshots/exports.test.ts.snap b/packages/orchestration/test/snapshots/exports.test.ts.snap index acdc30319ea66e263ba980fca052e20ce47d0ff2..3d9da073d5a8c310ae5fb16b5b2bbbcd5cc14d37 100644 GIT binary patch literal 689 zcmV;i0#5xwRzVs(J6FWPCfp5S^=mHbuz@|=nlcnc(&-?m)ADz<>a62=JKz zKL{`p0Jj665dbUzUIoDW0QeFB=K-)40{26p69TV8;8O^E4}o7Huvr4`mVjp^;AIJT zTLQk8fS-TPJ7u6oCaRM~Q7s?>SLkEuzeUu@a}3w17J?}~}c_(Yu>nr0p`>+V_* zmztQf`b?pF+BN6CC)I!|cIoeVH|*wa94Ax=o;B+pQgKVWfQ=b_qj-nCt9@1(ye@NeU>YIqjrb XYEtg79hb}z=56pd&!i?GZ3O@T#M(L% literal 662 zcmV;H0%`q0RzVZ(wHnwQ*mbZ4G+2aX7K2sm>~b6;Byq?JM z18)DSfJBZo&Jy#8`brCjVqd43@=PW|Xfh_KQ}L~oq%99rkXK#4+*D?$Okxb#b82cr zU0iG0salH$bjWR{WB_IySZtA0!warG8;TZLo(%#q=Py)>b4|>zxx?7dB$b`90gKRQop$CM5&rntD%~#w&>hid%M}yT$%&YoxHH&Eb9)= zx0?@lO}JA_E?n>EeoDsb^8NSJ5$Ui@!^w@#$oAAoivP{+a480)+s-cgBlonj>Q+!_ z#lKZI8eg7-rI`t4?h>RqlCPTGHjQ`=p;`ec#kIKQm2- wnX#nHvL=zD{0I5YHXU3!%4}MqCeL{<8)P;k&$j$#7A% Date: Wed, 27 Nov 2024 18:02:25 -0800 Subject: [PATCH 094/174] feat: upgrade v7-board and test it (#10516) closes: #10394 ## Description Upgrade v7-board. ### Security Considerations The Board is a critical vat. ### Scaling Considerations v7-Board is consuming more resources than it should. restarting it should clean up a fair amount of space. **...checking** ### Documentation Considerations None ### Testing Considerations Verify that the board doesn't lose anything. ### Upgrade Considerations Can go out in Upgrade 19. --- .../proposals/p:upgrade-19/.gitignore | 1 + .../proposals/p:upgrade-19/eval.sh | 9 +++- .../proposals/p:upgrade-19/package.json | 5 +- .../registry.test.js | 0 .../proposals/p:upgrade-19/test.sh | 1 + .../p:upgrade-19/upgradedBoard.test.js | 15 ++++++ golang/cosmos/app/upgrade.go | 22 ++++---- .../inter-protocol/replace-feeDistributor.js | 4 +- .../testing/replace-feeDistributor-short.js | 8 ++- .../scripts/testing/test-upgraded-board.js | 15 ++++++ .../builders/scripts/vats/upgrade-board.js | 20 ++++++++ .../vats/src/proposals/testUpgradedBoard.js | 35 +++++++++++++ .../src/proposals/upgrade-board-proposal.js | 50 +++++++++++++++++++ 13 files changed, 171 insertions(+), 14 deletions(-) rename a3p-integration/proposals/{n:upgrade-next => p:upgrade-19}/registry.test.js (100%) create mode 100644 a3p-integration/proposals/p:upgrade-19/upgradedBoard.test.js create mode 100644 packages/builders/scripts/testing/test-upgraded-board.js create mode 100644 packages/builders/scripts/vats/upgrade-board.js create mode 100644 packages/vats/src/proposals/testUpgradedBoard.js create mode 100644 packages/vats/src/proposals/upgrade-board-proposal.js diff --git a/a3p-integration/proposals/p:upgrade-19/.gitignore b/a3p-integration/proposals/p:upgrade-19/.gitignore index 8c6dbb7f6af..17bb7d663e2 100644 --- a/a3p-integration/proposals/p:upgrade-19/.gitignore +++ b/a3p-integration/proposals/p:upgrade-19/.gitignore @@ -1 +1,2 @@ replaceFeeDistributor/ +testUpgradedBoard/ diff --git a/a3p-integration/proposals/p:upgrade-19/eval.sh b/a3p-integration/proposals/p:upgrade-19/eval.sh index 612011ea52b..d5a8d48bf87 100644 --- a/a3p-integration/proposals/p:upgrade-19/eval.sh +++ b/a3p-integration/proposals/p:upgrade-19/eval.sh @@ -1,3 +1,10 @@ #!/bin/bash -# Do nothing because this is only testing the state resulting from previous proposals. +# evaluate the proposals in the /submission/ directory + +echo "UPGRADE-19 Running proposal declared in package.json" +# copy to run in the proposal package so the dependencies can be resolved +cp /usr/src/upgrade-test-scripts/eval_submission.js . + +echo RUNNING ./eval_submission.js +./eval_submission.js diff --git a/a3p-integration/proposals/p:upgrade-19/package.json b/a3p-integration/proposals/p:upgrade-19/package.json index e2f705ad798..f3b062f3c76 100644 --- a/a3p-integration/proposals/p:upgrade-19/package.json +++ b/a3p-integration/proposals/p:upgrade-19/package.json @@ -2,7 +2,10 @@ "agoricProposal": { "type": "/agoric.swingset.CoreEvalProposal", "sdk-generate": [ - "testing/replace-feeDistributor-short.js replaceFeeDistributor" + "testing/replace-feeDistributor-short.js replaceFeeDistributor", + "vats/upgrade-paRegistry.js", + "vats/upgrade-board.js", + "testing/test-upgraded-board.js testUpgradedBoard" ] }, "type": "module", diff --git a/a3p-integration/proposals/n:upgrade-next/registry.test.js b/a3p-integration/proposals/p:upgrade-19/registry.test.js similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/registry.test.js rename to a3p-integration/proposals/p:upgrade-19/registry.test.js diff --git a/a3p-integration/proposals/p:upgrade-19/test.sh b/a3p-integration/proposals/p:upgrade-19/test.sh index 7b9ea0090c5..056fe6836ac 100644 --- a/a3p-integration/proposals/p:upgrade-19/test.sh +++ b/a3p-integration/proposals/p:upgrade-19/test.sh @@ -1,3 +1,4 @@ #!/bin/bash yarn ava replaceFeeDistributor.test.js +yarn ava upgradedBoard.test.js diff --git a/a3p-integration/proposals/p:upgrade-19/upgradedBoard.test.js b/a3p-integration/proposals/p:upgrade-19/upgradedBoard.test.js new file mode 100644 index 00000000000..c72b130c7f3 --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/upgradedBoard.test.js @@ -0,0 +1,15 @@ +/* eslint-env node */ +// @ts-check + +/** @file test that the upgraded board can store and retrieve values. */ + +import '@endo/init/legacy.js'; +import test from 'ava'; +import { evalBundles } from '@agoric/synthetic-chain'; + +test('test upgraded board', async t => { + // agoricProposal.sdk-generate in package.json generates this proposal + await evalBundles('testUpgradedBoard'); + + t.pass(); +}); diff --git a/golang/cosmos/app/upgrade.go b/golang/cosmos/app/upgrade.go index 1396a18879b..8770675d792 100644 --- a/golang/cosmos/app/upgrade.go +++ b/golang/cosmos/app/upgrade.go @@ -214,15 +214,19 @@ func unreleasedUpgradeHandler(app *GaiaApp, targetUpgrade string) func(sdk.Conte ), ) - // CoreProposals for Upgrade 19 - CoreProposalSteps = append(CoreProposalSteps, - vm.CoreProposalStepForModules( - "@agoric/builders/scripts/inter-protocol/replace-feeDistributor.js", - ), - vm.CoreProposalStepForModules( - "@agoric/builders/scripts/vats/upgrade-paRegistry.js", - ), - ) + // // CoreProposals for Upgrade 19. These should not be introduced + // // before upgrade 18 is done because they would be run in n:upgrade-next + // CoreProposalSteps = append(CoreProposalSteps, + // vm.CoreProposalStepForModules( + // "@agoric/builders/scripts/inter-protocol/replace-feeDistributor.js", + // ), + // vm.CoreProposalStepForModules( + // "@agoric/builders/scripts/vats/upgrade-paRegistry.js", + // ), + // vm.CoreProposalStepForModules( + // "@agoric/builders/scripts/vats/upgrade-board.js", + // ), + // ) } app.upgradeDetails = &upgradeDetails{ diff --git a/packages/builders/scripts/inter-protocol/replace-feeDistributor.js b/packages/builders/scripts/inter-protocol/replace-feeDistributor.js index 4cfd846b873..60f0f5f3e6b 100644 --- a/packages/builders/scripts/inter-protocol/replace-feeDistributor.js +++ b/packages/builders/scripts/inter-protocol/replace-feeDistributor.js @@ -4,7 +4,7 @@ import { SECONDS_PER_HOUR } from '@agoric/inter-protocol/src/proposals/econ-beha /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ export const defaultProposalBuilder = async (_, opts) => { - console.log('OPTS', opts); + console.log('feeDist OPTS', opts); return harden({ sourceSpec: '@agoric/inter-protocol/src/proposals/replace-fee-distributor.js', @@ -16,7 +16,7 @@ export const defaultProposalBuilder = async (_, opts) => { export default async (homeP, endowments) => { const { writeCoreEval } = await makeHelpers(homeP, endowments); - await writeCoreEval('replace-feeDistributor-testing', utils => + await writeCoreEval('replace-feeDistributor', utils => defaultProposalBuilder(utils, { collectionInterval: 1n * SECONDS_PER_HOUR, keywordShares: { diff --git a/packages/builders/scripts/testing/replace-feeDistributor-short.js b/packages/builders/scripts/testing/replace-feeDistributor-short.js index 99a3987d87c..2cad2cca9ad 100644 --- a/packages/builders/scripts/testing/replace-feeDistributor-short.js +++ b/packages/builders/scripts/testing/replace-feeDistributor-short.js @@ -1,9 +1,15 @@ import { makeHelpers } from '@agoric/deploy-script-support'; import { getManifestForReplaceFeeDistributor } from '@agoric/inter-protocol/src/proposals/replace-fee-distributor.js'; +/** + * @file + * a Variant of ../inter-protocol/replace-feeDistributor.js that shortens the + * collectionInterval for testing + */ + /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ export const defaultProposalBuilder = async (_, opts) => { - console.log('OPTS', opts); + console.log('feeDist OPTS', opts); return harden({ sourceSpec: '@agoric/inter-protocol/src/proposals/replace-fee-distributor.js', diff --git a/packages/builders/scripts/testing/test-upgraded-board.js b/packages/builders/scripts/testing/test-upgraded-board.js new file mode 100644 index 00000000000..28d90d2346d --- /dev/null +++ b/packages/builders/scripts/testing/test-upgraded-board.js @@ -0,0 +1,15 @@ +import { makeHelpers } from '@agoric/deploy-script-support'; +import { getManifestForTestUpgradedBoard } from '@agoric/vats/src/proposals/testUpgradedBoard.js'; + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ +export const defaultProposalBuilder = async () => + harden({ + sourceSpec: '@agoric/vats/src/proposals/testUpgradedBoard.js', + getManifestCall: [getManifestForTestUpgradedBoard.name], + }); + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ +export default async (homeP, endowments) => { + const { writeCoreEval } = await makeHelpers(homeP, endowments); + await writeCoreEval('testUpgradedBoard', defaultProposalBuilder); +}; diff --git a/packages/builders/scripts/vats/upgrade-board.js b/packages/builders/scripts/vats/upgrade-board.js new file mode 100644 index 00000000000..b2b3070b2cd --- /dev/null +++ b/packages/builders/scripts/vats/upgrade-board.js @@ -0,0 +1,20 @@ +import { makeHelpers } from '@agoric/deploy-script-support'; +import { getManifestForUpgradingBoard } from '@agoric/vats/src/proposals/upgrade-board-proposal.js'; + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ +export const defaultProposalBuilder = async ({ publishRef, install }) => + harden({ + sourceSpec: '@agoric/vats/src/proposals/upgrade-board-proposal.js', + getManifestCall: [ + getManifestForUpgradingBoard.name, + { + boardRef: publishRef(install('@agoric/vats/src/vat-board.js')), + }, + ], + }); + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ +export default async (homeP, endowments) => { + const { writeCoreEval } = await makeHelpers(homeP, endowments); + await writeCoreEval('upgrade-board', defaultProposalBuilder); +}; diff --git a/packages/vats/src/proposals/testUpgradedBoard.js b/packages/vats/src/proposals/testUpgradedBoard.js new file mode 100644 index 00000000000..78b21079d0a --- /dev/null +++ b/packages/vats/src/proposals/testUpgradedBoard.js @@ -0,0 +1,35 @@ +import { E, Far } from '@endo/far'; +import { Stable } from '@agoric/internal/src/tokens.js'; + +export const testUpgradedBoard = async ({ + consume: { board }, + brand: { + consume: { [Stable.symbol]: stableBrandP }, + }, +}) => { + // /////// can we store something and get it back? //////// + const thing1 = Far('thing1', {}); + const thing1Id = await E(board).getId(thing1); + assert(thing1Id.match(/^board0[0-9]+$/)); + + const marshaller = await E(board).getReadonlyMarshaller(); + assert(marshaller, 'expected a marshaller'); + + const stableBrand = await stableBrandP; + // /////// can we retrieve a well-known object via its ID? //////// + const stableID = await E(board).getId(stableBrand); + // /////// can we retrieve something stored long ago? //////// + const stableBrandRetrieved = await E(board).getValue(stableID); + assert(stableBrandRetrieved === stableBrand, 'retrieved matching brand'); +}; + +export const getManifestForTestUpgradedBoard = () => ({ + manifest: { + [testUpgradedBoard.name]: { + consume: { board: true }, + brand: { + consume: { [Stable.symbol]: true }, + }, + }, + }, +}); diff --git a/packages/vats/src/proposals/upgrade-board-proposal.js b/packages/vats/src/proposals/upgrade-board-proposal.js new file mode 100644 index 00000000000..e98398fb9b3 --- /dev/null +++ b/packages/vats/src/proposals/upgrade-board-proposal.js @@ -0,0 +1,50 @@ +import { E } from '@endo/far'; + +/** + * @param {BootstrapPowers & { + * consume: { + * vatAdminSvc: VatAdminSvc; + * vatStore: MapStore< + * string, + * import('@agoric/swingset-vat').CreateVatResults + * >; + * }; + * }} powers + * @param {object} options + * @param {{ boardRef: VatSourceRef }} options.options + */ +export const upgradeBoard = async ( + { consume: { board, vatAdminSvc, vatStore } }, + options, +) => { + const { boardRef } = options.options; + + assert(boardRef.bundleID); + const boardBundleCap = await E(vatAdminSvc).getBundleCap(boardRef.bundleID); + console.log(`Board BUNDLE ID: `, boardRef.bundleID); + const idsBefore = await E(board).ids(); + + const { adminNode } = await E(vatStore).get('board'); + await E(adminNode).upgrade(boardBundleCap, {}); + + const idsAfter = await E(board).ids(); + const same = + idsBefore.length === idsAfter.length && + idsBefore.every((element, index) => element === idsAfter[index]); + assert(same, 'keys must stay the same'); + + console.log('Board upgrade complete'); +}; + +export const getManifestForUpgradingBoard = (_powers, { boardRef }) => ({ + manifest: { + [upgradeBoard.name]: { + consume: { + board: 'board', + vatAdminSvc: 'vatAdminSvc', + vatStore: 'vatStore', + }, + }, + }, + options: { boardRef }, +}); From e8f6de2aaf1fa5457f4a31bcaa7a742e4634eeb8 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Sun, 1 Dec 2024 22:22:10 -0600 Subject: [PATCH 095/174] fix(agoric-cli): use readPublished consistently in agops oracle --- packages/agoric-cli/src/commands/oracle.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/agoric-cli/src/commands/oracle.js b/packages/agoric-cli/src/commands/oracle.js index 9b72a1f8595..2882cef094a 100644 --- a/packages/agoric-cli/src/commands/oracle.js +++ b/packages/agoric-cli/src/commands/oracle.js @@ -207,11 +207,10 @@ export const makeOracleCommand = (logger, io = {}) => { s => s.split('.'), ) .action(async opts => { - const { readLatestHead, lookupPriceAggregatorInstance } = - await rpcTools(); + const { readPublished, lookupPriceAggregatorInstance } = await rpcTools(); const instance = lookupPriceAggregatorInstance(opts.pair); - const offerId = await findOracleCap(instance, opts.from, readLatestHead); + const offerId = await findOracleCap(instance, opts.from, readPublished); if (!offerId) { console.error('No continuing ids found'); } @@ -272,8 +271,12 @@ export const makeOracleCommand = (logger, io = {}) => { * }} */ { pair, keys, price }, ) => { - const { readLatestHead, networkConfig, lookupPriceAggregatorInstance } = - await rpcTools(); + const { + readLatestHead, + readPublished, + networkConfig, + lookupPriceAggregatorInstance, + } = await rpcTools(); const wutil = await makeWalletUtils({ fetch, delay }, networkConfig); const unitPrice = scaleDecimals(price); @@ -338,7 +341,7 @@ export const makeOracleCommand = (logger, io = {}) => { adminOfferIds[from] = await findOracleCap( instance, from, - readLatestHead, + readPublished, ); if (!adminOfferIds[from]) { console.error( From cccc2e6c61ab815ee89edb008d567437d90dcbd1 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Fri, 18 Oct 2024 22:22:50 -0500 Subject: [PATCH 096/174] docs: missing typeof --- packages/SwingSet/tools/run-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SwingSet/tools/run-utils.js b/packages/SwingSet/tools/run-utils.js index 5c1ed2e4b39..0bb0c5e3866 100644 --- a/packages/SwingSet/tools/run-utils.js +++ b/packages/SwingSet/tools/run-utils.js @@ -17,7 +17,7 @@ export const makeRunUtils = controller => { * Wait for exclusive access to the controller, then before relinquishing that access, * enqueue and process a delivery and return the result. * - * @param {() => ERef>} deliveryThunk + * @param {() => ERef>} deliveryThunk * function for enqueueing a delivery and returning the result kpid (if any) * @param {boolean} [voidResult] whether to ignore the result * @returns {Promise} From 84c527175827d65eddf46051582e205b5df92672 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 28 Oct 2024 12:29:36 -0500 Subject: [PATCH 097/174] chore: let makeRunUtils caller provide run policy --- packages/SwingSet/tools/run-utils.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/SwingSet/tools/run-utils.js b/packages/SwingSet/tools/run-utils.js index 0bb0c5e3866..d2676f1055b 100644 --- a/packages/SwingSet/tools/run-utils.js +++ b/packages/SwingSet/tools/run-utils.js @@ -2,12 +2,18 @@ import { Fail, q } from '@endo/errors'; import { kunser } from '@agoric/kmarshal'; import { makeQueue } from '@endo/stream'; -/** @import { ERef } from '@endo/far' */ +/** + * @import { ERef } from '@endo/far' + * @import { RunPolicy } from '../src/types-external.js' + */ + +/** @typedef {{ provideRunPolicy: () => RunPolicy | undefined }} RunPolicyMaker */ /** * @param {import('../src/controller/controller.js').SwingsetController} controller + * @param {RunPolicyMaker} [perfTool] */ -export const makeRunUtils = controller => { +export const makeRunUtils = (controller, perfTool) => { const mutex = makeQueue(); const logRunFailure = reason => console.log('controller.run() failure', reason); @@ -25,7 +31,8 @@ export const makeRunUtils = controller => { const queueAndRun = async (deliveryThunk, voidResult = false) => { await mutex.get(); const kpid = await deliveryThunk(); - const runResultP = controller.run(); + const runPolicy = perfTool && perfTool.provideRunPolicy(); + const runResultP = controller.run(runPolicy); mutex.put(runResultP.catch(logRunFailure)); await runResultP; From c5b71bc591f40be4bec0a42933876c76929f7fcf Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 28 Oct 2024 12:49:17 -0500 Subject: [PATCH 098/174] refactor: factor out computronCounter --- .../cosmic-swingset/src/computron-counter.js | 115 ++++++++++++++++++ packages/cosmic-swingset/src/launch-chain.js | 113 +---------------- 2 files changed, 116 insertions(+), 112 deletions(-) create mode 100644 packages/cosmic-swingset/src/computron-counter.js diff --git a/packages/cosmic-swingset/src/computron-counter.js b/packages/cosmic-swingset/src/computron-counter.js new file mode 100644 index 00000000000..4db024ca7a0 --- /dev/null +++ b/packages/cosmic-swingset/src/computron-counter.js @@ -0,0 +1,115 @@ +// @ts-check + +import { assert } from '@endo/errors'; +import { + BeansPerBlockComputeLimit, + BeansPerVatCreation, + BeansPerXsnapComputron, +} from './sim-params.js'; + +const { hasOwn } = Object; + +/** + * @typedef {object} BeansPerUnit + * @property {bigint} blockComputeLimit + * @property {bigint} vatCreation + * @property {bigint} xsnapComputron + */ + +/** + * Return a stateful run policy that supports two phases: first allow + * non-cleanup work (presumably deliveries) until an overrideable computron + * budget is exhausted, then (iff no work was done and at least one vat cleanup + * budget field is positive) a cleanup phase that allows cleanup work (and + * presumably nothing else) until one of those fields is exhausted. + * https://github.com/Agoric/agoric-sdk/issues/8928#issuecomment-2053357870 + * + * @param {object} params + * @param {BeansPerUnit} params.beansPerUnit + * @param {import('@agoric/swingset-vat').CleanupBudget} [params.vatCleanupBudget] + * @param {boolean} [ignoreBlockLimit] + * @returns {import('./launch-chain.js').ChainRunPolicy} + */ +export function computronCounter( + { beansPerUnit, vatCleanupBudget }, + ignoreBlockLimit = false, +) { + const { + [BeansPerBlockComputeLimit]: blockComputeLimit, + [BeansPerVatCreation]: vatCreation, + [BeansPerXsnapComputron]: xsnapComputron, + } = beansPerUnit; + assert.typeof(blockComputeLimit, 'bigint'); + assert.typeof(vatCreation, 'bigint'); + assert.typeof(xsnapComputron, 'bigint'); + + let totalBeans = 0n; + const shouldRun = () => ignoreBlockLimit || totalBeans < blockComputeLimit; + + const remainingCleanups = { default: Infinity, ...vatCleanupBudget }; + const defaultCleanupBudget = remainingCleanups.default; + let cleanupStarted = false; + let cleanupDone = false; + const cleanupPossible = + Object.values(remainingCleanups).length > 0 + ? Object.values(remainingCleanups).some(n => n > 0) + : defaultCleanupBudget > 0; + if (!cleanupPossible) cleanupDone = true; + /** @type {() => (false | import('@agoric/swingset-vat').CleanupBudget)} */ + const allowCleanup = () => + cleanupStarted && !cleanupDone && { ...remainingCleanups }; + const startCleanup = () => { + assert(!cleanupStarted); + cleanupStarted = true; + return totalBeans === 0n && !cleanupDone; + }; + const didCleanup = details => { + for (const [phase, count] of Object.entries(details.cleanups)) { + if (phase === 'total') continue; + if (!hasOwn(remainingCleanups, phase)) { + // TODO: log unknown phases? + remainingCleanups[phase] = defaultCleanupBudget; + } + remainingCleanups[phase] -= count; + if (remainingCleanups[phase] <= 0) cleanupDone = true; + } + // We return true to allow processing of any BOYD/GC prompted by cleanup, + // even if cleanup as such is now done. + return true; + }; + + const policy = harden({ + vatCreated() { + totalBeans += vatCreation; + return shouldRun(); + }, + crankComplete(details = {}) { + assert.typeof(details, 'object'); + if (details.computrons) { + assert.typeof(details.computrons, 'bigint'); + + // TODO: xsnapComputron should not be assumed here. + // Instead, SwingSet should describe the computron model it uses. + totalBeans += details.computrons * xsnapComputron; + } + return shouldRun(); + }, + crankFailed() { + const failedComputrons = 1000000n; // who knows, 1M is as good as anything + totalBeans += failedComputrons * xsnapComputron; + return shouldRun(); + }, + emptyCrank() { + return shouldRun(); + }, + allowCleanup, + didCleanup, + + shouldRun, + remainingBeans: () => + ignoreBlockLimit ? undefined : blockComputeLimit - totalBeans, + totalBeans: () => totalBeans, + startCleanup, + }); + return policy; +} diff --git a/packages/cosmic-swingset/src/launch-chain.js b/packages/cosmic-swingset/src/launch-chain.js index 9500a380a12..a483fecdb20 100644 --- a/packages/cosmic-swingset/src/launch-chain.js +++ b/packages/cosmic-swingset/src/launch-chain.js @@ -43,17 +43,11 @@ import { makeSlogCallbacks, } from './kernel-stats.js'; -import { - BeansPerBlockComputeLimit, - BeansPerVatCreation, - BeansPerXsnapComputron, -} from './sim-params.js'; import { parseParams } from './params.js'; import { makeQueue, makeQueueStorageMock } from './helpers/make-queue.js'; import { exportStorage } from './export-storage.js'; import { parseLocatedJson } from './helpers/json.js'; - -const { hasOwn } = Object; +import { computronCounter } from './computron-counter.js'; /** @import { BlockInfo } from '@agoric/internal/src/chain-utils.js' */ /** @import { Mailbox, RunPolicy, SwingSetConfig } from '@agoric/swingset-vat' */ @@ -282,111 +276,6 @@ export async function buildSwingset( * }} ChainRunPolicy */ -/** - * @typedef {object} BeansPerUnit - * @property {bigint} blockComputeLimit - * @property {bigint} vatCreation - * @property {bigint} xsnapComputron - */ - -/** - * Return a stateful run policy that supports two phases: first allow - * non-cleanup work (presumably deliveries) until an overrideable computron - * budget is exhausted, then (iff no work was done and at least one vat cleanup - * budget field is positive) a cleanup phase that allows cleanup work (and - * presumably nothing else) until one of those fields is exhausted. - * https://github.com/Agoric/agoric-sdk/issues/8928#issuecomment-2053357870 - * - * @param {object} params - * @param {BeansPerUnit} params.beansPerUnit - * @param {import('@agoric/swingset-vat').CleanupBudget} [params.vatCleanupBudget] - * @param {boolean} [ignoreBlockLimit] - * @returns {ChainRunPolicy} - */ -function computronCounter( - { beansPerUnit, vatCleanupBudget }, - ignoreBlockLimit = false, -) { - const { - [BeansPerBlockComputeLimit]: blockComputeLimit, - [BeansPerVatCreation]: vatCreation, - [BeansPerXsnapComputron]: xsnapComputron, - } = beansPerUnit; - assert.typeof(blockComputeLimit, 'bigint'); - assert.typeof(vatCreation, 'bigint'); - assert.typeof(xsnapComputron, 'bigint'); - - let totalBeans = 0n; - const shouldRun = () => ignoreBlockLimit || totalBeans < blockComputeLimit; - - const remainingCleanups = { default: Infinity, ...vatCleanupBudget }; - const defaultCleanupBudget = remainingCleanups.default; - let cleanupStarted = false; - let cleanupDone = false; - const cleanupPossible = - Object.values(remainingCleanups).length > 0 - ? Object.values(remainingCleanups).some(n => n > 0) - : defaultCleanupBudget > 0; - if (!cleanupPossible) cleanupDone = true; - /** @type {() => (false | import('@agoric/swingset-vat').CleanupBudget)} */ - const allowCleanup = () => - cleanupStarted && !cleanupDone && { ...remainingCleanups }; - const startCleanup = () => { - assert(!cleanupStarted); - cleanupStarted = true; - return totalBeans === 0n && !cleanupDone; - }; - const didCleanup = details => { - for (const [phase, count] of Object.entries(details.cleanups)) { - if (phase === 'total') continue; - if (!hasOwn(remainingCleanups, phase)) { - // TODO: log unknown phases? - remainingCleanups[phase] = defaultCleanupBudget; - } - remainingCleanups[phase] -= count; - if (remainingCleanups[phase] <= 0) cleanupDone = true; - } - // We return true to allow processing of any BOYD/GC prompted by cleanup, - // even if cleanup as such is now done. - return true; - }; - - const policy = harden({ - vatCreated() { - totalBeans += vatCreation; - return shouldRun(); - }, - crankComplete(details = {}) { - assert.typeof(details, 'object'); - if (details.computrons) { - assert.typeof(details.computrons, 'bigint'); - - // TODO: xsnapComputron should not be assumed here. - // Instead, SwingSet should describe the computron model it uses. - totalBeans += details.computrons * xsnapComputron; - } - return shouldRun(); - }, - crankFailed() { - const failedComputrons = 1000000n; // who knows, 1M is as good as anything - totalBeans += failedComputrons * xsnapComputron; - return shouldRun(); - }, - emptyCrank() { - return shouldRun(); - }, - allowCleanup, - didCleanup, - - shouldRun, - remainingBeans: () => - ignoreBlockLimit ? undefined : blockComputeLimit - totalBeans, - totalBeans: () => totalBeans, - startCleanup, - }); - return policy; -} - /** * @template [T=unknown] * @typedef {object} LaunchOptions From 0bbf63991e769960ee6445b476343aa67cc93b54 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 29 Oct 2024 13:39:08 -0500 Subject: [PATCH 099/174] test(boot): thread computron counter thru test context --- .../boot/test/bootstrapTests/walletFactory.ts | 2 + packages/boot/tools/liquidation.ts | 19 ++++++- packages/boot/tools/supports.ts | 53 ++++++++++++++++++- 3 files changed, 72 insertions(+), 2 deletions(-) diff --git a/packages/boot/test/bootstrapTests/walletFactory.ts b/packages/boot/test/bootstrapTests/walletFactory.ts index 0b8fea676bc..ce964047233 100644 --- a/packages/boot/test/bootstrapTests/walletFactory.ts +++ b/packages/boot/test/bootstrapTests/walletFactory.ts @@ -9,9 +9,11 @@ import { makeWalletFactoryDriver } from '../../tools/drivers.js'; export const makeWalletFactoryContext = async ( t, configSpecifier = '@agoric/vm-config/decentral-main-vaults-config.json', + opts = {}, ) => { const swingsetTestKit = await makeSwingsetTestKit(t.log, undefined, { configSpecifier, + ...opts, }); const { runUtils, storage } = swingsetTestKit; diff --git a/packages/boot/tools/liquidation.ts b/packages/boot/tools/liquidation.ts index 1b91c228120..04fbe9e6499 100644 --- a/packages/boot/tools/liquidation.ts +++ b/packages/boot/tools/liquidation.ts @@ -9,6 +9,7 @@ import { } from '@agoric/vats/tools/board-utils.js'; import { Offers } from '@agoric/inter-protocol/src/clientSupport.js'; import type { ExecutionContext } from 'ava'; +import { insistManagerType, makeRunPolicyProvider } from './supports.js'; import { type SwingsetTestKit, makeSwingsetTestKit } from './supports.js'; import { type GovernanceDriver, @@ -305,13 +306,28 @@ export const makeLiquidationTestKit = async ({ }; }; +// asserts x is type doesn't work when using arrow functions +// https://github.com/microsoft/TypeScript/issues/34523 +function assertManagerType(specimen: string): asserts specimen is ManagerType { + insistManagerType(specimen); +} + export const makeLiquidationTestContext = async ( t, io: { env?: Record } = {}, ) => { const { env = {} } = io; + const { + SLOGFILE: slogFile, + SWINGSET_WORKER_TYPE: defaultManagerType = 'local', + } = env; + assertManagerType(defaultManagerType); + const perfTool = + defaultManagerType === 'xsnap' ? makeRunPolicyProvider() : undefined; const swingsetTestKit = await makeSwingsetTestKit(t.log, undefined, { - slogFile: env.SLOGFILE, + slogFile, + defaultManagerType, + perfTool, }); console.time('DefaultTestContext'); @@ -369,6 +385,7 @@ export const makeLiquidationTestContext = async ( refreshAgoricNamesRemotes, walletFactoryDriver, governanceDriver, + perfTool, }; }; diff --git a/packages/boot/tools/supports.ts b/packages/boot/tools/supports.ts index 7addf5619a5..967fe12d257 100644 --- a/packages/boot/tools/supports.ts +++ b/packages/boot/tools/supports.ts @@ -32,6 +32,7 @@ import { Fail } from '@endo/errors'; import { makeRunUtils, type RunUtils, + type RunPolicyMaker, } from '@agoric/swingset-vat/tools/run-utils.js'; import { boardSlottingMarshaller, @@ -47,6 +48,11 @@ import type { BridgeHandler, IBCMethod } from '@agoric/vats'; import type { BootstrapRootObject } from '@agoric/vats/src/core/lib-boot.js'; import type { EProxy } from '@endo/eventual-send'; import type { FastUSDCCorePowers } from '@agoric/fast-usdc/src/fast-usdc.start.js'; +import { + defaultBeansPerVatCreation, + defaultBeansPerXsnapComputron, +} from '@agoric/cosmic-swingset/src/sim-params.js'; +import { computronCounter } from '@agoric/cosmic-swingset/src/computron-counter.js'; import { icaMocks, protoMsgMockMap, protoMsgMocks } from './ibc/mocks.js'; const trace = makeTracer('BSTSupport', false); @@ -77,6 +83,7 @@ type BootstrapEV = EProxy & { const makeBootstrapRunUtils = makeRunUtils as ( controller: SwingsetController, + perfTool?: RunPolicyMaker, ) => Omit & { EV: BootstrapEV }; const keysToObject = ( @@ -308,6 +315,7 @@ export const matchIter = (t: AvaT, iter, valueRef) => { * @param [options.profileVats] * @param [options.debugVats] * @param [options.defaultManagerType] + * @param [options.perfTool] */ export const makeSwingsetTestKit = async ( log: (..._: any[]) => void, @@ -321,6 +329,7 @@ export const makeSwingsetTestKit = async ( profileVats = [] as string[], debugVats = [] as string[], defaultManagerType = 'local' as ManagerType, + perfTool = undefined as RunPolicyMaker | undefined, } = {}, ) => { console.time('makeBaseSwingsetTestKit'); @@ -538,7 +547,7 @@ export const makeSwingsetTestKit = async ( console.timeLog('makeBaseSwingsetTestKit', 'buildSwingset'); - const runUtils = makeBootstrapRunUtils(controller); + const runUtils = makeBootstrapRunUtils(controller, perfTool); const buildProposal = makeProposalExtractor({ childProcess: childProcessAmbient, @@ -660,3 +669,45 @@ export const makeSwingsetTestKit = async ( }; }; export type SwingsetTestKit = Awaited>; + +export const makeRunPolicyProvider = () => { + const c2b = defaultBeansPerXsnapComputron; + const beansPerUnit = { + // see https://cosgov.org/agoric?msgType=parameterChangeProposal&network=main + blockComputeLimit: 65_000_000n * c2b, + vatCreation: defaultBeansPerVatCreation, + xsnapComputron: c2b, + }; + + /** @type {ReturnType | undefined} */ + let policy; + let counting = false; + + const meter = harden({ + provideRunPolicy: () => { + if (counting && !policy) { + policy = computronCounter({ beansPerUnit }); + } + return policy; + }, + /** @param {boolean} x */ + usePolicy: x => { + counting = x; + if (!counting) { + policy = undefined; + } + }, + totalCount: () => (policy?.totalBeans() || 0n) / c2b, + resetPolicy: () => (policy = undefined), + }); + return meter; +}; + +/** + * + * @param {string} mt + * @returns {asserts mt is ManagerType} + */ +export function insistManagerType(mt) { + assert(['local', 'node-subprocess', 'xsnap', 'xs-worker'].includes(mt)); +} From 19ae5daae92f25837ff51498876f049c46df8754 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 29 Oct 2024 13:39:24 -0500 Subject: [PATCH 100/174] test: demo SWINGSET_WORKER_TYPE, computron count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in a couple tests: $ cd agoric-sdk/packages/boot $ SWINGSET_WORKER_TYPE=xsnap yarn test test/bootstrapTests/price-feed-replace.test.ts ... ✔ setupVaults; run updatePriceFeeds proposals (1m 27.6s) ℹ setPrice computrons 65536531n $ SWINGSET_WORKER_TYPE=xsnap yarn test test/bootstrapTests/orchestration.test.ts ... ✔ stakeAtom - smart wallet (13.8s) ℹ makeAccount computrons 15231491n --- .../test/bootstrapTests/orchestration.test.ts | 28 +++++++++++++++++-- .../bootstrapTests/price-feed-replace.test.ts | 4 +++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/packages/boot/test/bootstrapTests/orchestration.test.ts b/packages/boot/test/bootstrapTests/orchestration.test.ts index f18260cc417..ec95a0c95ef 100644 --- a/packages/boot/test/bootstrapTests/orchestration.test.ts +++ b/packages/boot/test/bootstrapTests/orchestration.test.ts @@ -14,8 +14,16 @@ import { makeWalletFactoryContext, type WalletFactoryTestContext, } from './walletFactory.js'; +import { + insistManagerType, + makeRunPolicyProvider, +} from '../../tools/supports.js'; -const test: TestFn = anyTest; +const test: TestFn< + WalletFactoryTestContext & { + perfTool?: ReturnType; + } +> = anyTest; const validatorAddress: CosmosValidatorAddress = { value: 'cosmosvaloper1test', @@ -25,11 +33,21 @@ const validatorAddress: CosmosValidatorAddress = { const ATOM_DENOM = 'uatom'; +const { + SLOGFILE: slogFile, + SWINGSET_WORKER_TYPE: defaultManagerType = 'local', +} = process.env; + test.before(async t => { - t.context = await makeWalletFactoryContext( + insistManagerType(defaultManagerType); + const perfTool = + defaultManagerType === 'xsnap' ? makeRunPolicyProvider() : undefined; + const ctx = await makeWalletFactoryContext( t, '@agoric/vm-config/decentral-itest-orchestration-config.json', + { slogFile, defaultManagerType, perfTool }, ); + t.context = { ...ctx, perfTool }; }); test.after.always(t => t.context.shutdown?.()); @@ -105,6 +123,7 @@ test.skip('stakeOsmo - queries', async t => { buildProposal, evalProposal, runUtils: { EV }, + perfTool, } = t.context; await evalProposal( buildProposal('@agoric/builders/scripts/orchestration/init-stakeOsmo.js'), @@ -143,6 +162,7 @@ test.serial('stakeAtom - smart wallet', async t => { agoricNamesRemotes, bridgeUtils: { flushInboundQueue }, readPublished, + perfTool, } = t.context; await evalProposal( @@ -153,6 +173,7 @@ test.serial('stakeAtom - smart wallet', async t => { 'agoric1testStakAtom', ); + perfTool?.usePolicy(true); await wd.sendOffer({ id: 'request-account', invitationSpec: { @@ -162,6 +183,9 @@ test.serial('stakeAtom - smart wallet', async t => { }, proposal: {}, }); + perfTool && t.log('makeAccount computrons', perfTool.totalCount()); + perfTool?.usePolicy(false); + await flushInboundQueue(); t.like(wd.getCurrentWalletRecord(), { offerToPublicSubscriberPaths: [ diff --git a/packages/boot/test/bootstrapTests/price-feed-replace.test.ts b/packages/boot/test/bootstrapTests/price-feed-replace.test.ts index 4e583fce1da..3e7876b694c 100644 --- a/packages/boot/test/bootstrapTests/price-feed-replace.test.ts +++ b/packages/boot/test/bootstrapTests/price-feed-replace.test.ts @@ -64,6 +64,7 @@ test.serial('setupVaults; run updatePriceFeeds proposals', async t => { setupVaults, governanceDriver: gd, readPublished, + perfTool, } = t.context; await setupVaults(collateralBrandKey, managerIndex, setup); @@ -74,7 +75,10 @@ test.serial('setupVaults; run updatePriceFeeds proposals', async t => { roundId: 1n, }); + perfTool && perfTool.usePolicy(true); await priceFeedDrivers[collateralBrandKey].setPrice(15.99); + perfTool && t.log('setPrice computrons', perfTool.totalCount()); + perfTool && perfTool.usePolicy(false); t.like(readPublished('priceFeed.ATOM-USD_price_feed.latestRound'), { roundId: 2n, From e927df42efb7a30b16554622cfd1652e4dfb2d3c Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Wed, 23 Oct 2024 11:51:59 -0700 Subject: [PATCH 101/174] test: replace tsimp with ts-blank-space --- multichain-testing/.gitignore | 1 - multichain-testing/ava.fusdc.config.js | 2 +- multichain-testing/ava.main.config.js | 2 +- multichain-testing/package.json | 2 +- multichain-testing/yarn.lock | 199 +++++++++++-------------- 5 files changed, 90 insertions(+), 116 deletions(-) diff --git a/multichain-testing/.gitignore b/multichain-testing/.gitignore index c556e728ded..71e21e2763c 100644 --- a/multichain-testing/.gitignore +++ b/multichain-testing/.gitignore @@ -1,4 +1,3 @@ -.tsimp .yarn/* !.yarn/patches/* # fetched chain info from running starship diff --git a/multichain-testing/ava.fusdc.config.js b/multichain-testing/ava.fusdc.config.js index 2e76acc2d19..4c7ef7ceabb 100644 --- a/multichain-testing/ava.fusdc.config.js +++ b/multichain-testing/ava.fusdc.config.js @@ -3,7 +3,7 @@ export default { ts: 'module', }, require: ['@endo/init/debug.js'], - nodeArguments: ['--import=tsimp/import'], + nodeArguments: ['--import=ts-blank-space/register'], files: ['test/fast-usdc/**/*.test.ts'], concurrency: 1, serial: true, diff --git a/multichain-testing/ava.main.config.js b/multichain-testing/ava.main.config.js index b3719a2569e..790298e1d09 100644 --- a/multichain-testing/ava.main.config.js +++ b/multichain-testing/ava.main.config.js @@ -3,7 +3,7 @@ export default { ts: 'module', }, require: ['@endo/init/debug.js'], - nodeArguments: ['--import=tsimp/import'], + nodeArguments: ['--import=ts-blank-space/register'], files: ['test/**/*.test.ts', '!test/fast-usdc/**/*.test.ts'], concurrency: 1, serial: true, diff --git a/multichain-testing/package.json b/multichain-testing/package.json index 7dd607339da..4ab7550c6b7 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -39,7 +39,7 @@ "fs-extra": "^11.2.0", "patch-package": "^8.0.0", "starshipjs": "2.4.1", - "tsimp": "^2.0.10", + "ts-blank-space": "^0.4.4", "tsx": "^4.15.6", "typescript": "^5.3.3" }, diff --git a/multichain-testing/yarn.lock b/multichain-testing/yarn.lock index 92f4a0e5cdd..820a0a98c97 100644 --- a/multichain-testing/yarn.lock +++ b/multichain-testing/yarn.lock @@ -284,10 +284,17 @@ __metadata: languageName: node linkType: hard -"@endo/env-options@npm:^1.1.6": - version: 1.1.6 - resolution: "@endo/env-options@npm:1.1.6" - checksum: 10c0/0001b1cba6954cccfa40104f819378f2f5c8babc89103213a8a5da4f8f94248c8389bfa06ec37cecae81edabe570428558399313d649c64ad7c90743f563dea2 +"@endo/base64@npm:^1.0.8": + version: 1.0.8 + resolution: "@endo/base64@npm:1.0.8" + checksum: 10c0/3501efbf866acc25b9ad0912ec2383e3b976c890a18dc67b5c6eb128433708db69e8ed1cc57190305266bdcbd132659aa87edfc6d02a9886b711e8b86adc21c0 + languageName: node + linkType: hard + +"@endo/env-options@npm:^1.1.6, @endo/env-options@npm:^1.1.7": + version: 1.1.7 + resolution: "@endo/env-options@npm:1.1.7" + checksum: 10c0/5784bd68790041b08d9ead4f6c29cc7871d2e554c23fc44fff38cb20b6b4e55cdba2f78d844ba5ad4b0818185c32475ff318c1b77890d628690d7c7a6ede9475 languageName: node linkType: hard @@ -300,12 +307,12 @@ __metadata: languageName: node linkType: hard -"@endo/eventual-send@npm:^1.2.5": - version: 1.2.5 - resolution: "@endo/eventual-send@npm:1.2.5" +"@endo/eventual-send@npm:^1.2.5, @endo/eventual-send@npm:^1.2.6": + version: 1.2.6 + resolution: "@endo/eventual-send@npm:1.2.6" dependencies: - "@endo/env-options": "npm:^1.1.6" - checksum: 10c0/7eaa30628582f768920659e4894b871c1056da4252b82b8ad70ed49a24c4559efb8d1655a6845984a0eae83d328179e4272b0917007a2f147dc8b15ecb0ecc52 + "@endo/env-options": "npm:^1.1.7" + checksum: 10c0/6983d6b88bf4e99f6c469d4ca037793582b06cc0bfa2da085b5bc7ad67333a1fba6e5e7077b7f279be23ccfba1dff9e06c7f85f9980b09fd002227f89a673c11 languageName: node linkType: hard @@ -320,7 +327,7 @@ __metadata: languageName: node linkType: hard -"@endo/init@npm:^1.1.2, @endo/init@npm:^1.1.4": +"@endo/init@npm:^1.1.2": version: 1.1.4 resolution: "@endo/init@npm:1.1.4" dependencies: @@ -332,6 +339,18 @@ __metadata: languageName: node linkType: hard +"@endo/init@npm:^1.1.4": + version: 1.1.5 + resolution: "@endo/init@npm:1.1.5" + dependencies: + "@endo/base64": "npm:^1.0.8" + "@endo/eventual-send": "npm:^1.2.6" + "@endo/lockdown": "npm:^1.0.11" + "@endo/promise-kit": "npm:^1.1.6" + checksum: 10c0/08abda8a0204450cb39c296270d074189f320cdeb03892e87b27a75f6b98c0b5d9c8471e242c53545843211fe713b01b281eec0eabc1c58ca0760a068b90335c + languageName: node + linkType: hard + "@endo/lockdown@npm:^1.0.10": version: 1.0.10 resolution: "@endo/lockdown@npm:1.0.10" @@ -341,6 +360,15 @@ __metadata: languageName: node linkType: hard +"@endo/lockdown@npm:^1.0.11": + version: 1.0.11 + resolution: "@endo/lockdown@npm:1.0.11" + dependencies: + ses: "npm:^1.9.0" + checksum: 10c0/03bb96f370e7ee69d9d8e26b7b124b6381994d3b28a99dc2bcafe77139283701d7543b40e978226cd49443c149e64610e4dd49c32ada931610ba091809478a11 + languageName: node + linkType: hard + "@endo/nat@npm:^5.0.10": version: 5.0.10 resolution: "@endo/nat@npm:5.0.10" @@ -361,12 +389,12 @@ __metadata: languageName: node linkType: hard -"@endo/promise-kit@npm:^1.1.5": - version: 1.1.5 - resolution: "@endo/promise-kit@npm:1.1.5" +"@endo/promise-kit@npm:^1.1.5, @endo/promise-kit@npm:^1.1.6": + version: 1.1.6 + resolution: "@endo/promise-kit@npm:1.1.6" dependencies: - ses: "npm:^1.8.0" - checksum: 10c0/3a9fb59546507dbbb8c83ada4de664ca4f6085ffcb56c9e3e07789e002e717454b1ee5ae1273549935a7e77ac42be7ae8ddca94ff6d4f16914210d31159ce1a4 + ses: "npm:^1.9.0" + checksum: 10c0/d60de663e58f9de32b6705268c62c63c4721f1874813d3c10cae7846e921e4ea8a60c8622ef8c937741a3387fbc60110076b25304afedf270727af7b0c3fecb3 languageName: node linkType: hard @@ -622,22 +650,6 @@ __metadata: languageName: node linkType: hard -"@isaacs/cached@npm:^1.0.1": - version: 1.0.1 - resolution: "@isaacs/cached@npm:1.0.1" - dependencies: - "@isaacs/catcher": "npm:^1.0.0" - checksum: 10c0/1c15dc2a60873f2c73f4b04ed59ecfc8d9679976ff09af1b5b45e7273a590a4f86a339cc4c785c2d22309277ca47293611af20dd7d41550cdcfb53e06a04ac65 - languageName: node - linkType: hard - -"@isaacs/catcher@npm:^1.0.0, @isaacs/catcher@npm:^1.0.4": - version: 1.0.4 - resolution: "@isaacs/catcher@npm:1.0.4" - checksum: 10c0/d8b77e2c6b84a6301d390d0b2badea1b4a321f2e8ba662645b045efc42f20a54a6c760f3181fab4ed0d90da58f2cb084a93490a892c53b4da21ec05278b8ba4f - languageName: node - linkType: hard - "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -889,11 +901,11 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 20.14.5 - resolution: "@types/node@npm:20.14.5" + version: 22.7.8 + resolution: "@types/node@npm:22.7.8" dependencies: - undici-types: "npm:~5.26.4" - checksum: 10c0/06a8c304b5f7f190d4497807dc67ad09ee7b14ea2996bfdc823553c624698d8cab1ef9d16f8b764f20cb9eb11caa0e832787741e9ef70e1c89d620797ab28436 + undici-types: "npm:~6.19.2" + checksum: 10c0/3d3b3a2ec5a57ca4fd37b34dce415620993ca5f87cea2c728ffe73aa31446dbfe19c53171c478447bd7d78011ef4845a46ab2f0dc38e699cc75b3d100a60c690 languageName: node linkType: hard @@ -2302,7 +2314,7 @@ __metadata: languageName: node linkType: hard -"foreground-child@npm:^3.1.0, foreground-child@npm:^3.1.1": +"foreground-child@npm:^3.1.0": version: 3.1.1 resolution: "foreground-child@npm:3.1.1" dependencies: @@ -2478,7 +2490,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": +"glob@npm:^10.2.2, glob@npm:^10.3.10": version: 10.4.1 resolution: "glob@npm:10.4.1" dependencies: @@ -3338,15 +3350,6 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:^3.0.1": - version: 3.0.1 - resolution: "mkdirp@npm:3.0.1" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: 10c0/9f2b975e9246351f5e3a40dcfac99fcd0baa31fbfab615fe059fb11e51f10e4803c63de1f384c54d656e4db31d000e4767e9ef076a22e12a641357602e31d57d - languageName: node - linkType: hard - "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" @@ -3675,13 +3678,6 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.6": - version: 4.0.6 - resolution: "pirates@npm:4.0.6" - checksum: 10c0/00d5fa51f8dded94d7429700fb91a0c1ead00ae2c7fd27089f0c5b63e6eca36197fe46384631872690a66f390c5e27198e99006ab77ae472692ab9c2ca903f36 - languageName: node - linkType: hard - "plur@npm:^5.1.0": version: 5.1.0 resolution: "plur@npm:5.1.0" @@ -3881,17 +3877,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^5.0.5": - version: 5.0.7 - resolution: "rimraf@npm:5.0.7" - dependencies: - glob: "npm:^10.3.7" - bin: - rimraf: dist/esm/bin.mjs - checksum: 10c0/bd6dbfaa98ae34ce1e54d1e06045d2d63e8859d9a1979bb4a4628b652b459a2d17b17dc20ee072b034bd2d09bd691e801d24c4d9cfe94e16fdbcc8470a1d4807 - languageName: node - linkType: hard - "root-workspace-0b6124@workspace:.": version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." @@ -3916,7 +3901,7 @@ __metadata: fs-extra: "npm:^11.2.0" patch-package: "npm:^8.0.0" starshipjs: "npm:2.4.1" - tsimp: "npm:^2.0.10" + ts-blank-space: "npm:^0.4.4" tsx: "npm:^4.15.6" typescript: "npm:^5.3.3" languageName: unknown @@ -3972,12 +3957,12 @@ __metadata: languageName: node linkType: hard -"ses@npm:^1.8.0": - version: 1.8.0 - resolution: "ses@npm:1.8.0" +"ses@npm:^1.8.0, ses@npm:^1.9.0": + version: 1.9.0 + resolution: "ses@npm:1.9.0" dependencies: - "@endo/env-options": "npm:^1.1.6" - checksum: 10c0/4b2114e586a547dd2a71477e0a42e8ea5d0ea9c3ff135d0dbfb63569eeda19c7152db76b82bcad12a2969d3f5fb09e5fa52e921b5a2831560e6876ca1f9ba207 + "@endo/env-options": "npm:^1.1.7" + checksum: 10c0/356f9601b04a87f33403a15fc627caf0c649d86d8d7ee1f4b3c75b947ab05c31b254c94c0aa26e9904862787c73950d5a60f3435deebe5dba23017e20c40b0cb languageName: node linkType: hard @@ -4082,24 +4067,6 @@ __metadata: languageName: node linkType: hard -"sock-daemon@npm:^1.4.2": - version: 1.4.2 - resolution: "sock-daemon@npm:1.4.2" - dependencies: - rimraf: "npm:^5.0.5" - signal-exit: "npm:^4.1.0" - socket-post-message: "npm:^1.0.3" - checksum: 10c0/1b5e0b02fdd8cd5454fc7de80557c11aac5d88085d0cee80ead08b8f4df5e3c0a4b50ebb2ae2113dab94f36dc88b5d3b7d4b1c2c8e53bbcfbddfc741abf3bd00 - languageName: node - linkType: hard - -"socket-post-message@npm:^1.0.3": - version: 1.0.3 - resolution: "socket-post-message@npm:1.0.3" - checksum: 10c0/d3ffb51dad97754856aaa6709e036196f4b8b674f00366b71591ead122bcdbc073827f67d17c8b03c9a28c921b2c7cb277c581f6ca318d472034eae7afc169d1 - languageName: node - linkType: hard - "socks-proxy-agent@npm:^8.0.3": version: 8.0.3 resolution: "socks-proxy-agent@npm:8.0.3" @@ -4336,24 +4303,12 @@ __metadata: languageName: node linkType: hard -"tsimp@npm:^2.0.10": - version: 2.0.11 - resolution: "tsimp@npm:2.0.11" +"ts-blank-space@npm:^0.4.4": + version: 0.4.4 + resolution: "ts-blank-space@npm:0.4.4" dependencies: - "@isaacs/cached": "npm:^1.0.1" - "@isaacs/catcher": "npm:^1.0.4" - foreground-child: "npm:^3.1.1" - mkdirp: "npm:^3.0.1" - pirates: "npm:^4.0.6" - rimraf: "npm:^5.0.5" - signal-exit: "npm:^4.1.0" - sock-daemon: "npm:^1.4.2" - walk-up-path: "npm:^3.0.1" - peerDependencies: - typescript: ^5.1.0 - bin: - tsimp: dist/esm/bin.mjs - checksum: 10c0/20743dc21ce31678050582903bfcd2d600fa17305f70162cb4127f2fd208116354549a921574f6c26cdfca5cb07c24526094e5519bb294f2ddd13c06cd2f43eb + typescript: "npm:5.1.6 - 5.7.x" + checksum: 10c0/31b8d9b7c814dfccd41f26871d93560fcb1396c290852064a5cb604c552840540cc1c9d18732c5d918d08209ccc945774de4bbeaf32b49bf6a3019bee2809a07 languageName: node linkType: hard @@ -4396,6 +4351,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:5.1.6 - 5.7.x": + version: 5.7.2 + resolution: "typescript@npm:5.7.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/a873118b5201b2ef332127ef5c63fb9d9c155e6fdbe211cbd9d8e65877283797cca76546bad742eea36ed7efbe3424a30376818f79c7318512064e8625d61622 + languageName: node + linkType: hard + "typescript@npm:^5.3.3": version: 5.4.5 resolution: "typescript@npm:5.4.5" @@ -4406,6 +4371,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A5.1.6 - 5.7.x#optional!builtin": + version: 5.7.2 + resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=5786d5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/f3b8082c9d1d1629a215245c9087df56cb784f9fb6f27b5d55577a20e68afe2a889c040aacff6d27e35be165ecf9dca66e694c42eb9a50b3b2c451b36b5675cb + languageName: node + linkType: hard + "typescript@patch:typescript@npm%3A^5.3.3#optional!builtin": version: 5.4.5 resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin::version=5.4.5&hash=5adc0c" @@ -4423,6 +4398,13 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~6.19.2": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 + languageName: node + linkType: hard + "unicorn-magic@npm:^0.1.0": version: 0.1.0 resolution: "unicorn-magic@npm:0.1.0" @@ -4471,13 +4453,6 @@ __metadata: languageName: node linkType: hard -"walk-up-path@npm:^3.0.1": - version: 3.0.1 - resolution: "walk-up-path@npm:3.0.1" - checksum: 10c0/3184738e0cf33698dd58b0ee4418285b9c811e58698f52c1f025435a85c25cbc5a63fee599f1a79cb29ca7ef09a44ec9417b16bfd906b1a37c305f7aa20ee5bc - languageName: node - linkType: hard - "webidl-conversions@npm:^3.0.0": version: 3.0.1 resolution: "webidl-conversions@npm:3.0.1" From fe98988a7ec02a6df64b793150adb115df45a7f5 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sun, 1 Dec 2024 07:55:28 -0800 Subject: [PATCH 102/174] chore(deps): bump Endo deps --- multichain-testing/package.json | 10 +- multichain-testing/yarn.lock | 321 ++++++++++++++++++++------------ 2 files changed, 210 insertions(+), 121 deletions(-) diff --git a/multichain-testing/package.json b/multichain-testing/package.json index 4ab7550c6b7..5f3b11cec7a 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -23,16 +23,16 @@ "@cosmjs/crypto": "^0.32.4", "@cosmjs/proto-signing": "^0.32.4", "@cosmjs/stargate": "^0.32.4", - "@endo/errors": "^1.2.5", - "@endo/far": "^1.1.5", - "@endo/nat": "^5.0.10", - "@endo/ses-ava": "^1.2.5", + "@endo/errors": "^1.2.8", + "@endo/far": "^1.1.9", + "@endo/nat": "^5.0.13", + "@endo/ses-ava": "^1.2.8", "@types/eslint": "^8", "@types/fs-extra": "^11", "@types/node": "^20.11.13", "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", - "ava": "^6.1.3", + "ava": "^6.2.0", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "execa": "9.1.0", diff --git a/multichain-testing/yarn.lock b/multichain-testing/yarn.lock index 820a0a98c97..c6f0d923c33 100644 --- a/multichain-testing/yarn.lock +++ b/multichain-testing/yarn.lock @@ -284,30 +284,37 @@ __metadata: languageName: node linkType: hard -"@endo/base64@npm:^1.0.8": - version: 1.0.8 - resolution: "@endo/base64@npm:1.0.8" - checksum: 10c0/3501efbf866acc25b9ad0912ec2383e3b976c890a18dc67b5c6eb128433708db69e8ed1cc57190305266bdcbd132659aa87edfc6d02a9886b711e8b86adc21c0 +"@endo/base64@npm:^1.0.9": + version: 1.0.9 + resolution: "@endo/base64@npm:1.0.9" + checksum: 10c0/63e487cf59b50a080fab389a8ab24d66264910ecf375dc19677c2ee7421d92a4be9c85e435b216b4adc9983384073a7eb753223f85ba77aec8d9fd3e0c1fe090 languageName: node linkType: hard -"@endo/env-options@npm:^1.1.6, @endo/env-options@npm:^1.1.7": +"@endo/env-options@npm:^1.1.7": version: 1.1.7 resolution: "@endo/env-options@npm:1.1.7" checksum: 10c0/5784bd68790041b08d9ead4f6c29cc7871d2e554c23fc44fff38cb20b6b4e55cdba2f78d844ba5ad4b0818185c32475ff318c1b77890d628690d7c7a6ede9475 languageName: node linkType: hard -"@endo/errors@npm:^1.2.5": - version: 1.2.5 - resolution: "@endo/errors@npm:1.2.5" +"@endo/env-options@npm:^1.1.8": + version: 1.1.8 + resolution: "@endo/env-options@npm:1.1.8" + checksum: 10c0/2f519f48a5b966dbd9e66134d4abc89ff02b9791d21146b49031ceb694584f3f41c6119125b6bb4eb0d347f5bcd846473b5f3c4ae6bae3dac19402fcaf522520 + languageName: node + linkType: hard + +"@endo/errors@npm:^1.2.8": + version: 1.2.8 + resolution: "@endo/errors@npm:1.2.8" dependencies: - ses: "npm:^1.8.0" - checksum: 10c0/32eac3b332139ddec8a85a0013645482541e4f3cc0c484073dde430087f27bb683cde8b0a6e399c5b7f07af007c3b6aa589cf31935a8b8d69e5f869bf71a1662 + ses: "npm:^1.10.0" + checksum: 10c0/3f33fc7119ab840ad0f5bdfb70e73cc99630f09593c31928e30de4d9c8e898c85397c5170964d54c819a757a74d3b005f6275480ff8d0f1aa2aa8ef872852e97 languageName: node linkType: hard -"@endo/eventual-send@npm:^1.2.5, @endo/eventual-send@npm:^1.2.6": +"@endo/eventual-send@npm:^1.2.5": version: 1.2.6 resolution: "@endo/eventual-send@npm:1.2.6" dependencies: @@ -316,14 +323,23 @@ __metadata: languageName: node linkType: hard -"@endo/far@npm:^1.1.5": - version: 1.1.5 - resolution: "@endo/far@npm:1.1.5" +"@endo/eventual-send@npm:^1.2.8": + version: 1.2.8 + resolution: "@endo/eventual-send@npm:1.2.8" dependencies: - "@endo/errors": "npm:^1.2.5" - "@endo/eventual-send": "npm:^1.2.5" - "@endo/pass-style": "npm:^1.4.3" - checksum: 10c0/8c50a28323ab1078d0cb6fce1d7fc6da4884247d76585f37f960a2a7134fc7f293075effaae34b41801b7508a1f75d32304c19db0597709727853c4a87eb4999 + "@endo/env-options": "npm:^1.1.8" + checksum: 10c0/d7c16c935441b67d029fcb6785f425a1194fb7f936e4b20dde21eb393266cb7366edf7a95d3fdfa96cd4a3246a3659a06d0dbb3c1217045e1718e1cf34c7a3bd + languageName: node + linkType: hard + +"@endo/far@npm:^1.1.9": + version: 1.1.9 + resolution: "@endo/far@npm:1.1.9" + dependencies: + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/pass-style": "npm:^1.4.7" + checksum: 10c0/e0d95743c25183b961aa1f11dd81c067739fd2fb3deeab58520e949961eacba9ed109bb01b9ed820d596e8a043b6721d650d9624abf0263296cca647e7286a2e languageName: node linkType: hard @@ -339,15 +355,15 @@ __metadata: languageName: node linkType: hard -"@endo/init@npm:^1.1.4": - version: 1.1.5 - resolution: "@endo/init@npm:1.1.5" +"@endo/init@npm:^1.1.7": + version: 1.1.7 + resolution: "@endo/init@npm:1.1.7" dependencies: - "@endo/base64": "npm:^1.0.8" - "@endo/eventual-send": "npm:^1.2.6" - "@endo/lockdown": "npm:^1.0.11" - "@endo/promise-kit": "npm:^1.1.6" - checksum: 10c0/08abda8a0204450cb39c296270d074189f320cdeb03892e87b27a75f6b98c0b5d9c8471e242c53545843211fe713b01b281eec0eabc1c58ca0760a068b90335c + "@endo/base64": "npm:^1.0.9" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/lockdown": "npm:^1.0.13" + "@endo/promise-kit": "npm:^1.1.8" + checksum: 10c0/6cfcc244f02da9883f65a8f34da9483a628d5350192983c53d5116b12403dc5693145c6349b6c3ca381b6b8d9590cee16f90440dc0e2da5f525e13079d6c9a2f languageName: node linkType: hard @@ -360,36 +376,36 @@ __metadata: languageName: node linkType: hard -"@endo/lockdown@npm:^1.0.11": - version: 1.0.11 - resolution: "@endo/lockdown@npm:1.0.11" +"@endo/lockdown@npm:^1.0.13": + version: 1.0.13 + resolution: "@endo/lockdown@npm:1.0.13" dependencies: - ses: "npm:^1.9.0" - checksum: 10c0/03bb96f370e7ee69d9d8e26b7b124b6381994d3b28a99dc2bcafe77139283701d7543b40e978226cd49443c149e64610e4dd49c32ada931610ba091809478a11 + ses: "npm:^1.10.0" + checksum: 10c0/9df04cc477595b368088a1d445f2241d8a152cb4dcf6a79d39d4804594dd8ff472380ab2bdf262adeb5b4b7cfc73effb6cc716c5a3aeca282801d57fe8a018a0 languageName: node linkType: hard -"@endo/nat@npm:^5.0.10": - version: 5.0.10 - resolution: "@endo/nat@npm:5.0.10" - checksum: 10c0/7ad2aa2d216d517409c771aebb465aceb6ea8b88ec808c2dc030d7ffc7fe7d601d8401572f3866384a63ff2aa74209a22f29e1561e773d91d7ad2d81fa13fc7e +"@endo/nat@npm:^5.0.13": + version: 5.0.13 + resolution: "@endo/nat@npm:5.0.13" + checksum: 10c0/78578de4567c9bc4c6f50638c688886c07c38177a8d44192230d344221da06ccffc6d9ef8d423e27198d864ed7c57ef5ced9b1d05922eaa4e40bf82856b1aa11 languageName: node linkType: hard -"@endo/pass-style@npm:^1.4.3": - version: 1.4.3 - resolution: "@endo/pass-style@npm:1.4.3" +"@endo/pass-style@npm:^1.4.7": + version: 1.4.7 + resolution: "@endo/pass-style@npm:1.4.7" dependencies: - "@endo/env-options": "npm:^1.1.6" - "@endo/errors": "npm:^1.2.5" - "@endo/eventual-send": "npm:^1.2.5" - "@endo/promise-kit": "npm:^1.1.5" + "@endo/env-options": "npm:^1.1.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/promise-kit": "npm:^1.1.8" "@fast-check/ava": "npm:^1.1.5" - checksum: 10c0/f24c528b1219f5aa122f9a04e80459dec3e9664e7849019b172ad8354870b849b643c8dfc79104857827457d66b2bb09bade9b2c6ea717a97e613ecf6d53c1f9 + checksum: 10c0/ee30e011fb08c292718a315f2ebd5ee2da6d918bf2cdaf2b269e123207c642fa1525493c41180db8c941e1a1959369730114b116656c99e8bb107ca5917f3f4e languageName: node linkType: hard -"@endo/promise-kit@npm:^1.1.5, @endo/promise-kit@npm:^1.1.6": +"@endo/promise-kit@npm:^1.1.5": version: 1.1.6 resolution: "@endo/promise-kit@npm:1.1.6" dependencies: @@ -398,16 +414,25 @@ __metadata: languageName: node linkType: hard -"@endo/ses-ava@npm:^1.2.5": - version: 1.2.5 - resolution: "@endo/ses-ava@npm:1.2.5" +"@endo/promise-kit@npm:^1.1.8": + version: 1.1.8 + resolution: "@endo/promise-kit@npm:1.1.8" dependencies: - "@endo/env-options": "npm:^1.1.6" - "@endo/init": "npm:^1.1.4" - ses: "npm:^1.8.0" + ses: "npm:^1.10.0" + checksum: 10c0/3a51755822bd4112474bec584005b81f9ffe6a6b590faa16cff7a4994010d001d6d190f58a1e890d85b0feb0eb052d79ed2c5ed88977afb0e47ca53b6b199196 + languageName: node + linkType: hard + +"@endo/ses-ava@npm:^1.2.8": + version: 1.2.8 + resolution: "@endo/ses-ava@npm:1.2.8" + dependencies: + "@endo/env-options": "npm:^1.1.8" + "@endo/init": "npm:^1.1.7" + ses: "npm:^1.10.0" peerDependencies: ava: ^5.3.0 || ^6.1.2 - checksum: 10c0/cabde169f565d9a61f5d41040599c43b5675f6220f66d4d6a56d351e1465434e94b52b1d664444fbd57d4b8700fa97ac9886fc806f5172552c3318269347c376 + checksum: 10c0/c1ef65d182f3bfa1ec0d5d0434da9d28bb0925f485629fcd5c42dc89db99e65a5b44e352e1fd2a577778b2905d6f36b009e4f2953aa0257ec1b049019e37b2cf languageName: node linkType: hard @@ -664,7 +689,7 @@ __metadata: languageName: node linkType: hard -"@mapbox/node-pre-gyp@npm:^1.0.5": +"@mapbox/node-pre-gyp@npm:^1.0.11": version: 1.0.11 resolution: "@mapbox/node-pre-gyp@npm:1.0.11" dependencies: @@ -819,13 +844,19 @@ __metadata: languageName: node linkType: hard -"@rollup/pluginutils@npm:^4.0.0": - version: 4.2.1 - resolution: "@rollup/pluginutils@npm:4.2.1" +"@rollup/pluginutils@npm:^5.1.3": + version: 5.1.3 + resolution: "@rollup/pluginutils@npm:5.1.3" dependencies: - estree-walker: "npm:^2.0.1" - picomatch: "npm:^2.2.2" - checksum: 10c0/3ee56b2c8f1ed8dfd0a92631da1af3a2dfdd0321948f089b3752b4de1b54dc5076701eadd0e5fc18bd191b77af594ac1db6279e83951238ba16bf8a414c64c48 + "@types/estree": "npm:^1.0.0" + estree-walker: "npm:^2.0.2" + picomatch: "npm:^4.0.2" + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + checksum: 10c0/ba46ad588733fb01d184ee3bc7a127d626158bc840b5874a94c129ff62689d12f16f537530709c54da6f3b71f67d705c4e09235b1dc9542e9d47ee8f2d0b8b9e languageName: node linkType: hard @@ -867,6 +898,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:^1.0.0": + version: 1.0.6 + resolution: "@types/estree@npm:1.0.6" + checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a + languageName: node + linkType: hard + "@types/fs-extra@npm:^11": version: 11.0.4 resolution: "@types/fs-extra@npm:11.0.4" @@ -1055,25 +1093,25 @@ __metadata: languageName: node linkType: hard -"@vercel/nft@npm:^0.26.2": - version: 0.26.5 - resolution: "@vercel/nft@npm:0.26.5" +"@vercel/nft@npm:^0.27.5": + version: 0.27.7 + resolution: "@vercel/nft@npm:0.27.7" dependencies: - "@mapbox/node-pre-gyp": "npm:^1.0.5" - "@rollup/pluginutils": "npm:^4.0.0" + "@mapbox/node-pre-gyp": "npm:^1.0.11" + "@rollup/pluginutils": "npm:^5.1.3" acorn: "npm:^8.6.0" - acorn-import-attributes: "npm:^1.9.2" + acorn-import-attributes: "npm:^1.9.5" async-sema: "npm:^3.1.1" bindings: "npm:^1.4.0" estree-walker: "npm:2.0.2" glob: "npm:^7.1.3" graceful-fs: "npm:^4.2.9" - micromatch: "npm:^4.0.2" + micromatch: "npm:^4.0.8" node-gyp-build: "npm:^4.2.2" resolve-from: "npm:^5.0.0" bin: nft: out/cli.js - checksum: 10c0/b7034b2f851384f26316c856a731c0973a99bd02f6bb349916a750328a4919944ed6fd12c321b38ec6535d29dfb627d7fa8ab0f1e8c1c3cabd71e3350bd77548 + checksum: 10c0/bf6c1572e436e46e83d38c837fd715603b816fdfc5109f55f9898ed25011dfaba6c1cc979457db81238021854db5ba60c3b5bb263b843e24c4ebedb02b6ec2fe languageName: node linkType: hard @@ -1098,7 +1136,7 @@ __metadata: languageName: node linkType: hard -"acorn-import-attributes@npm:^1.9.2": +"acorn-import-attributes@npm:^1.9.5": version: 1.9.5 resolution: "acorn-import-attributes@npm:1.9.5" peerDependencies: @@ -1116,14 +1154,25 @@ __metadata: languageName: node linkType: hard -"acorn-walk@npm:^8.3.2": - version: 8.3.2 - resolution: "acorn-walk@npm:8.3.2" - checksum: 10c0/7e2a8dad5480df7f872569b9dccff2f3da7e65f5353686b1d6032ab9f4ddf6e3a2cb83a9b52cf50b1497fd522154dda92f0abf7153290cc79cd14721ff121e52 +"acorn-walk@npm:^8.3.4": + version: 8.3.4 + resolution: "acorn-walk@npm:8.3.4" + dependencies: + acorn: "npm:^8.11.0" + checksum: 10c0/76537ac5fb2c37a64560feaf3342023dadc086c46da57da363e64c6148dc21b57d49ace26f949e225063acb6fb441eabffd89f7a3066de5ad37ab3e328927c62 languageName: node linkType: hard -"acorn@npm:^8.11.3, acorn@npm:^8.6.0, acorn@npm:^8.9.0": +"acorn@npm:^8.11.0, acorn@npm:^8.13.0": + version: 8.14.0 + resolution: "acorn@npm:8.14.0" + bin: + acorn: bin/acorn + checksum: 10c0/6d4ee461a7734b2f48836ee0fbb752903606e576cc100eb49340295129ca0b452f3ba91ddd4424a1d4406a98adfb2ebb6bd0ff4c49d7a0930c10e462719bbfd7 + languageName: node + linkType: hard + +"acorn@npm:^8.6.0, acorn@npm:^8.9.0": version: 8.11.3 resolution: "acorn@npm:8.11.3" bin: @@ -1284,18 +1333,18 @@ __metadata: languageName: node linkType: hard -"ava@npm:^6.1.3": - version: 6.1.3 - resolution: "ava@npm:6.1.3" +"ava@npm:^6.2.0": + version: 6.2.0 + resolution: "ava@npm:6.2.0" dependencies: - "@vercel/nft": "npm:^0.26.2" - acorn: "npm:^8.11.3" - acorn-walk: "npm:^8.3.2" + "@vercel/nft": "npm:^0.27.5" + acorn: "npm:^8.13.0" + acorn-walk: "npm:^8.3.4" ansi-styles: "npm:^6.2.1" arrgv: "npm:^1.0.2" arrify: "npm:^3.0.0" - callsites: "npm:^4.1.0" - cbor: "npm:^9.0.1" + callsites: "npm:^4.2.0" + cbor: "npm:^9.0.2" chalk: "npm:^5.3.0" chunkd: "npm:^2.0.1" ci-info: "npm:^4.0.0" @@ -1305,10 +1354,10 @@ __metadata: common-path-prefix: "npm:^3.0.0" concordance: "npm:^5.0.4" currently-unhandled: "npm:^0.4.1" - debug: "npm:^4.3.4" - emittery: "npm:^1.0.1" - figures: "npm:^6.0.1" - globby: "npm:^14.0.0" + debug: "npm:^4.3.7" + emittery: "npm:^1.0.3" + figures: "npm:^6.1.0" + globby: "npm:^14.0.2" ignore-by-default: "npm:^2.1.0" indent-string: "npm:^5.0.0" is-plain-object: "npm:^5.0.0" @@ -1316,17 +1365,17 @@ __metadata: matcher: "npm:^5.0.0" memoize: "npm:^10.0.0" ms: "npm:^2.1.3" - p-map: "npm:^7.0.1" + p-map: "npm:^7.0.2" package-config: "npm:^5.0.0" - picomatch: "npm:^3.0.1" + picomatch: "npm:^4.0.2" plur: "npm:^5.1.0" - pretty-ms: "npm:^9.0.0" + pretty-ms: "npm:^9.1.0" resolve-cwd: "npm:^3.0.0" stack-utils: "npm:^2.0.6" strip-ansi: "npm:^7.1.0" supertap: "npm:^3.0.1" temp-dir: "npm:^3.0.0" - write-file-atomic: "npm:^5.0.1" + write-file-atomic: "npm:^6.0.0" yargs: "npm:^17.7.2" peerDependencies: "@ava/typescript": "*" @@ -1335,7 +1384,7 @@ __metadata: optional: true bin: ava: entrypoints/cli.mjs - checksum: 10c0/108b28aceb0dfdb077bcf4c96109d736667999c2ce9f564489c4747482ea0e0c455d4d96fdfaad610b1125b74129b7b1d2ce570ec4903e767f6950d7f722f2cd + checksum: 10c0/25a37413c9ee1b5322dc5a266f546236ea4b52e5c04ae4b52a7b26db9263eebe2dbcda687bf4d464867e558e9148e4567aa09a7ec91d46e3218ab93204e3c653 languageName: node linkType: hard @@ -1499,14 +1548,14 @@ __metadata: languageName: node linkType: hard -"callsites@npm:^4.1.0": - version: 4.1.0 - resolution: "callsites@npm:4.1.0" - checksum: 10c0/91700844127a6dcd4792d231a12dd8e9ec10525eb9962180a8558417d7e3f443e52a4f14746ad2838eaf14f79431ee1539d13bd188da280f720a06a91bd1157a +"callsites@npm:^4.2.0": + version: 4.2.0 + resolution: "callsites@npm:4.2.0" + checksum: 10c0/8f7e269ec09fc0946bb22d838a8bc7932e1909ab4a833b964749f4d0e8bdeaa1f253287c4f911f61781f09620b6925ccd19a5ea4897489c4e59442c660c312a3 languageName: node linkType: hard -"cbor@npm:^9.0.1": +"cbor@npm:^9.0.2": version: 9.0.2 resolution: "cbor@npm:9.0.2" dependencies: @@ -1739,6 +1788,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.3.7": + version: 4.3.7 + resolution: "debug@npm:4.3.7" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b + languageName: node + linkType: hard + "deep-is@npm:^0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" @@ -1829,7 +1890,7 @@ __metadata: languageName: node linkType: hard -"emittery@npm:^1.0.1": +"emittery@npm:^1.0.3": version: 1.0.3 resolution: "emittery@npm:1.0.3" checksum: 10c0/91605d044f3891dd1f8ab731aeb94b520488b21e707f7064dcbcf5303bac3b4e7133dfa23c343ede1fc970340bd78a9b1aed522b805bc15104606bba630dd71e @@ -2126,7 +2187,7 @@ __metadata: languageName: node linkType: hard -"estree-walker@npm:2.0.2, estree-walker@npm:^2.0.1": +"estree-walker@npm:2.0.2, estree-walker@npm:^2.0.2": version: 2.0.2 resolution: "estree-walker@npm:2.0.2" checksum: 10c0/53a6c54e2019b8c914dc395890153ffdc2322781acf4bd7d1a32d7aedc1710807bdcd866ac133903d5629ec601fbb50abe8c2e5553c7f5a0afdd9b6af6c945af @@ -2226,7 +2287,7 @@ __metadata: languageName: node linkType: hard -"figures@npm:^6.0.1, figures@npm:^6.1.0": +"figures@npm:^6.1.0": version: 6.1.0 resolution: "figures@npm:6.1.0" dependencies: @@ -2552,9 +2613,9 @@ __metadata: languageName: node linkType: hard -"globby@npm:^14.0.0": - version: 14.0.1 - resolution: "globby@npm:14.0.1" +"globby@npm:^14.0.2": + version: 14.0.2 + resolution: "globby@npm:14.0.2" dependencies: "@sindresorhus/merge-streams": "npm:^2.1.0" fast-glob: "npm:^3.3.2" @@ -2562,7 +2623,7 @@ __metadata: path-type: "npm:^5.0.0" slash: "npm:^5.1.0" unicorn-magic: "npm:^0.1.0" - checksum: 10c0/749a6be91cf455c161ebb5c9130df3991cb9fd7568425db850a8279a6cf45acd031c5069395beb7aeb4dd606b64f0d6ff8116c93726178d8e6182fee58c2736d + checksum: 10c0/3f771cd683b8794db1e7ebc8b6b888d43496d93a82aad4e9d974620f578581210b6c5a6e75ea29573ed16a1345222fab6e9b877a8d1ed56eeb147e09f69c6f78 languageName: node linkType: hard @@ -3186,6 +3247,16 @@ __metadata: languageName: node linkType: hard +"micromatch@npm:^4.0.8": + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" + dependencies: + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 + languageName: node + linkType: hard + "mime-db@npm:1.52.0": version: 1.52.0 resolution: "mime-db@npm:1.52.0" @@ -3554,7 +3625,7 @@ __metadata: languageName: node linkType: hard -"p-map@npm:^7.0.1": +"p-map@npm:^7.0.2": version: 7.0.2 resolution: "p-map@npm:7.0.2" checksum: 10c0/e10548036648d1c043153f9997112fe5a7de54a319210238628f8ea22ee36587fd6ee740811f88b60bbf29d932e23ae35df7fced40df477116c84c18e797047e @@ -3664,17 +3735,17 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.2.2, picomatch@npm:^2.3.1": +"picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be languageName: node linkType: hard -"picomatch@npm:^3.0.1": - version: 3.0.1 - resolution: "picomatch@npm:3.0.1" - checksum: 10c0/70ec738569f1864658378b7abdab8939d15dae0718c1df994eae3346fd33daf6a3c1ff4e0c1a0cd1e2c0319130985b63a2cff34d192f2f2acbb78aca76111736 +"picomatch@npm:^4.0.2": + version: 4.0.2 + resolution: "picomatch@npm:4.0.2" + checksum: 10c0/7c51f3ad2bb42c776f49ebf964c644958158be30d0a510efd5a395e8d49cb5acfed5b82c0c5b365523ce18e6ab85013c9ebe574f60305892ec3fa8eee8304ccc languageName: node linkType: hard @@ -3703,6 +3774,15 @@ __metadata: languageName: node linkType: hard +"pretty-ms@npm:^9.1.0": + version: 9.2.0 + resolution: "pretty-ms@npm:9.2.0" + dependencies: + parse-ms: "npm:^4.0.0" + checksum: 10c0/ab6d066f90e9f77020426986e1b018369f41575674544c539aabec2e63a20fec01166d8cf6571d0e165ad11cfe5a8134a2a48a36d42ab291c59c6deca5264cbb + languageName: node + linkType: hard + "proc-log@npm:^3.0.0": version: 3.0.0 resolution: "proc-log@npm:3.0.0" @@ -3885,16 +3965,16 @@ __metadata: "@cosmjs/crypto": "npm:^0.32.4" "@cosmjs/proto-signing": "npm:^0.32.4" "@cosmjs/stargate": "npm:^0.32.4" - "@endo/errors": "npm:^1.2.5" - "@endo/far": "npm:^1.1.5" - "@endo/nat": "npm:^5.0.10" - "@endo/ses-ava": "npm:^1.2.5" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/nat": "npm:^5.0.13" + "@endo/ses-ava": "npm:^1.2.8" "@types/eslint": "npm:^8" "@types/fs-extra": "npm:^11" "@types/node": "npm:^20.11.13" "@typescript-eslint/eslint-plugin": "npm:^6.20.0" "@typescript-eslint/parser": "npm:^6.20.0" - ava: "npm:^6.1.3" + ava: "npm:^6.2.0" eslint: "npm:^8.56.0" eslint-config-prettier: "npm:^9.1.0" execa: "npm:9.1.0" @@ -3957,6 +4037,15 @@ __metadata: languageName: node linkType: hard +"ses@npm:^1.10.0": + version: 1.10.0 + resolution: "ses@npm:1.10.0" + dependencies: + "@endo/env-options": "npm:^1.1.8" + checksum: 10c0/83b92bc49e27af04eeb7ee01a2196a0c4b0906e4de51e70403aa9ffc82be1d27a0c3506f2d54da8d6d260be0855f2123a13a7e2c6896e81ec85899df1a428609 + languageName: node + linkType: hard + "ses@npm:^1.8.0, ses@npm:^1.9.0": version: 1.9.0 resolution: "ses@npm:1.9.0" @@ -4544,13 +4633,13 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^5.0.1": - version: 5.0.1 - resolution: "write-file-atomic@npm:5.0.1" +"write-file-atomic@npm:^6.0.0": + version: 6.0.0 + resolution: "write-file-atomic@npm:6.0.0" dependencies: imurmurhash: "npm:^0.1.4" signal-exit: "npm:^4.0.1" - checksum: 10c0/e8c850a8e3e74eeadadb8ad23c9d9d63e4e792bd10f4836ed74189ef6e996763959f1249c5650e232f3c77c11169d239cbfc8342fc70f3fe401407d23810505d + checksum: 10c0/ae2f1c27474758a9aca92037df6c1dd9cb94c4e4983451210bd686bfe341f142662f6aa5913095e572ab037df66b1bfe661ed4ce4c0369ed0e8219e28e141786 languageName: node linkType: hard From 6d7268c04b94fc81cccd7c04b71929315bb0e735 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Wed, 23 Oct 2024 11:48:55 -0700 Subject: [PATCH 103/174] chore(deps): rm tsimp remnant no need for tsimp, these tests look at `dist`/ . There's also the `tsc` option for compilation, but it ignores our `tsconfig.build.json` --- packages/cosmic-proto/.gitignore | 2 - packages/cosmic-proto/package.json | 1 - yarn.lock | 60 ++++-------------------------- 3 files changed, 7 insertions(+), 56 deletions(-) delete mode 100644 packages/cosmic-proto/.gitignore diff --git a/packages/cosmic-proto/.gitignore b/packages/cosmic-proto/.gitignore deleted file mode 100644 index 5290a01927e..00000000000 --- a/packages/cosmic-proto/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# cache -.tsimp diff --git a/packages/cosmic-proto/package.json b/packages/cosmic-proto/package.json index aa4daca25b2..6e0081a39d1 100644 --- a/packages/cosmic-proto/package.json +++ b/packages/cosmic-proto/package.json @@ -152,7 +152,6 @@ "ava": "^5.3.1", "rimraf": "^5.0.0", "tsd": "^0.31.1", - "tsimp": "^2.0.11", "typescript": "~5.7.1" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index a8f323ee92c..5b318218ea0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1920,18 +1920,6 @@ resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== -"@isaacs/cached@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@isaacs/cached/-/cached-1.0.1.tgz#b6ad07c346f843fb3f117a0f3401ea8b7f7d4eea" - integrity sha512-7kGcJ9Hc1f4qpTApWz3swxbF9Qv1NF/GxuPtXeTptbsgvJIoufSd0h854Nq/2bw80F5C1onsFgEI05l+q0e4vw== - dependencies: - "@isaacs/catcher" "^1.0.0" - -"@isaacs/catcher@^1.0.0", "@isaacs/catcher@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@isaacs/catcher/-/catcher-1.0.4.tgz#fa5aa6fa43d255b9fe32e1e1f40db6623de2c80d" - integrity sha512-g2klMwbnguClWNnCeQ1zYaDJsvPbIbnjdJPDE0z09MqoejJDZSLK5vIKiClq2Bkg5ubuI8vaN6wfIUi5GYzMVA== - "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" @@ -9296,11 +9284,6 @@ mkdirp@^0.5.1: dependencies: minimist "^1.2.6" -mkdirp@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" - integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== - modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -10294,7 +10277,7 @@ pify@^5.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== -pirates@^4.0.4, pirates@^4.0.6: +pirates@^4.0.4: version "4.0.6" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== @@ -10894,7 +10877,7 @@ rimraf@^2.6.3, rimraf@~2.6.2: dependencies: glob "^7.1.3" -rimraf@^5.0.0, rimraf@^5.0.5: +rimraf@^5.0.0: version "5.0.5" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.5.tgz#9be65d2d6e683447d2e9013da2bf451139a61ccf" integrity sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A== @@ -11284,20 +11267,6 @@ smart-buffer@^4.2.0: resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== -sock-daemon@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/sock-daemon/-/sock-daemon-1.4.2.tgz#b9d5d1f8b156b20a7c1ceba095da8b8745fac405" - integrity sha512-IzbegWshWWR+UzQ7487mbdYNmfJ1jXUXQBUHooqtpylO+aW0vMVbFN2d2ug3CSPZ0wbG7ZTTGwpUuthIDFIOGg== - dependencies: - rimraf "^5.0.5" - signal-exit "^4.1.0" - socket-post-message "^1.0.3" - -socket-post-message@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/socket-post-message/-/socket-post-message-1.0.3.tgz#638dfca32064eee9a784bb5be9634b19e649ac39" - integrity sha512-UhJaB3xR2oF+HvddFOq2cBZi4zVKOHvdiBo+BaScNxsEUg3TLWSP8BkweKfe07kfH1thjn1hJR0af/w1EtBFjg== - socks-proxy-agent@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz#dc069ecf34436621acb41e3efa66ca1b5fed15b6" @@ -11976,22 +11945,12 @@ tsd@^0.31.1: path-exists "^4.0.0" read-pkg-up "^7.0.0" -tsimp@^2.0.11: - version "2.0.11" - resolved "https://registry.yarnpkg.com/tsimp/-/tsimp-2.0.11.tgz#28b7efb609a070554cedb4309c1a7def662e93ab" - integrity sha512-wRhMmvar8tWHN3ZmykD8f4B4sjCn/f8DFM67LRY+stf/LPa2Kq8ATE2PIi570/DiDJA8kjjxzos3EgP0LmnFLA== - dependencies: - "@isaacs/cached" "^1.0.1" - "@isaacs/catcher" "^1.0.4" - foreground-child "^3.1.1" - mkdirp "^3.0.1" - pirates "^4.0.6" - rimraf "^5.0.5" - signal-exit "^4.1.0" - sock-daemon "^1.4.2" - walk-up-path "^3.0.1" +"tslib@1 || 2", tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -"tslib@1 || 2", tslib@2.7.0, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.6.2: +tslib@2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== @@ -12385,11 +12344,6 @@ walk-up-path@^1.0.0: resolved "https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-1.0.0.tgz#d4745e893dd5fd0dbb58dd0a4c6a33d9c9fec53e" integrity sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg== -walk-up-path@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-3.0.1.tgz#c8d78d5375b4966c717eb17ada73dbd41490e886" - integrity sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA== - walker@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" From 4a935d674c4bb437a1434a8a6be77d27a7827d93 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 2 Dec 2024 11:47:49 -0800 Subject: [PATCH 104/174] test: base fusdc config on main config --- multichain-testing/ava.fusdc.config.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/multichain-testing/ava.fusdc.config.js b/multichain-testing/ava.fusdc.config.js index 4c7ef7ceabb..10571c74d84 100644 --- a/multichain-testing/ava.fusdc.config.js +++ b/multichain-testing/ava.fusdc.config.js @@ -1,11 +1,6 @@ +import mainConfig from './ava.main.config.js'; + export default { - extensions: { - ts: 'module', - }, - require: ['@endo/init/debug.js'], - nodeArguments: ['--import=ts-blank-space/register'], + ...mainConfig, files: ['test/fast-usdc/**/*.test.ts'], - concurrency: 1, - serial: true, - timeout: '125s', }; From 8e23534544686780a1858ba8928bb6afd1678e05 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 2 Dec 2024 11:46:56 -0800 Subject: [PATCH 105/174] test: skip extra endo/init --- multichain-testing/ava.main.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multichain-testing/ava.main.config.js b/multichain-testing/ava.main.config.js index 790298e1d09..37c7ca0b467 100644 --- a/multichain-testing/ava.main.config.js +++ b/multichain-testing/ava.main.config.js @@ -2,7 +2,8 @@ export default { extensions: { ts: 'module', }, - require: ['@endo/init/debug.js'], + // Each test imports `@endo/ses-ava/prepare-endo.js` which does its own @endo/init + // require: ['@endo/init/debug.js'], nodeArguments: ['--import=ts-blank-space/register'], files: ['test/**/*.test.ts', '!test/fast-usdc/**/*.test.ts'], concurrency: 1, From 3f281bbd5b7787710246ce4dfc4e911575c2c2af Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 22 Oct 2024 11:54:37 -0700 Subject: [PATCH 106/174] build(deps): bump typescript to 5.6.2 making compatible with root tsconfig --- multichain-testing/package.json | 2 +- multichain-testing/yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/multichain-testing/package.json b/multichain-testing/package.json index 5f3b11cec7a..f1033a78b01 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -41,7 +41,7 @@ "starshipjs": "2.4.1", "ts-blank-space": "^0.4.4", "tsx": "^4.15.6", - "typescript": "^5.3.3" + "typescript": "~5.6.2" }, "resolutions": { "axios": "1.6.7" diff --git a/multichain-testing/yarn.lock b/multichain-testing/yarn.lock index c6f0d923c33..2db36e811be 100644 --- a/multichain-testing/yarn.lock +++ b/multichain-testing/yarn.lock @@ -3983,7 +3983,7 @@ __metadata: starshipjs: "npm:2.4.1" ts-blank-space: "npm:^0.4.4" tsx: "npm:^4.15.6" - typescript: "npm:^5.3.3" + typescript: "npm:~5.6.2" languageName: unknown linkType: soft @@ -4450,13 +4450,13 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.3.3": - version: 5.4.5 - resolution: "typescript@npm:5.4.5" +"typescript@npm:~5.6.2": + version: 5.6.3 + resolution: "typescript@npm:5.6.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/2954022ada340fd3d6a9e2b8e534f65d57c92d5f3989a263754a78aba549f7e6529acc1921913560a4b816c46dce7df4a4d29f9f11a3dc0d4213bb76d043251e + checksum: 10c0/44f61d3fb15c35359bc60399cb8127c30bae554cd555b8e2b46d68fa79d680354b83320ad419ff1b81a0bdf324197b29affe6cc28988cd6a74d4ac60c94f9799 languageName: node linkType: hard @@ -4470,13 +4470,13 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin": - version: 5.4.5 - resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin::version=5.4.5&hash=5adc0c" +"typescript@patch:typescript@npm%3A~5.6.2#optional!builtin": + version: 5.6.3 + resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=8c6c40" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/db2ad2a16ca829f50427eeb1da155e7a45e598eec7b086d8b4e8ba44e5a235f758e606d681c66992230d3fc3b8995865e5fd0b22a2c95486d0b3200f83072ec9 + checksum: 10c0/7c9d2e07c81226d60435939618c91ec2ff0b75fbfa106eec3430f0fcf93a584bc6c73176676f532d78c3594fe28a54b36eb40b3d75593071a7ec91301533ace7 languageName: node linkType: hard From 824988a37ec03698e31e71d5c90a4e3433792282 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 22 Oct 2024 11:51:17 -0700 Subject: [PATCH 107/174] ci: lint types --- multichain-testing/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multichain-testing/package.json b/multichain-testing/package.json index f1033a78b01..dab597d62f5 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "build": "exit 0", - "lint": "yarn lint:eslint", + "lint": "yarn lint:types && yarn lint:eslint", "lint:eslint": "eslint .", "lint:types": "tsc --noEmit", "lint-fix": "yarn lint:eslint --fix", From b096f139040dff6c364c5904ac75d97997bed7c8 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 22 Oct 2024 11:55:30 -0700 Subject: [PATCH 108/174] build: typedef for generated file --- multichain-testing/.gitignore | 2 +- multichain-testing/starship-chain-info.d.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 multichain-testing/starship-chain-info.d.ts diff --git a/multichain-testing/.gitignore b/multichain-testing/.gitignore index 71e21e2763c..bd550b4d526 100644 --- a/multichain-testing/.gitignore +++ b/multichain-testing/.gitignore @@ -1,7 +1,7 @@ .yarn/* !.yarn/patches/* # fetched chain info from running starship -starship-chain-info* +starship-chain-info.js # output of build script to get update running chain info revise-chain-info* start* diff --git a/multichain-testing/starship-chain-info.d.ts b/multichain-testing/starship-chain-info.d.ts new file mode 100644 index 00000000000..a7f7a9719c0 --- /dev/null +++ b/multichain-testing/starship-chain-info.d.ts @@ -0,0 +1,2 @@ +/* @file types so linting works when the real info hasn't been fetched */ +export default {} as Record; From 99dab6f63f0f132af48ebac573b33725a32854a0 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 22 Oct 2024 11:59:28 -0700 Subject: [PATCH 109/174] chore(deps): bump node types for correct Buffer --- multichain-testing/package.json | 2 +- multichain-testing/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multichain-testing/package.json b/multichain-testing/package.json index dab597d62f5..bd09b995ace 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -29,7 +29,7 @@ "@endo/ses-ava": "^1.2.8", "@types/eslint": "^8", "@types/fs-extra": "^11", - "@types/node": "^20.11.13", + "@types/node": "^22.0.0", "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", "ava": "^6.2.0", diff --git a/multichain-testing/yarn.lock b/multichain-testing/yarn.lock index 2db36e811be..56b70b10a67 100644 --- a/multichain-testing/yarn.lock +++ b/multichain-testing/yarn.lock @@ -938,7 +938,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*": +"@types/node@npm:*, @types/node@npm:^22.0.0": version: 22.7.8 resolution: "@types/node@npm:22.7.8" dependencies: @@ -947,7 +947,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:>=13.7.0, @types/node@npm:^20.11.13": +"@types/node@npm:>=13.7.0": version: 20.14.2 resolution: "@types/node@npm:20.14.2" dependencies: @@ -3971,7 +3971,7 @@ __metadata: "@endo/ses-ava": "npm:^1.2.8" "@types/eslint": "npm:^8" "@types/fs-extra": "npm:^11" - "@types/node": "npm:^20.11.13" + "@types/node": "npm:^22.0.0" "@typescript-eslint/eslint-plugin": "npm:^6.20.0" "@typescript-eslint/parser": "npm:^6.20.0" ava: "npm:^6.2.0" From 9127f377d7ac02d196ad175a89715a67992535cb Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 22 Oct 2024 12:02:10 -0700 Subject: [PATCH 110/174] ci: simplify lint commands --- multichain-testing/package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/multichain-testing/package.json b/multichain-testing/package.json index bd09b995ace..4d00409e179 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -4,9 +4,7 @@ "type": "module", "scripts": { "build": "exit 0", - "lint": "yarn lint:types && yarn lint:eslint", - "lint:eslint": "eslint .", - "lint:types": "tsc --noEmit", + "lint": "yarn tsc && yarn eslint .", "lint-fix": "yarn lint:eslint --fix", "test": "echo 'Run specific test suites:\nyarn test:main (needs `make start`)\nyarn test:fast-usdc (needs `make start FILE=config.fusdc.yaml`)'", "test:main": "ava --config ava.main.config.js", From a62f80c4554fa5a92e23a43975f261c29cf708e2 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Wed, 23 Oct 2024 13:04:31 -0700 Subject: [PATCH 111/174] chore(types): ts-check --- multichain-testing/test/chain-queries.test.ts | 1 + multichain-testing/tools/batchQuery.js | 1 + multichain-testing/tools/e2e-tools.js | 3 +++ multichain-testing/tools/makeHttpClient.js | 1 + multichain-testing/tools/marshalTables.js | 1 + multichain-testing/tools/queryKit.js | 1 + 6 files changed, 8 insertions(+) diff --git a/multichain-testing/test/chain-queries.test.ts b/multichain-testing/test/chain-queries.test.ts index a9b91c97fe3..e739d0d53b6 100644 --- a/multichain-testing/test/chain-queries.test.ts +++ b/multichain-testing/test/chain-queries.test.ts @@ -247,6 +247,7 @@ test.serial('Send Local Query from chain object', async t => { }, ); const balanceProto3JsonQuery = typedJson( + // @ts-expect-error outdated cosmic-proto dep '/cosmos.bank.v1beta1.QueryBalanceRequest', { address: agoricAddr, diff --git a/multichain-testing/tools/batchQuery.js b/multichain-testing/tools/batchQuery.js index 64c1d1855b5..3d26c6037ad 100644 --- a/multichain-testing/tools/batchQuery.js +++ b/multichain-testing/tools/batchQuery.js @@ -1,3 +1,4 @@ +// @ts-check import { assert } from '@endo/errors'; import { E } from '@endo/far'; diff --git a/multichain-testing/tools/e2e-tools.js b/multichain-testing/tools/e2e-tools.js index ec0759d9232..a3c4ce4207c 100644 --- a/multichain-testing/tools/e2e-tools.js +++ b/multichain-testing/tools/e2e-tools.js @@ -1,3 +1,4 @@ +// @ts-check /** global harden */ import { assert } from '@endo/errors'; import { E, Far } from '@endo/far'; @@ -123,6 +124,7 @@ const installBundle = async (fullPath, opts) => { * chainId?: string; * whale?: string; * progress?: typeof console.log; + * q?: import('./queryKit.js').QueryTool; * }} opts */ export const provisionSmartWallet = async ( @@ -474,6 +476,7 @@ export const makeE2ETools = async ( // name, id: fullPath, installHeight: tx.height, + // @ts-expect-error confirm is a boolean? installed: confirm.installed, }); } diff --git a/multichain-testing/tools/makeHttpClient.js b/multichain-testing/tools/makeHttpClient.js index 37344419946..3219a8f147e 100644 --- a/multichain-testing/tools/makeHttpClient.js +++ b/multichain-testing/tools/makeHttpClient.js @@ -1,3 +1,4 @@ +// @ts-check import { assert } from '@endo/errors'; import { Far } from '@endo/far'; diff --git a/multichain-testing/tools/marshalTables.js b/multichain-testing/tools/marshalTables.js index 827bd230cc3..ac06ed20f5d 100644 --- a/multichain-testing/tools/marshalTables.js +++ b/multichain-testing/tools/marshalTables.js @@ -1,3 +1,4 @@ +// @ts-check /** * @file marshal tools for vstorage clients * diff --git a/multichain-testing/tools/queryKit.js b/multichain-testing/tools/queryKit.js index 44bf5ac7f7a..3acdfb62f7f 100644 --- a/multichain-testing/tools/queryKit.js +++ b/multichain-testing/tools/queryKit.js @@ -1,3 +1,4 @@ +// @ts-check import { E, Far } from '@endo/far'; import { batchVstorageQuery } from './batchQuery.js'; import { makeClientMarshaller } from './marshalTables.js'; From aa7a476fce42d6977250a4a3ed35b39e96c70e0c Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 2 Dec 2024 17:19:57 -0600 Subject: [PATCH 112/174] test(fast-usdc): prune testBorrow(...), testRepay(...) tests - largely covered by share-pool-math tests - move 'repay succeeds with no Pool or Contract Fee' from contract test to pool-share-math test. - borrow / repay are internal APIs with static types - testing consistency between interface guards and static types might have some value, but not enough --- .../fast-usdc/test/fast-usdc.contract.test.ts | 229 ------------------ .../fast-usdc/test/pool-share-math.test.ts | 30 +++ 2 files changed, 30 insertions(+), 229 deletions(-) diff --git a/packages/fast-usdc/test/fast-usdc.contract.test.ts b/packages/fast-usdc/test/fast-usdc.contract.test.ts index 38e80e76e71..7ec53744173 100644 --- a/packages/fast-usdc/test/fast-usdc.contract.test.ts +++ b/packages/fast-usdc/test/fast-usdc.contract.test.ts @@ -317,235 +317,6 @@ const makeLP = async ( return me; }; -test.skip('LP borrow - TODO: move to exo test', async t => { - const common = await commonSetup(t); - const { - brands: { usdc }, - utils, - } = common; - - const { instance, creatorFacet, zoe, metricsSub, terms } = - await startContract(common); - - const usdcPurse = purseOf(terms.issuers.USDC, utils); - const lps = { - alice: makeLP('Alice', usdcPurse(100n), zoe, instance), - }; - // seed pool with funds - await E(lps.alice).deposit(t, 100n); - - const { value } = await E(metricsSub).getUpdateSince(); - const { shareWorth, encumberedBalance } = value; - const poolSeatAllocation = subtract( - subtract(shareWorth.numerator, encumberedBalance), - usdc.make(1n), - ); - t.log('Attempting to borrow entire pool seat allocation', poolSeatAllocation); - await t.throwsAsync( - E(creatorFacet).testBorrow({ USDC: poolSeatAllocation }), - { - message: /Cannot borrow/, - }, - 'borrow fails when requested equals pool seat allocation', - ); - - await t.throwsAsync( - E(creatorFacet).testBorrow({ USDC: usdc.make(200n) }), - { - message: /Cannot borrow/, - }, - 'borrow fails when requested exceeds pool seat allocation', - ); - - await t.throwsAsync(E(creatorFacet).testBorrow({ USDC: usdc.make(0n) }), { - message: /arg 1: USDC: value: "\[0n\]" - Must be >= "\[1n\]"/, - }); - - await t.throwsAsync( - E(creatorFacet).testBorrow( - // @ts-expect-error intentionally incorrect KW - { Fee: usdc.make(1n) }, - ), - { - message: /Must have missing properties \["USDC"\]/, - }, - ); - - // LPs can still withdraw (contract did not shutdown) - await E(lps.alice).withdraw(t, 0.5); - - const amt = await E(creatorFacet).testBorrow({ USDC: usdc.make(30n) }); - t.deepEqual(amt, { USDC: usdc.make(30n) }, 'borrow succeeds'); - - await eventLoopIteration(); - t.like(await E(metricsSub).getUpdateSince(), { - value: { - encumberedBalance: { - value: 30n, - }, - totalBorrows: { - value: 30n, - }, - totalRepays: { - value: 0n, - }, - }, - }); -}); - -test.skip('LP repay - TODO: move to exo test', async t => { - const common = await commonSetup(t); - const { - commonPrivateArgs, - brands: { usdc }, - utils, - } = common; - - const { instance, creatorFacet, zoe, metricsSub, terms } = - await startContract(common); - const usdcPurse = purseOf(terms.issuers.USDC, utils); - const lps = { - alice: makeLP('Alice', usdcPurse(100n), zoe, instance), - }; - // seed pool with funds - await E(lps.alice).deposit(t, 100n); - - // borrow funds from pool to increase encumbered balance - await E(creatorFacet).testBorrow({ USDC: usdc.make(50n) }); - const feeTools = makeFeeTools(commonPrivateArgs.feeConfig); - { - t.log('cannot repay more than encumbered balance'); - const repayAmounts = feeTools.calculateSplit(usdc.make(100n)); - const repayPayments = await deeplyFulfilledObject( - objectMap(repayAmounts, utils.pourPayment), - ); - await t.throwsAsync( - E(creatorFacet).testRepay(repayAmounts, repayPayments), - { - message: /Cannot repay. Principal .* exceeds encumberedBalance/, - }, - ); - } - - { - const pmt = utils.pourPayment(usdc.make(50n)); - await t.throwsAsync( - E(creatorFacet).testRepay( - // @ts-expect-error intentionally incorrect KWR - { USDC: usdc.make(50n) }, - { USDC: pmt }, - ), - { - message: - /Must have missing properties \["Principal","PoolFee","ContractFee"\]/, - }, - ); - } - { - const pmt = utils.pourPayment(usdc.make(50n)); - await t.throwsAsync( - E(creatorFacet).testRepay( - // @ts-expect-error intentionally incorrect KWR - { Principal: usdc.make(50n) }, - { Principal: pmt }, - ), - { - message: /Must have missing properties \["PoolFee","ContractFee"\]/, - }, - ); - } - { - const amts = { - Principal: usdc.make(0n), - ContractFee: usdc.make(0n), - PoolFee: usdc.make(0n), - }; - const pmts = await deeplyFulfilledObject( - objectMap(amts, utils.pourPayment), - ); - await t.throwsAsync(E(creatorFacet).testRepay(amts, pmts), { - message: /arg 1: Principal: value: "\[0n\]" - Must be >= "\[1n\]"/, - }); - } - - { - t.log('repay fails when amounts do not match seat allocation'); - const amts = { - Principal: usdc.make(25n), - ContractFee: usdc.make(1n), - PoolFee: usdc.make(2n), - }; - const pmts = await deeplyFulfilledObject( - harden({ - Principal: utils.pourPayment(usdc.make(24n)), - ContractFee: utils.pourPayment(usdc.make(1n)), - PoolFee: utils.pourPayment(usdc.make(2n)), - }), - ); - await t.throwsAsync(E(creatorFacet).testRepay(amts, pmts), { - message: /Cannot repay. From seat allocation .* does not equal amounts/, - }); - } - - { - t.log('repay succeeds with no Pool or Contract Fee'); - const amts = { - Principal: usdc.make(25n), - ContractFee: usdc.make(0n), - PoolFee: usdc.make(0n), - }; - const pmts = await deeplyFulfilledObject( - objectMap(amts, utils.pourPayment), - ); - const repayResult = await E(creatorFacet).testRepay(amts, pmts); - - for (const r of Object.values(repayResult)) { - t.is(r.value, 0n, 'testRepay consumes all payments'); - } - } - - const amts = { - Principal: usdc.make(25n), - ContractFee: usdc.make(1n), - PoolFee: usdc.make(2n), - }; - const pmts = await deeplyFulfilledObject(objectMap(amts, utils.pourPayment)); - const repayResult = await E(creatorFacet).testRepay(amts, pmts); - - for (const r of Object.values(repayResult)) { - t.is(r.value, 0n, 'testRepay consumes all payments'); - } - - await eventLoopIteration(); - t.like(await E(metricsSub).getUpdateSince(), { - value: { - encumberedBalance: { - value: 0n, - }, - totalBorrows: { - value: 50n, - }, - totalRepays: { - value: 50n, - }, - totalContractFees: { - value: 1n, - }, - totalPoolFees: { - value: 2n, - }, - shareWorth: { - numerator: { - value: 103n, // 100n (alice lp) + 1n (dust) + 2n (pool fees) - }, - }, - }, - }); - - // LPs can still withdraw (contract did not shutdown) - await E(lps.alice).withdraw(t, 1); -}); - const makeEVM = (template = MockCctpTxEvidences.AGORIC_PLUS_OSMO()) => { const [settleAddr] = template.aux.recipientAddress.split('?'); let nonce = 0; diff --git a/packages/fast-usdc/test/pool-share-math.test.ts b/packages/fast-usdc/test/pool-share-math.test.ts index 65870aaecfa..c0fda677346 100644 --- a/packages/fast-usdc/test/pool-share-math.test.ts +++ b/packages/fast-usdc/test/pool-share-math.test.ts @@ -494,3 +494,33 @@ test('repay fails when seat allocation does not equal amounts', t => { }, ); }); + +test('repay succeeds with no Pool or Contract Fee', t => { + const { USDC } = brands; + const encumberedBalance = make(USDC, 100n); + const shareWorth = makeParity(make(USDC, 1n), brands.PoolShares); + + const amounts = { + Principal: make(USDC, 25n), + ContractFee: make(USDC, 0n), + PoolFee: make(USDC, 0n), + }; + const poolStats = { + ...makeInitialPoolStats(), + totalBorrows: make(USDC, 100n), + }; + const fromSeatAllocation = amounts; + const actual = repayCalc( + shareWorth, + fromSeatAllocation, + amounts, + encumberedBalance, + poolStats, + ); + t.like(actual, { + shareWorth, + encumberedBalance: { + value: 75n, + }, + }); +}); From d96a45e2dd131eb7529e34585ac987329952dfae Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Mon, 2 Dec 2024 17:46:59 -0600 Subject: [PATCH 113/174] chore(fast-usdc): prune testBorrow, testRepay methods --- packages/fast-usdc/src/fast-usdc.contract.js | 44 +++----------------- 1 file changed, 5 insertions(+), 39 deletions(-) diff --git a/packages/fast-usdc/src/fast-usdc.contract.js b/packages/fast-usdc/src/fast-usdc.contract.js index 91bccb8ddf1..45bf9cc82d5 100644 --- a/packages/fast-usdc/src/fast-usdc.contract.js +++ b/packages/fast-usdc/src/fast-usdc.contract.js @@ -1,9 +1,5 @@ import { AssetKind } from '@agoric/ertp'; -import { - assertAllDefined, - deeplyFulfilledObject, - makeTracer, -} from '@agoric/internal'; +import { assertAllDefined, makeTracer } from '@agoric/internal'; import { observeIteration, subscribeEach } from '@agoric/notifier'; import { CosmosChainInfoShape, @@ -12,20 +8,19 @@ import { registerChainsAndAssets, withOrchestration, } from '@agoric/orchestration'; +import { makeZoeTools } from '@agoric/orchestration/src/utils/zoe-tools.js'; import { provideSingleton } from '@agoric/zoe/src/contractSupport/durability.js'; import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport/recorder.js'; -import { makeZoeTools } from '@agoric/orchestration/src/utils/zoe-tools.js'; -import { depositToSeat } from '@agoric/zoe/src/contractSupport/zoeHelpers.js'; import { E } from '@endo/far'; -import { M, objectMap } from '@endo/patterns'; +import { M } from '@endo/patterns'; import { prepareAdvancer } from './exos/advancer.js'; import { prepareLiquidityPoolKit } from './exos/liquidity-pool.js'; import { prepareSettler } from './exos/settler.js'; import { prepareStatusManager } from './exos/status-manager.js'; import { prepareTransactionFeedKit } from './exos/transaction-feed.js'; -import { defineInertInvitation } from './utils/zoe.js'; -import { FastUSDCTermsShape, FeeConfigShape } from './type-guards.js'; import * as flows from './fast-usdc.flows.js'; +import { FastUSDCTermsShape, FeeConfigShape } from './type-guards.js'; +import { defineInertInvitation } from './utils/zoe.js'; const trace = makeTracer('FastUsdc'); @@ -151,35 +146,6 @@ export const contract = async (zcf, privateArgs, zone, tools) => { async makeOperatorInvitation(operatorId) { return feedKit.creator.makeOperatorInvitation(operatorId); }, - /** - * @param {{ USDC: Amount<'nat'>}} amounts - */ - testBorrow(amounts) { - console.log('🚧🚧 UNTIL: borrow is integrated (#10388) 🚧🚧', amounts); - const { zcfSeat: tmpAssetManagerSeat } = zcf.makeEmptySeatKit(); - poolKit.borrower.borrow(tmpAssetManagerSeat, amounts); - return tmpAssetManagerSeat.getCurrentAllocation(); - }, - /** - * - * @param {RepayAmountKWR} amounts - * @param {RepayPaymentKWR} payments - * @returns {Promise} - */ - async testRepay(amounts, payments) { - console.log('🚧🚧 UNTIL: repay is integrated (#10388) 🚧🚧', amounts); - const { zcfSeat: tmpAssetManagerSeat } = zcf.makeEmptySeatKit(); - await depositToSeat( - zcf, - tmpAssetManagerSeat, - await deeplyFulfilledObject( - objectMap(payments, pmt => E(terms.issuers.USDC).getAmountOf(pmt)), - ), - payments, - ); - poolKit.repayer.repay(tmpAssetManagerSeat, amounts); - return tmpAssetManagerSeat.getCurrentAllocation(); - }, }); const publicFacet = zone.exo('Fast USDC Public', undefined, { From 0767f72848fdaf17deae4f939e52b693391e37b1 Mon Sep 17 00:00:00 2001 From: anilhelvaci Date: Tue, 5 Nov 2024 18:34:21 +0300 Subject: [PATCH 114/174] chore(pp-upgrade): create and set a new bridgeHandler in the proposal Refs: https://github.com/Agoric/agoric-sdk/issues/10395 --- golang/cosmos/app/upgrade.go | 6 +++ .../upgrade-provisionPool-proposal.js | 44 ++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/golang/cosmos/app/upgrade.go b/golang/cosmos/app/upgrade.go index 8770675d792..9f81d6bb0ca 100644 --- a/golang/cosmos/app/upgrade.go +++ b/golang/cosmos/app/upgrade.go @@ -212,6 +212,12 @@ func unreleasedUpgradeHandler(app *GaiaApp, targetUpgrade string) func(sdk.Conte // Upgrade to include a cleanup from https://github.com/Agoric/agoric-sdk/pull/10319 "@agoric/builders/scripts/smart-wallet/build-wallet-factory2-upgrade.js", ), + vm.CoreProposalStepForModules( + "@agoric/builders/scripts/vats/upgrade-provisionPool.js", + ), + vm.CoreProposalStepForModules( + "@agoric/builders/scripts/vats/upgrade-bank.js", + ), ) // // CoreProposals for Upgrade 19. These should not be introduced diff --git a/packages/vats/src/proposals/upgrade-provisionPool-proposal.js b/packages/vats/src/proposals/upgrade-provisionPool-proposal.js index 9d31c752607..4dd74af9c69 100644 --- a/packages/vats/src/proposals/upgrade-provisionPool-proposal.js +++ b/packages/vats/src/proposals/upgrade-provisionPool-proposal.js @@ -16,6 +16,10 @@ export const upgradeProvisionPool = async ( economicCommitteeCreatorFacet: electorateCreatorFacet, instancePrivateArgs: instancePrivateArgsP, provisionPoolStartResult: provisionPoolStartResultP, + bankManager, + namesByAddressAdmin: namesByAddressAdminP, + walletFactoryStartResult: walletFactoryStartResultP, + provisionWalletBridgeManager: provisionWalletBridgeManagerP, }, }, options, @@ -25,11 +29,25 @@ export const upgradeProvisionPool = async ( assert(provisionPoolRef.bundleID); console.log(`PROVISION POOL BUNDLE ID: `, provisionPoolRef.bundleID); - const [provisionPoolStartResult, instancePrivateArgs] = await Promise.all([ + const [ + provisionPoolStartResult, + instancePrivateArgs, + namesByAddressAdmin, + walletFactoryStartResult, + provisionWalletBridgeManager, + ] = await Promise.all([ provisionPoolStartResultP, instancePrivateArgsP, + namesByAddressAdminP, + walletFactoryStartResultP, + provisionWalletBridgeManagerP, ]); - const { adminFacet, instance } = provisionPoolStartResult; + const { + adminFacet, + instance, + creatorFacet: ppCreatorFacet, + } = provisionPoolStartResult; + const { creatorFacet: wfCreatorFacet } = walletFactoryStartResult; const [originalPrivateArgs, poserInvitation] = await Promise.all([ // eslint-disable-next-line @typescript-eslint/ban-ts-comment @@ -49,6 +67,24 @@ export const upgradeProvisionPool = async ( ); console.log('ProvisionPool upgraded: ', upgradeResult); + + const references = { + bankManager, + namesByAddressAdmin, + walletFactory: wfCreatorFacet, + }; + + console.log('Calling setReferences with: ', references); + await E(ppCreatorFacet).setReferences(references); + + console.log('Creating bridgeHandler...'); + const bridgeHandler = await E(ppCreatorFacet).makeHandler(); + + console.log('Setting new bridgeHandler...'); + // @ts-expect-error casting + await E(provisionWalletBridgeManager).setHandler(bridgeHandler); + + console.log('Done.'); }; export const getManifestForUpgradingProvisionPool = ( @@ -61,6 +97,10 @@ export const getManifestForUpgradingProvisionPool = ( economicCommitteeCreatorFacet: true, instancePrivateArgs: true, provisionPoolStartResult: true, + bankManager: true, + namesByAddressAdmin: true, + walletFactoryStartResult: true, + provisionWalletBridgeManager: true, }, produce: {}, }, From c8916b25289540ccd92c81a11fb4ae8c2efb9bac Mon Sep 17 00:00:00 2001 From: anilhelvaci Date: Wed, 6 Nov 2024 16:43:15 +0300 Subject: [PATCH 115/174] chore(pp-upgrade): create helper core-evals Refs: https://github.com/Agoric/agoric-sdk/issues/10395 --- .../deposit-usd-lemons-permit.json | 8 +++ .../depositUSD-LEMONS/deposit-usd-lemons.js | 49 +++++++++++++++++++ .../scripts/testing/add-USD-LEMONS.js | 19 +++++++ 3 files changed, 76 insertions(+) create mode 100644 a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons-permit.json create mode 100644 a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js create mode 100644 packages/builders/scripts/testing/add-USD-LEMONS.js diff --git a/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons-permit.json b/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons-permit.json new file mode 100644 index 00000000000..0a580519276 --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons-permit.json @@ -0,0 +1,8 @@ +{ + "consume": { + "contractKits": true, + "namesByAddressAdmin": true, + "agoricNames": true + } +} + diff --git a/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js b/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js new file mode 100644 index 00000000000..2d9a6f0650f --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js @@ -0,0 +1,49 @@ +const PROVISIONING_POOL_ADDR = 'agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346'; + +const depositUsdLemons = async powers => { + const { + consume: { contractKits: contractKitsP, namesByAddressAdmin: namesByAddressAdminP , agoricNames }, + // instance: { consume: { ['psm-IST-USD_LEMONS']: usdLemonsPsmInstanceP }} + } = powers; + + const namesByAddressAdmin = await namesByAddressAdminP; + + const getDepositFacet = async address => { + const admin = await E(namesByAddressAdmin).lookupAdmin(address); + console.log('ADMIN', admin) + + const nameHub = await E(admin).readonly(); + console.log('NAME_HUB', nameHub); + const hub = E(E(namesByAddressAdmin).lookupAdmin(address)).readonly(); + return E(hub).lookup('depositFacet'); + }; + + const [contractKits, usdLemonsIssuer, usdLemonsBrand, ppDepositFacet] = await Promise.all([ + contractKitsP, + E(agoricNames).lookup('issuer', 'USD_LEMONS'), + E(agoricNames).lookup('brand', 'USD_LEMONS'), + getDepositFacet(PROVISIONING_POOL_ADDR), + ]); + + console.log('[CONTRACT_KITS]', contractKits); + console.log('[ISSUER]', usdLemonsIssuer); + + let usdLemonsMint; + for (const { publicFacet, creatorFacet: mint } of contractKits.values()) { + if (publicFacet === usdLemonsIssuer) { + usdLemonsMint = mint; + console.log('BINGO', mint) + break; + } + } + + console.log('Minting USD_LEMONS'); + const helloPayment = await E(usdLemonsMint).mintPayment(harden({ brand: usdLemonsBrand, value: 500000n })); + + console.log('Funding provision pool...'); + await E(ppDepositFacet).receive(helloPayment); + + console.log('Done.'); +}; + +depositUsdLemons; diff --git a/packages/builders/scripts/testing/add-USD-LEMONS.js b/packages/builders/scripts/testing/add-USD-LEMONS.js new file mode 100644 index 00000000000..89afc1279cb --- /dev/null +++ b/packages/builders/scripts/testing/add-USD-LEMONS.js @@ -0,0 +1,19 @@ +import { makeHelpers } from '@agoric/deploy-script-support'; +import { psmProposalBuilder } from '../inter-protocol/add-collateral-core.js'; + +const addUsdLemonsProposalBuilder = async powers => { + return psmProposalBuilder(powers, { + anchorOptions: { + denom: 'ibc/000C0AAAEECAFE000', + keyword: 'USD_LEMONS', + decimalPlaces: 6, + proposedName: 'USD_LEMONS', + } + }); +}; + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ +export default async (homeP, endowments) => { + const { writeCoreEval } = await makeHelpers(homeP, endowments); + await writeCoreEval('add-LEMONS-PSM', addUsdLemonsProposalBuilder); + }; \ No newline at end of file From bf6c1ffa75885fc1d2a7901b2f36977544aaf476 Mon Sep 17 00:00:00 2001 From: anilhelvaci Date: Thu, 7 Nov 2024 11:29:24 +0300 Subject: [PATCH 116/174] chore(pp-upgrade): test functionality after provisionPool and bank upgrade Refs: https://github.com/Agoric/agoric-sdk/issues/10395 fix: format fixes --- .../proposals/p:upgrade-19/.gitignore | 1 + .../depositUSD-LEMONS/deposit-usd-lemons.js | 32 ++- .../proposals/p:upgrade-19/package.json | 1 + .../p:upgrade-19/provisionPool.test.js | 129 +++++++++ .../proposals/p:upgrade-19/test-lib/errors.js | 20 ++ .../p:upgrade-19/test-lib/sync-tools.js | 272 ++++++++++++++++++ .../proposals/p:upgrade-19/test.sh | 2 + golang/cosmos/app/upgrade.go | 38 +-- .../scripts/testing/add-USD-LEMONS.js | 22 +- 9 files changed, 472 insertions(+), 45 deletions(-) create mode 100644 a3p-integration/proposals/p:upgrade-19/provisionPool.test.js create mode 100644 a3p-integration/proposals/p:upgrade-19/test-lib/errors.js create mode 100644 a3p-integration/proposals/p:upgrade-19/test-lib/sync-tools.js diff --git a/a3p-integration/proposals/p:upgrade-19/.gitignore b/a3p-integration/proposals/p:upgrade-19/.gitignore index 17bb7d663e2..d348dadf7d9 100644 --- a/a3p-integration/proposals/p:upgrade-19/.gitignore +++ b/a3p-integration/proposals/p:upgrade-19/.gitignore @@ -1,2 +1,3 @@ replaceFeeDistributor/ testUpgradedBoard/ +addUsdLemons/ diff --git a/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js b/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js index 2d9a6f0650f..4a4a3c0313c 100644 --- a/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js +++ b/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js @@ -1,29 +1,29 @@ +/* eslint-disable no-undef */ const PROVISIONING_POOL_ADDR = 'agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346'; const depositUsdLemons = async powers => { const { - consume: { contractKits: contractKitsP, namesByAddressAdmin: namesByAddressAdminP , agoricNames }, - // instance: { consume: { ['psm-IST-USD_LEMONS']: usdLemonsPsmInstanceP }} + consume: { + contractKits: contractKitsP, + namesByAddressAdmin: namesByAddressAdminP, + agoricNames, + }, } = powers; const namesByAddressAdmin = await namesByAddressAdminP; const getDepositFacet = async address => { - const admin = await E(namesByAddressAdmin).lookupAdmin(address); - console.log('ADMIN', admin) - - const nameHub = await E(admin).readonly(); - console.log('NAME_HUB', nameHub); const hub = E(E(namesByAddressAdmin).lookupAdmin(address)).readonly(); return E(hub).lookup('depositFacet'); }; - const [contractKits, usdLemonsIssuer, usdLemonsBrand, ppDepositFacet] = await Promise.all([ - contractKitsP, - E(agoricNames).lookup('issuer', 'USD_LEMONS'), - E(agoricNames).lookup('brand', 'USD_LEMONS'), - getDepositFacet(PROVISIONING_POOL_ADDR), - ]); + const [contractKits, usdLemonsIssuer, usdLemonsBrand, ppDepositFacet] = + await Promise.all([ + contractKitsP, + E(agoricNames).lookup('issuer', 'USD_LEMONS'), + E(agoricNames).lookup('brand', 'USD_LEMONS'), + getDepositFacet(PROVISIONING_POOL_ADDR), + ]); console.log('[CONTRACT_KITS]', contractKits); console.log('[ISSUER]', usdLemonsIssuer); @@ -32,13 +32,15 @@ const depositUsdLemons = async powers => { for (const { publicFacet, creatorFacet: mint } of contractKits.values()) { if (publicFacet === usdLemonsIssuer) { usdLemonsMint = mint; - console.log('BINGO', mint) + console.log('BINGO', mint); break; } } console.log('Minting USD_LEMONS'); - const helloPayment = await E(usdLemonsMint).mintPayment(harden({ brand: usdLemonsBrand, value: 500000n })); + const helloPayment = await E(usdLemonsMint).mintPayment( + harden({ brand: usdLemonsBrand, value: 500000n }), + ); console.log('Funding provision pool...'); await E(ppDepositFacet).receive(helloPayment); diff --git a/a3p-integration/proposals/p:upgrade-19/package.json b/a3p-integration/proposals/p:upgrade-19/package.json index f3b062f3c76..9a18e4f658c 100644 --- a/a3p-integration/proposals/p:upgrade-19/package.json +++ b/a3p-integration/proposals/p:upgrade-19/package.json @@ -3,6 +3,7 @@ "type": "/agoric.swingset.CoreEvalProposal", "sdk-generate": [ "testing/replace-feeDistributor-short.js replaceFeeDistributor", + "testing/add-USD-LEMONS.js addUsdLemons", "vats/upgrade-paRegistry.js", "vats/upgrade-board.js", "testing/test-upgraded-board.js testUpgradedBoard" diff --git a/a3p-integration/proposals/p:upgrade-19/provisionPool.test.js b/a3p-integration/proposals/p:upgrade-19/provisionPool.test.js new file mode 100644 index 00000000000..df8511305d9 --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/provisionPool.test.js @@ -0,0 +1,129 @@ +/* eslint-env node */ +/** + * @file The goal of this file is to make sure v28-provisionPool and v14-bank can be successfully + * upgraded. These vats are related because of the issues below; + * - https://github.com/Agoric/agoric-sdk/issues/8722 + * - https://github.com/Agoric/agoric-sdk/issues/8724 + * + * The test scenario is as follows; + * - Prerequisite: provisionPool and bank are already upgraded. See `upgrade.go` + * 1. Add a new account and successfully provision it + * - Observe new account's address under `published.wallet.${address}` + * 2. Send some USDC_axl to provisionPoolAddress and observe its IST balances increases accordingly + * 3. Introduce a new asset to the chain and start a PSM instance for the new asset + * 3a. Deposit some of that asset to provisionPoolAddress + * 3b. Observe provisionPoolAddress' IST balance increase by the amount deposited in step 3a + */ + +import '@endo/init'; +import test from 'ava'; +import { execFileSync } from 'node:child_process'; +import { + addUser, + makeAgd, + evalBundles, + agd as agdAmbient, + agoric, + bankSend, + getISTBalance, +} from '@agoric/synthetic-chain'; +import { NonNullish } from './test-lib/errors.js'; +import { + retryUntilCondition, + waitUntilAccountFunded, + waitUntilContractDeployed, +} from './test-lib/sync-tools.js'; + +const PROVISIONING_POOL_ADDR = 'agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346'; + +const ADD_PSM_DIR = 'addUsdLemons'; +const DEPOSIT_USD_LEMONS_DIR = 'depositUSD-LEMONS'; + +const USDC_DENOM = NonNullish(process.env.USDC_DENOM); + +const agd = makeAgd({ execFileSync }).withOpts({ keyringBackend: 'test' }); + +const ambientAuthority = { + query: agdAmbient.query, + follow: agoric.follow, + setTimeout, +}; + +const provision = (name, address) => + agd.tx(['swingset', 'provision-one', name, address, 'SMART_WALLET'], { + chainId: 'agoriclocal', + from: 'validator', + yes: true, + }); + +const introduceAndProvision = async name => { + const address = await addUser(name); + console.log('ADDR', name, address); + + const provisionP = provision(name, address); + + return { provisionP, address }; +}; + +const getProvisionedAddresses = async () => { + const { children } = await agd.query([ + 'vstorage', + 'children', + 'published.wallet', + ]); + return children; +}; + +const checkUserProvisioned = addr => + retryUntilCondition( + getProvisionedAddresses, + children => children.includes(addr), + 'Account not provisioned', + { maxRetries: 5, retryIntervalMs: 1000, log: console.log, setTimeout }, + ); + +test(`upgrade provision pool`, async t => { + // Introduce new user then provision + const { address } = await introduceAndProvision('provisionTester'); + await checkUserProvisioned(address); + + // Send USDC_axl to pp + const istBalanceBefore = await getISTBalance(PROVISIONING_POOL_ADDR); + await bankSend(PROVISIONING_POOL_ADDR, `500000${USDC_DENOM}`); + + // Check IST balance + await waitUntilAccountFunded( + PROVISIONING_POOL_ADDR, + ambientAuthority, + { denom: 'uist', value: istBalanceBefore + 500000 }, + { errorMessage: 'Provision pool not able to swap USDC_axl for IST.' }, + ); + + // Introduce USD_LEMONS + await evalBundles(ADD_PSM_DIR); + await waitUntilContractDeployed('psm-IST-USD_LEMONS', ambientAuthority, { + errorMessage: 'psm-IST-USD_LEMONS instance not observed.', + }); + + // Provision the provisionPoolAddress. This is a workaround of provisionPoolAddress + // not having a depositFacet published to namesByAddress. Shouldn't be a problem since + // vat-bank keeps track of virtual purses per address basis. We need there to be + // depositFacet for provisionPoolAddress since we'll fund it with USD_LEMONS + await provision('provisionPoolAddress', PROVISIONING_POOL_ADDR); + await checkUserProvisioned(PROVISIONING_POOL_ADDR); + + // Send USD_LEMONS to provisionPoolAddress + const istBalanceBeforeLemonsSent = await getISTBalance( + PROVISIONING_POOL_ADDR, + ); + await evalBundles(DEPOSIT_USD_LEMONS_DIR); + + // Check balance again + await waitUntilAccountFunded( + PROVISIONING_POOL_ADDR, + ambientAuthority, + { denom: 'uist', value: istBalanceBeforeLemonsSent + 500000 }, + { errorMessage: 'Provision pool not bale swap USDC_axl for IST.' }, + ); + t.pass(); +}); diff --git a/a3p-integration/proposals/p:upgrade-19/test-lib/errors.js b/a3p-integration/proposals/p:upgrade-19/test-lib/errors.js new file mode 100644 index 00000000000..57dc771e6a5 --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/test-lib/errors.js @@ -0,0 +1,20 @@ +/** + * @file Copied from "@agoric/internal" + */ + +import { q } from '@endo/errors'; + +/** + * @template T + * @param {T | null | undefined} val + * @param {string} [optDetails] + * @returns {T} + */ +export const NonNullish = (val, optDetails = `unexpected ${q(val)}`) => { + if (val != null) { + // This `!= null` idiom checks that `val` is neither `null` nor `undefined`. + return val; + } + assert.fail(optDetails); +}; +harden(NonNullish); diff --git a/a3p-integration/proposals/p:upgrade-19/test-lib/sync-tools.js b/a3p-integration/proposals/p:upgrade-19/test-lib/sync-tools.js new file mode 100644 index 00000000000..dac2ba7e04f --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/test-lib/sync-tools.js @@ -0,0 +1,272 @@ +/* eslint-env node */ + +/** + * @file The purpose of this file is to bring together a set of tools that + * developers can use to synchronize operations they carry out in their tests. + * + * These operations include; + * - Making sure a core-eval resulted in successfully deploying a contract + * - Making sure a core-eval successfully sent zoe invitations to committee members for governance + * - Making sure an account is successfully funded with vbank assets like IST, BLD etc. + * - operation: query dest account's balance + * - condition: dest account has a balance >= sent token + * - Making sure an offer resulted successfully + * + */ + +/** + * @typedef {object} RetryOptions + * @property {number} [maxRetries] + * @property {number} [retryIntervalMs] + * @property {(...arg0: string[]) => void} [log] + * @property {(callback: Function, delay: number) => void} [setTimeout] + * + * @typedef {RetryOptions & {errorMessage: string}} WaitUntilOptions + * + * @typedef {object} CosmosBalanceThreshold + * @property {string} denom + * @property {number} value + */ + +const ambientSetTimeout = global.setTimeout; + +/** + * From https://github.com/Agoric/agoric-sdk/blob/442f07c8f0af03281b52b90e90c27131eef6f331/multichain-testing/tools/sleep.ts#L10 + * + * @param {number} ms + * @param {*} sleepOptions + */ +export const sleep = (ms, { log = () => {}, setTimeout = ambientSetTimeout }) => + new Promise(resolve => { + log(`Sleeping for ${ms}ms...`); + setTimeout(resolve, ms); + }); + +/** + * From https://github.com/Agoric/agoric-sdk/blob/442f07c8f0af03281b52b90e90c27131eef6f331/multichain-testing/tools/sleep.ts#L24 + * + * @param {() => Promise} operation + * @param {(result: any) => boolean} condition + * @param {string} message + * @param {RetryOptions} options + */ +export const retryUntilCondition = async ( + operation, + condition, + message, + { maxRetries = 6, retryIntervalMs = 3500, log = console.log, setTimeout }, +) => { + console.log({ maxRetries, retryIntervalMs, message }); + let retries = 0; + + while (retries < maxRetries) { + try { + const result = await operation(); + log('RESULT', result); + if (condition(result)) { + return result; + } + } catch (error) { + if (error instanceof Error) { + log(`Error: ${error.message}`); + } else { + log(`Unknown error: ${String(error)}`); + } + } + + retries += 1; + console.log( + `Retry ${retries}/${maxRetries} - Waiting for ${retryIntervalMs}ms for ${message}...`, + ); + await sleep(retryIntervalMs, { log, setTimeout }); + } + + throw Error(`${message} condition failed after ${maxRetries} retries.`); +}; + +/** + * @param {WaitUntilOptions} options + */ +const overrideDefaultOptions = options => { + const defaultValues = { + maxRetries: 6, + retryIntervalMs: 3500, + log: console.log, + errorMessage: 'Error', + }; + + return { ...defaultValues, ...options }; +}; + +/// ////////// Making sure a core-eval resulted successfully deploying a contract ///////////// + +const makeGetInstances = follow => async () => { + const instanceEntries = await follow( + '-lF', + `:published.agoricNames.instance`, + ); + + return Object.fromEntries(instanceEntries); +}; + +/** + * + * @param {string} contractName + * @param {{follow: () => object, setTimeout: (object) => void}} ambientAuthority + * @param {WaitUntilOptions} options + */ +export const waitUntilContractDeployed = ( + contractName, + ambientAuthority, + options, +) => { + const { follow, setTimeout } = ambientAuthority; + const getInstances = makeGetInstances(follow); + const { maxRetries, retryIntervalMs, errorMessage, log } = + overrideDefaultOptions(options); + + return retryUntilCondition( + getInstances, + instanceObject => Object.keys(instanceObject).includes(contractName), + errorMessage, + { maxRetries, retryIntervalMs, log, setTimeout }, + ); +}; + +/// ////////// Making sure an account is successfully funded with vbank assets like IST, BLD etc. /////////////// + +const makeQueryCosmosBalance = queryCb => async dest => { + const coins = await queryCb('bank', 'balances', dest); + return coins.balances; +}; + +/** + * + * @param {Array} balances + * @param {CosmosBalanceThreshold} threshold + * @returns {boolean} + */ +const checkCosmosBalance = (balances, threshold) => { + const balance = [...balances].find(({ denom }) => denom === threshold.denom); + return Number(balance.amount) >= threshold.value; +}; + +/** + * @param {string} destAcct + * @param {{query: () => Promise, setTimeout: (object) => void}} ambientAuthority + * @param {{denom: string, value: number}} threshold + * @param {WaitUntilOptions} options + */ +export const waitUntilAccountFunded = ( + destAcct, + ambientAuthority, + threshold, + options, +) => { + const { query, setTimeout } = ambientAuthority; + const queryCosmosBalance = makeQueryCosmosBalance(query); + const { maxRetries, retryIntervalMs, errorMessage, log } = + overrideDefaultOptions(options); + + return retryUntilCondition( + async () => queryCosmosBalance(destAcct), + balances => checkCosmosBalance(balances, threshold), + errorMessage, + { maxRetries, retryIntervalMs, log, setTimeout }, + ); +}; + +/// ////////// Making sure an offers get results ///////////// + +const makeQueryWallet = follow => async (/** @type {string} */ addr) => { + const update = await follow('-lF', `:published.wallet.${addr}`); + + return update; +}; + +/** + * + * @param {object} offerStatus + * @param {boolean} waitForPayouts + * @param {string} offerId + */ +const checkOfferState = (offerStatus, waitForPayouts, offerId) => { + const { updated, status } = offerStatus; + + if (updated !== 'offerStatus') return false; + if (!status) return false; + if (status.id !== offerId) return false; + if (!status.numWantsSatisfied || status.numWantsSatisfied !== 1) return false; + if (waitForPayouts && status.payouts) return true; + if (!waitForPayouts && status.result) return true; + + return false; +}; + +/** + * + * @param {string} addr + * @param {string} offerId + * @param {boolean} waitForPayouts + * @param {{follow: () => object, setTimeout: (callback: Function, delay: number) => void}} ambientAuthority + * @param {WaitUntilOptions} options + */ +export const waitUntilOfferResult = ( + addr, + offerId, + waitForPayouts, + ambientAuthority, + options, +) => { + const { follow, setTimeout } = ambientAuthority; + const queryWallet = makeQueryWallet(follow); + const { maxRetries, retryIntervalMs, errorMessage, log } = + overrideDefaultOptions(options); + + return retryUntilCondition( + async () => queryWallet(addr), + status => checkOfferState(status, waitForPayouts, offerId), + errorMessage, + { maxRetries, retryIntervalMs, log, setTimeout }, + ); +}; + +/// ////////// Making sure a core-eval successfully sent zoe invitations to committee members for governance ///////////// + +/** + * + * @param {{ updated: string, currentAmount: any }} update + * @returns {boolean} + */ +const checkForInvitation = update => { + const { updated, currentAmount } = update; + + if (updated !== 'balance') return false; + if (!currentAmount || !currentAmount.brand) return false; + + return currentAmount.brand.includes('Invitation'); +}; + +/** + * + * @param {string} addr + * @param {{follow: () => object, setTimeout: (object) => void}} ambientAuthority + * @param {WaitUntilOptions} options + */ +export const waitUntilInvitationReceived = ( + addr, + ambientAuthority, + options, +) => { + const { follow, setTimeout } = ambientAuthority; + const queryWallet = makeQueryWallet(follow); + const { maxRetries, retryIntervalMs, errorMessage, log } = + overrideDefaultOptions(options); + + return retryUntilCondition( + async () => queryWallet(addr), + checkForInvitation, + errorMessage, + { maxRetries, retryIntervalMs, log, setTimeout }, + ); +}; diff --git a/a3p-integration/proposals/p:upgrade-19/test.sh b/a3p-integration/proposals/p:upgrade-19/test.sh index 056fe6836ac..055727518f8 100644 --- a/a3p-integration/proposals/p:upgrade-19/test.sh +++ b/a3p-integration/proposals/p:upgrade-19/test.sh @@ -2,3 +2,5 @@ yarn ava replaceFeeDistributor.test.js yarn ava upgradedBoard.test.js + +yarn ava provisionPool.test.js diff --git a/golang/cosmos/app/upgrade.go b/golang/cosmos/app/upgrade.go index 9f81d6bb0ca..2858370cf05 100644 --- a/golang/cosmos/app/upgrade.go +++ b/golang/cosmos/app/upgrade.go @@ -212,27 +212,27 @@ func unreleasedUpgradeHandler(app *GaiaApp, targetUpgrade string) func(sdk.Conte // Upgrade to include a cleanup from https://github.com/Agoric/agoric-sdk/pull/10319 "@agoric/builders/scripts/smart-wallet/build-wallet-factory2-upgrade.js", ), - vm.CoreProposalStepForModules( - "@agoric/builders/scripts/vats/upgrade-provisionPool.js", - ), - vm.CoreProposalStepForModules( - "@agoric/builders/scripts/vats/upgrade-bank.js", - ), ) - // // CoreProposals for Upgrade 19. These should not be introduced - // // before upgrade 18 is done because they would be run in n:upgrade-next - // CoreProposalSteps = append(CoreProposalSteps, - // vm.CoreProposalStepForModules( - // "@agoric/builders/scripts/inter-protocol/replace-feeDistributor.js", - // ), - // vm.CoreProposalStepForModules( - // "@agoric/builders/scripts/vats/upgrade-paRegistry.js", - // ), - // vm.CoreProposalStepForModules( - // "@agoric/builders/scripts/vats/upgrade-board.js", - // ), - // ) + // CoreProposals for Upgrade 19. These should not be introduced + // before upgrade 18 is done because they would be run in n:upgrade-next + // CoreProposalSteps = append(CoreProposalSteps, + // vm.CoreProposalStepForModules( + // "@agoric/builders/scripts/inter-protocol/replace-feeDistributor.js", + // ), + // vm.CoreProposalStepForModules( + // "@agoric/builders/scripts/vats/upgrade-paRegistry.js", + // ), + // vm.CoreProposalStepForModules( + // "@agoric/builders/scripts/vats/upgrade-board.js", + // ), + // vm.CoreProposalStepForModules( + // "@agoric/builders/scripts/vats/upgrade-provisionPool.js", + // ), + // vm.CoreProposalStepForModules( + // "@agoric/builders/scripts/vats/upgrade-bank.js", + // ), + // ) } app.upgradeDetails = &upgradeDetails{ diff --git a/packages/builders/scripts/testing/add-USD-LEMONS.js b/packages/builders/scripts/testing/add-USD-LEMONS.js index 89afc1279cb..ed548b5561c 100644 --- a/packages/builders/scripts/testing/add-USD-LEMONS.js +++ b/packages/builders/scripts/testing/add-USD-LEMONS.js @@ -2,18 +2,18 @@ import { makeHelpers } from '@agoric/deploy-script-support'; import { psmProposalBuilder } from '../inter-protocol/add-collateral-core.js'; const addUsdLemonsProposalBuilder = async powers => { - return psmProposalBuilder(powers, { - anchorOptions: { - denom: 'ibc/000C0AAAEECAFE000', - keyword: 'USD_LEMONS', - decimalPlaces: 6, - proposedName: 'USD_LEMONS', - } - }); + return psmProposalBuilder(powers, { + anchorOptions: { + denom: 'ibc/000C0AAAEECAFE000', + keyword: 'USD_LEMONS', + decimalPlaces: 6, + proposedName: 'USD_LEMONS', + }, + }); }; /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ export default async (homeP, endowments) => { - const { writeCoreEval } = await makeHelpers(homeP, endowments); - await writeCoreEval('add-LEMONS-PSM', addUsdLemonsProposalBuilder); - }; \ No newline at end of file + const { writeCoreEval } = await makeHelpers(homeP, endowments); + await writeCoreEval('add-LEMONS-PSM', addUsdLemonsProposalBuilder); +}; From 164151ecf34ae08b217817e970da1c8d64f763cb Mon Sep 17 00:00:00 2001 From: anilhelvaci Date: Mon, 25 Nov 2024 23:31:46 +0300 Subject: [PATCH 117/174] chore: make provisionBridgeHandler durable Make sure the handler returned from E(creatorFacet).makeHandler() is durable and provisionPool is upgradable multiple times. Refs: #10425 Refs: #10564 fix: remove unnecessary comment chore: get rid of ephemera, address change requests Refs: #10395 Refs: #10425 fix: drop trace chore: address change requests fix: rebase fixes fix: yarn.lock fix fix: bring back missing upgrade-paRegistry proposal --- .../proposals/p:upgrade-19/.gitignore | 1 + .../depositUSD-LEMONS/deposit-usd-lemons.js | 1 + .../nullUpgradePP/null-upgrade-pp-permit.json | 7 + .../nullUpgradePP/null-upgrade-pp.js | 38 +++ .../proposals/p:upgrade-19/package.json | 2 + .../p:upgrade-19/provisionPool.test.js | 215 +++++++++----- .../proposals/p:upgrade-19/test-lib/errors.js | 20 -- .../test-lib/provision-helpers.js | 56 ++++ .../p:upgrade-19/test-lib/sync-tools.js | 272 ------------------ .../proposals/p:upgrade-19/tsconfig.json | 7 +- .../proposals/p:upgrade-19/yarn.lock | 53 +++- .../proposals/z:acceptance/yarn.lock | 1 + packages/inter-protocol/package.json | 2 +- packages/inter-protocol/src/provisionPool.js | 12 +- .../inter-protocol/src/provisionPoolKit.js | 134 +++++---- .../inter-protocol/test/provisionPool.test.js | 16 +- .../upgrade-provisionPool-proposal.js | 15 +- 17 files changed, 398 insertions(+), 454 deletions(-) create mode 100644 a3p-integration/proposals/p:upgrade-19/nullUpgradePP/null-upgrade-pp-permit.json create mode 100644 a3p-integration/proposals/p:upgrade-19/nullUpgradePP/null-upgrade-pp.js delete mode 100644 a3p-integration/proposals/p:upgrade-19/test-lib/errors.js create mode 100644 a3p-integration/proposals/p:upgrade-19/test-lib/provision-helpers.js delete mode 100644 a3p-integration/proposals/p:upgrade-19/test-lib/sync-tools.js diff --git a/a3p-integration/proposals/p:upgrade-19/.gitignore b/a3p-integration/proposals/p:upgrade-19/.gitignore index d348dadf7d9..80f57c98cb2 100644 --- a/a3p-integration/proposals/p:upgrade-19/.gitignore +++ b/a3p-integration/proposals/p:upgrade-19/.gitignore @@ -1,3 +1,4 @@ replaceFeeDistributor/ testUpgradedBoard/ addUsdLemons/ +upgradeProvisionPool/ diff --git a/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js b/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js index 4a4a3c0313c..c7ee0db948f 100644 --- a/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js +++ b/a3p-integration/proposals/p:upgrade-19/depositUSD-LEMONS/deposit-usd-lemons.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable no-undef */ const PROVISIONING_POOL_ADDR = 'agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346'; diff --git a/a3p-integration/proposals/p:upgrade-19/nullUpgradePP/null-upgrade-pp-permit.json b/a3p-integration/proposals/p:upgrade-19/nullUpgradePP/null-upgrade-pp-permit.json new file mode 100644 index 00000000000..668a9c7f0d5 --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/nullUpgradePP/null-upgrade-pp-permit.json @@ -0,0 +1,7 @@ +{ + "consume": { + "provisionPoolStartResult": true, + "instancePrivateArgs": true, + "economicCommitteeCreatorFacet": true + } +} diff --git a/a3p-integration/proposals/p:upgrade-19/nullUpgradePP/null-upgrade-pp.js b/a3p-integration/proposals/p:upgrade-19/nullUpgradePP/null-upgrade-pp.js new file mode 100644 index 00000000000..be3fdc96b3d --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/nullUpgradePP/null-upgrade-pp.js @@ -0,0 +1,38 @@ +// @ts-nocheck +/* eslint-disable no-undef */ +const nullUpgradePP = async powers => { + const { + consume: { + provisionPoolStartResult: provisionPoolStartResultP, + instancePrivateArgs: instancePrivateArgsP, + economicCommitteeCreatorFacet, + }, + } = powers; + + console.log('awaiting powers'); + const { adminFacet, instance } = await provisionPoolStartResultP; + const instancePrivateArgs = await instancePrivateArgsP; + + console.log('get privateArgs'); + const privateArgs = instancePrivateArgs.get(instance); + const [poolBank, poserInvitation] = await Promise.all([ + privateArgs.poolBank, + E(economicCommitteeCreatorFacet).getPoserInvitation(), + ]); + + console.log('DEBUG', { + adminFacet, + instance, + privateArgs, + poserInvitation, + }); + + await E(adminFacet).restartContract({ + ...privateArgs, + poolBank, + initialPoserInvitation: poserInvitation, + }); + console.log('Done'); +}; + +nullUpgradePP; diff --git a/a3p-integration/proposals/p:upgrade-19/package.json b/a3p-integration/proposals/p:upgrade-19/package.json index 9a18e4f658c..6848af6d060 100644 --- a/a3p-integration/proposals/p:upgrade-19/package.json +++ b/a3p-integration/proposals/p:upgrade-19/package.json @@ -4,6 +4,7 @@ "sdk-generate": [ "testing/replace-feeDistributor-short.js replaceFeeDistributor", "testing/add-USD-LEMONS.js addUsdLemons", + "vats/upgrade-provisionPool.js upgradeProvisionPool", "vats/upgrade-paRegistry.js", "vats/upgrade-board.js", "testing/test-upgraded-board.js testUpgradedBoard" @@ -14,6 +15,7 @@ "dependencies": { "@agoric/client-utils": "0.1.1-dev-02c06c4.0", "@agoric/ertp": "dev", + "@agoric/internal": "dev", "@agoric/synthetic-chain": "^0.4.3", "@agoric/zoe": "dev", "@endo/errors": "1.2.7", diff --git a/a3p-integration/proposals/p:upgrade-19/provisionPool.test.js b/a3p-integration/proposals/p:upgrade-19/provisionPool.test.js index df8511305d9..12934603921 100644 --- a/a3p-integration/proposals/p:upgrade-19/provisionPool.test.js +++ b/a3p-integration/proposals/p:upgrade-19/provisionPool.test.js @@ -6,124 +6,181 @@ * - https://github.com/Agoric/agoric-sdk/issues/8724 * * The test scenario is as follows; - * - Prerequisite: provisionPool and bank are already upgraded. See `upgrade.go` - * 1. Add a new account and successfully provision it - * - Observe new account's address under `published.wallet.${address}` - * 2. Send some USDC_axl to provisionPoolAddress and observe its IST balances increases accordingly - * 3. Introduce a new asset to the chain and start a PSM instance for the new asset - * 3a. Deposit some of that asset to provisionPoolAddress - * 3b. Observe provisionPoolAddress' IST balance increase by the amount deposited in step 3a + * 1. Upgrade provisionPool. This upgrade overrides provisionWalletBridgerManager with a durable one + * 2. Add a new account and successfully provision it + * - Observe new account's address under `published.wallet.${address}` + * 3. Send some USDC_axl to provisionPoolAddress and observe its IST balances increases accordingly + * 4. Introduce a new asset to the chain and start a PSM instance for the new asset + * 4a. Deposit some of that asset to provisionPoolAddress + * 4b. Observe provisionPoolAddress' IST balance increase by the amount deposited in step 4a + * 5. Perform a null upgrade for provisionPool. This upgrade does NOT override provisionWalletBridgerManager + * - The goal here is to allow testing the bridgeHandler from the first upgrade is in fact durable + * 6. Auto provision + * 6a. Introduce a new account + * 6b. Fund it with IST and ATOM to be able to open a vault + * 6c. Try to open a vault WITHOUT provisioning the newly introduced account + * 6d. Observe the new account's address under `published.wallet` + * 7. Same as step 2. Checks manual provision works after null upgrade */ import '@endo/init'; import test from 'ava'; -import { execFileSync } from 'node:child_process'; import { addUser, - makeAgd, evalBundles, agd as agdAmbient, agoric, - bankSend, getISTBalance, + getDetailsMatchingVats, + GOV1ADDR, + openVault, + ATOM_DENOM, } from '@agoric/synthetic-chain'; -import { NonNullish } from './test-lib/errors.js'; import { - retryUntilCondition, + makeVstorageKit, waitUntilAccountFunded, waitUntilContractDeployed, -} from './test-lib/sync-tools.js'; +} from '@agoric/client-utils'; +import { NonNullish } from '@agoric/internal'; +import { + bankSend, + checkUserProvisioned, + introduceAndProvision, + provision, +} from './test-lib/provision-helpers.js'; const PROVISIONING_POOL_ADDR = 'agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346'; const ADD_PSM_DIR = 'addUsdLemons'; const DEPOSIT_USD_LEMONS_DIR = 'depositUSD-LEMONS'; +const UPGRADE_PP_DIR = 'upgradeProvisionPool'; +const NULL_UPGRADE_PP_DIR = 'nullUpgradePP'; const USDC_DENOM = NonNullish(process.env.USDC_DENOM); -const agd = makeAgd({ execFileSync }).withOpts({ keyringBackend: 'test' }); - const ambientAuthority = { query: agdAmbient.query, follow: agoric.follow, setTimeout, + log: console.log, }; -const provision = (name, address) => - agd.tx(['swingset', 'provision-one', name, address, 'SMART_WALLET'], { - chainId: 'agoriclocal', - from: 'validator', - yes: true, - }); +test.before(async t => { + const vstorageKit = await makeVstorageKit( + { fetch }, + { rpcAddrs: ['http://localhost:26657'], chainName: 'agoriclocal' }, + ); -const introduceAndProvision = async name => { - const address = await addUser(name); - console.log('ADDR', name, address); + t.context = { + vstorageKit, + }; +}); - const provisionP = provision(name, address); +test.serial('upgrade provisionPool', async t => { + await evalBundles(UPGRADE_PP_DIR); - return { provisionP, address }; -}; + const vatDetailsAfter = await getDetailsMatchingVats('provisionPool'); + const { incarnation } = vatDetailsAfter.find(vat => + vat.vatName.endsWith('provisionPool'), + ); -const getProvisionedAddresses = async () => { - const { children } = await agd.query([ - 'vstorage', - 'children', - 'published.wallet', - ]); - return children; -}; + t.log(vatDetailsAfter); + t.is(incarnation, 1, 'incorrect incarnation'); + t.pass(); +}); -const checkUserProvisioned = addr => - retryUntilCondition( - getProvisionedAddresses, - children => children.includes(addr), - 'Account not provisioned', - { maxRetries: 5, retryIntervalMs: 1000, log: console.log, setTimeout }, - ); +test.serial( + `check provisionPool can recover purse and asset subscribers after upgrade`, + async t => { + // @ts-expect-error casting + const { vstorageKit } = t.context; + + // Introduce new user then provision + const { address } = await introduceAndProvision('provisionTester'); + await checkUserProvisioned(address, vstorageKit); + + // Send USDC_axl to pp + const istBalanceBefore = await getISTBalance(PROVISIONING_POOL_ADDR); + await bankSend(PROVISIONING_POOL_ADDR, `500000${USDC_DENOM}`); + + // Check IST balance + await waitUntilAccountFunded( + PROVISIONING_POOL_ADDR, + ambientAuthority, + { denom: 'uist', value: istBalanceBefore + 500000 }, + { errorMessage: 'Provision pool not able to swap USDC_axl for IST.' }, + ); + + // Introduce USD_LEMONS + await evalBundles(ADD_PSM_DIR); + await waitUntilContractDeployed('psm-IST-USD_LEMONS', ambientAuthority, { + errorMessage: 'psm-IST-USD_LEMONS instance not observed.', + }); + + // Provision the provisionPoolAddress. This is a workaround of provisionPoolAddress + // not having a depositFacet published to namesByAddress. Shouldn't be a problem since + // vat-bank keeps track of virtual purses per address basis. We need there to be + // depositFacet for provisionPoolAddress since we'll fund it with USD_LEMONS + await provision('provisionPoolAddress', PROVISIONING_POOL_ADDR); + await checkUserProvisioned(PROVISIONING_POOL_ADDR, vstorageKit); + + // Send USD_LEMONS to provisionPoolAddress + const istBalanceBeforeLemonsSent = await getISTBalance( + PROVISIONING_POOL_ADDR, + ); + await evalBundles(DEPOSIT_USD_LEMONS_DIR); + + // Check balance again + await waitUntilAccountFunded( + PROVISIONING_POOL_ADDR, + ambientAuthority, + { denom: 'uist', value: istBalanceBeforeLemonsSent + 500000 }, + { errorMessage: 'Provision pool not able to swap USDC_axl for IST.' }, + ); + t.pass(); + }, +); + +test.serial('null upgrade', async t => { + await evalBundles(NULL_UPGRADE_PP_DIR); + + const vatDetailsAfter = await getDetailsMatchingVats('provisionPool'); + const { incarnation } = vatDetailsAfter.find(vat => vat.vatID === 'v28'); // provisionPool is v28 + + t.log(vatDetailsAfter); + t.is(incarnation, 2, 'incorrect incarnation'); + t.pass(); +}); -test(`upgrade provision pool`, async t => { - // Introduce new user then provision - const { address } = await introduceAndProvision('provisionTester'); - await checkUserProvisioned(address); +test.serial('auto provision', async t => { + // @ts-expect-error casting + const { vstorageKit } = t.context; - // Send USDC_axl to pp - const istBalanceBefore = await getISTBalance(PROVISIONING_POOL_ADDR); - await bankSend(PROVISIONING_POOL_ADDR, `500000${USDC_DENOM}`); + const address = await addUser('automaticallyProvisioned'); + console.log('ADDR', 'automaticallyProvisioned', address); - // Check IST balance + await bankSend(address, `50000000${ATOM_DENOM}`); + // some ist is needed for opening a new vault + await bankSend(address, `10000000uist`, GOV1ADDR); await waitUntilAccountFunded( - PROVISIONING_POOL_ADDR, - ambientAuthority, - { denom: 'uist', value: istBalanceBefore + 500000 }, - { errorMessage: 'Provision pool not able to swap USDC_axl for IST.' }, + address, + // TODO: drop agd.query and switch to vstorgeKit + { log: console.log, setTimeout, query: agdAmbient.query }, + { denom: ATOM_DENOM, value: 50_000_000 }, + { errorMessage: `not able to fund ${address}` }, ); - // Introduce USD_LEMONS - await evalBundles(ADD_PSM_DIR); - await waitUntilContractDeployed('psm-IST-USD_LEMONS', ambientAuthority, { - errorMessage: 'psm-IST-USD_LEMONS instance not observed.', - }); - - // Provision the provisionPoolAddress. This is a workaround of provisionPoolAddress - // not having a depositFacet published to namesByAddress. Shouldn't be a problem since - // vat-bank keeps track of virtual purses per address basis. We need there to be - // depositFacet for provisionPoolAddress since we'll fund it with USD_LEMONS - await provision('provisionPoolAddress', PROVISIONING_POOL_ADDR); - await checkUserProvisioned(PROVISIONING_POOL_ADDR); - - // Send USD_LEMONS to provisionPoolAddress - const istBalanceBeforeLemonsSent = await getISTBalance( - PROVISIONING_POOL_ADDR, - ); - await evalBundles(DEPOSIT_USD_LEMONS_DIR); + await openVault(address, '10.0', '20.0'); + await checkUserProvisioned(address, vstorageKit); + t.pass(); +}); - // Check balance again - await waitUntilAccountFunded( - PROVISIONING_POOL_ADDR, - ambientAuthority, - { denom: 'uist', value: istBalanceBeforeLemonsSent + 500000 }, - { errorMessage: 'Provision pool not bale swap USDC_axl for IST.' }, - ); +test.serial('manual provision', async t => { + // @ts-expect-error casting + const { vstorageKit } = t.context; + + const { address } = await introduceAndProvision('manuallyProvisioned'); + await checkUserProvisioned(address, vstorageKit); + t.log('manuallyProvisioned address:', address); t.pass(); }); diff --git a/a3p-integration/proposals/p:upgrade-19/test-lib/errors.js b/a3p-integration/proposals/p:upgrade-19/test-lib/errors.js deleted file mode 100644 index 57dc771e6a5..00000000000 --- a/a3p-integration/proposals/p:upgrade-19/test-lib/errors.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @file Copied from "@agoric/internal" - */ - -import { q } from '@endo/errors'; - -/** - * @template T - * @param {T | null | undefined} val - * @param {string} [optDetails] - * @returns {T} - */ -export const NonNullish = (val, optDetails = `unexpected ${q(val)}`) => { - if (val != null) { - // This `!= null` idiom checks that `val` is neither `null` nor `undefined`. - return val; - } - assert.fail(optDetails); -}; -harden(NonNullish); diff --git a/a3p-integration/proposals/p:upgrade-19/test-lib/provision-helpers.js b/a3p-integration/proposals/p:upgrade-19/test-lib/provision-helpers.js new file mode 100644 index 00000000000..1a8eabee12c --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/test-lib/provision-helpers.js @@ -0,0 +1,56 @@ +/* eslint-env node */ +import { retryUntilCondition } from '@agoric/client-utils'; +import { + addUser, + CHAINID, + makeAgd, + VALIDATORADDR, +} from '@agoric/synthetic-chain'; +import { execFileSync } from 'node:child_process'; + +const agd = makeAgd({ execFileSync }).withOpts({ keyringBackend: 'test' }); + +/** + * @param {string} addr + * @param {string} wanted + * @param {string} [from] + */ +export const bankSend = (addr, wanted, from = VALIDATORADDR) => { + return agd.tx(['bank', 'send', from, addr, wanted], { + chainId: CHAINID, + from, + yes: true, + }); +}; + +export const provision = (name, address) => + agd.tx(['swingset', 'provision-one', name, address, 'SMART_WALLET'], { + chainId: 'agoriclocal', + from: 'validator', + yes: true, + }); + +export const introduceAndProvision = async name => { + const address = await addUser(name); + console.log('ADDR', name, address); + + const provisionP = provision(name, address); + + return { provisionP, address }; +}; + +/** + * @param {import('@agoric/client-utils').VstorageKit} vstorageKit + */ +export const getProvisionedAddresses = async vstorageKit => { + const children = await vstorageKit.vstorage.keys('published.wallet'); + return children; +}; + +export const checkUserProvisioned = (addr, vstorageKit) => + retryUntilCondition( + () => getProvisionedAddresses(vstorageKit), + children => children.includes(addr), + 'Account not provisioned', + { maxRetries: 5, retryIntervalMs: 1000, log: console.log, setTimeout }, + ); diff --git a/a3p-integration/proposals/p:upgrade-19/test-lib/sync-tools.js b/a3p-integration/proposals/p:upgrade-19/test-lib/sync-tools.js deleted file mode 100644 index dac2ba7e04f..00000000000 --- a/a3p-integration/proposals/p:upgrade-19/test-lib/sync-tools.js +++ /dev/null @@ -1,272 +0,0 @@ -/* eslint-env node */ - -/** - * @file The purpose of this file is to bring together a set of tools that - * developers can use to synchronize operations they carry out in their tests. - * - * These operations include; - * - Making sure a core-eval resulted in successfully deploying a contract - * - Making sure a core-eval successfully sent zoe invitations to committee members for governance - * - Making sure an account is successfully funded with vbank assets like IST, BLD etc. - * - operation: query dest account's balance - * - condition: dest account has a balance >= sent token - * - Making sure an offer resulted successfully - * - */ - -/** - * @typedef {object} RetryOptions - * @property {number} [maxRetries] - * @property {number} [retryIntervalMs] - * @property {(...arg0: string[]) => void} [log] - * @property {(callback: Function, delay: number) => void} [setTimeout] - * - * @typedef {RetryOptions & {errorMessage: string}} WaitUntilOptions - * - * @typedef {object} CosmosBalanceThreshold - * @property {string} denom - * @property {number} value - */ - -const ambientSetTimeout = global.setTimeout; - -/** - * From https://github.com/Agoric/agoric-sdk/blob/442f07c8f0af03281b52b90e90c27131eef6f331/multichain-testing/tools/sleep.ts#L10 - * - * @param {number} ms - * @param {*} sleepOptions - */ -export const sleep = (ms, { log = () => {}, setTimeout = ambientSetTimeout }) => - new Promise(resolve => { - log(`Sleeping for ${ms}ms...`); - setTimeout(resolve, ms); - }); - -/** - * From https://github.com/Agoric/agoric-sdk/blob/442f07c8f0af03281b52b90e90c27131eef6f331/multichain-testing/tools/sleep.ts#L24 - * - * @param {() => Promise} operation - * @param {(result: any) => boolean} condition - * @param {string} message - * @param {RetryOptions} options - */ -export const retryUntilCondition = async ( - operation, - condition, - message, - { maxRetries = 6, retryIntervalMs = 3500, log = console.log, setTimeout }, -) => { - console.log({ maxRetries, retryIntervalMs, message }); - let retries = 0; - - while (retries < maxRetries) { - try { - const result = await operation(); - log('RESULT', result); - if (condition(result)) { - return result; - } - } catch (error) { - if (error instanceof Error) { - log(`Error: ${error.message}`); - } else { - log(`Unknown error: ${String(error)}`); - } - } - - retries += 1; - console.log( - `Retry ${retries}/${maxRetries} - Waiting for ${retryIntervalMs}ms for ${message}...`, - ); - await sleep(retryIntervalMs, { log, setTimeout }); - } - - throw Error(`${message} condition failed after ${maxRetries} retries.`); -}; - -/** - * @param {WaitUntilOptions} options - */ -const overrideDefaultOptions = options => { - const defaultValues = { - maxRetries: 6, - retryIntervalMs: 3500, - log: console.log, - errorMessage: 'Error', - }; - - return { ...defaultValues, ...options }; -}; - -/// ////////// Making sure a core-eval resulted successfully deploying a contract ///////////// - -const makeGetInstances = follow => async () => { - const instanceEntries = await follow( - '-lF', - `:published.agoricNames.instance`, - ); - - return Object.fromEntries(instanceEntries); -}; - -/** - * - * @param {string} contractName - * @param {{follow: () => object, setTimeout: (object) => void}} ambientAuthority - * @param {WaitUntilOptions} options - */ -export const waitUntilContractDeployed = ( - contractName, - ambientAuthority, - options, -) => { - const { follow, setTimeout } = ambientAuthority; - const getInstances = makeGetInstances(follow); - const { maxRetries, retryIntervalMs, errorMessage, log } = - overrideDefaultOptions(options); - - return retryUntilCondition( - getInstances, - instanceObject => Object.keys(instanceObject).includes(contractName), - errorMessage, - { maxRetries, retryIntervalMs, log, setTimeout }, - ); -}; - -/// ////////// Making sure an account is successfully funded with vbank assets like IST, BLD etc. /////////////// - -const makeQueryCosmosBalance = queryCb => async dest => { - const coins = await queryCb('bank', 'balances', dest); - return coins.balances; -}; - -/** - * - * @param {Array} balances - * @param {CosmosBalanceThreshold} threshold - * @returns {boolean} - */ -const checkCosmosBalance = (balances, threshold) => { - const balance = [...balances].find(({ denom }) => denom === threshold.denom); - return Number(balance.amount) >= threshold.value; -}; - -/** - * @param {string} destAcct - * @param {{query: () => Promise, setTimeout: (object) => void}} ambientAuthority - * @param {{denom: string, value: number}} threshold - * @param {WaitUntilOptions} options - */ -export const waitUntilAccountFunded = ( - destAcct, - ambientAuthority, - threshold, - options, -) => { - const { query, setTimeout } = ambientAuthority; - const queryCosmosBalance = makeQueryCosmosBalance(query); - const { maxRetries, retryIntervalMs, errorMessage, log } = - overrideDefaultOptions(options); - - return retryUntilCondition( - async () => queryCosmosBalance(destAcct), - balances => checkCosmosBalance(balances, threshold), - errorMessage, - { maxRetries, retryIntervalMs, log, setTimeout }, - ); -}; - -/// ////////// Making sure an offers get results ///////////// - -const makeQueryWallet = follow => async (/** @type {string} */ addr) => { - const update = await follow('-lF', `:published.wallet.${addr}`); - - return update; -}; - -/** - * - * @param {object} offerStatus - * @param {boolean} waitForPayouts - * @param {string} offerId - */ -const checkOfferState = (offerStatus, waitForPayouts, offerId) => { - const { updated, status } = offerStatus; - - if (updated !== 'offerStatus') return false; - if (!status) return false; - if (status.id !== offerId) return false; - if (!status.numWantsSatisfied || status.numWantsSatisfied !== 1) return false; - if (waitForPayouts && status.payouts) return true; - if (!waitForPayouts && status.result) return true; - - return false; -}; - -/** - * - * @param {string} addr - * @param {string} offerId - * @param {boolean} waitForPayouts - * @param {{follow: () => object, setTimeout: (callback: Function, delay: number) => void}} ambientAuthority - * @param {WaitUntilOptions} options - */ -export const waitUntilOfferResult = ( - addr, - offerId, - waitForPayouts, - ambientAuthority, - options, -) => { - const { follow, setTimeout } = ambientAuthority; - const queryWallet = makeQueryWallet(follow); - const { maxRetries, retryIntervalMs, errorMessage, log } = - overrideDefaultOptions(options); - - return retryUntilCondition( - async () => queryWallet(addr), - status => checkOfferState(status, waitForPayouts, offerId), - errorMessage, - { maxRetries, retryIntervalMs, log, setTimeout }, - ); -}; - -/// ////////// Making sure a core-eval successfully sent zoe invitations to committee members for governance ///////////// - -/** - * - * @param {{ updated: string, currentAmount: any }} update - * @returns {boolean} - */ -const checkForInvitation = update => { - const { updated, currentAmount } = update; - - if (updated !== 'balance') return false; - if (!currentAmount || !currentAmount.brand) return false; - - return currentAmount.brand.includes('Invitation'); -}; - -/** - * - * @param {string} addr - * @param {{follow: () => object, setTimeout: (object) => void}} ambientAuthority - * @param {WaitUntilOptions} options - */ -export const waitUntilInvitationReceived = ( - addr, - ambientAuthority, - options, -) => { - const { follow, setTimeout } = ambientAuthority; - const queryWallet = makeQueryWallet(follow); - const { maxRetries, retryIntervalMs, errorMessage, log } = - overrideDefaultOptions(options); - - return retryUntilCondition( - async () => queryWallet(addr), - checkForInvitation, - errorMessage, - { maxRetries, retryIntervalMs, log, setTimeout }, - ); -}; diff --git a/a3p-integration/proposals/p:upgrade-19/tsconfig.json b/a3p-integration/proposals/p:upgrade-19/tsconfig.json index 960c1f4587a..23a6b14091b 100644 --- a/a3p-integration/proposals/p:upgrade-19/tsconfig.json +++ b/a3p-integration/proposals/p:upgrade-19/tsconfig.json @@ -11,5 +11,10 @@ "noImplicitThis": true, // XXX synthetic-chain has some errors "skipLibCheck": true - } + }, + "exclude": [ + "addUsdLemons/", + "replaceFeeDistributor/", + "upgradeProvisionPool/" + ] } diff --git a/a3p-integration/proposals/p:upgrade-19/yarn.lock b/a3p-integration/proposals/p:upgrade-19/yarn.lock index f74d4368e0e..e795ff2f376 100644 --- a/a3p-integration/proposals/p:upgrade-19/yarn.lock +++ b/a3p-integration/proposals/p:upgrade-19/yarn.lock @@ -31,6 +31,21 @@ __metadata: languageName: node linkType: hard +"@agoric/base-zone@npm:0.1.1-dev-1dd4589.0+1dd4589": + version: 0.1.1-dev-1dd4589.0 + resolution: "@agoric/base-zone@npm:0.1.1-dev-1dd4589.0" + dependencies: + "@agoric/store": "npm:0.9.3-dev-1dd4589.0+1dd4589" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/d0c214a7e69b427df1632d1ac10bc97f977823d723e4696ad8cf92a0eb9dd6297142ce4b98ae211c994547c43380c9a6487959a1719f7ee90fb128a00e5ff669 + languageName: node + linkType: hard + "@agoric/base-zone@npm:0.1.1-dev-3b799b8.0+3b799b8": version: 0.1.1-dev-3b799b8.0 resolution: "@agoric/base-zone@npm:0.1.1-dev-3b799b8.0" @@ -200,6 +215,26 @@ __metadata: languageName: node linkType: hard +"@agoric/internal@npm:dev": + version: 0.3.3-dev-1dd4589.0 + resolution: "@agoric/internal@npm:0.3.3-dev-1dd4589.0" + dependencies: + "@agoric/base-zone": "npm:0.1.1-dev-1dd4589.0+1dd4589" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + "@endo/stream": "npm:^1.2.8" + anylogger: "npm:^0.21.0" + jessie.js: "npm:^0.3.4" + checksum: 10c0/eb261f7bde265f168698c9da04af7458e2747fd54e945cdef82b822af5749e8a9443bb827bbace959269a04ae58d33c4ea465c31b580bf8d07b15fa87cb80ca3 + languageName: node + linkType: hard + "@agoric/kmarshal@npm:0.1.1-dev-02c06c4.0+02c06c4": version: 0.1.1-dev-02c06c4.0 resolution: "@agoric/kmarshal@npm:0.1.1-dev-02c06c4.0" @@ -305,6 +340,19 @@ __metadata: languageName: node linkType: hard +"@agoric/store@npm:0.9.3-dev-1dd4589.0+1dd4589": + version: 0.9.3-dev-1dd4589.0 + resolution: "@agoric/store@npm:0.9.3-dev-1dd4589.0" + dependencies: + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + checksum: 10c0/72d2c3ff3cb0d8b48f06146e4deb0967273e10a86ec7c01e7bc176c5e1ab31d016b909bde1230c8f031ba60552c31ee7d0eccb5791985fc12330fdb6dcda5edb + languageName: node + linkType: hard + "@agoric/store@npm:0.9.3-dev-3b799b8.0+3b799b8": version: 0.9.3-dev-3b799b8.0 resolution: "@agoric/store@npm:0.9.3-dev-3b799b8.0" @@ -1096,7 +1144,7 @@ __metadata: languageName: node linkType: hard -"@endo/exo@npm:^1.5.6": +"@endo/exo@npm:^1.5.6, @endo/exo@npm:^1.5.7": version: 1.5.7 resolution: "@endo/exo@npm:1.5.7" dependencies: @@ -1238,7 +1286,7 @@ __metadata: languageName: node linkType: hard -"@endo/stream@npm:^1.2.7": +"@endo/stream@npm:^1.2.7, @endo/stream@npm:^1.2.8": version: 1.2.8 resolution: "@endo/stream@npm:1.2.8" dependencies: @@ -5203,6 +5251,7 @@ __metadata: dependencies: "@agoric/client-utils": "npm:0.1.1-dev-02c06c4.0" "@agoric/ertp": "npm:dev" + "@agoric/internal": "npm:dev" "@agoric/synthetic-chain": "npm:^0.4.3" "@agoric/zoe": "npm:dev" "@endo/errors": "npm:1.2.7" diff --git a/a3p-integration/proposals/z:acceptance/yarn.lock b/a3p-integration/proposals/z:acceptance/yarn.lock index 92dc8a54bfe..d76e6d95485 100644 --- a/a3p-integration/proposals/z:acceptance/yarn.lock +++ b/a3p-integration/proposals/z:acceptance/yarn.lock @@ -156,6 +156,7 @@ __metadata: "@agoric/vat-data": "npm:^0.5.2" "@agoric/vats": "npm:^0.15.1" "@agoric/zoe": "npm:^0.26.2" + "@agoric/zone": "npm:^0.2.2" "@endo/captp": "npm:^4.4.3" "@endo/errors": "npm:^1.2.8" "@endo/eventual-send": "npm:^1.2.8" diff --git a/packages/inter-protocol/package.json b/packages/inter-protocol/package.json index 76f545f1e35..46f5336f45a 100644 --- a/packages/inter-protocol/package.json +++ b/packages/inter-protocol/package.json @@ -41,6 +41,7 @@ "@agoric/vat-data": "^0.5.2", "@agoric/vats": "^0.15.1", "@agoric/zoe": "^0.26.2", + "@agoric/zone": "^0.2.2", "@endo/captp": "^4.4.3", "@endo/eventual-send": "^1.2.8", "@endo/far": "^1.1.9", @@ -53,7 +54,6 @@ "@agoric/smart-wallet": "^0.5.3", "@agoric/swingset-liveslots": "^0.10.2", "@agoric/swingset-vat": "^0.32.2", - "@agoric/zone": "^0.2.2", "@endo/bundle-source": "^3.5.0", "@endo/init": "^1.1.7", "@endo/promise-kit": "^1.1.8", diff --git a/packages/inter-protocol/src/provisionPool.js b/packages/inter-protocol/src/provisionPool.js index 7eb37c61dd1..de96cfabaab 100644 --- a/packages/inter-protocol/src/provisionPool.js +++ b/packages/inter-protocol/src/provisionPool.js @@ -12,7 +12,11 @@ import { prepareExo } from '@agoric/vat-data'; import { provideSingleton } from '@agoric/zoe/src/contractSupport/durability.js'; import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport/recorder.js'; import { TopicsRecordShape } from '@agoric/zoe/src/contractSupport/topics.js'; -import { prepareProvisionPoolKit } from './provisionPoolKit.js'; +import { makeDurableZone } from '@agoric/zone/durable.js'; +import { + prepareBridgeProvisionTool, + prepareProvisionPoolKit, +} from './provisionPoolKit.js'; /** @import {Marshal} from '@endo/marshal'; */ @@ -72,11 +76,15 @@ export const start = async (zcf, privateArgs, baggage) => { privateArgs.marshaller, ); - const makeProvisionPoolKit = prepareProvisionPoolKit(baggage, { + const zone = makeDurableZone(baggage); + + const makeBridgeProvisionTool = prepareBridgeProvisionTool(zone); + const makeProvisionPoolKit = prepareProvisionPoolKit(zone, { makeRecorderKit, params, poolBank, zcf, + makeBridgeProvisionTool, }); const provisionPoolKit = await provideSingleton( diff --git a/packages/inter-protocol/src/provisionPoolKit.js b/packages/inter-protocol/src/provisionPoolKit.js index ee05ea5cc06..6c3694e6097 100644 --- a/packages/inter-protocol/src/provisionPoolKit.js +++ b/packages/inter-protocol/src/provisionPoolKit.js @@ -1,7 +1,6 @@ // @ts-check import { X, q, Fail } from '@endo/errors'; import { E } from '@endo/far'; -import { Far } from '@endo/marshal'; import { AmountMath, BrandShape } from '@agoric/ertp'; import { deeplyFulfilledObject, makeTracer } from '@agoric/internal'; @@ -15,7 +14,6 @@ import { M, makeScalarBigMapStore, makeScalarBigSetStore, - prepareExoClassKit, } from '@agoric/vat-data'; import { PowerFlags } from '@agoric/vats/src/walletFlags.js'; import { @@ -75,18 +73,22 @@ const FIRST_LOWER_NEAR_KEYWORD = /^[a-z][a-zA-Z0-9_$]*$/; * Given attenuated access to the funding purse, handle requests to provision * smart wallets. * - * @param {(depositBank: ERef) => Promise} sendInitialPayment - * @param {() => void} onProvisioned + * @param {import('@agoric/zone').Zone} zone */ -export const makeBridgeProvisionTool = (sendInitialPayment, onProvisioned) => { - /** @param {ProvisionPoolKitReferences} refs */ - const makeBridgeHandler = ({ - bankManager, - namesByAddressAdmin, - walletFactory, - }) => - Far('provisioningHandler', { - fromBridge: async obj => { +export const prepareBridgeProvisionTool = zone => + zone.exoClass( + 'smartWalletProvisioningHandler', + M.interface('ProvisionBridgeHandlerMaker', { + fromBridge: M.callWhen(M.record()).returns(), + }), + (bankManager, walletFactory, namesByAddressAdmin, forHandler) => ({ + bankManager, + walletFactory, + namesByAddressAdmin, + forHandler, + }), + { + async fromBridge(obj) { obj.type === 'PLEASE_PROVISION' || Fail`Unrecognized request ${obj.type}`; trace('PLEASE_PROVISION', obj); @@ -94,9 +96,12 @@ export const makeBridgeProvisionTool = (sendInitialPayment, onProvisioned) => { powerFlags.includes(PowerFlags.SMART_WALLET) || Fail`missing SMART_WALLET in powerFlags`; + const { bankManager, walletFactory, namesByAddressAdmin, forHandler } = + this.state; + const bank = E(bankManager).getBankForAddress(address); // only proceed if we can provide funds - await sendInitialPayment(bank); + await forHandler.sendInitialPayment(bank); const [_, created] = await E(walletFactory).provideSmartWallet( address, @@ -104,31 +109,30 @@ export const makeBridgeProvisionTool = (sendInitialPayment, onProvisioned) => { namesByAddressAdmin, ); if (created) { - onProvisioned(); + forHandler.onProvisioned(); } trace(created ? 'provisioned' : 're-provisioned', address); }, - }); - return makeBridgeHandler; -}; + }, + ); /** - * @param {import('@agoric/vat-data').Baggage} baggage + * @param {import('@agoric/zone').Zone} zone * @param {{ * makeRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').MakeRecorderKit; * params: any; * poolBank: import('@endo/far').ERef; * zcf: ZCF; + * makeBridgeProvisionTool: ReturnType; * }} powers */ export const prepareProvisionPoolKit = ( - baggage, - { makeRecorderKit, params, poolBank, zcf }, + zone, + { makeRecorderKit, params, poolBank, zcf, makeBridgeProvisionTool }, ) => { const zoe = zcf.getZoeService(); - const makeProvisionPoolKitInternal = prepareExoClassKit( - baggage, + const makeProvisionPoolKitInternal = zone.exoClassKit( 'ProvisionPoolKit', { machine: M.interface('ProvisionPoolKit machine', { @@ -151,6 +155,7 @@ export const prepareProvisionPoolKit = ( ackWallet: M.call(M.string()).returns(M.boolean()), }), helper: UnguardedHelperI, + forHandler: UnguardedHelperI, public: M.interface('ProvisionPoolKit public', { getPublicTopics: M.call().returns({ metrics: PublicTopicShape }), }), @@ -217,23 +222,24 @@ export const prepareProvisionPoolKit = ( const refs = await deeplyFulfilledObject(obj); Object.assign(this.state, refs); }, + /** @returns {import('@agoric/vats').BridgeHandler} */ makeHandler() { const { bankManager, namesByAddressAdmin, walletFactory } = this.state; if (!bankManager || !namesByAddressAdmin || !walletFactory) { throw Fail`must set references before handling requests`; } - const { helper } = this.facets; - // a bit obtuse but leave for backwards compatibility with tests - const innerMaker = makeBridgeProvisionTool( - bank => helper.sendInitialPayment(bank), - () => helper.onProvisioned(), - ); - return innerMaker({ + + const { forHandler } = this.facets; + + const provisionHandler = makeBridgeProvisionTool( bankManager, - namesByAddressAdmin, walletFactory, - }); + namesByAddressAdmin, + forHandler, + ); + + return provisionHandler; }, /** * @param {Brand} brand @@ -311,37 +317,6 @@ export const prepareProvisionPoolKit = ( ); facets.helper.publishMetrics(); }, - onProvisioned() { - const { state, facets } = this; - state.walletsProvisioned += 1n; - facets.helper.publishMetrics(); - }, - /** @param {ERef} destBank */ - async sendInitialPayment(destBank) { - const { - facets: { helper }, - state: { fundPurse, poolBrand }, - } = this; - const perAccountInitialAmount = /** @type {Amount<'nat'>} */ ( - params.getPerAccountInitialAmount() - ); - const initialPmt = await E(fundPurse).withdraw( - perAccountInitialAmount, - ); - - const destPurse = E(destBank).getPurse(poolBrand); - return E(destPurse) - .deposit(initialPmt) - .then(amt => { - helper.onSendFunds(perAccountInitialAmount); - trace('provisionPool sent', amt); - }) - .catch(reason => { - console.error(X`initial deposit failed: ${q(reason)}`); - void E(fundPurse).deposit(initialPmt); - throw reason; - }); - }, /** * @param {ERef} exchangePurse * @param {ERef} brand @@ -491,6 +466,39 @@ export const prepareProvisionPoolKit = ( return rxd; }, }, + forHandler: { + onProvisioned() { + const { state, facets } = this; + state.walletsProvisioned += 1n; + facets.helper.publishMetrics(); + }, + /** @param {ERef} destBank */ + async sendInitialPayment(destBank) { + const { + facets: { helper }, + state: { fundPurse, poolBrand }, + } = this; + const perAccountInitialAmount = /** @type {Amount<'nat'>} */ ( + params.getPerAccountInitialAmount() + ); + const initialPmt = await E(fundPurse).withdraw( + perAccountInitialAmount, + ); + + const destPurse = E(destBank).getPurse(poolBrand); + return E(destPurse) + .deposit(initialPmt) + .then(amt => { + helper.onSendFunds(perAccountInitialAmount); + trace('provisionPool sent', amt); + }) + .catch(reason => { + console.error(X`initial deposit failed: ${q(reason)}`); + void E(fundPurse).deposit(initialPmt); + throw reason; + }); + }, + }, public: { getPublicTopics() { return { diff --git a/packages/inter-protocol/test/provisionPool.test.js b/packages/inter-protocol/test/provisionPool.test.js index 48ea08f7312..e591643a927 100644 --- a/packages/inter-protocol/test/provisionPool.test.js +++ b/packages/inter-protocol/test/provisionPool.test.js @@ -19,7 +19,8 @@ import { makeFakeBoard } from '@agoric/vats/tools/board-utils.js'; import { makeRatio } from '@agoric/zoe/src/contractSupport/ratio.js'; import { E, Far } from '@endo/far'; import path from 'path'; -import { makeBridgeProvisionTool } from '../src/provisionPoolKit.js'; +import { makeHeapZone } from '@agoric/zone'; +import { prepareBridgeProvisionTool } from '../src/provisionPoolKit.js'; import { makeMockChainStorageRoot, setUpZoeForTest, @@ -364,15 +365,14 @@ test('makeBridgeProvisionTool handles duplicate requests', async t => { const { nameHub: namesByAddress, nameAdmin: namesByAddressAdmin } = makeNameHubKit(); const publishMetrics = () => {}; - const makeHandler = makeBridgeProvisionTool( - sendInitialPayment, - publishMetrics, - ); - const handler = makeHandler({ + const zone = makeHeapZone(); + const makeBridgeProvisionTool = prepareBridgeProvisionTool(zone); + const handler = makeBridgeProvisionTool( bankManager, - namesByAddressAdmin, walletFactory, - }); + namesByAddressAdmin, + Far('helpers', { sendInitialPayment, onProvisioned: publishMetrics }), + ); t.log('1st request to provision a SMART_WALLET for', address); await handler.fromBridge({ diff --git a/packages/vats/src/proposals/upgrade-provisionPool-proposal.js b/packages/vats/src/proposals/upgrade-provisionPool-proposal.js index 4dd74af9c69..a94fd6ef418 100644 --- a/packages/vats/src/proposals/upgrade-provisionPool-proposal.js +++ b/packages/vats/src/proposals/upgrade-provisionPool-proposal.js @@ -1,5 +1,8 @@ import { E } from '@endo/far'; import { deeplyFulfilled } from '@endo/marshal'; +import { makeTracer } from '@agoric/internal'; + +const tracer = makeTracer('UpgradeProvisionPool'); /** * @param {BootstrapPowers & { @@ -27,7 +30,7 @@ export const upgradeProvisionPool = async ( const { provisionPoolRef } = options.options; assert(provisionPoolRef.bundleID); - console.log(`PROVISION POOL BUNDLE ID: `, provisionPoolRef.bundleID); + tracer(`PROVISION POOL BUNDLE ID: `, provisionPoolRef); const [ provisionPoolStartResult, @@ -66,7 +69,7 @@ export const upgradeProvisionPool = async ( newPrivateArgs, ); - console.log('ProvisionPool upgraded: ', upgradeResult); + tracer('ProvisionPool upgraded: ', upgradeResult); const references = { bankManager, @@ -74,17 +77,17 @@ export const upgradeProvisionPool = async ( walletFactory: wfCreatorFacet, }; - console.log('Calling setReferences with: ', references); + tracer('Calling setReferences with: ', references); await E(ppCreatorFacet).setReferences(references); - console.log('Creating bridgeHandler...'); + tracer('Creating bridgeHandler...'); const bridgeHandler = await E(ppCreatorFacet).makeHandler(); - console.log('Setting new bridgeHandler...'); + tracer('Setting new bridgeHandler...'); // @ts-expect-error casting await E(provisionWalletBridgeManager).setHandler(bridgeHandler); - console.log('Done.'); + tracer('Done.'); }; export const getManifestForUpgradingProvisionPool = ( From 51e7a9c3e3fb2cde44db2ffce817f353a17e76a3 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Fri, 29 Nov 2024 16:38:20 -0500 Subject: [PATCH 118/174] feat: assetInfo as array of entries - to facililate registering the same denom across multiple chains in `ChainHub` - denoms are unique to a chain, but not all chains --- .../scripts/fast-usdc/init-fast-usdc.js | 28 ++++++++++------- packages/fast-usdc/src/fast-usdc.contract.js | 5 ++-- packages/fast-usdc/src/fast-usdc.start.js | 10 +++++-- packages/fast-usdc/test/supports.ts | 12 ++++---- .../src/examples/send-anywhere.contract.js | 2 +- .../src/proposals/start-send-anywhere.js | 2 +- .../src/utils/chain-hub-helper.js | 9 ++++-- .../orchestration/test/exos/chain-hub.test.ts | 30 +++++++++++-------- 8 files changed, 58 insertions(+), 40 deletions(-) diff --git a/packages/builders/scripts/fast-usdc/init-fast-usdc.js b/packages/builders/scripts/fast-usdc/init-fast-usdc.js index 783ce078f43..f5d38ebee82 100644 --- a/packages/builders/scripts/fast-usdc/init-fast-usdc.js +++ b/packages/builders/scripts/fast-usdc/init-fast-usdc.js @@ -20,31 +20,39 @@ import { parseArgs } from 'node:util'; * @import {ParseArgsConfig} from 'node:util' * @import {FastUSDCConfig} from '@agoric/fast-usdc/src/fast-usdc.start.js' * @import {Passable} from '@endo/marshal'; - * @import {CosmosChainInfo} from '@agoric/orchestration'; + * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration'; */ const { keys } = Object; -const defaultAssetInfo = { - uusdc: { - baseName: 'noble', - chainName: 'noble', - baseDenom: 'uusdc', - }, - [`ibc/${denomHash({ denom: 'uusdc', channelId: fetchedChainInfo.agoric.connections['noble-1'].transferChannel.channelId })}`]: +/** @type {[Denom, DenomDetail & { brandKey?: string}][]} */ +const defaultAssetInfo = [ + [ + 'uusdc', + { + baseName: 'noble', + chainName: 'noble', + baseDenom: 'uusdc', + }, + ], + [ + `ibc/${denomHash({ denom: 'uusdc', channelId: fetchedChainInfo.agoric.connections['noble-1'].transferChannel.channelId })}`, { baseName: 'noble', chainName: 'agoric', baseDenom: 'uusdc', brandKey: 'USDC', }, - [`ibc/${denomHash({ denom: 'uusdc', channelId: fetchedChainInfo.osmosis.connections['noble-1'].transferChannel.channelId })}`]: + ], + [ + `ibc/${denomHash({ denom: 'uusdc', channelId: fetchedChainInfo.osmosis.connections['noble-1'].transferChannel.channelId })}`, { baseName: 'noble', chainName: 'osmosis', baseDenom: 'uusdc', }, -}; + ], +]; /** * @type {Record>} diff --git a/packages/fast-usdc/src/fast-usdc.contract.js b/packages/fast-usdc/src/fast-usdc.contract.js index 45bf9cc82d5..aa799e101d2 100644 --- a/packages/fast-usdc/src/fast-usdc.contract.js +++ b/packages/fast-usdc/src/fast-usdc.contract.js @@ -4,6 +4,7 @@ import { observeIteration, subscribeEach } from '@agoric/notifier'; import { CosmosChainInfoShape, DenomDetailShape, + DenomShape, OrchestrationPowersShape, registerChainsAndAssets, withOrchestration, @@ -55,7 +56,7 @@ export const meta = { feeConfig: FeeConfigShape, marshaller: M.remotable(), chainInfo: M.recordOf(M.string(), CosmosChainInfoShape), - assetInfo: M.recordOf(M.string(), DenomDetailShape), + assetInfo: M.arrayOf([DenomShape, DenomDetailShape]), }, }; harden(meta); @@ -77,7 +78,7 @@ const publishFeeConfig = async (node, marshaller, feeConfig) => { * marshaller: Marshaller; * feeConfig: FeeConfig; * chainInfo: Record; - * assetInfo: Record; + * assetInfo: [Denom, DenomDetail & { brandKey?: string}][]; * }} privateArgs * @param {Zone} zone * @param {OrchestrationTools} tools diff --git a/packages/fast-usdc/src/fast-usdc.start.js b/packages/fast-usdc/src/fast-usdc.start.js index 0dce7f375e2..237af828f30 100644 --- a/packages/fast-usdc/src/fast-usdc.start.js +++ b/packages/fast-usdc/src/fast-usdc.start.js @@ -1,5 +1,9 @@ import { deeplyFulfilledObject, makeTracer, objectMap } from '@agoric/internal'; -import { CosmosChainInfoShape, DenomDetailShape } from '@agoric/orchestration'; +import { + CosmosChainInfoShape, + DenomDetailShape, + DenomShape, +} from '@agoric/orchestration'; import { Fail } from '@endo/errors'; import { E } from '@endo/far'; import { makeMarshal } from '@endo/marshal'; @@ -36,7 +40,7 @@ const contractName = 'fastUsdc'; * feeConfig: FeeConfig; * feedPolicy: FeedPolicy & Passable; * chainInfo: Record; - * assetInfo: Record; + * assetInfo: [Denom, DenomDetail & {brandKey?: string}][]; * }} FastUSDCConfig */ /** @type {TypedPattern} */ @@ -46,7 +50,7 @@ export const FastUSDCConfigShape = M.splitRecord({ feeConfig: FeeConfigShape, feedPolicy: FeedPolicyShape, chainInfo: M.recordOf(M.string(), CosmosChainInfoShape), - assetInfo: M.recordOf(M.string(), DenomDetailShape), + assetInfo: M.arrayOf([DenomShape, DenomDetailShape]), }); /** diff --git a/packages/fast-usdc/test/supports.ts b/packages/fast-usdc/test/supports.ts index 174a28ceed9..2c9154ab227 100644 --- a/packages/fast-usdc/test/supports.ts +++ b/packages/fast-usdc/test/supports.ts @@ -200,13 +200,11 @@ export const commonSetup = async (t: ExecutionContext) => { return { agoric, osmosis, noble }; })(); - const assetInfo = harden( - Object.fromEntries([ - assetOn('uusdc', 'noble'), - [uusdcOnAgoric, agUSDCDetail], - assetOn('uusdc', 'noble', 'osmosis', fetchedChainInfo), - ]), - ); + const assetInfo: [Denom, DenomDetail & { brandKey?: string }][] = harden([ + assetOn('uusdc', 'noble'), + [uusdcOnAgoric, agUSDCDetail], + assetOn('uusdc', 'noble', 'osmosis', fetchedChainInfo), + ]); return { bootstrap: { diff --git a/packages/orchestration/src/examples/send-anywhere.contract.js b/packages/orchestration/src/examples/send-anywhere.contract.js index 3d2065de836..b277d5733ad 100644 --- a/packages/orchestration/src/examples/send-anywhere.contract.js +++ b/packages/orchestration/src/examples/send-anywhere.contract.js @@ -30,7 +30,7 @@ harden(SingleNatAmountRecord); * @param {OrchestrationPowers & { * marshaller: Marshaller; * chainInfo?: Record; - * assetInfo?: Record; + * assetInfo?: [Denom, DenomDetail & { brandKey?: string }][]; * }} privateArgs * @param {Zone} zone * @param {OrchestrationTools} tools diff --git a/packages/orchestration/src/proposals/start-send-anywhere.js b/packages/orchestration/src/proposals/start-send-anywhere.js index a50d87f3f7f..6d1c6932bc1 100644 --- a/packages/orchestration/src/proposals/start-send-anywhere.js +++ b/packages/orchestration/src/proposals/start-send-anywhere.js @@ -28,7 +28,7 @@ const trace = makeTracer('StartSA', true); * @param {{ * options: { * chainInfo: Record; - * assetInfo: Record; + * assetInfo: [Denom, DenomDetail & { brandKey?: string }][]; * }; * }} config */ diff --git a/packages/orchestration/src/utils/chain-hub-helper.js b/packages/orchestration/src/utils/chain-hub-helper.js index 306a5ecef56..829d0b58a7e 100644 --- a/packages/orchestration/src/utils/chain-hub-helper.js +++ b/packages/orchestration/src/utils/chain-hub-helper.js @@ -12,7 +12,7 @@ * @param {ChainHub} chainHub * @param {Record>} brands * @param {Record | undefined} chainInfo - * @param {Record | undefined} assetInfo + * @param {[Denom, DenomDetail & { brandKey?: string }][] | undefined} assetInfo */ export const registerChainsAndAssets = ( chainHub, @@ -43,11 +43,14 @@ export const registerChainsAndAssets = ( } console.log('chainHub: registered connections', [...registeredPairs].sort()); - console.log('chainHub: registering assets', Object.keys(assetInfo || {})); + console.log( + 'chainHub: registering assets', + assetInfo?.map(([denom, { chainName }]) => `${chainName}: ${denom}`), + ); if (!assetInfo) { return; } - for (const [denom, info] of Object.entries(assetInfo)) { + for (const [denom, info] of assetInfo) { const { brandKey, ...rest } = info; const infoWithBrand = brandKey ? { ...rest, brand: brands[brandKey] } diff --git a/packages/orchestration/test/exos/chain-hub.test.ts b/packages/orchestration/test/exos/chain-hub.test.ts index b93e4e34464..53a12302491 100644 --- a/packages/orchestration/test/exos/chain-hub.test.ts +++ b/packages/orchestration/test/exos/chain-hub.test.ts @@ -216,7 +216,10 @@ test('makeTransferRoute - to issuing chain', async t => { chainHub, {}, withChainCapabilities(knownChains), // adds pfmEnabled - harden({ [uusdcOnAgoric]: agDetail, [uusdcOnOsmosis]: osDetail }), + harden([ + [uusdcOnAgoric, agDetail], + [uusdcOnOsmosis, osDetail], + ]), ); const dest: ChainAddress = chainHub.makeChainAddress('noble1234'); @@ -257,12 +260,7 @@ test('makeTransferRoute - from issuing chain', async t => { chainHub, {}, withChainCapabilities(knownChains), // adds pfmEnabled - harden( - Object.fromEntries([ - assetOn('uist', 'agoric'), - assetOn('uosmo', 'osmosis'), - ]), - ), + harden([assetOn('uist', 'agoric'), assetOn('uosmo', 'osmosis')]), ); const dest: ChainAddress = chainHub.makeChainAddress('noble1234'); @@ -301,7 +299,7 @@ test('makeTransferRoute - through issuing chain', async t => { chainHub, {}, withChainCapabilities(knownChains), // adds pfmEnabled - harden({ [uusdcOnAgoric]: agDetail }), + harden([[uusdcOnAgoric, agDetail]]), ); const dest: ChainAddress = chainHub.makeChainAddress('osmo1234'); @@ -359,7 +357,7 @@ test('makeTransferRoute - takes forwardOpts', t => { chainHub, {}, withChainCapabilities(knownChains), // adds pfmEnabled - harden({ [uusdcOnOsmosis]: osDetail }), + harden([[uusdcOnOsmosis, osDetail]]), ); const dest: ChainAddress = chainHub.makeChainAddress('agoric1234'); @@ -464,7 +462,10 @@ test('makeTransferRoute - no connection info single hop', t => { chainHub, {}, knownChainsSansConns, // omit connections - harden({ [uusdcOnAgoric]: agDetail }), + harden([ + [uusdcOnAgoric, agDetail], + [uusdcOnOsmosis, osDetail], + ]), ); t.throws( @@ -487,7 +488,10 @@ test('makeTransferRoute - no connection info multi hop', t => { chainHub, {}, harden(chainInfo), - harden({ [uusdcOnAgoric]: agDetail, [uusdcOnOsmosis]: osDetail }), + harden([ + [uusdcOnAgoric, agDetail], + [uusdcOnOsmosis, osDetail], + ]), ); const osmoDest = chainHub.makeChainAddress('osmo1234'); @@ -522,7 +526,7 @@ test('makeTransferRoute - asset not on holding chain', t => { chainHub, {}, withChainCapabilities(knownChains), - harden({ [uusdcOnAgoric]: agDetail }), + harden([[uusdcOnAgoric, agDetail]]), ); // transfer USDC on agoric from osmosis to noble (impossible) @@ -547,7 +551,7 @@ test('makeTransferRoute - no PFM path', t => { chainHub, {}, knownChains, // intentionally omit pfmEnabled - harden({ [uusdcOnAgoric]: agDetail }), + harden([[uusdcOnAgoric, agDetail]]), ); // transfer USDC on agoric to osmosis From fc802adc06082eb0618f4a2d58d91ac380512352 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Fri, 29 Nov 2024 14:47:23 -0500 Subject: [PATCH 119/174] feat!: `getAsset` and `getDenomInfo` require `srcChainName` param - since denoms are only unique to a chain and all chains, require `srcChainName` parameter for asset info lookups --- .../snapshots/fast-usdc.contract.test.ts.md | 14 ++--- .../snapshots/fast-usdc.contract.test.ts.snap | Bin 5637 -> 5637 bytes packages/orchestration/src/exos/chain-hub.js | 54 ++++++++++++------ .../src/exos/local-orchestration-account.js | 2 +- .../orchestration/src/exos/orchestrator.js | 6 +- .../orchestration/src/orchestration-api.ts | 1 + .../snapshots/staking-combinations.test.ts.md | 2 +- .../staking-combinations.test.ts.snap | Bin 2743 -> 2749 bytes .../orchestration/test/exos/chain-hub.test.ts | 21 +++---- .../test/facade-durability.test.ts | 26 ++++++--- packages/orchestration/test/supports.ts | 2 +- packages/orchestration/test/types.test-d.ts | 2 +- 12 files changed, 79 insertions(+), 51 deletions(-) diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md index 62804cfa992..ece2a6e83cd 100644 --- a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md +++ b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md @@ -536,22 +536,22 @@ Generated by [AVA](https://avajs.dev). }, }, denom: { - 'ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4': { - baseDenom: 'uusdc', - baseName: 'noble', - chainName: 'osmosis', - }, - 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9': { + 'agoric:ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9': { baseDenom: 'uusdc', baseName: 'noble', brand: Object @Alleged: USDC brand {}, chainName: 'agoric', }, - uusdc: { + 'noble:uusdc': { baseDenom: 'uusdc', baseName: 'noble', chainName: 'noble', }, + 'osmosis:ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4': { + baseDenom: 'uusdc', + baseName: 'noble', + chainName: 'osmosis', + }, }, lookupChainInfo_kindHandle: 'Alleged: kind', lookupChainsAndConnection_kindHandle: 'Alleged: kind', diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap index 084687b3bab0cbb2441b180c061d6ebbda934d4e..b4f6db225e5d35f97fc59405cd299d04a75b129f 100644 GIT binary patch literal 5637 zcmV+g7W(NyRzVnkETRNrq8)vqNHo@^1(b-U#6r5ZMIANT@~R9Oe`S(Up+^D( zYBUxxfJXC+rsjf^`l)Dq%q!;S!=ijRmJj#m!%y>JaREdM;LZYgx&USsg1r!S7sBa6 z!3TNiJ}9x2KUfHl6vAtTu(Akxi$E`eJBr|35j;@@`Nhy(EQl%=MKyf57(P}E=Zm4K z1pFoNPzk*L_W#yWxTzE#D}~}R2$aFiWpHO1e5nk6QwGj*=qZO&fY2 zRl;{Gp}GpTRHak%Zbh2VvxG^|&=MR9X)VcVmFrxdC(xrItv{^BbS(*}PqEXHf}A<6 zp}3VHUCY&i1sx-rLENpKiYUXwSuLwH3G-zMQa2h?0wl1p7*17h zOo?wx;<`(==W1v}Z%m1)x%9KrV)=y0vN?(EV?+yVRQlD(US&{?L=DteOsJX^szV8d zM57`$DI8=>~3_GNc;7CDr4=GJizTg6*oN z4;gJ+&27du+@qQnqDzMBGM3uAzPbykKjijs`Utmf!*0j5~y{##UX;Q|15QJPI zLv!CfQX<+SsuI&LVfT|ZZ|cQoQ%fwh|;fSjQH2I>CquQ+O*v)ylJchO`Uo; zyFflo=E|*lKnY(&~%8)xAnAFp&GqY22fq>e6CrL{q}iOPDEjhTh$=P&k^MlN_e;Zj6{a zCWL<_mb{&_Vc%>aeaRQnmqcq}OC+L1dxerfpbZh%jUut6zT{YeA7(g2o5 zSkwsX8=w@RTUz)PzDtMIrgW zXoNQ#!82bFbc3XCcs`sIVK+%`djEX5b3XiVJ~S>6;I~Lp`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sC3z_o=--DmzYXeTq)iuu~Njh0j2zZe4p5DIdAhhRv$;RXlWf!38zSf za4Sy9{UPH8I>k0Mo@Yrn?kzq&$-G|g_}|)7Y(CMvi_$B?N#0tS{z58{=ie7B9^|LQ z6Gr*Q50ij{FJ7MztrdMH>^ppgI0O&|F?+=Wzf4AF<+9 diff --git a/packages/orchestration/src/exos/chain-hub.js b/packages/orchestration/src/exos/chain-hub.js index f74d9eda964..6a300fade5a 100644 --- a/packages/orchestration/src/exos/chain-hub.js +++ b/packages/orchestration/src/exos/chain-hub.js @@ -205,7 +205,9 @@ const ChainHubI = M.interface('ChainHub', { getConnectionInfo: M.call(ChainIdArgShape, ChainIdArgShape).returns(VowShape), getChainsAndConnection: M.call(M.string(), M.string()).returns(VowShape), registerAsset: M.call(M.string(), DenomDetailShape).returns(), - getAsset: M.call(M.string()).returns(M.or(DenomDetailShape, M.undefined())), + getAsset: M.call(M.string(), M.string()).returns( + M.or(DenomDetailShape, M.undefined()), + ), getDenom: M.call(BrandShape).returns(M.or(M.string(), M.undefined())), makeChainAddress: M.call(M.string()).returns(ChainAddressShape), makeTransferRoute: M.call(ChainAddressShape, DenomAmountShape, M.string()) @@ -256,6 +258,12 @@ export const makeChainHub = (zone, agoricNames, vowTools) => { valueShape: M.string(), }); + /** + * @param {Denom} denom - from perspective of the src/holding chain + * @param {DenomDetail['chainName']} srcChainName + */ + const makeDenomKey = (denom, srcChainName) => `${srcChainName}:${denom}`; + const lookupChainInfo = vowTools.retryable( zone, 'lookupChainInfo', @@ -440,8 +448,14 @@ export const makeChainHub = (zone, agoricNames, vowTools) => { Fail`must register chain ${q(chainName)} first`; chainInfos.has(baseName) || Fail`must register chain ${q(baseName)} first`; - denomDetails.init(denom, detail); + + const denomKey = makeDenomKey(denom, detail.chainName); + denomDetails.has(denomKey) && + Fail`already registered ${q(denom)} on ${q(chainName)}`; + denomDetails.init(denomKey, detail); if (detail.brand) { + chainName === 'agoric' || + Fail`brands only registerable for agoric-held assets`; brandDenoms.init(detail.brand, denom); } }, @@ -449,11 +463,13 @@ export const makeChainHub = (zone, agoricNames, vowTools) => { * Retrieve holding, issuing chain names etc. for a denom. * * @param {Denom} denom + * @param {string} srcChainName - the chainName the denom is held on * @returns {DenomDetail | undefined} */ - getAsset(denom) { - if (denomDetails.has(denom)) { - return denomDetails.get(denom); + getAsset(denom, srcChainName) { + const denomKey = makeDenomKey(denom, srcChainName); + if (denomDetails.has(denomKey)) { + return denomDetails.get(denomKey); } return undefined; }, @@ -491,26 +507,31 @@ export const makeChainHub = (zone, agoricNames, vowTools) => { * Determine the transfer route for a destination and amount given the * current holding chain. * + * Does not account for routes with more than 1 intermediary hop - that is, + * it can't unwrap denoms that were incorrectly routed. + * * XXX consider accepting AmountArg #10449 * * @param {ChainAddress} destination * @param {DenomAmount} denomAmount - * @param {string} holdingChainName + * @param {string} srcChainName * @param {Pick} [forwardOpts] * @returns {TransferRoute} single hop, multi hop * @throws {Error} if unable to determine route */ - makeTransferRoute(destination, denomAmount, holdingChainName, forwardOpts) { - chainInfos.has(holdingChainName) || - Fail`chain info not found for holding chain: ${q(holdingChainName)}`; + makeTransferRoute(destination, denomAmount, srcChainName, forwardOpts) { + chainInfos.has(srcChainName) || + Fail`chain info not found for holding chain: ${q(srcChainName)}`; - const denomDetail = chainHub.getAsset(denomAmount.denom); + const denomDetail = chainHub.getAsset(denomAmount.denom, srcChainName); denomDetail || - Fail`no denom detail for: ${q(denomAmount.denom)}. ensure it is registered in chainHub.`; + Fail`no denom detail for: ${q(denomAmount.denom)} on ${q(srcChainName)}. ensure it is registered in chainHub.`; const { baseName, chainName } = /** @type {DenomDetail} */ (denomDetail); - chainName === holdingChainName || - Fail`cannot transfer asset ${q(denomAmount.denom)}. held on ${q(chainName)} not ${q(holdingChainName)}.`; + + // currently unreachable since assets are registered with holdingChainName + chainName === srcChainName || + Fail`cannot transfer asset ${q(denomAmount.denom)}. held on ${q(chainName)} not ${q(srcChainName)}.`; // currently unreachable since we can't register an asset before a chain chainInfos.has(baseName) || @@ -518,13 +539,10 @@ export const makeChainHub = (zone, agoricNames, vowTools) => { const { chainId: baseChainId, pfmEnabled } = chainInfos.get(baseName); - const holdingChainId = chainInfos.get(holdingChainName).chainId; + const holdingChainId = chainInfos.get(srcChainName).chainId; // asset is transferring to or from the issuing chain, return direct route - if ( - baseChainId === destination.chainId || - baseName === holdingChainName - ) { + if (baseChainId === destination.chainId || baseName === srcChainName) { // TODO use getConnectionInfo once its sync const connKey = connectionKey(holdingChainId, destination.chainId); connectionInfos.has(connKey) || diff --git a/packages/orchestration/src/exos/local-orchestration-account.js b/packages/orchestration/src/exos/local-orchestration-account.js index bc5e1f2a48a..7ab823a0719 100644 --- a/packages/orchestration/src/exos/local-orchestration-account.js +++ b/packages/orchestration/src/exos/local-orchestration-account.js @@ -511,7 +511,7 @@ export const prepareLocalOrchestrationAccountKit = ( return asVow(() => { const [brand, denom] = typeof denomArg === 'string' - ? [chainHub.getAsset(denomArg)?.brand, denomArg] + ? [chainHub.getAsset(denomArg, 'agoric')?.brand, denomArg] : [denomArg, chainHub.getDenom(denomArg)]; if (!denom) { diff --git a/packages/orchestration/src/exos/orchestrator.js b/packages/orchestration/src/exos/orchestrator.js index 70e02ee60e7..0d5dae350b8 100644 --- a/packages/orchestration/src/exos/orchestrator.js +++ b/packages/orchestration/src/exos/orchestrator.js @@ -34,7 +34,7 @@ const trace = makeTracer('Orchestrator'); /** @see {Orchestrator} */ export const OrchestratorI = M.interface('Orchestrator', { getChain: M.call(M.string()).returns(Vow$(ChainInfoShape)), - getDenomInfo: M.call(DenomShape).returns(DenomInfoShape), + getDenomInfo: M.call(DenomShape, M.string()).returns(DenomInfoShape), asAmount: M.call(DenomAmountShape).returns(AmountShape), }); @@ -138,8 +138,8 @@ const prepareOrchestratorKit = ( }); }, /** @type {HostOf} */ - getDenomInfo(denom) { - const denomDetail = chainHub.getAsset(denom); + getDenomInfo(denom, holdingChainName) { + const denomDetail = chainHub.getAsset(denom, holdingChainName); if (!denomDetail) throw Fail`No denom detail for ${q(denom)}`; const { chainName, baseName, baseDenom, brand } = denomDetail; chainByName.has(chainName) || diff --git a/packages/orchestration/src/orchestration-api.ts b/packages/orchestration/src/orchestration-api.ts index 50830862c05..2294f376dce 100644 --- a/packages/orchestration/src/orchestration-api.ts +++ b/packages/orchestration/src/orchestration-api.ts @@ -146,6 +146,7 @@ export interface Orchestrator { IssuingChain extends keyof KnownChains, >( denom: Denom, + srcChainName: HoldingChain, ) => DenomInfo; /** diff --git a/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.md b/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.md index bbf2ad9192b..378cdaddaf7 100644 --- a/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.md +++ b/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.md @@ -98,7 +98,7 @@ Generated by [AVA](https://avajs.dev). }, }, denom: { - ubld: { + 'agoric:ubld': { baseDenom: 'ubld', baseName: 'agoric', brand: Object @Alleged: BLD brand {}, diff --git a/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.snap b/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.snap index 01a323d924f17902e88e58d2a0c44d1e0f98fc89..89494e9934d40e5f508d23d3c19b809d99d905d1 100644 GIT binary patch literal 2749 zcmV;u3PSZkRzV zIU=KM;U9|#00000000B+T5W6`M;U(R?DO6E<38*=pFhs_*^c9n*v5A3ghZ`W$B7j~ zT$_9f6$pEK=`XptgS6oF`~(xN~`p{**Y6d|Na&`<%QQvXmY z5v4*^grYV=6$H`U^X=`58zbFRO-r@u_rLFoZ9Tq6$8k|A?RXX8{}m@ECyK0=Nd?KLA{q*A;PAR@W@k4;?1IxGYG@;atkH zyyvp0ilGUjVOd5!MN5OKiOWd*K~6f8-C&ee(nKodVqaZfL;Z> zR0UL31AW!NSE_;UR|CJP2Ci2F0WUMM9{0%lN!@*3VAczK!wdY%3taO8r~wi+z`ZrV z@fzS#4e)jiBjsbI0=+(9&<8C0fS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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/exos/chain-hub.test.ts b/packages/orchestration/test/exos/chain-hub.test.ts index 53a12302491..1a8efc8e762 100644 --- a/packages/orchestration/test/exos/chain-hub.test.ts +++ b/packages/orchestration/test/exos/chain-hub.test.ts @@ -86,28 +86,28 @@ test('denom info support via getAsset and getDenom', async t => { const denom = 'utok1'; const info1: CosmosChainInfo = { bech32Prefix: 'chain', - chainId: 'chain1', + chainId: 'agoric', stakingTokens: [{ denom }], }; const tok1 = withAmountUtils(makeIssuerKit('Tok1')); - chainHub.registerChain('chain1', info1); + chainHub.registerChain('agoric', info1); const info = { - chainName: 'chain1', - baseName: 'chain1', + chainName: 'agoric', + baseName: 'agoric', baseDenom: denom, brand: tok1.brand, }; chainHub.registerAsset('utok1', info); t.deepEqual( - chainHub.getAsset('utok1'), + chainHub.getAsset('utok1', 'agoric'), info, 'getAsset(denom) returns denom info', ); t.is( - chainHub.getAsset('utok404'), + chainHub.getAsset('utok404', 'agoric'), undefined, 'getAsset returns undefined when denom not registered', ); @@ -145,7 +145,7 @@ test('toward asset info in agoricNames (#9572)', async t => { registerAssets(chainHub, 'cosmoshub', details); { - const actual = chainHub.getAsset('uatom'); + const actual = chainHub.getAsset('uatom', 'cosmoshub'); t.deepEqual(actual, { chainName: 'cosmoshub', baseName: 'cosmoshub', @@ -156,6 +156,7 @@ test('toward asset info in agoricNames (#9572)', async t => { { const actual = chainHub.getAsset( 'ibc/F04D72CF9B5D9C849BB278B691CDFA2241813327430EC9CDC83F8F4CA4CDC2B0', + 'cosmoshub', ); t.deepEqual(actual, { chainName: 'cosmoshub', @@ -432,7 +433,7 @@ test('makeTransferRoute - no asset info', t => { ), { message: - 'no denom detail for: "uist". ensure it is registered in chainHub.', + 'no denom detail for: "uist" on "agoric". ensure it is registered in chainHub.', }, ); @@ -445,7 +446,7 @@ test('makeTransferRoute - no asset info', t => { ), { message: - 'no denom detail for: "ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9". ensure it is registered in chainHub.', + 'no denom detail for: "ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9" on "agoric". ensure it is registered in chainHub.', }, ); }); @@ -539,7 +540,7 @@ test('makeTransferRoute - asset not on holding chain', t => { ), { message: - 'cannot transfer asset "ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9". held on "agoric" not "osmosis".', + 'no denom detail for: "ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9" on "osmosis". ensure it is registered in chainHub.', }, ); }); diff --git a/packages/orchestration/test/facade-durability.test.ts b/packages/orchestration/test/facade-durability.test.ts index e6c3a4fe9ac..dff35064c26 100644 --- a/packages/orchestration/test/facade-durability.test.ts +++ b/packages/orchestration/test/facade-durability.test.ts @@ -184,7 +184,7 @@ test('asset / denom info', async t => { const { chainHub, orchestrate } = orchKit; chainHub.registerChain('agoric', fetchedChainInfo.agoric); - chainHub.registerChain(mockChainInfo.chainId, mockChainInfo); + chainHub.registerChain('mock', mockChainInfo); chainHub.registerConnection( 'agoric-3', mockChainInfo.chainId, @@ -192,8 +192,8 @@ test('asset / denom info', async t => { ); chainHub.registerAsset('utoken1', { - chainName: mockChainInfo.chainId, - baseName: mockChainInfo.chainId, + chainName: 'mock', + baseName: 'mock', baseDenom: 'utoken1', }); @@ -203,7 +203,7 @@ test('asset / denom info', async t => { t.log(`utoken1 over ${channelId}: ${agDenom}`); chainHub.registerAsset(agDenom, { chainName: 'agoric', - baseName: mockChainInfo.chainId, + baseName: 'mock', baseDenom: 'utoken1', brand, }); @@ -213,10 +213,14 @@ test('asset / denom info', async t => { { brand }, // eslint-disable-next-line no-shadow async (orc, { brand }) => { - const c1 = await orc.getChain(mockChainInfo.chainId); + const c1 = await orc.getChain('mock'); { - const actual = orc.getDenomInfo('utoken1'); + const actual = orc.getDenomInfo( + 'utoken1', + // @ts-expect-error 'mock' not a KnownChain + 'mock', + ); console.log('actual', actual); const info = await actual.chain.getChainInfo(); t.deepEqual(info, mockChainInfo); @@ -230,12 +234,12 @@ test('asset / denom info', async t => { } const agP = orc.getChain('agoric'); - t.throws(() => orc.getDenomInfo(agDenom), { + t.throws(() => orc.getDenomInfo(agDenom, 'agoric'), { message: /^wait until getChain\("agoric"\) completes/, }); const ag = await agP; { - const actual = orc.getDenomInfo(agDenom); + const actual = orc.getDenomInfo(agDenom, 'agoric'); t.deepEqual(actual, { chain: ag, @@ -258,7 +262,11 @@ test('asset / denom info', async t => { }); const missingGetChain = orchestrate('missing getChain', {}, async orc => { - const actual = orc.getDenomInfo('utoken2'); + const actual = orc.getDenomInfo( + 'utoken2', + // @ts-expect-error 'mock' not a KnownChain + 'anotherChain', + ); }); await t.throwsAsync(vt.when(missingGetChain()), { diff --git a/packages/orchestration/test/supports.ts b/packages/orchestration/test/supports.ts index dbf539c0919..6486a7ffbaa 100644 --- a/packages/orchestration/test/supports.ts +++ b/packages/orchestration/test/supports.ts @@ -174,7 +174,7 @@ export const commonSetup = async (t: ExecutionContext) => { * ChainHub. Use `ChainHubAdmin` instead. */ const registerAgoricBld = () => { - if (!chainHub.getAsset('ubld')) { + if (!chainHub.getAsset('ubld', 'agoric')) { chainHub.registerChain('agoric', fetchedChainInfo.agoric); chainHub.registerAsset('ubld', { chainName: 'agoric', diff --git a/packages/orchestration/test/types.test-d.ts b/packages/orchestration/test/types.test-d.ts index a889ca536e6..0b13a42fc19 100644 --- a/packages/orchestration/test/types.test-d.ts +++ b/packages/orchestration/test/types.test-d.ts @@ -110,7 +110,7 @@ expectNotType(chainAddr); expectNotType<() => Promise>(vowFn); const getDenomInfo: HostOf = null as any; - const chainHostOf = getDenomInfo('uatom').chain; + const chainHostOf = getDenomInfo('uatom', 'cosmoshub').chain; expectType>(chainHostOf.getChainInfo()); } From 50b36bad0ae62cbd9205532ebf5bb637bc06beed Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Fri, 29 Nov 2024 16:49:53 -0500 Subject: [PATCH 120/174] feat: multichain-testing `makeAssetInfo` helper --- multichain-testing/test/send-anywhere.test.ts | 35 +--- multichain-testing/test/support.ts | 7 + .../test/tools/asset-info.test.ts | 167 ++++++++++++++++++ multichain-testing/tools/asset-info.ts | 76 ++++++++ 4 files changed, 254 insertions(+), 31 deletions(-) create mode 100644 multichain-testing/test/tools/asset-info.test.ts create mode 100644 multichain-testing/tools/asset-info.ts diff --git a/multichain-testing/test/send-anywhere.test.ts b/multichain-testing/test/send-anywhere.test.ts index 376853600f0..ba74b23338a 100644 --- a/multichain-testing/test/send-anywhere.test.ts +++ b/multichain-testing/test/send-anywhere.test.ts @@ -10,8 +10,6 @@ import { createWallet } from '../tools/wallet.js'; import { AmountMath } from '@agoric/ertp'; import { makeQueryClient } from '../tools/query.js'; import type { Amount } from '@agoric/ertp/src/types.js'; -import chainInfo from '../starship-chain-info.js'; -import { denomHash, withChainCapabilities } from '@agoric/orchestration'; const test = anyTest as TestFn; @@ -22,39 +20,14 @@ const contractBuilder = '../packages/builders/scripts/testing/init-send-anywhere.js'; test.before(async t => { - const { deleteTestKeys, setupTestKeys, ...rest } = await commonSetup(t); + const { setupTestKeys, ...common } = await commonSetup(t); + const { assetInfo, chainInfo, deleteTestKeys, startContract } = common; deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); - t.context = { ...rest, wallets, deleteTestKeys }; - const { startContract } = rest; - - const assetInfo = { - uosmo: { - baseName: 'osmosis', - chainName: 'osmosis', - baseDenom: 'uosmo', - }, - [`ibc/${denomHash({ denom: 'uosmo', channelId: chainInfo.agoric.connections['osmosislocal'].transferChannel.channelId })}`]: - { - baseName: 'osmosis', - chainName: 'agoric', - baseDenom: 'uosmo', - }, - uatom: { - baseName: 'cosmoshub', - chainName: 'cosmoshub', - baseDenom: 'uatom', - }, - [`ibc/${denomHash({ denom: 'uatom', channelId: chainInfo.agoric.connections['gaialocal'].transferChannel.channelId })}`]: - { - baseName: 'cosmoshub', - chainName: 'agoric', - baseDenom: 'uatom', - }, - }; + t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, { - chainInfo: JSON.stringify(withChainCapabilities(chainInfo)), + chainInfo: JSON.stringify(chainInfo), assetInfo: JSON.stringify(assetInfo), }); }); diff --git a/multichain-testing/test/support.ts b/multichain-testing/test/support.ts index f98b5a13f08..aef2bfab173 100644 --- a/multichain-testing/test/support.ts +++ b/multichain-testing/test/support.ts @@ -3,6 +3,7 @@ import { dirname, join } from 'path'; import { execa } from 'execa'; import fse from 'fs-extra'; import childProcess from 'node:child_process'; +import { withChainCapabilities } from '@agoric/orchestration'; import { makeAgdTools } from '../tools/agd-tools.js'; import { type E2ETools } from '../tools/e2e-tools.js'; import { @@ -15,6 +16,8 @@ import { makeRetryUntilCondition } from '../tools/sleep.js'; import { makeDeployBuilder } from '../tools/deploy.js'; import { makeHermes } from '../tools/hermes-tools.js'; import { makeNobleTools } from '../tools/noble-tools.js'; +import { makeAssetInfo } from '../tools/asset-info.js'; +import starshipChainInfo from '../starship-chain-info.js'; export const FAUCET_POUR = 10_000n * 1_000_000n; @@ -78,6 +81,8 @@ export const commonSetup = async (t: ExecutionContext) => { }); const hermes = makeHermes(childProcess); const nobleTools = makeNobleTools(childProcess); + const assetInfo = makeAssetInfo(starshipChainInfo); + const chainInfo = withChainCapabilities(starshipChainInfo); /** * Starts a contract if instance not found. Takes care of installing @@ -116,6 +121,8 @@ export const commonSetup = async (t: ExecutionContext) => { hermes, nobleTools, startContract, + assetInfo, + chainInfo, }; }; diff --git a/multichain-testing/test/tools/asset-info.test.ts b/multichain-testing/test/tools/asset-info.test.ts new file mode 100644 index 00000000000..f12748de7fd --- /dev/null +++ b/multichain-testing/test/tools/asset-info.test.ts @@ -0,0 +1,167 @@ +import test from '@endo/ses-ava/prepare-endo.js'; +import type { Denom, DenomDetail } from '@agoric/orchestration'; +import { makeAssetInfo } from '../../tools/asset-info.js'; + +const minChainInfo = { + agoric: { + chainId: 'agoriclocal', + connections: { + gaialocal: { + transferChannel: { + channelId: 'channel-1', + }, + }, + osmosislocal: { + transferChannel: { + channelId: 'channel-0', + }, + }, + }, + }, + cosmoshub: { + chainId: 'gaialocal', + connections: { + agoriclocal: { + transferChannel: { + channelId: 'channel-1', + }, + }, + osmosislocal: { + transferChannel: { + channelId: 'channel-0', + }, + }, + }, + }, + osmosis: { + chainId: 'osmosislocal', + connections: { + agoriclocal: { + transferChannel: { + channelId: 'channel-1', + }, + }, + gaialocal: { + transferChannel: { + channelId: 'channel-0', + }, + }, + }, + }, +}; + +const minTokenMap = { + agoric: ['ubld', 'uist'], + cosmoshub: ['uatom'], + osmosis: ['uosmo'], +}; + +test('makeAssetInfo', async t => { + const byDenom = (assetInfo: [Denom, DenomDetail][]) => + assetInfo.sort(([a], [b]) => a.localeCompare(b) * -1); + + const assetInfo = makeAssetInfo( + /** @ts-expect-error minified mock */ + minChainInfo, + minTokenMap, + ); + + t.deepEqual(byDenom([...assetInfo]), [ + [ + 'uosmo', + { + baseDenom: 'uosmo', + baseName: 'osmosis', + chainName: 'osmosis', + }, + ], + [ + 'uist', + { + baseDenom: 'uist', + baseName: 'agoric', + chainName: 'agoric', + }, + ], + [ + 'ubld', + { + baseDenom: 'ubld', + baseName: 'agoric', + chainName: 'agoric', + }, + ], + [ + 'uatom', + { + baseDenom: 'uatom', + baseName: 'cosmoshub', + chainName: 'cosmoshub', + }, + ], + [ + 'ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518', + { + baseDenom: 'uosmo', + baseName: 'osmosis', + chainName: 'agoric', + }, + ], + [ + 'ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518', + { + baseDenom: 'uosmo', + baseName: 'osmosis', + chainName: 'cosmoshub', + }, + ], + [ + 'ibc/E7827844CB818EE9C4DB2C159F1543FF62B26213B44CE8029D5CEFE52F0EE596', + { + baseDenom: 'ubld', + baseName: 'agoric', + chainName: 'cosmoshub', + }, + ], + [ + 'ibc/E7827844CB818EE9C4DB2C159F1543FF62B26213B44CE8029D5CEFE52F0EE596', + { + baseDenom: 'ubld', + baseName: 'agoric', + chainName: 'osmosis', + }, + ], + [ + 'ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9', + { + baseDenom: 'uatom', + baseName: 'cosmoshub', + chainName: 'agoric', + }, + ], + [ + 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2', + { + baseDenom: 'uatom', + baseName: 'cosmoshub', + chainName: 'osmosis', + }, + ], + [ + 'ibc/16CD81E12F05F5397CA2D580B4BA786A12A8F48B6FB3823D82EBE95D80B5287B', + { + baseDenom: 'uist', + baseName: 'agoric', + chainName: 'cosmoshub', + }, + ], + [ + 'ibc/16CD81E12F05F5397CA2D580B4BA786A12A8F48B6FB3823D82EBE95D80B5287B', + { + baseDenom: 'uist', + baseName: 'agoric', + chainName: 'osmosis', + }, + ], + ]); +}); diff --git a/multichain-testing/tools/asset-info.ts b/multichain-testing/tools/asset-info.ts new file mode 100644 index 00000000000..34c7d536b8c --- /dev/null +++ b/multichain-testing/tools/asset-info.ts @@ -0,0 +1,76 @@ +import { + denomHash, + type CosmosChainInfo, + type Denom, + type DenomDetail, +} from '@agoric/orchestration'; +import type { IBCChannelID } from '@agoric/vats'; + +/** make asset info for current env */ +export const makeAssetInfo = ( + chainInfo: Record, + tokenMap: Record = { + agoric: ['ubld', 'uist'], + cosmoshub: ['uatom'], + noble: ['uusdc'], + osmosis: ['uosmo', 'uion'], + }, +): [Denom, DenomDetail][] => { + const getChannelId = ( + issuingChainId: string, + holdingChainName: string, + ): IBCChannelID | undefined => + chainInfo[holdingChainName]?.connections?.[issuingChainId]?.transferChannel + .channelId; + + const toDenomHash = ( + denom: Denom, + issuingChainId: string, + holdingChainName: string, + ): Denom => { + const channelId = getChannelId(issuingChainId, holdingChainName); + if (!channelId) { + throw new Error( + `No channel found for ${issuingChainId} -> ${holdingChainName}`, + ); + } + return `ibc/${denomHash({ denom, channelId })}`; + }; + + // only include chains present in `chainInfo` + const tokens = Object.entries(tokenMap) + .filter(([chain]) => chain in chainInfo) + .flatMap(([chain, denoms]) => denoms.map(denom => ({ denom, chain }))); + + const assetInfo: [Denom, DenomDetail][] = []; + for (const { denom, chain } of tokens) { + const baseDetails = { + baseName: chain, + baseDenom: denom, + }; + + // Add native token entry + assetInfo.push([ + denom, + { + ...baseDetails, + chainName: chain, + }, + ]); + + // Add IBC entries for non-issuing chains + const issuingChainId = chainInfo[chain].chainId; + for (const holdingChain of Object.keys(chainInfo)) { + if (holdingChain === chain) continue; + assetInfo.push([ + toDenomHash(denom, issuingChainId, holdingChain), + { + ...baseDetails, + chainName: holdingChain, + }, + ]); + } + } + + return harden(assetInfo); +}; From 5912769ceca9bf97cc0fbf9f83c8e8290f1a4a61 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 2 Dec 2024 16:09:56 -0500 Subject: [PATCH 121/174] chore(z:acceptance): skip "user can open a vault under debt limit" - filed #10599 after observing multiple flakes from unrelated changes --- a3p-integration/proposals/z:acceptance/vaults.test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/a3p-integration/proposals/z:acceptance/vaults.test.js b/a3p-integration/proposals/z:acceptance/vaults.test.js index 7f3b818549d..bb8d9a40cb5 100644 --- a/a3p-integration/proposals/z:acceptance/vaults.test.js +++ b/a3p-integration/proposals/z:acceptance/vaults.test.js @@ -226,7 +226,8 @@ test.serial('user cannot open a vault above debt limit', async t => { ); }); -test.serial('user can open a vault under debt limit', async t => { +// TODO #10599. marked as `skip` since several flakes were observed +test.skip('user can open a vault under debt limit', async t => { const istBalanceBefore = await getISTBalance(GOV1ADDR); const activeVaultsBefore = await listVaults(GOV1ADDR, walletUtils); From 9df7f9bd0665facb84a40f3506cf565f8d7d4607 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 2 Dec 2024 13:05:48 -0800 Subject: [PATCH 122/174] chore: rm spurious option --- 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 e304d6993d9..90ffb0627be 100755 --- a/packages/orchestration/scripts/fetch-chain-info.ts +++ b/packages/orchestration/scripts/fetch-chain-info.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env TS_BLANK_SPACE_EMIT=false node --import ts-blank-space/register +#!/usr/bin/env 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 9872ca55a3605a8e9a5a2fcf125794d7c4faa45d Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 2 Dec 2024 13:13:57 -0800 Subject: [PATCH 123/174] build: use .ts for compat with ts-blank-space --- .../proposals/z:acceptance/lib/{vaults.mts => vaults.ts} | 0 .../scripts/{test-vaults.mts => test-vaults.ts} | 2 +- a3p-integration/proposals/z:acceptance/test.sh | 3 +-- a3p-integration/proposals/z:acceptance/tsconfig.json | 7 ++++++- scripts/{report-globals.mts => report-globals.ts} | 1 + 5 files changed, 9 insertions(+), 4 deletions(-) rename a3p-integration/proposals/z:acceptance/lib/{vaults.mts => vaults.ts} (100%) rename a3p-integration/proposals/z:acceptance/scripts/{test-vaults.mts => test-vaults.ts} (98%) rename scripts/{report-globals.mts => report-globals.ts} (98%) diff --git a/a3p-integration/proposals/z:acceptance/lib/vaults.mts b/a3p-integration/proposals/z:acceptance/lib/vaults.ts similarity index 100% rename from a3p-integration/proposals/z:acceptance/lib/vaults.mts rename to a3p-integration/proposals/z:acceptance/lib/vaults.ts diff --git a/a3p-integration/proposals/z:acceptance/scripts/test-vaults.mts b/a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts similarity index 98% rename from a3p-integration/proposals/z:acceptance/scripts/test-vaults.mts rename to a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts index 7fdbcef510a..2a5cbb51124 100755 --- a/a3p-integration/proposals/z:acceptance/scripts/test-vaults.mts +++ b/a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts @@ -13,7 +13,7 @@ import { ISTunit, provisionWallet, setDebtLimit, -} from '../lib/vaults.mjs'; +} from '../lib/vaults.ts'; const START_FREQUENCY = 600; // StartFrequency: 600s (auction runs every 10m) const CLOCK_STEP = 20; // ClockStep: 20s (ensures auction completes in time) diff --git a/a3p-integration/proposals/z:acceptance/test.sh b/a3p-integration/proposals/z:acceptance/test.sh index 906bb57262e..a029b8d6e8a 100755 --- a/a3p-integration/proposals/z:acceptance/test.sh +++ b/a3p-integration/proposals/z:acceptance/test.sh @@ -10,8 +10,7 @@ yarn ava initial.test.js # XXX some of these tests have path dependencies so no globs yarn ava core-eval.test.js -npm install -g tsx -scripts/test-vaults.mts +scripts/test-vaults.ts echo ACCEPTANCE TESTING kread yarn ava kread.test.js diff --git a/a3p-integration/proposals/z:acceptance/tsconfig.json b/a3p-integration/proposals/z:acceptance/tsconfig.json index fb5b67a7598..064d7a860d4 100644 --- a/a3p-integration/proposals/z:acceptance/tsconfig.json +++ b/a3p-integration/proposals/z:acceptance/tsconfig.json @@ -6,11 +6,16 @@ "moduleResolution": "bundler", "allowJs": true, "checkJs": true, + "allowImportingTsExtensions": true, "strict": false, "strictNullChecks": true, "noImplicitThis": true, // XXX synthetic-chain has some errors "skipLibCheck": true }, - "exclude": ["restart-valueVow", "start-valueVow", "localchaintest-submission"] + "exclude": [ + "restart-valueVow", + "start-valueVow", + "localchaintest-submission" + ] } diff --git a/scripts/report-globals.mts b/scripts/report-globals.ts similarity index 98% rename from scripts/report-globals.mts rename to scripts/report-globals.ts index 50fa82cb7b8..b09cadcc930 100755 --- a/scripts/report-globals.mts +++ b/scripts/report-globals.ts @@ -79,6 +79,7 @@ const report = () => { console.log(counts); }; +console.log('Gathering globals...'); // Feel free to disable this while debugging runEslint(); report(); From 51cb26feb051a8d57d4c15b6a3038d48495a6abb Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 2 Dec 2024 13:07:37 -0800 Subject: [PATCH 124/174] build: run with ts-blank-space/register --- a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts | 2 +- multichain-testing/scripts/deploy-cli.ts | 2 +- multichain-testing/scripts/fetch-starship-chain-info.ts | 2 +- scripts/report-globals.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 multichain-testing/scripts/deploy-cli.ts diff --git a/a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts b/a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts index 2a5cbb51124..7a5c2fa1aec 100755 --- a/a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts +++ b/a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env tsx +#!/usr/bin/env node --import ts-blank-space/register /* eslint-disable @jessie.js/safe-await-separator */ import { diff --git a/multichain-testing/scripts/deploy-cli.ts b/multichain-testing/scripts/deploy-cli.ts old mode 100644 new mode 100755 index 7f032606e23..47cb70e1153 --- a/multichain-testing/scripts/deploy-cli.ts +++ b/multichain-testing/scripts/deploy-cli.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env tsx +#!/usr/bin/env node --import ts-blank-space/register import '@endo/init/debug.js'; import { execa } from 'execa'; diff --git a/multichain-testing/scripts/fetch-starship-chain-info.ts b/multichain-testing/scripts/fetch-starship-chain-info.ts index e660039cad2..fa4ec834687 100755 --- a/multichain-testing/scripts/fetch-starship-chain-info.ts +++ b/multichain-testing/scripts/fetch-starship-chain-info.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env tsx +#!/usr/bin/env node --import ts-blank-space/register /* eslint-env node */ import fsp from 'node:fs/promises'; diff --git a/scripts/report-globals.ts b/scripts/report-globals.ts index b09cadcc930..ff5fe426dc5 100755 --- a/scripts/report-globals.ts +++ b/scripts/report-globals.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env tsx +#!/usr/bin/env node --import ts-blank-space/register /* eslint-disable -- hacky script for irregular reports */ /** From 1805d3813414591a4cc96e388e8b9088fd990108 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 2 Dec 2024 13:07:49 -0800 Subject: [PATCH 125/174] chore(deps): remove tsx --- .../proposals/z:acceptance/package.json | 3 +- .../proposals/z:acceptance/yarn.lock | 288 +----- multichain-testing/package.json | 1 - multichain-testing/yarn.lock | 854 +----------------- 4 files changed, 11 insertions(+), 1135 deletions(-) diff --git a/a3p-integration/proposals/z:acceptance/package.json b/a3p-integration/proposals/z:acceptance/package.json index e95b55a26a5..8a906d701b8 100644 --- a/a3p-integration/proposals/z:acceptance/package.json +++ b/a3p-integration/proposals/z:acceptance/package.json @@ -23,8 +23,7 @@ "@endo/marshal": "^1.6.1", "agoric": "dev", "ava": "^6.1.2", - "execa": "9.1.0", - "tsx": "^4.17.0" + "execa": "9.1.0" }, "$comment": "UNTIL https://github.com/Agoric/agoric-sdk/issues/10259", "resolutions": { diff --git a/a3p-integration/proposals/z:acceptance/yarn.lock b/a3p-integration/proposals/z:acceptance/yarn.lock index d76e6d95485..c4f420e2cde 100644 --- a/a3p-integration/proposals/z:acceptance/yarn.lock +++ b/a3p-integration/proposals/z:acceptance/yarn.lock @@ -1084,174 +1084,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/aix-ppc64@npm:0.23.1" - conditions: os=aix & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/android-arm64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/android-arm64@npm:0.23.1" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/android-arm@npm:0.23.1" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@esbuild/android-x64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/android-x64@npm:0.23.1" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/darwin-arm64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/darwin-arm64@npm:0.23.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/darwin-x64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/darwin-x64@npm:0.23.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/freebsd-arm64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/freebsd-arm64@npm:0.23.1" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/freebsd-x64@npm:0.23.1" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/linux-arm64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/linux-arm64@npm:0.23.1" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/linux-arm@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/linux-arm@npm:0.23.1" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@esbuild/linux-ia32@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/linux-ia32@npm:0.23.1" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/linux-loong64@npm:0.23.1" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - -"@esbuild/linux-mips64el@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/linux-mips64el@npm:0.23.1" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"@esbuild/linux-ppc64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/linux-ppc64@npm:0.23.1" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/linux-riscv64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/linux-riscv64@npm:0.23.1" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/linux-s390x@npm:0.23.1" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"@esbuild/linux-x64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/linux-x64@npm:0.23.1" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/netbsd-x64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/netbsd-x64@npm:0.23.1" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/openbsd-arm64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/openbsd-arm64@npm:0.23.1" - conditions: os=openbsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/openbsd-x64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/openbsd-x64@npm:0.23.1" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/sunos-x64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/sunos-x64@npm:0.23.1" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-arm64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/win32-arm64@npm:0.23.1" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/win32-ia32@npm:0.23.1" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/win32-x64@npm:0.23.1": - version: 0.23.1 - resolution: "@esbuild/win32-x64@npm:0.23.1" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@eslint-community/eslint-utils@npm:^4.2.0": version: 4.4.1 resolution: "@eslint-community/eslint-utils@npm:4.4.1" @@ -3010,89 +2842,6 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:~0.23.0": - version: 0.23.1 - resolution: "esbuild@npm:0.23.1" - dependencies: - "@esbuild/aix-ppc64": "npm:0.23.1" - "@esbuild/android-arm": "npm:0.23.1" - "@esbuild/android-arm64": "npm:0.23.1" - "@esbuild/android-x64": "npm:0.23.1" - "@esbuild/darwin-arm64": "npm:0.23.1" - "@esbuild/darwin-x64": "npm:0.23.1" - "@esbuild/freebsd-arm64": "npm:0.23.1" - "@esbuild/freebsd-x64": "npm:0.23.1" - "@esbuild/linux-arm": "npm:0.23.1" - "@esbuild/linux-arm64": "npm:0.23.1" - "@esbuild/linux-ia32": "npm:0.23.1" - "@esbuild/linux-loong64": "npm:0.23.1" - "@esbuild/linux-mips64el": "npm:0.23.1" - "@esbuild/linux-ppc64": "npm:0.23.1" - "@esbuild/linux-riscv64": "npm:0.23.1" - "@esbuild/linux-s390x": "npm:0.23.1" - "@esbuild/linux-x64": "npm:0.23.1" - "@esbuild/netbsd-x64": "npm:0.23.1" - "@esbuild/openbsd-arm64": "npm:0.23.1" - "@esbuild/openbsd-x64": "npm:0.23.1" - "@esbuild/sunos-x64": "npm:0.23.1" - "@esbuild/win32-arm64": "npm:0.23.1" - "@esbuild/win32-ia32": "npm:0.23.1" - "@esbuild/win32-x64": "npm:0.23.1" - dependenciesMeta: - "@esbuild/aix-ppc64": - optional: true - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-arm64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 10c0/08c2ed1105cc3c5e3a24a771e35532fe6089dd24a39c10097899072cef4a99f20860e41e9294e000d86380f353b04d8c50af482483d7f69f5208481cce61eec7 - languageName: node - linkType: hard - "escalade@npm:^3.1.1": version: 3.2.0 resolution: "escalade@npm:3.2.0" @@ -3569,7 +3318,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": +"fsevents@npm:~2.3.2": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -3579,7 +3328,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -3679,15 +3428,6 @@ __metadata: languageName: node linkType: hard -"get-tsconfig@npm:^4.7.5": - version: 4.8.1 - resolution: "get-tsconfig@npm:4.8.1" - dependencies: - resolve-pkg-maps: "npm:^1.0.0" - checksum: 10c0/536ee85d202f604f4b5fb6be81bcd6e6d9a96846811e83e9acc6de4a04fb49506edea0e1b8cf1d5ee7af33e469916ec2809d4c5445ab8ae015a7a51fbd1572f9 - languageName: node - linkType: hard - "github-from-package@npm:0.0.0": version: 0.0.0 resolution: "github-from-package@npm:0.0.0" @@ -5716,13 +5456,6 @@ __metadata: languageName: node linkType: hard -"resolve-pkg-maps@npm:^1.0.0": - version: 1.0.0 - resolution: "resolve-pkg-maps@npm:1.0.0" - checksum: 10c0/fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab - languageName: node - linkType: hard - "resolve@npm:^1.10.0, resolve@npm:^1.17.0, resolve@npm:^1.19.0": version: 1.22.8 resolution: "resolve@npm:1.22.8" @@ -5818,7 +5551,6 @@ __metadata: eslint: "npm:^8.57.0" execa: "npm:9.1.0" npm-run-all: "npm:^4.1.5" - tsx: "npm:^4.17.0" typescript: "npm:^5.6.3" languageName: unknown linkType: soft @@ -6548,22 +6280,6 @@ __metadata: languageName: node linkType: hard -"tsx@npm:^4.17.0": - version: 4.19.2 - resolution: "tsx@npm:4.19.2" - dependencies: - esbuild: "npm:~0.23.0" - fsevents: "npm:~2.3.3" - get-tsconfig: "npm:^4.7.5" - dependenciesMeta: - fsevents: - optional: true - bin: - tsx: dist/cli.mjs - checksum: 10c0/63164b889b1d170403e4d8753a6755dec371f220f5ce29a8e88f1f4d6085a784a12d8dc2ee669116611f2c72757ac9beaa3eea5c452796f541bdd2dc11753721 - languageName: node - linkType: hard - "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" diff --git a/multichain-testing/package.json b/multichain-testing/package.json index 4d00409e179..8d204854818 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -38,7 +38,6 @@ "patch-package": "^8.0.0", "starshipjs": "2.4.1", "ts-blank-space": "^0.4.4", - "tsx": "^4.15.6", "typescript": "~5.6.2" }, "resolutions": { diff --git a/multichain-testing/yarn.lock b/multichain-testing/yarn.lock index 56b70b10a67..f6abb8ce779 100644 --- a/multichain-testing/yarn.lock +++ b/multichain-testing/yarn.lock @@ -436,167 +436,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/aix-ppc64@npm:0.21.5" - conditions: os=aix & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/android-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/android-arm64@npm:0.21.5" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/android-arm@npm:0.21.5" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@esbuild/android-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/android-x64@npm:0.21.5" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/darwin-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/darwin-arm64@npm:0.21.5" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/darwin-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/darwin-x64@npm:0.21.5" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/freebsd-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/freebsd-arm64@npm:0.21.5" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/freebsd-x64@npm:0.21.5" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/linux-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-arm64@npm:0.21.5" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/linux-arm@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-arm@npm:0.21.5" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@esbuild/linux-ia32@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-ia32@npm:0.21.5" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-loong64@npm:0.21.5" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - -"@esbuild/linux-mips64el@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-mips64el@npm:0.21.5" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"@esbuild/linux-ppc64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-ppc64@npm:0.21.5" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/linux-riscv64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-riscv64@npm:0.21.5" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-s390x@npm:0.21.5" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"@esbuild/linux-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-x64@npm:0.21.5" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/netbsd-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/netbsd-x64@npm:0.21.5" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/openbsd-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/openbsd-x64@npm:0.21.5" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/sunos-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/sunos-x64@npm:0.21.5" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/win32-arm64@npm:0.21.5" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/win32-ia32@npm:0.21.5" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/win32-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/win32-x64@npm:0.21.5" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" @@ -675,20 +514,6 @@ __metadata: languageName: node linkType: hard -"@isaacs/cliui@npm:^8.0.2": - version: 8.0.2 - resolution: "@isaacs/cliui@npm:8.0.2" - dependencies: - string-width: "npm:^5.1.2" - string-width-cjs: "npm:string-width@^4.2.0" - strip-ansi: "npm:^7.0.1" - strip-ansi-cjs: "npm:strip-ansi@^6.0.1" - wrap-ansi: "npm:^8.1.0" - wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" - checksum: 10c0/b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e - languageName: node - linkType: hard - "@mapbox/node-pre-gyp@npm:^1.0.11": version: 1.0.11 resolution: "@mapbox/node-pre-gyp@npm:1.0.11" @@ -742,35 +567,6 @@ __metadata: languageName: node linkType: hard -"@npmcli/agent@npm:^2.0.0": - version: 2.2.2 - resolution: "@npmcli/agent@npm:2.2.2" - dependencies: - agent-base: "npm:^7.1.0" - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.1" - lru-cache: "npm:^10.0.1" - socks-proxy-agent: "npm:^8.0.3" - checksum: 10c0/325e0db7b287d4154ecd164c0815c08007abfb07653cc57bceded17bb7fd240998a3cbdbe87d700e30bef494885eccc725ab73b668020811d56623d145b524ae - languageName: node - linkType: hard - -"@npmcli/fs@npm:^3.1.0": - version: 3.1.1 - resolution: "@npmcli/fs@npm:3.1.1" - dependencies: - semver: "npm:^7.3.5" - checksum: 10c0/c37a5b4842bfdece3d14dfdb054f73fe15ed2d3da61b34ff76629fb5b1731647c49166fd2a8bf8b56fcfa51200382385ea8909a3cbecdad612310c114d3f6c99 - languageName: node - linkType: hard - -"@pkgjs/parseargs@npm:^0.11.0": - version: 0.11.0 - resolution: "@pkgjs/parseargs@npm:0.11.0" - checksum: 10c0/5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd - languageName: node - linkType: hard - "@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": version: 1.1.2 resolution: "@protobufjs/aspromise@npm:1.1.2" @@ -1129,13 +925,6 @@ __metadata: languageName: node linkType: hard -"abbrev@npm:^2.0.0": - version: 2.0.0 - resolution: "abbrev@npm:2.0.0" - checksum: 10c0/f742a5a107473946f426c691c08daba61a1d15942616f300b5d32fd735be88fef5cba24201757b6c407fd564555fb48c751cfa33519b2605c8a7aadd22baf372 - languageName: node - linkType: hard - "acorn-import-attributes@npm:^1.9.5": version: 1.9.5 resolution: "acorn-import-attributes@npm:1.9.5" @@ -1190,25 +979,6 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": - version: 7.1.1 - resolution: "agent-base@npm:7.1.1" - dependencies: - debug: "npm:^4.3.4" - checksum: 10c0/e59ce7bed9c63bf071a30cc471f2933862044c97fd9958967bfe22521d7a0f601ce4ed5a8c011799d0c726ca70312142ae193bbebb60f576b52be19d4a363b50 - languageName: node - linkType: hard - -"aggregate-error@npm:^3.0.0": - version: 3.1.0 - resolution: "aggregate-error@npm:3.1.0" - dependencies: - clean-stack: "npm:^2.0.0" - indent-string: "npm:^4.0.0" - checksum: 10c0/a42f67faa79e3e6687a4923050e7c9807db3848a037076f791d10e092677d65c1d2d863b7848560699f40fc0502c19f40963fb1cd1fb3d338a7423df8e45e039 - languageName: node - linkType: hard - "ajv@npm:^6.12.4": version: 6.12.6 resolution: "ajv@npm:6.12.6" @@ -1244,7 +1014,7 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": +"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.2.1": version: 6.2.1 resolution: "ansi-styles@npm:6.2.1" checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c @@ -1508,26 +1278,6 @@ __metadata: languageName: node linkType: hard -"cacache@npm:^18.0.0": - version: 18.0.3 - resolution: "cacache@npm:18.0.3" - dependencies: - "@npmcli/fs": "npm:^3.1.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" - minipass: "npm:^7.0.3" - minipass-collect: "npm:^2.0.1" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^4.0.0" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - unique-filename: "npm:^3.0.0" - checksum: 10c0/dfda92840bb371fb66b88c087c61a74544363b37a265023223a99965b16a16bbb87661fe4948718d79df6e0cc04e85e62784fbcf1832b2a5e54ff4c46fbb45b7 - languageName: node - linkType: hard - "call-bind@npm:^1.0.5": version: 1.0.7 resolution: "call-bind@npm:1.0.7" @@ -1616,13 +1366,6 @@ __metadata: languageName: node linkType: hard -"clean-stack@npm:^2.0.0": - version: 2.2.0 - resolution: "clean-stack@npm:2.2.0" - checksum: 10c0/1f90262d5f6230a17e27d0c190b09d47ebe7efdd76a03b5a1127863f7b3c9aec4c3e6c8bb3a7bbf81d553d56a1fd35728f5a8ef4c63f867ac8d690109742a8c1 - languageName: node - linkType: hard - "cli-truncate@npm:^4.0.0": version: 4.0.0 resolution: "cli-truncate@npm:4.0.0" @@ -1747,7 +1490,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -1868,13 +1611,6 @@ __metadata: languageName: node linkType: hard -"eastasianwidth@npm:^0.2.0": - version: 0.2.0 - resolution: "eastasianwidth@npm:0.2.0" - checksum: 10c0/26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 - languageName: node - linkType: hard - "elliptic@npm:^6.5.4": version: 6.5.7 resolution: "elliptic@npm:6.5.7" @@ -1911,36 +1647,6 @@ __metadata: languageName: node linkType: hard -"emoji-regex@npm:^9.2.2": - version: 9.2.2 - resolution: "emoji-regex@npm:9.2.2" - checksum: 10c0/af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 - languageName: node - linkType: hard - -"encoding@npm:^0.1.13": - version: 0.1.13 - resolution: "encoding@npm:0.1.13" - dependencies: - iconv-lite: "npm:^0.6.2" - checksum: 10c0/36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039 - languageName: node - linkType: hard - -"env-paths@npm:^2.2.0": - version: 2.2.1 - resolution: "env-paths@npm:2.2.1" - checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 - languageName: node - linkType: hard - -"err-code@npm:^2.0.2": - version: 2.0.3 - resolution: "err-code@npm:2.0.3" - checksum: 10c0/b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66 - languageName: node - linkType: hard - "es-define-property@npm:^1.0.0": version: 1.0.0 resolution: "es-define-property@npm:1.0.0" @@ -1957,86 +1663,6 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:~0.21.4": - version: 0.21.5 - resolution: "esbuild@npm:0.21.5" - dependencies: - "@esbuild/aix-ppc64": "npm:0.21.5" - "@esbuild/android-arm": "npm:0.21.5" - "@esbuild/android-arm64": "npm:0.21.5" - "@esbuild/android-x64": "npm:0.21.5" - "@esbuild/darwin-arm64": "npm:0.21.5" - "@esbuild/darwin-x64": "npm:0.21.5" - "@esbuild/freebsd-arm64": "npm:0.21.5" - "@esbuild/freebsd-x64": "npm:0.21.5" - "@esbuild/linux-arm": "npm:0.21.5" - "@esbuild/linux-arm64": "npm:0.21.5" - "@esbuild/linux-ia32": "npm:0.21.5" - "@esbuild/linux-loong64": "npm:0.21.5" - "@esbuild/linux-mips64el": "npm:0.21.5" - "@esbuild/linux-ppc64": "npm:0.21.5" - "@esbuild/linux-riscv64": "npm:0.21.5" - "@esbuild/linux-s390x": "npm:0.21.5" - "@esbuild/linux-x64": "npm:0.21.5" - "@esbuild/netbsd-x64": "npm:0.21.5" - "@esbuild/openbsd-x64": "npm:0.21.5" - "@esbuild/sunos-x64": "npm:0.21.5" - "@esbuild/win32-arm64": "npm:0.21.5" - "@esbuild/win32-ia32": "npm:0.21.5" - "@esbuild/win32-x64": "npm:0.21.5" - dependenciesMeta: - "@esbuild/aix-ppc64": - optional: true - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 10c0/fa08508adf683c3f399e8a014a6382a6b65542213431e26206c0720e536b31c09b50798747c2a105a4bbba1d9767b8d3615a74c2f7bf1ddf6d836cd11eb672de - languageName: node - linkType: hard - "escalade@npm:^3.1.1": version: 3.1.2 resolution: "escalade@npm:3.1.2" @@ -2221,13 +1847,6 @@ __metadata: languageName: node linkType: hard -"exponential-backoff@npm:^3.1.1": - version: 3.1.1 - resolution: "exponential-backoff@npm:3.1.1" - checksum: 10c0/160456d2d647e6019640bd07111634d8c353038d9fa40176afb7cd49b0548bdae83b56d05e907c2cce2300b81cae35d800ef92fefb9d0208e190fa3b7d6bb579 - languageName: node - linkType: hard - "fast-check@npm:^3.0.0": version: 3.19.0 resolution: "fast-check@npm:3.19.0" @@ -2375,16 +1994,6 @@ __metadata: languageName: node linkType: hard -"foreground-child@npm:^3.1.0": - version: 3.1.1 - resolution: "foreground-child@npm:3.1.1" - dependencies: - cross-spawn: "npm:^7.0.0" - signal-exit: "npm:^4.0.1" - checksum: 10c0/9700a0285628abaeb37007c9a4d92bd49f67210f09067638774338e146c8e9c825c5c877f072b2f75f41dc6a2d0be8664f79ffc03f6576649f54a84fb9b47de0 - languageName: node - linkType: hard - "form-data@npm:^4.0.0": version: 4.0.0 resolution: "form-data@npm:4.0.0" @@ -2428,15 +2037,6 @@ __metadata: languageName: node linkType: hard -"fs-minipass@npm:^3.0.0": - version: 3.0.3 - resolution: "fs-minipass@npm:3.0.3" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94 - languageName: node - linkType: hard - "fs.realpath@npm:^1.0.0": version: 1.0.0 resolution: "fs.realpath@npm:1.0.0" @@ -2444,25 +2044,6 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.3.3": - version: 2.3.3 - resolution: "fsevents@npm:2.3.3" - dependencies: - node-gyp: "npm:latest" - checksum: 10c0/a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60 - conditions: os=darwin - languageName: node - linkType: hard - -"fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": - version: 2.3.3 - resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" - dependencies: - node-gyp: "npm:latest" - conditions: os=darwin - languageName: node - linkType: hard - "function-bind@npm:^1.1.2": version: 1.1.2 resolution: "function-bind@npm:1.1.2" @@ -2524,15 +2105,6 @@ __metadata: languageName: node linkType: hard -"get-tsconfig@npm:^4.7.5": - version: 4.7.5 - resolution: "get-tsconfig@npm:4.7.5" - dependencies: - resolve-pkg-maps: "npm:^1.0.0" - checksum: 10c0/a917dff2ba9ee187c41945736bf9bbab65de31ce5bc1effd76267be483a7340915cff232199406379f26517d2d0a4edcdbcda8cca599c2480a0f2cf1e1de3efa - languageName: node - linkType: hard - "glob-parent@npm:^5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" @@ -2551,21 +2123,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10": - version: 10.4.1 - resolution: "glob@npm:10.4.1" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^3.1.2" - minimatch: "npm:^9.0.4" - minipass: "npm:^7.1.2" - path-scurry: "npm:^1.11.1" - bin: - glob: dist/esm/bin.mjs - checksum: 10c0/77f2900ed98b9cc2a0e1901ee5e476d664dae3cd0f1b662b8bfd4ccf00d0edc31a11595807706a274ca10e1e251411bbf2e8e976c82bed0d879a9b89343ed379 - languageName: node - linkType: hard - "glob@npm:^7.1.3": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -2636,7 +2193,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 @@ -2717,23 +2274,6 @@ __metadata: languageName: node linkType: hard -"http-cache-semantics@npm:^4.1.1": - version: 4.1.1 - resolution: "http-cache-semantics@npm:4.1.1" - checksum: 10c0/ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc - languageName: node - linkType: hard - -"http-proxy-agent@npm:^7.0.0": - version: 7.0.2 - resolution: "http-proxy-agent@npm:7.0.2" - dependencies: - agent-base: "npm:^7.1.0" - debug: "npm:^4.3.4" - checksum: 10c0/4207b06a4580fb85dd6dff521f0abf6db517489e70863dca1a0291daa7f2d3d2d6015a57bd702af068ea5cf9f1f6ff72314f5f5b4228d299c0904135d2aef921 - languageName: node - linkType: hard - "https-proxy-agent@npm:^5.0.0": version: 5.0.1 resolution: "https-proxy-agent@npm:5.0.1" @@ -2744,16 +2284,6 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^7.0.1": - version: 7.0.4 - resolution: "https-proxy-agent@npm:7.0.4" - dependencies: - agent-base: "npm:^7.0.2" - debug: "npm:4" - checksum: 10c0/bc4f7c38da32a5fc622450b6cb49a24ff596f9bd48dcedb52d2da3fa1c1a80e100fb506bd59b326c012f21c863c69b275c23de1a01d0b84db396822fdf25e52b - languageName: node - linkType: hard - "human-signals@npm:^7.0.0": version: 7.0.0 resolution: "human-signals@npm:7.0.0" @@ -2761,15 +2291,6 @@ __metadata: languageName: node linkType: hard -"iconv-lite@npm:^0.6.2": - version: 0.6.3 - resolution: "iconv-lite@npm:0.6.3" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3.0.0" - checksum: 10c0/98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 - languageName: node - linkType: hard - "ignore-by-default@npm:^2.1.0": version: 2.1.0 resolution: "ignore-by-default@npm:2.1.0" @@ -2801,13 +2322,6 @@ __metadata: languageName: node linkType: hard -"indent-string@npm:^4.0.0": - version: 4.0.0 - resolution: "indent-string@npm:4.0.0" - checksum: 10c0/1e1904ddb0cb3d6cce7cd09e27a90184908b7a5d5c21b92e232c93579d314f0b83c246ffb035493d0504b1e9147ba2c9b21df0030f48673fba0496ecd698161f - languageName: node - linkType: hard - "indent-string@npm:^5.0.0": version: 5.0.0 resolution: "indent-string@npm:5.0.0" @@ -2832,16 +2346,6 @@ __metadata: languageName: node linkType: hard -"ip-address@npm:^9.0.5": - version: 9.0.5 - resolution: "ip-address@npm:9.0.5" - dependencies: - jsbn: "npm:1.1.0" - sprintf-js: "npm:^1.1.3" - checksum: 10c0/331cd07fafcb3b24100613e4b53e1a2b4feab11e671e655d46dc09ee233da5011284d09ca40c4ecbdfe1d0004f462958675c224a804259f2f78d2465a87824bc - languageName: node - linkType: hard - "irregular-plurals@npm:^3.3.0": version: 3.5.0 resolution: "irregular-plurals@npm:3.5.0" @@ -2888,13 +2392,6 @@ __metadata: languageName: node linkType: hard -"is-lambda@npm:^1.0.1": - version: 1.0.1 - resolution: "is-lambda@npm:1.0.1" - checksum: 10c0/85fee098ae62ba6f1e24cf22678805473c7afd0fb3978a3aa260e354cb7bcb3a5806cf0a98403188465efedec41ab4348e8e4e79305d409601323855b3839d4d - languageName: node - linkType: hard - "is-number@npm:^7.0.0": version: 7.0.0 resolution: "is-number@npm:7.0.0" @@ -2967,13 +2464,6 @@ __metadata: languageName: node linkType: hard -"isexe@npm:^3.1.1": - version: 3.1.1 - resolution: "isexe@npm:3.1.1" - checksum: 10c0/9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 - languageName: node - linkType: hard - "isomorphic-ws@npm:^4.0.1": version: 4.0.1 resolution: "isomorphic-ws@npm:4.0.1" @@ -2983,19 +2473,6 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^3.1.2": - version: 3.4.0 - resolution: "jackspeak@npm:3.4.0" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10c0/7e42d1ea411b4d57d43ea8a6afbca9224382804359cb72626d0fc45bb8db1de5ad0248283c3db45fe73e77210750d4fcc7c2b4fe5d24fda94aaa24d658295c5f - languageName: node - linkType: hard - "js-string-escape@npm:^1.0.1": version: 1.0.1 resolution: "js-string-escape@npm:1.0.1" @@ -3026,13 +2503,6 @@ __metadata: languageName: node linkType: hard -"jsbn@npm:1.1.0": - version: 1.1.0 - resolution: "jsbn@npm:1.1.0" - checksum: 10c0/4f907fb78d7b712e11dea8c165fe0921f81a657d3443dde75359ed52eb2b5d33ce6773d97985a089f09a65edd80b11cb75c767b57ba47391fee4c969f7215c96 - languageName: node - linkType: hard - "json-buffer@npm:3.0.1": version: 3.0.1 resolution: "json-buffer@npm:3.0.1" @@ -3167,13 +2637,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": - version: 10.2.2 - resolution: "lru-cache@npm:10.2.2" - checksum: 10c0/402d31094335851220d0b00985084288136136992979d0e015f0f1697e15d1c86052d7d53ae86b614e5b058425606efffc6969a31a091085d7a2b80a8a1e26d6 - languageName: node - linkType: hard - "make-dir@npm:^3.1.0": version: 3.1.0 resolution: "make-dir@npm:3.1.0" @@ -3183,26 +2646,6 @@ __metadata: languageName: node linkType: hard -"make-fetch-happen@npm:^13.0.0": - version: 13.0.1 - resolution: "make-fetch-happen@npm:13.0.1" - dependencies: - "@npmcli/agent": "npm:^2.0.0" - cacache: "npm:^18.0.0" - http-cache-semantics: "npm:^4.1.1" - is-lambda: "npm:^1.0.1" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^3.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - proc-log: "npm:^4.2.0" - promise-retry: "npm:^2.0.1" - ssri: "npm:^10.0.0" - checksum: 10c0/df5f4dbb6d98153b751bccf4dc4cc500de85a96a9331db9805596c46aa9f99d9555983954e6c1266d9f981ae37a9e4647f42b9a4bb5466f867f4012e582c9e7e - languageName: node - linkType: hard - "matcher@npm:^5.0.0": version: 5.0.0 resolution: "matcher@npm:5.0.0" @@ -3312,15 +2755,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.4": - version: 9.0.4 - resolution: "minimatch@npm:9.0.4" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/2c16f21f50e64922864e560ff97c587d15fd491f65d92a677a344e970fe62aafdbeafe648965fa96d33c061b4d0eabfe0213466203dd793367e7f28658cf6414 - languageName: node - linkType: hard - "minimist@npm:^1.2.6": version: 1.2.8 resolution: "minimist@npm:1.2.8" @@ -3328,57 +2762,6 @@ __metadata: languageName: node linkType: hard -"minipass-collect@npm:^2.0.1": - version: 2.0.1 - resolution: "minipass-collect@npm:2.0.1" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e - languageName: node - linkType: hard - -"minipass-fetch@npm:^3.0.0": - version: 3.0.5 - resolution: "minipass-fetch@npm:3.0.5" - dependencies: - encoding: "npm:^0.1.13" - minipass: "npm:^7.0.3" - minipass-sized: "npm:^1.0.3" - minizlib: "npm:^2.1.2" - dependenciesMeta: - encoding: - optional: true - checksum: 10c0/9d702d57f556274286fdd97e406fc38a2f5c8d15e158b498d7393b1105974b21249289ec571fa2b51e038a4872bfc82710111cf75fae98c662f3d6f95e72152b - languageName: node - linkType: hard - -"minipass-flush@npm:^1.0.5": - version: 1.0.5 - resolution: "minipass-flush@npm:1.0.5" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd - languageName: node - linkType: hard - -"minipass-pipeline@npm:^1.2.4": - version: 1.2.4 - resolution: "minipass-pipeline@npm:1.2.4" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2 - languageName: node - linkType: hard - -"minipass-sized@npm:^1.0.3": - version: 1.0.3 - resolution: "minipass-sized@npm:1.0.3" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/298f124753efdc745cfe0f2bdfdd81ba25b9f4e753ca4a2066eb17c821f25d48acea607dfc997633ee5bf7b6dfffb4eee4f2051eb168663f0b99fad2fa4829cb - languageName: node - linkType: hard - "minipass@npm:^3.0.0": version: 3.3.6 resolution: "minipass@npm:3.3.6" @@ -3395,14 +2778,7 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": - version: 7.1.2 - resolution: "minipass@npm:7.1.2" - checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 - languageName: node - linkType: hard - -"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": +"minizlib@npm:^2.1.1": version: 2.1.2 resolution: "minizlib@npm:2.1.2" dependencies: @@ -3442,13 +2818,6 @@ __metadata: languageName: node linkType: hard -"negotiator@npm:^0.6.3": - version: 0.6.3 - resolution: "negotiator@npm:0.6.3" - checksum: 10c0/3ec9fd413e7bf071c937ae60d572bc67155262068ed522cf4b3be5edbe6ddf67d095ec03a3a14ebf8fc8e95f8e1d61be4869db0dbb0de696f6b837358bd43fc2 - languageName: node - linkType: hard - "node-fetch@npm:^2.6.12, node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.9": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" @@ -3474,26 +2843,6 @@ __metadata: languageName: node linkType: hard -"node-gyp@npm:latest": - version: 10.1.0 - resolution: "node-gyp@npm:10.1.0" - dependencies: - env-paths: "npm:^2.2.0" - exponential-backoff: "npm:^3.1.1" - glob: "npm:^10.3.10" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^13.0.0" - nopt: "npm:^7.0.0" - proc-log: "npm:^3.0.0" - semver: "npm:^7.3.5" - tar: "npm:^6.1.2" - which: "npm:^4.0.0" - bin: - node-gyp: bin/node-gyp.js - checksum: 10c0/9cc821111ca244a01fb7f054db7523ab0a0cd837f665267eb962eb87695d71fb1e681f9e21464cc2fd7c05530dc4c81b810bca1a88f7d7186909b74477491a3c - languageName: node - linkType: hard - "nofilter@npm:^3.1.0": version: 3.1.0 resolution: "nofilter@npm:3.1.0" @@ -3512,17 +2861,6 @@ __metadata: languageName: node linkType: hard -"nopt@npm:^7.0.0": - version: 7.2.1 - resolution: "nopt@npm:7.2.1" - dependencies: - abbrev: "npm:^2.0.0" - bin: - nopt: bin/nopt.js - checksum: 10c0/a069c7c736767121242037a22a788863accfa932ab285a1eb569eb8cd534b09d17206f68c37f096ae785647435e0c5a5a0a67b42ec743e481a455e5ae6a6df81 - languageName: node - linkType: hard - "npm-run-path@npm:^5.2.0": version: 5.3.0 resolution: "npm-run-path@npm:5.3.0" @@ -3616,15 +2954,6 @@ __metadata: languageName: node linkType: hard -"p-map@npm:^4.0.0": - version: 4.0.0 - resolution: "p-map@npm:4.0.0" - dependencies: - aggregate-error: "npm:^3.0.0" - checksum: 10c0/592c05bd6262c466ce269ff172bb8de7c6975afca9b50c975135b974e9bdaafbfe80e61aaaf5be6d1200ba08b30ead04b88cfa7e25ff1e3b93ab28c9f62a2c75 - languageName: node - linkType: hard - "p-map@npm:^7.0.2": version: 7.0.2 resolution: "p-map@npm:7.0.2" @@ -3711,16 +3040,6 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.11.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" - dependencies: - lru-cache: "npm:^10.2.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d - languageName: node - linkType: hard - "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" @@ -3783,30 +3102,6 @@ __metadata: languageName: node linkType: hard -"proc-log@npm:^3.0.0": - version: 3.0.0 - resolution: "proc-log@npm:3.0.0" - checksum: 10c0/f66430e4ff947dbb996058f6fd22de2c66612ae1a89b097744e17fb18a4e8e7a86db99eda52ccf15e53f00b63f4ec0b0911581ff2aac0355b625c8eac509b0dc - languageName: node - linkType: hard - -"proc-log@npm:^4.2.0": - version: 4.2.0 - resolution: "proc-log@npm:4.2.0" - checksum: 10c0/17db4757c2a5c44c1e545170e6c70a26f7de58feb985091fb1763f5081cab3d01b181fb2dd240c9f4a4255a1d9227d163d5771b7e69c9e49a561692db865efb9 - languageName: node - linkType: hard - -"promise-retry@npm:^2.0.1": - version: 2.0.1 - resolution: "promise-retry@npm:2.0.1" - dependencies: - err-code: "npm:^2.0.2" - retry: "npm:^0.12.0" - checksum: 10c0/9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96 - languageName: node - linkType: hard - "protobufjs@npm:^6.8.8": version: 6.11.4 resolution: "protobufjs@npm:6.11.4" @@ -3914,20 +3209,6 @@ __metadata: languageName: node linkType: hard -"resolve-pkg-maps@npm:^1.0.0": - version: 1.0.0 - resolution: "resolve-pkg-maps@npm:1.0.0" - checksum: 10c0/fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab - languageName: node - linkType: hard - -"retry@npm:^0.12.0": - version: 0.12.0 - resolution: "retry@npm:0.12.0" - checksum: 10c0/59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe - languageName: node - linkType: hard - "reusify@npm:^1.0.4": version: 1.0.4 resolution: "reusify@npm:1.0.4" @@ -3982,7 +3263,6 @@ __metadata: patch-package: "npm:^8.0.0" starshipjs: "npm:2.4.1" ts-blank-space: "npm:^0.4.4" - tsx: "npm:^4.15.6" typescript: "npm:~5.6.2" languageName: unknown linkType: soft @@ -4003,13 +3283,6 @@ __metadata: languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3.0.0": - version: 2.1.2 - resolution: "safer-buffer@npm:2.1.2" - checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 - languageName: node - linkType: hard - "semver@npm:^6.0.0": version: 6.3.1 resolution: "semver@npm:6.3.1" @@ -4149,41 +3422,6 @@ __metadata: languageName: node linkType: hard -"smart-buffer@npm:^4.2.0": - version: 4.2.0 - resolution: "smart-buffer@npm:4.2.0" - checksum: 10c0/a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539 - languageName: node - linkType: hard - -"socks-proxy-agent@npm:^8.0.3": - version: 8.0.3 - resolution: "socks-proxy-agent@npm:8.0.3" - dependencies: - agent-base: "npm:^7.1.1" - debug: "npm:^4.3.4" - socks: "npm:^2.7.1" - checksum: 10c0/4950529affd8ccd6951575e21c1b7be8531b24d924aa4df3ee32df506af34b618c4e50d261f4cc603f1bfd8d426915b7d629966c8ce45b05fb5ad8c8b9a6459d - languageName: node - linkType: hard - -"socks@npm:^2.7.1": - version: 2.8.3 - resolution: "socks@npm:2.8.3" - dependencies: - ip-address: "npm:^9.0.5" - smart-buffer: "npm:^4.2.0" - checksum: 10c0/d54a52bf9325165770b674a67241143a3d8b4e4c8884560c4e0e078aace2a728dffc7f70150660f51b85797c4e1a3b82f9b7aa25e0a0ceae1a243365da5c51a7 - languageName: node - linkType: hard - -"sprintf-js@npm:^1.1.3": - version: 1.1.3 - resolution: "sprintf-js@npm:1.1.3" - checksum: 10c0/09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec - languageName: node - linkType: hard - "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -4191,15 +3429,6 @@ __metadata: languageName: node linkType: hard -"ssri@npm:^10.0.0": - version: 10.0.6 - resolution: "ssri@npm:10.0.6" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/e5a1e23a4057a86a97971465418f22ea89bd439ac36ade88812dd920e4e61873e8abd6a9b72a03a67ef50faa00a2daf1ab745c5a15b46d03e0544a0296354227 - languageName: node - linkType: hard - "stack-utils@npm:^2.0.6": version: 2.0.6 resolution: "stack-utils@npm:2.0.6" @@ -4221,7 +3450,7 @@ __metadata: languageName: node linkType: hard -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": +"string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" dependencies: @@ -4232,17 +3461,6 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^5.0.1, string-width@npm:^5.1.2": - version: 5.1.2 - resolution: "string-width@npm:5.1.2" - dependencies: - eastasianwidth: "npm:^0.2.0" - emoji-regex: "npm:^9.2.2" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca - languageName: node - linkType: hard - "string-width@npm:^7.0.0": version: 7.1.0 resolution: "string-width@npm:7.1.0" @@ -4263,7 +3481,7 @@ __metadata: languageName: node linkType: hard -"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": +"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": version: 6.0.1 resolution: "strip-ansi@npm:6.0.1" dependencies: @@ -4323,7 +3541,7 @@ __metadata: languageName: node linkType: hard -"tar@npm:^6.1.11, tar@npm:^6.1.2": +"tar@npm:^6.1.11": version: 6.2.1 resolution: "tar@npm:6.2.1" dependencies: @@ -4401,22 +3619,6 @@ __metadata: languageName: node linkType: hard -"tsx@npm:^4.15.6": - version: 4.15.6 - resolution: "tsx@npm:4.15.6" - dependencies: - esbuild: "npm:~0.21.4" - fsevents: "npm:~2.3.3" - get-tsconfig: "npm:^4.7.5" - dependenciesMeta: - fsevents: - optional: true - bin: - tsx: dist/cli.mjs - checksum: 10c0/c44e489d35b8b4795d68164572eb9e322a707290aa0786c2aac0f5c7782a884dfec38d557d74471b981a8314b2c7f6612078451d0429db028a23cb54a37e83a0 - languageName: node - linkType: hard - "type-check@npm:^0.4.0, type-check@npm:~0.4.0": version: 0.4.0 resolution: "type-check@npm:0.4.0" @@ -4501,24 +3703,6 @@ __metadata: languageName: node linkType: hard -"unique-filename@npm:^3.0.0": - version: 3.0.0 - resolution: "unique-filename@npm:3.0.0" - dependencies: - unique-slug: "npm:^4.0.0" - checksum: 10c0/6363e40b2fa758eb5ec5e21b3c7fb83e5da8dcfbd866cc0c199d5534c42f03b9ea9ab069769cc388e1d7ab93b4eeef28ef506ab5f18d910ef29617715101884f - languageName: node - linkType: hard - -"unique-slug@npm:^4.0.0": - version: 4.0.0 - resolution: "unique-slug@npm:4.0.0" - dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10c0/cb811d9d54eb5821b81b18205750be84cb015c20a4a44280794e915f5a0a70223ce39066781a354e872df3572e8155c228f43ff0cce94c7cbf4da2cc7cbdd635 - languageName: node - linkType: hard - "universalify@npm:^2.0.0": version: 2.0.1 resolution: "universalify@npm:2.0.1" @@ -4577,17 +3761,6 @@ __metadata: languageName: node linkType: hard -"which@npm:^4.0.0": - version: 4.0.0 - resolution: "which@npm:4.0.0" - dependencies: - isexe: "npm:^3.1.1" - bin: - node-which: bin/which.js - checksum: 10c0/449fa5c44ed120ccecfe18c433296a4978a7583bf2391c50abce13f76878d2476defde04d0f79db8165bdf432853c1f8389d0485ca6e8ebce3bbcded513d5e6a - languageName: node - linkType: hard - "wide-align@npm:^1.1.2": version: 1.1.5 resolution: "wide-align@npm:1.1.5" @@ -4604,7 +3777,7 @@ __metadata: languageName: node linkType: hard -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": +"wrap-ansi@npm:^7.0.0": version: 7.0.0 resolution: "wrap-ansi@npm:7.0.0" dependencies: @@ -4615,17 +3788,6 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^8.1.0": - version: 8.1.0 - resolution: "wrap-ansi@npm:8.1.0" - dependencies: - ansi-styles: "npm:^6.1.0" - string-width: "npm:^5.0.1" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 - languageName: node - linkType: hard - "wrappy@npm:1": version: 1.0.2 resolution: "wrappy@npm:1.0.2" From 13b32687a39d81263ee821a68347a11c4f93e1d6 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 2 Dec 2024 14:26:37 -0800 Subject: [PATCH 126/174] build: run scripts with shebang --- multichain-testing/Makefile | 12 ++++++------ multichain-testing/scripts/dev-setup.sh | 0 multichain-testing/scripts/install.sh | 0 multichain-testing/scripts/pod-readiness.ts | 1 + multichain-testing/scripts/port-forward.sh | 0 multichain-testing/scripts/update-config.sh | 0 6 files changed, 7 insertions(+), 6 deletions(-) mode change 100644 => 100755 multichain-testing/scripts/dev-setup.sh mode change 100644 => 100755 multichain-testing/scripts/install.sh mode change 100644 => 100755 multichain-testing/scripts/pod-readiness.ts mode change 100644 => 100755 multichain-testing/scripts/port-forward.sh mode change 100644 => 100755 multichain-testing/scripts/update-config.sh diff --git a/multichain-testing/Makefile b/multichain-testing/Makefile index 9fd5b926b18..5301808e631 100644 --- a/multichain-testing/Makefile +++ b/multichain-testing/Makefile @@ -26,14 +26,14 @@ clean: stop clean-kind .PHONY: check setup-deps: - bash $(CURDIR)/scripts/dev-setup.sh + $(CURDIR)/scripts/dev-setup.sh ############################################################################### ### Helm Charts ### ############################################################################### install: - bash $(CURDIR)/scripts/install.sh --config $(FILE) --name $(NAME) --version $(HELM_VERSION) + $(CURDIR)/scripts/install.sh --config $(FILE) --name $(NAME) --version $(HELM_VERSION) delete: -helm delete $(NAME) @@ -44,7 +44,7 @@ delete: .PHONY: port-forward port-forward: - bash $(CURDIR)/scripts/port-forward.sh --config=$(FILE) + $(CURDIR)/scripts/port-forward.sh --config=$(FILE) .PHONY: stop-forward stop-forward: @@ -76,8 +76,8 @@ fund-provision-pool: kubectl exec -i agoriclocal-genesis-0 -c validator -- agd tx bank send faucet $(PROVISION_POOL_ADDR) 1000000000uist -y -b block override-chain-registry: - node_modules/.bin/tsx scripts/fetch-starship-chain-info.ts && \ - node_modules/.bin/tsx scripts/deploy-cli.ts src/revise-chain-info.builder.js + scripts/fetch-starship-chain-info.ts && \ + scripts/deploy-cli.ts src/revise-chain-info.builder.js ADDR=agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce COIN=1000000000uist @@ -98,7 +98,7 @@ tail-slog: .PHONY: wait-for-pods wait-for-pods: - node_modules/.bin/tsx scripts/pod-readiness.ts + scripts/pod-readiness.ts .PHONY: start start: install wait-for-pods port-forward fund-provision-pool override-chain-registry diff --git a/multichain-testing/scripts/dev-setup.sh b/multichain-testing/scripts/dev-setup.sh old mode 100644 new mode 100755 diff --git a/multichain-testing/scripts/install.sh b/multichain-testing/scripts/install.sh old mode 100644 new mode 100755 diff --git a/multichain-testing/scripts/pod-readiness.ts b/multichain-testing/scripts/pod-readiness.ts old mode 100644 new mode 100755 index 315980e0ffc..4218c3ec175 --- a/multichain-testing/scripts/pod-readiness.ts +++ b/multichain-testing/scripts/pod-readiness.ts @@ -1,3 +1,4 @@ +#!/usr/bin/env node --import ts-blank-space/register import { execa } from 'execa'; import { sleep } from '../tools/sleep.js'; diff --git a/multichain-testing/scripts/port-forward.sh b/multichain-testing/scripts/port-forward.sh old mode 100644 new mode 100755 diff --git a/multichain-testing/scripts/update-config.sh b/multichain-testing/scripts/update-config.sh old mode 100644 new mode 100755 From df36ae6823beeab209c1afd81d18a486b522f8c9 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 2 Dec 2024 15:33:33 -0800 Subject: [PATCH 127/174] build: Linux compatible shebang --- a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts | 2 +- multichain-testing/scripts/deploy-cli.ts | 2 +- multichain-testing/scripts/fetch-starship-chain-info.ts | 2 +- multichain-testing/scripts/pod-readiness.ts | 2 +- packages/orchestration/scripts/fetch-chain-info.ts | 2 +- scripts/report-globals.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts b/a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts index 7a5c2fa1aec..48a216fe8e8 100755 --- a/a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts +++ b/a3p-integration/proposals/z:acceptance/scripts/test-vaults.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env node --import ts-blank-space/register +#!/usr/bin/env -S node --import ts-blank-space/register /* eslint-disable @jessie.js/safe-await-separator */ import { diff --git a/multichain-testing/scripts/deploy-cli.ts b/multichain-testing/scripts/deploy-cli.ts index 47cb70e1153..2dfd7b94d06 100755 --- a/multichain-testing/scripts/deploy-cli.ts +++ b/multichain-testing/scripts/deploy-cli.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env node --import ts-blank-space/register +#!/usr/bin/env -S node --import ts-blank-space/register import '@endo/init/debug.js'; import { execa } from 'execa'; diff --git a/multichain-testing/scripts/fetch-starship-chain-info.ts b/multichain-testing/scripts/fetch-starship-chain-info.ts index fa4ec834687..b51da77c566 100755 --- a/multichain-testing/scripts/fetch-starship-chain-info.ts +++ b/multichain-testing/scripts/fetch-starship-chain-info.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env node --import ts-blank-space/register +#!/usr/bin/env -S node --import ts-blank-space/register /* eslint-env node */ import fsp from 'node:fs/promises'; diff --git a/multichain-testing/scripts/pod-readiness.ts b/multichain-testing/scripts/pod-readiness.ts index 4218c3ec175..087fd5bb040 100755 --- a/multichain-testing/scripts/pod-readiness.ts +++ b/multichain-testing/scripts/pod-readiness.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env node --import ts-blank-space/register +#!/usr/bin/env -S node --import ts-blank-space/register import { execa } from 'execa'; import { sleep } from '../tools/sleep.js'; diff --git a/packages/orchestration/scripts/fetch-chain-info.ts b/packages/orchestration/scripts/fetch-chain-info.ts index 90ffb0627be..75ee144555e 100755 --- a/packages/orchestration/scripts/fetch-chain-info.ts +++ b/packages/orchestration/scripts/fetch-chain-info.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env node --import ts-blank-space/register +#!/usr/bin/env -S 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'; diff --git a/scripts/report-globals.ts b/scripts/report-globals.ts index ff5fe426dc5..2661d134e6d 100755 --- a/scripts/report-globals.ts +++ b/scripts/report-globals.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env node --import ts-blank-space/register +#!/usr/bin/env -S node --import ts-blank-space/register /* eslint-disable -- hacky script for irregular reports */ /** From ecd89390aacf72582ff519c797f2f2e2ba439c58 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 3 Dec 2024 09:22:28 -0800 Subject: [PATCH 128/174] chore(deps): bump typescript deps --- multichain-testing/package.json | 6 +- multichain-testing/yarn.lock | 283 ++++++++++++++------------------ 2 files changed, 123 insertions(+), 166 deletions(-) diff --git a/multichain-testing/package.json b/multichain-testing/package.json index 8d204854818..e6bf20b73ea 100644 --- a/multichain-testing/package.json +++ b/multichain-testing/package.json @@ -28,8 +28,8 @@ "@types/eslint": "^8", "@types/fs-extra": "^11", "@types/node": "^22.0.0", - "@typescript-eslint/eslint-plugin": "^6.20.0", - "@typescript-eslint/parser": "^6.20.0", + "@typescript-eslint/eslint-plugin": "^8.17.0", + "@typescript-eslint/parser": "^8.17.0", "ava": "^6.2.0", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", @@ -38,7 +38,7 @@ "patch-package": "^8.0.0", "starshipjs": "2.4.1", "ts-blank-space": "^0.4.4", - "typescript": "~5.6.2" + "typescript": "~5.7.2" }, "resolutions": { "axios": "1.6.7" diff --git a/multichain-testing/yarn.lock b/multichain-testing/yarn.lock index f6abb8ce779..ae4d0d64393 100644 --- a/multichain-testing/yarn.lock +++ b/multichain-testing/yarn.lock @@ -447,7 +447,14 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.10.0": + version: 4.12.1 + resolution: "@eslint-community/regexpp@npm:4.12.1" + checksum: 10c0/a03d98c246bcb9109aec2c08e4d10c8d010256538dcb3f56610191607214523d4fb1b00aa81df830b6dffb74c5fa0be03642513a289c567949d3e550ca11cdf6 + languageName: node + linkType: hard + +"@eslint-community/regexpp@npm:^4.6.1": version: 4.10.1 resolution: "@eslint-community/regexpp@npm:4.10.1" checksum: 10c0/f59376025d0c91dd9fdf18d33941df499292a3ecba3e9889c360f3f6590197d30755604588786cdca0f9030be315a26b206014af4b65c0ff85b4ec49043de780 @@ -711,7 +718,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.12": +"@types/json-schema@npm:*": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db @@ -752,133 +759,124 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:^7.5.0": - version: 7.5.8 - resolution: "@types/semver@npm:7.5.8" - checksum: 10c0/8663ff927234d1c5fcc04b33062cb2b9fcfbe0f5f351ed26c4d1e1581657deebd506b41ff7fdf89e787e3d33ce05854bc01686379b89e9c49b564c4cfa988efa - languageName: node - linkType: hard - -"@typescript-eslint/eslint-plugin@npm:^6.20.0": - version: 6.21.0 - resolution: "@typescript-eslint/eslint-plugin@npm:6.21.0" +"@typescript-eslint/eslint-plugin@npm:^8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.17.0" dependencies: - "@eslint-community/regexpp": "npm:^4.5.1" - "@typescript-eslint/scope-manager": "npm:6.21.0" - "@typescript-eslint/type-utils": "npm:6.21.0" - "@typescript-eslint/utils": "npm:6.21.0" - "@typescript-eslint/visitor-keys": "npm:6.21.0" - debug: "npm:^4.3.4" + "@eslint-community/regexpp": "npm:^4.10.0" + "@typescript-eslint/scope-manager": "npm:8.17.0" + "@typescript-eslint/type-utils": "npm:8.17.0" + "@typescript-eslint/utils": "npm:8.17.0" + "@typescript-eslint/visitor-keys": "npm:8.17.0" graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.4" + ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" + ts-api-utils: "npm:^1.3.0" peerDependencies: - "@typescript-eslint/parser": ^6.0.0 || ^6.0.0-alpha - eslint: ^7.0.0 || ^8.0.0 + "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/f911a79ee64d642f814a3b6cdb0d324b5f45d9ef955c5033e78903f626b7239b4aa773e464a38c3e667519066169d983538f2bf8e5d00228af587c9d438fb344 + checksum: 10c0/d78778173571a9a1370345bc2aa3e850235a489d16b8a8b5ba3086b988bbef7549bdae38e509d7a679ba3179c688cc5a408376b158be402770836e94ffc9602d languageName: node linkType: hard -"@typescript-eslint/parser@npm:^6.20.0": - version: 6.21.0 - resolution: "@typescript-eslint/parser@npm:6.21.0" +"@typescript-eslint/parser@npm:^8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/parser@npm:8.17.0" dependencies: - "@typescript-eslint/scope-manager": "npm:6.21.0" - "@typescript-eslint/types": "npm:6.21.0" - "@typescript-eslint/typescript-estree": "npm:6.21.0" - "@typescript-eslint/visitor-keys": "npm:6.21.0" + "@typescript-eslint/scope-manager": "npm:8.17.0" + "@typescript-eslint/types": "npm:8.17.0" + "@typescript-eslint/typescript-estree": "npm:8.17.0" + "@typescript-eslint/visitor-keys": "npm:8.17.0" debug: "npm:^4.3.4" peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/a8f99820679decd0d115c0af61903fb1de3b1b5bec412dc72b67670bf636de77ab07f2a68ee65d6da7976039bbf636907f9d5ca546db3f0b98a31ffbc225bc7d + checksum: 10c0/2543deadf01302a92d3b6f58a4c14f98d8936c4d976e7da05e3bb65608f19d8de93b25282e343c304eca3e3f37f2ac23e97fa9c11c6edff36dd2d4f6b601a630 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:6.21.0": - version: 6.21.0 - resolution: "@typescript-eslint/scope-manager@npm:6.21.0" +"@typescript-eslint/scope-manager@npm:8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/scope-manager@npm:8.17.0" dependencies: - "@typescript-eslint/types": "npm:6.21.0" - "@typescript-eslint/visitor-keys": "npm:6.21.0" - checksum: 10c0/eaf868938d811cbbea33e97e44ba7050d2b6892202cea6a9622c486b85ab1cf801979edf78036179a8ba4ac26f1dfdf7fcc83a68c1ff66be0b3a8e9a9989b526 + "@typescript-eslint/types": "npm:8.17.0" + "@typescript-eslint/visitor-keys": "npm:8.17.0" + checksum: 10c0/0c08d14240bad4b3f6874f08ba80b29db1a6657437089a6f109db458c544d835bcdc06ba9140bb4f835233ba4326d9a86e6cf6bdb5209960d2f7025aa3191f4f languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:6.21.0": - version: 6.21.0 - resolution: "@typescript-eslint/type-utils@npm:6.21.0" +"@typescript-eslint/type-utils@npm:8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/type-utils@npm:8.17.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:6.21.0" - "@typescript-eslint/utils": "npm:6.21.0" + "@typescript-eslint/typescript-estree": "npm:8.17.0" + "@typescript-eslint/utils": "npm:8.17.0" debug: "npm:^4.3.4" - ts-api-utils: "npm:^1.0.1" + ts-api-utils: "npm:^1.3.0" peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/7409c97d1c4a4386b488962739c4f1b5b04dc60cf51f8cd88e6b12541f84d84c6b8b67e491a147a2c95f9ec486539bf4519fb9d418411aef6537b9c156468117 + checksum: 10c0/6138ec71b5692d4b5e0bf3d7f66a6fa4e91ddea7031907b0ac45a7693df0a2f4cc5bca7218311e0639620d636ceb7efec83a137dfcd5938304d873b774fcc8bd languageName: node linkType: hard -"@typescript-eslint/types@npm:6.21.0": - version: 6.21.0 - resolution: "@typescript-eslint/types@npm:6.21.0" - checksum: 10c0/020631d3223bbcff8a0da3efbdf058220a8f48a3de221563996ad1dcc30d6c08dadc3f7608cc08830d21c0d565efd2db19b557b9528921c78aabb605eef2d74d +"@typescript-eslint/types@npm:8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/types@npm:8.17.0" + checksum: 10c0/26b1bf9dfc3ee783c85c6f354b84c28706d5689d777f3ff2de2cb496e45f9d0189c0d561c03ccbc8b24712438be17cf63dd0871ff3ca2083e7f48749770d1893 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:6.21.0": - version: 6.21.0 - resolution: "@typescript-eslint/typescript-estree@npm:6.21.0" +"@typescript-eslint/typescript-estree@npm:8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.17.0" dependencies: - "@typescript-eslint/types": "npm:6.21.0" - "@typescript-eslint/visitor-keys": "npm:6.21.0" + "@typescript-eslint/types": "npm:8.17.0" + "@typescript-eslint/visitor-keys": "npm:8.17.0" debug: "npm:^4.3.4" - globby: "npm:^11.1.0" + fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" - minimatch: "npm:9.0.3" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^1.3.0" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/af1438c60f080045ebb330155a8c9bb90db345d5069cdd5d01b67de502abb7449d6c75500519df829f913a6b3f490ade3e8215279b6bdc63d0fb0ae61034df5f + checksum: 10c0/523013f9b5cf2c58c566868e4c3b0b9ac1b4807223a6d64e2a7c58e01e53b6587ba61f1a8241eade361f3f426d6057657515473176141ef8aebb352bc0d223ce languageName: node linkType: hard -"@typescript-eslint/utils@npm:6.21.0": - version: 6.21.0 - resolution: "@typescript-eslint/utils@npm:6.21.0" +"@typescript-eslint/utils@npm:8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/utils@npm:8.17.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@types/json-schema": "npm:^7.0.12" - "@types/semver": "npm:^7.5.0" - "@typescript-eslint/scope-manager": "npm:6.21.0" - "@typescript-eslint/types": "npm:6.21.0" - "@typescript-eslint/typescript-estree": "npm:6.21.0" - semver: "npm:^7.5.4" + "@typescript-eslint/scope-manager": "npm:8.17.0" + "@typescript-eslint/types": "npm:8.17.0" + "@typescript-eslint/typescript-estree": "npm:8.17.0" peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - checksum: 10c0/ab2df3833b2582d4e5467a484d08942b4f2f7208f8e09d67de510008eb8001a9b7460f2f9ba11c12086fd3cdcac0c626761c7995c2c6b5657d5fa6b82030a32d + eslint: ^8.57.0 || ^9.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/a9785ae5f7e7b51d521dc3f48b15093948e4fcd03352c0b60f39bae366cbc935947d215f91e2ae3182d52fa6affb5ccbb50feff487bd1209011f3e0da02cdf07 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:6.21.0": - version: 6.21.0 - resolution: "@typescript-eslint/visitor-keys@npm:6.21.0" +"@typescript-eslint/visitor-keys@npm:8.17.0": + version: 8.17.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.17.0" dependencies: - "@typescript-eslint/types": "npm:6.21.0" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10c0/7395f69739cfa1cb83c1fb2fad30afa2a814756367302fb4facd5893eff66abc807e8d8f63eba94ed3b0fe0c1c996ac9a1680bcbf0f83717acedc3f2bb724fbf + "@typescript-eslint/types": "npm:8.17.0" + eslint-visitor-keys: "npm:^4.2.0" + checksum: 10c0/9144c4e4a63034fb2031a0ee1fc77e80594f30cab3faafa9a1f7f83782695774dd32fac8986f260698b4e150b4dd52444f2611c07e4c101501f08353eb47c82c languageName: node linkType: hard @@ -1061,13 +1059,6 @@ __metadata: languageName: node linkType: hard -"array-union@npm:^2.1.0": - version: 2.1.0 - resolution: "array-union@npm:2.1.0" - checksum: 10c0/429897e68110374f39b771ec47a7161fc6a8fc33e196857c0a396dc75df0b5f65e4d046674db764330b6bb66b39ef48dd7c53b6a2ee75cfb0681e0c1a7033962 - languageName: node - linkType: hard - "arrgv@npm:^1.0.2": version: 1.0.2 resolution: "arrgv@npm:1.0.2" @@ -1593,15 +1584,6 @@ __metadata: languageName: node linkType: hard -"dir-glob@npm:^3.0.1": - version: 3.0.1 - resolution: "dir-glob@npm:3.0.1" - dependencies: - path-type: "npm:^4.0.0" - checksum: 10c0/dcac00920a4d503e38bb64001acb19df4efc14536ada475725e12f52c16777afdee4db827f55f13a908ee7efc0cb282e2e3dbaeeb98c0993dd93d1802d3bf00c - languageName: node - linkType: hard - "doctrine@npm:^3.0.0": version: 3.0.0 resolution: "doctrine@npm:3.0.0" @@ -1719,6 +1701,13 @@ __metadata: languageName: node linkType: hard +"eslint-visitor-keys@npm:^4.2.0": + version: 4.2.0 + resolution: "eslint-visitor-keys@npm:4.2.0" + checksum: 10c0/2ed81c663b147ca6f578312919483eb040295bbab759e5a371953456c636c5b49a559883e2677112453728d66293c0a4c90ab11cab3428cf02a0236d2e738269 + languageName: node + linkType: hard + "eslint@npm:^8.56.0": version: 8.57.0 resolution: "eslint@npm:8.57.0" @@ -1870,7 +1859,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": +"fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -2156,20 +2145,6 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.1.0": - version: 11.1.0 - resolution: "globby@npm:11.1.0" - dependencies: - array-union: "npm:^2.1.0" - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.2.9" - ignore: "npm:^5.2.0" - merge2: "npm:^1.4.1" - slash: "npm:^3.0.0" - checksum: 10c0/b39511b4afe4bd8a7aead3a27c4ade2b9968649abab0a6c28b1a90141b96ca68ca5db1302f7c7bd29eab66bf51e13916b8e0a3d0ac08f75e1e84a39b35691189 - languageName: node - linkType: hard - "globby@npm:^14.0.2": version: 14.0.2 resolution: "globby@npm:14.0.2" @@ -2305,6 +2280,13 @@ __metadata: languageName: node linkType: hard +"ignore@npm:^5.3.1": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 + languageName: node + linkType: hard + "import-fresh@npm:^3.2.1": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -2673,7 +2655,7 @@ __metadata: languageName: node linkType: hard -"merge2@npm:^1.3.0, merge2@npm:^1.4.1": +"merge2@npm:^1.3.0": version: 1.4.1 resolution: "merge2@npm:1.4.1" checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb @@ -2737,15 +2719,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:9.0.3": - version: 9.0.3 - resolution: "minimatch@npm:9.0.3" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/85f407dcd38ac3e180f425e86553911d101455ca3ad5544d6a7cec16286657e4f8a9aa6695803025c55e31e35a91a2252b5dc8e7d527211278b8b65b4dbd5eac - languageName: node - linkType: hard - "minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -2755,6 +2728,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed + languageName: node + linkType: hard + "minimist@npm:^1.2.6": version: 1.2.8 resolution: "minimist@npm:1.2.8" @@ -3040,13 +3022,6 @@ __metadata: languageName: node linkType: hard -"path-type@npm:^4.0.0": - version: 4.0.0 - resolution: "path-type@npm:4.0.0" - checksum: 10c0/666f6973f332f27581371efaf303fd6c272cc43c2057b37aa99e3643158c7e4b2626549555d88626e99ea9e046f82f32e41bbde5f1508547e9a11b149b52387c - languageName: node - linkType: hard - "path-type@npm:^5.0.0": version: 5.0.0 resolution: "path-type@npm:5.0.0" @@ -3253,8 +3228,8 @@ __metadata: "@types/eslint": "npm:^8" "@types/fs-extra": "npm:^11" "@types/node": "npm:^22.0.0" - "@typescript-eslint/eslint-plugin": "npm:^6.20.0" - "@typescript-eslint/parser": "npm:^6.20.0" + "@typescript-eslint/eslint-plugin": "npm:^8.17.0" + "@typescript-eslint/parser": "npm:^8.17.0" ava: "npm:^6.2.0" eslint: "npm:^8.56.0" eslint-config-prettier: "npm:^9.1.0" @@ -3263,7 +3238,7 @@ __metadata: patch-package: "npm:^8.0.0" starshipjs: "npm:2.4.1" ts-blank-space: "npm:^0.4.4" - typescript: "npm:~5.6.2" + typescript: "npm:~5.7.2" languageName: unknown linkType: soft @@ -3292,7 +3267,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.5.3": version: 7.6.2 resolution: "semver@npm:7.6.2" bin: @@ -3301,6 +3276,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.6.0": + version: 7.6.3 + resolution: "semver@npm:7.6.3" + bin: + semver: bin/semver.js + checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf + languageName: node + linkType: hard + "serialize-error@npm:^7.0.1": version: 7.0.1 resolution: "serialize-error@npm:7.0.1" @@ -3398,13 +3382,6 @@ __metadata: languageName: node linkType: hard -"slash@npm:^3.0.0": - version: 3.0.0 - resolution: "slash@npm:3.0.0" - checksum: 10c0/e18488c6a42bdfd4ac5be85b2ced3ccd0224773baae6ad42cfbb9ec74fc07f9fa8396bd35ee638084ead7a2a0818eb5e7151111544d4731ce843019dab4be47b - languageName: node - linkType: hard - "slash@npm:^5.1.0": version: 5.1.0 resolution: "slash@npm:5.1.0" @@ -3601,12 +3578,12 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^1.0.1": - version: 1.3.0 - resolution: "ts-api-utils@npm:1.3.0" +"ts-api-utils@npm:^1.3.0": + version: 1.4.3 + resolution: "ts-api-utils@npm:1.4.3" peerDependencies: typescript: ">=4.2.0" - checksum: 10c0/f54a0ba9ed56ce66baea90a3fa087a484002e807f28a8ccb2d070c75e76bde64bd0f6dce98b3802834156306050871b67eec325cb4e918015a360a3f0868c77c + checksum: 10c0/e65dc6e7e8141140c23e1dc94984bf995d4f6801919c71d6dc27cf0cd51b100a91ffcfe5217626193e5bea9d46831e8586febdc7e172df3f1091a7384299e23a languageName: node linkType: hard @@ -3642,7 +3619,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:5.1.6 - 5.7.x": +"typescript@npm:5.1.6 - 5.7.x, typescript@npm:~5.7.2": version: 5.7.2 resolution: "typescript@npm:5.7.2" bin: @@ -3652,17 +3629,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~5.6.2": - version: 5.6.3 - resolution: "typescript@npm:5.6.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/44f61d3fb15c35359bc60399cb8127c30bae554cd555b8e2b46d68fa79d680354b83320ad419ff1b81a0bdf324197b29affe6cc28988cd6a74d4ac60c94f9799 - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A5.1.6 - 5.7.x#optional!builtin": +"typescript@patch:typescript@npm%3A5.1.6 - 5.7.x#optional!builtin, typescript@patch:typescript@npm%3A~5.7.2#optional!builtin": version: 5.7.2 resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=5786d5" bin: @@ -3672,16 +3639,6 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~5.6.2#optional!builtin": - version: 5.6.3 - resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=8c6c40" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/7c9d2e07c81226d60435939618c91ec2ff0b75fbfa106eec3430f0fcf93a584bc6c73176676f532d78c3594fe28a54b36eb40b3d75593071a7ec91301533ace7 - languageName: node - linkType: hard - "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5" From c6ae87332c2952932b5ca1629d77c7fed4411367 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Mon, 2 Dec 2024 15:35:20 -0500 Subject: [PATCH 129/174] refactor: Cleanup #10348 https://github.com/Agoric/agoric-sdk/pull/10348#discussion_r1855150615 --- packages/boot/tools/supports.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/boot/tools/supports.ts b/packages/boot/tools/supports.ts index 967fe12d257..603b8f54cd0 100644 --- a/packages/boot/tools/supports.ts +++ b/packages/boot/tools/supports.ts @@ -681,19 +681,19 @@ export const makeRunPolicyProvider = () => { /** @type {ReturnType | undefined} */ let policy; - let counting = false; + let policyEnabled = false; const meter = harden({ provideRunPolicy: () => { - if (counting && !policy) { + if (policyEnabled && !policy) { policy = computronCounter({ beansPerUnit }); } return policy; }, - /** @param {boolean} x */ - usePolicy: x => { - counting = x; - if (!counting) { + /** @param {boolean} forceEnabled */ + usePolicy: forceEnabled => { + policyEnabled = forceEnabled; + if (!policyEnabled) { policy = undefined; } }, From 50fda75f54adb4558cadb97aec76d2b1c85a67e3 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Mon, 2 Dec 2024 15:35:20 -0500 Subject: [PATCH 130/174] refactor: Cleanup #10348 https://github.com/Agoric/agoric-sdk/pull/10348#discussion_r1855204572 --- packages/cosmic-swingset/src/computron-counter.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/cosmic-swingset/src/computron-counter.js b/packages/cosmic-swingset/src/computron-counter.js index 4db024ca7a0..c21f4150be1 100644 --- a/packages/cosmic-swingset/src/computron-counter.js +++ b/packages/cosmic-swingset/src/computron-counter.js @@ -50,10 +50,7 @@ export function computronCounter( const defaultCleanupBudget = remainingCleanups.default; let cleanupStarted = false; let cleanupDone = false; - const cleanupPossible = - Object.values(remainingCleanups).length > 0 - ? Object.values(remainingCleanups).some(n => n > 0) - : defaultCleanupBudget > 0; + const cleanupPossible = Object.values(remainingCleanups).some(n => n > 0); if (!cleanupPossible) cleanupDone = true; /** @type {() => (false | import('@agoric/swingset-vat').CleanupBudget)} */ const allowCleanup = () => From a0798d295a66753944ff98ba9d570caf4aa47454 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Mon, 2 Dec 2024 15:35:20 -0500 Subject: [PATCH 131/174] refactor: Cleanup #10348 Rename types/functions/parameters as suggested at: * https://github.com/Agoric/agoric-sdk/pull/10348#discussion_r1855147470 * https://github.com/Agoric/agoric-sdk/pull/10348#discussion_r1855150764 --- packages/SwingSet/tools/run-utils.js | 8 +++---- .../test/bootstrapTests/orchestration.test.ts | 22 +++++++++--------- .../bootstrapTests/price-feed-replace.test.ts | 8 +++---- packages/boot/tools/liquidation.ts | 10 ++++---- packages/boot/tools/supports.ts | 23 +++++++++++-------- 5 files changed, 38 insertions(+), 33 deletions(-) diff --git a/packages/SwingSet/tools/run-utils.js b/packages/SwingSet/tools/run-utils.js index d2676f1055b..bdb1a435390 100644 --- a/packages/SwingSet/tools/run-utils.js +++ b/packages/SwingSet/tools/run-utils.js @@ -7,13 +7,13 @@ import { makeQueue } from '@endo/stream'; * @import { RunPolicy } from '../src/types-external.js' */ -/** @typedef {{ provideRunPolicy: () => RunPolicy | undefined }} RunPolicyMaker */ +/** @typedef {{ provideRunPolicy: () => RunPolicy | undefined }} RunHarness */ /** * @param {import('../src/controller/controller.js').SwingsetController} controller - * @param {RunPolicyMaker} [perfTool] + * @param {RunHarness} [harness] */ -export const makeRunUtils = (controller, perfTool) => { +export const makeRunUtils = (controller, harness) => { const mutex = makeQueue(); const logRunFailure = reason => console.log('controller.run() failure', reason); @@ -31,7 +31,7 @@ export const makeRunUtils = (controller, perfTool) => { const queueAndRun = async (deliveryThunk, voidResult = false) => { await mutex.get(); const kpid = await deliveryThunk(); - const runPolicy = perfTool && perfTool.provideRunPolicy(); + const runPolicy = harness && harness.provideRunPolicy(); const runResultP = controller.run(runPolicy); mutex.put(runResultP.catch(logRunFailure)); await runResultP; diff --git a/packages/boot/test/bootstrapTests/orchestration.test.ts b/packages/boot/test/bootstrapTests/orchestration.test.ts index ec95a0c95ef..b51f13e6568 100644 --- a/packages/boot/test/bootstrapTests/orchestration.test.ts +++ b/packages/boot/test/bootstrapTests/orchestration.test.ts @@ -16,12 +16,12 @@ import { } from './walletFactory.js'; import { insistManagerType, - makeRunPolicyProvider, + makeSwingsetHarness, } from '../../tools/supports.js'; const test: TestFn< WalletFactoryTestContext & { - perfTool?: ReturnType; + harness?: ReturnType; } > = anyTest; @@ -40,14 +40,14 @@ const { test.before(async t => { insistManagerType(defaultManagerType); - const perfTool = - defaultManagerType === 'xsnap' ? makeRunPolicyProvider() : undefined; + const harness = + defaultManagerType === 'xsnap' ? makeSwingsetHarness() : undefined; const ctx = await makeWalletFactoryContext( t, '@agoric/vm-config/decentral-itest-orchestration-config.json', - { slogFile, defaultManagerType, perfTool }, + { slogFile, defaultManagerType, harness }, ); - t.context = { ...ctx, perfTool }; + t.context = { ...ctx, harness }; }); test.after.always(t => t.context.shutdown?.()); @@ -123,7 +123,7 @@ test.skip('stakeOsmo - queries', async t => { buildProposal, evalProposal, runUtils: { EV }, - perfTool, + harness, } = t.context; await evalProposal( buildProposal('@agoric/builders/scripts/orchestration/init-stakeOsmo.js'), @@ -162,7 +162,7 @@ test.serial('stakeAtom - smart wallet', async t => { agoricNamesRemotes, bridgeUtils: { flushInboundQueue }, readPublished, - perfTool, + harness, } = t.context; await evalProposal( @@ -173,7 +173,7 @@ test.serial('stakeAtom - smart wallet', async t => { 'agoric1testStakAtom', ); - perfTool?.usePolicy(true); + harness?.useRunPolicy(true); await wd.sendOffer({ id: 'request-account', invitationSpec: { @@ -183,8 +183,8 @@ test.serial('stakeAtom - smart wallet', async t => { }, proposal: {}, }); - perfTool && t.log('makeAccount computrons', perfTool.totalCount()); - perfTool?.usePolicy(false); + harness && t.log('makeAccount computrons', harness.totalComputronCount()); + harness?.useRunPolicy(false); await flushInboundQueue(); t.like(wd.getCurrentWalletRecord(), { diff --git a/packages/boot/test/bootstrapTests/price-feed-replace.test.ts b/packages/boot/test/bootstrapTests/price-feed-replace.test.ts index 3e7876b694c..c9a6178f0fd 100644 --- a/packages/boot/test/bootstrapTests/price-feed-replace.test.ts +++ b/packages/boot/test/bootstrapTests/price-feed-replace.test.ts @@ -64,7 +64,7 @@ test.serial('setupVaults; run updatePriceFeeds proposals', async t => { setupVaults, governanceDriver: gd, readPublished, - perfTool, + harness, } = t.context; await setupVaults(collateralBrandKey, managerIndex, setup); @@ -75,10 +75,10 @@ test.serial('setupVaults; run updatePriceFeeds proposals', async t => { roundId: 1n, }); - perfTool && perfTool.usePolicy(true); + harness && harness.useRunPolicy(true); await priceFeedDrivers[collateralBrandKey].setPrice(15.99); - perfTool && t.log('setPrice computrons', perfTool.totalCount()); - perfTool && perfTool.usePolicy(false); + harness && t.log('setPrice computrons', harness.totalComputronCount()); + harness && harness.useRunPolicy(false); t.like(readPublished('priceFeed.ATOM-USD_price_feed.latestRound'), { roundId: 2n, diff --git a/packages/boot/tools/liquidation.ts b/packages/boot/tools/liquidation.ts index 04fbe9e6499..6b386535ef0 100644 --- a/packages/boot/tools/liquidation.ts +++ b/packages/boot/tools/liquidation.ts @@ -9,7 +9,7 @@ import { } from '@agoric/vats/tools/board-utils.js'; import { Offers } from '@agoric/inter-protocol/src/clientSupport.js'; import type { ExecutionContext } from 'ava'; -import { insistManagerType, makeRunPolicyProvider } from './supports.js'; +import { insistManagerType, makeSwingsetHarness } from './supports.js'; import { type SwingsetTestKit, makeSwingsetTestKit } from './supports.js'; import { type GovernanceDriver, @@ -322,12 +322,12 @@ export const makeLiquidationTestContext = async ( SWINGSET_WORKER_TYPE: defaultManagerType = 'local', } = env; assertManagerType(defaultManagerType); - const perfTool = - defaultManagerType === 'xsnap' ? makeRunPolicyProvider() : undefined; + const harness = + defaultManagerType === 'xsnap' ? makeSwingsetHarness() : undefined; const swingsetTestKit = await makeSwingsetTestKit(t.log, undefined, { slogFile, defaultManagerType, - perfTool, + harness, }); console.time('DefaultTestContext'); @@ -385,7 +385,7 @@ export const makeLiquidationTestContext = async ( refreshAgoricNamesRemotes, walletFactoryDriver, governanceDriver, - perfTool, + harness, }; }; diff --git a/packages/boot/tools/supports.ts b/packages/boot/tools/supports.ts index 603b8f54cd0..0be39b19fa0 100644 --- a/packages/boot/tools/supports.ts +++ b/packages/boot/tools/supports.ts @@ -32,7 +32,7 @@ import { Fail } from '@endo/errors'; import { makeRunUtils, type RunUtils, - type RunPolicyMaker, + type RunHarness, } from '@agoric/swingset-vat/tools/run-utils.js'; import { boardSlottingMarshaller, @@ -83,7 +83,7 @@ type BootstrapEV = EProxy & { const makeBootstrapRunUtils = makeRunUtils as ( controller: SwingsetController, - perfTool?: RunPolicyMaker, + harness?: RunHarness, ) => Omit & { EV: BootstrapEV }; const keysToObject = ( @@ -315,7 +315,7 @@ export const matchIter = (t: AvaT, iter, valueRef) => { * @param [options.profileVats] * @param [options.debugVats] * @param [options.defaultManagerType] - * @param [options.perfTool] + * @param [options.harness] */ export const makeSwingsetTestKit = async ( log: (..._: any[]) => void, @@ -329,7 +329,7 @@ export const makeSwingsetTestKit = async ( profileVats = [] as string[], debugVats = [] as string[], defaultManagerType = 'local' as ManagerType, - perfTool = undefined as RunPolicyMaker | undefined, + harness = undefined as RunHarness | undefined, } = {}, ) => { console.time('makeBaseSwingsetTestKit'); @@ -547,7 +547,7 @@ export const makeSwingsetTestKit = async ( console.timeLog('makeBaseSwingsetTestKit', 'buildSwingset'); - const runUtils = makeBootstrapRunUtils(controller, perfTool); + const runUtils = makeBootstrapRunUtils(controller, harness); const buildProposal = makeProposalExtractor({ childProcess: childProcessAmbient, @@ -670,7 +670,12 @@ export const makeSwingsetTestKit = async ( }; export type SwingsetTestKit = Awaited>; -export const makeRunPolicyProvider = () => { +/** + * Return a harness that can be dynamically configured to provide a computron- + * counting run policy (and queried for the count of computrons recorded since + * the last reset). + */ +export const makeSwingsetHarness = () => { const c2b = defaultBeansPerXsnapComputron; const beansPerUnit = { // see https://cosgov.org/agoric?msgType=parameterChangeProposal&network=main @@ -691,14 +696,14 @@ export const makeRunPolicyProvider = () => { return policy; }, /** @param {boolean} forceEnabled */ - usePolicy: forceEnabled => { + useRunPolicy: forceEnabled => { policyEnabled = forceEnabled; if (!policyEnabled) { policy = undefined; } }, - totalCount: () => (policy?.totalBeans() || 0n) / c2b, - resetPolicy: () => (policy = undefined), + totalComputronCount: () => (policy?.totalBeans() || 0n) / c2b, + resetRunPolicy: () => (policy = undefined), }); return meter; }; From 50b1717c1e40ed67a5e69810961ad8d0144c5f9e Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 27 Nov 2024 18:27:44 -0500 Subject: [PATCH 132/174] feat: `ForwardOptsShape` - shape used for pfm ForwardInfo options --- .../orchestration-imports.test.js.md | 28 +++++++++++ .../orchestration-imports.test.js.snap | Bin 3987 -> 4095 bytes packages/orchestration/src/cosmos-api.ts | 4 ++ packages/orchestration/src/exos/chain-hub.js | 10 ++-- packages/orchestration/src/typeGuards.js | 46 ++++++++++++------ .../orchestration/test/exos/chain-hub.test.ts | 16 +++++- .../test/snapshots/exports.test.ts.md | 1 + .../test/snapshots/exports.test.ts.snap | Bin 689 -> 698 bytes 8 files changed, 83 insertions(+), 22 deletions(-) diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.md b/packages/builders/test/snapshots/orchestration-imports.test.js.md index 879f4029b18..247866d9e3b 100644 --- a/packages/builders/test/snapshots/orchestration-imports.test.js.md +++ b/packages/builders/test/snapshots/orchestration-imports.test.js.md @@ -318,6 +318,20 @@ Generated by [AVA](https://avajs.dev). ], }, }, + ForwardOptsShape: Object @match:splitRecord { + payload: [ + {}, + { + retries: Object @match:kind { + payload: 'number', + }, + timeout: Object @match:string { + payload: [], + }, + }, + {}, + ], + }, IBCChannelIDShape: Object @match:string { payload: [], }, @@ -405,6 +419,20 @@ Generated by [AVA](https://avajs.dev). payload: [ {}, { + forwardOpts: Object @match:splitRecord { + payload: [ + {}, + { + retries: Object @match:kind { + payload: 'number', + }, + timeout: Object @match:string { + payload: [], + }, + }, + {}, + ], + }, memo: Object @match:string { payload: [], }, diff --git a/packages/builders/test/snapshots/orchestration-imports.test.js.snap b/packages/builders/test/snapshots/orchestration-imports.test.js.snap index dba58251741462f8c1e1c312743d2c4078823f05..f1588bc482db490addff528f0ac9c8d3562dabc9 100644 GIT binary patch literal 4095 zcmV8%RzV?im-8Sa5C55&L zr!}-V6sM%7ht@l@JNwNyyJN~ZJtzKSkM{n4zwdtc_1*8@yFNKRl~NP?^dqMvLpD;< z!Pe`<8C8=LgQ}L8m2^WB4Ovw>q=Ok%Gjv&3#Ed?x8v2ow$)sqAyH~CEqYAlyLQv@b zCV=k%I1Au?0E+}*wE)~C0CNKHumHRu06!Lh3Lmh{2W;{I2_JCJ~5lrypnz0BZuko&az-06Y``eh>iO3jm8NfUyc7CREl6LR6^S zq9(H`slL7*LIgq=gjzvJRseCq51}F|)Q+XqtYVC5GdIkN8Og-&BY1R7ncpfJ7OO~k zfKXzTqJLIOs9Mq_ou+oiXGK{VOC~i**Nb-kjk;n|CY5Qmh__W1@#=9^R*KLhf#Tz; zo>uiSU6%}}fkSRqiE5r8th)75N}4f8zDRhJ5bD=Uikjv<@|KISUNS^ERb(uzB5gGp zPA4`KyvD?f*mi=|Z&bAdqLy^350qeR%NV4uzd;z$$#vu7v!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}2gU5Fl|ASCyIAQ)Tu!v*Y*>aDp4T-tVgHb3?#GTycY+;_)Hi@3=zoSuJ4^__rb8 z-?`>cHI3WGuxEuE{N(!EAt1PpSvB3^Go?&MPSYb*!O$P^D|EWQbguI~2h8}x2P?vE z)^_u{V%Bzi9lO*!;cxg$KCtfvTHTzcWo3!Jd_Ch|)m#2>--Ykfllnz9Ezc{eO!vT9 zYAsbvxjc44Ru1WIhsE^FdH5viur8-$WvPJdqjq)K)Qf+Ha~%Z=Nd{@%4FnFU@)7g= zO|!O8H@`YT^ekQdQvyXx$1EFm^?yM~FZa zF$(-Emq}$^@;{@%JEPw2y^(is{TR?R<|SqMh_;OZJ!8NWBQAP~=Ra(3a!&T{ZT{tB z-bar7STT&>JH{^lKQ~4${@+6#zaudw#NUtk{@udUV^vnC6K`J`dp~E68tMPz(6M6t zyho(Y@!ubJcT{!P9sRxI-q*4H<7DDATD7x}v3?DbIv=g*c31>noB&>C z-PculL+r2e+2G}bMc~{7@Fp{Q*kjb4*J9E;&xa=q|M?NzI|=Nc1oD$?l)B5}{_T^% zr#bCNl~;n(lNE3L&yeD<_0K7)tkQJu$5ghY9lmCq?2O?lAU4Gu=&5uv4XmF6HgM{4 tl|%1)$c1ZFp0e$osxsCen*u)0tNvJ7H=Sn}xyEYy{{c{Lp~dDi005lzyq5p~ diff --git a/packages/orchestration/src/cosmos-api.ts b/packages/orchestration/src/cosmos-api.ts index cbbe4658760..c0fc2cf196d 100644 --- a/packages/orchestration/src/cosmos-api.ts +++ b/packages/orchestration/src/cosmos-api.ts @@ -333,6 +333,10 @@ export interface IBCMsgTransferOptions { timeoutHeight?: MsgTransfer['timeoutHeight']; timeoutTimestamp?: MsgTransfer['timeoutTimestamp']; memo?: string; + forwardOpts?: { + timeout?: ForwardInfo['forward']['timeout']; + retries?: ForwardInfo['forward']['retries']; + }; } /** diff --git a/packages/orchestration/src/exos/chain-hub.js b/packages/orchestration/src/exos/chain-hub.js index 6a300fade5a..ce01844bb00 100644 --- a/packages/orchestration/src/exos/chain-hub.js +++ b/packages/orchestration/src/exos/chain-hub.js @@ -11,6 +11,7 @@ import { DenomAmountShape, DenomDetailShape, ForwardInfoShape, + ForwardOptsShape, IBCChannelIDShape, IBCConnectionInfoShape, } from '../typeGuards.js'; @@ -20,7 +21,7 @@ import { getBech32Prefix } from '../utils/address.js'; * @import {NameHub} from '@agoric/vats'; * @import {Vow, VowTools} from '@agoric/vow'; * @import {Zone} from '@agoric/zone'; - * @import {CosmosAssetInfo, CosmosChainInfo, ForwardInfo, IBCConnectionInfo, TransferRoute} from '../cosmos-api.js'; + * @import {CosmosAssetInfo, CosmosChainInfo, ForwardInfo, IBCConnectionInfo, IBCMsgTransferOptions, TransferRoute} from '../cosmos-api.js'; * @import {ChainInfo, KnownChains} from '../chain-info.js'; * @import {ChainAddress, Denom, DenomAmount} from '../orchestration-api.js'; * @import {Remote, TypedPattern} from '@agoric/internal'; @@ -211,10 +212,7 @@ const ChainHubI = M.interface('ChainHub', { getDenom: M.call(BrandShape).returns(M.or(M.string(), M.undefined())), makeChainAddress: M.call(M.string()).returns(ChainAddressShape), makeTransferRoute: M.call(ChainAddressShape, DenomAmountShape, M.string()) - .optional({ - timeout: M.string(), - retries: M.number(), - }) + .optional(ForwardOptsShape) .returns(M.or(M.undefined(), TransferRouteShape)), }); @@ -515,7 +513,7 @@ export const makeChainHub = (zone, agoricNames, vowTools) => { * @param {ChainAddress} destination * @param {DenomAmount} denomAmount * @param {string} srcChainName - * @param {Pick} [forwardOpts] + * @param {IBCMsgTransferOptions['forwardOpts']} [forwardOpts] * @returns {TransferRoute} single hop, multi hop * @throws {Error} if unable to determine route */ diff --git a/packages/orchestration/src/typeGuards.js b/packages/orchestration/src/typeGuards.js index f97f2bb24c0..4496e245643 100644 --- a/packages/orchestration/src/typeGuards.js +++ b/packages/orchestration/src/typeGuards.js @@ -4,7 +4,7 @@ import { M } from '@endo/patterns'; /** * @import {TypedPattern} from '@agoric/internal'; - * @import {ChainAddress, CosmosAssetInfo, Chain, ChainInfo, CosmosChainInfo, DenomAmount, DenomInfo, AmountArg, CosmosValidatorAddress, OrchestrationPowers, ForwardInfo} from './types.js'; + * @import {ChainAddress, CosmosAssetInfo, Chain, ChainInfo, CosmosChainInfo, DenomAmount, DenomInfo, AmountArg, CosmosValidatorAddress, OrchestrationPowers, ForwardInfo, IBCMsgTransferOptions} from './types.js'; * @import {Any as Proto3Msg} from '@agoric/cosmic-proto/google/protobuf/any.js'; * @import {TxBody} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js'; * @import {Coin} from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js'; @@ -39,19 +39,6 @@ harden(ChainAddressShape); export const Proto3Shape = { typeUrl: M.string(), value: M.string() }; harden(ChainAddressShape); -/** @internal */ -export const IBCTransferOptionsShape = M.splitRecord( - {}, - { - timeoutTimestamp: M.bigint(), - timeoutHeight: { - revisionHeight: M.bigint(), - revisionNumber: M.bigint(), - }, - memo: M.string(), - }, -); - /** @internal */ export const IBCChannelIDShape = M.string(); @@ -247,3 +234,34 @@ export const ForwardInfoShape = { }), }; harden(ForwardInfoShape); + +/** + * Caller configurable values of {@link ForwardInfo} + * + * @type {TypedPattern} + */ +export const ForwardOptsShape = M.splitRecord( + {}, + { + timeout: M.string(), + retries: M.number(), + }, + {}, +); + +/** + * @type {TypedPattern} + * @internal + */ +export const IBCTransferOptionsShape = M.splitRecord( + {}, + { + timeoutTimestamp: M.bigint(), + timeoutHeight: { + revisionHeight: M.bigint(), + revisionNumber: M.bigint(), + }, + memo: M.string(), + forwardOpts: ForwardOptsShape, + }, +); diff --git a/packages/orchestration/test/exos/chain-hub.test.ts b/packages/orchestration/test/exos/chain-hub.test.ts index 1a8efc8e762..4148f5a1bf5 100644 --- a/packages/orchestration/test/exos/chain-hub.test.ts +++ b/packages/orchestration/test/exos/chain-hub.test.ts @@ -329,7 +329,7 @@ test('makeTransferRoute - through issuing chain', async t => { }); // use TransferRoute to build a MsgTransfer - if (!route || !('forwardInfo' in route)) { + if (!('forwardInfo' in route)) { throw new Error('forwardInfo not returned'); // appease tsc... } @@ -383,6 +383,18 @@ test('makeTransferRoute - takes forwardOpts', t => { }, }); + t.like( + chainHub.makeTransferRoute(dest, amt, 'osmosis', { timeout: '99min' }), + { + forwardInfo: { + forward: { + timeout: '99min', + }, + }, + }, + 'each field is optional', + ); + // test that typeGuard works t.throws( () => @@ -395,7 +407,7 @@ test('makeTransferRoute - takes forwardOpts', t => { forward: JSON.stringify('stringified nested forward data'), }), ), - { message: /Must not have unexpected properties/ }, + { message: /In "makeTransferRoute" method of/ }, ); }); diff --git a/packages/orchestration/test/snapshots/exports.test.ts.md b/packages/orchestration/test/snapshots/exports.test.ts.md index f4a36635d08..22bf7e69d2d 100644 --- a/packages/orchestration/test/snapshots/exports.test.ts.md +++ b/packages/orchestration/test/snapshots/exports.test.ts.md @@ -23,6 +23,7 @@ Generated by [AVA](https://avajs.dev). 'DenomInfoShape', 'DenomShape', 'ForwardInfoShape', + 'ForwardOptsShape', 'IBCChannelIDShape', 'IBCChannelInfoShape', 'IBCConnectionIDShape', diff --git a/packages/orchestration/test/snapshots/exports.test.ts.snap b/packages/orchestration/test/snapshots/exports.test.ts.snap index 3d9da073d5a8c310ae5fb16b5b2bbbcd5cc14d37..613327cd832180a10fb5f963ed843f8bd908c744 100644 GIT binary patch literal 698 zcmV;r0!95nRzVZiGTZ z*zd+qryq+500000000ARlf7;eK@^40?5^|U1RTftBak1UrQ-!yuNB3J;6U8aG4@Wf zqu4X6nK6k)l>!Oz6oi@rQSb;*QqfZL00<$`fEQ-S*x71V=i77d+V}169 z8E$%vagnl9t_96?CXGHjPg82>lM)XxjnPA9$nAFkJ^=Uv;3t3$0^B3OQvy6Ez&Qav z5#SpE$^mdE03HND767mQe7_BV&jIi~0Mxx@Pvz{aw6@vAe4G&pxYrTMsSE{;^ zjvy%n>yG9%X0>Rk6`vY+t66TfSx?%E3Vp~_D<83b`%4y_YbKBOv>(}JE3UOvH)GnU zVu$bj<~; zeOj04aAGOzE)?xy&eHpOEO^(gzStclcZYUq%J!JaWU4K5!(Ebe6r5eEGb?SlUFC}9 zRIwueyMs=g_PMasrlmG5Ros=PFiaI?514w!yRNA%w=>0#xHe1`wmKGRaSL5%+ZJ3t g;U+7fgyyuvd)#p5u$wNKBh1_2Z_@$-@skAr07~9Rs(J6FWPCfp5S^=mHbuz@|=nlcnc(&-?m)ADz<>a62=JKz zKL{`p0Jj665dbUzUIoDW0QeFB=K-)40{26p69TV8;8O^E4}o7Huvr4`mVjp^;AIJT zTLQk8fS-TPJ7u6oCaRM~Q7s?>SLkEuzeUu@a}3w17J?}~}c_(Yu>nr0p`>+V_* zmztQf`b?pF+BN6CC)I!|cIoeVH|*wa94Ax=o;B+pQgKVWfQ=b_qj-nCt9@1(ye@NeU>YIqjrb XYEtg79hb}z=56pd&!i?GZ3O@T#M(L% From c35fac7e82e6b66d2ffdc62ded1ba29a7d7388ff Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 27 Nov 2024 19:21:01 -0500 Subject: [PATCH 133/174] feat(local-orchestration-account): support multi-hop pfm transfers --- packages/orchestration/src/cosmos-api.ts | 1 + packages/orchestration/src/exos/chain-hub.js | 6 +- .../src/exos/local-orchestration-account.js | 70 +++++++------- .../orchestration/src/orchestration-api.ts | 4 +- .../orchestration/test/exos/chain-hub.test.ts | 6 +- .../local-orchestration-account-kit.test.ts | 96 ++++++++++++++++--- 6 files changed, 127 insertions(+), 56 deletions(-) diff --git a/packages/orchestration/src/cosmos-api.ts b/packages/orchestration/src/cosmos-api.ts index c0fc2cf196d..661d92a23d5 100644 --- a/packages/orchestration/src/cosmos-api.ts +++ b/packages/orchestration/src/cosmos-api.ts @@ -401,5 +401,6 @@ export type TransferRoute = { } | { receiver: string; + forwardInfo?: never; } ); diff --git a/packages/orchestration/src/exos/chain-hub.js b/packages/orchestration/src/exos/chain-hub.js index ce01844bb00..1477ca91de8 100644 --- a/packages/orchestration/src/exos/chain-hub.js +++ b/packages/orchestration/src/exos/chain-hub.js @@ -544,7 +544,7 @@ export const makeChainHub = (zone, agoricNames, vowTools) => { // TODO use getConnectionInfo once its sync const connKey = connectionKey(holdingChainId, destination.chainId); connectionInfos.has(connKey) || - Fail`no connection info found for ${q(connKey)}`; + Fail`no connection info found for ${holdingChainId}<->${destination.chainId}`; const { transferChannel } = denormalizeConnectionInfo( holdingChainId, // from chain (primary) @@ -568,11 +568,11 @@ export const makeChainHub = (zone, agoricNames, vowTools) => { // TODO use getConnectionInfo once its sync const currToIssuerKey = connectionKey(holdingChainId, baseChainId); connectionInfos.has(currToIssuerKey) || - Fail`no connection info found for ${q(currToIssuerKey)}`; + Fail`no connection info found for ${holdingChainId}<->${baseChainId}`; const issuerToDestKey = connectionKey(baseChainId, destination.chainId); connectionInfos.has(issuerToDestKey) || - Fail`no connection info found for ${q(issuerToDestKey)}`; + Fail`no connection info found for ${baseChainId}<->${destination.chainId}`; const currToIssuer = denormalizeConnectionInfo( holdingChainId, diff --git a/packages/orchestration/src/exos/local-orchestration-account.js b/packages/orchestration/src/exos/local-orchestration-account.js index 7ab823a0719..153b86ecd69 100644 --- a/packages/orchestration/src/exos/local-orchestration-account.js +++ b/packages/orchestration/src/exos/local-orchestration-account.js @@ -11,7 +11,6 @@ import { Fail, q } from '@endo/errors'; import { AmountArgShape, AnyNatAmountsRecord, - ChainAddressShape, DenomAmountShape, DenomShape, IBCTransferOptionsShape, @@ -24,11 +23,12 @@ import { makeTimestampHelper } from '../utils/time.js'; import { preparePacketTools } from './packet-tools.js'; import { prepareIBCTools } from './ibc-packet.js'; import { coerceCoin, coerceDenomAmount } from '../utils/amounts.js'; +import { TransferRouteShape } from './chain-hub.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, TransferRoute} from '@agoric/orchestration'; * @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'. * @import {Zone} from '@agoric/zone'; * @import {Remote} from '@agoric/internal'; @@ -107,7 +107,7 @@ export const prepareLocalOrchestrationAccountKit = ( zoeTools, }, ) => { - const { watch, allVows, asVow, when } = vowTools; + const { watch, asVow, when } = vowTools; const { makeIBCTransferSender } = prepareIBCTools( zone.subZone('ibcTools'), vowTools, @@ -134,11 +134,10 @@ export const prepareLocalOrchestrationAccountKit = ( .returns(VowShape), }), transferWatcher: M.interface('transferWatcher', { - onFulfilled: M.call([M.record(), M.nat()]) + onFulfilled: M.call(M.nat()) .optional({ - destination: ChainAddressShape, opts: M.or(M.undefined(), IBCTransferOptionsShape), - amount: DenomAmountShape, + route: TransferRouteShape, }) .returns(Vow$(M.record())), }), @@ -345,37 +344,34 @@ export const prepareLocalOrchestrationAccountKit = ( }, transferWatcher: { /** - * @param {[ - * { transferChannel: IBCConnectionInfo['transferChannel'] }, - * bigint, - * ]} results + * @param {bigint} timeoutTimestamp * @param {{ - * destination: ChainAddress; - * opts?: IBCMsgTransferOptions; - * amount: DenomAmount; + * opts?: Omit; + * route: TransferRoute; * }} ctx */ - onFulfilled( - [{ transferChannel }, timeoutTimestamp], - { opts, amount, destination }, - ) { + onFulfilled(timeoutTimestamp, { opts, route }) { + const { forwardInfo, ...transferDetails } = route; + /** @type {string | undefined} */ + let memo; + if (opts && 'memo' in opts) { + memo = opts.memo; + } + if (forwardInfo) { + // forward memo takes precedence + memo = JSON.stringify(forwardInfo); + } const transferMsg = typedJson( '/ibc.applications.transfer.v1.MsgTransfer', { - sourcePort: transferChannel.portId, - sourceChannel: transferChannel.channelId, - token: { - amount: String(amount.value), - denom: amount.denom, - }, + ...transferDetails, sender: this.state.address.value, - receiver: destination.value, timeoutHeight: opts?.timeoutHeight ?? { revisionHeight: 0n, revisionNumber: 0n, }, timeoutTimestamp, - memo: opts?.memo ?? '', + memo: memo ?? '', }, ); @@ -682,16 +678,23 @@ export const prepareLocalOrchestrationAccountKit = ( * timeoutTimestamp are not supplied, a default timeoutTimestamp will * be set for 5 minutes in the future * @returns {Vow} + * @throws {Error} if route is not determinable, asset is not + * recognized, or the transfer is rejected (insufficient funds, + * timeout) */ transfer(destination, amount, opts) { return asVow(() => { trace('Transferring funds from LCA over IBC'); + const denomAmount = coerceDenomAmount(chainHub, amount); - const connectionInfoV = watch( - chainHub.getConnectionInfo( - this.state.address.chainId, - destination.chainId, - ), + const { forwardOpts, ...rest } = opts ?? {}; + + // throws if route is not determinable + const route = chainHub.makeTransferRoute( + destination, + denomAmount, + 'agoric', + forwardOpts, ); // set a `timeoutTimestamp` if caller does not supply either `timeoutHeight` or `timeoutTimestamp` @@ -705,12 +708,11 @@ export const prepareLocalOrchestrationAccountKit = ( // 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]), + timeoutTimestampVowOrValue, this.facets.transferWatcher, { - opts, - amount: coerceDenomAmount(chainHub, amount), - destination, + opts: rest, + route, }, ); return resultV; diff --git a/packages/orchestration/src/orchestration-api.ts b/packages/orchestration/src/orchestration-api.ts index 2294f376dce..cb97cadcc56 100644 --- a/packages/orchestration/src/orchestration-api.ts +++ b/packages/orchestration/src/orchestration-api.ts @@ -195,8 +195,8 @@ export interface OrchestrationAccountI { * @param destination - the account to transfer the amount to. * @param [opts] - an optional memo to include with the transfer, which could drive custom PFM behavior, and timeout parameters * @returns void - * - * TODO document the mapping from the address to the destination chain. + * @throws {Error} if route is not determinable, asset is not recognized, or + * the transfer is rejected (insufficient funds, timeout) */ transfer: ( destination: ChainAddress, diff --git a/packages/orchestration/test/exos/chain-hub.test.ts b/packages/orchestration/test/exos/chain-hub.test.ts index 4148f5a1bf5..c8ba5c32a2c 100644 --- a/packages/orchestration/test/exos/chain-hub.test.ts +++ b/packages/orchestration/test/exos/chain-hub.test.ts @@ -488,7 +488,7 @@ test('makeTransferRoute - no connection info single hop', t => { harden({ denom: uusdcOnAgoric, value: 100n }), 'agoric', ), - { message: 'no connection info found for "agoric-3_noble-1"' }, + { message: 'no connection info found for "agoric-3"<->"noble-1"' }, ); }); @@ -517,7 +517,7 @@ test('makeTransferRoute - no connection info multi hop', t => { harden({ denom: uusdcOnAgoric, value: 100n }), 'agoric', ), - { message: 'no connection info found for "noble-1_osmosis-1"' }, + { message: 'no connection info found for "noble-1"<->"osmosis-1"' }, ); // transfer USDC on osmosis to agoric @@ -528,7 +528,7 @@ test('makeTransferRoute - no connection info multi hop', t => { harden({ denom: uusdcOnOsmosis, value: 100n }), 'osmosis', ), - { message: 'no connection info found for "noble-1_osmosis-1"' }, + { message: 'no connection info found for "osmosis-1"<->"noble-1"' }, ); }); 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..8fe222f00aa 100644 --- a/packages/orchestration/test/exos/local-orchestration-account-kit.test.ts +++ b/packages/orchestration/test/exos/local-orchestration-account-kit.test.ts @@ -9,13 +9,22 @@ 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 { ChainAddress, AmountArg } from '../../src/orchestration-api.js'; +import type { IBCChannelID } from '@agoric/vats'; +import type { + ChainAddress, + AmountArg, + DenomAmount, +} from '../../src/orchestration-api.js'; import { maxClockSkew } from '../../src/utils/cosmos.js'; import { NANOSECONDS_PER_SECOND } from '../../src/utils/time.js'; 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 type { IBCMsgTransferOptions } from '../../src/cosmos-api.js'; +import { PFM_RECEIVER } from '../../src/exos/chain-hub.js'; +import { assetOn } from '../../src/utils/asset.js'; test('deposit, withdraw', async t => { const common = await commonSetup(t); @@ -108,12 +117,12 @@ test('transfer', async t => { const { brands: { bld: stake }, mocks: { transferBridge }, - utils, + utils: { inspectLocalBridge, pourPayment }, } = common; t.truthy(account, 'account is returned'); - const oneHundredStakePmt = await utils.pourPayment(stake.units(100)); + const oneHundredStakePmt = await pourPayment(stake.units(100)); t.log('deposit 100 bld to account'); await VE(account).deposit(oneHundredStakePmt); @@ -127,7 +136,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; @@ -142,7 +150,7 @@ test('transfer', async t => { const startTransfer = async ( amount: AmountArg, dest: ChainAddress, - opts = {}, + opts: IBCMsgTransferOptions = {}, ) => { const transferP = VE(account).transfer(dest, amount, opts); lastSequence += 1n; @@ -163,16 +171,15 @@ test('transfer', async t => { buildVTransferEvent({ receiver: destination.value, sender, - sourceChannel, + sourceChannel: + fetchedChainInfo.agoric.connections[destination.chainId].transferChannel + .channelId, sequence: lastSequence, }), ); const transferRes = await transferP; - t.true( - transferRes === undefined, - 'Successful transfer returns Promise.', - ); + t.true(transferRes === undefined, 'Successful transfer returns Vow.'); await t.throwsAsync( ( @@ -194,7 +201,7 @@ test('transfer', async t => { // XXX dev has to know not to startTransfer here await t.throwsAsync( VE(account).transfer(unknownDestination, { denom: 'ubld', value: 1n }), - { message: /connection not found: agoric-3<->fakenet/ }, + { message: 'no connection info found for "agoric-3"<->"fakenet"' }, 'cannot create transfer msg with unknown chainId', ); @@ -203,11 +210,13 @@ test('transfer', async t => { * @param amount * @param dest * @param opts + * @param sourceChannel */ const doTransfer = async ( amount: AmountArg, dest: ChainAddress, - opts = {}, + opts: IBCMsgTransferOptions = {}, + sourceChannel?: IBCChannelID, ) => { const { transferP: promise } = await startTransfer(amount, dest, opts); // simulate incoming message so that promise resolves @@ -215,20 +224,33 @@ test('transfer', async t => { buildVTransferEvent({ receiver: dest.value, sender, - sourceChannel, + sourceChannel: + sourceChannel || + fetchedChainInfo.agoric.connections[dest.chainId].transferChannel + .channelId, sequence: lastSequence, }), ); return promise; }; + const lastestTxMsg = () => { + const tx = inspectLocalBridge().at(-1); + if (tx.type !== 'VLOCALCHAIN_EXECUTE_TX') { + throw new Error('last message was not VLOCALCHAIN_EXECUTE_TX'); + } + return tx.messages[0]; + }; + await t.notThrowsAsync( doTransfer({ denom: 'ubld', value: 10n }, destination, { memo: 'hello', }), 'can create transfer msg with memo', ); - // TODO, intercept/spy the bridge message to see that it has a memo + t.like(lastestTxMsg(), { + memo: 'hello', + }); await t.notThrowsAsync( doTransfer({ denom: 'ubld', value: 10n }, destination, { @@ -244,6 +266,52 @@ test('transfer', async t => { }), 'accepts custom timeoutHeight', ); + + const [uusdcOnAgoric] = assetOn('uusdc', 'noble', 'agoric', fetchedChainInfo); + const dydxDest: ChainAddress = { + chainId: 'dydx-mainnet-1', + encoding: 'bech32', + value: 'dydx1test', + }; + const aDenomAmount: DenomAmount = { + denom: uusdcOnAgoric, + value: 100n, + }; + + t.log('Transfer handles multi-hop transfers'); + await t.notThrowsAsync( + doTransfer( + aDenomAmount, + dydxDest, + {}, + fetchedChainInfo.agoric.connections['noble-1'].transferChannel.channelId, + ), + ); + + t.like(lastestTxMsg(), { + receiver: PFM_RECEIVER, + memo: '{"forward":{"receiver":"dydx1test","port":"transfer","channel":"channel-33","retries":3,"timeout":"10min"}}', + }); + + t.log('accepts pfm `forwardOpts`'); + await t.notThrowsAsync( + doTransfer( + aDenomAmount, + dydxDest, + { + forwardOpts: { + timeout: '999min', + }, + }, + fetchedChainInfo.agoric.connections['noble-1'].transferChannel.channelId, + ), + ); + + t.like(JSON.parse(lastestTxMsg().memo), { + forward: { + timeout: '999min', + }, + }); }); test('monitor transfers', async t => { From 05aa139f4dd850e5f6ad3018e500c7d6f3f6b22b Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 27 Nov 2024 20:46:52 -0500 Subject: [PATCH 134/174] test: `chainHub` test support - 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` --- packages/orchestration/src/utils/asset.js | 17 ++++--- .../orchestration/test/exos/chain-hub.test.ts | 2 + .../exos/cosmos-orchestration-account.test.ts | 6 ++- .../local-orchestration-account-kit.test.ts | 15 ++++++- .../test/exos/make-test-coa-kit.ts | 4 -- .../test/exos/make-test-loa-kit.ts | 3 -- .../test/exos/portfolio-holder-kit.test.ts | 1 + packages/orchestration/test/supports.ts | 45 ++++++++++++------- 8 files changed, 59 insertions(+), 34 deletions(-) diff --git a/packages/orchestration/src/utils/asset.js b/packages/orchestration/src/utils/asset.js index 3a39da7135b..2f4efccd998 100644 --- a/packages/orchestration/src/utils/asset.js +++ b/packages/orchestration/src/utils/asset.js @@ -8,19 +8,18 @@ import { denomHash } from './denomHash.js'; * Helper function for creating {@link DenomDetail} data for {@link ChainHub} * asset registration. * - * TODO #10580 remove 'brandKey' in favor of `LegibleCapData` - * * @param {Denom} baseDenom * @param {string} baseName + * @param {Brand<'nat'>} [brand] * @param {string} [chainName] * @param {Record} [infoOf] - * @param {string} [brandKey] - * @returns {[string, DenomDetail & { brandKey?: string }]} + * @returns {[string, DenomDetail]} */ -export const assetOn = (baseDenom, baseName, chainName, infoOf, brandKey) => { - if (!chainName) { - return [baseDenom, { baseName, chainName: baseName, baseDenom }]; - } +export const assetOn = (baseDenom, baseName, brand, chainName, infoOf) => { + const baseDetail = { baseName, chainName: chainName || baseName, baseDenom }; + const detail = brand ? { ...baseDetail, brand } : baseDetail; + if (!chainName) return harden([baseDenom, detail]); + if (!infoOf) throw Error(`must provide infoOf`); const issuerInfo = infoOf[baseName]; const holdingInfo = infoOf[chainName]; @@ -30,5 +29,5 @@ export const assetOn = (baseDenom, baseName, chainName, infoOf, brandKey) => { const { channelId } = holdingInfo.connections[issuerInfo.chainId].transferChannel; const denom = `ibc/${denomHash({ denom: baseDenom, channelId })}`; - return [denom, { baseName, chainName, baseDenom, brandKey }]; + return harden([denom, detail]); }; diff --git a/packages/orchestration/test/exos/chain-hub.test.ts b/packages/orchestration/test/exos/chain-hub.test.ts index c8ba5c32a2c..02505f41778 100644 --- a/packages/orchestration/test/exos/chain-hub.test.ts +++ b/packages/orchestration/test/exos/chain-hub.test.ts @@ -201,12 +201,14 @@ test('makeChainAddress', async t => { const [uusdcOnAgoric, agDetail] = assetOn( 'uusdc', 'noble', + undefined, 'agoric', knownChains, ); const [uusdcOnOsmosis, osDetail] = assetOn( 'uusdc', 'noble', + undefined, 'osmosis', knownChains, ); diff --git a/packages/orchestration/test/exos/cosmos-orchestration-account.test.ts b/packages/orchestration/test/exos/cosmos-orchestration-account.test.ts index d3454066473..f88664fad1d 100644 --- a/packages/orchestration/test/exos/cosmos-orchestration-account.test.ts +++ b/packages/orchestration/test/exos/cosmos-orchestration-account.test.ts @@ -67,8 +67,9 @@ test.beforeEach(async t => { test('send (to addr on same chain)', async t => { const { brands: { ist }, - utils: { inspectDibcBridge }, + utils: { inspectDibcBridge, populateChainHub }, } = t.context; + populateChainHub(); const makeTestCOAKit = prepareMakeTestCOAKit(t, t.context); const account = await makeTestCOAKit(); t.assert(account, 'account is returned'); @@ -122,9 +123,10 @@ test('transfer', async t => { const { brands: { ist }, facadeServices: { chainHub }, - utils: { inspectDibcBridge }, + utils: { inspectDibcBridge, populateChainHub }, mocks: { ibcBridge }, } = t.context; + populateChainHub(); const mockIbcTransfer = { sourcePort: 'transfer', 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 8fe222f00aa..afec573e19c 100644 --- a/packages/orchestration/test/exos/local-orchestration-account-kit.test.ts +++ b/packages/orchestration/test/exos/local-orchestration-account-kit.test.ts @@ -28,6 +28,7 @@ import { assetOn } from '../../src/utils/asset.js'; test('deposit, withdraw', async t => { const common = await commonSetup(t); + common.utils.populateChainHub(); const makeTestLOAKit = prepareMakeTestLOAKit(t, common); const account = await makeTestLOAKit(); @@ -73,6 +74,7 @@ test('deposit, withdraw', async t => { test('delegate, undelegate', async t => { const common = await commonSetup(t); + common.utils.populateChainHub(); const makeTestLOAKit = prepareMakeTestLOAKit(t, common); const account = await makeTestLOAKit(); @@ -109,6 +111,7 @@ test('delegate, undelegate', async t => { test('transfer', async t => { const common = await commonSetup(t); + common.utils.populateChainHub(); const makeTestLOAKit = prepareMakeTestLOAKit(t, common); const account = await makeTestLOAKit(); @@ -267,7 +270,13 @@ test('transfer', async t => { 'accepts custom timeoutHeight', ); - const [uusdcOnAgoric] = assetOn('uusdc', 'noble', 'agoric', fetchedChainInfo); + const [uusdcOnAgoric] = assetOn( + 'uusdc', + 'noble', + undefined, + 'agoric', + fetchedChainInfo, + ); const dydxDest: ChainAddress = { chainId: 'dydx-mainnet-1', encoding: 'bech32', @@ -316,6 +325,7 @@ test('transfer', async t => { test('monitor transfers', async t => { const common = await commonSetup(t); + common.utils.populateChainHub(); const makeTestLOAKit = prepareMakeTestLOAKit(t, common); const account = await makeTestLOAKit(); const { @@ -360,6 +370,7 @@ test('monitor transfers', async t => { test('send', async t => { const common = await commonSetup(t); + common.utils.populateChainHub(); const makeTestLOAKit = prepareMakeTestLOAKit(t, common); const account = await makeTestLOAKit(); t.truthy(account, 'account is returned'); @@ -420,6 +431,7 @@ test('send', async t => { test('getBalance', async t => { const common = await commonSetup(t); + common.utils.populateChainHub(); const makeTestLOAKit = prepareMakeTestLOAKit(t, common); const account = await makeTestLOAKit(); t.truthy(account, 'account is returned'); @@ -474,6 +486,7 @@ test('getBalance', async t => { test('getBalances', async t => { const common = await commonSetup(t); + common.utils.populateChainHub(); const makeTestLOAKit = prepareMakeTestLOAKit(t, common); const account = await makeTestLOAKit(); t.truthy(account, 'account is returned'); diff --git a/packages/orchestration/test/exos/make-test-coa-kit.ts b/packages/orchestration/test/exos/make-test-coa-kit.ts index 6042091b31a..f1b63c50550 100644 --- a/packages/orchestration/test/exos/make-test-coa-kit.ts +++ b/packages/orchestration/test/exos/make-test-coa-kit.ts @@ -83,10 +83,6 @@ export const prepareMakeTestCOAKit = ( timer, }, ); - - t.log('register Agoric chain and BLD in ChainHub'); - utils.registerAgoricBld(); - 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..8bb57055d0b 100644 --- a/packages/orchestration/test/exos/make-test-loa-kit.ts +++ b/packages/orchestration/test/exos/make-test-loa-kit.ts @@ -63,9 +63,6 @@ export const prepareMakeTestLOAKit = ( }), storageNode: storageNode.makeChildNode(address), }); - - t.log('register Agoric chain and BLD in ChainHub'); - utils.registerAgoricBld(); return account; }; }; diff --git a/packages/orchestration/test/exos/portfolio-holder-kit.test.ts b/packages/orchestration/test/exos/portfolio-holder-kit.test.ts index a498b9b0c2c..b456399b57c 100644 --- a/packages/orchestration/test/exos/portfolio-holder-kit.test.ts +++ b/packages/orchestration/test/exos/portfolio-holder-kit.test.ts @@ -8,6 +8,7 @@ import { prepareMakeTestCOAKit } from './make-test-coa-kit.js'; test('portfolio holder kit behaviors', async t => { const common = await commonSetup(t); + common.utils.populateChainHub(); const { rootZone, storage, vowTools } = common.bootstrap; const storageNode = storage.rootNode.makeChildNode('accounts'); diff --git a/packages/orchestration/test/supports.ts b/packages/orchestration/test/supports.ts index 6486a7ffbaa..0454f493eb3 100644 --- a/packages/orchestration/test/supports.ts +++ b/packages/orchestration/test/supports.ts @@ -26,6 +26,9 @@ import { prepareCosmosInterchainService } from '../src/exos/cosmos-interchain-se import fetchedChainInfo from '../src/fetched-chain-info.js'; import { buildVTransferEvent } from '../tools/ibc-mocks.js'; import { setupFakeNetwork } from './network-fakes.js'; +import { withChainCapabilities } from '../src/chain-capabilities.js'; +import { registerChainsAndAssets } from '../src/utils/chain-hub-helper.js'; +import { assetOn } from '../src/utils/asset.js'; export { makeFakeLocalchainBridge, @@ -168,22 +171,32 @@ export const commonSetup = async (t: ExecutionContext) => { vowTools, ); + /** add `pfmEnabled` to chainInfo */ + const chainInfoWithCaps = withChainCapabilities(fetchedChainInfo); + + /** for registration with `ChainHub` */ + const commonAssetInfo = harden([ + assetOn('ubld', 'agoric', bldSansMint.brand), + assetOn('uist', 'agoric', istSansMint.brand), + assetOn('uusdc', 'noble', undefined, 'agoric', chainInfoWithCaps), + assetOn('uatom', 'cosmoshub', undefined, 'agoric', chainInfoWithCaps), + assetOn('uusdc', 'noble', undefined, 'dydx', chainInfoWithCaps), + ]); + /** - * Register BLD if it's not already registered. - * Does not work with `withOrchestration` contracts, as these have their own - * ChainHub. Use `ChainHubAdmin` instead. + * Register known chains an assets into the test context's `ChainHub`. + * + * For contract tests with contracts that use `withOrchestration`, access + * `chainInfo` and `assetInfo` from `commonPrivateArgs` and register in the + * contract's ChainHub with `registerChainsAndAssets`. */ - const registerAgoricBld = () => { - if (!chainHub.getAsset('ubld', 'agoric')) { - chainHub.registerChain('agoric', fetchedChainInfo.agoric); - chainHub.registerAsset('ubld', { - chainName: 'agoric', - baseName: 'agoric', - baseDenom: 'ubld', - brand: bld.brand, - }); - } - }; + const populateChainHub = () => + registerChainsAndAssets( + chainHub, + harden({ BLD: bldSansMint.brand, IST: istSansMint.brand }), + chainInfoWithCaps, + commonAssetInfo, + ); return { bootstrap: { @@ -214,6 +227,8 @@ export const commonSetup = async (t: ExecutionContext) => { storageNode: storage.rootNode, marshaller, timerService: timer, + chainInfo: withChainCapabilities(fetchedChainInfo), + assetInfo: harden(commonAssetInfo), }, facadeServices: { agoricNames, @@ -227,7 +242,7 @@ export const commonSetup = async (t: ExecutionContext) => { inspectLocalBridge: () => harden([...localBridgeMessages]), inspectDibcBridge: () => E(ibcBridge).inspectDibcBridge(), inspectBankBridge: () => harden([...bankBridgeMessages]), - registerAgoricBld, + populateChainHub, transmitTransferAck, }, }; From e8b37a8ae6685b0528054c4c78d3d09a1cecee71 Mon Sep 17 00:00:00 2001 From: Ikenna Omekam Date: Fri, 1 Nov 2024 10:48:21 -0500 Subject: [PATCH 135/174] timestamp durable --- .../src/exos/local-orchestration-account.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/orchestration/src/exos/local-orchestration-account.js b/packages/orchestration/src/exos/local-orchestration-account.js index 153b86ecd69..20285c1c9b2 100644 --- a/packages/orchestration/src/exos/local-orchestration-account.js +++ b/packages/orchestration/src/exos/local-orchestration-account.js @@ -391,9 +391,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}`; @@ -500,9 +498,7 @@ export const prepareLocalOrchestrationAccountKit = ( }); }); }, - /** - * @type {HostOf} - */ + /** @type {HostOf} */ getBalance(denomArg) { return asVow(() => { const [brand, denom] = @@ -545,9 +541,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 @@ -703,7 +697,7 @@ export const prepareLocalOrchestrationAccountKit = ( 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 From 5e048af2af3cb1c86f6e42229600251a3cd1dbc5 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 25 Nov 2024 21:55:10 -0500 Subject: [PATCH 136/174] refactor: cosmos-orchestration-account-kit.test.ts 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`. marked as failing for now - filed #10449 since this surfaced a bug in `amountToCoin` - use Moolah issuer for "no denom for brand" failure path tests --- .../test/bootstrapTests/orchestration.test.ts | 4 +- .../examples/staking-combinations.contract.js | 1 + .../examples/staking-combinations.flows.js | 13 ++- .../src/exos/cosmos-orchestration-account.js | 2 + .../exos/cosmos-orchestration-account.test.ts | 104 +++++++++++++++--- packages/orchestration/test/supports.ts | 1 + 6 files changed, 106 insertions(+), 19 deletions(-) diff --git a/packages/boot/test/bootstrapTests/orchestration.test.ts b/packages/boot/test/bootstrapTests/orchestration.test.ts index b51f13e6568..fa976fd7dac 100644 --- a/packages/boot/test/bootstrapTests/orchestration.test.ts +++ b/packages/boot/test/bootstrapTests/orchestration.test.ts @@ -266,7 +266,9 @@ test.serial('stakeAtom - smart wallet', async t => { proposal: {}, }), { - message: 'No denom for brand [object Alleged: ATOM brand]', + // TODO #10449 + message: + "'amountToCoin' not working for \"[Alleged: ATOM brand]\" until #10449; use 'DenomAmount' for now", }, ); }); diff --git a/packages/orchestration/src/examples/staking-combinations.contract.js b/packages/orchestration/src/examples/staking-combinations.contract.js index b38da6633d6..209fe7dc787 100644 --- a/packages/orchestration/src/examples/staking-combinations.contract.js +++ b/packages/orchestration/src/examples/staking-combinations.contract.js @@ -131,6 +131,7 @@ const contract = async ( ); const orchFns = orchestrateAll(flows, { + chainHub, sharedLocalAccountP, makeCombineInvitationMakers, makeExtraInvitationMaker, diff --git a/packages/orchestration/src/examples/staking-combinations.flows.js b/packages/orchestration/src/examples/staking-combinations.flows.js index 23b1583ce58..794d13099f8 100644 --- a/packages/orchestration/src/examples/staking-combinations.flows.js +++ b/packages/orchestration/src/examples/staking-combinations.flows.js @@ -1,6 +1,6 @@ /** * @import {GuestInterface} from '@agoric/async-flow'; - * @import {Orchestrator, OrchestrationFlow, AmountArg, CosmosValidatorAddress, ChainAddress, LocalAccountMethods, OrchestrationAccountI} from '../types.js' + * @import {Orchestrator, OrchestrationFlow, AmountArg, CosmosValidatorAddress, ChainAddress, LocalAccountMethods, OrchestrationAccountI, ChainHub} from '../types.js' * @import {ContinuingOfferResult, InvitationMakers} from '@agoric/smart-wallet/src/types.js'; * @import {LocalOrchestrationAccountKit} from '../exos/local-orchestration-account.js'; * @import {MakeCombineInvitationMakers} from '../exos/combine-invitation-makers.js'; @@ -9,7 +9,7 @@ */ import { mustMatch } from '@endo/patterns'; -import { makeError, q } from '@endo/errors'; +import { Fail, makeError, q } from '@endo/errors'; import { makeTracer } from '@agoric/internal'; import { ChainAddressShape } from '../typeGuards.js'; @@ -48,6 +48,7 @@ harden(makeAccount); * @satisfies {OrchestrationFlow} * @param {Orchestrator} orch * @param {object} ctx + * @param {GuestInterface} ctx.chainHub * @param {Promise>} ctx.sharedLocalAccountP * @param {GuestInterface} ctx.zoeTools * @param {GuestInterface} account @@ -57,7 +58,7 @@ harden(makeAccount); */ export const depositAndDelegate = async ( orch, - { sharedLocalAccountP, zoeTools }, + { chainHub, sharedLocalAccountP, zoeTools }, account, seat, validator, @@ -84,7 +85,11 @@ export const depositAndDelegate = async ( throw errMsg; } seat.exit(); - await account.delegate(validator, give.Stake); + const denom = chainHub.getDenom(give.Stake.brand); + if (!denom) throw Fail`unknown brand ${q(give.Stake.brand)}`; + // TODO #10449 amountToCoin accepts brands + const denomAmount = harden({ denom, value: give.Stake.value }); + await account.delegate(validator, denomAmount); }; harden(depositAndDelegate); diff --git a/packages/orchestration/src/exos/cosmos-orchestration-account.js b/packages/orchestration/src/exos/cosmos-orchestration-account.js index cc33d39c448..843bb10fbb5 100644 --- a/packages/orchestration/src/exos/cosmos-orchestration-account.js +++ b/packages/orchestration/src/exos/cosmos-orchestration-account.js @@ -340,6 +340,8 @@ export const prepareCosmosOrchestrationAccountKit = ( * @returns {Coin} */ amountToCoin(amount) { + !('brand' in amount) || + Fail`'amountToCoin' not working for ${q(amount.brand)} until #10449; use 'DenomAmount' for now`; return coerceCoin(chainHub, amount); }, }, diff --git a/packages/orchestration/test/exos/cosmos-orchestration-account.test.ts b/packages/orchestration/test/exos/cosmos-orchestration-account.test.ts index f88664fad1d..1cfb26d7a2f 100644 --- a/packages/orchestration/test/exos/cosmos-orchestration-account.test.ts +++ b/packages/orchestration/test/exos/cosmos-orchestration-account.test.ts @@ -14,6 +14,10 @@ import { QueryBalanceRequest, QueryBalanceResponse, } from '@agoric/cosmic-proto/cosmos/bank/v1beta1/query.js'; +import { + MsgSend, + MsgSendResponse, +} from '@agoric/cosmic-proto/cosmos/bank/v1beta1/tx.js'; import { Coin } from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js'; import { QueryDelegationRequest, @@ -38,6 +42,8 @@ import { MsgDelegate, MsgDelegateResponse, } from '@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js'; +import { withAmountUtils } from '@agoric/zoe/tools/test-utils.js'; +import { makeIssuerKit } from '@agoric/ertp'; import { decodeBase64 } from '@endo/base64'; import { commonSetup } from '../supports.js'; import type { @@ -55,6 +61,8 @@ import { } from '../../tools/ibc-mocks.js'; import type { CosmosValidatorAddress } from '../../src/cosmos-api.js'; import { protoMsgMocks } from '../ibc-mocks.js'; +import fetchedChainInfo from '../../src/fetched-chain-info.js'; +import { assetOn } from '../../src/utils/asset.js'; type TestContext = Awaited>; @@ -64,9 +72,18 @@ test.beforeEach(async t => { t.context = await commonSetup(t); }); +const [uistOnCosmos] = assetOn( + 'uist', + 'agoric', + undefined, + 'cosmoshub', + fetchedChainInfo, +); + test('send (to addr on same chain)', async t => { const { brands: { ist }, + mocks: { ibcBridge }, utils: { inspectDibcBridge, populateChainHub }, } = t.context; populateChainHub(); @@ -89,6 +106,42 @@ test('send (to addr on same chain)', async t => { undefined, ); + // register handler for ist bank send + ibcBridge.addMockAck( + buildTxPacketString([ + MsgSend.toProtoMsg({ + fromAddress: 'cosmos1test', + toAddress: 'cosmos99test', + amount: [ + { + denom: uistOnCosmos, + // denom: 'ibc/uisthash', + amount: '10', + }, + ], + }), + ]), + buildMsgResponseString(MsgSendResponse, {}), + ); + + t.is( + await E(account).send(toAddress, { + denom: uistOnCosmos, + value: 10n, + } as AmountArg), + undefined, + 'send accepts Amount', + ); + + await t.throwsAsync( + () => E(account).send(toAddress, ist.make(10n) as AmountArg), + { + message: + "'amountToCoin' not working for \"[Alleged: IST brand]\" until #10449; use 'DenomAmount' for now", + }, + 'TODO #10449 amountToCoin for CosmosOrchestrationAccount', + ); + // simulate timeout error await t.throwsAsync( E(account).send(toAddress, { value: 504n, denom: 'uatom' } as AmountArg), @@ -96,10 +149,17 @@ test('send (to addr on same chain)', async t => { { message: 'ABCI code: 5: error handling packet: see events for details' }, ); - // IST not registered - await t.throwsAsync(E(account).send(toAddress, ist.make(10n) as AmountArg), { - message: 'No denom for brand [object Alleged: IST brand]', - }); + // MOO brand not registered + const moolah = withAmountUtils(makeIssuerKit('MOO')); + await t.throwsAsync( + E(account).send(toAddress, moolah.make(10n) as AmountArg), + { + // TODO #10449 + // message: 'No denom for brand [object Alleged: MOO brand]', + message: + "'amountToCoin' not working for \"[Alleged: MOO brand]\" until #10449; use 'DenomAmount' for now", + }, + ); // multi-send (sendAll) t.is( @@ -111,11 +171,10 @@ test('send (to addr on same chain)', async t => { ); const { bridgeDowncalls } = await inspectDibcBridge(); - t.is( bridgeDowncalls.filter(d => d.method === 'sendPacket').length, - 3, - 'sent 2 successful txs and 1 failed. 1 rejected before sending', + 4, + 'sent 3 successful txs and 1 failed. 1 rejected before sending', ); }); @@ -186,6 +245,14 @@ test('transfer', async t => { }, }); + const umooTransfer = toTransferTxPacket({ + ...mockIbcTransfer, + token: { + denom: 'umoo', + amount: '10', + }, + }); + return { [defaultTransfer]: transferResp, [customTimeoutHeight]: transferResp, @@ -193,6 +260,7 @@ test('transfer', async t => { [customTimeout]: transferResp, [customMemo]: transferResp, [uistTransfer]: transferResp, + [umooTransfer]: transferResp, }; }; ibcBridge.setMockAck(buildMocks()); @@ -309,18 +377,26 @@ test('transfer', async t => { }, ); + const moolah = withAmountUtils(makeIssuerKit('MOO')); t.log('transfer throws if asset is not in its chainHub'); - await t.throwsAsync(E(account).transfer(mockDestination, ist.make(10n)), { - message: 'No denom for brand [object Alleged: IST brand]', + await t.throwsAsync(E(account).transfer(mockDestination, moolah.make(10n)), { + // TODO #10449 + // message: 'No denom for brand [object Alleged: MOO brand]', + message: + "'amountToCoin' not working for \"[Alleged: MOO brand]\" until #10449; use 'DenomAmount' for now", }); - chainHub.registerAsset('uist', { - baseDenom: 'uist', + chainHub.registerAsset('umoo', { + baseDenom: 'umoo', baseName: 'agoric', - brand: ist.brand, + brand: moolah.brand, chainName: 'agoric', }); - // uses uistTransfer mock above - await E(account).transfer(mockDestination, ist.make(10n)); + // uses umooTransfer mock above + await E(account).transfer( + mockDestination, + // moolah.make(10n), // TODO #10449 restore + { denom: 'umoo', value: 10n }, + ); t.log('transfer timeout error recieved and handled from the bridge'); await t.throwsAsync( diff --git a/packages/orchestration/test/supports.ts b/packages/orchestration/test/supports.ts index 0454f493eb3..2d8a85cb056 100644 --- a/packages/orchestration/test/supports.ts +++ b/packages/orchestration/test/supports.ts @@ -178,6 +178,7 @@ export const commonSetup = async (t: ExecutionContext) => { const commonAssetInfo = harden([ assetOn('ubld', 'agoric', bldSansMint.brand), assetOn('uist', 'agoric', istSansMint.brand), + assetOn('uist', 'agoric', undefined, 'cosmoshub', chainInfoWithCaps), assetOn('uusdc', 'noble', undefined, 'agoric', chainInfoWithCaps), assetOn('uatom', 'cosmoshub', undefined, 'agoric', chainInfoWithCaps), assetOn('uusdc', 'noble', undefined, 'dydx', chainInfoWithCaps), From 20cf6d4db81dadc0c80af7d936bcb18cb7b7740a Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 25 Nov 2024 22:57:41 -0500 Subject: [PATCH 137/174] chore: send-anywhere includes IST and BLD brands - enables sending offers with brands --- .../src/proposals/start-send-anywhere.js | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/packages/orchestration/src/proposals/start-send-anywhere.js b/packages/orchestration/src/proposals/start-send-anywhere.js index 6d1c6932bc1..b0db84c3f32 100644 --- a/packages/orchestration/src/proposals/start-send-anywhere.js +++ b/packages/orchestration/src/proposals/start-send-anywhere.js @@ -6,17 +6,15 @@ import { import { E } from '@endo/far'; /// + /** * @import {Installation} from '@agoric/zoe/src/zoeService/utils.js'; * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration'; + * @import {start as StartFn} from '@agoric/orchestration/src/examples/send-anywhere.contract.js'; */ const trace = makeTracer('StartSA', true); -/** - * @import {start as StartFn} from '@agoric/orchestration/src/examples/send-anywhere.contract.js'; - */ - /** * @param {BootstrapPowers & { * installation: { @@ -24,6 +22,18 @@ const trace = makeTracer('StartSA', true); * sendAnywhere: Installation; * }; * }; + * instance: { + * produce: { + * sendAnywhere: Producer; + * }; + * }; + * issuer: { + * consume: { + * BLD: Issuer<'nat'>; + * IST: Issuer<'nat'>; + * USDC: Issuer<'nat'>; + * }; + * }; * }} powers * @param {{ * options: { @@ -47,11 +57,10 @@ export const startSendAnywhere = async ( consume: { sendAnywhere }, }, instance: { - // @ts-expect-error unknown instance produce: { sendAnywhere: produceInstance }, }, issuer: { - consume: { IST }, + consume: { BLD, IST }, }, }, { options: { chainInfo, assetInfo } }, @@ -78,7 +87,10 @@ export const startSendAnywhere = async ( const { instance } = await E(startUpgradable)({ label: 'send-anywhere', installation: sendAnywhere, - issuerKeywordRecord: { Stable: await IST }, + issuerKeywordRecord: { + Stable: await IST, + Stake: await BLD, + }, privateArgs, }); produceInstance.resolve(instance); @@ -107,7 +119,7 @@ export const getManifest = ({ restoreRef }, { installationRef, options }) => { produce: { sendAnywhere: true }, }, issuer: { - consume: { IST: true }, + consume: { BLD: true, IST: true }, }, }, }, From 09a3a923e4c72f7a7deae44dbc2bbe18b2d37e4c Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Mon, 25 Nov 2024 23:00:10 -0500 Subject: [PATCH 138/174] chore: update send-anywhere baggage snapshot --- .../snapshots/send-anywhere.test.ts.md | 1101 ++++++++++++++++- .../snapshots/send-anywhere.test.ts.snap | Bin 1702 -> 9152 bytes 2 files changed, 1098 insertions(+), 3 deletions(-) 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..df818b1eba8 100644 --- a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md +++ b/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md @@ -36,22 +36,1117 @@ Generated by [AVA](https://avajs.dev). ChainHub_singleton: 'Alleged: ChainHub', bech32PrefixToChainName: { agoric: 'agoric', + celestia: 'celestia', + cosmos: 'cosmoshub', + dydx: 'dydx', + juno: 'juno', + neutron: 'neutron', + noble: 'noble', + omniflix: 'omniflixhub', + osmo: 'osmosis', + secret: 'secretnetwork', + stars: 'stargaze', + stride: 'stride', + umee: 'umee', + }, + brandDenom: { + 'Alleged: BLD brand': 'ubld', + 'Alleged: IST brand': 'uist', }, - brandDenom: {}, chainInfos: { agoric: { bech32Prefix: 'agoric', chainId: 'agoric-3', icqEnabled: false, + pfmEnabled: true, stakingTokens: [ { denom: 'ubld', }, ], }, + celestia: { + bech32Prefix: 'celestia', + chainId: 'celestia', + icqEnabled: false, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'utia', + }, + ], + }, + 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', + }, + ], + }, + juno: { + bech32Prefix: 'juno', + chainId: 'juno-1', + icqEnabled: false, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'ujuno', + }, + ], + }, + neutron: { + bech32Prefix: 'neutron', + chainId: 'neutron-1', + icqEnabled: false, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'untrn', + }, + ], + }, + noble: { + bech32Prefix: 'noble', + chainId: 'noble-1', + icqEnabled: false, + pfmEnabled: true, + }, + omniflixhub: { + bech32Prefix: 'omniflix', + chainId: 'omniflixhub-1', + icqEnabled: true, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'uflix', + }, + ], + }, + osmosis: { + bech32Prefix: 'osmo', + chainId: 'osmosis-1', + icqEnabled: true, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'uosmo', + }, + ], + }, + secretnetwork: { + bech32Prefix: 'secret', + chainId: 'secret-4', + icqEnabled: false, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'uscrt', + }, + ], + }, + stargaze: { + bech32Prefix: 'stars', + chainId: 'stargaze-1', + icqEnabled: false, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'ustars', + }, + ], + }, + stride: { + bech32Prefix: 'stride', + chainId: 'stride-1', + icqEnabled: false, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'ustrd', + }, + ], + }, + umee: { + bech32Prefix: 'umee', + chainId: 'umee-1', + icqEnabled: false, + pfmEnabled: true, + stakingTokens: [ + { + denom: 'uumee', + }, + ], + }, + }, + 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_omniflixhub-1': { + client_id: '07-tendermint-73', + counterparty: { + client_id: '07-tendermint-47', + connection_id: 'connection-40', + }, + id: 'connection-67', + state: 3, + transferChannel: { + channelId: 'channel-58', + counterPartyChannelId: 'channel-30', + 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', + }, + }, + 'agoric-3_secret-4': { + client_id: '07-tendermint-17', + counterparty: { + client_id: '07-tendermint-111', + connection_id: 'connection-80', + }, + id: 'connection-17', + state: 3, + transferChannel: { + channelId: 'channel-10', + counterPartyChannelId: 'channel-51', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'agoric-3_stride-1': { + client_id: '07-tendermint-74', + counterparty: { + client_id: '07-tendermint-129', + connection_id: 'connection-118', + }, + id: 'connection-68', + state: 3, + transferChannel: { + channelId: 'channel-59', + counterPartyChannelId: 'channel-148', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'agoric-3_umee-1': { + client_id: '07-tendermint-18', + counterparty: { + client_id: '07-tendermint-152', + connection_id: 'connection-101', + }, + id: 'connection-18', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-42', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'celestia_neutron-1': { + client_id: '07-tendermint-29', + counterparty: { + client_id: '07-tendermint-48', + connection_id: 'connection-36', + }, + id: 'connection-7', + state: 3, + transferChannel: { + channelId: 'channel-8', + counterPartyChannelId: 'channel-35', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'celestia_osmosis-1': { + client_id: '07-tendermint-10', + counterparty: { + client_id: '07-tendermint-3012', + connection_id: 'connection-2503', + }, + id: 'connection-2', + state: 3, + transferChannel: { + channelId: 'channel-2', + counterPartyChannelId: 'channel-6994', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'celestia_secret-4': { + client_id: '07-tendermint-52', + counterparty: { + client_id: '07-tendermint-174', + connection_id: 'connection-131', + }, + id: 'connection-15', + state: 3, + transferChannel: { + channelId: 'channel-14', + counterPartyChannelId: 'channel-91', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'celestia_stargaze-1': { + client_id: '07-tendermint-86', + counterparty: { + client_id: '07-tendermint-359', + connection_id: 'connection-296', + }, + id: 'connection-56', + state: 3, + transferChannel: { + channelId: 'channel-33', + counterPartyChannelId: 'channel-291', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'celestia_stride-1': { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-137', + connection_id: 'connection-125', + }, + id: 'connection-4', + state: 3, + transferChannel: { + channelId: 'channel-4', + counterPartyChannelId: 'channel-162', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'cosmoshub-4_juno-1': { + client_id: '07-tendermint-439', + counterparty: { + client_id: '07-tendermint-3', + connection_id: 'connection-2', + }, + id: 'connection-372', + state: 3, + transferChannel: { + channelId: 'channel-207', + counterPartyChannelId: 'channel-1', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'cosmoshub-4_neutron-1': { + client_id: '07-tendermint-1119', + counterparty: { + client_id: '07-tendermint-0', + connection_id: 'connection-0', + }, + id: 'connection-809', + state: 3, + transferChannel: { + channelId: 'channel-569', + counterPartyChannelId: 'channel-1', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'cosmoshub-4_noble-1': { + client_id: '07-tendermint-1116', + counterparty: { + client_id: '07-tendermint-4', + connection_id: 'connection-12', + }, + id: 'connection-790', + state: 3, + transferChannel: { + channelId: 'channel-536', + counterPartyChannelId: 'channel-4', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'cosmoshub-4_omniflixhub-1': { + client_id: '07-tendermint-656', + counterparty: { + client_id: '07-tendermint-23', + connection_id: 'connection-19', + }, + id: 'connection-501', + state: 3, + transferChannel: { + channelId: 'channel-306', + counterPartyChannelId: 'channel-12', + 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', + }, + }, + 'cosmoshub-4_secret-4': { + client_id: '07-tendermint-492', + counterparty: { + client_id: '07-tendermint-1', + connection_id: 'connection-0', + }, + id: 'connection-401', + state: 3, + transferChannel: { + channelId: 'channel-235', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'cosmoshub-4_stargaze-1': { + client_id: '07-tendermint-1188', + counterparty: { + client_id: '07-tendermint-320', + connection_id: 'connection-256', + }, + id: 'connection-918', + state: 3, + transferChannel: { + channelId: 'channel-730', + counterPartyChannelId: 'channel-239', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'cosmoshub-4_stride-1': { + client_id: '07-tendermint-913', + counterparty: { + client_id: '07-tendermint-0', + connection_id: 'connection-0', + }, + id: 'connection-635', + state: 3, + transferChannel: { + channelId: 'channel-391', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'dydx-mainnet-1_neutron-1': { + client_id: '07-tendermint-11', + counterparty: { + client_id: '07-tendermint-72', + connection_id: 'connection-51', + }, + id: 'connection-17', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-48', + 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', + }, + }, + 'dydx-mainnet-1_osmosis-1': { + client_id: '07-tendermint-3', + counterparty: { + client_id: '07-tendermint-3009', + connection_id: 'connection-2500', + }, + id: 'connection-7', + state: 3, + transferChannel: { + channelId: 'channel-3', + counterPartyChannelId: 'channel-6787', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'dydx-mainnet-1_stride-1': { + client_id: '07-tendermint-1', + counterparty: { + client_id: '07-tendermint-133', + connection_id: 'connection-123', + }, + id: 'connection-1', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-160', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'dydx-mainnet-1_umee-1': { + client_id: '07-tendermint-8', + counterparty: { + client_id: '07-tendermint-244', + connection_id: 'connection-208', + }, + id: 'connection-13', + state: 3, + transferChannel: { + channelId: 'channel-8', + counterPartyChannelId: 'channel-118', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'juno-1_neutron-1': { + client_id: '07-tendermint-557', + counterparty: { + client_id: '07-tendermint-97', + connection_id: 'connection-71', + }, + id: 'connection-524', + state: 3, + transferChannel: { + channelId: 'channel-548', + counterPartyChannelId: 'channel-4328', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'juno-1_noble-1': { + client_id: '07-tendermint-334', + counterparty: { + client_id: '07-tendermint-3', + connection_id: 'connection-8', + }, + id: 'connection-322', + state: 3, + transferChannel: { + channelId: 'channel-224', + counterPartyChannelId: 'channel-3', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'juno-1_osmosis-1': { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-1457', + connection_id: 'connection-1142', + }, + id: 'connection-0', + state: 3, + transferChannel: { + channelId: 'channel-0', + counterPartyChannelId: 'channel-42', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'juno-1_secret-4': { + client_id: '07-tendermint-108', + counterparty: { + client_id: '07-tendermint-23', + connection_id: 'connection-9', + }, + id: 'connection-68', + state: 3, + transferChannel: { + channelId: 'channel-48', + counterPartyChannelId: 'channel-8', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'juno-1_stargaze-1': { + client_id: '07-tendermint-44', + counterparty: { + client_id: '07-tendermint-13', + connection_id: 'connection-11', + }, + id: 'connection-30', + state: 3, + transferChannel: { + channelId: 'channel-20', + counterPartyChannelId: 'channel-5', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'juno-1_stride-1': { + client_id: '07-tendermint-263', + counterparty: { + client_id: '07-tendermint-31', + connection_id: 'connection-19', + }, + id: 'connection-205', + state: 3, + transferChannel: { + channelId: 'channel-139', + counterPartyChannelId: 'channel-24', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'neutron-1_noble-1': { + client_id: '07-tendermint-40', + counterparty: { + client_id: '07-tendermint-25', + connection_id: 'connection-34', + }, + id: 'connection-31', + state: 3, + transferChannel: { + channelId: 'channel-30', + counterPartyChannelId: 'channel-18', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'neutron-1_osmosis-1': { + client_id: '07-tendermint-19', + counterparty: { + client_id: '07-tendermint-2823', + connection_id: 'connection-2338', + }, + id: 'connection-18', + state: 3, + transferChannel: { + channelId: 'channel-10', + counterPartyChannelId: 'channel-874', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'neutron-1_secret-4': { + client_id: '07-tendermint-85', + counterparty: { + client_id: '07-tendermint-199', + connection_id: 'connection-192', + }, + id: 'connection-63', + state: 3, + transferChannel: { + channelId: 'channel-1551', + counterPartyChannelId: 'channel-144', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'neutron-1_stargaze-1': { + client_id: '07-tendermint-31', + counterparty: { + client_id: '07-tendermint-283', + connection_id: 'connection-211', + }, + id: 'connection-23', + state: 3, + transferChannel: { + channelId: 'channel-18', + counterPartyChannelId: 'channel-191', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'neutron-1_stride-1': { + client_id: '07-tendermint-18', + counterparty: { + client_id: '07-tendermint-125', + connection_id: 'connection-113', + }, + id: 'connection-15', + state: 3, + transferChannel: { + channelId: 'channel-8', + counterPartyChannelId: 'channel-123', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'noble-1_omniflixhub-1': { + client_id: '07-tendermint-68', + counterparty: { + client_id: '07-tendermint-51', + connection_id: 'connection-49', + }, + id: 'connection-65', + state: 3, + transferChannel: { + channelId: 'channel-44', + counterPartyChannelId: 'channel-38', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'noble-1_osmosis-1': { + client_id: '07-tendermint-0', + counterparty: { + client_id: '07-tendermint-2704', + connection_id: 'connection-2241', + }, + id: 'connection-2', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-750', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'noble-1_secret-4': { + client_id: '07-tendermint-24', + counterparty: { + client_id: '07-tendermint-170', + connection_id: 'connection-127', + }, + id: 'connection-33', + state: 3, + transferChannel: { + channelId: 'channel-17', + counterPartyChannelId: 'channel-88', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'noble-1_stargaze-1': { + client_id: '07-tendermint-16', + counterparty: { + client_id: '07-tendermint-287', + connection_id: 'connection-214', + }, + id: 'connection-25', + state: 3, + transferChannel: { + channelId: 'channel-11', + counterPartyChannelId: 'channel-204', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'noble-1_umee-1': { + client_id: '07-tendermint-73', + counterparty: { + client_id: '07-tendermint-248', + connection_id: 'connection-210', + }, + id: 'connection-74', + state: 3, + transferChannel: { + channelId: 'channel-51', + counterPartyChannelId: 'channel-120', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'omniflixhub-1_osmosis-1': { + client_id: '07-tendermint-8', + counterparty: { + client_id: '07-tendermint-1829', + connection_id: 'connection-1431', + }, + id: 'connection-8', + state: 3, + transferChannel: { + channelId: 'channel-1', + counterPartyChannelId: 'channel-199', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'osmosis-1_secret-4': { + client_id: '07-tendermint-1588', + counterparty: { + client_id: '07-tendermint-2', + connection_id: 'connection-1', + }, + id: 'connection-1244', + state: 3, + transferChannel: { + channelId: 'channel-88', + counterPartyChannelId: 'channel-1', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'osmosis-1_stargaze-1': { + client_id: '07-tendermint-1562', + counterparty: { + client_id: '07-tendermint-0', + connection_id: 'connection-0', + }, + id: 'connection-1223', + state: 3, + transferChannel: { + channelId: 'channel-75', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'osmosis-1_stride-1': { + client_id: '07-tendermint-2119', + counterparty: { + client_id: '07-tendermint-1', + connection_id: 'connection-2', + }, + id: 'connection-1657', + state: 3, + transferChannel: { + channelId: 'channel-326', + counterPartyChannelId: 'channel-5', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'osmosis-1_umee-1': { + client_id: '07-tendermint-1805', + counterparty: { + client_id: '07-tendermint-6', + connection_id: 'connection-0', + }, + id: 'connection-1410', + state: 3, + transferChannel: { + channelId: 'channel-184', + counterPartyChannelId: 'channel-0', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'secret-4_stargaze-1': { + client_id: '07-tendermint-43', + counterparty: { + client_id: '07-tendermint-177', + connection_id: 'connection-110', + }, + id: 'connection-25', + state: 3, + transferChannel: { + channelId: 'channel-19', + counterPartyChannelId: 'channel-48', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'secret-4_stride-1': { + client_id: '07-tendermint-75', + counterparty: { + client_id: '07-tendermint-37', + connection_id: 'connection-25', + }, + id: 'connection-40', + state: 3, + transferChannel: { + channelId: 'channel-37', + counterPartyChannelId: 'channel-40', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'secret-4_umee-1': { + client_id: '07-tendermint-193', + counterparty: { + client_id: '07-tendermint-249', + connection_id: 'connection-213', + }, + id: 'connection-188', + state: 3, + transferChannel: { + channelId: 'channel-126', + counterPartyChannelId: 'channel-123', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'stargaze-1_stride-1': { + client_id: '07-tendermint-195', + counterparty: { + client_id: '07-tendermint-30', + connection_id: 'connection-18', + }, + id: 'connection-128', + state: 3, + transferChannel: { + channelId: 'channel-106', + counterPartyChannelId: 'channel-19', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + 'stride-1_umee-1': { + client_id: '07-tendermint-32', + counterparty: { + client_id: '07-tendermint-64', + connection_id: 'connection-45', + }, + id: 'connection-20', + state: 3, + transferChannel: { + channelId: 'channel-29', + counterPartyChannelId: 'channel-34', + counterPartyPortId: 'transfer', + ordering: 0, + portId: 'transfer', + state: 3, + version: 'ics20-1', + }, + }, + }, + denom: { + 'agoric:ibc/BA313C4A19DFBF943586C0387E6B11286F9E416B4DD27574E6909CABE0E342FA': { + baseDenom: 'uatom', + baseName: 'cosmoshub', + chainName: 'agoric', + }, + 'agoric:ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9': { + baseDenom: 'uusdc', + baseName: 'noble', + chainName: 'agoric', + }, + 'agoric:ubld': { + baseDenom: 'ubld', + baseName: 'agoric', + brand: Object @Alleged: BLD brand {}, + chainName: 'agoric', + }, + 'agoric:uist': { + baseDenom: 'uist', + baseName: 'agoric', + brand: Object @Alleged: IST brand {}, + chainName: 'agoric', + }, + 'cosmoshub:ibc/9EA9BCC30570DC3198317BB6B5561AB41DDC17AFC342087022C128C57EFE19BA': { + baseDenom: 'uist', + baseName: 'agoric', + chainName: 'cosmoshub', + }, + 'dydx:ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5': { + baseDenom: 'uusdc', + baseName: 'noble', + chainName: 'dydx', + }, }, - connectionInfos: {}, - denom: {}, lookupChainInfo_kindHandle: 'Alleged: kind', lookupChainsAndConnection_kindHandle: 'Alleged: kind', lookupConnectionInfo_kindHandle: 'Alleged: kind', 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..3cf1a7c6eca84a3e8d241754528dd71dc9e77105 100644 GIT binary patch literal 9152 zcmV;xBR||hRzVHAzyhfA6bhnAT7xy-;3 zI>67#M<0s_00000000B+od!w10;lCLPBq9b`=W>OizZMN)0sxX~rQL!ay>E zGZPZ3bm<+D-bAEJl_tHp6w4OZ^|$t)t}AZQ-F;SnTmEJyncO)iz@5yv|K}mgk9K<8)3@g3Sv}Sv zZ}zQ8ZA$-WqBKz%KyP3v@CNW1@GqdL1`;*UKoc3SiR?Raj4jur(fI!v7Z-;n22E`= z^=P1}(NI$pO+>urfwUr*b!34ppJDmo?Ypz4K^|iaRk*SMF$=+vBo&>`sUG_E^R3TH~F??$TV0*--=b)__|zz*rL; zHR08o@UNPXPz#3Cf){JS>00n{EvOYCp_YeR7v^Lxy1?f?N)Ed7)w$D`rz(U4RZ+;s)+r$`0tKA~_lOU^5_ zJCe)Y9BkQYD$w0_M}C3L<8+h*n)um)NFkkuDfUv8cBdm)1uZj*9A4reN3qK~Zk(!O z9*{x{IR)u4n)?%wz}{lKscuCvj_d8rALwzqY?(HXwKPPC^|AbZutJ*+^jJN%V4gEp zqq(e5*3eg-iyXP>)_j|5uyw4><@VKI1uEW;%COoCid;4yq|SW`$fyEmafZ{?x5$(0 zEVN}y{;X5vRhelWSN=;QzqDeTb!?_}oHq-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 Subject: [PATCH 139/174] chore: auto-stake-it provides its own chain, connection, asset info --- multichain-testing/test/auto-stake-it.test.ts | 7 ++----- .../src/examples/auto-stake-it.contract.js | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/multichain-testing/test/auto-stake-it.test.ts b/multichain-testing/test/auto-stake-it.test.ts index f7b3ff9ba7c..27861de5af7 100644 --- a/multichain-testing/test/auto-stake-it.test.ts +++ b/multichain-testing/test/auto-stake-it.test.ts @@ -1,7 +1,6 @@ -import type { CosmosChainInfo } from '@agoric/orchestration'; import anyTest from '@endo/ses-ava/prepare-endo.js'; import type { ExecutionContext, TestFn } from 'ava'; -import chainInfo from '../starship-chain-info.js'; +import starshipChainInfo from '../starship-chain-info.js'; import { makeDoOffer } from '../tools/e2e-tools.js'; import { createFundedWalletAndClient, @@ -96,9 +95,7 @@ const autoStakeItScenario = test.macro({ const fundAndTransfer = makeFundAndTransfer(t); // 2. Find 'stakingDenom' denom on agoric - const remoteChainInfo = (chainInfo as Record)[ - chainName - ]; + const remoteChainInfo = starshipChainInfo[chainName]; const stakingDenom = remoteChainInfo?.stakingTokens?.[0].denom; if (!stakingDenom) throw Error(`staking denom found for ${chainName}`); diff --git a/packages/orchestration/src/examples/auto-stake-it.contract.js b/packages/orchestration/src/examples/auto-stake-it.contract.js index d08781e47ff..4db3c55adcb 100644 --- a/packages/orchestration/src/examples/auto-stake-it.contract.js +++ b/packages/orchestration/src/examples/auto-stake-it.contract.js @@ -8,10 +8,12 @@ import { preparePortfolioHolder } from '../exos/portfolio-holder-kit.js'; import { withOrchestration } from '../utils/start-helper.js'; import { prepareStakingTap } from './auto-stake-it-tap-kit.js'; import * as flows from './auto-stake-it.flows.js'; +import { registerChainsAndAssets } from '../utils/chain-hub-helper.js'; /** * @import {Zone} from '@agoric/zone'; * @import {OrchestrationPowers, OrchestrationTools} from '../utils/start-helper.js'; + * @import {CosmosChainInfo, Denom, DenomDetail} from '../types.js'; */ /** @@ -23,13 +25,15 @@ import * as flows from './auto-stake-it.flows.js'; * @param {ZCF} zcf * @param {OrchestrationPowers & { * marshaller: Marshaller; - * }} _privateArgs + * chainInfo?: Record; + * assetInfo?: [Denom, DenomDetail & { brandKey?: string }][]; + * }} privateArgs * @param {Zone} zone * @param {OrchestrationTools} tools */ const contract = async ( zcf, - _privateArgs, + privateArgs, zone, { chainHub, orchestrateAll, vowTools }, ) => { @@ -67,6 +71,13 @@ const contract = async ( const creatorFacet = prepareChainHubAdmin(zone, chainHub); + registerChainsAndAssets( + chainHub, + zcf.getTerms().brands, + privateArgs.chainInfo, + privateArgs.assetInfo, + ); + return { publicFacet, creatorFacet }; }; From cf514845c27b44c86ff14d9fcfef588b15b7652e Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Fri, 29 Nov 2024 17:04:40 -0500 Subject: [PATCH 140/174] chore: swap.contract.js allows `chainInfo` and `assetInfo` - chainInfo and assetInfo are provided as `commonPrivateArgs`. include them in `ContractMeta` --- packages/orchestration/src/examples/swap.contract.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/orchestration/src/examples/swap.contract.js b/packages/orchestration/src/examples/swap.contract.js index e726d371cf1..400eae50b92 100644 --- a/packages/orchestration/src/examples/swap.contract.js +++ b/packages/orchestration/src/examples/swap.contract.js @@ -3,6 +3,7 @@ import { TimerServiceShape } from '@agoric/time'; import { M } from '@endo/patterns'; import { withOrchestration } from '../utils/start-helper.js'; import * as flows from './swap.flows.js'; +import { CosmosChainInfoShape, DenomDetailShape } from '../typeGuards.js'; /** * @import {TimerService} from '@agoric/time'; @@ -12,6 +13,7 @@ import * as flows from './swap.flows.js'; * @import {NameHub} from '@agoric/vats'; * @import {Zone} from '@agoric/zone'; * @import {OrchestrationTools} from '../utils/start-helper.js'; + * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration'; */ /** @type {ContractMeta} */ @@ -23,6 +25,8 @@ export const meta = { storageNode: StorageNodeShape, marshaller: M.remotable('marshaller'), timerService: M.or(TimerServiceShape, null), + chainInfo: M.recordOf(M.string(), CosmosChainInfoShape), + assetInfo: M.arrayOf([M.string(), DenomDetailShape]), }, upgradability: 'canUpgrade', }; @@ -49,6 +53,8 @@ harden(makeNatAmountShape); * storageNode: Remote; * timerService: Remote; * marshaller: Marshaller; + * chainInfo: Record; + * assetInfo: [Denom, DenomDetail & { brandKey?: string }][]; * }} privateArgs * @param {Zone} zone * @param {OrchestrationTools} tools From 68c568a7f10ef1f2409485d99e3267d1d20c362b Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Fri, 29 Nov 2024 17:08:20 -0500 Subject: [PATCH 141/174] test(boot): restart send-anywhere includes asset info --- .../orchestration/restart-contracts.test.ts | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/boot/test/orchestration/restart-contracts.test.ts b/packages/boot/test/orchestration/restart-contracts.test.ts index 790f58e5d44..8cae71baa2e 100644 --- a/packages/boot/test/orchestration/restart-contracts.test.ts +++ b/packages/boot/test/orchestration/restart-contracts.test.ts @@ -3,9 +3,13 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import type { TestFn } from 'ava'; import { BridgeId } from '@agoric/internal'; -import type { CosmosValidatorAddress } from '@agoric/orchestration'; +import { + withChainCapabilities, + type CosmosValidatorAddress, +} from '@agoric/orchestration'; import { buildVTransferEvent } from '@agoric/orchestration/tools/ibc-mocks.js'; import type { UpdateRecord } from '@agoric/smart-wallet/src/smartWallet.js'; +import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js'; import { makeWalletFactoryContext, type WalletFactoryTestContext, @@ -32,7 +36,21 @@ test.serial('send-anywhere', async t => { t.log('start send-anywhere'); await evalProposal( - buildProposal('@agoric/builders/scripts/testing/init-send-anywhere.js'), + buildProposal('@agoric/builders/scripts/testing/init-send-anywhere.js', [ + '--chainInfo', + JSON.stringify(withChainCapabilities(fetchedChainInfo)), + '--assetInfo', + JSON.stringify([ + [ + 'uist', + { + baseDenom: 'uist', + baseName: 'agoric', + chainName: 'agoric', + }, + ], + ]), + ]), ); t.log('making offer'); From 56164bd85f66b828ec436da25217ed4b520f64e6 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 26 Nov 2024 00:28:52 -0500 Subject: [PATCH 142/174] chore: auto-stake-it.contract.js inits `chainHub` - auto-stake-it initializes `chainHub` with data so existing tests that use `.transfer()` pass --- multichain-testing/test/auto-stake-it.test.ts | 14 ++-- .../test/bootstrapTests/orchestration.test.ts | 2 +- .../scripts/testing/init-auto-stake-it.js | 73 +++++++++++++++++ .../src/proposals}/start-auto-stake-it.js | 82 +++++++------------ 4 files changed, 114 insertions(+), 57 deletions(-) create mode 100644 packages/builders/scripts/testing/init-auto-stake-it.js rename packages/{builders/scripts/testing => orchestration/src/proposals}/start-auto-stake-it.js (55%) diff --git a/multichain-testing/test/auto-stake-it.test.ts b/multichain-testing/test/auto-stake-it.test.ts index 27861de5af7..1c185c588b7 100644 --- a/multichain-testing/test/auto-stake-it.test.ts +++ b/multichain-testing/test/auto-stake-it.test.ts @@ -17,15 +17,19 @@ const accounts = ['agoricAdmin', 'cosmoshub', 'osmosis']; const contractName = 'autoAutoStakeIt'; const contractBuilder = - '../packages/builders/scripts/testing/start-auto-stake-it.js'; + '../packages/builders/scripts/testing/init-auto-stake-it.js'; test.before(async t => { - const { deleteTestKeys, setupTestKeys, ...rest } = await commonSetup(t); + const { setupTestKeys, ...common } = await commonSetup(t); + const { assetInfo, chainInfo, deleteTestKeys, startContract } = common; deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); - t.context = { ...rest, wallets, deleteTestKeys }; - const { startContract } = rest; - await startContract(contractName, contractBuilder); + t.context = { ...common, wallets }; + + await startContract(contractName, contractBuilder, { + chainInfo: JSON.stringify(chainInfo), + assetInfo: JSON.stringify(assetInfo), + }); }); test.after(async t => { diff --git a/packages/boot/test/bootstrapTests/orchestration.test.ts b/packages/boot/test/bootstrapTests/orchestration.test.ts index fa976fd7dac..45303ecafbb 100644 --- a/packages/boot/test/bootstrapTests/orchestration.test.ts +++ b/packages/boot/test/bootstrapTests/orchestration.test.ts @@ -484,7 +484,7 @@ test.serial('auto-stake-it - proposal', async t => { await t.notThrowsAsync( evalProposal( - buildProposal('@agoric/builders/scripts/testing/start-auto-stake-it.js'), + buildProposal('@agoric/builders/scripts/testing/init-auto-stake-it.js'), ), ); }); diff --git a/packages/builders/scripts/testing/init-auto-stake-it.js b/packages/builders/scripts/testing/init-auto-stake-it.js new file mode 100644 index 00000000000..8c5a515b8ee --- /dev/null +++ b/packages/builders/scripts/testing/init-auto-stake-it.js @@ -0,0 +1,73 @@ +/** + * @file A proposal to start the auto-stake-it contract. + * + * AutoStakeIt allows users to to create an auto-forwarding address that + * transfers and stakes tokens on a remote chain when received. + */ +import { makeHelpers } from '@agoric/deploy-script-support'; +import { startAutoStakeIt } from '@agoric/orchestration/src/proposals/start-auto-stake-it.js'; +import { parseArgs } from 'node:util'; + +/** + * @import {ParseArgsConfig} from 'node:util' + */ + +/** @type {ParseArgsConfig['options']} */ +const parserOpts = { + chainInfo: { type: 'string' }, + assetInfo: { type: 'string' }, +}; + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ +export const defaultProposalBuilder = async ( + { publishRef, install }, + options, +) => { + return harden({ + sourceSpec: '@agoric/orchestration/src/proposals/start-auto-stake-it.js', + getManifestCall: [ + 'getManifest', + { + installKeys: { + autoAutoStakeIt: publishRef( + install( + '@agoric/orchestration/src/examples/auto-stake-it.contract.js', + ), + ), + }, + options, + }, + ], + }); +}; + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ +export default async (homeP, endowments) => { + const { scriptArgs } = endowments; + + const { + values: { chainInfo, assetInfo }, + } = parseArgs({ + args: scriptArgs, + options: parserOpts, + }); + + const parseChainInfo = () => { + if (typeof chainInfo !== 'string') return undefined; + return JSON.parse(chainInfo); + }; + const parseAssetInfo = () => { + if (typeof assetInfo !== 'string') return undefined; + return JSON.parse(assetInfo); + }; + const opts = harden({ + chainInfo: parseChainInfo(), + assetInfo: parseAssetInfo(), + }); + + const { writeCoreEval } = await makeHelpers(homeP, endowments); + + await writeCoreEval(startAutoStakeIt.name, utils => + defaultProposalBuilder(utils, opts), + ); +}; diff --git a/packages/builders/scripts/testing/start-auto-stake-it.js b/packages/orchestration/src/proposals/start-auto-stake-it.js similarity index 55% rename from packages/builders/scripts/testing/start-auto-stake-it.js rename to packages/orchestration/src/proposals/start-auto-stake-it.js index 8a02140c012..69cfc7721e5 100644 --- a/packages/builders/scripts/testing/start-auto-stake-it.js +++ b/packages/orchestration/src/proposals/start-auto-stake-it.js @@ -11,6 +11,7 @@ import { deeplyFulfilled } from '@endo/marshal'; /** * @import {AutoStakeItSF} from '@agoric/orchestration/src/examples/auto-stake-it.contract.js'; + * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration'; */ const contractName = 'autoAutoStakeIt'; @@ -18,26 +19,35 @@ const trace = makeTracer(contractName, true); /** * @param {BootstrapPowers} powers + * @param {{ + * options: { + * chainInfo: Record; + * assetInfo: [Denom, DenomDetail & { brandKey?: string }][]; + * }; + * }} config */ -export const startAutoStakeIt = async ({ - consume: { - agoricNames, - board, - chainStorage, - chainTimerService, - cosmosInterchainService, - localchain, - startUpgradable, - }, - installation: { - // @ts-expect-error not a WellKnownName - consume: { [contractName]: installation }, - }, - instance: { - // @ts-expect-error not a WellKnownName - produce: { [contractName]: produceInstance }, +export const startAutoStakeIt = async ( + { + consume: { + agoricNames, + board, + chainStorage, + chainTimerService, + cosmosInterchainService, + localchain, + startUpgradable, + }, + installation: { + // @ts-expect-error not a WellKnownName + consume: { [contractName]: installation }, + }, + instance: { + // @ts-expect-error not a WellKnownName + produce: { [contractName]: produceInstance }, + }, }, -}) => { + { options: { chainInfo, assetInfo } }, +) => { trace(`start ${contractName}`); await null; @@ -58,6 +68,8 @@ export const startAutoStakeIt = async ({ storageNode, marshaller, timerService: chainTimerService, + chainInfo, + assetInfo, }), ), }; @@ -67,10 +79,7 @@ export const startAutoStakeIt = async ({ }; harden(startAutoStakeIt); -export const getManifestForContract = ( - { restoreRef }, - { installKeys, ...options }, -) => { +export const getManifest = ({ restoreRef }, { installKeys, options }) => { return { manifest: { [startAutoStakeIt.name]: { @@ -97,32 +106,3 @@ export const getManifestForContract = ( options, }; }; - -/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ -export const defaultProposalBuilder = async ({ publishRef, install }) => { - return harden({ - // Somewhat unorthodox, source the exports from this builder module - sourceSpec: '@agoric/builders/scripts/testing/start-auto-stake-it.js', - getManifestCall: [ - 'getManifestForContract', - { - installKeys: { - autoAutoStakeIt: publishRef( - install( - '@agoric/orchestration/src/examples/auto-stake-it.contract.js', - ), - ), - }, - }, - ], - }); -}; - -/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ -export default async (homeP, endowments) => { - // import dynamically so the module can work in CoreEval environment - const dspModule = await import('@agoric/deploy-script-support'); - const { makeHelpers } = dspModule; - const { writeCoreEval } = await makeHelpers(homeP, endowments); - await writeCoreEval(startAutoStakeIt.name, defaultProposalBuilder); -}; From 2195ace1fe125e2c0b9b05c32e1cf147a2604d60 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 26 Nov 2024 00:44:58 -0500 Subject: [PATCH 143/174] chore(fusdc): remove write-chain-info.js - no longer needed since we call `registerChainsAndAssets` --- a3p-integration/proposals/f:fast-usdc/package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/a3p-integration/proposals/f:fast-usdc/package.json b/a3p-integration/proposals/f:fast-usdc/package.json index 6d5c1a0fc64..f8ce07cad71 100644 --- a/a3p-integration/proposals/f:fast-usdc/package.json +++ b/a3p-integration/proposals/f:fast-usdc/package.json @@ -1,9 +1,7 @@ { "agoricProposal": { "source": "subdir", - "$UNTIL": "write-chain-info to agoricNames until #10445 and chainHub setup", "sdk-generate": [ - "orchestration/write-chain-info.js", "fast-usdc/init-fast-usdc.js submission --net A3P_INTEGRATION" ], "type": "/agoric.swingset.CoreEvalProposal" From f5b8b226396e42cf8a0fe35656db48405b6ef6eb Mon Sep 17 00:00:00 2001 From: Ikenna Omekam Date: Thu, 14 Nov 2024 10:06:52 -0500 Subject: [PATCH 144/174] test: send-anywhere contract null upgrade - no longer relies on buggy agoricNames - continues to test async-flow resumability and cross-chain vow settlement across upgrade Co-authored-by: 0xPatrick --- .../orchestration/contract-upgrade.test.ts | 52 ++++--- .../testing/start-buggy-sendAnywhere.js | 143 ------------------ ...ndAnywhere.js => upgrade-send-anywhere.js} | 32 ++-- 3 files changed, 44 insertions(+), 183 deletions(-) delete mode 100644 packages/builders/scripts/testing/start-buggy-sendAnywhere.js 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 ada1a4a4144..65293a800b7 100644 --- a/packages/boot/test/orchestration/contract-upgrade.test.ts +++ b/packages/boot/test/orchestration/contract-upgrade.test.ts @@ -4,6 +4,8 @@ import type { TestFn } from 'ava'; import { BridgeId } from '@agoric/internal'; import { buildVTransferEvent } from '@agoric/orchestration/tools/ibc-mocks.js'; +import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js'; +import { withChainCapabilities } from '@agoric/orchestration'; import { makeWalletFactoryContext, type WalletFactoryTestContext, @@ -19,17 +21,13 @@ test.before(async t => { test.after.always(t => t.context.shutdown?.()); /** - * This test core-evals a buggy installation of the sendAnywhere contract by - * giving it a faulty `agoricNames` service with a lookup() function which - * returns a promise that never resolves. + * This test core-evals an installation of the sendAnywhere contract that + * initiates an IBC Transfer. Since that goes over a bridge and is tracked + * by a vow, we can restart the contract and see that the vow settles. We + * can manually trigger a bridge event in the testing context. * - * Because the send-anywhere flow requires a lookup(), it waits forever. This - * gives us a point at which we can upgrade the vat with a working agoricNames - * and see that the flow continues from that point. (The lookup call is not made - * directly in a flow, but instead from a host API which uses the retryable - * helper. As such it tests both the idempotent retry mechanism of retryable on - * upgrades, and the ability to resume an async-flow for which a host vow - * settles after an upgrade.) + * As such, this demonstrates the ability to resume an async-flow for for which + * a host vow settles after an upgrade. */ test('resume', async t => { const { @@ -44,9 +42,21 @@ test('resume', async t => { t.log('start sendAnywhere'); await evalProposal( - buildProposal( - '@agoric/builders/scripts/testing/start-buggy-sendAnywhere.js', - ), + buildProposal('@agoric/builders/scripts/testing/init-send-anywhere.js', [ + '--chainInfo', + JSON.stringify(withChainCapabilities(fetchedChainInfo)), + '--assetInfo', + JSON.stringify([ + [ + 'uist', + { + baseDenom: 'uist', + baseName: 'agoric', + chainName: 'agoric', + }, + ], + ]), + ]), ); t.log('making offer'); @@ -70,16 +80,9 @@ test('resume', async t => { // XXX golden test const getLogged = () => - JSON.parse(storage.data.get('published.sendAnywhere.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'), - ); + JSON.parse(storage.data.get('published.send-anywhere.log')!).values; + // This log shows the flow started, but didn't get past the IBC Transfer settlement t.deepEqual(getLogged(), [ 'sending {0} from cosmoshub to cosmos1whatever', 'got info for denoms: ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9, ibc/toyatom, ibc/toyusdc, ubld, uist', @@ -87,6 +90,11 @@ test('resume', async t => { 'completed transfer to localAccount', ]); + t.log('null upgrading sendAnywhere'); + 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-buggy-sendAnywhere.js b/packages/builders/scripts/testing/start-buggy-sendAnywhere.js deleted file mode 100644 index 6f5ac66ee1d..00000000000 --- a/packages/builders/scripts/testing/start-buggy-sendAnywhere.js +++ /dev/null @@ -1,143 +0,0 @@ -/** - * @file This is for use in tests in a3p-integration - * Unlike most builder scripts, this one includes the proposal exports as well. - */ -import { - deeplyFulfilledObject, - makeTracer, - NonNullish, -} from '@agoric/internal'; -import { E, Far } from '@endo/far'; - -/// -/** - * @import {Installation} from '@agoric/zoe/src/zoeService/utils.js'; - */ - -const trace = makeTracer('StartBuggySA', true); - -/** - * @import {start as StartFn} from '@agoric/orchestration/src/examples/send-anywhere.contract.js'; - */ - -/** - * @param {BootstrapPowers & { - * installation: { - * consume: { - * sendAnywhere: Installation; - * }; - * }; - * }} powers - */ -export const startSendAnywhere = async ({ - consume: { - agoricNames, - board, - chainStorage, - chainTimerService, - cosmosInterchainService, - localchain, - startUpgradable, - }, - installation: { - consume: { sendAnywhere }, - }, - instance: { - // @ts-expect-error unknown instance - produce: { sendAnywhere: produceInstance }, - }, -}) => { - trace(startSendAnywhere.name); - - const marshaller = await E(board).getReadonlyMarshaller(); - - const privateArgs = await deeplyFulfilledObject( - harden({ - agoricNames, - localchain, - marshaller, - orchestrationService: cosmosInterchainService, - storageNode: E(NonNullish(await chainStorage)).makeChildNode( - 'sendAnywhere', - ), - timerService: chainTimerService, - }), - ); - - /** @type {import('@agoric/vats').NameHub} */ - // @ts-expect-error intentional fake - const agoricNamesHangs = Far('agoricNames that hangs', { - lookup: async () => { - trace('agoricNames.lookup being called that will never resolve'); - // BUG: this never resolves - return new Promise(() => {}); - }, - }); - - const { instance } = await E(startUpgradable)({ - label: 'sendAnywhere', - installation: sendAnywhere, - privateArgs: { - ...privateArgs, - agoricNames: agoricNamesHangs, - }, - }); - produceInstance.resolve(instance); - trace('done'); -}; -harden(startSendAnywhere); - -export const getManifestForValueVow = ({ restoreRef }, { sendAnywhereRef }) => { - trace('sendAnywhereRef', sendAnywhereRef); - return { - manifest: { - [startSendAnywhere.name]: { - consume: { - agoricNames: true, - board: true, - chainStorage: true, - chainTimerService: true, - cosmosInterchainService: true, - localchain: true, - - startUpgradable: true, - }, - installation: { - consume: { sendAnywhere: true }, - }, - instance: { - produce: { sendAnywhere: true }, - }, - }, - }, - installations: { - sendAnywhere: restoreRef(sendAnywhereRef), - }, - }; -}; - -/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ -export const defaultProposalBuilder = async ({ publishRef, install }) => - harden({ - // Somewhat unorthodox, source the exports from this builder module - sourceSpec: '@agoric/builders/scripts/testing/start-buggy-sendAnywhere.js', - getManifestCall: [ - 'getManifestForValueVow', - { - sendAnywhereRef: publishRef( - install( - '@agoric/orchestration/src/examples/send-anywhere.contract.js', - ), - ), - }, - ], - }); - -/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ -export default async (homeP, endowments) => { - // import dynamically so the module can work in CoreEval environment - const dspModule = await import('@agoric/deploy-script-support'); - const { makeHelpers } = dspModule; - const { writeCoreEval } = await makeHelpers(homeP, endowments); - await writeCoreEval(startSendAnywhere.name, defaultProposalBuilder); -}; 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..4acfaf5f8ad 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,24 @@ 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, + // undefined so `registerKnownChainsAndAssets` does not run again + chainInfo: undefined, + assetInfo: undefined, }), ); trace('upgrading...'); + trace('ref', sendAnywhereRef); await E(saKit.adminFacet).upgradeContract( sendAnywhereRef.bundleID, privateArgs, @@ -82,13 +78,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 +116,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 +135,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); }; From a93b6241d2eddbbe2f5842f747b8515b0c87951b Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 26 Nov 2024 17:16:00 -0500 Subject: [PATCH 145/174] test(send-anywhere): explicitly check result key is undefined --- packages/boot/test/orchestration/restart-contracts.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/boot/test/orchestration/restart-contracts.test.ts b/packages/boot/test/orchestration/restart-contracts.test.ts index 8cae71baa2e..b727b8a74be 100644 --- a/packages/boot/test/orchestration/restart-contracts.test.ts +++ b/packages/boot/test/orchestration/restart-contracts.test.ts @@ -113,9 +113,12 @@ test.serial('send-anywhere', async t => { id: 'send-somewhere', numWantsSatisfied: 1, error: undefined, - result: undefined, }, }); + if (conclusion.updated !== 'offerStatus') { + throw new Error('expected offerStatus'); + } + t.true('result' in conclusion.status, 'transfer vow settled'); }); const validatorAddress: CosmosValidatorAddress = { From cb22e57a9d2fb67800dd157c5773a62f1184efeb Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Fri, 29 Nov 2024 17:13:32 -0500 Subject: [PATCH 146/174] refactor: explicit test ordering - 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 --- .../test/bootstrapTests/orchestration.test.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/boot/test/bootstrapTests/orchestration.test.ts b/packages/boot/test/bootstrapTests/orchestration.test.ts index 45303ecafbb..8802b622bfd 100644 --- a/packages/boot/test/bootstrapTests/orchestration.test.ts +++ b/packages/boot/test/bootstrapTests/orchestration.test.ts @@ -310,7 +310,7 @@ test.serial('revise chain info', async t => { }); }); -test('basic-flows', async t => { +test.serial('basic-flows', async t => { const { buildProposal, evalProposal, @@ -355,9 +355,9 @@ test('basic-flows', async t => { }); t.deepEqual(readPublished('basicFlows.cosmos1test'), { localAddress: - '/ibc-port/icacontroller-4/ordered/{"version":"ics27-1","controllerConnectionId":"connection-8","hostConnectionId":"connection-649","address":"cosmos1test","encoding":"proto3","txType":"sdk_multi_msg"}/ibc-channel/channel-4', + '/ibc-port/icacontroller-2/ordered/{"version":"ics27-1","controllerConnectionId":"connection-8","hostConnectionId":"connection-649","address":"cosmos1test","encoding":"proto3","txType":"sdk_multi_msg"}/ibc-channel/channel-2', remoteAddress: - '/ibc-hop/connection-8/ibc-port/icahost/ordered/{"version":"ics27-1","controllerConnectionId":"connection-8","hostConnectionId":"connection-649","address":"cosmos1test","encoding":"proto3","txType":"sdk_multi_msg"}/ibc-channel/channel-4', + '/ibc-hop/connection-8/ibc-port/icahost/ordered/{"version":"ics27-1","controllerConnectionId":"connection-8","hostConnectionId":"connection-649","address":"cosmos1test","encoding":"proto3","txType":"sdk_multi_msg"}/ibc-channel/channel-2', }); // create a local orchestration account @@ -378,12 +378,11 @@ test('basic-flows', async t => { wd.getCurrentWalletRecord().offerToPublicSubscriberPaths, ); t.deepEqual(publicSubscriberPaths['request-loa'], { - account: 'published.basicFlows.agoric1fakeLCAAddress1', + account: 'published.basicFlows.agoric1fakeLCAAddress', }); t.like(wd.getLatestUpdateRecord(), { status: { id: 'request-loa', numWantsSatisfied: 1 }, }); - t.is(readPublished('basicFlows.agoric1fakeLCAAddress'), ''); await wd.sendOffer({ id: 'transfer-to-noble-from-cosmos', @@ -531,7 +530,7 @@ test.serial('basic-flows - portfolio holder', async t => { [ 'request-portfolio-acct', { - agoric: 'published.basicFlows.agoric1fakeLCAAddress', + agoric: 'published.basicFlows.agoric1fakeLCAAddress1', cosmoshub: 'published.basicFlows.cosmos1test', // XXX support multiple chain addresses in ibc mocks osmosis: 'published.basicFlows.cosmos1test', @@ -545,9 +544,9 @@ test.serial('basic-flows - portfolio holder', async t => { // XXX this overrides a previous account, since mocks only provide one address t.deepEqual(readPublished('basicFlows.cosmos1test'), { localAddress: - '/ibc-port/icacontroller-3/ordered/{"version":"ics27-1","controllerConnectionId":"connection-1","hostConnectionId":"connection-1649","address":"cosmos1test","encoding":"proto3","txType":"sdk_multi_msg"}/ibc-channel/channel-3', + '/ibc-port/icacontroller-4/ordered/{"version":"ics27-1","controllerConnectionId":"connection-1","hostConnectionId":"connection-1649","address":"cosmos1test","encoding":"proto3","txType":"sdk_multi_msg"}/ibc-channel/channel-4', remoteAddress: - '/ibc-hop/connection-1/ibc-port/icahost/ordered/{"version":"ics27-1","controllerConnectionId":"connection-1","hostConnectionId":"connection-1649","address":"cosmos1test","encoding":"proto3","txType":"sdk_multi_msg"}/ibc-channel/channel-3', + '/ibc-hop/connection-1/ibc-port/icahost/ordered/{"version":"ics27-1","controllerConnectionId":"connection-1","hostConnectionId":"connection-1649","address":"cosmos1test","encoding":"proto3","txType":"sdk_multi_msg"}/ibc-channel/channel-4', }); // XXX this overrides a previous account, since mocks only provide one address t.is(readPublished('basicFlows.agoric1fakeLCAAddress'), ''); From df1af7a2bb15e7f88ea0db1cd66de33cc21be6ab Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Fri, 29 Nov 2024 17:16:32 -0500 Subject: [PATCH 147/174] chore: basic-flows.contract.js seeds `chainHub` - 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 --- .../test/bootstrapTests/orchestration.test.ts | 90 ++++++++++++++++--- .../scripts/orchestration/init-basic-flows.js | 44 ++++++++- .../src/examples/basic-flows.contract.js | 17 +++- .../src/proposals/start-basic-flows.js | 81 ++++++++++++----- 4 files changed, 195 insertions(+), 37 deletions(-) diff --git a/packages/boot/test/bootstrapTests/orchestration.test.ts b/packages/boot/test/bootstrapTests/orchestration.test.ts index 8802b622bfd..76c5d152c59 100644 --- a/packages/boot/test/bootstrapTests/orchestration.test.ts +++ b/packages/boot/test/bootstrapTests/orchestration.test.ts @@ -5,11 +5,17 @@ import { defaultMarshaller, documentStorageSchema, } from '@agoric/internal/src/storage-test-utils.js'; -import type { CosmosValidatorAddress } from '@agoric/orchestration'; +import { + withChainCapabilities, + type CosmosValidatorAddress, +} from '@agoric/orchestration'; import type { start as startStakeIca } from '@agoric/orchestration/src/examples/stake-ica.contract.js'; import type { Instance } from '@agoric/zoe/src/zoeService/utils.js'; import type { TestFn } from 'ava'; import { SIMULATED_ERRORS } from '@agoric/vats/tools/fake-bridge.js'; +import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js'; +import { buildVTransferEvent } from '@agoric/orchestration/tools/ibc-mocks.js'; +import { BridgeId } from '@agoric/internal'; import { makeWalletFactoryContext, type WalletFactoryTestContext, @@ -316,11 +322,38 @@ test.serial('basic-flows', async t => { evalProposal, agoricNamesRemotes, readPublished, - bridgeUtils: { flushInboundQueue }, + bridgeUtils: { flushInboundQueue, runInbound }, } = t.context; await evalProposal( - buildProposal('@agoric/builders/scripts/orchestration/init-basic-flows.js'), + buildProposal( + '@agoric/builders/scripts/orchestration/init-basic-flows.js', + [ + '--chainInfo', + JSON.stringify(withChainCapabilities(fetchedChainInfo)), + '--assetInfo', + JSON.stringify([ + [ + 'ibc/uusdconagoric', + { + chainName: 'agoric', + baseName: 'noble', + baseDenom: 'uusdc', + }, + ], + // not tested until #10006. consider renaming to ibc/uusdconcosmos + // and updating boot/tools/ibc/mocks.ts + [ + 'ibc/uusdchash', + { + chainName: 'cosmoshub', + baseName: 'noble', + baseDenom: 'uusdc', + }, + ], + ]), + ], + ), ); const wd = @@ -442,7 +475,7 @@ test.serial('basic-flows', async t => { }, proposal: {}, offerArgs: { - amount: { denom: 'ibc/uusdchash', value: 10n }, + amount: { denom: 'ibc/uusdconagoric', value: 10n }, destination: { chainId: 'noble-1', value: 'noble1test', @@ -450,12 +483,29 @@ test.serial('basic-flows', async t => { }, }, }); - t.like(wd.getLatestUpdateRecord(), { - status: { - id: 'transfer-to-noble-from-agoric', - error: undefined, - }, + + await runInbound( + BridgeId.VTRANSFER, + buildVTransferEvent({ + sourceChannel: 'channel-62', + sequence: '1', + }), + ); + + const latestOfferStatus = () => { + const curr = wd.getLatestUpdateRecord(); + if (curr.updated === 'offerStatus') { + return curr.status; + } + throw new Error('expected updated to be "offerStatus"'); + }; + + const offerResult = latestOfferStatus(); + t.like(offerResult, { + id: 'transfer-to-noble-from-agoric', + error: undefined, }); + t.true('result' in offerResult, 'transfer vow settled'); await t.throwsAsync( wd.executeOffer({ @@ -467,7 +517,7 @@ test.serial('basic-flows', async t => { }, proposal: {}, offerArgs: { - amount: { denom: 'ibc/uusdchash', value: SIMULATED_ERRORS.TIMEOUT }, + amount: { denom: 'ibc/uusdconagoric', value: SIMULATED_ERRORS.TIMEOUT }, destination: { chainId: 'noble-1', value: 'noble1test', @@ -498,7 +548,25 @@ test.serial('basic-flows - portfolio holder', async t => { } = t.context; await evalProposal( - buildProposal('@agoric/builders/scripts/orchestration/init-basic-flows.js'), + buildProposal( + '@agoric/builders/scripts/orchestration/init-basic-flows.js', + [ + '--chainInfo', + JSON.stringify(withChainCapabilities(fetchedChainInfo)), + '--assetInfo', + JSON.stringify([ + [ + 'ubld', + { + baseDenom: 'ubld', + baseName: 'agoric', + chainName: 'agoric', + brandKey: 'BLD', + }, + ], + ]), + ], + ), ); const wd = diff --git a/packages/builders/scripts/orchestration/init-basic-flows.js b/packages/builders/scripts/orchestration/init-basic-flows.js index ab2de229cf3..430df76140a 100644 --- a/packages/builders/scripts/orchestration/init-basic-flows.js +++ b/packages/builders/scripts/orchestration/init-basic-flows.js @@ -1,8 +1,22 @@ import { makeHelpers } from '@agoric/deploy-script-support'; import { startBasicFlows } from '@agoric/orchestration/src/proposals/start-basic-flows.js'; +import { parseArgs } from 'node:util'; + +/** + * @import {ParseArgsConfig} from 'node:util' + */ + +/** @type {ParseArgsConfig['options']} */ +const parserOpts = { + chainInfo: { type: 'string' }, + assetInfo: { type: 'string' }, +}; /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ -export const defaultProposalBuilder = async ({ publishRef, install }) => { +export const defaultProposalBuilder = async ( + { publishRef, install }, + options, +) => { return harden({ sourceSpec: '@agoric/orchestration/src/proposals/start-basic-flows.js', getManifestCall: [ @@ -15,6 +29,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => { ), ), }, + options, }, ], }); @@ -22,6 +37,31 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => { /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ export default async (homeP, endowments) => { + const { scriptArgs } = endowments; + + const { + values: { chainInfo, assetInfo }, + } = parseArgs({ + args: scriptArgs, + options: parserOpts, + }); + + const parseChainInfo = () => { + if (typeof chainInfo !== 'string') return undefined; + return JSON.parse(chainInfo); + }; + const parseAssetInfo = () => { + if (typeof assetInfo !== 'string') return undefined; + return JSON.parse(assetInfo); + }; + const opts = harden({ + chainInfo: parseChainInfo(), + assetInfo: parseAssetInfo(), + }); + const { writeCoreEval } = await makeHelpers(homeP, endowments); - await writeCoreEval(startBasicFlows.name, defaultProposalBuilder); + + await writeCoreEval(startBasicFlows.name, utils => + defaultProposalBuilder(utils, opts), + ); }; diff --git a/packages/orchestration/src/examples/basic-flows.contract.js b/packages/orchestration/src/examples/basic-flows.contract.js index 60f58cadd1f..ab8387d2ec8 100644 --- a/packages/orchestration/src/examples/basic-flows.contract.js +++ b/packages/orchestration/src/examples/basic-flows.contract.js @@ -6,10 +6,12 @@ import { InvitationShape } from '@agoric/zoe/src/typeGuards.js'; import { M } from '@endo/patterns'; import { preparePortfolioHolder } from '../exos/portfolio-holder-kit.js'; import { withOrchestration } from '../utils/start-helper.js'; +import { registerChainsAndAssets } from '../utils/chain-hub-helper.js'; import * as flows from './basic-flows.flows.js'; /** * @import {Zone} from '@agoric/zone'; + * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration'; * @import {OrchestrationPowers, OrchestrationTools} from '../utils/start-helper.js'; */ @@ -17,15 +19,17 @@ import * as flows from './basic-flows.flows.js'; * @param {ZCF} zcf * @param {OrchestrationPowers & { * marshaller: Marshaller; - * }} _privateArgs + * chainInfo?: Record; + * assetInfo?: [Denom, DenomDetail & { brandKey?: string }][]; + * }} privateArgs * @param {Zone} zone * @param {OrchestrationTools} tools */ const contract = async ( zcf, - _privateArgs, + privateArgs, zone, - { orchestrateAll, vowTools }, + { chainHub, orchestrateAll, vowTools }, ) => { const makePortfolioHolder = preparePortfolioHolder( zone.subZone('portfolio'), @@ -56,6 +60,13 @@ const contract = async ( }, ); + registerChainsAndAssets( + chainHub, + zcf.getTerms().brands, + privateArgs.chainInfo, + privateArgs.assetInfo, + ); + return { publicFacet }; }; diff --git a/packages/orchestration/src/proposals/start-basic-flows.js b/packages/orchestration/src/proposals/start-basic-flows.js index e19b242ff90..59682e21e10 100644 --- a/packages/orchestration/src/proposals/start-basic-flows.js +++ b/packages/orchestration/src/proposals/start-basic-flows.js @@ -6,6 +6,7 @@ import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js'; import { E } from '@endo/far'; /** + * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration'; * @import {BasicFlowsSF} from '../examples/basic-flows.contract.js'; */ @@ -15,30 +16,59 @@ const contractName = 'basicFlows'; /** * See `@agoric/builders/builders/scripts/orchestration/init-basic-flows.js` for * the accompanying proposal builder. Run `agoric run - * packages/builders/scripts/orchestration/init-basic-flows.js` to build the + * packages/builders/scripts/orchestration/init-basic-flows.js --chainInfo + * 'chainName:CosmosChainInfo' --assetInfo 'denom:DenomDetail'` to build the * contract and proposal files. * - * @param {BootstrapPowers} powers + * @param {BootstrapPowers & { + * installation: { + * consume: { + * basicFlows: Installation; + * }; + * }; + * instance: { + * produce: { + * basicFlows: Producer; + * }; + * }; + * issuer: { + * consume: { + * BLD: Issuer<'nat'>; + * IST: Issuer<'nat'>; + * USDC: Issuer<'nat'>; + * }; + * }; + * }} powers + * @param {{ + * options: { + * chainInfo: Record; + * assetInfo: [Denom, DenomDetail & { brandKey?: string }][]; + * }; + * }} config */ -export const startBasicFlows = async ({ - consume: { - agoricNames, - board, - chainStorage, - chainTimerService, - cosmosInterchainService, - localchain, - startUpgradable, - }, - installation: { - // @ts-expect-error not a WellKnownName - consume: { [contractName]: installation }, - }, - instance: { - // @ts-expect-error not a WellKnownName - produce: { [contractName]: produceInstance }, +export const startBasicFlows = async ( + { + consume: { + agoricNames, + board, + chainStorage, + chainTimerService, + cosmosInterchainService, + localchain, + startUpgradable, + }, + installation: { + consume: { [contractName]: installation }, + }, + instance: { + produce: { [contractName]: produceInstance }, + }, + issuer: { + consume: { BLD, IST }, + }, }, -}) => { + { options: { chainInfo, assetInfo } }, +) => { trace(`start ${contractName}`); await null; @@ -49,6 +79,10 @@ export const startBasicFlows = async ({ const startOpts = { label: 'basicFlows', installation, + issuerKeywordRecord: { + BLD: await BLD, + IST: await IST, + }, terms: undefined, privateArgs: { agoricNames: await agoricNames, @@ -57,6 +91,8 @@ export const startBasicFlows = async ({ storageNode, marshaller, timerService: await chainTimerService, + chainInfo, + assetInfo, }, }; @@ -67,7 +103,7 @@ harden(startBasicFlows); export const getManifestForContract = ( { restoreRef }, - { installKeys, ...options }, + { installKeys, options }, ) => { return { manifest: { @@ -87,6 +123,9 @@ export const getManifestForContract = ( instance: { produce: { [contractName]: true }, }, + issuer: { + consume: { BLD: true, IST: true }, + }, }, }, installations: { From fa9b36d0c5d747d7bc9963b8854a0f9f9ea81901 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 27 Nov 2024 22:52:06 -0500 Subject: [PATCH 148/174] test(fast-usdc): support pfm transfers --- .../fast-usdc/test/fast-usdc.contract.test.ts | 30 ++++++++++++------ .../snapshots/fast-usdc.contract.test.ts.md | 3 ++ .../snapshots/fast-usdc.contract.test.ts.snap | Bin 5637 -> 5661 bytes packages/fast-usdc/test/supports.ts | 3 +- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/packages/fast-usdc/test/fast-usdc.contract.test.ts b/packages/fast-usdc/test/fast-usdc.contract.test.ts index 7ec53744173..94e79dddbb8 100644 --- a/packages/fast-usdc/test/fast-usdc.contract.test.ts +++ b/packages/fast-usdc/test/fast-usdc.contract.test.ts @@ -404,10 +404,14 @@ const makeCustomer = ( const myMsg = local.find(lm => { if (lm.type !== 'VLOCALCHAIN_EXECUTE_TX') return false; const [ibcTransferMsg] = lm.messages; + // support advances to noble + other chains + const receiver = + ibcTransferMsg.receiver === 'pfm' + ? JSON.parse(ibcTransferMsg.memo).forward.receiver + : ibcTransferMsg.receiver; return ( ibcTransferMsg['@type'] === - '/ibc.applications.transfer.v1.MsgTransfer' && - ibcTransferMsg.receiver === EUD + '/ibc.applications.transfer.v1.MsgTransfer' && receiver === EUD ); }); if (!myMsg) { @@ -423,17 +427,25 @@ const makeCustomer = ( { amount: String(toReceive.value), denom: uusdcOnAgoric }, 'C4', ); - t.log(who, 'sees', ibcTransferMsg.token, 'sent to', EUD); - // TODO #10445 expect PFM memo - t.is(ibcTransferMsg.memo, '', 'TODO expecting PFM memo'); - - // TODO #10445 expect routing through noble, not osmosis + if (!EUD.startsWith('noble')) { + t.like( + JSON.parse(ibcTransferMsg.memo), + { + forward: { + receiver: EUD, + }, + }, + 'PFM receiver is EUD', + ); + } else { + t.like(ibcTransferMsg, { receiver: EUD }); + } t.is( ibcTransferMsg.sourceChannel, - fetchedChainInfo.agoric.connections['osmosis-1'].transferChannel + fetchedChainInfo.agoric.connections['noble-1'].transferChannel .channelId, - 'TODO expecting routing through Noble', + 'expect routing through Noble', ); }, }); diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md index ece2a6e83cd..72890a09ece 100644 --- a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.md +++ b/packages/fast-usdc/test/snapshots/fast-usdc.contract.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', @@ -53,11 +54,13 @@ Generated by [AVA](https://avajs.dev). bech32Prefix: 'noble', chainId: 'noble-1', icqEnabled: false, + pfmEnabled: true, }, osmosis: { bech32Prefix: 'osmo', chainId: 'osmosis-1', icqEnabled: true, + pfmEnabled: true, stakingTokens: [ { denom: 'uosmo', diff --git a/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap b/packages/fast-usdc/test/snapshots/fast-usdc.contract.test.ts.snap index b4f6db225e5d35f97fc59405cd299d04a75b129f..c289cbdd0bb7e35e0f224dfca6d4478ef07e313f 100644 GIT binary patch literal 5661 zcmV+&7UJnaRzVF9CTLSZsk#3#b;TwiH%b z3b*?XtNxh9lKQc-vJy)fmSQXwR9o^ESmt0UsIn~Sn2adCklNTg=?ev;qm5gGv7xb` z7U)v6KuAr(%34DqbwmxcG{)Nm8P$ENKO70D5fj96i{)(=NH&)!(G!}#GZa3iH+|dC zRO}yBf?C(4Pj9KqGq!}aSVZy1L_3Cqk!WnQ=2s$`5(|d4t?CKAEw4hC@h1iuW#Nc_ zRE@?WI#6%^Cqr}o(eSZoe9X%l=D;O$;LsenZw|aL2QJHpNIsm(hbQx4UIEw(V6Xs= z7YIJcOZP#sW$xz+;DG}8j{;a-2>pc+E`;|M!lw)2u|k+r1U*H9s3K8R-EBp1XAwMK z1dYYuD~9`v;XmK}-&z9KmcSQFpr{o5rSSGrI8_P{m%?vK!8sRt=fbhMaO+(7>$&iq zx$yE_D47SB&J#=+7ELJGI1k$9!5#D9XY*i183fAU<7M!bGI+L35b-uqMA7SI@cTF6 zt>y6ka(Jp7Dl1@XMLIR_B+`VQCrpC6*1&jBYfVn8Z0GVKfgTNNBOx^w){=nQ6gwR$ z$XU=9j9VEDYuQ?`xN}m|iG$j)h%zx@YFVX8XpkjH-Kb9qkihz4I94&e7%IENBmJ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(Wz_een5x@Uwl8zaLiahfVthxgVC5m$aR{_S0^KKRy6X_!a|oUhq3b101&5*RFt`rG&|&!GVfgA{xNsQq zj|lV)lBShMzisc-W7ny0`Nuvs)OJO!mgk|@02v%7=&Ac z@URHoENOZ*2(Ja9QH7l|!SfKBfG#v>;FbsEz(EXC8C&Tb`7=9N9>ktHn;I<+7%n*EQ zNT45(H2q=--W-C(ngBf{Y1*T~Ar0QE!Phi+Q-fL^d^+sW1^Qu0)6F`(Lx+b&=ut`2 z1s(oFhlXM38HRTZ!+pc>?P0huEYOclcws1z`CXk%&_7GNIwQR5YQ6+hX2kmC7E8qm z<97h1K06biGsNbsqZ*My2Q%2hX(wf4lb z);5t=o}@XgBC*y??9n4J(`}e!k}4)y##QfRLKA; zTw+l&OOH6jV$Nmh5vi7E^=0Lg^uk^4JC``!v)s8H_8H-o8tIxu&I`qx^FooTmsu_p z*NoV@M3>mJTPNlN-WGobo8#ssYRPh)*qq|7HzS@MY-{vC!p}F3V+cnm8OeXYe^z zRZ^RtSGopzS-M4xx^gdcWnFt5--2>GPR1A5j9e%lYj(L}+Cs5Av&~MXS`qfRW<+)( zR=PZ5ud}Fh*|W`0#y2l9l*n?WcxS{)5#I)s;{VBgVz=dd%;#8r9FL--CO5)tO@RiRN9FUJ)|+?8@|)Qh~hqxsYWdKO>$n z%C8^h=#HFsEl+Ouhh|nic*^zpoS&CC?3ehwWJcWPl7B1EA8C1v9|PV?tULaHUmqow zyn`n|IU(H5tPrnu=Dp(tyjO(PNWYv*e3vTmC##a53P$|lU>3N-k@)*rYFP2B;nNF} ff1j{v?C&}@DSa_D(iH!#&9VOlRUJ(6{BZyPca#7q diff --git a/packages/fast-usdc/test/supports.ts b/packages/fast-usdc/test/supports.ts index 2c9154ab227..7a64bcf2ff2 100644 --- a/packages/fast-usdc/test/supports.ts +++ b/packages/fast-usdc/test/supports.ts @@ -4,6 +4,7 @@ import { makeFakeStorageKit } from '@agoric/internal/src/storage-test-utils.js'; import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import { denomHash, + withChainCapabilities, type CosmosChainInfo, type Denom, } from '@agoric/orchestration'; @@ -196,7 +197,7 @@ export const commonSetup = async (t: ExecutionContext) => { ); const chainInfo = harden(() => { - const { agoric, osmosis, noble } = fetchedChainInfo; + const { agoric, osmosis, noble } = withChainCapabilities(fetchedChainInfo); return { agoric, osmosis, noble }; })(); From fe39f0afb0ddf9072b06b9f6cc09bc95059cfb65 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Fri, 29 Nov 2024 17:26:11 -0500 Subject: [PATCH 149/174] test: deposit-withdraw requires asset info --- multichain-testing/test/basic-flows.test.ts | 11 +++++++---- .../test/deposit-withdraw-lca.test.ts | 11 +++++++---- .../test/deposit-withdraw-portfolio.test.ts | 11 +++++++---- multichain-testing/test/ica-channel-close.test.ts | 11 +++++++---- multichain-testing/test/tools/asset-info.test.ts | 2 ++ multichain-testing/tools/asset-info.ts | 14 +++++++++++++- 6 files changed, 43 insertions(+), 17 deletions(-) diff --git a/multichain-testing/test/basic-flows.test.ts b/multichain-testing/test/basic-flows.test.ts index 8db6ef7c84e..658ce851d67 100644 --- a/multichain-testing/test/basic-flows.test.ts +++ b/multichain-testing/test/basic-flows.test.ts @@ -16,12 +16,15 @@ const contractBuilder = '../packages/builders/scripts/orchestration/init-basic-flows.js'; test.before(async t => { - const { deleteTestKeys, setupTestKeys, ...rest } = await commonSetup(t); + const { setupTestKeys, ...common } = await commonSetup(t); + const { assetInfo, chainInfo, deleteTestKeys, startContract } = common; deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); - t.context = { ...rest, wallets, deleteTestKeys }; - const { startContract } = rest; - await startContract(contractName, contractBuilder); + t.context = { ...common, wallets }; + await startContract(contractName, contractBuilder, { + chainInfo: JSON.stringify(chainInfo), + assetInfo: JSON.stringify(assetInfo), + }); }); test.after(async t => { diff --git a/multichain-testing/test/deposit-withdraw-lca.test.ts b/multichain-testing/test/deposit-withdraw-lca.test.ts index 9ba574dff56..226b29d45dd 100644 --- a/multichain-testing/test/deposit-withdraw-lca.test.ts +++ b/multichain-testing/test/deposit-withdraw-lca.test.ts @@ -14,12 +14,15 @@ const contractBuilder = '../packages/builders/scripts/orchestration/init-basic-flows.js'; test.before(async t => { - const { deleteTestKeys, setupTestKeys, ...rest } = await commonSetup(t); + const { setupTestKeys, ...common } = await commonSetup(t); + const { assetInfo, chainInfo, deleteTestKeys, startContract } = common; deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); - t.context = { ...rest, wallets, deleteTestKeys }; - const { startContract } = rest; - await startContract(contractName, contractBuilder); + t.context = { ...common, wallets }; + await startContract(contractName, contractBuilder, { + chainInfo: JSON.stringify(chainInfo), + assetInfo: JSON.stringify(assetInfo), + }); }); test.after(async t => { diff --git a/multichain-testing/test/deposit-withdraw-portfolio.test.ts b/multichain-testing/test/deposit-withdraw-portfolio.test.ts index 24bb5277a80..afd484284b8 100644 --- a/multichain-testing/test/deposit-withdraw-portfolio.test.ts +++ b/multichain-testing/test/deposit-withdraw-portfolio.test.ts @@ -14,12 +14,15 @@ const contractBuilder = '../packages/builders/scripts/orchestration/init-basic-flows.js'; test.before(async t => { - const { deleteTestKeys, setupTestKeys, ...rest } = await commonSetup(t); + const { setupTestKeys, ...common } = await commonSetup(t); + const { assetInfo, chainInfo, deleteTestKeys, startContract } = common; deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); - t.context = { ...rest, wallets, deleteTestKeys }; - const { startContract } = rest; - await startContract(contractName, contractBuilder); + t.context = { ...common, wallets }; + await startContract(contractName, contractBuilder, { + chainInfo: JSON.stringify(chainInfo), + assetInfo: JSON.stringify(assetInfo), + }); }); test.after(async t => { diff --git a/multichain-testing/test/ica-channel-close.test.ts b/multichain-testing/test/ica-channel-close.test.ts index 9e844fa903b..ab7437da525 100644 --- a/multichain-testing/test/ica-channel-close.test.ts +++ b/multichain-testing/test/ica-channel-close.test.ts @@ -22,12 +22,15 @@ const contractBuilder = '../packages/builders/scripts/orchestration/init-basic-flows.js'; test.before(async t => { - const { deleteTestKeys, setupTestKeys, ...rest } = await commonSetup(t); + const { setupTestKeys, ...common } = await commonSetup(t); + const { assetInfo, chainInfo, deleteTestKeys, startContract } = common; deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); - t.context = { ...rest, wallets, deleteTestKeys }; - const { startContract } = rest; - await startContract(contractName, contractBuilder); + t.context = { ...common, wallets }; + await startContract(contractName, contractBuilder, { + chainInfo: JSON.stringify(chainInfo), + assetInfo: JSON.stringify(assetInfo), + }); }); test.after(async t => { diff --git a/multichain-testing/test/tools/asset-info.test.ts b/multichain-testing/test/tools/asset-info.test.ts index f12748de7fd..be054b65180 100644 --- a/multichain-testing/test/tools/asset-info.test.ts +++ b/multichain-testing/test/tools/asset-info.test.ts @@ -80,6 +80,7 @@ test('makeAssetInfo', async t => { { baseDenom: 'uist', baseName: 'agoric', + brandKey: 'IST', chainName: 'agoric', }, ], @@ -88,6 +89,7 @@ test('makeAssetInfo', async t => { { baseDenom: 'ubld', baseName: 'agoric', + brandKey: 'BLD', chainName: 'agoric', }, ], diff --git a/multichain-testing/tools/asset-info.ts b/multichain-testing/tools/asset-info.ts index 34c7d536b8c..f3e548d1968 100644 --- a/multichain-testing/tools/asset-info.ts +++ b/multichain-testing/tools/asset-info.ts @@ -37,6 +37,13 @@ export const makeAssetInfo = ( return `ibc/${denomHash({ denom, channelId })}`; }; + // `brandKey` instead of `brand` until #10580 + // only BLD, IST until #9966 + const BRAND_KEY_MAP: Record = { + ubld: 'BLD', + uist: 'IST', + }; + // only include chains present in `chainInfo` const tokens = Object.entries(tokenMap) .filter(([chain]) => chain in chainInfo) @@ -55,6 +62,7 @@ export const makeAssetInfo = ( { ...baseDetails, chainName: chain, + ...(BRAND_KEY_MAP[denom] && { brandKey: BRAND_KEY_MAP[denom] }), }, ]); @@ -62,11 +70,15 @@ export const makeAssetInfo = ( const issuingChainId = chainInfo[chain].chainId; for (const holdingChain of Object.keys(chainInfo)) { if (holdingChain === chain) continue; + const denomHash = toDenomHash(denom, issuingChainId, holdingChain); assetInfo.push([ - toDenomHash(denom, issuingChainId, holdingChain), + denomHash, { ...baseDetails, chainName: holdingChain, + ...(BRAND_KEY_MAP[denomHash] && { + brandKey: BRAND_KEY_MAP[denomHash], + }), }, ]); } From a2d491fdc571f56a6e83be037cbc6fe926354f68 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Tue, 3 Dec 2024 13:03:58 -0500 Subject: [PATCH 150/174] chore: `startContract` stringifies `builderOpts` --- multichain-testing/test/auto-stake-it.test.ts | 4 ++-- multichain-testing/test/basic-flows.test.ts | 4 ++-- .../test/deposit-withdraw-lca.test.ts | 4 ++-- .../test/deposit-withdraw-portfolio.test.ts | 4 ++-- .../test/ica-channel-close.test.ts | 4 ++-- multichain-testing/test/send-anywhere.test.ts | 4 ++-- multichain-testing/test/support.ts | 16 ++++++++++++++-- 7 files changed, 26 insertions(+), 14 deletions(-) diff --git a/multichain-testing/test/auto-stake-it.test.ts b/multichain-testing/test/auto-stake-it.test.ts index 1c185c588b7..29b984ceec0 100644 --- a/multichain-testing/test/auto-stake-it.test.ts +++ b/multichain-testing/test/auto-stake-it.test.ts @@ -27,8 +27,8 @@ test.before(async t => { t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, { - chainInfo: JSON.stringify(chainInfo), - assetInfo: JSON.stringify(assetInfo), + chainInfo, + assetInfo, }); }); diff --git a/multichain-testing/test/basic-flows.test.ts b/multichain-testing/test/basic-flows.test.ts index 658ce851d67..689db323524 100644 --- a/multichain-testing/test/basic-flows.test.ts +++ b/multichain-testing/test/basic-flows.test.ts @@ -22,8 +22,8 @@ test.before(async t => { const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, { - chainInfo: JSON.stringify(chainInfo), - assetInfo: JSON.stringify(assetInfo), + chainInfo, + assetInfo, }); }); diff --git a/multichain-testing/test/deposit-withdraw-lca.test.ts b/multichain-testing/test/deposit-withdraw-lca.test.ts index 226b29d45dd..ad7fd4824d9 100644 --- a/multichain-testing/test/deposit-withdraw-lca.test.ts +++ b/multichain-testing/test/deposit-withdraw-lca.test.ts @@ -20,8 +20,8 @@ test.before(async t => { const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, { - chainInfo: JSON.stringify(chainInfo), - assetInfo: JSON.stringify(assetInfo), + chainInfo, + assetInfo, }); }); diff --git a/multichain-testing/test/deposit-withdraw-portfolio.test.ts b/multichain-testing/test/deposit-withdraw-portfolio.test.ts index afd484284b8..ea97f1e7f17 100644 --- a/multichain-testing/test/deposit-withdraw-portfolio.test.ts +++ b/multichain-testing/test/deposit-withdraw-portfolio.test.ts @@ -20,8 +20,8 @@ test.before(async t => { const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, { - chainInfo: JSON.stringify(chainInfo), - assetInfo: JSON.stringify(assetInfo), + chainInfo, + assetInfo, }); }); diff --git a/multichain-testing/test/ica-channel-close.test.ts b/multichain-testing/test/ica-channel-close.test.ts index ab7437da525..03b0ef9ac95 100644 --- a/multichain-testing/test/ica-channel-close.test.ts +++ b/multichain-testing/test/ica-channel-close.test.ts @@ -28,8 +28,8 @@ test.before(async t => { const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, { - chainInfo: JSON.stringify(chainInfo), - assetInfo: JSON.stringify(assetInfo), + chainInfo, + assetInfo, }); }); diff --git a/multichain-testing/test/send-anywhere.test.ts b/multichain-testing/test/send-anywhere.test.ts index ba74b23338a..f1a8a720e5f 100644 --- a/multichain-testing/test/send-anywhere.test.ts +++ b/multichain-testing/test/send-anywhere.test.ts @@ -27,8 +27,8 @@ test.before(async t => { t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, { - chainInfo: JSON.stringify(chainInfo), - assetInfo: JSON.stringify(assetInfo), + chainInfo, + assetInfo, }); }); diff --git a/multichain-testing/test/support.ts b/multichain-testing/test/support.ts index aef2bfab173..f3f8e752d96 100644 --- a/multichain-testing/test/support.ts +++ b/multichain-testing/test/support.ts @@ -4,6 +4,7 @@ import { execa } from 'execa'; import fse from 'fs-extra'; import childProcess from 'node:child_process'; import { withChainCapabilities } from '@agoric/orchestration'; +import { objectMap } from '@endo/patterns'; import { makeAgdTools } from '../tools/agd-tools.js'; import { type E2ETools } from '../tools/e2e-tools.js'; import { @@ -94,7 +95,7 @@ export const commonSetup = async (t: ExecutionContext) => { const startContract = async ( contractName: string, contractBuilder: string, - builderOpts?: Record, + builderOpts?: Record, ) => { const { vstorageClient } = tools; const instances = Object.fromEntries( @@ -104,7 +105,18 @@ export const commonSetup = async (t: ExecutionContext) => { return t.log('Contract found. Skipping installation...'); } t.log('bundle and install contract', contractName); - await deployBuilder(contractBuilder, builderOpts); + + const formattedOpts = builderOpts + ? objectMap( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + builderOpts as Record, + value => { + if (typeof value === 'string') return value; + return JSON.stringify(value); + }, + ) + : undefined; + await deployBuilder(contractBuilder, formattedOpts); await retryUntilCondition( () => vstorageClient.queryData(`published.agoricNames.instance`), res => contractName in Object.fromEntries(res), From 0d2d4aa7886cc424e64a121821fc1373912aff82 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 3 Dec 2024 07:44:35 -0800 Subject: [PATCH 151/174] feat: export cli lib --- packages/agoric-cli/package.json | 3 ++- packages/agoric-cli/src/lib/index.js | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 packages/agoric-cli/src/lib/index.js diff --git a/packages/agoric-cli/package.json b/packages/agoric-cli/package.json index 13241c53219..ffdaedf4cea 100644 --- a/packages/agoric-cli/package.json +++ b/packages/agoric-cli/package.json @@ -10,7 +10,8 @@ }, "exports": { "./src/entrypoint.js": "./src/entrypoint.js", - "./src/helpers.js": "./src/helpers.js" + "./src/helpers.js": "./src/helpers.js", + "./src/lib/index.js": "./src/lib/index.js" }, "files": [ "src", diff --git a/packages/agoric-cli/src/lib/index.js b/packages/agoric-cli/src/lib/index.js new file mode 100644 index 00000000000..bf6ed5ccc44 --- /dev/null +++ b/packages/agoric-cli/src/lib/index.js @@ -0,0 +1,7 @@ +/** @file Utility library for use in other packages */ + +export * from './bundles.js'; +export * from './casting.js'; +export * from './chain.js'; +export * from './format.js'; +export * from './wallet.js'; From d71f36635cc2b97473db9bc817e28add13ed0f59 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 3 Dec 2024 07:48:23 -0800 Subject: [PATCH 152/174] build: yarn link relative agoric-sdk --- .../proposals/s:stake-bld/package.json | 52 +- .../proposals/s:stake-bld/yarn.lock | 1018 +++++++---------- 2 files changed, 484 insertions(+), 586 deletions(-) diff --git a/a3p-integration/proposals/s:stake-bld/package.json b/a3p-integration/proposals/s:stake-bld/package.json index ba0c30abf43..2c0a5093c38 100644 --- a/a3p-integration/proposals/s:stake-bld/package.json +++ b/a3p-integration/proposals/s:stake-bld/package.json @@ -9,6 +9,7 @@ "type": "module", "license": "Apache-2.0", "dependencies": { + "@agoric/client-utils": "dev", "@agoric/internal": "0.3.3-dev-5676146.0", "@agoric/synthetic-chain": "^0.4.3", "@cosmjs/stargate": "^0.32.3", @@ -16,7 +17,7 @@ "@endo/errors": "^1.2.2", "@endo/far": "^1.0.4", "@endo/init": "^1.0.4", - "agoric": "0.21.2-dev-5676146.0", + "agoric": "dev", "ava": "^5.3.1", "execa": "^8.0.1" }, @@ -26,5 +27,54 @@ "packageManager": "yarn@4.5.3", "devDependencies": { "@types/node": "^22.0.0" + }, + "resolutions": { + "@agoric/cosmos": "portal:../../agoric-sdk/golang/cosmos", + "@agoric/ertp": "portal:../../agoric-sdk/packages/ERTP", + "@agoric/swingset-vat": "portal:../../agoric-sdk/packages/SwingSet", + "@agoric/access-token": "portal:../../agoric-sdk/packages/access-token", + "agoric": "portal:../../agoric-sdk/packages/agoric-cli", + "@agoric/async-flow": "portal:../../agoric-sdk/packages/async-flow", + "@agoric/base-zone": "portal:../../agoric-sdk/packages/base-zone", + "@agoric/builders": "portal:../../agoric-sdk/packages/builders", + "@agoric/cache": "portal:../../agoric-sdk/packages/cache", + "@agoric/casting": "portal:../../agoric-sdk/packages/casting", + "@agoric/client-utils": "portal:../../agoric-sdk/packages/client-utils", + "@agoric/cosmic-proto": "portal:../../agoric-sdk/packages/cosmic-proto", + "@agoric/cosmic-swingset": "portal:../../agoric-sdk/packages/cosmic-swingset", + "@agoric/create-dapp": "portal:../../agoric-sdk/packages/create-dapp", + "@agoric/deploy-script-support": "portal:../../agoric-sdk/packages/deploy-script-support", + "@agoric/eslint-config": "portal:../../agoric-sdk/packages/eslint-config", + "@agoric/fast-usdc": "portal:../../agoric-sdk/packages/fast-usdc", + "@agoric/governance": "portal:../../agoric-sdk/packages/governance", + "@agoric/import-manager": "portal:../../agoric-sdk/packages/import-manager", + "@agoric/inter-protocol": "portal:../../agoric-sdk/packages/inter-protocol", + "@agoric/internal": "portal:../../agoric-sdk/packages/internal", + "@agoric/kmarshal": "portal:../../agoric-sdk/packages/kmarshal", + "@agoric/network": "portal:../../agoric-sdk/packages/network", + "@agoric/notifier": "portal:../../agoric-sdk/packages/notifier", + "@agoric/orchestration": "portal:../../agoric-sdk/packages/orchestration", + "@agoric/pegasus": "portal:../../agoric-sdk/packages/pegasus", + "@agoric/smart-wallet": "portal:../../agoric-sdk/packages/smart-wallet", + "@agoric/solo": "portal:../../agoric-sdk/packages/solo", + "@agoric/sparse-ints": "portal:../../agoric-sdk/packages/sparse-ints", + "@agoric/spawner": "portal:../../agoric-sdk/packages/spawner", + "@agoric/stat-logger": "portal:../../agoric-sdk/packages/stat-logger", + "@agoric/store": "portal:../../agoric-sdk/packages/store", + "@agoric/swing-store": "portal:../../agoric-sdk/packages/swing-store", + "@agoric/swingset-liveslots": "portal:../../agoric-sdk/packages/swingset-liveslots", + "@agoric/swingset-xsnap-supervisor": "portal:../../agoric-sdk/packages/swingset-xsnap-supervisor", + "@agoric/telemetry": "portal:../../agoric-sdk/packages/telemetry", + "@agoric/time": "portal:../../agoric-sdk/packages/time", + "@agoric/vat-data": "portal:../../agoric-sdk/packages/vat-data", + "@agoric/vats": "portal:../../agoric-sdk/packages/vats", + "@agoric/vm-config": "portal:../../agoric-sdk/packages/vm-config", + "@agoric/vow": "portal:../../agoric-sdk/packages/vow", + "@agoric/wallet": "portal:../../agoric-sdk/packages/wallet", + "@agoric/wallet-backend": "portal:../../agoric-sdk/packages/wallet/api", + "@agoric/xsnap": "portal:../../agoric-sdk/packages/xsnap", + "@agoric/xsnap-lockdown": "portal:../../agoric-sdk/packages/xsnap-lockdown", + "@agoric/zoe": "portal:../../agoric-sdk/packages/zoe", + "@agoric/zone": "portal:../../agoric-sdk/packages/zone" } } diff --git a/a3p-integration/proposals/s:stake-bld/yarn.lock b/a3p-integration/proposals/s:stake-bld/yarn.lock index 6eeed912071..0d13fa55ab9 100644 --- a/a3p-integration/proposals/s:stake-bld/yarn.lock +++ b/a3p-integration/proposals/s:stake-bld/yarn.lock @@ -5,23 +5,15 @@ __metadata: version: 8 cacheKey: 10c0 -"@agoric/access-token@npm:0.4.22-dev-5676146.0+5676146": - version: 0.4.22-dev-5676146.0 - resolution: "@agoric/access-token@npm:0.4.22-dev-5676146.0" +"@agoric/access-token@portal:../../agoric-sdk/packages/access-token::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/access-token@portal:../../agoric-sdk/packages/access-token::locator=root-workspace-0b6124%40workspace%3A." dependencies: n-readlines: "npm:^1.0.0" proper-lockfile: "npm:^4.1.2" tmp: "npm:^0.2.1" - checksum: 10c0/c1fe4f9f1eaf2e4334ec190099f03d2ccff024e0b06693784230ccac6fbe7a98ebce63f365fade828b9c02c8967239e92c8fa0592d2661086e3b31eecd46e3b0 - languageName: node - linkType: hard - -"@agoric/assert@npm:0.6.1-dev-5676146.0+5676146": - version: 0.6.1-dev-5676146.0 - resolution: "@agoric/assert@npm:0.6.1-dev-5676146.0" - checksum: 10c0/3391d53d64f4ca74ae5a87b623dc7489a20d91f45716723c33e393cfe6536fb1553344b72d24ac966f49b83d56906140c263778968ff513dfcdbb30e1be68091 languageName: node - linkType: hard + linkType: soft "@agoric/babel-generator@npm:^7.17.6": version: 7.17.6 @@ -34,314 +26,306 @@ __metadata: languageName: node linkType: hard -"@agoric/base-zone@npm:0.1.1-dev-5676146.0+5676146": - version: 0.1.1-dev-5676146.0 - resolution: "@agoric/base-zone@npm:0.1.1-dev-5676146.0" +"@agoric/base-zone@portal:../../agoric-sdk/packages/base-zone::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/base-zone@portal:../../agoric-sdk/packages/base-zone::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@endo/common": "npm:^1.1.0" - "@endo/exo": "npm:^1.2.1" - "@endo/far": "npm:^1.0.4" - "@endo/pass-style": "npm:^1.2.0" - "@endo/patterns": "npm:^1.2.0" - checksum: 10c0/b3dfa47af7cf4a686244e2a31243394b44756f127a7612f5d50c77b1a91f777514386c305866705b46219d2d1e0df2b8d5bff9e08f82275043bb0c198c0601e4 + "@agoric/store": "npm:^0.9.2" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" languageName: node - linkType: hard + linkType: soft -"@agoric/cache@npm:0.3.3-dev-5676146.0+5676146": - version: 0.3.3-dev-5676146.0 - resolution: "@agoric/cache@npm:0.3.3-dev-5676146.0" +"@agoric/cache@portal:../../agoric-sdk/packages/cache::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/cache@portal:../../agoric-sdk/packages/cache::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/notifier": "npm:0.6.3-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@endo/far": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - checksum: 10c0/b2967955f99d3cfe9b30700373275290183a5b6284703b6bbfff98246342bd7ff995addc48e31a8b2c52c9330c1aed5566f9e73fc0ae5b753478c961d7cdf258 + "@agoric/internal": "npm:^0.3.2" + "@agoric/notifier": "npm:^0.6.2" + "@agoric/store": "npm:^0.9.2" + "@agoric/vat-data": "npm:^0.5.2" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" languageName: node - linkType: hard + linkType: soft -"@agoric/casting@npm:0.4.3-dev-5676146.0+5676146": - version: 0.4.3-dev-5676146.0 - resolution: "@agoric/casting@npm:0.4.3-dev-5676146.0" +"@agoric/casting@portal:../../agoric-sdk/packages/casting::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/casting@portal:../../agoric-sdk/packages/casting::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/notifier": "npm:0.6.3-dev-5676146.0+5676146" - "@agoric/spawner": "npm:0.6.9-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" + "@agoric/internal": "npm:^0.3.2" + "@agoric/notifier": "npm:^0.6.2" + "@agoric/store": "npm:^0.9.2" "@cosmjs/encoding": "npm:^0.32.3" "@cosmjs/proto-signing": "npm:^0.32.3" "@cosmjs/stargate": "npm:^0.32.3" "@cosmjs/tendermint-rpc": "npm:^0.32.3" - "@endo/far": "npm:^1.0.4" - "@endo/init": "npm:^1.0.4" - "@endo/lockdown": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/promise-kit": "npm:^1.0.4" - node-fetch: "npm:^2.6.0" - checksum: 10c0/548c929c6535aea1d0a8e2cbc7fc3ec57d04dd8fd5b6e62ee565b674f8a87efe82536091e182a71a985244c0459e19b0195fc81b80a22c480859c37a69815367 + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/lockdown": "npm:^1.0.13" + "@endo/marshal": "npm:^1.6.2" + "@endo/promise-kit": "npm:^1.1.8" languageName: node - linkType: hard + linkType: soft -"@agoric/cosmic-proto@npm:0.4.1-dev-5676146.0+5676146": - version: 0.4.1-dev-5676146.0 - resolution: "@agoric/cosmic-proto@npm:0.4.1-dev-5676146.0" +"@agoric/client-utils@portal:../../agoric-sdk/packages/client-utils::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/client-utils@portal:../../agoric-sdk/packages/client-utils::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@cosmjs/amino": "npm:^0.32.3" - "@cosmjs/proto-signing": "npm:^0.32.3" + "@agoric/casting": "npm:^0.4.2" + "@agoric/ertp": "npm:^0.16.2" + "@agoric/internal": "npm:^0.3.2" + "@agoric/smart-wallet": "npm:^0.5.3" + "@agoric/vats": "npm:^0.15.1" "@cosmjs/stargate": "npm:^0.32.3" "@cosmjs/tendermint-rpc": "npm:^0.32.3" - "@endo/init": "npm:^1.0.3" - axios: "npm:^1.6.7" - checksum: 10c0/dc5a39feebce9209a393c37f6bfe6be550600718b2c841e13750a92d3a734d5ed718beb3d7532829c2da5e0344cf96b82f8d779dfc30d4b2c266d89902e2f4b8 + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" languageName: node - linkType: hard + linkType: soft -"@agoric/ertp@npm:0.16.3-dev-5676146.0+5676146": - version: 0.16.3-dev-5676146.0 - resolution: "@agoric/ertp@npm:0.16.3-dev-5676146.0" +"@agoric/cosmic-proto@portal:../../agoric-sdk/packages/cosmic-proto::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/cosmic-proto@portal:../../agoric-sdk/packages/cosmic-proto::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/notifier": "npm:0.6.3-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@agoric/zone": "npm:0.2.3-dev-5676146.0+5676146" - "@endo/eventual-send": "npm:^1.1.2" - "@endo/far": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/nat": "npm:^5.0.4" - "@endo/patterns": "npm:^1.2.0" - "@endo/promise-kit": "npm:^1.0.4" - checksum: 10c0/6a3ef33e6b1052253346a651f6f193dbda9551a2ed3f36f63af0b9da4d27ed80bdf63251f97cc631105c923ac23440ef456198f1b15b56b6aba86ec1a590b6f6 - languageName: node - linkType: hard - -"@agoric/governance@npm:0.10.4-dev-5676146.0+5676146": - version: 0.10.4-dev-5676146.0 - resolution: "@agoric/governance@npm:0.10.4-dev-5676146.0" - dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/ertp": "npm:0.16.3-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/network": "npm:0.1.1-dev-5676146.0+5676146" - "@agoric/notifier": "npm:0.6.3-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/time": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@agoric/zoe": "npm:0.26.3-dev-5676146.0+5676146" - "@endo/bundle-source": "npm:^3.1.0" - "@endo/captp": "npm:^4.0.4" - "@endo/eventual-send": "npm:^1.1.2" - "@endo/far": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/nat": "npm:^5.0.4" - "@endo/promise-kit": "npm:^1.0.4" + "@endo/base64": "npm:^1.0.9" + "@endo/init": "npm:^1.1.7" + languageName: node + linkType: soft + +"@agoric/ertp@portal:../../agoric-sdk/packages/ERTP::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/ertp@portal:../../agoric-sdk/packages/ERTP::locator=root-workspace-0b6124%40workspace%3A." + dependencies: + "@agoric/notifier": "npm:^0.6.2" + "@agoric/store": "npm:^0.9.2" + "@agoric/vat-data": "npm:^0.5.2" + "@agoric/zone": "npm:^0.2.2" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + languageName: node + linkType: soft + +"@agoric/governance@portal:../../agoric-sdk/packages/governance::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/governance@portal:../../agoric-sdk/packages/governance::locator=root-workspace-0b6124%40workspace%3A." + dependencies: + "@agoric/ertp": "npm:^0.16.2" + "@agoric/internal": "npm:^0.3.2" + "@agoric/notifier": "npm:^0.6.2" + "@agoric/store": "npm:^0.9.2" + "@agoric/time": "npm:^0.3.2" + "@agoric/vat-data": "npm:^0.5.2" + "@agoric/zoe": "npm:^0.26.2" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/captp": "npm:^4.4.3" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/promise-kit": "npm:^1.1.8" import-meta-resolve: "npm:^2.2.1" - checksum: 10c0/64a8a0579fde6dd60630175e5d1bd0a370532c993700049352f2cc83dbfde6cac90b1671acf625afadcc3449a8f4872d1dacc194f8724281b5ac82e6c1b887d1 - languageName: node - linkType: hard - -"@agoric/inter-protocol@npm:0.16.2-dev-5676146.0+5676146": - version: 0.16.2-dev-5676146.0 - resolution: "@agoric/inter-protocol@npm:0.16.2-dev-5676146.0" - dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/ertp": "npm:0.16.3-dev-5676146.0+5676146" - "@agoric/governance": "npm:0.10.4-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/notifier": "npm:0.6.3-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/time": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@agoric/vats": "npm:0.15.2-dev-5676146.0+5676146" - "@agoric/zoe": "npm:0.26.3-dev-5676146.0+5676146" - "@endo/captp": "npm:^4.0.4" - "@endo/eventual-send": "npm:^1.1.2" - "@endo/far": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/nat": "npm:^5.0.4" - "@endo/promise-kit": "npm:^1.0.4" - jessie.js: "npm:^0.3.2" - checksum: 10c0/6216bb903dc4b292f6b24fdc6121cd3540ebdd402f4c81dded60b00bbf2f8130c25a2565ccb80ffc68dbc2b625d0459df3215cbf69585ed84f101a5d53351e4c languageName: node - linkType: hard + linkType: soft + +"@agoric/inter-protocol@portal:../../agoric-sdk/packages/inter-protocol::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/inter-protocol@portal:../../agoric-sdk/packages/inter-protocol::locator=root-workspace-0b6124%40workspace%3A." + dependencies: + "@agoric/ertp": "npm:^0.16.2" + "@agoric/governance": "npm:^0.10.3" + "@agoric/internal": "npm:^0.3.2" + "@agoric/notifier": "npm:^0.6.2" + "@agoric/store": "npm:^0.9.2" + "@agoric/time": "npm:^0.3.2" + "@agoric/vat-data": "npm:^0.5.2" + "@agoric/vats": "npm:^0.15.1" + "@agoric/zoe": "npm:^0.26.2" + "@agoric/zone": "npm:^0.2.2" + "@endo/captp": "npm:^4.4.3" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/promise-kit": "npm:^1.1.8" + jessie.js: "npm:^0.3.4" + languageName: node + linkType: soft -"@agoric/internal@npm:0.3.3-dev-5676146.0, @agoric/internal@npm:0.3.3-dev-5676146.0+5676146": - version: 0.3.3-dev-5676146.0 - resolution: "@agoric/internal@npm:0.3.3-dev-5676146.0" +"@agoric/internal@portal:../../agoric-sdk/packages/internal::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/internal@portal:../../agoric-sdk/packages/internal::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/base-zone": "npm:0.1.1-dev-5676146.0+5676146" - "@endo/common": "npm:^1.1.0" - "@endo/far": "npm:^1.0.4" - "@endo/init": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/patterns": "npm:^1.2.0" - "@endo/promise-kit": "npm:^1.0.4" - "@endo/stream": "npm:^1.1.0" + "@agoric/base-zone": "npm:^0.1.0" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + "@endo/stream": "npm:^1.2.8" anylogger: "npm:^0.21.0" - jessie.js: "npm:^0.3.2" - checksum: 10c0/cd2a81ff39790a1b333621b3815f0791b70d0822f201d491175e46602697c80814f1fb87a610167e541a9ad431a771cd7348afe24517a15c45d1591d3d494bc2 + jessie.js: "npm:^0.3.4" languageName: node - linkType: hard + linkType: soft -"@agoric/kmarshal@npm:0.1.1-dev-5676146.0+5676146": - version: 0.1.1-dev-5676146.0 - resolution: "@agoric/kmarshal@npm:0.1.1-dev-5676146.0" +"@agoric/kmarshal@portal:../../agoric-sdk/packages/kmarshal::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/kmarshal@portal:../../agoric-sdk/packages/kmarshal::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@endo/far": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - checksum: 10c0/6acd0de1ad1cb2b4bd6065f13394222476a713be169dd7979a26934f223bcac2222d9e1560327f31417a774501e82703dce3c0cae0a327eae955e2072e8587d7 + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" languageName: node - linkType: hard + linkType: soft -"@agoric/network@npm:0.1.1-dev-5676146.0+5676146": - version: 0.1.1-dev-5676146.0 - resolution: "@agoric/network@npm:0.1.1-dev-5676146.0" +"@agoric/network@portal:../../agoric-sdk/packages/network::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/network@portal:../../agoric-sdk/packages/network::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@endo/base64": "npm:^1.0.2" - "@endo/far": "npm:^1.0.4" - "@endo/patterns": "npm:^1.1.0" - "@endo/promise-kit": "npm:^1.0.4" - checksum: 10c0/92207ef3889c53526490de4d62b93788dfb009fb70809b473a50993adc0bc8fbbd2be8da43db78a51b5df9af19d7cbe24aab55c958daf4bdcb86ae1e6e55af95 + "@agoric/internal": "npm:^0.3.2" + "@agoric/store": "npm:^0.9.2" + "@agoric/vat-data": "npm:^0.5.2" + "@endo/base64": "npm:^1.0.9" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" languageName: node - linkType: hard + linkType: soft -"@agoric/notifier@npm:0.6.3-dev-5676146.0+5676146": - version: 0.6.3-dev-5676146.0 - resolution: "@agoric/notifier@npm:0.6.3-dev-5676146.0" +"@agoric/notifier@portal:../../agoric-sdk/packages/notifier::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/notifier@portal:../../agoric-sdk/packages/notifier::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@endo/far": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/patterns": "npm:^1.2.0" - "@endo/promise-kit": "npm:^1.0.4" - checksum: 10c0/5357e05ff60d962189658e9476307f5c3a8fd4f6cf82d30dd4526050c5f747f33eafeb8cdb25753c61d91e1390a4c8408424fd6d15ecb103add72e5113b0c4a1 - languageName: node - linkType: hard - -"@agoric/smart-wallet@npm:0.5.4-dev-5676146.0+5676146": - version: 0.5.4-dev-5676146.0 - resolution: "@agoric/smart-wallet@npm:0.5.4-dev-5676146.0" - dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/casting": "npm:0.4.3-dev-5676146.0+5676146" - "@agoric/ertp": "npm:0.16.3-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/notifier": "npm:0.6.3-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@agoric/vats": "npm:0.15.2-dev-5676146.0+5676146" - "@agoric/zoe": "npm:0.26.3-dev-5676146.0+5676146" - "@endo/eventual-send": "npm:^1.1.2" - "@endo/far": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/nat": "npm:^5.0.4" - "@endo/promise-kit": "npm:^1.0.4" - checksum: 10c0/cc46165846a0d0b3f7290ec4f5fe60030f3272ee7278bd49274634daee5000d96222e2ed3e72f724943100101cee4d2f760e0bf2d5c08620b89930d3fbed5715 + "@agoric/internal": "npm:^0.3.2" + "@agoric/vat-data": "npm:^0.5.2" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" languageName: node - linkType: hard + linkType: soft -"@agoric/spawner@npm:0.6.9-dev-5676146.0+5676146": - version: 0.6.9-dev-5676146.0 - resolution: "@agoric/spawner@npm:0.6.9-dev-5676146.0" - dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@endo/eventual-send": "npm:^1.1.2" - "@endo/import-bundle": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - checksum: 10c0/4f605a59a2da5fef37faf8923ebeb237e789f65f678a192c926bb1ccb3ead49eecb75b9120971da9cc4d046de0503087af38814e69811e9d6bfa7d1559b0c510 +"@agoric/smart-wallet@portal:../../agoric-sdk/packages/smart-wallet::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/smart-wallet@portal:../../agoric-sdk/packages/smart-wallet::locator=root-workspace-0b6124%40workspace%3A." + dependencies: + "@agoric/ertp": "npm:^0.16.2" + "@agoric/internal": "npm:^0.3.2" + "@agoric/notifier": "npm:^0.6.2" + "@agoric/store": "npm:^0.9.2" + "@agoric/vat-data": "npm:^0.5.2" + "@agoric/vats": "npm:^0.15.1" + "@agoric/vow": "npm:^0.1.0" + "@agoric/zoe": "npm:^0.26.2" + "@agoric/zone": "npm:^0.2.2" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/promise-kit": "npm:^1.1.8" languageName: node - linkType: hard + linkType: soft -"@agoric/store@npm:0.9.3-dev-5676146.0+5676146": - version: 0.9.3-dev-5676146.0 - resolution: "@agoric/store@npm:0.9.3-dev-5676146.0" +"@agoric/store@portal:../../agoric-sdk/packages/store::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/store@portal:../../agoric-sdk/packages/store::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@endo/exo": "npm:^1.2.1" - "@endo/marshal": "npm:^1.3.0" - "@endo/pass-style": "npm:^1.2.0" - "@endo/patterns": "npm:^1.2.0" - checksum: 10c0/675e73bbcac024c456b658583ec3fd14a50f69fea5fc07aadf30e593978e5cadbc82d365b13976967b5509614a7adf0adad4e84712f7e0b6c13f2a2a93c9ea63 + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" languageName: node - linkType: hard + linkType: soft -"@agoric/swing-store@npm:0.9.2-dev-5676146.0+5676146": - version: 0.9.2-dev-5676146.0 - resolution: "@agoric/swing-store@npm:0.9.2-dev-5676146.0" +"@agoric/swing-store@portal:../../agoric-sdk/packages/swing-store::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/swing-store@portal:../../agoric-sdk/packages/swing-store::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@endo/base64": "npm:^1.0.2" - "@endo/bundle-source": "npm:^3.1.0" - "@endo/check-bundle": "npm:^1.0.4" - "@endo/nat": "npm:^5.0.4" + "@agoric/internal": "npm:^0.3.2" + "@endo/base64": "npm:^1.0.9" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/check-bundle": "npm:^1.0.12" + "@endo/errors": "npm:^1.2.8" + "@endo/nat": "npm:^5.0.13" better-sqlite3: "npm:^9.1.1" - checksum: 10c0/4f18b4051bc41fb153da4b750144db727f9b59e8fd18196eea1427d12028b47ebf8448b14c47708a2347ed2a4c1ed887fdcf2c0048b5ab4e84869cd17e3dc935 languageName: node - linkType: hard + linkType: soft -"@agoric/swingset-liveslots@npm:0.10.3-dev-5676146.0+5676146": - version: 0.10.3-dev-5676146.0 - resolution: "@agoric/swingset-liveslots@npm:0.10.3-dev-5676146.0" +"@agoric/swingset-liveslots@portal:../../agoric-sdk/packages/swingset-liveslots::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/swingset-liveslots@portal:../../agoric-sdk/packages/swingset-liveslots::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@endo/env-options": "npm:^1.1.1" - "@endo/errors": "npm:^1.1.0" - "@endo/eventual-send": "npm:^1.1.2" - "@endo/exo": "npm:^1.2.1" - "@endo/far": "npm:^1.0.4" - "@endo/init": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/nat": "npm:^5.0.4" - "@endo/pass-style": "npm:^1.2.0" - "@endo/patterns": "npm:^1.2.0" - "@endo/promise-kit": "npm:^1.0.4" - checksum: 10c0/17ff4c6b94992d5532b748b4b20a95d273f8eb9ee7345552b95050de90563f5f2b03416ff60b9ca3ce07564bb4f3aa993fbf7710f6b24dc88d902b701a8b6a91 - languageName: node - linkType: hard - -"@agoric/swingset-vat@npm:0.32.3-dev-5676146.0+5676146": - version: 0.32.3-dev-5676146.0 - resolution: "@agoric/swingset-vat@npm:0.32.3-dev-5676146.0" - dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/kmarshal": "npm:0.1.1-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/swing-store": "npm:0.9.2-dev-5676146.0+5676146" - "@agoric/swingset-liveslots": "npm:0.10.3-dev-5676146.0+5676146" - "@agoric/swingset-xsnap-supervisor": "npm:0.10.3-dev-5676146.0+5676146" - "@agoric/time": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@agoric/xsnap": "npm:0.14.3-dev-5676146.0+5676146" - "@agoric/xsnap-lockdown": "npm:0.14.1-dev-5676146.0+5676146" - "@endo/base64": "npm:^1.0.2" - "@endo/bundle-source": "npm:^3.1.0" - "@endo/captp": "npm:^4.0.4" - "@endo/check-bundle": "npm:^1.0.4" - "@endo/compartment-mapper": "npm:^1.1.2" - "@endo/eventual-send": "npm:^1.1.2" - "@endo/far": "npm:^1.0.4" - "@endo/import-bundle": "npm:^1.0.4" - "@endo/init": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/nat": "npm:^5.0.4" - "@endo/patterns": "npm:^1.2.0" - "@endo/promise-kit": "npm:^1.0.4" - "@endo/ses-ava": "npm:^1.1.2" - "@endo/stream": "npm:^1.1.0" - "@endo/zip": "npm:^1.0.2" + "@agoric/internal": "npm:^0.3.2" + "@agoric/store": "npm:^0.9.2" + "@endo/env-options": "npm:^1.1.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + languageName: node + linkType: soft + +"@agoric/swingset-vat@portal:../../agoric-sdk/packages/SwingSet::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/swingset-vat@portal:../../agoric-sdk/packages/SwingSet::locator=root-workspace-0b6124%40workspace%3A." + dependencies: + "@agoric/internal": "npm:^0.3.2" + "@agoric/kmarshal": "npm:^0.1.0" + "@agoric/store": "npm:^0.9.2" + "@agoric/swing-store": "npm:^0.9.1" + "@agoric/swingset-liveslots": "npm:^0.10.2" + "@agoric/swingset-xsnap-supervisor": "npm:^0.10.2" + "@agoric/time": "npm:^0.3.2" + "@agoric/vat-data": "npm:^0.5.2" + "@agoric/xsnap-lockdown": "npm:^0.14.0" + "@endo/base64": "npm:^1.0.9" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/captp": "npm:^4.4.3" + "@endo/check-bundle": "npm:^1.0.12" + "@endo/compartment-mapper": "npm:^1.4.0" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/import-bundle": "npm:^1.3.2" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + "@endo/ses-ava": "npm:^1.2.8" + "@endo/stream": "npm:^1.2.8" + "@endo/zip": "npm:^1.0.9" ansi-styles: "npm:^6.2.1" anylogger: "npm:^0.21.0" better-sqlite3: "npm:^9.1.1" @@ -351,19 +335,18 @@ __metadata: tmp: "npm:^0.2.1" yargs-parser: "npm:^21.1.1" peerDependencies: + "@agoric/xsnap": ^0.14.2 ava: ^5.3.0 bin: vat: bin/vat - checksum: 10c0/5eaa97f9e9a71bf20c590d44693c97e12bfbf42e2ce15991d48e3393ff1f9561b8e7717fa63dabc3c0d720795e8922452485003e86b68e307d90bd6aea4c79b0 languageName: node - linkType: hard + linkType: soft -"@agoric/swingset-xsnap-supervisor@npm:0.10.3-dev-5676146.0+5676146": - version: 0.10.3-dev-5676146.0 - resolution: "@agoric/swingset-xsnap-supervisor@npm:0.10.3-dev-5676146.0" - checksum: 10c0/495c847ccb69bcfb338e27a2b423ec480e303c52c51e0496aaeea820d17af100c59f2d45e540517c8eba4aea9645ef6c3e200ad3834d46087b4a21671791e077 +"@agoric/swingset-xsnap-supervisor@portal:../../agoric-sdk/packages/swingset-xsnap-supervisor::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/swingset-xsnap-supervisor@portal:../../agoric-sdk/packages/swingset-xsnap-supervisor::locator=root-workspace-0b6124%40workspace%3A." languageName: node - linkType: hard + linkType: soft "@agoric/synthetic-chain@npm:^0.4.3": version: 0.4.3 @@ -380,145 +363,124 @@ __metadata: languageName: node linkType: hard -"@agoric/time@npm:0.3.3-dev-5676146.0+5676146": - version: 0.3.3-dev-5676146.0 - resolution: "@agoric/time@npm:0.3.3-dev-5676146.0" +"@agoric/time@portal:../../agoric-sdk/packages/time::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/time@portal:../../agoric-sdk/packages/time::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@endo/nat": "npm:^5.0.4" - "@endo/patterns": "npm:^1.2.0" - checksum: 10c0/a221f90a327ffaf9eccc6943b1f59b97b200df3a9932b9da7aee484f938e919302069b056182035d6681ebb3b70759841bcf221549f91f172f89848372efe30a + "@agoric/store": "npm:^0.9.2" + "@endo/errors": "npm:^1.2.8" + "@endo/nat": "npm:^5.0.13" + "@endo/patterns": "npm:^1.4.7" languageName: node - linkType: hard + linkType: soft -"@agoric/vat-data@npm:0.5.3-dev-5676146.0+5676146": - version: 0.5.3-dev-5676146.0 - resolution: "@agoric/vat-data@npm:0.5.3-dev-5676146.0" +"@agoric/vat-data@portal:../../agoric-sdk/packages/vat-data::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/vat-data@portal:../../agoric-sdk/packages/vat-data::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/base-zone": "npm:0.1.1-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/swingset-liveslots": "npm:0.10.3-dev-5676146.0+5676146" - "@agoric/vow": "npm:0.1.1-dev-5676146.0+5676146" - checksum: 10c0/2c08e571cf1ab9af2dc1214c1d7fb9b73446ed9ddaca3a10db2b90160138c07728a0d37cfc9748a37dd424a2945da706bfecc152b2b87fbb59e81bdafaba0e77 + "@agoric/base-zone": "npm:^0.1.0" + "@agoric/store": "npm:^0.9.2" + "@agoric/swingset-liveslots": "npm:^0.10.2" + "@endo/errors": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/patterns": "npm:^1.4.7" languageName: node - linkType: hard + linkType: soft -"@agoric/vats@npm:0.15.2-dev-5676146.0+5676146": - version: 0.15.2-dev-5676146.0 - resolution: "@agoric/vats@npm:0.15.2-dev-5676146.0" - dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/ertp": "npm:0.16.3-dev-5676146.0+5676146" - "@agoric/governance": "npm:0.10.4-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/network": "npm:0.1.1-dev-5676146.0+5676146" - "@agoric/notifier": "npm:0.6.3-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/swingset-vat": "npm:0.32.3-dev-5676146.0+5676146" - "@agoric/time": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@agoric/zoe": "npm:0.26.3-dev-5676146.0+5676146" - "@agoric/zone": "npm:0.2.3-dev-5676146.0+5676146" - "@endo/far": "npm:^1.0.4" - "@endo/import-bundle": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/nat": "npm:^5.0.4" - "@endo/patterns": "npm:^1.2.0" - "@endo/promise-kit": "npm:^1.0.4" +"@agoric/vats@portal:../../agoric-sdk/packages/vats::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/vats@portal:../../agoric-sdk/packages/vats::locator=root-workspace-0b6124%40workspace%3A." + dependencies: + "@agoric/cosmic-proto": "npm:^0.4.0" + "@agoric/ertp": "npm:^0.16.2" + "@agoric/governance": "npm:^0.10.3" + "@agoric/internal": "npm:^0.3.2" + "@agoric/network": "npm:^0.1.0" + "@agoric/notifier": "npm:^0.6.2" + "@agoric/store": "npm:^0.9.2" + "@agoric/swingset-vat": "npm:^0.32.2" + "@agoric/time": "npm:^0.3.2" + "@agoric/vat-data": "npm:^0.5.2" + "@agoric/vow": "npm:^0.1.0" + "@agoric/zoe": "npm:^0.26.2" + "@agoric/zone": "npm:^0.2.2" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/import-bundle": "npm:^1.3.2" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" import-meta-resolve: "npm:^2.2.1" - jessie.js: "npm:^0.3.2" - checksum: 10c0/ac5117f609b112bf8902488d4769c3f6670cc3402cbe8e75db1c8f227f25e4334b5b447d4fa29cfe674e6d3b93554cdfd3d5858dff6c5b48f89b6e24af636da4 + jessie.js: "npm:^0.3.4" languageName: node - linkType: hard + linkType: soft -"@agoric/vow@npm:0.1.1-dev-5676146.0+5676146": - version: 0.1.1-dev-5676146.0 - resolution: "@agoric/vow@npm:0.1.1-dev-5676146.0" +"@agoric/vow@portal:../../agoric-sdk/packages/vow::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/vow@portal:../../agoric-sdk/packages/vow::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/base-zone": "npm:0.1.1-dev-5676146.0+5676146" - "@endo/env-options": "npm:^1.1.1" - "@endo/eventual-send": "npm:^1.1.2" - "@endo/pass-style": "npm:^1.2.0" - "@endo/patterns": "npm:^1.2.0" - "@endo/promise-kit": "npm:^1.0.4" - checksum: 10c0/e0aa219b31e962b784bf4c48a2108b032aecf60c7cf05393e305c0279abee887a81879ca6999eb56cbaedebc656d7d575715ba5c470dd624f62304624475de60 + "@agoric/base-zone": "npm:^0.1.0" + "@agoric/internal": "npm:^0.3.2" + "@endo/env-options": "npm:^1.1.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" languageName: node - linkType: hard + linkType: soft -"@agoric/xsnap-lockdown@npm:0.14.1-dev-5676146.0+5676146": - version: 0.14.1-dev-5676146.0 - resolution: "@agoric/xsnap-lockdown@npm:0.14.1-dev-5676146.0" - checksum: 10c0/8faa700ff6049b9cd29109c42e2ef3b228f18e265a5908e987af4ee32127e9b6451b7299538ec8fa50514c359f2b0b9a60beb6a5d2e126928def1e5232a3d919 +"@agoric/xsnap-lockdown@portal:../../agoric-sdk/packages/xsnap-lockdown::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/xsnap-lockdown@portal:../../agoric-sdk/packages/xsnap-lockdown::locator=root-workspace-0b6124%40workspace%3A." languageName: node - linkType: hard + linkType: soft -"@agoric/xsnap@npm:0.14.3-dev-5676146.0+5676146": - version: 0.14.3-dev-5676146.0 - resolution: "@agoric/xsnap@npm:0.14.3-dev-5676146.0" - dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/xsnap-lockdown": "npm:0.14.1-dev-5676146.0+5676146" - "@endo/bundle-source": "npm:^3.1.0" - "@endo/eventual-send": "npm:^1.1.2" - "@endo/init": "npm:^1.0.4" - "@endo/netstring": "npm:^1.0.4" - "@endo/promise-kit": "npm:^1.0.4" - "@endo/stream": "npm:^1.1.0" - "@endo/stream-node": "npm:^1.0.4" - glob: "npm:^7.1.6" - tmp: "npm:^0.2.1" - bin: - ava-xs: src/ava-xs.js - xsrepl: src/xsrepl - checksum: 10c0/0f5461b8c5cafa94388720cdcbd5b9fc65e0f2416d9084e3e90b60728cf050fcd95c009a67fda284cee2471058814ba504e655e0a3de82cbbc36e03c24e9fc50 - languageName: node - linkType: hard - -"@agoric/zoe@npm:0.26.3-dev-5676146.0+5676146": - version: 0.26.3-dev-5676146.0 - resolution: "@agoric/zoe@npm:0.26.3-dev-5676146.0" - dependencies: - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/base-zone": "npm:0.1.1-dev-5676146.0+5676146" - "@agoric/ertp": "npm:0.16.3-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/notifier": "npm:0.6.3-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/swingset-liveslots": "npm:0.10.3-dev-5676146.0+5676146" - "@agoric/swingset-vat": "npm:0.32.3-dev-5676146.0+5676146" - "@agoric/time": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@agoric/zone": "npm:0.2.3-dev-5676146.0+5676146" - "@endo/bundle-source": "npm:^3.1.0" - "@endo/captp": "npm:^4.0.4" - "@endo/common": "npm:^1.1.0" - "@endo/eventual-send": "npm:^1.1.2" - "@endo/exo": "npm:^1.2.1" - "@endo/far": "npm:^1.0.4" - "@endo/import-bundle": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/nat": "npm:^5.0.4" - "@endo/patterns": "npm:^1.2.0" - "@endo/promise-kit": "npm:^1.0.4" +"@agoric/zoe@portal:../../agoric-sdk/packages/zoe::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/zoe@portal:../../agoric-sdk/packages/zoe::locator=root-workspace-0b6124%40workspace%3A." + dependencies: + "@agoric/base-zone": "npm:^0.1.0" + "@agoric/ertp": "npm:^0.16.2" + "@agoric/internal": "npm:^0.3.2" + "@agoric/notifier": "npm:^0.6.2" + "@agoric/store": "npm:^0.9.2" + "@agoric/swingset-liveslots": "npm:^0.10.2" + "@agoric/swingset-vat": "npm:^0.32.2" + "@agoric/time": "npm:^0.3.2" + "@agoric/vat-data": "npm:^0.5.2" + "@agoric/vow": "npm:^0.1.0" + "@agoric/zone": "npm:^0.2.2" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/captp": "npm:^4.4.3" + "@endo/common": "npm:^1.2.8" + "@endo/errors": "npm:^1.2.8" + "@endo/eventual-send": "npm:^1.2.8" + "@endo/exo": "npm:^1.5.7" + "@endo/far": "npm:^1.1.9" + "@endo/import-bundle": "npm:^1.3.2" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/pass-style": "npm:^1.4.7" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" yargs-parser: "npm:^21.1.1" - checksum: 10c0/4db929e776483dd41c0453d322fe93d27d35826ab98e31e257314e41f2eb6c86eb2a1da09761790bbc5f2bfa41a348ef5c84534044b6d1de576eca1ecea31a82 languageName: node - linkType: hard + linkType: soft -"@agoric/zone@npm:0.2.3-dev-5676146.0+5676146": - version: 0.2.3-dev-5676146.0 - resolution: "@agoric/zone@npm:0.2.3-dev-5676146.0" +"@agoric/zone@portal:../../agoric-sdk/packages/zone::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@agoric/zone@portal:../../agoric-sdk/packages/zone::locator=root-workspace-0b6124%40workspace%3A." dependencies: - "@agoric/base-zone": "npm:0.1.1-dev-5676146.0+5676146" - "@agoric/vat-data": "npm:0.5.3-dev-5676146.0+5676146" - "@endo/far": "npm:^1.0.4" - "@endo/pass-style": "npm:^1.2.0" - checksum: 10c0/82a7f1c741bb1c6bfca6398686e71b47135ee584f794dbbfc01ecdb37aea37a2607d857532caefd5c61a03f90a3fb7ac02374c189d4510b759209276f631a8d6 + "@agoric/base-zone": "npm:^0.1.0" + "@agoric/vat-data": "npm:^0.5.2" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/pass-style": "npm:^1.4.7" languageName: node - linkType: hard + linkType: soft "@babel/code-frame@npm:^7.23.5": version: 7.23.5 @@ -873,14 +835,14 @@ __metadata: languageName: node linkType: hard -"@endo/base64@npm:^1.0.2, @endo/base64@npm:^1.0.9": +"@endo/base64@npm:^1.0.9": version: 1.0.9 resolution: "@endo/base64@npm:1.0.9" checksum: 10c0/63e487cf59b50a080fab389a8ab24d66264910ecf375dc19677c2ee7421d92a4be9c85e435b216b4adc9983384073a7eb753223f85ba77aec8d9fd3e0c1fe090 languageName: node linkType: hard -"@endo/bundle-source@npm:^3.1.0": +"@endo/bundle-source@npm:^3.5.0": version: 3.5.0 resolution: "@endo/bundle-source@npm:3.5.0" dependencies: @@ -902,7 +864,7 @@ __metadata: languageName: node linkType: hard -"@endo/captp@npm:^4.0.4": +"@endo/captp@npm:^4.4.3": version: 4.4.3 resolution: "@endo/captp@npm:4.4.3" dependencies: @@ -915,7 +877,7 @@ __metadata: languageName: node linkType: hard -"@endo/check-bundle@npm:^1.0.4": +"@endo/check-bundle@npm:^1.0.12": version: 1.0.12 resolution: "@endo/check-bundle@npm:1.0.12" dependencies: @@ -933,7 +895,7 @@ __metadata: languageName: node linkType: hard -"@endo/common@npm:^1.1.0, @endo/common@npm:^1.2.8": +"@endo/common@npm:^1.2.8": version: 1.2.8 resolution: "@endo/common@npm:1.2.8" dependencies: @@ -944,7 +906,7 @@ __metadata: languageName: node linkType: hard -"@endo/compartment-mapper@npm:^1.1.2, @endo/compartment-mapper@npm:^1.4.0": +"@endo/compartment-mapper@npm:^1.4.0": version: 1.4.0 resolution: "@endo/compartment-mapper@npm:1.4.0" dependencies: @@ -957,21 +919,14 @@ __metadata: languageName: node linkType: hard -"@endo/env-options@npm:^0.1.4": - version: 0.1.4 - resolution: "@endo/env-options@npm:0.1.4" - checksum: 10c0/5bf49d362849090bff328b15f906adb5b8b6220815e8955e45f81e7ff9a8ab17e509fff8bf30f4c619772f4f1a8cba8f1ca90faec724b53b5b3f1c89050c6b44 - languageName: node - linkType: hard - -"@endo/env-options@npm:^1.1.1, @endo/env-options@npm:^1.1.8": +"@endo/env-options@npm:^1.1.8": version: 1.1.8 resolution: "@endo/env-options@npm:1.1.8" checksum: 10c0/2f519f48a5b966dbd9e66134d4abc89ff02b9791d21146b49031ceb694584f3f41c6119125b6bb4eb0d347f5bcd846473b5f3c4ae6bae3dac19402fcaf522520 languageName: node linkType: hard -"@endo/errors@npm:^1.1.0, @endo/errors@npm:^1.2.2, @endo/errors@npm:^1.2.8": +"@endo/errors@npm:^1.2.2, @endo/errors@npm:^1.2.8": version: 1.2.8 resolution: "@endo/errors@npm:1.2.8" dependencies: @@ -992,16 +947,7 @@ __metadata: languageName: node linkType: hard -"@endo/eventual-send@npm:^0.17.6": - version: 0.17.6 - resolution: "@endo/eventual-send@npm:0.17.6" - dependencies: - "@endo/env-options": "npm:^0.1.4" - checksum: 10c0/3a8dae48e06ad3a8fdad074d0b6b10ced09f1e440f04f802d98372243ed8ead97278d85d4aa4a310dee34bc7146f09e7aaf6d01b7c06cbe3f8610544c97b5ce2 - languageName: node - linkType: hard - -"@endo/eventual-send@npm:^1.1.2, @endo/eventual-send@npm:^1.2.8": +"@endo/eventual-send@npm:^1.2.8": version: 1.2.8 resolution: "@endo/eventual-send@npm:1.2.8" dependencies: @@ -1010,7 +956,7 @@ __metadata: languageName: node linkType: hard -"@endo/exo@npm:^1.2.1": +"@endo/exo@npm:^1.5.7": version: 1.5.7 resolution: "@endo/exo@npm:1.5.7" dependencies: @@ -1025,17 +971,7 @@ __metadata: languageName: node linkType: hard -"@endo/far@npm:^0.2.3": - version: 0.2.22 - resolution: "@endo/far@npm:0.2.22" - dependencies: - "@endo/eventual-send": "npm:^0.17.6" - "@endo/pass-style": "npm:^0.1.7" - checksum: 10c0/bd30a168b47a26014cab296336a64aa2721975c386f7f87b6776dd33cf77f3e85ddb822e8422fbc2befb6920d72301e3b9b206fe71d970dce1870b708b09805d - languageName: node - linkType: hard - -"@endo/far@npm:^1.0.4, @endo/far@npm:^1.1.9": +"@endo/far@npm:^1.0.0, @endo/far@npm:^1.0.4, @endo/far@npm:^1.1.9": version: 1.1.9 resolution: "@endo/far@npm:1.1.9" dependencies: @@ -1046,7 +982,7 @@ __metadata: languageName: node linkType: hard -"@endo/import-bundle@npm:^1.0.4": +"@endo/import-bundle@npm:^1.3.2": version: 1.3.2 resolution: "@endo/import-bundle@npm:1.3.2" dependencies: @@ -1059,7 +995,7 @@ __metadata: languageName: node linkType: hard -"@endo/init@npm:^1.0.3, @endo/init@npm:^1.0.4, @endo/init@npm:^1.1.7": +"@endo/init@npm:^1.0.4, @endo/init@npm:^1.1.7": version: 1.1.7 resolution: "@endo/init@npm:1.1.7" dependencies: @@ -1071,7 +1007,7 @@ __metadata: languageName: node linkType: hard -"@endo/lockdown@npm:^1.0.13, @endo/lockdown@npm:^1.0.4": +"@endo/lockdown@npm:^1.0.13": version: 1.0.13 resolution: "@endo/lockdown@npm:1.0.13" dependencies: @@ -1080,7 +1016,7 @@ __metadata: languageName: node linkType: hard -"@endo/marshal@npm:^1.3.0, @endo/marshal@npm:^1.6.2": +"@endo/marshal@npm:^1.6.2": version: 1.6.2 resolution: "@endo/marshal@npm:1.6.2" dependencies: @@ -1107,36 +1043,14 @@ __metadata: languageName: node linkType: hard -"@endo/nat@npm:^5.0.13, @endo/nat@npm:^5.0.4": +"@endo/nat@npm:^5.0.13": version: 5.0.13 resolution: "@endo/nat@npm:5.0.13" checksum: 10c0/78578de4567c9bc4c6f50638c688886c07c38177a8d44192230d344221da06ccffc6d9ef8d423e27198d864ed7c57ef5ced9b1d05922eaa4e40bf82856b1aa11 languageName: node linkType: hard -"@endo/netstring@npm:^1.0.4": - version: 1.0.13 - resolution: "@endo/netstring@npm:1.0.13" - dependencies: - "@endo/init": "npm:^1.1.7" - "@endo/promise-kit": "npm:^1.1.8" - "@endo/stream": "npm:^1.2.8" - ses: "npm:^1.10.0" - checksum: 10c0/1d669ffca92609b3e179bd235c3660ef2fd36a808d4df523fdd6c276cd2a47e2177c43a4e37b4bfb8cacfd1b4e1657cec7d197518c795652c8c248997ee59948 - languageName: node - linkType: hard - -"@endo/pass-style@npm:^0.1.7": - version: 0.1.7 - resolution: "@endo/pass-style@npm:0.1.7" - dependencies: - "@endo/promise-kit": "npm:^0.2.60" - "@fast-check/ava": "npm:^1.1.5" - checksum: 10c0/0fc8ca918e4b2888619fa10765b9a414f1ab921b590f257421f4af4a523b80b2afc736280691ed99e8f8807ead3afc478c1a855772c52a4c8fbe43733f3fe656 - languageName: node - linkType: hard - -"@endo/pass-style@npm:^1.2.0, @endo/pass-style@npm:^1.4.7": +"@endo/pass-style@npm:^1.4.7": version: 1.4.7 resolution: "@endo/pass-style@npm:1.4.7" dependencies: @@ -1149,7 +1063,7 @@ __metadata: languageName: node linkType: hard -"@endo/patterns@npm:^1.1.0, @endo/patterns@npm:^1.2.0, @endo/patterns@npm:^1.4.7": +"@endo/patterns@npm:^1.4.7": version: 1.4.7 resolution: "@endo/patterns@npm:1.4.7" dependencies: @@ -1162,16 +1076,7 @@ __metadata: languageName: node linkType: hard -"@endo/promise-kit@npm:^0.2.60": - version: 0.2.60 - resolution: "@endo/promise-kit@npm:0.2.60" - dependencies: - ses: "npm:^0.18.8" - checksum: 10c0/45fa191d0211cf9e99a6b300c373849c7662e8832e20fbcfa4a8f4938d9c9509f22c3a76377629be70447adc1d2e4e99a56a99395af19ba2a0c1010bfe1da4dd - languageName: node - linkType: hard - -"@endo/promise-kit@npm:^1.0.4, @endo/promise-kit@npm:^1.1.8": +"@endo/promise-kit@npm:^1.1.8": version: 1.1.8 resolution: "@endo/promise-kit@npm:1.1.8" dependencies: @@ -1180,7 +1085,7 @@ __metadata: languageName: node linkType: hard -"@endo/ses-ava@npm:^1.1.2": +"@endo/ses-ava@npm:^1.2.8": version: 1.2.8 resolution: "@endo/ses-ava@npm:1.2.8" dependencies: @@ -1193,19 +1098,7 @@ __metadata: languageName: node linkType: hard -"@endo/stream-node@npm:^1.0.4": - version: 1.1.8 - resolution: "@endo/stream-node@npm:1.1.8" - dependencies: - "@endo/errors": "npm:^1.2.8" - "@endo/init": "npm:^1.1.7" - "@endo/stream": "npm:^1.2.8" - ses: "npm:^1.10.0" - checksum: 10c0/d07769acf381b4b5a904bfdae1b7aba0b7cb11f8ed1a38892a072b68e3dd8eb1954c77984a6eb7af09006ad5e707a8aa4e2c5d4424eb6898beae9ceb0015d8e3 - languageName: node - linkType: hard - -"@endo/stream@npm:^1.1.0, @endo/stream@npm:^1.2.8": +"@endo/stream@npm:^1.2.8": version: 1.2.8 resolution: "@endo/stream@npm:1.2.8" dependencies: @@ -1230,7 +1123,7 @@ __metadata: languageName: node linkType: hard -"@endo/zip@npm:^1.0.2, @endo/zip@npm:^1.0.7, @endo/zip@npm:^1.0.9": +"@endo/zip@npm:^1.0.7, @endo/zip@npm:^1.0.9": version: 1.0.9 resolution: "@endo/zip@npm:1.0.9" checksum: 10c0/3fccea31bd5dad938a3b5f531454d3c49513892d6d5aba1f0af1034ff0ae54c3e28a346a9df08bd9e5201354acccd631e45c9c0e68fa2848a876a3919f3830dc @@ -1651,48 +1544,50 @@ __metadata: languageName: node linkType: hard -"agoric@npm:0.21.2-dev-5676146.0": - version: 0.21.2-dev-5676146.0 - resolution: "agoric@npm:0.21.2-dev-5676146.0" - dependencies: - "@agoric/access-token": "npm:0.4.22-dev-5676146.0+5676146" - "@agoric/assert": "npm:0.6.1-dev-5676146.0+5676146" - "@agoric/cache": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/casting": "npm:0.4.3-dev-5676146.0+5676146" - "@agoric/cosmic-proto": "npm:0.4.1-dev-5676146.0+5676146" - "@agoric/ertp": "npm:0.16.3-dev-5676146.0+5676146" - "@agoric/governance": "npm:0.10.4-dev-5676146.0+5676146" - "@agoric/inter-protocol": "npm:0.16.2-dev-5676146.0+5676146" - "@agoric/internal": "npm:0.3.3-dev-5676146.0+5676146" - "@agoric/network": "npm:0.1.1-dev-5676146.0+5676146" - "@agoric/smart-wallet": "npm:0.5.4-dev-5676146.0+5676146" - "@agoric/store": "npm:0.9.3-dev-5676146.0+5676146" - "@agoric/swingset-vat": "npm:0.32.3-dev-5676146.0+5676146" - "@agoric/vats": "npm:0.15.2-dev-5676146.0+5676146" - "@agoric/zoe": "npm:0.26.3-dev-5676146.0+5676146" - "@agoric/zone": "npm:0.2.3-dev-5676146.0+5676146" +"agoric@portal:../../agoric-sdk/packages/agoric-cli::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.0-use.local + resolution: "agoric@portal:../../agoric-sdk/packages/agoric-cli::locator=root-workspace-0b6124%40workspace%3A." + dependencies: + "@agoric/access-token": "npm:^0.4.21" + "@agoric/cache": "npm:^0.3.2" + "@agoric/casting": "npm:^0.4.2" + "@agoric/client-utils": "npm:^0.1.0" + "@agoric/cosmic-proto": "npm:^0.4.0" + "@agoric/ertp": "npm:^0.16.2" + "@agoric/governance": "npm:^0.10.3" + "@agoric/inter-protocol": "npm:^0.16.1" + "@agoric/internal": "npm:^0.3.2" + "@agoric/network": "npm:^0.1.0" + "@agoric/smart-wallet": "npm:^0.5.3" + "@agoric/store": "npm:^0.9.2" + "@agoric/swingset-vat": "npm:^0.32.2" + "@agoric/vats": "npm:^0.15.1" + "@agoric/zoe": "npm:^0.26.2" + "@agoric/zone": "npm:^0.2.2" "@confio/relayer": "npm:^0.11.3" "@cosmjs/crypto": "npm:^0.32.3" "@cosmjs/encoding": "npm:^0.32.3" "@cosmjs/math": "npm:^0.32.3" "@cosmjs/proto-signing": "npm:^0.32.3" "@cosmjs/stargate": "npm:^0.32.3" - "@endo/bundle-source": "npm:^3.1.0" - "@endo/captp": "npm:^4.0.4" - "@endo/compartment-mapper": "npm:^1.1.2" - "@endo/env-options": "npm:^1.1.1" - "@endo/far": "npm:^1.0.4" - "@endo/init": "npm:^1.0.4" - "@endo/marshal": "npm:^1.3.0" - "@endo/nat": "npm:^5.0.4" - "@endo/patterns": "npm:^1.2.0" - "@endo/promise-kit": "npm:^1.0.4" + "@endo/bundle-source": "npm:^3.5.0" + "@endo/captp": "npm:^4.4.3" + "@endo/compartment-mapper": "npm:^1.4.0" + "@endo/env-options": "npm:^1.1.8" + "@endo/errors": "npm:^1.2.8" + "@endo/far": "npm:^1.1.9" + "@endo/init": "npm:^1.1.7" + "@endo/marshal": "npm:^1.6.2" + "@endo/nat": "npm:^5.0.13" + "@endo/patterns": "npm:^1.4.7" + "@endo/promise-kit": "npm:^1.1.8" + "@endo/zip": "npm:^1.0.9" "@iarna/toml": "npm:^2.2.3" anylogger: "npm:^0.21.0" chalk: "npm:^5.2.0" - commander: "npm:^11.1.0" + commander: "npm:^12.1.0" deterministic-json: "npm:^1.0.5" - esm: "github:agoric-labs/esm#Agoric-built" + esm: "agoric-labs/esm#Agoric-built" inquirer: "npm:^8.2.2" opener: "npm:^1.5.2" tmp: "npm:^0.2.1" @@ -1700,9 +1595,8 @@ __metadata: bin: agops: src/bin-agops.js agoric: src/entrypoint.js - checksum: 10c0/abcea0bfd4594c2841d3e69ed6c78bedd5a4c573efa9ebcb34730e87ea445ab283e06a7dff2a0f44834faae3bb4dfc0153a2bd34cfd859064208cd7bfb92a19b languageName: node - linkType: hard + linkType: soft "ajv@npm:7.1.1": version: 7.1.1 @@ -2369,10 +2263,10 @@ __metadata: languageName: node linkType: hard -"commander@npm:^11.1.0": - version: 11.1.0 - resolution: "commander@npm:11.1.0" - checksum: 10c0/13cc6ac875e48780250f723fb81c1c1178d35c5decb1abb1b628b3177af08a8554e76b2c0f29de72d69eef7c864d12613272a71fabef8047922bc622ab75a179 +"commander@npm:^12.1.0": + version: 12.1.0 + resolution: "commander@npm:12.1.0" + checksum: 10c0/6e1996680c083b3b897bfc1cfe1c58dfbcd9842fd43e1aaf8a795fbc237f65efcc860a3ef457b318e73f29a4f4a28f6403c3d653d021d960e4632dd45bde54a9 languageName: node linkType: hard @@ -2680,7 +2574,7 @@ __metadata: languageName: node linkType: hard -"esm@github:agoric-labs/esm#Agoric-built": +"esm@agoric-labs/esm#Agoric-built": version: 3.2.25 resolution: "esm@https://github.com/agoric-labs/esm.git#commit=3603726ad4636b2f865f463188fcaade6375638e" checksum: 10c0/fc1e112a3a681e7b4152d4f5c76dd5aa9e30496d2020490ffa0fb61aaf57d1e12dae0c1074fdd2e0f08949ab2df7e00e750262356781f072e4119955ee10b754 @@ -3566,12 +3460,12 @@ __metadata: languageName: node linkType: hard -"jessie.js@npm:^0.3.2": - version: 0.3.3 - resolution: "jessie.js@npm:0.3.3" +"jessie.js@npm:^0.3.4": + version: 0.3.4 + resolution: "jessie.js@npm:0.3.4" dependencies: - "@endo/far": "npm:^0.2.3" - checksum: 10c0/883897ce3e8e8608f324efcffac9a1e445315cadd88935f2d09bad7fb180806ae1352e7332e99c84b7c097f9ac03bd7cb45dfc46a5d276871031d0c43f9cad51 + "@endo/far": "npm:^1.0.0" + checksum: 10c0/853ab3f8a0e30df11742882f5e11479d1303033a5a203a247d8ffbf4c6f3f3d4bcbefa53084ae4632e6ab106e348f23dc988280486cbeaaf5d16487fa3d40e96 languageName: node linkType: hard @@ -4083,20 +3977,6 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.0": - version: 2.7.0 - resolution: "node-fetch@npm:2.7.0" - dependencies: - whatwg-url: "npm:^5.0.0" - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - checksum: 10c0/b55786b6028208e6fbe594ccccc213cab67a72899c9234eb59dba51062a299ea853210fcf526998eaa2867b0963ad72338824450905679ff0fa304b8c5093ae8 - languageName: node - linkType: hard - "node-gyp-build@npm:^4.4.0": version: 4.8.0 resolution: "node-gyp-build@npm:4.8.0" @@ -4691,6 +4571,7 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: + "@agoric/client-utils": "npm:dev" "@agoric/internal": "npm:0.3.3-dev-5676146.0" "@agoric/synthetic-chain": "npm:^0.4.3" "@cosmjs/stargate": "npm:^0.32.3" @@ -4699,7 +4580,7 @@ __metadata: "@endo/far": "npm:^1.0.4" "@endo/init": "npm:^1.0.4" "@types/node": "npm:^22.0.0" - agoric: "npm:0.21.2-dev-5676146.0" + agoric: "npm:dev" ava: "npm:^5.3.1" execa: "npm:^8.0.1" languageName: unknown @@ -4780,15 +4661,6 @@ __metadata: languageName: node linkType: hard -"ses@npm:^0.18.8": - version: 0.18.8 - resolution: "ses@npm:0.18.8" - dependencies: - "@endo/env-options": "npm:^0.1.4" - checksum: 10c0/2c5c5e40f6a8edee081e1c62b65316128823070a68858c6ee45810fb14464d14a9f82499bf4d1cb274b46e35e199f7c55565755236a708d25ace493da206083f - languageName: node - linkType: hard - "ses@npm:^1.10.0": version: 1.10.0 resolution: "ses@npm:1.10.0" @@ -5213,13 +5085,6 @@ __metadata: languageName: node linkType: hard -"tr46@npm:~0.0.3": - version: 0.0.3 - resolution: "tr46@npm:0.0.3" - checksum: 10c0/047cb209a6b60c742f05c9d3ace8fa510bff609995c129a37ace03476a9b12db4dbf975e74600830ef0796e18882b2381fb5fb1f6b4f96b832c374de3ab91a11 - languageName: node - linkType: hard - "triple-beam@npm:1.3.0": version: 1.3.0 resolution: "triple-beam@npm:1.3.0" @@ -5357,13 +5222,6 @@ __metadata: languageName: node linkType: hard -"webidl-conversions@npm:^3.0.0": - version: 3.0.1 - resolution: "webidl-conversions@npm:3.0.1" - checksum: 10c0/5612d5f3e54760a797052eb4927f0ddc01383550f542ccd33d5238cfd65aeed392a45ad38364970d0a0f4fea32e1f4d231b3d8dac4a3bdd385e5cf802ae097db - languageName: node - linkType: hard - "well-known-symbols@npm:^2.0.0": version: 2.0.0 resolution: "well-known-symbols@npm:2.0.0" @@ -5371,16 +5229,6 @@ __metadata: languageName: node linkType: hard -"whatwg-url@npm:^5.0.0": - version: 5.0.0 - resolution: "whatwg-url@npm:5.0.0" - dependencies: - tr46: "npm:~0.0.3" - webidl-conversions: "npm:^3.0.0" - checksum: 10c0/1588bed84d10b72d5eec1d0faa0722ba1962f1821e7539c535558fb5398d223b0c50d8acab950b8c488b4ba69043fd833cc2697056b167d8ad46fac3995a55d5 - languageName: node - linkType: hard - "which@npm:^2.0.1": version: 2.0.2 resolution: "which@npm:2.0.2" From 3ce6d566f63aa8087cf01f613392a1362a913e3a Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 3 Dec 2024 07:48:58 -0800 Subject: [PATCH 153/174] refactor: use agoric cli lib --- .../proposals/s:stake-bld/test-lib/chain.js | 140 --------- .../proposals/s:stake-bld/test-lib/index.js | 6 +- .../proposals/s:stake-bld/test-lib/rpc.js | 266 ------------------ .../proposals/s:stake-bld/test-lib/wallet.js | 57 +--- 4 files changed, 4 insertions(+), 465 deletions(-) delete mode 100644 a3p-integration/proposals/s:stake-bld/test-lib/chain.js delete mode 100644 a3p-integration/proposals/s:stake-bld/test-lib/rpc.js diff --git a/a3p-integration/proposals/s:stake-bld/test-lib/chain.js b/a3p-integration/proposals/s:stake-bld/test-lib/chain.js deleted file mode 100644 index 74cc0d3c14f..00000000000 --- a/a3p-integration/proposals/s:stake-bld/test-lib/chain.js +++ /dev/null @@ -1,140 +0,0 @@ -/** @file copied from packages/agoric-cli */ -// TODO DRY in https://github.com/Agoric/agoric-sdk/issues/9109 -// @ts-check -/* global process */ - -const agdBinary = 'agd'; - -/** - * @param {ReadonlyArray} swingsetArgs - * @param {import('./rpc.js').MinimalNetworkConfig & { - * from: string, - * fees?: string, - * dryRun?: boolean, - * verbose?: boolean, - * keyring?: {home?: string, backend: string} - * stdout?: Pick - * execFileSync: typeof import('child_process').execFileSync - * }} opts - */ -export const execSwingsetTransaction = (swingsetArgs, opts) => { - const { - from, - fees, - dryRun = false, - verbose = true, - keyring = undefined, - chainName, - rpcAddrs, - stdout = process.stdout, - execFileSync, - } = opts; - const homeOpt = keyring?.home ? [`--home=${keyring.home}`] : []; - const backendOpt = keyring?.backend - ? [`--keyring-backend=${keyring.backend}`] - : []; - const feeOpt = fees ? ['--fees', fees] : []; - const cmd = [`--node=${rpcAddrs[0]}`, `--chain-id=${chainName}`].concat( - homeOpt, - backendOpt, - feeOpt, - [`--from=${from}`, 'tx', 'swingset'], - swingsetArgs, - ); - - if (dryRun) { - stdout.write(`Run this interactive command in shell:\n\n`); - stdout.write(`${agdBinary} `); - stdout.write(cmd.join(' ')); - stdout.write('\n'); - } else { - const yesCmd = cmd.concat(['--yes']); - if (verbose) console.log('Executing ', agdBinary, yesCmd); - const out = execFileSync(agdBinary, yesCmd, { encoding: 'utf-8' }); - - // agd puts this diagnostic on stdout rather than stderr :-/ - // "Default sign-mode 'direct' not supported by Ledger, using sign-mode 'amino-json'. - if (out.startsWith('Default sign-mode')) { - const stripDiagnostic = out.replace(/^Default[^\n]+\n/, ''); - return stripDiagnostic; - } - return out; - } -}; -harden(execSwingsetTransaction); - -/** - * @param {import('./rpc.js').MinimalNetworkConfig & { - * execFileSync: typeof import('child_process').execFileSync, - * delay: (ms: number) => Promise, - * period?: number, - * retryMessage?: string, - * }} opts - * @returns {(l: (b: { time: string, height: string }) => Promise) => Promise} - */ -export const pollBlocks = opts => async lookup => { - const { execFileSync, delay, rpcAddrs, period = 3 * 1000 } = opts; - assert(execFileSync, 'missing execFileSync'); - const { retryMessage } = opts; - - const nodeArgs = [`--node=${rpcAddrs[0]}`]; - - await null; // separate sync prologue - - for (;;) { - const sTxt = execFileSync(agdBinary, ['status', ...nodeArgs]); - const status = JSON.parse(sTxt.toString()); - const { - SyncInfo: { latest_block_time: time, latest_block_height: height }, - } = status; - try { - // see await null above - const result = await lookup({ time, height }); - return result; - } catch (_err) { - console.error( - time, - retryMessage || 'not in block', - height, - 'retrying...', - ); - await delay(period); - } - } -}; - -/** - * @param {string} txhash - * @param {import('./rpc.js').MinimalNetworkConfig & { - * execFileSync: typeof import('child_process').execFileSync, - * delay: (ms: number) => Promise, - * period?: number, - * }} opts - */ -export const pollTx = async (txhash, opts) => { - const { execFileSync, rpcAddrs, chainName } = opts; - assert(execFileSync, 'missing execFileSync in pollTx'); - - const nodeArgs = [`--node=${rpcAddrs[0]}`]; - const outJson = ['--output', 'json']; - - const lookup = async () => { - const out = execFileSync( - agdBinary, - [ - 'query', - 'tx', - txhash, - `--chain-id=${chainName}`, - ...nodeArgs, - ...outJson, - ], - { stdio: ['ignore', 'pipe', 'ignore'] }, - ); - // XXX this type is defined in a .proto file somewhere - /** @type {{ height: string, txhash: string, code: number, timestamp: string }} */ - const info = JSON.parse(out.toString()); - return info; - }; - return pollBlocks({ ...opts, retryMessage: 'tx not in block' })(lookup); -}; diff --git a/a3p-integration/proposals/s:stake-bld/test-lib/index.js b/a3p-integration/proposals/s:stake-bld/test-lib/index.js index a35b9b94fe0..9c22b218e19 100644 --- a/a3p-integration/proposals/s:stake-bld/test-lib/index.js +++ b/a3p-integration/proposals/s:stake-bld/test-lib/index.js @@ -1,11 +1,9 @@ /* eslint-env node */ import { execFileSync } from 'child_process'; +import { LOCAL_CONFIG as networkConfig } from '@agoric/client-utils'; import { makeWalletUtils } from './wallet.js'; -export const networkConfig = { - rpcAddrs: ['http://0.0.0.0:26657'], - chainName: 'agoriclocal', -}; +export { networkConfig }; /** * Resolve after a delay in milliseconds. diff --git a/a3p-integration/proposals/s:stake-bld/test-lib/rpc.js b/a3p-integration/proposals/s:stake-bld/test-lib/rpc.js deleted file mode 100644 index a3ac266ee88..00000000000 --- a/a3p-integration/proposals/s:stake-bld/test-lib/rpc.js +++ /dev/null @@ -1,266 +0,0 @@ -/** @file copied from packages/agoric-cli */ -// TODO DRY in https://github.com/Agoric/agoric-sdk/issues/9109 -// @ts-check -/* eslint-env node */ - -import { Fail } from '@endo/errors'; -import { - boardSlottingMarshaller, - makeBoardRemote, -} from '@agoric/internal/src/marshal.js'; - -export { boardSlottingMarshaller }; - -export const boardValToSlot = val => { - if ('getBoardId' in val) { - return val.getBoardId(); - } - Fail`unknown obj in boardSlottingMarshaller.valToSlot ${val}`; -}; - -export const networkConfigUrl = agoricNetSubdomain => - `https://${agoricNetSubdomain}.agoric.net/network-config`; -export const rpcUrl = agoricNetSubdomain => - `https://${agoricNetSubdomain}.rpc.agoric.net:443`; - -/** - * @typedef {{ rpcAddrs: string[], chainName: string }} MinimalNetworkConfig - */ - -/** @type {MinimalNetworkConfig} */ -const networkConfig = { - rpcAddrs: ['http://0.0.0.0:26657'], - chainName: 'agoriclocal', -}; -export { networkConfig }; -// console.warn('networkConfig', networkConfig); - -/** - * @param {object} powers - * @param {typeof window.fetch} powers.fetch - * @param {MinimalNetworkConfig} config - */ -export const makeVStorage = (powers, config = networkConfig) => { - /** @param {string} path */ - const getJSON = path => { - const url = config.rpcAddrs[0] + path; - // console.warn('fetching', url); - return powers.fetch(url, { keepalive: true }).then(res => res.json()); - }; - // height=0 is the same as omitting height and implies the highest block - const url = (path = 'published', { kind = 'children', height = 0 } = {}) => - `/abci_query?path=%22/custom/vstorage/${kind}/${path}%22&height=${height}`; - - const readStorage = (path = 'published', { kind = 'children', height = 0 }) => - getJSON(url(path, { kind, height })) - .catch(err => { - throw Error(`cannot read ${kind} of ${path}: ${err.message}`); - }) - .then(data => { - const { - result: { response }, - } = data; - if (response?.code !== 0) { - /** @type {any} */ - const err = Error( - `error code ${response?.code} reading ${kind} of ${path}: ${response.log}`, - ); - err.code = response?.code; - err.codespace = response?.codespace; - throw err; - } - return data; - }); - - return { - url, - decode({ result: { response } }) { - const { code } = response; - if (code !== 0) { - throw response; - } - const { value } = response; - return Buffer.from(value, 'base64').toString(); - }, - /** - * - * @param {string} path - * @returns {Promise} latest vstorage value at path - */ - async readLatest(path = 'published') { - const raw = await readStorage(path, { kind: 'data' }); - return this.decode(raw); - }, - async keys(path = 'published') { - const raw = await readStorage(path, { kind: 'children' }); - return JSON.parse(this.decode(raw)).children; - }, - /** - * @param {string} path - * @param {number} [height] default is highest - * @returns {Promise<{blockHeight: number, values: string[]}>} - */ - async readAt(path, height = undefined) { - const raw = await readStorage(path, { kind: 'data', height }); - const txt = this.decode(raw); - /** @type {{ value: string }} */ - const { value } = JSON.parse(txt); - return JSON.parse(value); - }, - /** - * Read values going back as far as available - * - * @param {string} path - * @param {number | string} [minHeight] - * @returns {Promise} - */ - async readFully(path, minHeight = undefined) { - const parts = []; - // undefined the first iteration, to query at the highest - let blockHeight; - await null; - do { - // console.debug('READING', { blockHeight }); - let values; - try { - ({ blockHeight, values } = await this.readAt( - path, - blockHeight && Number(blockHeight) - 1, - )); - // console.debug('readAt returned', { blockHeight }); - } catch (err) { - if ( - // CosmosSDK ErrNotFound; there is no data at the path - (err.codespace === 'sdk' && err.code === 38) || - // CosmosSDK ErrUnknownRequest; misrepresentation of the same until - // https://github.com/Agoric/agoric-sdk/commit/dafc7c1708977aaa55e245dc09a73859cf1df192 - // TODO remove after upgrade-12 - err.message.match(/unknown request/) - ) { - // console.error(err); - break; - } - throw err; - } - parts.push(values); - // console.debug('PUSHED', values); - // console.debug('NEW', { blockHeight, minHeight }); - if (minHeight && Number(blockHeight) <= Number(minHeight)) break; - } while (blockHeight > 0); - return parts.flat(); - }, - }; -}; -/** @typedef {ReturnType} VStorage */ - -export const makeFromBoard = () => { - const cache = new Map(); - const convertSlotToVal = (boardId, iface) => { - if (cache.has(boardId)) { - return cache.get(boardId); - } - const val = makeBoardRemote({ boardId, iface }); - cache.set(boardId, val); - return val; - }; - return harden({ convertSlotToVal }); -}; -/** @typedef {ReturnType} IdMap */ - -export const storageHelper = { - /** @param { string } txt */ - parseCapData: txt => { - assert(typeof txt === 'string', typeof txt); - /** @type {{ value: string }} */ - const { value } = JSON.parse(txt); - const specimen = JSON.parse(value); - const { blockHeight, values } = specimen; - assert(values, `empty values in specimen ${value}`); - const capDatas = storageHelper.parseMany(values); - return { blockHeight, capDatas }; - }, - /** - * @param {string} txt - * @param {IdMap} ctx - */ - unserializeTxt: (txt, ctx) => { - const { capDatas } = storageHelper.parseCapData(txt); - return capDatas.map(capData => - boardSlottingMarshaller(ctx.convertSlotToVal).fromCapData(capData), - ); - }, - /** @param {string[]} capDataStrings array of stringified capData */ - parseMany: capDataStrings => { - assert(capDataStrings && capDataStrings.length); - /** @type {{ body: string, slots: string[] }[]} */ - const capDatas = capDataStrings.map(s => JSON.parse(s)); - for (const capData of capDatas) { - assert(typeof capData === 'object' && capData !== null); - assert('body' in capData && 'slots' in capData); - assert(typeof capData.body === 'string'); - assert(Array.isArray(capData.slots)); - } - return capDatas; - }, -}; -harden(storageHelper); - -/** - * @param {IdMap} ctx - * @param {VStorage} vstorage - * @returns {Promise} - */ -export const makeAgoricNames = async (ctx, vstorage) => { - const reverse = {}; - const entries = await Promise.all( - ['brand', 'instance', 'vbankAsset'].map(async kind => { - const content = await vstorage.readLatest( - `published.agoricNames.${kind}`, - ); - /** @type {Array<[string, import('@agoric/vats/tools/board-utils.js').BoardRemote]>} */ - const parts = storageHelper.unserializeTxt(content, ctx).at(-1); - for (const [name, remote] of parts) { - if ('getBoardId' in remote) { - reverse[remote.getBoardId()] = name; - } - } - return [kind, Object.fromEntries(parts)]; - }), - ); - return { ...Object.fromEntries(entries), reverse }; -}; - -/** - * @param {{ fetch: typeof window.fetch }} io - * @param {MinimalNetworkConfig} config - */ -export const makeVstorageKit = async ({ fetch }, config = networkConfig) => { - await null; - try { - const vstorage = makeVStorage({ fetch }, config); - const fromBoard = makeFromBoard(); - const agoricNames = await makeAgoricNames(fromBoard, vstorage); - - const marshaller = boardSlottingMarshaller(fromBoard.convertSlotToVal); - - /** @type {(txt: string) => unknown} */ - const unserializeHead = txt => - storageHelper.unserializeTxt(txt, fromBoard).at(-1); - - /** @type {(path: string) => Promise} */ - const readLatestHead = path => - vstorage.readLatest(path).then(unserializeHead); - - return { - agoricNames, - fromBoard, - marshaller, - readLatestHead, - unserializeHead, - vstorage, - }; - } catch (err) { - throw Error(`RPC failure (${config.rpcAddrs}): ${err.message}`); - } -}; -/** @typedef {Awaited>} RpcUtils */ diff --git a/a3p-integration/proposals/s:stake-bld/test-lib/wallet.js b/a3p-integration/proposals/s:stake-bld/test-lib/wallet.js index e9461522e1d..e3ef23af929 100644 --- a/a3p-integration/proposals/s:stake-bld/test-lib/wallet.js +++ b/a3p-integration/proposals/s:stake-bld/test-lib/wallet.js @@ -1,61 +1,8 @@ -/** - * @file copied from packages/agoric-cli, - * removing polling and coalescing features whose dependencies cause import problems here - */ -// TODO DRY in https://github.com/Agoric/agoric-sdk/issues/9109 // @ts-check -/* global */ +import { makeVstorageKit } from '@agoric/client-utils'; +import { sendAction } from 'agoric/src/lib/index.js'; import { inspect } from 'util'; -import { execSwingsetTransaction, pollTx } from './chain.js'; -import { makeVstorageKit } from './rpc.js'; - -/** - * Sign and broadcast a wallet-action. - * - * @throws { Error & { code: number } } if transaction fails - * @param {import('@agoric/smart-wallet/src/smartWallet.js').BridgeAction} bridgeAction - * @param {import('./rpc.js').MinimalNetworkConfig & { - * from: string, - * marshaller: import('@endo/marshal').Marshal<'string'>, - * fees?: string, - * verbose?: boolean, - * keyring?: {home?: string, backend: string}, - * stdout: Pick, - * execFileSync: typeof import('child_process').execFileSync, - * delay: (ms: number) => Promise, - * dryRun?: boolean, - * }} opts - */ -export const sendAction = async (bridgeAction, opts) => { - const { marshaller } = opts; - // @ts-expect-error BridgeAction has methods disallowed by Passable - const offerBody = JSON.stringify(marshaller.toCapData(harden(bridgeAction))); - - // tryExit should not require --allow-spend - // https://github.com/Agoric/agoric-sdk/issues/7291 - const spendMethods = ['executeOffer', 'tryExitOffer']; - const spendArg = spendMethods.includes(bridgeAction.method) - ? ['--allow-spend'] - : []; - - const act = ['wallet-action', ...spendArg, offerBody]; - const out = execSwingsetTransaction([...act, '--output', 'json'], opts); - if (opts.dryRun) { - return; - } - - assert(out); // not dry run - const tx = JSON.parse(out); - if (tx.code !== 0) { - const err = Error(`failed to send tx: ${tx.raw_log} code: ${tx.code}`); - // @ts-expect-error XXX how to add properties to an error? - err.code = tx.code; - throw err; - } - - return pollTx(tx.txhash, opts); -}; export const makeWalletUtils = async ( { delay, execFileSync, fetch }, From ce195aba9862df4e5467e1d955ae81cea67fc245 Mon Sep 17 00:00:00 2001 From: Samuel Siegart Date: Tue, 3 Dec 2024 18:41:58 -0800 Subject: [PATCH 154/174] test(fast-usdc): bootstrap test for advancement (#10606) refs https://github.com/Agoric/agoric-sdk/issues/10511 Does *not* count computrons yet. This makes 5 oracles submit evidence to provide a realistic scenario for measurement. --- .../boot/test/fast-usdc/fast-usdc.test.ts | 75 +++++++++++++----- .../fast-usdc/snapshots/fast-usdc.test.ts.md | 8 +- .../snapshots/fast-usdc.test.ts.snap | Bin 1242 -> 1193 bytes .../scripts/fast-usdc/init-fast-usdc.js | 2 - packages/fast-usdc/src/type-guards.js | 2 +- 5 files changed, 58 insertions(+), 29 deletions(-) diff --git a/packages/boot/test/fast-usdc/fast-usdc.test.ts b/packages/boot/test/fast-usdc/fast-usdc.test.ts index e13f95849e7..49da38cf01e 100644 --- a/packages/boot/test/fast-usdc/fast-usdc.test.ts +++ b/packages/boot/test/fast-usdc/fast-usdc.test.ts @@ -9,6 +9,7 @@ import { Fail } from '@endo/errors'; import { unmarshalFromVstorage } from '@agoric/internal/src/marshal.js'; import { makeMarshal } from '@endo/marshal'; import { defaultMarshaller } from '@agoric/internal/src/storage-test-utils.js'; +import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import { makeWalletFactoryContext, type WalletFactoryTestContext, @@ -41,8 +42,6 @@ test.serial( } = t.context; const [watcherWallet] = await Promise.all([ - wd.provideSmartWallet('agoric144rrhh4m09mh7aaffhm6xy223ym76gve2x7y78'), - wd.provideSmartWallet('agoric19d6gnr9fyp6hev4tlrg87zjrzsd5gzr5qlfq2p'), wd.provideSmartWallet('agoric19uscwxdac6cf6z7d5e26e0jm0lgwstc47cpll8'), wd.provideSmartWallet('agoric1krunjcqfrf7la48zrvdfeeqtls5r00ep68mzkr'), wd.provideSmartWallet('agoric1n4fcxsnkxe4gj6e24naec99hzmc4pjfdccy5nj'), @@ -129,26 +128,62 @@ test.serial('writes fee config to vstorage', async t => { await documentStorageSchema(t, storage, doc); }); -test.serial('writes status updates to vstorage', async t => { - const { walletFactoryDriver: wd, storage } = t.context; - const wallet = await wd.provideSmartWallet( - 'agoric144rrhh4m09mh7aaffhm6xy223ym76gve2x7y78', +test.serial('makes usdc advance', async t => { + const { walletFactoryDriver: wd, storage, agoricNamesRemotes } = t.context; + const oracles = await Promise.all([ + wd.provideSmartWallet('agoric19uscwxdac6cf6z7d5e26e0jm0lgwstc47cpll8'), + wd.provideSmartWallet('agoric1krunjcqfrf7la48zrvdfeeqtls5r00ep68mzkr'), + wd.provideSmartWallet('agoric1n4fcxsnkxe4gj6e24naec99hzmc4pjfdccy5nj'), + ]); + await Promise.all( + oracles.map(wallet => + wallet.sendOffer({ + id: 'claim-oracle-invitation', + invitationSpec: { + source: 'purse', + instance: agoricNamesRemotes.instance.fastUsdc, + description: 'oracle operator invitation', + }, + proposal: {}, + }), + ), ); - const submitMockEvidence = (mockEvidence: CctpTxEvidence) => - wallet.sendOffer({ - id: 'submit-mock-evidence', - invitationSpec: { - source: 'agoricContract', - instancePath: ['fastUsdc'], - callPipe: [['makeTestPushInvitation', [mockEvidence]]], - }, - proposal: {}, - }); - const mockEvidence1 = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); - const mockEvidence2 = MockCctpTxEvidences.AGORIC_PLUS_DYDX(); - await submitMockEvidence(mockEvidence1); - await submitMockEvidence(mockEvidence2); + // @ts-expect-error it doesnt recognize usdc as a Brand type + const usdc = agoricNamesRemotes.vbankAsset.USDC.brand as Brand<'nat'>; + await oracles[0].sendOffer({ + id: 'deposit-lp-0', + invitationSpec: { + source: 'agoricContract', + instancePath: ['fastUsdc'], + callPipe: [['makeDepositInvitation', []]], + }, + proposal: { + give: { + USDC: { brand: usdc, value: 150_000_000n }, + }, + }, + }); + await eventLoopIteration(); + + const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); + // TODO - start counting computrons + await Promise.all( + oracles.map(wallet => + wallet.sendOffer({ + id: 'submit-mock-evidence-osmo', + invitationSpec: { + source: 'continuing', + previousOffer: 'claim-oracle-invitation', + invitationMakerName: 'SubmitEvidence', + invitationArgs: [evidence], + }, + proposal: {}, + }), + ), + ); + await eventLoopIteration(); + // TODO - stop counting computrons const doc = { node: `fastUsdc.status`, diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md index f953f9ea514..1441f49490d 100644 --- a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md +++ b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md @@ -72,7 +72,7 @@ Generated by [AVA](https://avajs.dev). ], ] -## writes status updates to vstorage +## makes usdc advance > Under "published", the "fastUsdc.status" node is delegated to the statuses of fast USDC transfers identified by their tx hashes. > The example below illustrates the schema of the data published there. @@ -82,10 +82,6 @@ Generated by [AVA](https://avajs.dev). [ [ 'published.fastUsdc.status.0xc81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761702', - 'OBSERVED', - ], - [ - 'published.fastUsdc.status.0xd81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761799', - 'OBSERVED', + 'ADVANCING', ], ] diff --git a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap index 9489b8bc7ff297097930bdd8547b32b0ecc731b5..820fa8ddbf3bcfa3c1b40a990a2289fbb9915614 100644 GI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QG9%sTQjL_LBS!gGW`G HJq!QvF^1fmy?oVXwmQW5gok8ZsA zAO#8bV68p#oB6%*%x`=%3X&|`RBzuR9qWWTPh6F;CdDEm!CF}ohuchNY)k1(@;b#T zH|KIfVG~fgv0!|{n&u@G^kFDel($92Y+W~W&n>up5hV24TM3uqhW)`sRhA<`f70eff_LL7V7(pfphO)6N7gTEe4P8E(WWHx5;vQparFG z0pLdf_yYiD5a86odf=EjJ2NzAQ(>>)&T~!1x;12VqJ(Sn^ybjh$tLey;xgtz(uI6J z9B`{==>{yL{Tl+@M}WtQLtD^+GTOcc@Vo_ZzUW#Wacx@w*DQc{impdST<=-{pI87t z6kR7q3S^n{{AvvyR#2KX}gwCdsa8fIc(iPzoeZMPblOTRdr#xx*61 zj`go)w4ZVSPC5XqMcCv>2H^l)aR9CtU8nYVYacj=s+;8vm+Z5{fw3}#{pxU7+uQN7 zzB^=Q53szmAY-#Qw~{1OC-GcYeodH>`sdf)a`@@*EQhY_?6VslXlh%U)n+!qU<>>| z7QmCe1)wz7ZN=Ix(M`VJ62QAdOTcykpb7vl9<&H7BhhENz)3_s5NrDe0Nm~g_1-(7 zjP{BAGY0`~6ddgXm&cpCERXJ?7u-%*^MbJIxqeV}d1di*xD@&>551+DSEV2nzF+mk zVznxwS`aM;x$*uH~Ar3y!&c1YE{rsi%wTB=h{t=nw<-N)D+WY>2 z?cL?FPj7b}Nad{=4Zdr% { /** @type {TypedPattern} */ const deposit = M.splitRecord( { give: { USDC: makeNatAmountShape(USDC, 1n) } }, - { want: { PoolShare: makeNatAmountShape(PoolShares) } }, + { want: M.splitRecord({}, { PoolShare: makeNatAmountShape(PoolShares) }) }, ); /** @type {TypedPattern} */ const withdraw = M.splitRecord({ From 0e2070754d6811acd40cb026792d4295189ae771 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Sat, 30 Nov 2024 01:45:27 -0500 Subject: [PATCH 155/174] feat: register interchain bank assets proposal - create `register-interchain-bank-assets.js` for multichain-testing environment - allow users to submit offers using new brands like OSMO, ION - override existing brands like ATOM (ibc/toyatom) with starship denom - create `make-bank-asset-info.ts` to gather `InterchainAssetOptions` from starship env - update `make start` and ci `multichain-e2e-template.yaml` to call these scripts - deploy-cli.ts `deployBuilder` accepts `builderOpts` --- .github/workflows/multichain-e2e-template.yml | 4 + multichain-testing/.gitignore | 5 +- multichain-testing/Makefile | 7 +- multichain-testing/README.md | 2 +- multichain-testing/scripts/deploy-cli.ts | 17 +- .../scripts/make-bank-asset-info.ts | 30 +++ ...register-interchain-bank-assets.builder.js | 51 +++++ .../src/revise-chain-info.builder.js | 2 +- .../test/scripts/make-bank-asset-info.test.ts | 30 +++ .../test/tools/asset-info.test.ts | 2 + multichain-testing/tools/asset-info.ts | 29 +-- multichain-testing/tools/e2e-tools.js | 2 +- multichain-testing/tsconfig.json | 1 + .../register-interchain-bank-assets.js | 199 ++++++++++++++++++ 14 files changed, 359 insertions(+), 22 deletions(-) create mode 100755 multichain-testing/scripts/make-bank-asset-info.ts create mode 100644 multichain-testing/src/register-interchain-bank-assets.builder.js create mode 100644 multichain-testing/test/scripts/make-bank-asset-info.test.ts create mode 100644 packages/builders/scripts/testing/register-interchain-bank-assets.js diff --git a/.github/workflows/multichain-e2e-template.yml b/.github/workflows/multichain-e2e-template.yml index 58c7ee81013..58455e3b9b4 100644 --- a/.github/workflows/multichain-e2e-template.yml +++ b/.github/workflows/multichain-e2e-template.yml @@ -92,6 +92,10 @@ jobs: run: make override-chain-registry working-directory: ./agoric-sdk/multichain-testing + - name: Register Interchain Bank Assets + run: make register-bank-assets + working-directory: ./agoric-sdk/multichain-testing + - name: Run @agoric/multichain-testing E2E Tests run: yarn ${{ inputs.test_command }} working-directory: ./agoric-sdk/multichain-testing diff --git a/multichain-testing/.gitignore b/multichain-testing/.gitignore index bd550b4d526..a59e6798973 100644 --- a/multichain-testing/.gitignore +++ b/multichain-testing/.gitignore @@ -2,6 +2,7 @@ !.yarn/patches/* # fetched chain info from running starship starship-chain-info.js -# output of build script to get update running chain info -revise-chain-info* +# builder prefix for contract starters start* +# builder prefix for core evals +eval-* diff --git a/multichain-testing/Makefile b/multichain-testing/Makefile index 5301808e631..0f2bd61450d 100644 --- a/multichain-testing/Makefile +++ b/multichain-testing/Makefile @@ -79,6 +79,11 @@ override-chain-registry: scripts/fetch-starship-chain-info.ts && \ scripts/deploy-cli.ts src/revise-chain-info.builder.js +register-bank-assets: + scripts/fetch-starship-chain-info.ts && \ + scripts/deploy-cli.ts src/register-interchain-bank-assets.builder.js \ + assets="$$(scripts/make-bank-asset-info.ts)" + ADDR=agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce COIN=1000000000uist @@ -101,5 +106,5 @@ wait-for-pods: scripts/pod-readiness.ts .PHONY: start -start: install wait-for-pods port-forward fund-provision-pool override-chain-registry +start: install wait-for-pods port-forward fund-provision-pool override-chain-registry register-bank-assets diff --git a/multichain-testing/README.md b/multichain-testing/README.md index cb090092cde..5a43a2aff24 100644 --- a/multichain-testing/README.md +++ b/multichain-testing/README.md @@ -59,7 +59,7 @@ make wait-for-pods make port-forward # set up Agoric testing environment -make fund-provision-pool override-chain-registry +make fund-provision-pool override-chain-registry register-bank-assets ``` If you get an error like "connection refused", you need to wait longer, until all the pods are Running. diff --git a/multichain-testing/scripts/deploy-cli.ts b/multichain-testing/scripts/deploy-cli.ts index 2dfd7b94d06..65e2320da71 100755 --- a/multichain-testing/scripts/deploy-cli.ts +++ b/multichain-testing/scripts/deploy-cli.ts @@ -9,17 +9,28 @@ import { makeAgdTools } from '../tools/agd-tools.js'; import { makeDeployBuilder } from '../tools/deploy.js'; async function main() { - const builder = process.argv[2]; + const [builder, ...rawArgs] = process.argv.slice(2); + + // Parse builder options from command line arguments + const builderOpts: Record = {}; + for (const arg of rawArgs) { + const [key, value] = arg.split('='); + if (key && value) { + builderOpts[key] = value; + } + } if (!builder) { - console.error('USAGE: deploy-cli.ts '); + console.error( + 'USAGE: deploy-cli.ts [key1=value1] [key2=value2]', + ); process.exit(1); } try { const agdTools = await makeAgdTools(console.log, childProcess); const deployBuilder = makeDeployBuilder(agdTools, fse.readJSON, execa); - await deployBuilder(builder); + await deployBuilder(builder, builderOpts); } catch (err) { console.error(err); process.exit(1); diff --git a/multichain-testing/scripts/make-bank-asset-info.ts b/multichain-testing/scripts/make-bank-asset-info.ts new file mode 100755 index 00000000000..257a81986b1 --- /dev/null +++ b/multichain-testing/scripts/make-bank-asset-info.ts @@ -0,0 +1,30 @@ +#!/usr/bin/env -S node --import ts-blank-space/register +/* eslint-env node */ + +import '@endo/init'; +import starshipChainInfo from '../starship-chain-info.js'; +import { makeAssetInfo } from '../tools/asset-info.ts'; + +const main = () => { + if (!starshipChainInfo) { + throw new Error( + 'starshipChainInfo not found. run `./scripts/fetch-starship-chain-info.ts` first.', + ); + } + + const assetInfo = makeAssetInfo(starshipChainInfo) + .filter( + ([_, { chainName, baseName }]) => + chainName === 'agoric' && baseName !== 'agoric', + ) + .map(([denom, { baseDenom }]) => ({ + denom, + issuerName: baseDenom.replace(/^u/, '').toUpperCase(), + decimalPlaces: 6, // TODO do not assume 6 + })); + + // Directly output JSON string for proposal builder options + process.stdout.write(JSON.stringify(assetInfo)); +}; + +main(); diff --git a/multichain-testing/src/register-interchain-bank-assets.builder.js b/multichain-testing/src/register-interchain-bank-assets.builder.js new file mode 100644 index 00000000000..0417c2b92d5 --- /dev/null +++ b/multichain-testing/src/register-interchain-bank-assets.builder.js @@ -0,0 +1,51 @@ +/* global harden */ +/// +import { makeHelpers } from '@agoric/deploy-script-support'; +import { parseArgs } from 'node:util'; + +/** + * @import {ParseArgsConfig} from 'node:util'; + * @import {CoreEvalBuilder, DeployScriptFunction} from '@agoric/deploy-script-support/src/externalTypes.js'; + */ + +/** @type {ParseArgsConfig['options']} */ +const parserOpts = { + assets: { type: 'string' }, +}; + +/** @type {CoreEvalBuilder} */ +export const defaultProposalBuilder = async (_, options) => { + return harden({ + sourceSpec: + '@agoric/builders/scripts/testing/register-interchain-bank-assets.js', + getManifestCall: ['getManifestCall', options], + }); +}; + +/** @type {DeployScriptFunction} */ +export default async (homeP, endowments) => { + const { scriptArgs } = endowments; + + const { + values: { assets }, + } = parseArgs({ + args: scriptArgs, + options: parserOpts, + }); + + const parseAssets = () => { + if (typeof assets !== 'string') { + throw Error( + 'must provide --assets=JSON.stringify({ denom: Denom; issuerName: string; decimalPlaces: number; }[])', + ); + } + return JSON.parse(assets); + }; + + const opts = harden({ assets: parseAssets() }); + + const { writeCoreEval } = await makeHelpers(homeP, endowments); + await writeCoreEval('eval-register-interchain-bank-assets', utils => + defaultProposalBuilder(utils, opts), + ); +}; diff --git a/multichain-testing/src/revise-chain-info.builder.js b/multichain-testing/src/revise-chain-info.builder.js index 10673129466..1269350a491 100644 --- a/multichain-testing/src/revise-chain-info.builder.js +++ b/multichain-testing/src/revise-chain-info.builder.js @@ -19,5 +19,5 @@ export const defaultProposalBuilder = async () => /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ export default async (homeP, endowments) => { const { writeCoreEval } = await makeHelpers(homeP, endowments); - await writeCoreEval('revise-chain-info', defaultProposalBuilder); + await writeCoreEval('eval-revise-chain-info', defaultProposalBuilder); }; diff --git a/multichain-testing/test/scripts/make-bank-asset-info.test.ts b/multichain-testing/test/scripts/make-bank-asset-info.test.ts new file mode 100644 index 00000000000..d04adf4dbe8 --- /dev/null +++ b/multichain-testing/test/scripts/make-bank-asset-info.test.ts @@ -0,0 +1,30 @@ +import test from 'ava'; +import { execFileSync } from 'node:child_process'; + +test('make-bank-asset-info', async t => { + const stdout = execFileSync('./scripts/make-bank-asset-info.ts', { + encoding: 'utf8', + }); + + const assetInfo = JSON.parse(stdout); + + t.like(assetInfo, [ + { + issuerName: 'ATOM', + decimalPlaces: 6, + }, + { + issuerName: 'OSMO', + decimalPlaces: 6, + }, + { + issuerName: 'ION', + decimalPlaces: 6, + }, + ]); + + for (const { denom } of assetInfo) { + t.regex(denom, /^ibc\//); + t.is(denom.length, 68); + } +}); diff --git a/multichain-testing/test/tools/asset-info.test.ts b/multichain-testing/test/tools/asset-info.test.ts index be054b65180..1806a3c4e26 100644 --- a/multichain-testing/test/tools/asset-info.test.ts +++ b/multichain-testing/test/tools/asset-info.test.ts @@ -106,6 +106,7 @@ test('makeAssetInfo', async t => { { baseDenom: 'uosmo', baseName: 'osmosis', + brandKey: 'OSMO', chainName: 'agoric', }, ], @@ -138,6 +139,7 @@ test('makeAssetInfo', async t => { { baseDenom: 'uatom', baseName: 'cosmoshub', + brandKey: 'ATOM', chainName: 'agoric', }, ], diff --git a/multichain-testing/tools/asset-info.ts b/multichain-testing/tools/asset-info.ts index f3e548d1968..ef4faf1d5ac 100644 --- a/multichain-testing/tools/asset-info.ts +++ b/multichain-testing/tools/asset-info.ts @@ -6,7 +6,12 @@ import { } from '@agoric/orchestration'; import type { IBCChannelID } from '@agoric/vats'; -/** make asset info for current env */ +/** + * Make asset info for the current environment. + * + * until #10580, the contract's `issuerKeywordRecord` must include 'ATOM', + * 'OSMO', 'IST', etc. for the local `chainHub` to know about brands. + */ export const makeAssetInfo = ( chainInfo: Record, tokenMap: Record = { @@ -37,13 +42,6 @@ export const makeAssetInfo = ( return `ibc/${denomHash({ denom, channelId })}`; }; - // `brandKey` instead of `brand` until #10580 - // only BLD, IST until #9966 - const BRAND_KEY_MAP: Record = { - ubld: 'BLD', - uist: 'IST', - }; - // only include chains present in `chainInfo` const tokens = Object.entries(tokenMap) .filter(([chain]) => chain in chainInfo) @@ -62,7 +60,11 @@ export const makeAssetInfo = ( { ...baseDetails, chainName: chain, - ...(BRAND_KEY_MAP[denom] && { brandKey: BRAND_KEY_MAP[denom] }), + ...(chain === 'agoric' && { + // `brandKey` instead of `brand` until #10580 + // assumes issuerKeywordRecord includes brand keywords like `IST`, `OSMO` + brandKey: denom.replace(/^u/, '').toUpperCase(), + }), }, ]); @@ -70,14 +72,15 @@ export const makeAssetInfo = ( const issuingChainId = chainInfo[chain].chainId; for (const holdingChain of Object.keys(chainInfo)) { if (holdingChain === chain) continue; - const denomHash = toDenomHash(denom, issuingChainId, holdingChain); assetInfo.push([ - denomHash, + toDenomHash(denom, issuingChainId, holdingChain), { ...baseDetails, chainName: holdingChain, - ...(BRAND_KEY_MAP[denomHash] && { - brandKey: BRAND_KEY_MAP[denomHash], + ...(holdingChain === 'agoric' && { + // `brandKey` instead of `brand` until #10580 + // assumes issuerKeywordRecord includes brand keywords like `IST`, `OSMO` + brandKey: denom.replace(/^u/, '').toUpperCase(), }), }, ]); diff --git a/multichain-testing/tools/e2e-tools.js b/multichain-testing/tools/e2e-tools.js index a3c4ce4207c..51583c006b8 100644 --- a/multichain-testing/tools/e2e-tools.js +++ b/multichain-testing/tools/e2e-tools.js @@ -169,7 +169,7 @@ export const provisionSmartWallet = async ( for await (const [name, qty] of Object.entries(balances)) { const info = byName[name]; if (!info) { - throw Error(name); + throw Error(`${name} not found in vbank assets`); } const { denom, displayInfo } = info; const { decimalPlaces } = displayInfo; diff --git a/multichain-testing/tsconfig.json b/multichain-testing/tsconfig.json index d08285caec4..8915139d881 100644 --- a/multichain-testing/tsconfig.json +++ b/multichain-testing/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../tsconfig.json", "include": [ + "src", "tools", "test" ], diff --git a/packages/builders/scripts/testing/register-interchain-bank-assets.js b/packages/builders/scripts/testing/register-interchain-bank-assets.js new file mode 100644 index 00000000000..dc99315c52b --- /dev/null +++ b/packages/builders/scripts/testing/register-interchain-bank-assets.js @@ -0,0 +1,199 @@ +/** + * @file register-interchain-bank-assets.js Core Eval + * + * Used to populate vbank in testing environments. + */ +import { AssetKind } from '@agoric/ertp'; +import { makeTracer } from '@agoric/internal'; +import { E } from '@endo/far'; +import { makeMarshal } from '@endo/marshal'; + +const { Fail } = assert; + +const trace = makeTracer('RegisterInterchainBankAssets', true); + +/** @import {Board} from '@agoric/vats'; */ + +/** + * @typedef {object} InterchainAssetOptions + * @property {string} denom + * @property {number} decimalPlaces + * @property {string} issuerName + * @property {string} keyword - defaults to `issuerName` if not provided + * @property {string} [proposedName] - defaults to `issuerName` if not provided + */ + +// vstorage paths under published.* +const BOARD_AUX = 'boardAux'; + +const marshalData = makeMarshal(_val => Fail`data only`); + +/** + * Make a storage node for auxiliary data for a value on the board. + * + * @param {ERef} chainStorage + * @param {string} boardId + */ +const makeBoardAuxNode = async (chainStorage, boardId) => { + const boardAux = E(chainStorage).makeChildNode(BOARD_AUX); + return E(boardAux).makeChildNode(boardId); +}; + +/** + * see `publishAgoricBrandsDisplayInfo` {@link @agoric/smart-wallet/proposals/upgrade-walletFactory-proposal.js} + * + * @param {ERef} chainStorage + * @param {ERef} board + * @param {Brand<'nat'>} brand + */ +const publishBrandInfo = async (chainStorage, board, brand) => { + const [boardId, displayInfo, allegedName] = await Promise.all([ + E(board).getId(brand), + E(brand).getDisplayInfo(), + E(brand).getAllegedName(), + ]); + const node = makeBoardAuxNode(chainStorage, boardId); + const aux = marshalData.toCapData(harden({ allegedName, displayInfo })); + await E(node).setValue(JSON.stringify(aux)); +}; + +/** + * @param {BootstrapPowers} powers + * @param {object} config + * @param {object} config.options + * @param {InterchainAssetOptions[]} config.options.assets + */ +export const publishInterchainAssets = async ( + { + consume: { + agoricNamesAdmin, + bankManager, + board, + chainStorage, + startUpgradable, + }, + brand: { produce: produceBrands }, + issuer: { produce: produceIssuers }, + installation: { + consume: { mintHolder }, + }, + }, + { options: { assets } }, +) => { + trace(`${publishInterchainAssets.name} starting...`); + trace(assets); + await null; + for (const interchainAssetOptions of assets) { + const { + denom, + decimalPlaces, + issuerName, + keyword = issuerName, + proposedName = issuerName, + } = interchainAssetOptions; + + trace('interchainAssetOptions', { + denom, + decimalPlaces, + issuerName, + keyword, + proposedName, + }); + + assert.typeof(denom, 'string'); + assert.typeof(decimalPlaces, 'number'); + assert.typeof(keyword, 'string'); + assert.typeof(issuerName, 'string'); + assert.typeof(proposedName, 'string'); + + const terms = { + keyword: issuerName, // "keyword" is a misnomer in mintHolder terms + assetKind: AssetKind.NAT, + displayInfo: { + decimalPlaces, + assetKind: AssetKind.NAT, + }, + }; + const { creatorFacet: mint, publicFacet: issuer } = await E( + startUpgradable, + )({ + installation: mintHolder, + label: issuerName, + privateArgs: undefined, + terms, + }); + + const brand = await E(issuer).getBrand(); + const kit = /** @type {IssuerKit<'nat'>} */ ({ mint, issuer, brand }); + + /** + * `addAssetToVault.js` will register the issuer with the `reserveKit`, + * but we don't need to do that here. + */ + + await Promise.all([ + E(E(agoricNamesAdmin).lookupAdmin('issuer')).update(issuerName, issuer), + E(E(agoricNamesAdmin).lookupAdmin('brand')).update(issuerName, brand), + // triggers benign UnhandledPromiseRejection 'Error: keyword "ATOM" must + // be unique' in provisionPool in testing environments + E(bankManager).addAsset(denom, issuerName, proposedName, kit), + ]); + + // publish brands and issuers to Bootstrap space for use in proposals + produceBrands[keyword].reset(); + produceIssuers[keyword].reset(); + produceBrands[keyword].resolve(brand); + produceIssuers[keyword].resolve(issuer); + + // publish brand info / boardAux for offer legibility + await publishBrandInfo( + // @ts-expect-error 'Promise' is not assignable to + // parameter of type 'ERef' + chainStorage, + board, + brand, + ); + } + trace(`${publishInterchainAssets.name} complete`); +}; + +/** + * @param {unknown} _powers + * @param {{ assets: InterchainAssetOptions[] }} options + */ +export const getManifestCall = (_powers, options) => { + /** @type {Record} */ + const IssuerKws = options.assets.reduce( + /** + * @param {Record} acc + * @param {InterchainAssetOptions} assetOptions + */ + (acc, { issuerName }) => Object.assign(acc, { [issuerName]: true }), + {}, + ); + harden(IssuerKws); + + return { + manifest: { + [publishInterchainAssets.name]: { + consume: { + agoricNamesAdmin: true, + bankManager: true, + board: true, + chainStorage: true, + startUpgradable: true, + }, + brand: { + produce: IssuerKws, + }, + issuer: { + produce: IssuerKws, + }, + installation: { + consume: { mintHolder: true }, + }, + }, + }, + options, + }; +}; From 5cafda6636d79329fe6e1f4d5561ccdec95d3a0b Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Sat, 30 Nov 2024 04:19:51 -0500 Subject: [PATCH 156/174] chore: pfm timeout is Go time duration string --- packages/orchestration/src/cosmos-api.ts | 17 +++++++++++++++-- packages/orchestration/src/exos/chain-hub.js | 4 ++-- .../orchestration/test/exos/chain-hub.test.ts | 10 +++++----- .../local-orchestration-account-kit.test.ts | 6 +++--- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/packages/orchestration/src/cosmos-api.ts b/packages/orchestration/src/cosmos-api.ts index 661d92a23d5..dad627c1382 100644 --- a/packages/orchestration/src/cosmos-api.ts +++ b/packages/orchestration/src/cosmos-api.ts @@ -370,8 +370,8 @@ export interface ForwardInfo { receiver: ChainAddress['value']; port: IBCPortID; channel: IBCChannelID; - /** e.g. '10min' */ - timeout: string; + /** e.g. '10m' */ + timeout: GoDuration; /** default is 3? */ retries: number; next?: { @@ -404,3 +404,16 @@ export type TransferRoute = { forwardInfo?: never; } ); + +/** Single units allowed in Go time duration strings */ +type GoDurationUnit = 'h' | 'm' | 's' | 'ms' | 'us' | 'ns'; + +/** + * Type for a time duration string in Go (cosmos-sdk). For example, "1h", "3m". + * + * Note: this does not support composite values like "1h30m", "1m30s", + * which are allowed in Go. + * + * @see https://pkg.go.dev/time#ParseDuration + */ +export type GoDuration = `${number}${GoDurationUnit}`; diff --git a/packages/orchestration/src/exos/chain-hub.js b/packages/orchestration/src/exos/chain-hub.js index 1477ca91de8..8f40d34b563 100644 --- a/packages/orchestration/src/exos/chain-hub.js +++ b/packages/orchestration/src/exos/chain-hub.js @@ -21,7 +21,7 @@ import { getBech32Prefix } from '../utils/address.js'; * @import {NameHub} from '@agoric/vats'; * @import {Vow, VowTools} from '@agoric/vow'; * @import {Zone} from '@agoric/zone'; - * @import {CosmosAssetInfo, CosmosChainInfo, ForwardInfo, IBCConnectionInfo, IBCMsgTransferOptions, TransferRoute} from '../cosmos-api.js'; + * @import {CosmosAssetInfo, CosmosChainInfo, ForwardInfo, IBCConnectionInfo, IBCMsgTransferOptions, TransferRoute, GoDuration} from '../cosmos-api.js'; * @import {ChainInfo, KnownChains} from '../chain-info.js'; * @import {ChainAddress, Denom, DenomAmount} from '../orchestration-api.js'; * @import {Remote, TypedPattern} from '@agoric/internal'; @@ -179,7 +179,7 @@ const ChainIdArgShape = M.or( const DefaultPfmTimeoutOpts = harden( /** @type {const} */ ({ retries: 3, - timeout: '10min', + timeout: /** @type {const} */ ('10m'), }), ); diff --git a/packages/orchestration/test/exos/chain-hub.test.ts b/packages/orchestration/test/exos/chain-hub.test.ts index 02505f41778..870d5c9672d 100644 --- a/packages/orchestration/test/exos/chain-hub.test.ts +++ b/packages/orchestration/test/exos/chain-hub.test.ts @@ -325,7 +325,7 @@ test('makeTransferRoute - through issuing chain', async t => { port: 'transfer', channel: 'channel-1', retries: 3, - timeout: '10min', + timeout: '10m', }, }, }); @@ -348,7 +348,7 @@ test('makeTransferRoute - through issuing chain', async t => { timeoutTimestamp: 0n, }); t.like(transferMsg, { - memo: '{"forward":{"receiver":"osmo1234","port":"transfer","channel":"channel-1","retries":3,"timeout":"10min"}}', + memo: '{"forward":{"receiver":"osmo1234","port":"transfer","channel":"channel-1","retries":3,"timeout":"10m"}}', receiver: 'pfm', }); }); @@ -367,7 +367,7 @@ test('makeTransferRoute - takes forwardOpts', t => { const amt: DenomAmount = harden({ denom: uusdcOnOsmosis, value: 100n }); const forwardOpts = harden({ retries: 1, - timeout: '3min', + timeout: '3m' as const, }); // 100 USDC on osmosis -> agoric @@ -386,11 +386,11 @@ test('makeTransferRoute - takes forwardOpts', t => { }); t.like( - chainHub.makeTransferRoute(dest, amt, 'osmosis', { timeout: '99min' }), + chainHub.makeTransferRoute(dest, amt, 'osmosis', { timeout: '99m' }), { forwardInfo: { forward: { - timeout: '99min', + timeout: '99m' as const, }, }, }, 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 afec573e19c..ed618734166 100644 --- a/packages/orchestration/test/exos/local-orchestration-account-kit.test.ts +++ b/packages/orchestration/test/exos/local-orchestration-account-kit.test.ts @@ -299,7 +299,7 @@ test('transfer', async t => { t.like(lastestTxMsg(), { receiver: PFM_RECEIVER, - memo: '{"forward":{"receiver":"dydx1test","port":"transfer","channel":"channel-33","retries":3,"timeout":"10min"}}', + memo: '{"forward":{"receiver":"dydx1test","port":"transfer","channel":"channel-33","retries":3,"timeout":"10m"}}', }); t.log('accepts pfm `forwardOpts`'); @@ -309,7 +309,7 @@ test('transfer', async t => { dydxDest, { forwardOpts: { - timeout: '999min', + timeout: '999m', }, }, fetchedChainInfo.agoric.connections['noble-1'].transferChannel.channelId, @@ -318,7 +318,7 @@ test('transfer', async t => { t.like(JSON.parse(lastestTxMsg().memo), { forward: { - timeout: '999min', + timeout: '999m', }, }); }); From 57cc060c1f11e69d9ef26a3a129213ab021cbc51 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Sat, 30 Nov 2024 04:37:42 -0500 Subject: [PATCH 157/174] test: `faucetTools.fundFaucet` - adds helper to fund agoric faucet with interchain tokens - allows callers to request `OSMO`, `ATOM`, etc, via `provisionSmartWallet` --- multichain-testing/test/auto-stake-it.test.ts | 60 +++--------------- multichain-testing/test/support.ts | 8 +++ multichain-testing/tools/agd-lib.js | 15 ++++- multichain-testing/tools/e2e-tools.js | 7 ++- multichain-testing/tools/faucet-tools.ts | 39 ++++++++++++ multichain-testing/tools/ibc-transfer.ts | 62 ++++++++++++++++++- multichain-testing/tools/sleep.ts | 2 + 7 files changed, 135 insertions(+), 58 deletions(-) create mode 100644 multichain-testing/tools/faucet-tools.ts diff --git a/multichain-testing/test/auto-stake-it.test.ts b/multichain-testing/test/auto-stake-it.test.ts index 29b984ceec0..d4bfded2086 100644 --- a/multichain-testing/test/auto-stake-it.test.ts +++ b/multichain-testing/test/auto-stake-it.test.ts @@ -1,11 +1,8 @@ import anyTest from '@endo/ses-ava/prepare-endo.js'; -import type { ExecutionContext, TestFn } from 'ava'; +import type { TestFn } from 'ava'; import starshipChainInfo from '../starship-chain-info.js'; import { makeDoOffer } from '../tools/e2e-tools.js'; -import { - createFundedWalletAndClient, - makeIBCTransferMsg, -} from '../tools/ibc-transfer.js'; +import { makeFundAndTransfer } from '../tools/ibc-transfer.js'; import { makeQueryClient } from '../tools/query.js'; import type { SetupContextWithWallets } from './support.js'; import { chainConfig, commonSetup } from './support.js'; @@ -37,53 +34,6 @@ test.after(async t => { deleteTestKeys(accounts); }); -const makeFundAndTransfer = (t: ExecutionContext) => { - const { retryUntilCondition, useChain } = t.context; - return async (chainName: string, agoricAddr: string, amount = 100n) => { - const { staking } = useChain(chainName).chainInfo.chain; - const denom = staking?.staking_tokens?.[0].denom; - if (!denom) throw Error(`no denom for ${chainName}`); - - const { client, address, wallet } = await createFundedWalletAndClient( - t, - chainName, - useChain, - ); - const balancesResult = await retryUntilCondition( - () => client.getAllBalances(address), - coins => !!coins?.length, - `Faucet balances found for ${address}`, - ); - - console.log('Balances:', balancesResult); - - const transferArgs = makeIBCTransferMsg( - { denom, value: amount }, - { address: agoricAddr, chainName: 'agoric' }, - { address: address, chainName }, - Date.now(), - useChain, - ); - console.log('Transfer Args:', transferArgs); - // TODO #9200 `sendIbcTokens` does not support `memo` - // @ts-expect-error spread argument for concise code - const txRes = await client.sendIbcTokens(...transferArgs); - if (txRes && txRes.code !== 0) { - console.error(txRes); - throw Error(`failed to ibc transfer funds to ${chainName}`); - } - const { events: _events, ...txRest } = txRes; - console.log(txRest); - t.is(txRes.code, 0, `Transaction succeeded`); - t.log(`Funds transferred to ${agoricAddr}`); - return { - client, - address, - wallet, - }; - }; -}; - const autoStakeItScenario = test.macro({ title: (_, chainName: string) => `auto-stake-it on ${chainName}`, exec: async (t, chainName: string) => { @@ -96,7 +46,11 @@ const autoStakeItScenario = test.macro({ useChain, } = t.context; - const fundAndTransfer = makeFundAndTransfer(t); + const fundAndTransfer = makeFundAndTransfer( + t, + retryUntilCondition, + useChain, + ); // 2. Find 'stakingDenom' denom on agoric const remoteChainInfo = starshipChainInfo[chainName]; diff --git a/multichain-testing/test/support.ts b/multichain-testing/test/support.ts index f3f8e752d96..18e8006f155 100644 --- a/multichain-testing/test/support.ts +++ b/multichain-testing/test/support.ts @@ -19,6 +19,7 @@ import { makeHermes } from '../tools/hermes-tools.js'; import { makeNobleTools } from '../tools/noble-tools.js'; import { makeAssetInfo } from '../tools/asset-info.js'; import starshipChainInfo from '../starship-chain-info.js'; +import { makeFaucetTools } from '../tools/faucet-tools.js'; export const FAUCET_POUR = 10_000n * 1_000_000n; @@ -84,6 +85,12 @@ export const commonSetup = async (t: ExecutionContext) => { const nobleTools = makeNobleTools(childProcess); const assetInfo = makeAssetInfo(starshipChainInfo); const chainInfo = withChainCapabilities(starshipChainInfo); + const faucetTools = makeFaucetTools( + t, + tools.agd, + retryUntilCondition, + useChain, + ); /** * Starts a contract if instance not found. Takes care of installing @@ -135,6 +142,7 @@ export const commonSetup = async (t: ExecutionContext) => { startContract, assetInfo, chainInfo, + faucetTools, }; }; diff --git a/multichain-testing/tools/agd-lib.js b/multichain-testing/tools/agd-lib.js index a301945f148..a28d408493b 100644 --- a/multichain-testing/tools/agd-lib.js +++ b/multichain-testing/tools/agd-lib.js @@ -164,6 +164,19 @@ export const makeAgd = ({ execFileSync }) => { }, ).toString(); }, + /** @param {string} name key name in keyring */ + showAddress: name => { + return execFileSync( + kubectlBinary, + [...binaryArgs, 'keys', 'show', name, '-a', ...keyringArgs], + { + encoding: 'utf-8', + stdio: ['pipe', 'pipe', 'ignore'], + }, + ) + .toString() + .trim(); + }, /** @param {string} name */ delete: name => { return exec([...keyringArgs, 'keys', 'delete', name, '-y'], { @@ -181,7 +194,7 @@ export const makeAgd = ({ execFileSync }) => { return make(); }; -/** @typedef {ReturnType} Agd */ +/** @typedef {ReturnType} Agd */ /** @param {{ execFileSync: typeof import('child_process').execFileSync, log: typeof console.log }} powers */ export const makeCopyFiles = ( diff --git a/multichain-testing/tools/e2e-tools.js b/multichain-testing/tools/e2e-tools.js index 51583c006b8..f820e7c8077 100644 --- a/multichain-testing/tools/e2e-tools.js +++ b/multichain-testing/tools/e2e-tools.js @@ -144,7 +144,11 @@ export const provisionSmartWallet = async ( // TODO: skip this query if balances is {} const vbankEntries = await q.queryData('published.agoricNames.vbankAsset'); const byName = Object.fromEntries( - vbankEntries.map(([_denom, info]) => [info.issuerName, info]), + vbankEntries.map(([denom, info]) => { + /// XXX better way to filter out old ATOM denom? + if (denom === 'ibc/toyatom') return [undefined, undefined]; + return [info.issuerName, info]; + }), ); progress({ send: balances, to: address }); @@ -543,6 +547,7 @@ export const makeE2ETools = async ( /** @param {string} name */ deleteKey: async name => agd.keys.delete(name), copyFiles, + agd, }; }; diff --git a/multichain-testing/tools/faucet-tools.ts b/multichain-testing/tools/faucet-tools.ts new file mode 100644 index 00000000000..272dd464cae --- /dev/null +++ b/multichain-testing/tools/faucet-tools.ts @@ -0,0 +1,39 @@ +import type { ExecutionContext } from 'ava'; +import type { Denom } from '@agoric/orchestration'; +import { makeFundAndTransfer } from './ibc-transfer.js'; +import type { MultichainRegistry } from './registry.js'; +import type { RetryUntilCondition } from './sleep.js'; +import type { AgdTools } from './agd-tools.js'; + +type ChainName = string; + +// 90% of default faucet pour +const DEFAULT_QTY = (10_000_000_000n * 9n) / 10n; + +/** + * Determines the agoric `faucet` address and sends funds to it. + * + * Allows use of brands like OSMO, ATOM, etc. with `provisionSmartWallet`. + */ +export const makeFaucetTools = ( + t: ExecutionContext, + agd: AgdTools['agd'], + retryUntilCondition: RetryUntilCondition, + useChain: MultichainRegistry['useChain'], +) => { + const fundAndTransfer = makeFundAndTransfer(t, retryUntilCondition, useChain); + return { + /** + * @param assets denom on the issuing chain + * @param [qty] number of tokens + */ + fundFaucet: async (assets: [ChainName, Denom][], qty = DEFAULT_QTY) => { + const faucetAddr = agd.keys.showAddress('faucet'); + console.log(`Faucet address: ${faucetAddr}`); + + for (const [chainName, denom] of assets) { + await fundAndTransfer(chainName, faucetAddr, qty, denom); + } + }, + }; +}; diff --git a/multichain-testing/tools/ibc-transfer.ts b/multichain-testing/tools/ibc-transfer.ts index 41db593cff2..3437080afd3 100644 --- a/multichain-testing/tools/ibc-transfer.ts +++ b/multichain-testing/tools/ibc-transfer.ts @@ -16,6 +16,7 @@ import { MsgTransfer } from '@agoric/cosmic-proto/ibc/applications/transfer/v1/t import { createWallet } from './wallet.js'; import chainInfo from '../starship-chain-info.js'; import type { MultichainRegistry } from './registry.js'; +import type { RetryUntilCondition } from './sleep.js'; interface MakeFeeObjectArgs { denom?: string; @@ -118,14 +119,15 @@ export const makeIBCTransferMsg = ( }; export const createFundedWalletAndClient = async ( - t: ExecutionContext, + log: (...args: unknown[]) => void, chainName: string, useChain: MultichainRegistry['useChain'], + mnemonic?: string, ) => { const { chain, creditFromFaucet, getRpcEndpoint } = useChain(chainName); - const wallet = await createWallet(chain.bech32_prefix); + const wallet = await createWallet(chain.bech32_prefix, mnemonic); const address = (await wallet.getAccounts())[0].address; - t.log(`Requesting faucet funds for ${address}`); + log(`Requesting faucet funds for ${address}`); await creditFromFaucet(address); // TODO use telescope generated rpc client from @agoric/cosmic-proto // https://github.com/Agoric/agoric-sdk/issues/9200 @@ -135,3 +137,57 @@ export const createFundedWalletAndClient = async ( ); return { client, wallet, address }; }; + +export const makeFundAndTransfer = ( + t: ExecutionContext, + retryUntilCondition: RetryUntilCondition, + useChain: MultichainRegistry['useChain'], +) => { + return async ( + chainName: string, + agoricAddr: string, + amount = 100n, + denom?: string, + ) => { + const { staking } = useChain(chainName).chainInfo.chain; + const denomToTransfer = denom || staking?.staking_tokens?.[0].denom; + if (!denomToTransfer) throw Error(`no denom for ${chainName}`); + + const { client, address, wallet } = await createFundedWalletAndClient( + t.log, + chainName, + useChain, + ); + const balancesResult = await retryUntilCondition( + () => client.getAllBalances(address), + coins => !!coins?.length, + `Faucet balances found for ${address}`, + ); + console.log('Balances:', balancesResult); + + const transferArgs = makeIBCTransferMsg( + { denom: denomToTransfer, value: amount }, + { address: agoricAddr, chainName: 'agoric' }, + { address: address, chainName }, + Date.now(), + useChain, + ); + console.log('Transfer Args:', transferArgs); + // TODO #9200 `sendIbcTokens` does not support `memo` + // @ts-expect-error spread argument for concise code + const txRes = await client.sendIbcTokens(...transferArgs); + if (txRes && txRes.code !== 0) { + console.error(txRes); + throw Error(`failed to ibc transfer funds to ${chainName}`); + } + const { events: _events, ...txRest } = txRes; + console.log(txRest); + t.is(txRes.code, 0, `Transaction succeeded`); + t.log(`Funds transferred to ${agoricAddr}`); + return { + client, + address, + wallet, + }; + }; +}; diff --git a/multichain-testing/tools/sleep.ts b/multichain-testing/tools/sleep.ts index 66251a87dca..1b0d1a58807 100644 --- a/multichain-testing/tools/sleep.ts +++ b/multichain-testing/tools/sleep.ts @@ -75,3 +75,5 @@ export const makeRetryUntilCondition = (defaultOptions: RetryOptions = {}) => { ...options, }); }; + +export type RetryUntilCondition = ReturnType; From 748883d97b625a2a98f2253799d6e6baac3de4f1 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Sat, 30 Nov 2024 04:38:44 -0500 Subject: [PATCH 158/174] test: send-anywhere pfm scenarios --- multichain-testing/test/send-anywhere.test.ts | 50 +++++++++++-------- .../src/proposals/start-send-anywhere.js | 29 +++++++++-- 2 files changed, 53 insertions(+), 26 deletions(-) diff --git a/multichain-testing/test/send-anywhere.test.ts b/multichain-testing/test/send-anywhere.test.ts index f1a8a720e5f..11508f22cc6 100644 --- a/multichain-testing/test/send-anywhere.test.ts +++ b/multichain-testing/test/send-anywhere.test.ts @@ -21,7 +21,8 @@ const contractBuilder = test.before(async t => { const { setupTestKeys, ...common } = await commonSetup(t); - const { assetInfo, chainInfo, deleteTestKeys, startContract } = common; + const { assetInfo, chainInfo, deleteTestKeys, faucetTools, startContract } = + common; deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; @@ -30,6 +31,11 @@ test.before(async t => { chainInfo, assetInfo, }); + + await faucetTools.fundFaucet([ + ['cosmoshub', 'uatom'], + ['osmosis', 'uosmo'], + ]); }); test.after(async t => { @@ -37,12 +43,14 @@ test.after(async t => { deleteTestKeys(accounts); }); +type BrandKW = 'IST' | 'OSMO' | 'ATOM'; + const sendAnywhereScenario = test.macro({ - title: (_, chainName: string, acctIdx: number) => - `send-anywhere ${chainName}${acctIdx}`, - exec: async (t, chainName: string, acctIdx: number) => { - const config = chainConfig[chainName]; - if (!config) return t.fail(`Unknown chain: ${chainName}`); + title: (_, destChainName: string, acctIdx: number, brandKw: BrandKW) => + `send-anywhere ${brandKw} from agoric to ${destChainName}${acctIdx}`, + exec: async (t, destChainName: string, acctIdx: number, brandKw: BrandKW) => { + const config = chainConfig[destChainName]; + if (!config) return t.fail(`Unknown chain: ${destChainName}`); const { wallets, @@ -53,13 +61,13 @@ const sendAnywhereScenario = test.macro({ } = t.context; t.log('Create a receiving wallet for the send-anywhere transfer'); - const chain = useChain(chainName).chain; + const chain = useChain(destChainName).chain; t.log('Create an agoric smart wallet to initiate send-anywhere transfer'); - const agoricAddr = wallets[`${chainName}${acctIdx}`]; + const agoricAddr = wallets[`${destChainName}${acctIdx}`]; const wdUser1 = await provisionSmartWallet(agoricAddr, { - BLD: 100_000n, - IST: 100_000n, + BLD: 1_000n, + [brandKw]: 1_000n, }); t.log(`provisioning agoric smart wallet for ${agoricAddr}`); @@ -68,11 +76,11 @@ const sendAnywhereScenario = test.macro({ const brands = await vstorageClient.queryData( 'published.agoricNames.brand', ); - const istBrand = Object.fromEntries(brands).IST; + const brand = Object.fromEntries(brands)[brandKw]; - const apiUrl = await useChain(chainName).getRestEndpoint(); + const apiUrl = await useChain(destChainName).getRestEndpoint(); const queryClient = makeQueryClient(apiUrl); - t.log(`Made ${chainName} query client`); + t.log(`Made ${destChainName} query client`); const doSendAnywhere = async (amount: Amount) => { t.log(`Sending ${amount.value} ${amount.brand}.`); @@ -83,8 +91,8 @@ const sendAnywhereScenario = test.macro({ encoding: 'bech32', }; t.log('Will send payment to:', receiver); - t.log(`${chainName} offer`); - const offerId = `${chainName}-makeSendInvitation-${Date.now()}`; + t.log(`${destChainName} offer`); + const offerId = `${destChainName}-makeSendInvitation-${Date.now()}`; await doOffer({ id: offerId, invitationSpec: { @@ -92,7 +100,7 @@ const sendAnywhereScenario = test.macro({ instancePath: [contractName], callPipe: [['makeSendInvitation']], }, - offerArgs: { destAddr: receiver.value, chainName }, + offerArgs: { destAddr: receiver.value, chainName: destChainName }, proposal: { give: { Send: amount } }, }); @@ -123,12 +131,12 @@ const sendAnywhereScenario = test.macro({ console.log(`${agoricAddr} offer amounts:`, offerAmounts); for (const value of offerAmounts) { - await doSendAnywhere(AmountMath.make(istBrand, value)); + await doSendAnywhere(AmountMath.make(brand, value)); } }, }); -test.serial(sendAnywhereScenario, 'osmosis', 1); -test.serial(sendAnywhereScenario, 'osmosis', 2); -test.serial(sendAnywhereScenario, 'cosmoshub', 1); -test.serial(sendAnywhereScenario, 'cosmoshub', 2); +test.serial(sendAnywhereScenario, 'osmosis', 1, 'IST'); +test.serial(sendAnywhereScenario, 'osmosis', 2, 'ATOM'); // exercises PFM (agoric -> cosmoshub -> osmosis) +test.serial(sendAnywhereScenario, 'cosmoshub', 1, 'IST'); +test.serial(sendAnywhereScenario, 'cosmoshub', 2, 'OSMO'); // exercises PFM (agoric -> osmosis -> cosmoshub) diff --git a/packages/orchestration/src/proposals/start-send-anywhere.js b/packages/orchestration/src/proposals/start-send-anywhere.js index b0db84c3f32..0599f077dd9 100644 --- a/packages/orchestration/src/proposals/start-send-anywhere.js +++ b/packages/orchestration/src/proposals/start-send-anywhere.js @@ -31,7 +31,6 @@ const trace = makeTracer('StartSA', true); * consume: { * BLD: Issuer<'nat'>; * IST: Issuer<'nat'>; - * USDC: Issuer<'nat'>; * }; * }; * }} powers @@ -84,13 +83,33 @@ export const startSendAnywhere = async ( }), ); + /** @param {() => Promise} p */ + const safeFulfill = async p => + E.when( + p(), + i => i, + () => undefined, + ); + + const atomIssuer = await safeFulfill(() => + E(agoricNames).lookup('issuer', 'ATOM'), + ); + const osmoIssuer = await safeFulfill(() => + E(agoricNames).lookup('issuer', 'OSMO'), + ); + + const issuerKeywordRecord = harden({ + BLD: await BLD, + IST: await IST, + ...(atomIssuer && { ATOM: atomIssuer }), + ...(osmoIssuer && { OSMO: osmoIssuer }), + }); + trace('issuerKeywordRecord', issuerKeywordRecord); + const { instance } = await E(startUpgradable)({ label: 'send-anywhere', installation: sendAnywhere, - issuerKeywordRecord: { - Stable: await IST, - Stake: await BLD, - }, + issuerKeywordRecord, privateArgs, }); produceInstance.resolve(instance); From 5d4f84c0d911e3d2745c0e3a2003b93a87dd2545 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 00:22:13 -0600 Subject: [PATCH 159/174] refactor(fast-usdc): inject io to addOperatorCommands --- packages/fast-usdc/src/cli/cli.js | 15 +++++++++- .../fast-usdc/src/cli/operator-commands.js | 30 +++++++++---------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/packages/fast-usdc/src/cli/cli.js b/packages/fast-usdc/src/cli/cli.js index 56a74fbc25b..afaf1eadf9a 100644 --- a/packages/fast-usdc/src/cli/cli.js +++ b/packages/fast-usdc/src/cli/cli.js @@ -1,3 +1,5 @@ +/* eslint-env node */ +/* global globalThis */ import { assertParsableNumber } from '@agoric/zoe/src/contractSupport/ratio.js'; import { Command, @@ -34,6 +36,11 @@ export const initProgram = ( writeFile = writeAsync, mkdir = mkdirSync, exists = existsSync, + fetch = globalThis.fetch, + stdout = process.stdout, + stderr = process.stderr, + env = process.env, + now = () => Date.now(), ) => { const program = new Command(); @@ -56,7 +63,13 @@ export const initProgram = ( }; addConfigCommands(program, configHelpers, makeConfigFile); - addOperatorCommands(program); + addOperatorCommands(program, { + fetch, + stdout, + stderr, + env, + now, + }); /** @param {string} value */ const parseDecimal = value => { diff --git a/packages/fast-usdc/src/cli/operator-commands.js b/packages/fast-usdc/src/cli/operator-commands.js index 3542bdcf074..73f380b2460 100644 --- a/packages/fast-usdc/src/cli/operator-commands.js +++ b/packages/fast-usdc/src/cli/operator-commands.js @@ -1,4 +1,3 @@ -/* eslint-env node */ /** * @import {Command} from 'commander'; * @import {OfferSpec} from '@agoric/smart-wallet/src/offers.js'; @@ -11,8 +10,18 @@ import { outputActionAndHint } from './bridge-action.js'; /** * @param {Command} program + * @param {{ + * fetch: Window['fetch']; + * stdout: typeof process.stdout; + * stderr: typeof process.stderr; + * env: typeof process.env; + * now: typeof Date.now; + * }} io */ -export const addOperatorCommands = program => { +export const addOperatorCommands = ( + program, + { fetch, stderr, stdout, env, now }, +) => { const operator = program .command('operator') .description('Oracle operator commands'); @@ -24,17 +33,9 @@ export const addOperatorCommands = program => { 'after', '\nPipe the STDOUT to a file such as accept.json, then use the Agoric CLI to broadcast it:\n agoric wallet send --offer accept.json --from gov1 --keyring-backend="test"', ) - .option( - '--offerId ', - 'Offer id', - String, - `operatorAccept-${Date.now()}`, - ) + .option('--offerId ', 'Offer id', String, `operatorAccept-${now()}`) .action(async opts => { - const networkConfig = await fetchEnvNetworkConfig({ - env: process.env, - fetch, - }); + const networkConfig = await fetchEnvNetworkConfig({ env, fetch }); const vsk = await makeVstorageKit({ fetch }, networkConfig); const instance = vsk.agoricNames.instance.fastUsdc; assert(instance, 'fastUsdc instance not in agoricNames'); @@ -56,10 +57,7 @@ export const addOperatorCommands = program => { offer, }; - outputActionAndHint(bridgeAction, { - stderr: process.stderr, - stdout: process.stdout, - }); + outputActionAndHint(bridgeAction, { stderr, stdout }); }); operator From 448aa3a194b55ebeb5423f0027c543f8c6807239 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 01:16:12 -0600 Subject: [PATCH 160/174] feat(fast-usdc): operator attest cli command using a LegibleCapData blob arg --- .../fast-usdc/src/cli/operator-commands.js | 38 +++++++- .../test/cli/operator-commands.test.ts | 96 +++++++++++++++++++ 2 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 packages/fast-usdc/test/cli/operator-commands.test.ts diff --git a/packages/fast-usdc/src/cli/operator-commands.js b/packages/fast-usdc/src/cli/operator-commands.js index 73f380b2460..a9312cb4240 100644 --- a/packages/fast-usdc/src/cli/operator-commands.js +++ b/packages/fast-usdc/src/cli/operator-commands.js @@ -2,11 +2,22 @@ * @import {Command} from 'commander'; * @import {OfferSpec} from '@agoric/smart-wallet/src/offers.js'; * @import {ExecuteOfferAction} from '@agoric/smart-wallet/src/smartWallet.js'; + * @import {OperatorKit} from '../exos/operator-kit.js'; */ import { fetchEnvNetworkConfig, makeVstorageKit } from '@agoric/client-utils'; +import { mustMatch } from '@agoric/internal'; import { INVITATION_MAKERS_DESC } from '../exos/transaction-feed.js'; +import { CctpTxEvidenceShape } from '../type-guards.js'; import { outputActionAndHint } from './bridge-action.js'; +import { fromExternalConfig } from '../utils/config-marshal.js'; + +/** @param {string} arg */ +const parseCCTPEvidence = arg => { + const evidence = fromExternalConfig(JSON.parse(arg), {}); + mustMatch(evidence, CctpTxEvidenceShape); + return evidence; +}; /** * @param {Command} program @@ -64,11 +75,28 @@ export const addOperatorCommands = ( .command('attest') .description('Attest to an observed Fast USDC transfer') .requiredOption('--previousOfferId ', 'Offer id', String) - .action(async options => { - const { previousOfferId } = options; - console.error( - 'TODO: Implement attest logic for request:', - previousOfferId, + .requiredOption('--evidence ', 'CCTP evidence', parseCCTPEvidence) + .option('--offerId ', 'Offer id', String, `operatorAttest-${now()}`) + .action(async opts => { + const { previousOfferId, evidence } = opts; + + /** @type {OfferSpec} */ + const offer = { + id: opts.offerId, + invitationSpec: { + source: 'continuing', + previousOffer: previousOfferId, + /** @type {string & keyof OperatorKit['invitationMakers'] } */ + invitationMakerName: 'SubmitEvidence', + /** @type {Parameters } */ + invitationArgs: [evidence], + }, + proposal: {}, + }; + + outputActionAndHint( + { method: 'executeOffer', offer }, + { stderr, stdout }, ); }); diff --git a/packages/fast-usdc/test/cli/operator-commands.test.ts b/packages/fast-usdc/test/cli/operator-commands.test.ts new file mode 100644 index 00000000000..c8885b05029 --- /dev/null +++ b/packages/fast-usdc/test/cli/operator-commands.test.ts @@ -0,0 +1,96 @@ +import test from 'ava'; +import { Command } from 'commander'; +import type { Passable } from '@endo/pass-style'; +import { addOperatorCommands } from '../../src/cli/operator-commands.js'; +import { MockCctpTxEvidences } from '../fixtures.js'; +import { toExternalConfig } from '../../src/utils/config-marshal.js'; + +export const flags = ( + record: Record, +): string[] => { + // @ts-expect-error undefined is filtered out + const skipUndef: [string, string][] = Object.entries(record).filter( + ([_k, v]) => v !== undefined, + ); + return skipUndef.map(([k, v]) => [`--${k}`, v]).flat(); +}; + +test('fast-usdc operator attest sub-command', async t => { + const evidence = harden( + MockCctpTxEvidences.AGORIC_PLUS_DYDX(), + ) as unknown as Passable; + const argv = [ + ...`node fast-usdc operator attest`.split(' '), + ...flags({ + previousOfferId: 123, + evidence: JSON.stringify(toExternalConfig(evidence, {})), + }), + ]; + const program = new Command(); + program.exitOverride(); + const out = [] as string[]; + const err = [] as string[]; + + addOperatorCommands(program, { + fetch: null as unknown as Window['fetch'], + stdout: { + write: txt => { + out.push(txt); + return true; + }, + } as unknown as typeof process.stdout, + stderr: { + write: txt => { + err.push(txt); + return true; + }, + } as unknown as typeof process.stderr, + env: {}, + now: () => 1234, + }); + + await program.parseAsync(argv); + + t.deepEqual(out, [ + JSON.stringify({ + body: `#${JSON.stringify({ + method: 'executeOffer', + offer: { + id: 'operatorAttest-1234', + invitationSpec: { + invitationArgs: [ + { + aux: { + forwardingChannel: 'channel-21', + recipientAddress: + 'agoric16kv2g7snfc4q24vg3pjdlnnqgngtjpwtetd2h689nz09lcklvh5s8u37ek?EUD=dydx183dejcnmkka5dzcu9xw6mywq0p2m5peks28men', + }, + blockHash: + '0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee699', + blockNumber: '+21037669', + blockTimestamp: '+1730762099', + chainId: 1, + tx: { + amount: '+300000000', + forwardingAddress: + 'noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelktz', + }, + txHash: + '0xd81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761799', + }, + ], + invitationMakerName: 'SubmitEvidence', + previousOffer: '123', + source: 'continuing', + }, + proposal: {}, + }, + })}`, + slots: [], + }), + '\n', + ]); + t.deepEqual(err, [ + 'Now use `agoric wallet send ...` to sign and broadcast the offer.\n', + ]); +}); From c6a2123970a3687fe85c9a2d83f2ffe403cbc368 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 01:38:27 -0600 Subject: [PATCH 161/174] chore(fast-usdc): use an arg for each evidence property --- packages/fast-usdc/package.json | 1 + .../fast-usdc/src/cli/operator-commands.js | 45 +++++++++++++++---- .../test/cli/operator-commands.test.ts | 16 +++++-- 3 files changed, 51 insertions(+), 11 deletions(-) diff --git a/packages/fast-usdc/package.json b/packages/fast-usdc/package.json index 007e1e90140..22759fefcd8 100644 --- a/packages/fast-usdc/package.json +++ b/packages/fast-usdc/package.json @@ -49,6 +49,7 @@ "@endo/far": "^1.1.9", "@endo/init": "^1.1.7", "@endo/marshal": "^1.6.2", + "@endo/nat": "^5.0.13", "@endo/pass-style": "^1.4.7", "@endo/patterns": "^1.4.7", "@endo/promise-kit": "^1.1.8", diff --git a/packages/fast-usdc/src/cli/operator-commands.js b/packages/fast-usdc/src/cli/operator-commands.js index a9312cb4240..06a3fdc01df 100644 --- a/packages/fast-usdc/src/cli/operator-commands.js +++ b/packages/fast-usdc/src/cli/operator-commands.js @@ -7,16 +7,22 @@ import { fetchEnvNetworkConfig, makeVstorageKit } from '@agoric/client-utils'; import { mustMatch } from '@agoric/internal'; +import { Nat } from '@endo/nat'; +import { InvalidArgumentError } from 'commander'; import { INVITATION_MAKERS_DESC } from '../exos/transaction-feed.js'; import { CctpTxEvidenceShape } from '../type-guards.js'; import { outputActionAndHint } from './bridge-action.js'; -import { fromExternalConfig } from '../utils/config-marshal.js'; /** @param {string} arg */ -const parseCCTPEvidence = arg => { - const evidence = fromExternalConfig(JSON.parse(arg), {}); - mustMatch(evidence, CctpTxEvidenceShape); - return evidence; +const parseNat = arg => { + const n = Nat(BigInt(arg)); + return n; +}; + +/** @param {string} arg */ +const parseHex = arg => { + if (!arg.startsWith('0x')) throw new InvalidArgumentError('not a hex string'); + return arg; }; /** @@ -75,14 +81,37 @@ export const addOperatorCommands = ( .command('attest') .description('Attest to an observed Fast USDC transfer') .requiredOption('--previousOfferId ', 'Offer id', String) - .requiredOption('--evidence ', 'CCTP evidence', parseCCTPEvidence) + .requiredOption('--forwardingChannel ', 'Channel id', String) + .requiredOption('--recipientAddress ', 'bech32 address', String) + .requiredOption('--blockHash <0xhex>', 'hex hash', parseHex) + .requiredOption('--blockNumber ', 'number', parseNat) + .requiredOption('--blockTimestamp ', 'number', parseNat) + .requiredOption('--chainId ', 'chain id', Number) + .requiredOption('--amount ', 'number', parseNat) + .requiredOption('--forwardingAddress ', 'bech32 address', String) + .requiredOption('--txHash <0xhexo>', 'hex hash', parseHex) .option('--offerId ', 'Offer id', String, `operatorAttest-${now()}`) .action(async opts => { - const { previousOfferId, evidence } = opts; + const { + offerId, + previousOfferId, + forwardingChannel, + recipientAddress, + amount, + forwardingAddress, + ...flat + } = opts; + + const evidence = harden({ + aux: { forwardingChannel, recipientAddress }, + tx: { amount, forwardingAddress }, + ...flat, + }); + mustMatch(evidence, CctpTxEvidenceShape); /** @type {OfferSpec} */ const offer = { - id: opts.offerId, + id: offerId, invitationSpec: { source: 'continuing', previousOffer: previousOfferId, diff --git a/packages/fast-usdc/test/cli/operator-commands.test.ts b/packages/fast-usdc/test/cli/operator-commands.test.ts index c8885b05029..02b7d38e0d8 100644 --- a/packages/fast-usdc/test/cli/operator-commands.test.ts +++ b/packages/fast-usdc/test/cli/operator-commands.test.ts @@ -1,9 +1,8 @@ +import type { Passable } from '@endo/pass-style'; import test from 'ava'; import { Command } from 'commander'; -import type { Passable } from '@endo/pass-style'; import { addOperatorCommands } from '../../src/cli/operator-commands.js'; import { MockCctpTxEvidences } from '../fixtures.js'; -import { toExternalConfig } from '../../src/utils/config-marshal.js'; export const flags = ( record: Record, @@ -23,7 +22,18 @@ test('fast-usdc operator attest sub-command', async t => { ...`node fast-usdc operator attest`.split(' '), ...flags({ previousOfferId: 123, - evidence: JSON.stringify(toExternalConfig(evidence, {})), + forwardingChannel: 'channel-21', + recipientAddress: + 'agoric16kv2g7snfc4q24vg3pjdlnnqgngtjpwtetd2h689nz09lcklvh5s8u37ek?EUD=dydx183dejcnmkka5dzcu9xw6mywq0p2m5peks28men', + blockHash: + '0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee699', + blockNumber: 21037669, + blockTimestamp: 1730762099, + chainId: 1, + amount: 300000000, + forwardingAddress: 'noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelktz', + txHash: + '0xd81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761799', }), ]; const program = new Command(); From f1df99f8d431d1b9a26f2687aa2c4c80a17537c0 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 01:43:40 -0600 Subject: [PATCH 162/174] chore: don't kludge fromCapData --- .../test/cli/operator-commands.test.ts | 79 +++++++++---------- 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/packages/fast-usdc/test/cli/operator-commands.test.ts b/packages/fast-usdc/test/cli/operator-commands.test.ts index 02b7d38e0d8..ff0b7157888 100644 --- a/packages/fast-usdc/test/cli/operator-commands.test.ts +++ b/packages/fast-usdc/test/cli/operator-commands.test.ts @@ -3,6 +3,7 @@ import test from 'ava'; import { Command } from 'commander'; import { addOperatorCommands } from '../../src/cli/operator-commands.js'; import { MockCctpTxEvidences } from '../fixtures.js'; +import { makeMarshal } from '@endo/marshal'; export const flags = ( record: Record, @@ -14,6 +15,8 @@ export const flags = ( return skipUndef.map(([k, v]) => [`--${k}`, v]).flat(); }; +const marshalData = makeMarshal(_v => assert.fail('data only')); + test('fast-usdc operator attest sub-command', async t => { const evidence = harden( MockCctpTxEvidences.AGORIC_PLUS_DYDX(), @@ -61,46 +64,42 @@ test('fast-usdc operator attest sub-command', async t => { await program.parseAsync(argv); - t.deepEqual(out, [ - JSON.stringify({ - body: `#${JSON.stringify({ - method: 'executeOffer', - offer: { - id: 'operatorAttest-1234', - invitationSpec: { - invitationArgs: [ - { - aux: { - forwardingChannel: 'channel-21', - recipientAddress: - 'agoric16kv2g7snfc4q24vg3pjdlnnqgngtjpwtetd2h689nz09lcklvh5s8u37ek?EUD=dydx183dejcnmkka5dzcu9xw6mywq0p2m5peks28men', - }, - blockHash: - '0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee699', - blockNumber: '+21037669', - blockTimestamp: '+1730762099', - chainId: 1, - tx: { - amount: '+300000000', - forwardingAddress: - 'noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelktz', - }, - txHash: - '0xd81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761799', - }, - ], - invitationMakerName: 'SubmitEvidence', - previousOffer: '123', - source: 'continuing', + const action = marshalData.fromCapData(JSON.parse(out.join(''))); + t.deepEqual(action, { + method: 'executeOffer', + offer: { + id: 'operatorAttest-1234', + invitationSpec: { + invitationArgs: [ + { + aux: { + forwardingChannel: 'channel-21', + recipientAddress: + 'agoric16kv2g7snfc4q24vg3pjdlnnqgngtjpwtetd2h689nz09lcklvh5s8u37ek?EUD=dydx183dejcnmkka5dzcu9xw6mywq0p2m5peks28men', + }, + blockHash: + '0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee699', + blockNumber: 21037669n, + blockTimestamp: 1730762099n, + chainId: 1, + tx: { + amount: 300000000n, + forwardingAddress: 'noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelktz', + }, + txHash: + '0xd81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761799', }, - proposal: {}, - }, - })}`, - slots: [], - }), - '\n', - ]); - t.deepEqual(err, [ + ], + invitationMakerName: 'SubmitEvidence', + previousOffer: '123', + source: 'continuing', + }, + proposal: {}, + }, + }); + + t.is( + err.join(''), 'Now use `agoric wallet send ...` to sign and broadcast the offer.\n', - ]); + ); }); From 11df834abbc903ca49dc42501dd89aea034aaaaa Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 01:48:06 -0600 Subject: [PATCH 163/174] chore: avoid magic strings in attest test --- .../test/cli/operator-commands.test.ts | 47 ++++--------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/packages/fast-usdc/test/cli/operator-commands.test.ts b/packages/fast-usdc/test/cli/operator-commands.test.ts index ff0b7157888..3c58b9b5dab 100644 --- a/packages/fast-usdc/test/cli/operator-commands.test.ts +++ b/packages/fast-usdc/test/cli/operator-commands.test.ts @@ -6,37 +6,29 @@ import { MockCctpTxEvidences } from '../fixtures.js'; import { makeMarshal } from '@endo/marshal'; export const flags = ( - record: Record, + record: Record, ): string[] => { // @ts-expect-error undefined is filtered out const skipUndef: [string, string][] = Object.entries(record).filter( ([_k, v]) => v !== undefined, ); - return skipUndef.map(([k, v]) => [`--${k}`, v]).flat(); + return skipUndef.map(([k, v]) => [`--${k}`, `${v}`]).flat(); }; const marshalData = makeMarshal(_v => assert.fail('data only')); test('fast-usdc operator attest sub-command', async t => { - const evidence = harden( - MockCctpTxEvidences.AGORIC_PLUS_DYDX(), - ) as unknown as Passable; + const evidence = harden(MockCctpTxEvidences.AGORIC_PLUS_DYDX()); + const { aux, tx, ...flat } = evidence; const argv = [ ...`node fast-usdc operator attest`.split(' '), ...flags({ previousOfferId: 123, - forwardingChannel: 'channel-21', - recipientAddress: - 'agoric16kv2g7snfc4q24vg3pjdlnnqgngtjpwtetd2h689nz09lcklvh5s8u37ek?EUD=dydx183dejcnmkka5dzcu9xw6mywq0p2m5peks28men', - blockHash: - '0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee699', - blockNumber: 21037669, - blockTimestamp: 1730762099, - chainId: 1, - amount: 300000000, - forwardingAddress: 'noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelktz', - txHash: - '0xd81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761799', + forwardingChannel: aux.forwardingChannel, + recipientAddress: aux.recipientAddress, + amount: tx.amount, + forwardingAddress: tx.forwardingAddress, + ...flat, }), ]; const program = new Command(); @@ -70,26 +62,7 @@ test('fast-usdc operator attest sub-command', async t => { offer: { id: 'operatorAttest-1234', invitationSpec: { - invitationArgs: [ - { - aux: { - forwardingChannel: 'channel-21', - recipientAddress: - 'agoric16kv2g7snfc4q24vg3pjdlnnqgngtjpwtetd2h689nz09lcklvh5s8u37ek?EUD=dydx183dejcnmkka5dzcu9xw6mywq0p2m5peks28men', - }, - blockHash: - '0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee699', - blockNumber: 21037669n, - blockTimestamp: 1730762099n, - chainId: 1, - tx: { - amount: 300000000n, - forwardingAddress: 'noble1x0ydg69dh6fqvr27xjvp6maqmrldam6yfelktz', - }, - txHash: - '0xd81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff387552761799', - }, - ], + invitationArgs: [evidence], invitationMakerName: 'SubmitEvidence', previousOffer: '123', source: 'continuing', From 843ad24f5cc4becf547ae54acde4b4289d6033b2 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 11:13:07 -0600 Subject: [PATCH 164/174] refactor: mockStream, concise flags --- .../test/cli/operator-commands.test.ts | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/packages/fast-usdc/test/cli/operator-commands.test.ts b/packages/fast-usdc/test/cli/operator-commands.test.ts index 3c58b9b5dab..b0e25b26109 100644 --- a/packages/fast-usdc/test/cli/operator-commands.test.ts +++ b/packages/fast-usdc/test/cli/operator-commands.test.ts @@ -1,9 +1,9 @@ -import type { Passable } from '@endo/pass-style'; import test from 'ava'; import { Command } from 'commander'; import { addOperatorCommands } from '../../src/cli/operator-commands.js'; import { MockCctpTxEvidences } from '../fixtures.js'; import { makeMarshal } from '@endo/marshal'; +import type { Writable } from 'node:stream'; export const flags = ( record: Record, @@ -17,20 +17,17 @@ export const flags = ( const marshalData = makeMarshal(_v => assert.fail('data only')); +const mockStream = (buf: string[]): T => + ({ write: txt => (buf.push(txt), true) }) as T; + test('fast-usdc operator attest sub-command', async t => { const evidence = harden(MockCctpTxEvidences.AGORIC_PLUS_DYDX()); const { aux, tx, ...flat } = evidence; const argv = [ ...`node fast-usdc operator attest`.split(' '), - ...flags({ - previousOfferId: 123, - forwardingChannel: aux.forwardingChannel, - recipientAddress: aux.recipientAddress, - amount: tx.amount, - forwardingAddress: tx.forwardingAddress, - ...flat, - }), + ...flags({ previousOfferId: 123, ...aux, ...tx, ...flat }), ]; + t.log(...argv); const program = new Command(); program.exitOverride(); const out = [] as string[]; @@ -38,18 +35,8 @@ test('fast-usdc operator attest sub-command', async t => { addOperatorCommands(program, { fetch: null as unknown as Window['fetch'], - stdout: { - write: txt => { - out.push(txt); - return true; - }, - } as unknown as typeof process.stdout, - stderr: { - write: txt => { - err.push(txt); - return true; - }, - } as unknown as typeof process.stderr, + stdout: mockStream(out), + stderr: mockStream(err), env: {}, now: () => 1234, }); From ccb969e105689d5454f9519820bdf4b3eac97025 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 13:43:09 -0600 Subject: [PATCH 165/174] refactor: move mockStream(...) to fast-usdc/tools/ --- packages/fast-usdc/package.json | 3 ++- .../fast-usdc/test/cli/operator-commands.test.ts | 7 ++----- packages/fast-usdc/tools/mock-io.ts | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 packages/fast-usdc/tools/mock-io.ts diff --git a/packages/fast-usdc/package.json b/packages/fast-usdc/package.json index 22759fefcd8..0643f9bf809 100644 --- a/packages/fast-usdc/package.json +++ b/packages/fast-usdc/package.json @@ -5,7 +5,8 @@ "type": "module", "files": [ "contract", - "src" + "src", + "tools" ], "bin": { "fast-usdc": "./src/cli/bin.js" diff --git a/packages/fast-usdc/test/cli/operator-commands.test.ts b/packages/fast-usdc/test/cli/operator-commands.test.ts index b0e25b26109..0dcc411cf73 100644 --- a/packages/fast-usdc/test/cli/operator-commands.test.ts +++ b/packages/fast-usdc/test/cli/operator-commands.test.ts @@ -1,9 +1,9 @@ +import { makeMarshal } from '@endo/marshal'; import test from 'ava'; import { Command } from 'commander'; import { addOperatorCommands } from '../../src/cli/operator-commands.js'; +import { mockStream } from '../../tools/mock-io.js'; import { MockCctpTxEvidences } from '../fixtures.js'; -import { makeMarshal } from '@endo/marshal'; -import type { Writable } from 'node:stream'; export const flags = ( record: Record, @@ -17,9 +17,6 @@ export const flags = ( const marshalData = makeMarshal(_v => assert.fail('data only')); -const mockStream = (buf: string[]): T => - ({ write: txt => (buf.push(txt), true) }) as T; - test('fast-usdc operator attest sub-command', async t => { const evidence = harden(MockCctpTxEvidences.AGORIC_PLUS_DYDX()); const { aux, tx, ...flat } = evidence; diff --git a/packages/fast-usdc/tools/mock-io.ts b/packages/fast-usdc/tools/mock-io.ts new file mode 100644 index 00000000000..0cb6ced28e6 --- /dev/null +++ b/packages/fast-usdc/tools/mock-io.ts @@ -0,0 +1,14 @@ +import type { Writable } from 'node:stream'; + +/** + * mock stdout / stderr, for example + * + * @param buf - caller-provided buffer for written data + */ +export const mockStream = (buf: string[]): T => + ({ + write: txt => { + buf.push(txt); + return true; + }, + }) as T; From 8674c750bd0db5a6e33049d4b994016b0b9e52b3 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 13:47:16 -0600 Subject: [PATCH 166/174] refactor: move flags() to fast-usdc/tools/ --- packages/fast-usdc/test/cli/operator-commands.test.ts | 11 +---------- packages/fast-usdc/tools/cli-tools.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 packages/fast-usdc/tools/cli-tools.ts diff --git a/packages/fast-usdc/test/cli/operator-commands.test.ts b/packages/fast-usdc/test/cli/operator-commands.test.ts index 0dcc411cf73..36c645adb8a 100644 --- a/packages/fast-usdc/test/cli/operator-commands.test.ts +++ b/packages/fast-usdc/test/cli/operator-commands.test.ts @@ -2,19 +2,10 @@ import { makeMarshal } from '@endo/marshal'; import test from 'ava'; import { Command } from 'commander'; import { addOperatorCommands } from '../../src/cli/operator-commands.js'; +import { flags } from '../../tools/cli-tools.js'; import { mockStream } from '../../tools/mock-io.js'; import { MockCctpTxEvidences } from '../fixtures.js'; -export const flags = ( - record: Record, -): string[] => { - // @ts-expect-error undefined is filtered out - const skipUndef: [string, string][] = Object.entries(record).filter( - ([_k, v]) => v !== undefined, - ); - return skipUndef.map(([k, v]) => [`--${k}`, `${v}`]).flat(); -}; - const marshalData = makeMarshal(_v => assert.fail('data only')); test('fast-usdc operator attest sub-command', async t => { diff --git a/packages/fast-usdc/tools/cli-tools.ts b/packages/fast-usdc/tools/cli-tools.ts new file mode 100644 index 00000000000..12af12653e3 --- /dev/null +++ b/packages/fast-usdc/tools/cli-tools.ts @@ -0,0 +1,9 @@ +export const flags = ( + record: Record, +): string[] => { + // @ts-expect-error undefined is filtered out + const skipUndef: [string, string][] = Object.entries(record).filter( + ([_k, v]) => v !== undefined, + ); + return skipUndef.map(([k, v]) => [`--${k}`, `${v}`]).flat(); +}; From 13e68a99c21418368df9e4276cc10cd10190e54e Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 13:59:26 -0600 Subject: [PATCH 167/174] chore: use AGORIC_NET for agoric RPC endpoint in transfer cmd --- packages/fast-usdc/src/cli/config.js | 1 - packages/fast-usdc/src/cli/transfer.js | 13 ++++++++++--- packages/fast-usdc/test/cli/transfer.test.ts | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/fast-usdc/src/cli/config.js b/packages/fast-usdc/src/cli/config.js index 2dd63fdad2d..2b67a4868a3 100644 --- a/packages/fast-usdc/src/cli/config.js +++ b/packages/fast-usdc/src/cli/config.js @@ -6,7 +6,6 @@ import { stdin as input, stdout as output } from 'node:process'; nobleSeed: string, ethSeed: string, nobleToAgoricChannel: string, - agoricRpc: string, nobleApi: string, nobleRpc: string, ethRpc: string, diff --git a/packages/fast-usdc/src/cli/transfer.js b/packages/fast-usdc/src/cli/transfer.js index f27004f5cc0..9120f93be0a 100644 --- a/packages/fast-usdc/src/cli/transfer.js +++ b/packages/fast-usdc/src/cli/transfer.js @@ -1,13 +1,18 @@ +/* eslint-env node */ /* global globalThis */ -import { makeVStorage } from '@agoric/client-utils'; +import { + fetchEnvNetworkConfig, + makeVStorage, + pickEndpoint, +} from '@agoric/client-utils'; +import { queryFastUSDCLocalChainAccount } from '../util/agoric.js'; import { depositForBurn, makeProvider } from '../util/cctp.js'; import { makeSigner, queryForwardingAccount, registerFwdAccount, } from '../util/noble.js'; -import { queryFastUSDCLocalChainAccount } from '../util/agoric.js'; /** @import { File } from '../util/file' */ /** @import { VStorage } from '@agoric/client-utils' */ @@ -23,13 +28,15 @@ const transfer = async ( /** @type {VStorage | undefined} */ vstorage, /** @type {{signer: SigningStargateClient, address: string} | undefined} */ nobleSigner, /** @type {ethProvider | undefined} */ ethProvider, + env = process.env, ) => { const execute = async ( /** @type {import('./config').ConfigOpts} */ config, ) => { + const netConfig = await fetchEnvNetworkConfig({ env, fetch }); vstorage ||= makeVStorage( { fetch }, - { chainName: 'agoric', rpcAddrs: [config.agoricRpc] }, + { chainName: 'agoric', rpcAddrs: [pickEndpoint(netConfig)] }, ); const agoricAddr = await queryFastUSDCLocalChainAccount(vstorage, out); const appendedAddr = `${agoricAddr}?EUD=${destination}`; diff --git a/packages/fast-usdc/test/cli/transfer.test.ts b/packages/fast-usdc/test/cli/transfer.test.ts index d820492c2ed..d3c319f1f6b 100644 --- a/packages/fast-usdc/test/cli/transfer.test.ts +++ b/packages/fast-usdc/test/cli/transfer.test.ts @@ -142,6 +142,7 @@ test('Transfer signs and broadcasts the depositForBurn message on Ethereum', asy vstorageMock.vstorage, { signer: signerMock.signer, address: nobleSignerAddress }, mockEthProvider.provider, + {}, ); t.is(signerMock.getSigned(), undefined); From 4c92dbbac7cc59895ae747ea7ca1c3b8480186dd Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 15:30:00 -0600 Subject: [PATCH 168/174] docs(fast-usdc): add cli help text re AGORIC_NET --- packages/fast-usdc/src/cli/cli.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/fast-usdc/src/cli/cli.js b/packages/fast-usdc/src/cli/cli.js index afaf1eadf9a..9488bf574c2 100644 --- a/packages/fast-usdc/src/cli/cli.js +++ b/packages/fast-usdc/src/cli/cli.js @@ -62,6 +62,19 @@ export const initProgram = ( return makeFile(getConfigPath(), readFile, writeFile, mkdir, exists); }; + program.addHelpText( + 'afterAll', + ` + Agoric test networks provide configuration info at, for example, + + https://devnet.agoric.net/network-config + + To use RPC endpoints from such a configuration, use: + export AGORIC_NET=devnet + + Use AGORIC_NET=local or leave it unset to use localhost and chain id agoriclocal. + `, + ); addConfigCommands(program, configHelpers, makeConfigFile); addOperatorCommands(program, { fetch, From 918eabee99e26754f7d3b0dde1c84fbae68113c2 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 3 Dec 2024 19:12:42 -0600 Subject: [PATCH 169/174] chore(fast-usdc): regen snapshots with AGORIC_NET docs --- .../test/cli/snapshots/cli.test.ts.md | 96 ++++++++++++++++-- .../test/cli/snapshots/cli.test.ts.snap | Bin 1557 -> 1731 bytes 2 files changed, 88 insertions(+), 8 deletions(-) diff --git a/packages/fast-usdc/test/cli/snapshots/cli.test.ts.md b/packages/fast-usdc/test/cli/snapshots/cli.test.ts.md index ed8f08e0f82..07607d1eab1 100644 --- a/packages/fast-usdc/test/cli/snapshots/cli.test.ts.md +++ b/packages/fast-usdc/test/cli/snapshots/cli.test.ts.md @@ -25,7 +25,17 @@ Generated by [AVA](https://avajs.dev). withdraw [options] Withdraw assets from the liquidity pool␊ transfer Transfer USDC from Ethereum/L2 to Cosmos via Fast␊ USDC␊ - help [command] display help for command` + help [command] display help for command␊ + ␊ + Agoric test networks provide configuration info at, for example,␊ + ␊ + https://devnet.agoric.net/network-config␊ + ␊ + To use RPC endpoints from such a configuration, use:␊ + export AGORIC_NET=devnet␊ + ␊ + Use AGORIC_NET=local or leave it unset to use localhost and chain id agoriclocal.␊ + ` ## shows help for transfer command @@ -40,7 +50,17 @@ Generated by [AVA](https://avajs.dev). dest Destination address in Cosmos␊ ␊ Options:␊ - -h, --help display help for command` + -h, --help display help for command␊ + ␊ + Agoric test networks provide configuration info at, for example,␊ + ␊ + https://devnet.agoric.net/network-config␊ + ␊ + To use RPC endpoints from such a configuration, use:␊ + export AGORIC_NET=devnet␊ + ␊ + Use AGORIC_NET=local or leave it unset to use localhost and chain id agoriclocal.␊ + ` ## shows help for config command @@ -57,7 +77,17 @@ Generated by [AVA](https://avajs.dev). show Show current config␊ init [options] Set initial config values␊ update [options] Update config values␊ - help [command] display help for command` + help [command] display help for command␊ + ␊ + Agoric test networks provide configuration info at, for example,␊ + ␊ + https://devnet.agoric.net/network-config␊ + ␊ + To use RPC endpoints from such a configuration, use:␊ + export AGORIC_NET=devnet␊ + ␊ + Use AGORIC_NET=local or leave it unset to use localhost and chain id agoriclocal.␊ + ` ## shows help for config init command @@ -93,7 +123,17 @@ Generated by [AVA](https://avajs.dev). "0xbd3fa81b58ba92a82136038b25adec7066af3155")␊ --token-contract-address [address] Address of USDC token contract (default:␊ "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48")␊ - -h, --help display help for command` + -h, --help display help for command␊ + ␊ + Agoric test networks provide configuration info at, for example,␊ + ␊ + https://devnet.agoric.net/network-config␊ + ␊ + To use RPC endpoints from such a configuration, use:␊ + export AGORIC_NET=devnet␊ + ␊ + Use AGORIC_NET=local or leave it unset to use localhost and chain id agoriclocal.␊ + ` ## shows help for config update command @@ -120,7 +160,17 @@ Generated by [AVA](https://avajs.dev). --noble-to-agoric-channel [channel] Channel ID on Noble for Agoric␊ --token-messenger-address [address] Address of TokenMessenger contract␊ --token-contract-address [address] Address of USDC token contract␊ - -h, --help display help for command` + -h, --help display help for command␊ + ␊ + Agoric test networks provide configuration info at, for example,␊ + ␊ + https://devnet.agoric.net/network-config␊ + ␊ + To use RPC endpoints from such a configuration, use:␊ + export AGORIC_NET=devnet␊ + ␊ + Use AGORIC_NET=local or leave it unset to use localhost and chain id agoriclocal.␊ + ` ## shows help for config show command @@ -131,7 +181,17 @@ Generated by [AVA](https://avajs.dev). Show current config␊ ␊ Options:␊ - -h, --help display help for command` + -h, --help display help for command␊ + ␊ + Agoric test networks provide configuration info at, for example,␊ + ␊ + https://devnet.agoric.net/network-config␊ + ␊ + To use RPC endpoints from such a configuration, use:␊ + export AGORIC_NET=devnet␊ + ␊ + Use AGORIC_NET=local or leave it unset to use localhost and chain id agoriclocal.␊ + ` ## shows help for deposit command @@ -147,7 +207,17 @@ Generated by [AVA](https://avajs.dev). Options:␊ --id [offer-id] Offer ID␊ --fee [fee] Cosmos fee␊ - -h, --help display help for command` + -h, --help display help for command␊ + ␊ + Agoric test networks provide configuration info at, for example,␊ + ␊ + https://devnet.agoric.net/network-config␊ + ␊ + To use RPC endpoints from such a configuration, use:␊ + export AGORIC_NET=devnet␊ + ␊ + Use AGORIC_NET=local or leave it unset to use localhost and chain id agoriclocal.␊ + ` ## shows help for withdraw command @@ -163,7 +233,17 @@ Generated by [AVA](https://avajs.dev). Options:␊ --id [offer-id] Offer ID␊ --fee [fee] Cosmos fee␊ - -h, --help display help for command` + -h, --help display help for command␊ + ␊ + Agoric test networks provide configuration info at, for example,␊ + ␊ + https://devnet.agoric.net/network-config␊ + ␊ + To use RPC endpoints from such a configuration, use:␊ + export AGORIC_NET=devnet␊ + ␊ + Use AGORIC_NET=local or leave it unset to use localhost and chain id agoriclocal.␊ + ` ## shows error when deposit command is run without options diff --git a/packages/fast-usdc/test/cli/snapshots/cli.test.ts.snap b/packages/fast-usdc/test/cli/snapshots/cli.test.ts.snap index 2150beaaf1008567472a39ea2e1411ad7bedd15b..2d0eac4dcb4aaa55da830deb8489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}XQyEKaVHp}M z#!`I@A-$GBjd4{c^{k3p)9d8sHD42W8}N)PAmE`(BNCe0ZzFf3w~`w^V%Z1R^5N9@ zkkJpdf(&W}j8(2Q;4vaZiBvE|AoF2QM$!9|fewwa4EC1-ax*$e0ngFF?rMJAxDd)= zIHhX0uoj+J$oCBLu?DVOC>7;uz_Vy?UeX|O>><(E0@W=xApc-KL@lk>C;VKwYrBpz?Ho5%+-)*F6 Hxf}oh{;Bw$ From f0447c5a4a90caffbd219a856c09be3a6b66ed47 Mon Sep 17 00:00:00 2001 From: samsiegart Date: Wed, 4 Dec 2024 12:57:21 -0800 Subject: [PATCH 170/174] test(fast-usdc): count computrons for advancement --- .../boot/test/fast-usdc/fast-usdc.test.ts | 43 ++++++++++++++++--- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/packages/boot/test/fast-usdc/fast-usdc.test.ts b/packages/boot/test/fast-usdc/fast-usdc.test.ts index 49da38cf01e..3a32ec972aa 100644 --- a/packages/boot/test/fast-usdc/fast-usdc.test.ts +++ b/packages/boot/test/fast-usdc/fast-usdc.test.ts @@ -14,12 +14,34 @@ import { makeWalletFactoryContext, type WalletFactoryTestContext, } from '../bootstrapTests/walletFactory.js'; +import { + makeSwingsetHarness, + insistManagerType, +} from '../../tools/supports.js'; + +const test: TestFn< + WalletFactoryTestContext & { + harness?: ReturnType; + } +> = anyTest; -const test: TestFn = anyTest; +const { + SLOGFILE: slogFile, + SWINGSET_WORKER_TYPE: defaultManagerType = 'local', +} = process.env; test.before('bootstrap', async t => { const config = '@agoric/vm-config/decentral-itest-orchestration-config.json'; - t.context = await makeWalletFactoryContext(t, config); + insistManagerType(defaultManagerType); + const harness = ['xs-worker', 'xsnap'].includes(defaultManagerType) + ? makeSwingsetHarness() + : undefined; + const ctx = await makeWalletFactoryContext(t, config, { + slogFile, + defaultManagerType, + harness, + }); + t.context = { ...ctx, harness }; }); test.after.always(t => t.context.shutdown?.()); @@ -129,7 +151,12 @@ test.serial('writes fee config to vstorage', async t => { }); test.serial('makes usdc advance', async t => { - const { walletFactoryDriver: wd, storage, agoricNamesRemotes } = t.context; + const { + walletFactoryDriver: wd, + storage, + agoricNamesRemotes, + harness, + } = t.context; const oracles = await Promise.all([ wd.provideSmartWallet('agoric19uscwxdac6cf6z7d5e26e0jm0lgwstc47cpll8'), wd.provideSmartWallet('agoric1krunjcqfrf7la48zrvdfeeqtls5r00ep68mzkr'), @@ -167,7 +194,8 @@ test.serial('makes usdc advance', async t => { await eventLoopIteration(); const evidence = MockCctpTxEvidences.AGORIC_PLUS_OSMO(); - // TODO - start counting computrons + + harness?.useRunPolicy(true); await Promise.all( oracles.map(wallet => wallet.sendOffer({ @@ -183,7 +211,12 @@ test.serial('makes usdc advance', async t => { ), ); await eventLoopIteration(); - // TODO - stop counting computrons + harness && + t.log( + `fusdc advance computrons (${oracles.length} oracles)`, + harness.totalComputronCount(), + ); + harness?.resetRunPolicy(); const doc = { node: `fastUsdc.status`, From db7d1e30b3ffa40987470b957e3b4120bc99522c Mon Sep 17 00:00:00 2001 From: samsiegart Date: Wed, 4 Dec 2024 13:52:27 -0800 Subject: [PATCH 171/174] chore: remove unused type imports --- packages/boot/test/fast-usdc/fast-usdc.test.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/boot/test/fast-usdc/fast-usdc.test.ts b/packages/boot/test/fast-usdc/fast-usdc.test.ts index 3a32ec972aa..d01a564e49c 100644 --- a/packages/boot/test/fast-usdc/fast-usdc.test.ts +++ b/packages/boot/test/fast-usdc/fast-usdc.test.ts @@ -1,8 +1,6 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import type { TestFn } from 'ava'; -import type { FastUSDCKit } from '@agoric/fast-usdc/src/fast-usdc.start.js'; -import type { CctpTxEvidence } from '@agoric/fast-usdc/src/types.js'; import { MockCctpTxEvidences } from '@agoric/fast-usdc/test/fixtures.js'; import { documentStorageSchema } from '@agoric/governance/tools/storageDoc.js'; import { Fail } from '@endo/errors'; From 39d3796fc4da920c4a2d8738b3443203bd90b0ed Mon Sep 17 00:00:00 2001 From: samsiegart Date: Wed, 4 Dec 2024 13:56:21 -0800 Subject: [PATCH 172/174] ci: fast-usdc bootstrap tests in xs --- packages/boot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/boot/package.json b/packages/boot/package.json index 5cf0ad71e72..903d2c31a8b 100644 --- a/packages/boot/package.json +++ b/packages/boot/package.json @@ -9,7 +9,7 @@ "build": "exit 0", "clean": "rm -rf bundles/config.*", "test": "ava", - "test:xs": "SWINGSET_WORKER_TYPE=xs-worker ava test/bootstrapTests test/upgrading", + "test:xs": "SWINGSET_WORKER_TYPE=xs-worker ava test/bootstrapTests test/upgrading test/fast-usdc", "lint-fix": "yarn lint:eslint --fix", "lint": "run-s --continue-on-error lint:*", "lint:types": "tsc", From e596a010f6b0885db9f8a8aa1cc4cb2f232e8f91 Mon Sep 17 00:00:00 2001 From: Chris Hibbert Date: Wed, 4 Dec 2024 15:44:22 -0800 Subject: [PATCH 173/174] don't reschedule auction's price notifier if we already have one (#10615) ## Description It was observed, after applying upgrade 18 to EmeryNet, that a whole slew of promises resolved when a price was provided. The current belief is that `observeQuoteNotifier` will be called every auction round until a price is available, and that creates a new observer with each call that wait until a price is published, and then they all continue waiting for each successive update. This change adds an interlock, so if there's already a notifier waiting, we don't add a new one. ### Security Considerations No security implication. ### Scaling Considerations Processing about 19000 actions waiting on a notifier in EmeryNet took several hours. If we're correct that the notifiers will continue to cycle, we expect to see a similar wait for each price update on that currency. That's unsustainable. The only current theory about dropping all those actions waiting for notifiers is to kill the vat. We can't kill the priceAuthority vats that hold the notifiers, but we might be able to cleanly kill the abandoned auctioneers. ### Documentation Considerations Not needed. ### Testing Considerations Tough to test in unit tests. It's conceivable that we could recreate the situation in `a3p-integration`, though it would be hard to observe the results. ### Upgrade Considerations We probably shouldn't ship upgrade 18 with something to address this problem. --- .../inter-protocol/src/auction/auctionBook.js | 74 ++++++++++++------- 1 file changed, 49 insertions(+), 25 deletions(-) diff --git a/packages/inter-protocol/src/auction/auctionBook.js b/packages/inter-protocol/src/auction/auctionBook.js index 998cafd3eb5..a40c813b21f 100644 --- a/packages/inter-protocol/src/auction/auctionBook.js +++ b/packages/inter-protocol/src/auction/auctionBook.js @@ -118,6 +118,8 @@ export const makeOfferSpecShape = (bidBrand, collateralBrand) => { export const prepareAuctionBook = (baggage, zcf, makeRecorderKit) => { const makeScaledBidBook = prepareScaledBidBook(baggage); const makePriceBook = preparePriceBook(baggage); + // Brands that have or are making active quoteNotifier Observers + const observedBrands = new Set(); const AuctionBookStateShape = harden({ collateralBrand: M.any(), @@ -454,38 +456,59 @@ export const prepareAuctionBook = (baggage, zcf, makeRecorderKit) => { }); return state.bookDataKit.recorder.write(bookData); }, - observeQuoteNotifier() { + // Ensure that there is an observer monitoring the quoteNotifier. We + // assume that all failure modes for quoteNotifier eventually lead to + // fail or finish. + ensureQuoteNotifierObserved() { const { state, facets } = this; const { collateralBrand, bidBrand, priceAuthority } = state; + if (observedBrands.has(collateralBrand)) { + return; + } + observedBrands.add(collateralBrand); trace('observing'); - const quoteNotifier = E(priceAuthority).makeQuoteNotifier( + const quoteNotifierP = E(priceAuthority).makeQuoteNotifier( AmountMath.make(collateralBrand, QUOTE_SCALE), bidBrand, ); - void observeNotifier(quoteNotifier, { - updateState: quote => { - trace( - `BOOK notifier ${priceFrom(quote).numerator.value}/${ - priceFrom(quote).denominator.value - }`, - ); - state.updatingOracleQuote = priceFrom(quote); - }, - fail: reason => { - trace(`Failure from quoteNotifier (${reason}) setting to null`); - // lack of quote will trigger restart - state.updatingOracleQuote = null; - }, - finish: done => { - trace( - `quoteNotifier invoked finish(${done}). setting quote to null`, - ); - // lack of quote will trigger restart + + void E.when( + quoteNotifierP, + quoteNotifier => + observeNotifier(quoteNotifier, { + updateState: quote => { + trace( + `BOOK notifier ${priceFrom(quote).numerator.value}/${ + priceFrom(quote).denominator.value + }`, + ); + state.updatingOracleQuote = priceFrom(quote); + }, + fail: reason => { + trace( + `Failure from quoteNotifier (${reason}) setting to null`, + ); + // lack of quote will trigger restart + state.updatingOracleQuote = null; + observedBrands.delete(collateralBrand); + }, + finish: done => { + trace( + `quoteNotifier invoked finish(${done}). setting quote to null`, + ); + // lack of quote will trigger restart + state.updatingOracleQuote = null; + observedBrands.delete(collateralBrand); + }, + }), + e => { + trace('makeQuoteNotifier failed, resetting', e); state.updatingOracleQuote = null; + observedBrands.delete(collateralBrand); }, - }); + ); void facets.helper.publishBookData(); }, @@ -645,8 +668,9 @@ export const prepareAuctionBook = (baggage, zcf, makeRecorderKit) => { trace(`capturing oracle price `, state.updatingOracleQuote); if (!state.updatingOracleQuote) { - // if the price has feed has died, try restarting it. - facets.helper.observeQuoteNotifier(); + // if the price feed has died (or hasn't been started for this + // incarnation), (re)start it. + facets.helper.ensureQuoteNotifierObserved(); return; } @@ -750,7 +774,7 @@ export const prepareAuctionBook = (baggage, zcf, makeRecorderKit) => { const { collateralBrand, bidBrand, priceAuthority } = state; assertAllDefined({ collateralBrand, bidBrand, priceAuthority }); - facets.helper.observeQuoteNotifier(); + facets.helper.ensureQuoteNotifierObserved(); }, stateShape: AuctionBookStateShape, }, From ebbfa7356f771febe27d7b0707bbe4d0831799e5 Mon Sep 17 00:00:00 2001 From: Ikenna Omekam Date: Fri, 6 Dec 2024 12:03:50 -0500 Subject: [PATCH 174/174] WIP: push up proposal and attempts at a test --- .../addCollateral/add-collateral-permit.json | 7 + .../addCollateral/add-collateral.js | 45 +++++ .../p:upgrade-19/assetReserve.test.js | 186 ++++++++++++++++++ .../p:upgrade-19/upgradeAssetReserve.test.js | 15 ++ .../scripts/vats/upgrade-asset-reserve.js | 21 ++ packages/vats/src/core/startWalletFactory.js | 2 +- .../upgrade-asset-reserve-proposal.js | 74 +++++++ 7 files changed, 349 insertions(+), 1 deletion(-) create mode 100644 a3p-integration/proposals/p:upgrade-19/addCollateral/add-collateral-permit.json create mode 100644 a3p-integration/proposals/p:upgrade-19/addCollateral/add-collateral.js create mode 100644 a3p-integration/proposals/p:upgrade-19/assetReserve.test.js create mode 100644 a3p-integration/proposals/p:upgrade-19/upgradeAssetReserve.test.js create mode 100644 packages/builders/scripts/vats/upgrade-asset-reserve.js create mode 100644 packages/vats/src/proposals/upgrade-asset-reserve-proposal.js diff --git a/a3p-integration/proposals/p:upgrade-19/addCollateral/add-collateral-permit.json b/a3p-integration/proposals/p:upgrade-19/addCollateral/add-collateral-permit.json new file mode 100644 index 00000000000..e65238594ea --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/addCollateral/add-collateral-permit.json @@ -0,0 +1,7 @@ +{ + "consume": { + "reserveKit": true, + "namesByAddressAdmin": true, + "agoricNames": true + } +} diff --git a/a3p-integration/proposals/p:upgrade-19/addCollateral/add-collateral.js b/a3p-integration/proposals/p:upgrade-19/addCollateral/add-collateral.js new file mode 100644 index 00000000000..e485d3caae3 --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/addCollateral/add-collateral.js @@ -0,0 +1,45 @@ +// @ts-nocheck +/* eslint-disable no-undef */ +const PROVISIONING_POOL_ADDR = 'agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346'; + +const addCollateral = async powers => { + const { + consume: { + reserveKit: reserveKitP, + namesByAddressAdmin: namesByAddressAdminP, + agoricNames, + }, + } = powers; + + const namesByAddressAdmin = await namesByAddressAdminP; + + const getDepositFacet = async address => { + const hub = E(E(namesByAddressAdmin).lookupAdmin(address)).readonly(); + return E(hub).lookup('depositFacet'); + }; + + const [reserveKit] = await Promise.all([reserveKitP]); + + const { adminFacet, instance } = reserveKit; + + let usdLemonsMint; + for (const { publicFacet, creatorFacet: mint } of contractKits.values()) { + if (publicFacet === usdLemonsIssuer) { + usdLemonsMint = mint; + console.log('BINGO', mint); + break; + } + } + + console.log('Minting USD_LEMONS'); + const helloPayment = await E(usdLemonsMint).mintPayment( + harden({ brand: usdLemonsBrand, value: 500000n }), + ); + + console.log('Funding provision pool...'); + await E(ppDepositFacet).receive(helloPayment); + + console.log('Done.'); +}; + +addCollateral; diff --git a/a3p-integration/proposals/p:upgrade-19/assetReserve.test.js b/a3p-integration/proposals/p:upgrade-19/assetReserve.test.js new file mode 100644 index 00000000000..12934603921 --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/assetReserve.test.js @@ -0,0 +1,186 @@ +/* eslint-env node */ +/** + * @file The goal of this file is to make sure v28-provisionPool and v14-bank can be successfully + * upgraded. These vats are related because of the issues below; + * - https://github.com/Agoric/agoric-sdk/issues/8722 + * - https://github.com/Agoric/agoric-sdk/issues/8724 + * + * The test scenario is as follows; + * 1. Upgrade provisionPool. This upgrade overrides provisionWalletBridgerManager with a durable one + * 2. Add a new account and successfully provision it + * - Observe new account's address under `published.wallet.${address}` + * 3. Send some USDC_axl to provisionPoolAddress and observe its IST balances increases accordingly + * 4. Introduce a new asset to the chain and start a PSM instance for the new asset + * 4a. Deposit some of that asset to provisionPoolAddress + * 4b. Observe provisionPoolAddress' IST balance increase by the amount deposited in step 4a + * 5. Perform a null upgrade for provisionPool. This upgrade does NOT override provisionWalletBridgerManager + * - The goal here is to allow testing the bridgeHandler from the first upgrade is in fact durable + * 6. Auto provision + * 6a. Introduce a new account + * 6b. Fund it with IST and ATOM to be able to open a vault + * 6c. Try to open a vault WITHOUT provisioning the newly introduced account + * 6d. Observe the new account's address under `published.wallet` + * 7. Same as step 2. Checks manual provision works after null upgrade + */ + +import '@endo/init'; +import test from 'ava'; +import { + addUser, + evalBundles, + agd as agdAmbient, + agoric, + getISTBalance, + getDetailsMatchingVats, + GOV1ADDR, + openVault, + ATOM_DENOM, +} from '@agoric/synthetic-chain'; +import { + makeVstorageKit, + waitUntilAccountFunded, + waitUntilContractDeployed, +} from '@agoric/client-utils'; +import { NonNullish } from '@agoric/internal'; +import { + bankSend, + checkUserProvisioned, + introduceAndProvision, + provision, +} from './test-lib/provision-helpers.js'; + +const PROVISIONING_POOL_ADDR = 'agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346'; + +const ADD_PSM_DIR = 'addUsdLemons'; +const DEPOSIT_USD_LEMONS_DIR = 'depositUSD-LEMONS'; +const UPGRADE_PP_DIR = 'upgradeProvisionPool'; +const NULL_UPGRADE_PP_DIR = 'nullUpgradePP'; + +const USDC_DENOM = NonNullish(process.env.USDC_DENOM); + +const ambientAuthority = { + query: agdAmbient.query, + follow: agoric.follow, + setTimeout, + log: console.log, +}; + +test.before(async t => { + const vstorageKit = await makeVstorageKit( + { fetch }, + { rpcAddrs: ['http://localhost:26657'], chainName: 'agoriclocal' }, + ); + + t.context = { + vstorageKit, + }; +}); + +test.serial('upgrade provisionPool', async t => { + await evalBundles(UPGRADE_PP_DIR); + + const vatDetailsAfter = await getDetailsMatchingVats('provisionPool'); + const { incarnation } = vatDetailsAfter.find(vat => + vat.vatName.endsWith('provisionPool'), + ); + + t.log(vatDetailsAfter); + t.is(incarnation, 1, 'incorrect incarnation'); + t.pass(); +}); + +test.serial( + `check provisionPool can recover purse and asset subscribers after upgrade`, + async t => { + // @ts-expect-error casting + const { vstorageKit } = t.context; + + // Introduce new user then provision + const { address } = await introduceAndProvision('provisionTester'); + await checkUserProvisioned(address, vstorageKit); + + // Send USDC_axl to pp + const istBalanceBefore = await getISTBalance(PROVISIONING_POOL_ADDR); + await bankSend(PROVISIONING_POOL_ADDR, `500000${USDC_DENOM}`); + + // Check IST balance + await waitUntilAccountFunded( + PROVISIONING_POOL_ADDR, + ambientAuthority, + { denom: 'uist', value: istBalanceBefore + 500000 }, + { errorMessage: 'Provision pool not able to swap USDC_axl for IST.' }, + ); + + // Introduce USD_LEMONS + await evalBundles(ADD_PSM_DIR); + await waitUntilContractDeployed('psm-IST-USD_LEMONS', ambientAuthority, { + errorMessage: 'psm-IST-USD_LEMONS instance not observed.', + }); + + // Provision the provisionPoolAddress. This is a workaround of provisionPoolAddress + // not having a depositFacet published to namesByAddress. Shouldn't be a problem since + // vat-bank keeps track of virtual purses per address basis. We need there to be + // depositFacet for provisionPoolAddress since we'll fund it with USD_LEMONS + await provision('provisionPoolAddress', PROVISIONING_POOL_ADDR); + await checkUserProvisioned(PROVISIONING_POOL_ADDR, vstorageKit); + + // Send USD_LEMONS to provisionPoolAddress + const istBalanceBeforeLemonsSent = await getISTBalance( + PROVISIONING_POOL_ADDR, + ); + await evalBundles(DEPOSIT_USD_LEMONS_DIR); + + // Check balance again + await waitUntilAccountFunded( + PROVISIONING_POOL_ADDR, + ambientAuthority, + { denom: 'uist', value: istBalanceBeforeLemonsSent + 500000 }, + { errorMessage: 'Provision pool not able to swap USDC_axl for IST.' }, + ); + t.pass(); + }, +); + +test.serial('null upgrade', async t => { + await evalBundles(NULL_UPGRADE_PP_DIR); + + const vatDetailsAfter = await getDetailsMatchingVats('provisionPool'); + const { incarnation } = vatDetailsAfter.find(vat => vat.vatID === 'v28'); // provisionPool is v28 + + t.log(vatDetailsAfter); + t.is(incarnation, 2, 'incorrect incarnation'); + t.pass(); +}); + +test.serial('auto provision', async t => { + // @ts-expect-error casting + const { vstorageKit } = t.context; + + const address = await addUser('automaticallyProvisioned'); + console.log('ADDR', 'automaticallyProvisioned', address); + + await bankSend(address, `50000000${ATOM_DENOM}`); + // some ist is needed for opening a new vault + await bankSend(address, `10000000uist`, GOV1ADDR); + await waitUntilAccountFunded( + address, + // TODO: drop agd.query and switch to vstorgeKit + { log: console.log, setTimeout, query: agdAmbient.query }, + { denom: ATOM_DENOM, value: 50_000_000 }, + { errorMessage: `not able to fund ${address}` }, + ); + + await openVault(address, '10.0', '20.0'); + await checkUserProvisioned(address, vstorageKit); + t.pass(); +}); + +test.serial('manual provision', async t => { + // @ts-expect-error casting + const { vstorageKit } = t.context; + + const { address } = await introduceAndProvision('manuallyProvisioned'); + await checkUserProvisioned(address, vstorageKit); + t.log('manuallyProvisioned address:', address); + t.pass(); +}); diff --git a/a3p-integration/proposals/p:upgrade-19/upgradeAssetReserve.test.js b/a3p-integration/proposals/p:upgrade-19/upgradeAssetReserve.test.js new file mode 100644 index 00000000000..c72b130c7f3 --- /dev/null +++ b/a3p-integration/proposals/p:upgrade-19/upgradeAssetReserve.test.js @@ -0,0 +1,15 @@ +/* eslint-env node */ +// @ts-check + +/** @file test that the upgraded board can store and retrieve values. */ + +import '@endo/init/legacy.js'; +import test from 'ava'; +import { evalBundles } from '@agoric/synthetic-chain'; + +test('test upgraded board', async t => { + // agoricProposal.sdk-generate in package.json generates this proposal + await evalBundles('testUpgradedBoard'); + + t.pass(); +}); diff --git a/packages/builders/scripts/vats/upgrade-asset-reserve.js b/packages/builders/scripts/vats/upgrade-asset-reserve.js new file mode 100644 index 00000000000..b7d70d8e205 --- /dev/null +++ b/packages/builders/scripts/vats/upgrade-asset-reserve.js @@ -0,0 +1,21 @@ +import { makeHelpers } from '@agoric/deploy-script-support'; + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ +export const defaultProposalBuilder = async ({ publishRef, install }) => + harden({ + sourceSpec: '@agoric/vats/src/proposals/upgrade-asset-reserve-proposal.js', + getManifestCall: [ + 'getManifestForUpgradingAssetReserve', + { + assetReserveRef: publishRef( + install('@agoric/inter-protocol/src/reserve/assetReserve.js'), + ), + }, + ], + }); + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ +export default async (homeP, endowments) => { + const { writeCoreProposal } = await makeHelpers(homeP, endowments); + await writeCoreProposal('upgrade-asset-reserve', defaultProposalBuilder); +}; diff --git a/packages/vats/src/core/startWalletFactory.js b/packages/vats/src/core/startWalletFactory.js index a8009a19534..44dc7fd5ec5 100644 --- a/packages/vats/src/core/startWalletFactory.js +++ b/packages/vats/src/core/startWalletFactory.js @@ -198,7 +198,7 @@ export const startWalletFactory = async ( }, }); provisionPoolStartResult.resolve(ppFacets); - instanceProduce.provisionPool.resolve(ppFacets.instance); + instanceProduce.reserve. .provisionPool.resolve(ppFacets.instance); const terms = await deeplyFulfilled( harden({ diff --git a/packages/vats/src/proposals/upgrade-asset-reserve-proposal.js b/packages/vats/src/proposals/upgrade-asset-reserve-proposal.js new file mode 100644 index 00000000000..e105792a53d --- /dev/null +++ b/packages/vats/src/proposals/upgrade-asset-reserve-proposal.js @@ -0,0 +1,74 @@ +import { E } from '@endo/far'; +import { deeplyFulfilled } from '@endo/marshal'; +import { makeTracer } from '@agoric/internal'; + +const tracer = makeTracer('UpgradeAssetReserve'); + +/** + * @param {BootstrapPowers & { + * consume: { + * economicCommitteeCreatorFacet: any; + * reserveKit: any; + * }; + * }} powers + * @param {object} options + * @param {{ assetReserveRef: VatSourceRef }} options.options + */ +export const upgradeAssetReserve = async ( + { + consume: { + economicCommitteeCreatorFacet: electorateCreatorFacet, + reserveKit: reserveKitP, + instancePrivateArgs: instancePrivateArgsP, + }, + }, + options, +) => { + const { assetReserveRef } = options.options; + + assert(assetReserveRef.bundleID); + tracer(`ASSET RESERBE BUNDLE ID: `, assetReserveRef); + + const [reserveKit, instancePrivateArgs] = await Promise.all([ + reserveKitP, + instancePrivateArgsP, + ]); + const { adminFacet, instance } = reserveKit; + + const [originalPrivateArgs, poserInvitation] = await Promise.all([ + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore Local tsc sees this as an error but typedoc does not + deeplyFulfilled(instancePrivateArgs.get(instance)), + E(electorateCreatorFacet).getPoserInvitation(), + ]); + + const newPrivateArgs = harden({ + ...originalPrivateArgs, + initialPoserInvitation: poserInvitation, + }); + + const upgradeResult = await E(adminFacet).upgradeContract( + assetReserveRef.bundleID, + newPrivateArgs, + ); + + tracer('AssetReserve upgraded: ', upgradeResult); + tracer('Done.'); +}; + +export const getManifestForUpgradingAssetReserve = ( + _powers, + { assetReserveRef }, +) => ({ + manifest: { + [upgradeAssetReserve.name]: { + consume: { + economicCommitteeCreatorFacet: true, + instancePrivateArgs: true, + reserveKit: true, + }, + produce: {}, + }, + }, + options: { assetReserveRef }, +});