From 84b118cb0716c4901ad825dc73ed142058c7601f Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Thu, 27 Feb 2025 18:13:27 -0600 Subject: [PATCH] test(boot): snapshot GTM Fast USDC feed policy --- .../boot/test/fast-usdc/fast-usdc.test.ts | 66 ++++---- .../fast-usdc/snapshots/fast-usdc.test.ts.md | 151 +++++++++--------- .../snapshots/fast-usdc.test.ts.snap | Bin 3133 -> 3143 bytes 3 files changed, 109 insertions(+), 108 deletions(-) diff --git a/packages/boot/test/fast-usdc/fast-usdc.test.ts b/packages/boot/test/fast-usdc/fast-usdc.test.ts index e69b5a65204..43c0970ff39 100644 --- a/packages/boot/test/fast-usdc/fast-usdc.test.ts +++ b/packages/boot/test/fast-usdc/fast-usdc.test.ts @@ -241,39 +241,6 @@ test.serial( }, ); -test.serial('writes feed policy to vstorage', async t => { - const { storage } = t.context; - const opts = { - node: 'fastUsdc.feedPolicy', - owner: 'the general and chain-specific policies for the Fast USDC feed', - showValue: defaultSerializer.parse, - }; - await documentStorageSchema(t, storage, opts); -}); - -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', - showValue: defaultSerializer.parse, - }; - await documentStorageSchema(t, storage, doc); -}); - -test.serial('writes account addresses to vstorage', async t => { - const { storage } = t.context; - const doc = { - node: 'fastUsdc', - showValue: JSON.parse, - pattern: /published\.fastUsdc\.(feeConfig|feedPolicy|poolMetrics)/, - replacement: '', - note: 'Under "published", the "fastUsdc" node is delegated to FastUSDC contract.', - }; - - await documentStorageSchema(t, storage, doc); -}); - test.serial('LP deposits', async t => { const { walletFactoryDriver: wfd, agoricNamesRemotes } = t.context; const lp = await wfd.provideSmartWallet( @@ -402,6 +369,39 @@ test.serial('upgrade; update noble ICA', async t => { ); }); +test.serial('writes GTM feed policy to vstorage', async t => { + const { storage } = t.context; + const opts = { + node: 'fastUsdc.feedPolicy', + owner: 'the general and chain-specific policies for the Fast USDC feed', + showValue: defaultSerializer.parse, + }; + await documentStorageSchema(t, storage, opts); +}); + +test.serial('writes GTM fee config to vstorage', async t => { + const { storage } = t.context; + const doc = { + node: 'fastUsdc.feeConfig', + owner: 'the fee configuration for Fast USDC', + showValue: defaultSerializer.parse, + }; + await documentStorageSchema(t, storage, doc); +}); + +test.serial('writes GTM account addresses to vstorage', async t => { + const { storage } = t.context; + const doc = { + node: 'fastUsdc', + showValue: JSON.parse, + pattern: /published\.fastUsdc\.(feeConfig|feedPolicy|poolMetrics)/, + replacement: '', + note: 'Under "published", the "fastUsdc" node is delegated to FastUSDC contract.', + }; + + await documentStorageSchema(t, storage, doc); +}); + test.serial('makes usdc advance', async t => { const { walletFactoryDriver: wfd, 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 2ba67ee1ec3..de75061f080 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 @@ -4,7 +4,62 @@ The actual snapshot is saved in `fast-usdc.test.ts.snap`. Generated by [AVA](https://avajs.dev). -## writes feed policy to vstorage +## upgrade; update noble ICA + +> Under "published", the "fastUsdc" node is delegated to Fast USDC. +> The example below illustrates the schema of the data published there. +> +> See also board marshalling conventions (_to appear_). + + [ + [ + 'published.fastUsdc', + { + nobleICA: 'noble1test1', + poolAccount: 'agoric1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqp7zqht', + settlementAccount: 'agoric1qyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqc09z0g', + }, + ], + ] + +> feeConfig: 0.01USDC flat, 0.5% variable, 20% contract cut +> The example below illustrates the schema of the data published there. +> +> See also board marshalling conventions (_to appear_). + + [ + [ + 'published.fastUsdc.feeConfig', + { + 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, + }, + variableRate: { + denominator: { + brand: Object @Alleged: USDC brand {}, + value: 100n, + }, + numerator: { + brand: Object @Alleged: USDC brand {}, + value: 1n, + }, + }, + }, + ], + ] + +## writes GTM 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. @@ -22,11 +77,11 @@ Generated by [AVA](https://avajs.dev). ], cctpTokenMessengerAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', chainId: 42161, - confirmations: 2, + confirmations: 96, rateLimits: { - blockWindow: 20000000000n, - blockWindowSize: 10, - tx: 10000000000n, + blockWindow: 50000000000n, + blockWindowSize: 480, + tx: 20000000000n, }, }, Base: { @@ -35,11 +90,11 @@ Generated by [AVA](https://avajs.dev). ], cctpTokenMessengerAddress: '0x1682Ae6375C4E4A97e4B583BC394c861A46D8962', chainId: 8453, - confirmations: 2, + confirmations: 12, rateLimits: { - blockWindow: 20000000000n, - blockWindowSize: 10, - tx: 10000000000n, + blockWindow: 50000000000n, + blockWindowSize: 60, + tx: 20000000000n, }, }, Ethereum: { @@ -50,9 +105,9 @@ Generated by [AVA](https://avajs.dev). chainId: 1, confirmations: 2, rateLimits: { - blockWindow: 20000000000n, + blockWindow: 50000000000n, blockWindowSize: 10, - tx: 10000000000n, + tx: 20000000000n, }, }, Optimism: { @@ -61,11 +116,11 @@ Generated by [AVA](https://avajs.dev). ], cctpTokenMessengerAddress: '0x2B4069517957735bE00ceE0fadAE88a26365528f', chainId: 10, - confirmations: 2, + confirmations: 12, rateLimits: { - blockWindow: 20000000000n, - blockWindowSize: 10, - tx: 10000000000n, + blockWindow: 50000000000n, + blockWindowSize: 60, + tx: 20000000000n, }, }, Polygon: { @@ -74,11 +129,11 @@ Generated by [AVA](https://avajs.dev). ], cctpTokenMessengerAddress: '0x9daF8c91AEFAE50b9c0E69629D3F6Ca40cA3B3FE', chainId: 137, - confirmations: 2, + confirmations: 12, rateLimits: { - blockWindow: 20000000000n, - blockWindowSize: 10, - tx: 10000000000n, + blockWindow: 50000000000n, + blockWindowSize: 60, + tx: 20000000000n, }, }, }, @@ -89,7 +144,7 @@ Generated by [AVA](https://avajs.dev). ], ] -## writes fee config to vstorage +## writes GTM 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. @@ -128,28 +183,11 @@ Generated by [AVA](https://avajs.dev). ], ] -## writes account addresses to vstorage +## writes GTM account addresses to vstorage > Under "published", the "fastUsdc" node is delegated to FastUSDC contract. > The example below illustrates the schema of the data published there. > -> See also board marshalling conventions (_to appear_). - - [ - [ - 'published.fastUsdc', - { - poolAccount: 'agoric1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqp7zqht', - settlementAccount: 'agoric1qyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqc09z0g', - }, - ], - ] - -## upgrade; update noble ICA - -> Under "published", the "fastUsdc" node is delegated to Fast USDC. -> The example below illustrates the schema of the data published there. -> > See also board marshalling conventions (_to appear_). [ @@ -163,43 +201,6 @@ Generated by [AVA](https://avajs.dev). ], ] -> feeConfig: 0.01USDC flat, 0.5% variable, 20% contract cut -> The example below illustrates the schema of the data published there. -> -> See also board marshalling conventions (_to appear_). - - [ - [ - 'published.fastUsdc.feeConfig', - { - 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, - }, - variableRate: { - denominator: { - brand: Object @Alleged: USDC brand {}, - value: 100n, - }, - numerator: { - brand: Object @Alleged: USDC brand {}, - value: 1n, - }, - }, - }, - ], - ] - ## makes usdc advance > Under "published", the "fastUsdc.txns" node is delegated to the Ethereum transactions upon which Fast USDC is acting. 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 6e927118c1fed90f3f482d5e7bd742ea745dbf85..6a732ea5a1a87b71796edaf072946ebff683e408 100644 GIT binary patch literal 3143 zcmV-N47l?_RzV!7x! zmA0Uw*5A(j_HO9j%rZ0E-a#S{9})l1K%#k|pHAE)&lH90Ksg7$X;Fp`Xw$Xyqx=xRuZrtc^h zyEn4o4asMoFU4rHO~+{z4Z~^Ke)ryXI_J2SAzeM<)68FU^}HVwxWQw--(U;O_E!_T zG+eA97OoNJScBGBWAWhww#i&!b8pi&Zxj4^CT#BR-DbgdOeR>KV6q0AqdqeQ-w|f1 z=L-k+RmwA&{qsyhnWgr2_Omdj=` znSG22wBb2I&7rO-EKt{*r;UbX&k2TOA7-|1IkqQkIp{kAZ8jNo4{n|5I9y`KF>|(*STW6o)kMbO*u0?AN*5*kQ{#yjNp8!wBA0g5I2x-Fqi2#2gK#GfzrUyv3a=`mJ zU{{=Ua=7;C+*e(bK6Tj?uQ}-$(l=TGj>*zhiRk5 z!YeXGl9DKjVub(kVcK6^MSGg?8+l+84`_VM%;dn1T+Ra@;{h*DI?+$M9wZeq+`H8jqKk`d(9cOwAHVx_?7b z8^~$JMuW{U^ZXFBgiuUm=a+wWaPfiO2|iyCXGAIF3J%vcL7Y*~6}l&Cn;?tl3f(g) z7%l(p#ludt-h9Nh0&N%X-!0S`Glizpu#BYuxet534D#|%Yp8yiK> zTp2~pz2Sq0YVPU5X!02VzXR|FfCU2FGa5=0p)>t70*lkeJhkjlfyKOd;AX)V&sq(i zx!rraE3D~wmOtybrIu@NX<4?f<+f4NbeZRE3od0<>s{BDeC8=~cwdowm!02RV+v0X zlZav%!^`v3wpn9`*~+^A1S@Go6-YnJb}7Q&SuMphCf>b0ZLYf<`Y=)@iREqr8UPt&&+EU&$CFtReS z*J&)xId=HuU*UnT^T5w};Jpdpk_51j7=^Z}n-aj662QX=;N3~!{3LKNIVxg&Efc`26Tm5H zKuO2gHmvei_N140>`dzW%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