diff --git a/packages/fast-usdc/src/fast-usdc.contract.js b/packages/fast-usdc/src/fast-usdc.contract.js index 92600586acc..9a11282ad8d 100644 --- a/packages/fast-usdc/src/fast-usdc.contract.js +++ b/packages/fast-usdc/src/fast-usdc.contract.js @@ -53,10 +53,11 @@ export const meta = { privateArgsShape: { // @ts-expect-error TypedPattern not recognized as record ...OrchestrationPowersShape, + assetInfo: M.arrayOf([DenomShape, DenomDetailShape]), + chainInfo: M.recordOf(M.string(), CosmosChainInfoShape), feeConfig: FeeConfigShape, marshaller: M.remotable(), - chainInfo: M.recordOf(M.string(), CosmosChainInfoShape), - assetInfo: M.arrayOf([DenomShape, DenomDetailShape]), + poolMetricsNode: M.remotable(), }, }; harden(meta); @@ -86,10 +87,11 @@ const publishAddresses = (contractNode, addresses) => { /** * @param {ZCF} zcf * @param {OrchestrationPowers & { - * marshaller: Marshaller; - * feeConfig: FeeConfig; - * chainInfo: Record; * assetInfo: [Denom, DenomDetail & { brandKey?: string}][]; + * chainInfo: Record; + * feeConfig: FeeConfig; + * marshaller: Marshaller; + * poolMetricsNode: Remote; * }} privateArgs * @param {Zone} zone * @param {OrchestrationTools} tools @@ -237,7 +239,7 @@ export const contract = async (zcf, privateArgs, zone, tools) => { ); const poolKit = zone.makeOnce('Liquidity Pool kit', () => - makeLiquidityPoolKit(shareMint, privateArgs.storageNode), + makeLiquidityPoolKit(shareMint, privateArgs.poolMetricsNode), ); /** Chain, connection, and asset info can only be registered once */ diff --git a/packages/fast-usdc/src/fast-usdc.start.js b/packages/fast-usdc/src/fast-usdc.start.js index f940e403865..070025a6c5e 100644 --- a/packages/fast-usdc/src/fast-usdc.start.js +++ b/packages/fast-usdc/src/fast-usdc.start.js @@ -78,6 +78,7 @@ const publishDisplayInfo = async (brand, { board, chainStorage }) => { }; const FEED_POLICY = 'feedPolicy'; +const POOL_METRICS = 'poolMetrics'; /** * @param {ERef} node @@ -175,6 +176,7 @@ export const startFastUSDC = async ( chainStorage, }, ); + const poolMetricsNode = await E(storageNode).makeChildNode(POOL_METRICS); const privateArgs = await deeplyFulfilledObject( harden({ @@ -182,6 +184,7 @@ export const startFastUSDC = async ( feeConfig, localchain, orchestrationService: cosmosInterchainService, + poolMetricsNode, storageNode, timerService, marshaller, diff --git a/packages/fast-usdc/test/supports.ts b/packages/fast-usdc/test/supports.ts index 7a64bcf2ff2..7106b0e948a 100644 --- a/packages/fast-usdc/test/supports.ts +++ b/packages/fast-usdc/test/supports.ts @@ -233,6 +233,7 @@ export const commonSetup = async (t: ExecutionContext) => { localchain, orchestrationService: cosmosInterchainService, storageNode: storage.rootNode, + poolMetricsNode: storage.rootNode.makeChildNode('poolMetrics'), marshaller, timerService: timer, feeConfig: makeTestFeeConfig(usdc),