Skip to content

Commit 537ffd0

Browse files
authored
chore: chain policies for all chains (#10829)
refs: #10714 ## Description - Adds ChainPolicies for all 5 FUSDC chains - Adds MN values for `attenuatedCttpBridgeAddress` and `cctpTokenMessengerAddress`. - Adds Testnet values for `cctpTokenMessengerAddress` and `chainId` (* Sepolia network for most, as that's where Circle deploys) ### Security Considerations None really, but it's important these are the correct values. ### Scaling Considerations None ### Documentation Considerations None ### Testing Considerations None ### Upgrade Considerations None, part of initial release.
2 parents 78063fc + 34228ac commit 537ffd0

File tree

4 files changed

+113
-36
lines changed

4 files changed

+113
-36
lines changed

packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md

+25
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,32 @@ Generated by [AVA](https://avajs.dev).
2222
chainId: 42161,
2323
confirmations: 2,
2424
},
25+
Base: {
26+
attenuatedCttpBridgeAddress: '0xB6615B2662b35fc3533F8479002e62D0523341De',
27+
cctpTokenMessengerAddress: '0x1682Ae6375C4E4A97e4B583BC394c861A46D8962',
28+
chainId: 8453,
29+
confirmations: 2,
30+
},
31+
Ethereum: {
32+
attenuatedCttpBridgeAddress: '0xBC8552339dA68EB65C8b88B414B5854E0E366cFc',
33+
cctpTokenMessengerAddress: '0xBd3fa81B58Ba92a82136038B25aDec7066af3155',
34+
chainId: 1,
35+
confirmations: 2,
36+
},
37+
Optimism: {
38+
attenuatedCttpBridgeAddress: '0x48C5417ED570928eC85D5e3AD4e7E0EeD7dB1E2A',
39+
cctpTokenMessengerAddress: '0x2B4069517957735bE00ceE0fadAE88a26365528f',
40+
chainId: 10,
41+
confirmations: 2,
42+
},
43+
Polygon: {
44+
attenuatedCttpBridgeAddress: '0x32cb9574650AFF312c80edc4B4343Ff5500767cA',
45+
cctpTokenMessengerAddress: '0x9daF8c91AEFAE50b9c0E69629D3F6Ca40cA3B3FE',
46+
chainId: 137,
47+
confirmations: 2,
48+
},
2549
},
50+
eventFilter: 'DepositForBurn(uint64,address,uint256,address,bytes32,uint32,bytes32,bytes32)',
2651
nobleAgoricChannelId: 'channel-21',
2752
nobleDomainId: 4,
2853
},
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/** @import {ChainPolicy} from '../types.js'; */
2+
3+
/** @satisfies {Record<'MAINNET'| 'TESTNET', Record<string, ChainPolicy>>} */
4+
export const ChainPolicies = /** @type {const} */ ({
5+
MAINNET: {
6+
Arbitrum: {
7+
attenuatedCttpBridgeAddress: '0xe298b93ffB5eA1FB628e0C0D55A43aeaC268e347',
8+
cctpTokenMessengerAddress: '0x19330d10D9Cc8751218eaf51E8885D058642E08A',
9+
chainId: 42161,
10+
confirmations: 2, // TODO placeholder
11+
},
12+
Base: {
13+
attenuatedCttpBridgeAddress: '0xB6615B2662b35fc3533F8479002e62D0523341De',
14+
cctpTokenMessengerAddress: '0x1682Ae6375C4E4A97e4B583BC394c861A46D8962',
15+
chainId: 8453,
16+
confirmations: 2, // TODO placeholder
17+
},
18+
Ethereum: {
19+
attenuatedCttpBridgeAddress: '0xBC8552339dA68EB65C8b88B414B5854E0E366cFc',
20+
cctpTokenMessengerAddress: '0xBd3fa81B58Ba92a82136038B25aDec7066af3155',
21+
chainId: 1,
22+
confirmations: 2, // TODO placeholder
23+
},
24+
Optimism: {
25+
attenuatedCttpBridgeAddress: '0x48C5417ED570928eC85D5e3AD4e7E0EeD7dB1E2A',
26+
cctpTokenMessengerAddress: '0x2B4069517957735bE00ceE0fadAE88a26365528f',
27+
chainId: 10,
28+
confirmations: 2, // TODO placeholder
29+
},
30+
Polygon: {
31+
attenuatedCttpBridgeAddress: '0x32cb9574650AFF312c80edc4B4343Ff5500767cA',
32+
cctpTokenMessengerAddress: '0x9daF8c91AEFAE50b9c0E69629D3F6Ca40cA3B3FE',
33+
chainId: 137,
34+
confirmations: 2, // TODO placeholder
35+
},
36+
},
37+
TESTNET: {
38+
// Arbitrum Sepolia
39+
Arbitrum: {
40+
attenuatedCttpBridgeAddress: '0xTODO',
41+
cctpTokenMessengerAddress: '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5',
42+
chainId: 421614,
43+
confirmations: 2, // TODO placeholder
44+
},
45+
// Base Sepolia
46+
Base: {
47+
attenuatedCttpBridgeAddress: '0xTODO',
48+
cctpTokenMessengerAddress: '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5',
49+
chainId: 84532,
50+
confirmations: 2, // TODO placeholder
51+
},
52+
// Ethereum Sepolia
53+
Ethereum: {
54+
attenuatedCttpBridgeAddress: '0xTODO',
55+
cctpTokenMessengerAddress: '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5',
56+
chainId: 11155111,
57+
confirmations: 2, // TODO placeholder
58+
},
59+
// OP Sepolia
60+
Optimism: {
61+
attenuatedCttpBridgeAddress: '0xTODO',
62+
cctpTokenMessengerAddress: '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5',
63+
chainId: 11155420,
64+
confirmations: 2, // TODO placeholder
65+
},
66+
// Polygon PoS Amoy
67+
Polygon: {
68+
attenuatedCttpBridgeAddress: '0xTODO',
69+
cctpTokenMessengerAddress: '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5',
70+
chainId: 80002,
71+
confirmations: 2, // TODO placeholder
72+
},
73+
},
74+
});
75+
harden(ChainPolicies);

