@agoric/fast-usdc 0.1.1-dev-afbbd9a.0 → 0.1.1-dev-129bb20.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 +9 -9
- package/tools/mock-evidence.ts +55 -8
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-129bb20.0+129bb20",
|
|
4
4
|
"description": "CLI and library for Fast USDC product",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"ts-blank-space": "^0.4.4"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@agoric/client-utils": "0.1.1-dev-
|
|
33
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
34
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
35
|
-
"@agoric/internal": "0.3.3-dev-
|
|
36
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
37
|
-
"@agoric/orchestration": "0.1.1-dev-
|
|
38
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
32
|
+
"@agoric/client-utils": "0.1.1-dev-129bb20.0+129bb20",
|
|
33
|
+
"@agoric/cosmic-proto": "0.4.1-dev-129bb20.0+129bb20",
|
|
34
|
+
"@agoric/ertp": "0.16.3-dev-129bb20.0+129bb20",
|
|
35
|
+
"@agoric/internal": "0.3.3-dev-129bb20.0+129bb20",
|
|
36
|
+
"@agoric/notifier": "0.6.3-dev-129bb20.0+129bb20",
|
|
37
|
+
"@agoric/orchestration": "0.1.1-dev-129bb20.0+129bb20",
|
|
38
|
+
"@agoric/zoe": "0.26.3-dev-129bb20.0+129bb20",
|
|
39
39
|
"@cosmjs/proto-signing": "^0.33.0",
|
|
40
40
|
"@cosmjs/stargate": "^0.33.0",
|
|
41
41
|
"@endo/base64": "^1.0.9",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "129bb208d14fe7b03fed190c8a507ed1c7269721"
|
|
79
79
|
}
|
package/tools/mock-evidence.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { encodeAddressHook } from '@agoric/cosmic-proto/address-hooks.js';
|
|
2
|
-
import type { CosmosChainAddress } from '@agoric/orchestration';
|
|
2
|
+
import type { Bech32Address, CosmosChainAddress } from '@agoric/orchestration';
|
|
3
3
|
import type { CctpTxEvidence, EvmAddress } from '../src/types.js';
|
|
4
4
|
|
|
5
5
|
const mockScenarios = [
|
|
@@ -9,6 +9,8 @@ const mockScenarios = [
|
|
|
9
9
|
'AGORIC_NO_PARAMS',
|
|
10
10
|
'AGORIC_UNKNOWN_EUD',
|
|
11
11
|
'AGORIC_PLUS_ETHEREUM',
|
|
12
|
+
'AGORIC_PLUS_NOBLE',
|
|
13
|
+
'AGORIC_PLUS_NOBLE_B32EUD',
|
|
12
14
|
] as const;
|
|
13
15
|
|
|
14
16
|
export type MockScenario = (typeof mockScenarios)[number];
|
|
@@ -21,9 +23,9 @@ const blockTimestamp = 1632340000n;
|
|
|
21
23
|
|
|
22
24
|
export const MockCctpTxEvidences: Record<
|
|
23
25
|
MockScenario,
|
|
24
|
-
(receiverAddress?:
|
|
26
|
+
(receiverAddress?: Bech32Address) => CctpTxEvidence
|
|
25
27
|
> = {
|
|
26
|
-
AGORIC_PLUS_OSMO: (receiverAddress?:
|
|
28
|
+
AGORIC_PLUS_OSMO: (receiverAddress?: Bech32Address) => ({
|
|
27
29
|
blockHash:
|
|
28
30
|
'0x90d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee665',
|
|
29
31
|
blockNumber: 21037663n,
|
|
@@ -45,7 +47,7 @@ export const MockCctpTxEvidences: Record<
|
|
|
45
47
|
},
|
|
46
48
|
chainId: 1,
|
|
47
49
|
}),
|
|
48
|
-
AGORIC_PLUS_DYDX: (receiverAddress?:
|
|
50
|
+
AGORIC_PLUS_DYDX: (receiverAddress?: Bech32Address) => ({
|
|
49
51
|
blockHash:
|
|
50
52
|
'0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee699',
|
|
51
53
|
blockNumber: 21037669n,
|
|
@@ -67,7 +69,7 @@ export const MockCctpTxEvidences: Record<
|
|
|
67
69
|
},
|
|
68
70
|
chainId: 1,
|
|
69
71
|
}),
|
|
70
|
-
AGORIC_PLUS_AGORIC: (receiverAddress?:
|
|
72
|
+
AGORIC_PLUS_AGORIC: (receiverAddress?: Bech32Address) => ({
|
|
71
73
|
blockHash:
|
|
72
74
|
'0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee6z9',
|
|
73
75
|
blockNumber: 21037600n,
|
|
@@ -89,7 +91,7 @@ export const MockCctpTxEvidences: Record<
|
|
|
89
91
|
},
|
|
90
92
|
chainId: 1,
|
|
91
93
|
}),
|
|
92
|
-
AGORIC_NO_PARAMS: (receiverAddress?:
|
|
94
|
+
AGORIC_NO_PARAMS: (receiverAddress?: Bech32Address) => ({
|
|
93
95
|
blockHash:
|
|
94
96
|
'0x70d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee699',
|
|
95
97
|
blockNumber: 21037669n,
|
|
@@ -107,7 +109,7 @@ export const MockCctpTxEvidences: Record<
|
|
|
107
109
|
},
|
|
108
110
|
chainId: 1,
|
|
109
111
|
}),
|
|
110
|
-
AGORIC_UNKNOWN_EUD: (receiverAddress?:
|
|
112
|
+
AGORIC_UNKNOWN_EUD: (receiverAddress?: Bech32Address) => ({
|
|
111
113
|
blockHash:
|
|
112
114
|
'0x70d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee699',
|
|
113
115
|
blockNumber: 21037669n,
|
|
@@ -129,7 +131,7 @@ export const MockCctpTxEvidences: Record<
|
|
|
129
131
|
},
|
|
130
132
|
chainId: 1,
|
|
131
133
|
}),
|
|
132
|
-
AGORIC_PLUS_ETHEREUM: (receiverAddress?:
|
|
134
|
+
AGORIC_PLUS_ETHEREUM: (receiverAddress?: Bech32Address) => ({
|
|
133
135
|
blockHash:
|
|
134
136
|
'0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee6z9',
|
|
135
137
|
blockNumber: 21037600n,
|
|
@@ -151,6 +153,51 @@ export const MockCctpTxEvidences: Record<
|
|
|
151
153
|
},
|
|
152
154
|
chainId: 8453,
|
|
153
155
|
}),
|
|
156
|
+
AGORIC_PLUS_NOBLE: (receiverAddress?: Bech32Address) => ({
|
|
157
|
+
blockHash:
|
|
158
|
+
'0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee6z9',
|
|
159
|
+
blockNumber: 21037600n,
|
|
160
|
+
blockTimestamp,
|
|
161
|
+
txHash:
|
|
162
|
+
'0xe81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff3875527617z9',
|
|
163
|
+
tx: {
|
|
164
|
+
amount: 950000000n,
|
|
165
|
+
forwardingAddress: 'noble17ww3rfusv895d92c0ncgj0fl9trntn70jz7ee5',
|
|
166
|
+
sender: Senders.default,
|
|
167
|
+
},
|
|
168
|
+
aux: {
|
|
169
|
+
forwardingChannel: 'channel-21',
|
|
170
|
+
recipientAddress:
|
|
171
|
+
receiverAddress ||
|
|
172
|
+
encodeAddressHook(settlementAddress.value, {
|
|
173
|
+
EUD: 'cosmos:noble-1:noble1u2l9za2wa7wvffhtekgyuvyvum06lwhqxfyr5d',
|
|
174
|
+
}),
|
|
175
|
+
},
|
|
176
|
+
chainId: 8453,
|
|
177
|
+
}),
|
|
178
|
+
/** Identical to AGORIC_PLUS_NOBLE, but the EUD is a bare bech32 */
|
|
179
|
+
AGORIC_PLUS_NOBLE_B32EUD: (receiverAddress?: Bech32Address) => ({
|
|
180
|
+
blockHash:
|
|
181
|
+
'0x80d7343e04f8160892e94f02d6a9b9f255663ed0ac34caca98544c8143fee6z9',
|
|
182
|
+
blockNumber: 21037600n,
|
|
183
|
+
blockTimestamp,
|
|
184
|
+
txHash:
|
|
185
|
+
'0xe81bc6105b60a234c7c50ac17816ebcd5561d366df8bf3be59ff3875527617z9',
|
|
186
|
+
tx: {
|
|
187
|
+
amount: 950000000n,
|
|
188
|
+
forwardingAddress: 'noble17ww3rfusv895d92c0ncgj0fl9trntn70jz7ee5',
|
|
189
|
+
sender: Senders.default,
|
|
190
|
+
},
|
|
191
|
+
aux: {
|
|
192
|
+
forwardingChannel: 'channel-21',
|
|
193
|
+
recipientAddress:
|
|
194
|
+
receiverAddress ||
|
|
195
|
+
encodeAddressHook(settlementAddress.value, {
|
|
196
|
+
EUD: 'noble1u2l9za2wa7wvffhtekgyuvyvum06lwhqxfyr5d',
|
|
197
|
+
}),
|
|
198
|
+
},
|
|
199
|
+
chainId: 8453,
|
|
200
|
+
}),
|
|
154
201
|
};
|
|
155
202
|
|
|
156
203
|
export const settlementAddress: CosmosChainAddress = harden({
|