@agoric/fast-usdc 0.1.1-dev-78063fc.0 → 0.1.1-dev-537ffd0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +15 -15
- package/src/utils/chain-policies.js +75 -0
- package/src/utils/deploy-config.js +13 -36
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/fast-usdc",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-537ffd0.0+537ffd0",
|
|
4
4
|
"description": "CLI and library for Fast USDC product",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"lint:eslint": "eslint ."
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
26
|
-
"@agoric/vats": "0.15.2-dev-
|
|
27
|
-
"@agoric/zone": "0.2.3-dev-
|
|
25
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-537ffd0.0+537ffd0",
|
|
26
|
+
"@agoric/vats": "0.15.2-dev-537ffd0.0+537ffd0",
|
|
27
|
+
"@agoric/zone": "0.2.3-dev-537ffd0.0+537ffd0",
|
|
28
28
|
"@fast-check/ava": "^2.0.1",
|
|
29
29
|
"ava": "^5.3.0",
|
|
30
30
|
"c8": "^10.1.2",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
"ts-blank-space": "^0.4.4"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@agoric/client-utils": "0.1.1-dev-
|
|
36
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
37
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
38
|
-
"@agoric/internal": "0.3.3-dev-
|
|
39
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
40
|
-
"@agoric/orchestration": "0.1.1-dev-
|
|
41
|
-
"@agoric/store": "0.9.3-dev-
|
|
42
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
43
|
-
"@agoric/vow": "0.1.1-dev-
|
|
44
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
35
|
+
"@agoric/client-utils": "0.1.1-dev-537ffd0.0+537ffd0",
|
|
36
|
+
"@agoric/cosmic-proto": "0.4.1-dev-537ffd0.0+537ffd0",
|
|
37
|
+
"@agoric/ertp": "0.16.3-dev-537ffd0.0+537ffd0",
|
|
38
|
+
"@agoric/internal": "0.3.3-dev-537ffd0.0+537ffd0",
|
|
39
|
+
"@agoric/notifier": "0.6.3-dev-537ffd0.0+537ffd0",
|
|
40
|
+
"@agoric/orchestration": "0.1.1-dev-537ffd0.0+537ffd0",
|
|
41
|
+
"@agoric/store": "0.9.3-dev-537ffd0.0+537ffd0",
|
|
42
|
+
"@agoric/vat-data": "0.5.3-dev-537ffd0.0+537ffd0",
|
|
43
|
+
"@agoric/vow": "0.1.1-dev-537ffd0.0+537ffd0",
|
|
44
|
+
"@agoric/zoe": "0.26.3-dev-537ffd0.0+537ffd0",
|
|
45
45
|
"@cosmjs/proto-signing": "^0.32.4",
|
|
46
46
|
"@cosmjs/stargate": "^0.32.4",
|
|
47
47
|
"@endo/base64": "^1.0.9",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "537ffd077b75c175412e54f116c885cbb64d80fc"
|
|
85
85
|
}
|
|
@@ -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);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { denomHash, withChainCapabilities } from '@agoric/orchestration';
|
|
2
2
|
import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js';
|
|
3
|
+
import { ChainPolicies } from './chain-policies.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @import {FastUSDCConfig} from '@agoric/fast-usdc/src/types.js'
|
|
@@ -41,6 +42,10 @@ const agoricAssetInfo = defaultAssetInfo.filter(
|
|
|
41
42
|
([_d, i]) => i.chainName === 'agoric',
|
|
42
43
|
);
|
|
43
44
|
|
|
45
|
+
/** ABI for DepositForBurn event in TokenMessenger contract */
|
|
46
|
+
const DepositForBurnEvent =
|
|
47
|
+
'DepositForBurn(uint64,address,uint256,address,bytes32,uint32,bytes32,bytes32)';
|
|
48
|
+
|
|
44
49
|
/**
|
|
45
50
|
* @type {Record<string, Pick<FastUSDCConfig, 'oracles' | 'feedPolicy' | 'chainInfo' | 'assetInfo' >>}
|
|
46
51
|
*
|
|
@@ -62,16 +67,8 @@ export const configurations = {
|
|
|
62
67
|
feedPolicy: {
|
|
63
68
|
nobleAgoricChannelId: 'channel-does-not-exist',
|
|
64
69
|
nobleDomainId: 4,
|
|
65
|
-
chainPolicies:
|
|
66
|
-
|
|
67
|
-
attenuatedCttpBridgeAddress:
|
|
68
|
-
'0xe298b93ffB5eA1FB628e0C0D55A43aeaC268e347',
|
|
69
|
-
cctpTokenMessengerAddress:
|
|
70
|
-
'0x19330d10D9Cc8751218eaf51E8885D058642E08A',
|
|
71
|
-
chainId: 42161,
|
|
72
|
-
confirmations: 2,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
70
|
+
chainPolicies: ChainPolicies.TESTNET,
|
|
71
|
+
eventFilter: DepositForBurnEvent,
|
|
75
72
|
},
|
|
76
73
|
chainInfo: /** @type {Record<string, CosmosChainInfo & Passable>} */ (
|
|
77
74
|
withChainCapabilities({
|
|
@@ -91,16 +88,8 @@ export const configurations = {
|
|
|
91
88
|
feedPolicy: {
|
|
92
89
|
nobleAgoricChannelId: 'channel-21',
|
|
93
90
|
nobleDomainId: 4,
|
|
94
|
-
chainPolicies:
|
|
95
|
-
|
|
96
|
-
attenuatedCttpBridgeAddress:
|
|
97
|
-
'0xe298b93ffB5eA1FB628e0C0D55A43aeaC268e347',
|
|
98
|
-
cctpTokenMessengerAddress:
|
|
99
|
-
'0x19330d10D9Cc8751218eaf51E8885D058642E08A',
|
|
100
|
-
chainId: 42161,
|
|
101
|
-
confirmations: 2,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
91
|
+
chainPolicies: ChainPolicies.MAINNET,
|
|
92
|
+
eventFilter: DepositForBurnEvent,
|
|
104
93
|
},
|
|
105
94
|
chainInfo: /** @type {Record<string, CosmosChainInfo & Passable>} */ (
|
|
106
95
|
withChainCapabilities(fetchedChainInfo)
|
|
@@ -118,14 +107,8 @@ export const configurations = {
|
|
|
118
107
|
feedPolicy: {
|
|
119
108
|
nobleAgoricChannelId: 'TODO',
|
|
120
109
|
nobleDomainId: 4,
|
|
121
|
-
chainPolicies:
|
|
122
|
-
|
|
123
|
-
attenuatedCttpBridgeAddress: '0xTODO',
|
|
124
|
-
cctpTokenMessengerAddress: '0xTODO',
|
|
125
|
-
chainId: 421614,
|
|
126
|
-
confirmations: 2,
|
|
127
|
-
},
|
|
128
|
-
},
|
|
110
|
+
chainPolicies: ChainPolicies.TESTNET,
|
|
111
|
+
eventFilter: DepositForBurnEvent,
|
|
129
112
|
},
|
|
130
113
|
chainInfo: /** @type {Record<string, CosmosChainInfo & Passable>} */ (
|
|
131
114
|
withChainCapabilities(fetchedChainInfo) // TODO: use devnet values
|
|
@@ -140,14 +123,8 @@ export const configurations = {
|
|
|
140
123
|
feedPolicy: {
|
|
141
124
|
nobleAgoricChannelId: 'TODO',
|
|
142
125
|
nobleDomainId: 4,
|
|
143
|
-
chainPolicies:
|
|
144
|
-
|
|
145
|
-
attenuatedCttpBridgeAddress: '0xTODO',
|
|
146
|
-
cctpTokenMessengerAddress: '0xTODO',
|
|
147
|
-
chainId: 421614,
|
|
148
|
-
confirmations: 2,
|
|
149
|
-
},
|
|
150
|
-
},
|
|
126
|
+
chainPolicies: ChainPolicies.TESTNET,
|
|
127
|
+
eventFilter: DepositForBurnEvent,
|
|
151
128
|
},
|
|
152
129
|
chainInfo: /** @type {Record<string, CosmosChainInfo & Passable>} */ (
|
|
153
130
|
withChainCapabilities(fetchedChainInfo) // TODO: use emerynet values
|