diff --git a/multichain-testing/scripts/fast-usdc-tool.ts b/multichain-testing/scripts/fast-usdc-tool.ts index 2a927777f4a..db51c913a05 100755 --- a/multichain-testing/scripts/fast-usdc-tool.ts +++ b/multichain-testing/scripts/fast-usdc-tool.ts @@ -8,7 +8,6 @@ import type { ExecutionContext } from 'ava'; import { encodeAddressHook } from '@agoric/cosmic-proto/address-hooks.js'; import { AmountMath, type Brand } from '@agoric/ertp'; import type { USDCProposalShapes } from '@agoric/fast-usdc/src/pool-share-math.js'; -import type { PoolMetrics } from '@agoric/fast-usdc/src/types.js'; import { divideBy } from '@agoric/zoe/src/contractSupport/ratio.js'; import { makeDenomTools } from '../tools/asset-info.js'; import { makeDoOffer } from '../tools/e2e-tools.js'; @@ -17,6 +16,7 @@ import { makeFeedPolicyPartial, oracleMnemonics, } from '../test/fast-usdc/config.js'; +import { agoricNamesQ, fastLPQ } from '../test/fast-usdc/fu-actors.js'; const USAGE = ` Usage: @@ -55,27 +55,6 @@ const runT = { }, } as ExecutionContext; -// from ../test/fast-usdc/fast-usdc.test.ts -type VStorageClient = Awaited>['vstorageClient']; -const agoricNamesQ = (vsc: VStorageClient) => - harden({ - brands: (_assetKind: K) => - vsc - .queryData('published.agoricNames.brand') - .then(pairs => Object.fromEntries(pairs) as Record>), - }); - -const fastLPQ = (vsc: VStorageClient) => - harden({ - metrics: () => - vsc.queryData(`published.fastUsdc.poolMetrics`) as Promise, - info: () => - vsc.queryData(`published.${contractName}`) as Promise<{ - poolAccount: string; - settlementAccount: string; - }>, - }); - const parseCommandLine = () => { const { values, positionals } = parseArgs({ options: {