@usewhisk/cctp 0.0.0 → 0.1.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/LICENSE +21 -0
- package/README.md +218 -0
- package/dist/abi.cjs +239 -0
- package/dist/abi.cjs.map +1 -0
- package/dist/abi.d.cts +401 -0
- package/dist/abi.d.ts +401 -0
- package/dist/abi.js +234 -0
- package/dist/abi.js.map +1 -0
- package/dist/attestation-D52iUV0y.d.cts +188 -0
- package/dist/attestation-D52iUV0y.d.ts +188 -0
- package/dist/chains.cjs +1621 -0
- package/dist/chains.cjs.map +1 -0
- package/dist/chains.d.cts +2 -0
- package/dist/chains.d.ts +2 -0
- package/dist/chains.js +1514 -0
- package/dist/chains.js.map +1 -0
- package/dist/index-BIerSvES.d.cts +4070 -0
- package/dist/index-O0Ms-Fa5.d.ts +4070 -0
- package/dist/index.cjs +4003 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +940 -0
- package/dist/index.d.ts +940 -0
- package/dist/index.js +3785 -0
- package/dist/index.js.map +1 -0
- package/dist/iris.cjs +557 -0
- package/dist/iris.cjs.map +1 -0
- package/dist/iris.d.cts +205 -0
- package/dist/iris.d.ts +205 -0
- package/dist/iris.js +538 -0
- package/dist/iris.js.map +1 -0
- package/package.json +85 -10
package/dist/abi.d.cts
ADDED
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `TokenMessengerV2` ABI (relevant subset).
|
|
3
|
+
*
|
|
4
|
+
* Source: github.com/circlefin/evm-cctp-contracts (v2 abis).
|
|
5
|
+
* Only the functions and events Whisk actually calls are included.
|
|
6
|
+
*/
|
|
7
|
+
declare const tokenMessengerV2Abi: readonly [{
|
|
8
|
+
readonly type: "function";
|
|
9
|
+
readonly name: "depositForBurn";
|
|
10
|
+
readonly stateMutability: "nonpayable";
|
|
11
|
+
readonly inputs: readonly [{
|
|
12
|
+
readonly name: "amount";
|
|
13
|
+
readonly type: "uint256";
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "destinationDomain";
|
|
16
|
+
readonly type: "uint32";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "mintRecipient";
|
|
19
|
+
readonly type: "bytes32";
|
|
20
|
+
}, {
|
|
21
|
+
readonly name: "burnToken";
|
|
22
|
+
readonly type: "address";
|
|
23
|
+
}, {
|
|
24
|
+
readonly name: "destinationCaller";
|
|
25
|
+
readonly type: "bytes32";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "maxFee";
|
|
28
|
+
readonly type: "uint256";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "minFinalityThreshold";
|
|
31
|
+
readonly type: "uint32";
|
|
32
|
+
}];
|
|
33
|
+
readonly outputs: readonly [];
|
|
34
|
+
}, {
|
|
35
|
+
readonly type: "function";
|
|
36
|
+
readonly name: "depositForBurnWithHook";
|
|
37
|
+
readonly stateMutability: "nonpayable";
|
|
38
|
+
readonly inputs: readonly [{
|
|
39
|
+
readonly name: "amount";
|
|
40
|
+
readonly type: "uint256";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "destinationDomain";
|
|
43
|
+
readonly type: "uint32";
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "mintRecipient";
|
|
46
|
+
readonly type: "bytes32";
|
|
47
|
+
}, {
|
|
48
|
+
readonly name: "burnToken";
|
|
49
|
+
readonly type: "address";
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "destinationCaller";
|
|
52
|
+
readonly type: "bytes32";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "maxFee";
|
|
55
|
+
readonly type: "uint256";
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "minFinalityThreshold";
|
|
58
|
+
readonly type: "uint32";
|
|
59
|
+
}, {
|
|
60
|
+
readonly name: "hookData";
|
|
61
|
+
readonly type: "bytes";
|
|
62
|
+
}];
|
|
63
|
+
readonly outputs: readonly [];
|
|
64
|
+
}, {
|
|
65
|
+
readonly type: "event";
|
|
66
|
+
readonly name: "DepositForBurn";
|
|
67
|
+
readonly anonymous: false;
|
|
68
|
+
readonly inputs: readonly [{
|
|
69
|
+
readonly name: "burnToken";
|
|
70
|
+
readonly type: "address";
|
|
71
|
+
readonly indexed: true;
|
|
72
|
+
}, {
|
|
73
|
+
readonly name: "amount";
|
|
74
|
+
readonly type: "uint256";
|
|
75
|
+
readonly indexed: false;
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "depositor";
|
|
78
|
+
readonly type: "address";
|
|
79
|
+
readonly indexed: true;
|
|
80
|
+
}, {
|
|
81
|
+
readonly name: "mintRecipient";
|
|
82
|
+
readonly type: "bytes32";
|
|
83
|
+
readonly indexed: false;
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "destinationDomain";
|
|
86
|
+
readonly type: "uint32";
|
|
87
|
+
readonly indexed: false;
|
|
88
|
+
}, {
|
|
89
|
+
readonly name: "destinationTokenMessenger";
|
|
90
|
+
readonly type: "bytes32";
|
|
91
|
+
readonly indexed: false;
|
|
92
|
+
}, {
|
|
93
|
+
readonly name: "destinationCaller";
|
|
94
|
+
readonly type: "bytes32";
|
|
95
|
+
readonly indexed: false;
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "maxFee";
|
|
98
|
+
readonly type: "uint256";
|
|
99
|
+
readonly indexed: false;
|
|
100
|
+
}, {
|
|
101
|
+
readonly name: "minFinalityThreshold";
|
|
102
|
+
readonly type: "uint32";
|
|
103
|
+
readonly indexed: false;
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "hookData";
|
|
106
|
+
readonly type: "bytes";
|
|
107
|
+
readonly indexed: false;
|
|
108
|
+
}];
|
|
109
|
+
}];
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The subset of `MessageTransmitterV2` Whisk uses: `receiveMessage` for
|
|
113
|
+
* manual recovery, `usedNonces` to check whether a message was minted, and
|
|
114
|
+
* the `MessageReceived` and `MessageSent` events.
|
|
115
|
+
*/
|
|
116
|
+
declare const messageTransmitterV2Abi: readonly [{
|
|
117
|
+
readonly type: "function";
|
|
118
|
+
readonly name: "receiveMessage";
|
|
119
|
+
readonly stateMutability: "nonpayable";
|
|
120
|
+
readonly inputs: readonly [{
|
|
121
|
+
readonly name: "message";
|
|
122
|
+
readonly type: "bytes";
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "attestation";
|
|
125
|
+
readonly type: "bytes";
|
|
126
|
+
}];
|
|
127
|
+
readonly outputs: readonly [{
|
|
128
|
+
readonly name: "success";
|
|
129
|
+
readonly type: "bool";
|
|
130
|
+
}];
|
|
131
|
+
}, {
|
|
132
|
+
readonly type: "function";
|
|
133
|
+
readonly name: "usedNonces";
|
|
134
|
+
readonly stateMutability: "view";
|
|
135
|
+
readonly inputs: readonly [{
|
|
136
|
+
readonly name: "nonce";
|
|
137
|
+
readonly type: "bytes32";
|
|
138
|
+
}];
|
|
139
|
+
readonly outputs: readonly [{
|
|
140
|
+
readonly name: "isUsed";
|
|
141
|
+
readonly type: "uint256";
|
|
142
|
+
}];
|
|
143
|
+
}, {
|
|
144
|
+
readonly type: "event";
|
|
145
|
+
readonly name: "MessageReceived";
|
|
146
|
+
readonly anonymous: false;
|
|
147
|
+
readonly inputs: readonly [{
|
|
148
|
+
readonly name: "caller";
|
|
149
|
+
readonly type: "address";
|
|
150
|
+
readonly indexed: true;
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "sourceDomain";
|
|
153
|
+
readonly type: "uint32";
|
|
154
|
+
readonly indexed: true;
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "nonce";
|
|
157
|
+
readonly type: "bytes32";
|
|
158
|
+
readonly indexed: true;
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "sender";
|
|
161
|
+
readonly type: "bytes32";
|
|
162
|
+
readonly indexed: false;
|
|
163
|
+
}, {
|
|
164
|
+
readonly name: "finalityThresholdExecuted";
|
|
165
|
+
readonly type: "uint32";
|
|
166
|
+
readonly indexed: false;
|
|
167
|
+
}, {
|
|
168
|
+
readonly name: "messageBody";
|
|
169
|
+
readonly type: "bytes";
|
|
170
|
+
readonly indexed: false;
|
|
171
|
+
}];
|
|
172
|
+
}, {
|
|
173
|
+
readonly type: "event";
|
|
174
|
+
readonly name: "MessageSent";
|
|
175
|
+
readonly anonymous: false;
|
|
176
|
+
readonly inputs: readonly [{
|
|
177
|
+
readonly name: "message";
|
|
178
|
+
readonly type: "bytes";
|
|
179
|
+
readonly indexed: false;
|
|
180
|
+
}];
|
|
181
|
+
}];
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The parts of the USDC (FiatTokenV2) ABI that Whisk needs.
|
|
185
|
+
*
|
|
186
|
+
* Read: balanceOf, allowance, decimals, nonces, DOMAIN_SEPARATOR.
|
|
187
|
+
* Write: approve, transfer, permit (EIP-2612).
|
|
188
|
+
*/
|
|
189
|
+
declare const usdcAbi: readonly [{
|
|
190
|
+
readonly type: "function";
|
|
191
|
+
readonly name: "balanceOf";
|
|
192
|
+
readonly stateMutability: "view";
|
|
193
|
+
readonly inputs: readonly [{
|
|
194
|
+
readonly name: "account";
|
|
195
|
+
readonly type: "address";
|
|
196
|
+
}];
|
|
197
|
+
readonly outputs: readonly [{
|
|
198
|
+
readonly name: "balance";
|
|
199
|
+
readonly type: "uint256";
|
|
200
|
+
}];
|
|
201
|
+
}, {
|
|
202
|
+
readonly type: "function";
|
|
203
|
+
readonly name: "allowance";
|
|
204
|
+
readonly stateMutability: "view";
|
|
205
|
+
readonly inputs: readonly [{
|
|
206
|
+
readonly name: "owner";
|
|
207
|
+
readonly type: "address";
|
|
208
|
+
}, {
|
|
209
|
+
readonly name: "spender";
|
|
210
|
+
readonly type: "address";
|
|
211
|
+
}];
|
|
212
|
+
readonly outputs: readonly [{
|
|
213
|
+
readonly name: "remaining";
|
|
214
|
+
readonly type: "uint256";
|
|
215
|
+
}];
|
|
216
|
+
}, {
|
|
217
|
+
readonly type: "function";
|
|
218
|
+
readonly name: "decimals";
|
|
219
|
+
readonly stateMutability: "view";
|
|
220
|
+
readonly inputs: readonly [];
|
|
221
|
+
readonly outputs: readonly [{
|
|
222
|
+
readonly name: "";
|
|
223
|
+
readonly type: "uint8";
|
|
224
|
+
}];
|
|
225
|
+
}, {
|
|
226
|
+
readonly type: "function";
|
|
227
|
+
readonly name: "approve";
|
|
228
|
+
readonly stateMutability: "nonpayable";
|
|
229
|
+
readonly inputs: readonly [{
|
|
230
|
+
readonly name: "spender";
|
|
231
|
+
readonly type: "address";
|
|
232
|
+
}, {
|
|
233
|
+
readonly name: "value";
|
|
234
|
+
readonly type: "uint256";
|
|
235
|
+
}];
|
|
236
|
+
readonly outputs: readonly [{
|
|
237
|
+
readonly name: "";
|
|
238
|
+
readonly type: "bool";
|
|
239
|
+
}];
|
|
240
|
+
}, {
|
|
241
|
+
readonly type: "function";
|
|
242
|
+
readonly name: "transfer";
|
|
243
|
+
readonly stateMutability: "nonpayable";
|
|
244
|
+
readonly inputs: readonly [{
|
|
245
|
+
readonly name: "to";
|
|
246
|
+
readonly type: "address";
|
|
247
|
+
}, {
|
|
248
|
+
readonly name: "value";
|
|
249
|
+
readonly type: "uint256";
|
|
250
|
+
}];
|
|
251
|
+
readonly outputs: readonly [{
|
|
252
|
+
readonly name: "";
|
|
253
|
+
readonly type: "bool";
|
|
254
|
+
}];
|
|
255
|
+
}, {
|
|
256
|
+
readonly type: "function";
|
|
257
|
+
readonly name: "nonces";
|
|
258
|
+
readonly stateMutability: "view";
|
|
259
|
+
readonly inputs: readonly [{
|
|
260
|
+
readonly name: "owner";
|
|
261
|
+
readonly type: "address";
|
|
262
|
+
}];
|
|
263
|
+
readonly outputs: readonly [{
|
|
264
|
+
readonly name: "";
|
|
265
|
+
readonly type: "uint256";
|
|
266
|
+
}];
|
|
267
|
+
}, {
|
|
268
|
+
readonly type: "function";
|
|
269
|
+
readonly name: "DOMAIN_SEPARATOR";
|
|
270
|
+
readonly stateMutability: "view";
|
|
271
|
+
readonly inputs: readonly [];
|
|
272
|
+
readonly outputs: readonly [{
|
|
273
|
+
readonly name: "";
|
|
274
|
+
readonly type: "bytes32";
|
|
275
|
+
}];
|
|
276
|
+
}, {
|
|
277
|
+
readonly type: "function";
|
|
278
|
+
readonly name: "permit";
|
|
279
|
+
readonly stateMutability: "nonpayable";
|
|
280
|
+
readonly inputs: readonly [{
|
|
281
|
+
readonly name: "owner";
|
|
282
|
+
readonly type: "address";
|
|
283
|
+
}, {
|
|
284
|
+
readonly name: "spender";
|
|
285
|
+
readonly type: "address";
|
|
286
|
+
}, {
|
|
287
|
+
readonly name: "value";
|
|
288
|
+
readonly type: "uint256";
|
|
289
|
+
}, {
|
|
290
|
+
readonly name: "deadline";
|
|
291
|
+
readonly type: "uint256";
|
|
292
|
+
}, {
|
|
293
|
+
readonly name: "v";
|
|
294
|
+
readonly type: "uint8";
|
|
295
|
+
}, {
|
|
296
|
+
readonly name: "r";
|
|
297
|
+
readonly type: "bytes32";
|
|
298
|
+
}, {
|
|
299
|
+
readonly name: "s";
|
|
300
|
+
readonly type: "bytes32";
|
|
301
|
+
}];
|
|
302
|
+
readonly outputs: readonly [];
|
|
303
|
+
}, {
|
|
304
|
+
readonly type: "event";
|
|
305
|
+
readonly name: "Transfer";
|
|
306
|
+
readonly anonymous: false;
|
|
307
|
+
readonly inputs: readonly [{
|
|
308
|
+
readonly name: "from";
|
|
309
|
+
readonly type: "address";
|
|
310
|
+
readonly indexed: true;
|
|
311
|
+
}, {
|
|
312
|
+
readonly name: "to";
|
|
313
|
+
readonly type: "address";
|
|
314
|
+
readonly indexed: true;
|
|
315
|
+
}, {
|
|
316
|
+
readonly name: "value";
|
|
317
|
+
readonly type: "uint256";
|
|
318
|
+
readonly indexed: false;
|
|
319
|
+
}];
|
|
320
|
+
}, {
|
|
321
|
+
readonly type: "event";
|
|
322
|
+
readonly name: "Approval";
|
|
323
|
+
readonly anonymous: false;
|
|
324
|
+
readonly inputs: readonly [{
|
|
325
|
+
readonly name: "owner";
|
|
326
|
+
readonly type: "address";
|
|
327
|
+
readonly indexed: true;
|
|
328
|
+
}, {
|
|
329
|
+
readonly name: "spender";
|
|
330
|
+
readonly type: "address";
|
|
331
|
+
readonly indexed: true;
|
|
332
|
+
}, {
|
|
333
|
+
readonly name: "value";
|
|
334
|
+
readonly type: "uint256";
|
|
335
|
+
readonly indexed: false;
|
|
336
|
+
}];
|
|
337
|
+
}];
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* The parts of Circle's `TokenMessengerWithFees` that Whisk calls, from the ABI
|
|
341
|
+
* in Circle's contract interface reference. Only the `bytes signedQuote`
|
|
342
|
+
* overload of each burn is listed, so encoding never has to pick between them.
|
|
343
|
+
*/
|
|
344
|
+
declare const tokenMessengerWithFeesAbi: readonly [{
|
|
345
|
+
readonly type: "function";
|
|
346
|
+
readonly name: "depositForBurnWithFees";
|
|
347
|
+
readonly stateMutability: "payable";
|
|
348
|
+
readonly inputs: readonly [{
|
|
349
|
+
readonly name: "amount";
|
|
350
|
+
readonly type: "uint256";
|
|
351
|
+
}, {
|
|
352
|
+
readonly name: "destinationDomain";
|
|
353
|
+
readonly type: "uint32";
|
|
354
|
+
}, {
|
|
355
|
+
readonly name: "mintRecipient";
|
|
356
|
+
readonly type: "bytes32";
|
|
357
|
+
}, {
|
|
358
|
+
readonly name: "burnToken";
|
|
359
|
+
readonly type: "address";
|
|
360
|
+
}, {
|
|
361
|
+
readonly name: "destinationCaller";
|
|
362
|
+
readonly type: "bytes32";
|
|
363
|
+
}, {
|
|
364
|
+
readonly name: "claim";
|
|
365
|
+
readonly type: "tuple";
|
|
366
|
+
readonly components: readonly [{
|
|
367
|
+
readonly name: "signedQuote";
|
|
368
|
+
readonly type: "bytes";
|
|
369
|
+
}, {
|
|
370
|
+
readonly name: "refundAddress";
|
|
371
|
+
readonly type: "address";
|
|
372
|
+
}];
|
|
373
|
+
}];
|
|
374
|
+
readonly outputs: readonly [];
|
|
375
|
+
}, {
|
|
376
|
+
readonly type: "function";
|
|
377
|
+
readonly name: "getFee";
|
|
378
|
+
readonly stateMutability: "pure";
|
|
379
|
+
readonly inputs: readonly [{
|
|
380
|
+
readonly name: "signedQuote";
|
|
381
|
+
readonly type: "bytes";
|
|
382
|
+
}];
|
|
383
|
+
readonly outputs: readonly [{
|
|
384
|
+
readonly name: "totalFee";
|
|
385
|
+
readonly type: "uint256";
|
|
386
|
+
}, {
|
|
387
|
+
readonly name: "feeToken";
|
|
388
|
+
readonly type: "address";
|
|
389
|
+
}];
|
|
390
|
+
}, {
|
|
391
|
+
readonly type: "function";
|
|
392
|
+
readonly name: "tokenMessenger";
|
|
393
|
+
readonly stateMutability: "view";
|
|
394
|
+
readonly inputs: readonly [];
|
|
395
|
+
readonly outputs: readonly [{
|
|
396
|
+
readonly name: "";
|
|
397
|
+
readonly type: "address";
|
|
398
|
+
}];
|
|
399
|
+
}];
|
|
400
|
+
|
|
401
|
+
export { messageTransmitterV2Abi, tokenMessengerV2Abi, tokenMessengerWithFeesAbi, usdcAbi };
|