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 4b19508a1d9..f27a41da2c4 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,10 +17,10 @@ Generated by [AVA](https://avajs.dev). { chainPolicies: { Arbitrum: { + attenuatedCttpBridgeAddress: '0xe298b93ffB5eA1FB628e0C0D55A43aeaC268e347', cctpTokenMessengerAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', chainId: 42161, confirmations: 2, - nobleContractAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', }, }, nobleAgoricChannelId: 'channel-21', 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 0245ac61053..4647d12715f 100644 Binary files a/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap and b/packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap differ diff --git a/packages/fast-usdc/src/type-guards.js b/packages/fast-usdc/src/type-guards.js index a645f90bae4..ebc50505267 100644 --- a/packages/fast-usdc/src/type-guards.js +++ b/packages/fast-usdc/src/type-guards.js @@ -94,16 +94,13 @@ export const PoolMetricsShape = { harden(PoolMetricsShape); /** @type {TypedPattern} */ -export const ChainPoliciesShape = M.splitRecord( - { - nobleContractAddress: EvmHashShape, - cctpTokenMessengerAddress: EvmHashShape, - confirmations: M.number(), - chainId: M.number(), - }, - { chainType: M.number() }, -); -harden(ChainPoliciesShape); +export const ChainPolicyShape = { + attenuatedCttpBridgeAddress: EvmHashShape, + cctpTokenMessengerAddress: EvmHashShape, + confirmations: M.number(), + chainId: M.number(), +}; +harden(ChainPolicyShape); /** * @type {TypedPattern} @@ -115,7 +112,7 @@ export const FeedPolicyShape = M.splitRecord( { nobleDomainId: M.number(), nobleAgoricChannelId: M.string(), - chainPolicies: M.recordOf(M.string(), ChainPoliciesShape), + chainPolicies: M.recordOf(M.string(), ChainPolicyShape), }, { eventFilter: M.string() }, ); diff --git a/packages/fast-usdc/src/types.ts b/packages/fast-usdc/src/types.ts index ee9a90efffd..2173b4e42e8 100644 --- a/packages/fast-usdc/src/types.ts +++ b/packages/fast-usdc/src/types.ts @@ -58,11 +58,14 @@ export interface PoolMetrics extends PoolStats { } export interface ChainPolicy { - nobleContractAddress: EvmHash; + /** `msg.sender` of DepositAndBurn to TokenMessenger must be an attenuated wrapper contract that does not contain `replaceDepositForBurn` */ + attenuatedCttpBridgeAddress: EvmHash; + /** @see {@link https://developers.circle.com/stablecoins/evm-smart-contracts} */ cctpTokenMessengerAddress: EvmHash; + /** the number of block confirmations to observe before reporting */ confirmations: number; + /** e.g., `1` for ETH mainnet 42161 for Arbitrum One. @see {@link https://chainlist.org/} */ chainId: EvmChainID; - chainType?: number; } export interface FeedPolicy { diff --git a/packages/fast-usdc/src/utils/deploy-config.js b/packages/fast-usdc/src/utils/deploy-config.js index 653d95ff293..7b160a7996c 100644 --- a/packages/fast-usdc/src/utils/deploy-config.js +++ b/packages/fast-usdc/src/utils/deploy-config.js @@ -64,11 +64,12 @@ export const configurations = { nobleDomainId: 4, chainPolicies: { Arbitrum: { + attenuatedCttpBridgeAddress: + '0xe298b93ffB5eA1FB628e0C0D55A43aeaC268e347', cctpTokenMessengerAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', chainId: 42161, confirmations: 2, - nobleContractAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', }, }, }, @@ -92,11 +93,12 @@ export const configurations = { nobleDomainId: 4, chainPolicies: { Arbitrum: { + attenuatedCttpBridgeAddress: + '0xe298b93ffB5eA1FB628e0C0D55A43aeaC268e347', cctpTokenMessengerAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', chainId: 42161, confirmations: 2, - nobleContractAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A', }, }, }, @@ -118,10 +120,10 @@ export const configurations = { nobleDomainId: 4, chainPolicies: { Arbitrum: { + attenuatedCttpBridgeAddress: '0xTODO', cctpTokenMessengerAddress: '0xTODO', chainId: 421614, confirmations: 2, - nobleContractAddress: '0xTODO', }, }, }, @@ -140,10 +142,10 @@ export const configurations = { nobleDomainId: 4, chainPolicies: { Arbitrum: { + attenuatedCttpBridgeAddress: '0xTODO', cctpTokenMessengerAddress: '0xTODO', chainId: 421614, confirmations: 2, - nobleContractAddress: '0xTODO', }, }, },