packages/fast-usdc/src/utils/deploy-config.js

+13-36
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { denomHash, withChainCapabilities } from '@agoric/orchestration';
22
import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js';
3+
import { ChainPolicies } from './chain-policies.js';
34

45
/**
56
* @import {FastUSDCConfig} from '@agoric/fast-usdc/src/types.js'
@@ -41,6 +42,10 @@ const agoricAssetInfo = defaultAssetInfo.filter(
4142
([_d, i]) => i.chainName === 'agoric',
4243
);
4344

45+
/** ABI for DepositForBurn event in TokenMessenger contract */
46+
const DepositForBurnEvent =
47+
'DepositForBurn(uint64,address,uint256,address,bytes32,uint32,bytes32,bytes32)';
48+
4449
/**
4550
* @type {Record<string, Pick<FastUSDCConfig, 'oracles' | 'feedPolicy' | 'chainInfo' | 'assetInfo' >>}
4651
*
@@ -62,16 +67,8 @@ export const configurations = {
6267
feedPolicy: {
6368
nobleAgoricChannelId: 'channel-does-not-exist',
6469
nobleDomainId: 4,
65-
chainPolicies: {
66-
Arbitrum: {
67-
attenuatedCttpBridgeAddress:
68-
'0xe298b93ffB5eA1FB628e0C0D55A43aeaC268e347',
69-
cctpTokenMessengerAddress:
70-
'0x19330d10D9Cc8751218eaf51E8885D058642E08A',
71-
chainId: 42161,
72-
confirmations: 2,
73-
},
74-
},
70+
chainPolicies: ChainPolicies.TESTNET,
71+
eventFilter: DepositForBurnEvent,
7572
},
7673
chainInfo: /** @type {Record<string, CosmosChainInfo & Passable>} */ (
7774
withChainCapabilities({
@@ -91,16 +88,8 @@ export const configurations = {
9188
feedPolicy: {
9289
nobleAgoricChannelId: 'channel-21',
9390
nobleDomainId: 4,
94-
chainPolicies: {
95-
Arbitrum: {
96-
attenuatedCttpBridgeAddress:
97-
'0xe298b93ffB5eA1FB628e0C0D55A43aeaC268e347',
98-
cctpTokenMessengerAddress:
99-
'0x19330d10D9Cc8751218eaf51E8885D058642E08A',
100-
chainId: 42161,
101-
confirmations: 2,
102-
},
103-
},
91+
chainPolicies: ChainPolicies.MAINNET,
92+
eventFilter: DepositForBurnEvent,
10493
},
10594
chainInfo: /** @type {Record<string, CosmosChainInfo & Passable>} */ (
10695
withChainCapabilities(fetchedChainInfo)
@@ -118,14 +107,8 @@ export const configurations = {
118107
feedPolicy: {
119108
nobleAgoricChannelId: 'TODO',
120109
nobleDomainId: 4,
121-
chainPolicies: {
122-
Arbitrum: {
123-
attenuatedCttpBridgeAddress: '0xTODO',
124-
cctpTokenMessengerAddress: '0xTODO',
125-
chainId: 421614,
126-
confirmations: 2,
127-
},
128-
},
110+
chainPolicies: ChainPolicies.TESTNET,
111+
eventFilter: DepositForBurnEvent,
129112
},
130113
chainInfo: /** @type {Record<string, CosmosChainInfo & Passable>} */ (
131114
withChainCapabilities(fetchedChainInfo) // TODO: use devnet values
@@ -140,14 +123,8 @@ export const configurations = {
140123
feedPolicy: {
141124
nobleAgoricChannelId: 'TODO',
142125
nobleDomainId: 4,
143-
chainPolicies: {
144-
Arbitrum: {
145-
attenuatedCttpBridgeAddress: '0xTODO',
146-
cctpTokenMessengerAddress: '0xTODO',
147-
chainId: 421614,
148-
confirmations: 2,
149-
},
150-
},
126+
chainPolicies: ChainPolicies.TESTNET,
127+
eventFilter: DepositForBurnEvent,
151128
},
152129
chainInfo: /** @type {Record<string, CosmosChainInfo & Passable>} */ (
153130
withChainCapabilities(fetchedChainInfo) // TODO: use emerynet values

0 commit comments

Comments
 (0)