@gitmyabi/cover 1.0.0 → 1.0.1
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/README.md +7 -7
- package/contracts/Cover.d.ts +1978 -0
- package/contracts/Cover.js +2142 -0
- package/contracts/Cover.ts +2585 -0
- package/contracts/OwnedUpgradeabilityProxy.d.ts +266 -0
- package/contracts/OwnedUpgradeabilityProxy.js +294 -0
- package/contracts/OwnedUpgradeabilityProxy.ts +370 -0
- package/contracts/index.d.ts +4 -2
- package/contracts/index.js +7 -4
- package/contracts/index.ts +4 -2
- package/package.json +4 -4
- package/contracts/COVER_json.d.ts +0 -858
- package/contracts/COVER_json.js +0 -862
- package/contracts/COVER_json.ts +0 -1129
|
@@ -0,0 +1,1978 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* BuyCoverParams struct type
|
|
4
|
+
*/
|
|
5
|
+
export type BuyCoverParams = {
|
|
6
|
+
coverId: bigint;
|
|
7
|
+
owner: `0x${string}`;
|
|
8
|
+
productId: bigint;
|
|
9
|
+
coverAsset: bigint;
|
|
10
|
+
amount: bigint;
|
|
11
|
+
period: bigint;
|
|
12
|
+
maxPremiumInAsset: bigint;
|
|
13
|
+
paymentAsset: bigint;
|
|
14
|
+
commissionRatio: bigint;
|
|
15
|
+
commissionDestination: `0x${string}`;
|
|
16
|
+
ipfsData: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* PoolAllocationRequest struct type
|
|
20
|
+
*/
|
|
21
|
+
export type PoolAllocationRequest = {
|
|
22
|
+
poolId: bigint;
|
|
23
|
+
coverAmountInAsset: bigint;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* RiRequest struct type
|
|
27
|
+
*/
|
|
28
|
+
export type RiRequest = {
|
|
29
|
+
providerId: bigint;
|
|
30
|
+
amount: bigint;
|
|
31
|
+
premium: bigint;
|
|
32
|
+
signature: `0x${string}`;
|
|
33
|
+
data: `0x${string}`;
|
|
34
|
+
dataFormat: bigint;
|
|
35
|
+
deadline: bigint;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* CoverData struct type
|
|
39
|
+
*/
|
|
40
|
+
export type CoverData = {
|
|
41
|
+
productId: bigint;
|
|
42
|
+
coverAsset: bigint;
|
|
43
|
+
amount: bigint;
|
|
44
|
+
start: bigint;
|
|
45
|
+
period: bigint;
|
|
46
|
+
gracePeriod: bigint;
|
|
47
|
+
rewardsRatio: bigint;
|
|
48
|
+
capacityRatio: bigint;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* CoverReference struct type
|
|
52
|
+
*/
|
|
53
|
+
export type CoverReference = {
|
|
54
|
+
originalCoverId: bigint;
|
|
55
|
+
latestCoverId: bigint;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Ri struct type
|
|
59
|
+
*/
|
|
60
|
+
export type Ri = {
|
|
61
|
+
providerId: bigint;
|
|
62
|
+
amount: bigint;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* PoolAllocation struct type
|
|
66
|
+
*/
|
|
67
|
+
export type PoolAllocation = {
|
|
68
|
+
poolId: bigint;
|
|
69
|
+
coverAmountInNXM: bigint;
|
|
70
|
+
premiumInNXM: bigint;
|
|
71
|
+
allocationId: bigint;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* RiConfig struct type
|
|
75
|
+
*/
|
|
76
|
+
export type RiConfig = {
|
|
77
|
+
nextNonce: bigint;
|
|
78
|
+
premiumDestination: `0x${string}`;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Cover ABI
|
|
82
|
+
*
|
|
83
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
84
|
+
*/
|
|
85
|
+
export declare const CoverAbi: readonly [{
|
|
86
|
+
readonly inputs: readonly [{
|
|
87
|
+
readonly internalType: "address";
|
|
88
|
+
readonly name: "_registry";
|
|
89
|
+
readonly type: "address";
|
|
90
|
+
}, {
|
|
91
|
+
readonly internalType: "address";
|
|
92
|
+
readonly name: "_stakingPoolImplementation";
|
|
93
|
+
readonly type: "address";
|
|
94
|
+
}, {
|
|
95
|
+
readonly internalType: "address";
|
|
96
|
+
readonly name: "_verifyingAddress";
|
|
97
|
+
readonly type: "address";
|
|
98
|
+
}];
|
|
99
|
+
readonly stateMutability: "nonpayable";
|
|
100
|
+
readonly type: "constructor";
|
|
101
|
+
}, {
|
|
102
|
+
readonly inputs: readonly [{
|
|
103
|
+
readonly internalType: "uint256";
|
|
104
|
+
readonly name: "coverId";
|
|
105
|
+
readonly type: "uint256";
|
|
106
|
+
}];
|
|
107
|
+
readonly name: "AlreadyMigratedCoverData";
|
|
108
|
+
readonly type: "error";
|
|
109
|
+
}, {
|
|
110
|
+
readonly inputs: readonly [];
|
|
111
|
+
readonly name: "CommissionRateTooHigh";
|
|
112
|
+
readonly type: "error";
|
|
113
|
+
}, {
|
|
114
|
+
readonly inputs: readonly [];
|
|
115
|
+
readonly name: "CoverAmountIsZero";
|
|
116
|
+
readonly type: "error";
|
|
117
|
+
}, {
|
|
118
|
+
readonly inputs: readonly [];
|
|
119
|
+
readonly name: "CoverAssetMismatch";
|
|
120
|
+
readonly type: "error";
|
|
121
|
+
}, {
|
|
122
|
+
readonly inputs: readonly [];
|
|
123
|
+
readonly name: "CoverAssetNotSupported";
|
|
124
|
+
readonly type: "error";
|
|
125
|
+
}, {
|
|
126
|
+
readonly inputs: readonly [{
|
|
127
|
+
readonly internalType: "uint256";
|
|
128
|
+
readonly name: "coverId";
|
|
129
|
+
readonly type: "uint256";
|
|
130
|
+
}];
|
|
131
|
+
readonly name: "CoverNotYetExpired";
|
|
132
|
+
readonly type: "error";
|
|
133
|
+
}, {
|
|
134
|
+
readonly inputs: readonly [];
|
|
135
|
+
readonly name: "CoverPeriodTooLong";
|
|
136
|
+
readonly type: "error";
|
|
137
|
+
}, {
|
|
138
|
+
readonly inputs: readonly [];
|
|
139
|
+
readonly name: "CoverPeriodTooShort";
|
|
140
|
+
readonly type: "error";
|
|
141
|
+
}, {
|
|
142
|
+
readonly inputs: readonly [{
|
|
143
|
+
readonly internalType: "address";
|
|
144
|
+
readonly name: "to";
|
|
145
|
+
readonly type: "address";
|
|
146
|
+
}, {
|
|
147
|
+
readonly internalType: "uint256";
|
|
148
|
+
readonly name: "amount";
|
|
149
|
+
readonly type: "uint256";
|
|
150
|
+
}];
|
|
151
|
+
readonly name: "ETHTransferFailed";
|
|
152
|
+
readonly type: "error";
|
|
153
|
+
}, {
|
|
154
|
+
readonly inputs: readonly [];
|
|
155
|
+
readonly name: "EditNotSupported";
|
|
156
|
+
readonly type: "error";
|
|
157
|
+
}, {
|
|
158
|
+
readonly inputs: readonly [];
|
|
159
|
+
readonly name: "ExpiredCoversCannotBeEdited";
|
|
160
|
+
readonly type: "error";
|
|
161
|
+
}, {
|
|
162
|
+
readonly inputs: readonly [];
|
|
163
|
+
readonly name: "InsufficientCoverAmountAllocated";
|
|
164
|
+
readonly type: "error";
|
|
165
|
+
}, {
|
|
166
|
+
readonly inputs: readonly [];
|
|
167
|
+
readonly name: "InsufficientEthSent";
|
|
168
|
+
readonly type: "error";
|
|
169
|
+
}, {
|
|
170
|
+
readonly inputs: readonly [];
|
|
171
|
+
readonly name: "InvalidPaymentAsset";
|
|
172
|
+
readonly type: "error";
|
|
173
|
+
}, {
|
|
174
|
+
readonly inputs: readonly [];
|
|
175
|
+
readonly name: "InvalidRiConfig";
|
|
176
|
+
readonly type: "error";
|
|
177
|
+
}, {
|
|
178
|
+
readonly inputs: readonly [];
|
|
179
|
+
readonly name: "InvalidSignature";
|
|
180
|
+
readonly type: "error";
|
|
181
|
+
}, {
|
|
182
|
+
readonly inputs: readonly [];
|
|
183
|
+
readonly name: "IpfsMetadataAlreadySet";
|
|
184
|
+
readonly type: "error";
|
|
185
|
+
}, {
|
|
186
|
+
readonly inputs: readonly [{
|
|
187
|
+
readonly internalType: "uint256";
|
|
188
|
+
readonly name: "originalCoverId";
|
|
189
|
+
readonly type: "uint256";
|
|
190
|
+
}];
|
|
191
|
+
readonly name: "MustBeOriginalCoverId";
|
|
192
|
+
readonly type: "error";
|
|
193
|
+
}, {
|
|
194
|
+
readonly inputs: readonly [];
|
|
195
|
+
readonly name: "OnlyAdvisoryBoard";
|
|
196
|
+
readonly type: "error";
|
|
197
|
+
}, {
|
|
198
|
+
readonly inputs: readonly [];
|
|
199
|
+
readonly name: "OnlyMember";
|
|
200
|
+
readonly type: "error";
|
|
201
|
+
}, {
|
|
202
|
+
readonly inputs: readonly [];
|
|
203
|
+
readonly name: "OnlyOwnerOrApproved";
|
|
204
|
+
readonly type: "error";
|
|
205
|
+
}, {
|
|
206
|
+
readonly inputs: readonly [{
|
|
207
|
+
readonly internalType: "uint256";
|
|
208
|
+
readonly name: "currentState";
|
|
209
|
+
readonly type: "uint256";
|
|
210
|
+
}, {
|
|
211
|
+
readonly internalType: "uint256";
|
|
212
|
+
readonly name: "checks";
|
|
213
|
+
readonly type: "uint256";
|
|
214
|
+
}];
|
|
215
|
+
readonly name: "Paused";
|
|
216
|
+
readonly type: "error";
|
|
217
|
+
}, {
|
|
218
|
+
readonly inputs: readonly [];
|
|
219
|
+
readonly name: "PriceExceedsMaxPremiumInAsset";
|
|
220
|
+
readonly type: "error";
|
|
221
|
+
}, {
|
|
222
|
+
readonly inputs: readonly [];
|
|
223
|
+
readonly name: "ProductDeprecated";
|
|
224
|
+
readonly type: "error";
|
|
225
|
+
}, {
|
|
226
|
+
readonly inputs: readonly [];
|
|
227
|
+
readonly name: "ProductNotFound";
|
|
228
|
+
readonly type: "error";
|
|
229
|
+
}, {
|
|
230
|
+
readonly inputs: readonly [];
|
|
231
|
+
readonly name: "ReentrantCall";
|
|
232
|
+
readonly type: "error";
|
|
233
|
+
}, {
|
|
234
|
+
readonly inputs: readonly [{
|
|
235
|
+
readonly internalType: "uint256";
|
|
236
|
+
readonly name: "index";
|
|
237
|
+
readonly type: "uint256";
|
|
238
|
+
}];
|
|
239
|
+
readonly name: "RevertedWithoutReason";
|
|
240
|
+
readonly type: "error";
|
|
241
|
+
}, {
|
|
242
|
+
readonly inputs: readonly [];
|
|
243
|
+
readonly name: "RiAmountIsZero";
|
|
244
|
+
readonly type: "error";
|
|
245
|
+
}, {
|
|
246
|
+
readonly inputs: readonly [];
|
|
247
|
+
readonly name: "SignatureExpired";
|
|
248
|
+
readonly type: "error";
|
|
249
|
+
}, {
|
|
250
|
+
readonly inputs: readonly [{
|
|
251
|
+
readonly internalType: "address";
|
|
252
|
+
readonly name: "caller";
|
|
253
|
+
readonly type: "address";
|
|
254
|
+
}, {
|
|
255
|
+
readonly internalType: "uint256";
|
|
256
|
+
readonly name: "callerIndex";
|
|
257
|
+
readonly type: "uint256";
|
|
258
|
+
}, {
|
|
259
|
+
readonly internalType: "uint256";
|
|
260
|
+
readonly name: "authorizedBitmap";
|
|
261
|
+
readonly type: "uint256";
|
|
262
|
+
}];
|
|
263
|
+
readonly name: "Unauthorized";
|
|
264
|
+
readonly type: "error";
|
|
265
|
+
}, {
|
|
266
|
+
readonly inputs: readonly [];
|
|
267
|
+
readonly name: "UnexpectedEthSent";
|
|
268
|
+
readonly type: "error";
|
|
269
|
+
}, {
|
|
270
|
+
readonly inputs: readonly [];
|
|
271
|
+
readonly name: "UnexpectedRiPremium";
|
|
272
|
+
readonly type: "error";
|
|
273
|
+
}, {
|
|
274
|
+
readonly inputs: readonly [];
|
|
275
|
+
readonly name: "WrongCoverEditEntrypoint";
|
|
276
|
+
readonly type: "error";
|
|
277
|
+
}, {
|
|
278
|
+
readonly anonymous: false;
|
|
279
|
+
readonly inputs: readonly [{
|
|
280
|
+
readonly indexed: true;
|
|
281
|
+
readonly internalType: "uint256";
|
|
282
|
+
readonly name: "coverId";
|
|
283
|
+
readonly type: "uint256";
|
|
284
|
+
}, {
|
|
285
|
+
readonly indexed: true;
|
|
286
|
+
readonly internalType: "uint256";
|
|
287
|
+
readonly name: "originalCoverId";
|
|
288
|
+
readonly type: "uint256";
|
|
289
|
+
}, {
|
|
290
|
+
readonly indexed: true;
|
|
291
|
+
readonly internalType: "uint256";
|
|
292
|
+
readonly name: "buyerMemberId";
|
|
293
|
+
readonly type: "uint256";
|
|
294
|
+
}, {
|
|
295
|
+
readonly indexed: false;
|
|
296
|
+
readonly internalType: "uint256";
|
|
297
|
+
readonly name: "productId";
|
|
298
|
+
readonly type: "uint256";
|
|
299
|
+
}];
|
|
300
|
+
readonly name: "CoverBought";
|
|
301
|
+
readonly type: "event";
|
|
302
|
+
}, {
|
|
303
|
+
readonly anonymous: false;
|
|
304
|
+
readonly inputs: readonly [{
|
|
305
|
+
readonly indexed: true;
|
|
306
|
+
readonly internalType: "uint256";
|
|
307
|
+
readonly name: "coverId";
|
|
308
|
+
readonly type: "uint256";
|
|
309
|
+
}, {
|
|
310
|
+
readonly indexed: false;
|
|
311
|
+
readonly internalType: "uint256";
|
|
312
|
+
readonly name: "premium";
|
|
313
|
+
readonly type: "uint256";
|
|
314
|
+
}, {
|
|
315
|
+
readonly indexed: false;
|
|
316
|
+
readonly internalType: "uint256";
|
|
317
|
+
readonly name: "paymentAsset";
|
|
318
|
+
readonly type: "uint256";
|
|
319
|
+
}, {
|
|
320
|
+
readonly indexed: false;
|
|
321
|
+
readonly internalType: "bytes";
|
|
322
|
+
readonly name: "data";
|
|
323
|
+
readonly type: "bytes";
|
|
324
|
+
}, {
|
|
325
|
+
readonly indexed: false;
|
|
326
|
+
readonly internalType: "uint8";
|
|
327
|
+
readonly name: "dataFormatVersion";
|
|
328
|
+
readonly type: "uint8";
|
|
329
|
+
}];
|
|
330
|
+
readonly name: "CoverRiAllocated";
|
|
331
|
+
readonly type: "event";
|
|
332
|
+
}, {
|
|
333
|
+
readonly inputs: readonly [];
|
|
334
|
+
readonly name: "DEFAULT_MIN_PRICE_RATIO";
|
|
335
|
+
readonly outputs: readonly [{
|
|
336
|
+
readonly internalType: "uint256";
|
|
337
|
+
readonly name: "";
|
|
338
|
+
readonly type: "uint256";
|
|
339
|
+
}];
|
|
340
|
+
readonly stateMutability: "view";
|
|
341
|
+
readonly type: "function";
|
|
342
|
+
}, {
|
|
343
|
+
readonly inputs: readonly [];
|
|
344
|
+
readonly name: "DOMAIN_SEPARATOR";
|
|
345
|
+
readonly outputs: readonly [{
|
|
346
|
+
readonly internalType: "bytes32";
|
|
347
|
+
readonly name: "";
|
|
348
|
+
readonly type: "bytes32";
|
|
349
|
+
}];
|
|
350
|
+
readonly stateMutability: "view";
|
|
351
|
+
readonly type: "function";
|
|
352
|
+
}, {
|
|
353
|
+
readonly inputs: readonly [];
|
|
354
|
+
readonly name: "MAX_COMMISSION_RATIO";
|
|
355
|
+
readonly outputs: readonly [{
|
|
356
|
+
readonly internalType: "uint256";
|
|
357
|
+
readonly name: "";
|
|
358
|
+
readonly type: "uint256";
|
|
359
|
+
}];
|
|
360
|
+
readonly stateMutability: "view";
|
|
361
|
+
readonly type: "function";
|
|
362
|
+
}, {
|
|
363
|
+
readonly inputs: readonly [];
|
|
364
|
+
readonly name: "NXM_PER_ALLOCATION_UNIT";
|
|
365
|
+
readonly outputs: readonly [{
|
|
366
|
+
readonly internalType: "uint256";
|
|
367
|
+
readonly name: "";
|
|
368
|
+
readonly type: "uint256";
|
|
369
|
+
}];
|
|
370
|
+
readonly stateMutability: "view";
|
|
371
|
+
readonly type: "function";
|
|
372
|
+
}, {
|
|
373
|
+
readonly inputs: readonly [{
|
|
374
|
+
readonly internalType: "uint256";
|
|
375
|
+
readonly name: "assetId";
|
|
376
|
+
readonly type: "uint256";
|
|
377
|
+
}];
|
|
378
|
+
readonly name: "activeCover";
|
|
379
|
+
readonly outputs: readonly [{
|
|
380
|
+
readonly internalType: "uint192";
|
|
381
|
+
readonly name: "totalActiveCoverInAsset";
|
|
382
|
+
readonly type: "uint192";
|
|
383
|
+
}, {
|
|
384
|
+
readonly internalType: "uint64";
|
|
385
|
+
readonly name: "lastBucketUpdateId";
|
|
386
|
+
readonly type: "uint64";
|
|
387
|
+
}];
|
|
388
|
+
readonly stateMutability: "view";
|
|
389
|
+
readonly type: "function";
|
|
390
|
+
}, {
|
|
391
|
+
readonly inputs: readonly [{
|
|
392
|
+
readonly internalType: "uint256";
|
|
393
|
+
readonly name: "coverId";
|
|
394
|
+
readonly type: "uint256";
|
|
395
|
+
}, {
|
|
396
|
+
readonly internalType: "uint256";
|
|
397
|
+
readonly name: "payoutAmountInAsset";
|
|
398
|
+
readonly type: "uint256";
|
|
399
|
+
}];
|
|
400
|
+
readonly name: "burnStake";
|
|
401
|
+
readonly outputs: readonly [];
|
|
402
|
+
readonly stateMutability: "nonpayable";
|
|
403
|
+
readonly type: "function";
|
|
404
|
+
}, {
|
|
405
|
+
readonly inputs: readonly [{
|
|
406
|
+
readonly components: readonly [{
|
|
407
|
+
readonly internalType: "uint256";
|
|
408
|
+
readonly name: "coverId";
|
|
409
|
+
readonly type: "uint256";
|
|
410
|
+
}, {
|
|
411
|
+
readonly internalType: "address";
|
|
412
|
+
readonly name: "owner";
|
|
413
|
+
readonly type: "address";
|
|
414
|
+
}, {
|
|
415
|
+
readonly internalType: "uint24";
|
|
416
|
+
readonly name: "productId";
|
|
417
|
+
readonly type: "uint24";
|
|
418
|
+
}, {
|
|
419
|
+
readonly internalType: "uint8";
|
|
420
|
+
readonly name: "coverAsset";
|
|
421
|
+
readonly type: "uint8";
|
|
422
|
+
}, {
|
|
423
|
+
readonly internalType: "uint96";
|
|
424
|
+
readonly name: "amount";
|
|
425
|
+
readonly type: "uint96";
|
|
426
|
+
}, {
|
|
427
|
+
readonly internalType: "uint32";
|
|
428
|
+
readonly name: "period";
|
|
429
|
+
readonly type: "uint32";
|
|
430
|
+
}, {
|
|
431
|
+
readonly internalType: "uint256";
|
|
432
|
+
readonly name: "maxPremiumInAsset";
|
|
433
|
+
readonly type: "uint256";
|
|
434
|
+
}, {
|
|
435
|
+
readonly internalType: "uint8";
|
|
436
|
+
readonly name: "paymentAsset";
|
|
437
|
+
readonly type: "uint8";
|
|
438
|
+
}, {
|
|
439
|
+
readonly internalType: "uint16";
|
|
440
|
+
readonly name: "commissionRatio";
|
|
441
|
+
readonly type: "uint16";
|
|
442
|
+
}, {
|
|
443
|
+
readonly internalType: "address";
|
|
444
|
+
readonly name: "commissionDestination";
|
|
445
|
+
readonly type: "address";
|
|
446
|
+
}, {
|
|
447
|
+
readonly internalType: "string";
|
|
448
|
+
readonly name: "ipfsData";
|
|
449
|
+
readonly type: "string";
|
|
450
|
+
}];
|
|
451
|
+
readonly internalType: "struct BuyCoverParams";
|
|
452
|
+
readonly name: "params";
|
|
453
|
+
readonly type: "tuple";
|
|
454
|
+
}, {
|
|
455
|
+
readonly components: readonly [{
|
|
456
|
+
readonly internalType: "uint256";
|
|
457
|
+
readonly name: "poolId";
|
|
458
|
+
readonly type: "uint256";
|
|
459
|
+
}, {
|
|
460
|
+
readonly internalType: "uint256";
|
|
461
|
+
readonly name: "coverAmountInAsset";
|
|
462
|
+
readonly type: "uint256";
|
|
463
|
+
}];
|
|
464
|
+
readonly internalType: "struct PoolAllocationRequest[]";
|
|
465
|
+
readonly name: "poolAllocationRequests";
|
|
466
|
+
readonly type: "tuple[]";
|
|
467
|
+
}];
|
|
468
|
+
readonly name: "buyCover";
|
|
469
|
+
readonly outputs: readonly [{
|
|
470
|
+
readonly internalType: "uint256";
|
|
471
|
+
readonly name: "coverId";
|
|
472
|
+
readonly type: "uint256";
|
|
473
|
+
}];
|
|
474
|
+
readonly stateMutability: "payable";
|
|
475
|
+
readonly type: "function";
|
|
476
|
+
}, {
|
|
477
|
+
readonly inputs: readonly [{
|
|
478
|
+
readonly components: readonly [{
|
|
479
|
+
readonly internalType: "uint256";
|
|
480
|
+
readonly name: "coverId";
|
|
481
|
+
readonly type: "uint256";
|
|
482
|
+
}, {
|
|
483
|
+
readonly internalType: "address";
|
|
484
|
+
readonly name: "owner";
|
|
485
|
+
readonly type: "address";
|
|
486
|
+
}, {
|
|
487
|
+
readonly internalType: "uint24";
|
|
488
|
+
readonly name: "productId";
|
|
489
|
+
readonly type: "uint24";
|
|
490
|
+
}, {
|
|
491
|
+
readonly internalType: "uint8";
|
|
492
|
+
readonly name: "coverAsset";
|
|
493
|
+
readonly type: "uint8";
|
|
494
|
+
}, {
|
|
495
|
+
readonly internalType: "uint96";
|
|
496
|
+
readonly name: "amount";
|
|
497
|
+
readonly type: "uint96";
|
|
498
|
+
}, {
|
|
499
|
+
readonly internalType: "uint32";
|
|
500
|
+
readonly name: "period";
|
|
501
|
+
readonly type: "uint32";
|
|
502
|
+
}, {
|
|
503
|
+
readonly internalType: "uint256";
|
|
504
|
+
readonly name: "maxPremiumInAsset";
|
|
505
|
+
readonly type: "uint256";
|
|
506
|
+
}, {
|
|
507
|
+
readonly internalType: "uint8";
|
|
508
|
+
readonly name: "paymentAsset";
|
|
509
|
+
readonly type: "uint8";
|
|
510
|
+
}, {
|
|
511
|
+
readonly internalType: "uint16";
|
|
512
|
+
readonly name: "commissionRatio";
|
|
513
|
+
readonly type: "uint16";
|
|
514
|
+
}, {
|
|
515
|
+
readonly internalType: "address";
|
|
516
|
+
readonly name: "commissionDestination";
|
|
517
|
+
readonly type: "address";
|
|
518
|
+
}, {
|
|
519
|
+
readonly internalType: "string";
|
|
520
|
+
readonly name: "ipfsData";
|
|
521
|
+
readonly type: "string";
|
|
522
|
+
}];
|
|
523
|
+
readonly internalType: "struct BuyCoverParams";
|
|
524
|
+
readonly name: "params";
|
|
525
|
+
readonly type: "tuple";
|
|
526
|
+
}, {
|
|
527
|
+
readonly components: readonly [{
|
|
528
|
+
readonly internalType: "uint256";
|
|
529
|
+
readonly name: "poolId";
|
|
530
|
+
readonly type: "uint256";
|
|
531
|
+
}, {
|
|
532
|
+
readonly internalType: "uint256";
|
|
533
|
+
readonly name: "coverAmountInAsset";
|
|
534
|
+
readonly type: "uint256";
|
|
535
|
+
}];
|
|
536
|
+
readonly internalType: "struct PoolAllocationRequest[]";
|
|
537
|
+
readonly name: "poolAllocationRequests";
|
|
538
|
+
readonly type: "tuple[]";
|
|
539
|
+
}, {
|
|
540
|
+
readonly components: readonly [{
|
|
541
|
+
readonly internalType: "uint256";
|
|
542
|
+
readonly name: "providerId";
|
|
543
|
+
readonly type: "uint256";
|
|
544
|
+
}, {
|
|
545
|
+
readonly internalType: "uint256";
|
|
546
|
+
readonly name: "amount";
|
|
547
|
+
readonly type: "uint256";
|
|
548
|
+
}, {
|
|
549
|
+
readonly internalType: "uint256";
|
|
550
|
+
readonly name: "premium";
|
|
551
|
+
readonly type: "uint256";
|
|
552
|
+
}, {
|
|
553
|
+
readonly internalType: "bytes";
|
|
554
|
+
readonly name: "signature";
|
|
555
|
+
readonly type: "bytes";
|
|
556
|
+
}, {
|
|
557
|
+
readonly internalType: "bytes";
|
|
558
|
+
readonly name: "data";
|
|
559
|
+
readonly type: "bytes";
|
|
560
|
+
}, {
|
|
561
|
+
readonly internalType: "uint8";
|
|
562
|
+
readonly name: "dataFormat";
|
|
563
|
+
readonly type: "uint8";
|
|
564
|
+
}, {
|
|
565
|
+
readonly internalType: "uint32";
|
|
566
|
+
readonly name: "deadline";
|
|
567
|
+
readonly type: "uint32";
|
|
568
|
+
}];
|
|
569
|
+
readonly internalType: "struct RiRequest";
|
|
570
|
+
readonly name: "riRequest";
|
|
571
|
+
readonly type: "tuple";
|
|
572
|
+
}];
|
|
573
|
+
readonly name: "buyCoverWithRi";
|
|
574
|
+
readonly outputs: readonly [{
|
|
575
|
+
readonly internalType: "uint256";
|
|
576
|
+
readonly name: "coverId";
|
|
577
|
+
readonly type: "uint256";
|
|
578
|
+
}];
|
|
579
|
+
readonly stateMutability: "payable";
|
|
580
|
+
readonly type: "function";
|
|
581
|
+
}, {
|
|
582
|
+
readonly inputs: readonly [{
|
|
583
|
+
readonly internalType: "address";
|
|
584
|
+
readonly name: "_coverNFTDescriptor";
|
|
585
|
+
readonly type: "address";
|
|
586
|
+
}];
|
|
587
|
+
readonly name: "changeCoverNFTDescriptor";
|
|
588
|
+
readonly outputs: readonly [];
|
|
589
|
+
readonly stateMutability: "nonpayable";
|
|
590
|
+
readonly type: "function";
|
|
591
|
+
}, {
|
|
592
|
+
readonly inputs: readonly [{
|
|
593
|
+
readonly internalType: "address";
|
|
594
|
+
readonly name: "_stakingNFTDescriptor";
|
|
595
|
+
readonly type: "address";
|
|
596
|
+
}];
|
|
597
|
+
readonly name: "changeStakingNFTDescriptor";
|
|
598
|
+
readonly outputs: readonly [];
|
|
599
|
+
readonly stateMutability: "nonpayable";
|
|
600
|
+
readonly type: "function";
|
|
601
|
+
}, {
|
|
602
|
+
readonly inputs: readonly [];
|
|
603
|
+
readonly name: "claims";
|
|
604
|
+
readonly outputs: readonly [{
|
|
605
|
+
readonly internalType: "address";
|
|
606
|
+
readonly name: "";
|
|
607
|
+
readonly type: "address";
|
|
608
|
+
}];
|
|
609
|
+
readonly stateMutability: "view";
|
|
610
|
+
readonly type: "function";
|
|
611
|
+
}, {
|
|
612
|
+
readonly inputs: readonly [];
|
|
613
|
+
readonly name: "coverNFT";
|
|
614
|
+
readonly outputs: readonly [{
|
|
615
|
+
readonly internalType: "contract ICoverNFT";
|
|
616
|
+
readonly name: "";
|
|
617
|
+
readonly type: "address";
|
|
618
|
+
}];
|
|
619
|
+
readonly stateMutability: "view";
|
|
620
|
+
readonly type: "function";
|
|
621
|
+
}, {
|
|
622
|
+
readonly inputs: readonly [];
|
|
623
|
+
readonly name: "coverProducts";
|
|
624
|
+
readonly outputs: readonly [{
|
|
625
|
+
readonly internalType: "contract ICoverProducts";
|
|
626
|
+
readonly name: "";
|
|
627
|
+
readonly type: "address";
|
|
628
|
+
}];
|
|
629
|
+
readonly stateMutability: "view";
|
|
630
|
+
readonly type: "function";
|
|
631
|
+
}, {
|
|
632
|
+
readonly inputs: readonly [{
|
|
633
|
+
readonly components: readonly [{
|
|
634
|
+
readonly internalType: "uint256";
|
|
635
|
+
readonly name: "coverId";
|
|
636
|
+
readonly type: "uint256";
|
|
637
|
+
}, {
|
|
638
|
+
readonly internalType: "address";
|
|
639
|
+
readonly name: "owner";
|
|
640
|
+
readonly type: "address";
|
|
641
|
+
}, {
|
|
642
|
+
readonly internalType: "uint24";
|
|
643
|
+
readonly name: "productId";
|
|
644
|
+
readonly type: "uint24";
|
|
645
|
+
}, {
|
|
646
|
+
readonly internalType: "uint8";
|
|
647
|
+
readonly name: "coverAsset";
|
|
648
|
+
readonly type: "uint8";
|
|
649
|
+
}, {
|
|
650
|
+
readonly internalType: "uint96";
|
|
651
|
+
readonly name: "amount";
|
|
652
|
+
readonly type: "uint96";
|
|
653
|
+
}, {
|
|
654
|
+
readonly internalType: "uint32";
|
|
655
|
+
readonly name: "period";
|
|
656
|
+
readonly type: "uint32";
|
|
657
|
+
}, {
|
|
658
|
+
readonly internalType: "uint256";
|
|
659
|
+
readonly name: "maxPremiumInAsset";
|
|
660
|
+
readonly type: "uint256";
|
|
661
|
+
}, {
|
|
662
|
+
readonly internalType: "uint8";
|
|
663
|
+
readonly name: "paymentAsset";
|
|
664
|
+
readonly type: "uint8";
|
|
665
|
+
}, {
|
|
666
|
+
readonly internalType: "uint16";
|
|
667
|
+
readonly name: "commissionRatio";
|
|
668
|
+
readonly type: "uint16";
|
|
669
|
+
}, {
|
|
670
|
+
readonly internalType: "address";
|
|
671
|
+
readonly name: "commissionDestination";
|
|
672
|
+
readonly type: "address";
|
|
673
|
+
}, {
|
|
674
|
+
readonly internalType: "string";
|
|
675
|
+
readonly name: "ipfsData";
|
|
676
|
+
readonly type: "string";
|
|
677
|
+
}];
|
|
678
|
+
readonly internalType: "struct BuyCoverParams";
|
|
679
|
+
readonly name: "params";
|
|
680
|
+
readonly type: "tuple";
|
|
681
|
+
}, {
|
|
682
|
+
readonly components: readonly [{
|
|
683
|
+
readonly internalType: "uint256";
|
|
684
|
+
readonly name: "poolId";
|
|
685
|
+
readonly type: "uint256";
|
|
686
|
+
}, {
|
|
687
|
+
readonly internalType: "uint256";
|
|
688
|
+
readonly name: "coverAmountInAsset";
|
|
689
|
+
readonly type: "uint256";
|
|
690
|
+
}];
|
|
691
|
+
readonly internalType: "struct PoolAllocationRequest[]";
|
|
692
|
+
readonly name: "poolAllocationRequests";
|
|
693
|
+
readonly type: "tuple[]";
|
|
694
|
+
}, {
|
|
695
|
+
readonly internalType: "address";
|
|
696
|
+
readonly name: "buyer";
|
|
697
|
+
readonly type: "address";
|
|
698
|
+
}];
|
|
699
|
+
readonly name: "executeCoverBuy";
|
|
700
|
+
readonly outputs: readonly [{
|
|
701
|
+
readonly internalType: "uint256";
|
|
702
|
+
readonly name: "coverId";
|
|
703
|
+
readonly type: "uint256";
|
|
704
|
+
}];
|
|
705
|
+
readonly stateMutability: "payable";
|
|
706
|
+
readonly type: "function";
|
|
707
|
+
}, {
|
|
708
|
+
readonly inputs: readonly [{
|
|
709
|
+
readonly internalType: "uint256";
|
|
710
|
+
readonly name: "coverId";
|
|
711
|
+
readonly type: "uint256";
|
|
712
|
+
}];
|
|
713
|
+
readonly name: "expireCover";
|
|
714
|
+
readonly outputs: readonly [];
|
|
715
|
+
readonly stateMutability: "nonpayable";
|
|
716
|
+
readonly type: "function";
|
|
717
|
+
}, {
|
|
718
|
+
readonly inputs: readonly [{
|
|
719
|
+
readonly internalType: "uint256";
|
|
720
|
+
readonly name: "coverId";
|
|
721
|
+
readonly type: "uint256";
|
|
722
|
+
}];
|
|
723
|
+
readonly name: "getCoverData";
|
|
724
|
+
readonly outputs: readonly [{
|
|
725
|
+
readonly components: readonly [{
|
|
726
|
+
readonly internalType: "uint24";
|
|
727
|
+
readonly name: "productId";
|
|
728
|
+
readonly type: "uint24";
|
|
729
|
+
}, {
|
|
730
|
+
readonly internalType: "uint8";
|
|
731
|
+
readonly name: "coverAsset";
|
|
732
|
+
readonly type: "uint8";
|
|
733
|
+
}, {
|
|
734
|
+
readonly internalType: "uint96";
|
|
735
|
+
readonly name: "amount";
|
|
736
|
+
readonly type: "uint96";
|
|
737
|
+
}, {
|
|
738
|
+
readonly internalType: "uint32";
|
|
739
|
+
readonly name: "start";
|
|
740
|
+
readonly type: "uint32";
|
|
741
|
+
}, {
|
|
742
|
+
readonly internalType: "uint32";
|
|
743
|
+
readonly name: "period";
|
|
744
|
+
readonly type: "uint32";
|
|
745
|
+
}, {
|
|
746
|
+
readonly internalType: "uint32";
|
|
747
|
+
readonly name: "gracePeriod";
|
|
748
|
+
readonly type: "uint32";
|
|
749
|
+
}, {
|
|
750
|
+
readonly internalType: "uint16";
|
|
751
|
+
readonly name: "rewardsRatio";
|
|
752
|
+
readonly type: "uint16";
|
|
753
|
+
}, {
|
|
754
|
+
readonly internalType: "uint16";
|
|
755
|
+
readonly name: "capacityRatio";
|
|
756
|
+
readonly type: "uint16";
|
|
757
|
+
}];
|
|
758
|
+
readonly internalType: "struct CoverData";
|
|
759
|
+
readonly name: "";
|
|
760
|
+
readonly type: "tuple";
|
|
761
|
+
}];
|
|
762
|
+
readonly stateMutability: "view";
|
|
763
|
+
readonly type: "function";
|
|
764
|
+
}, {
|
|
765
|
+
readonly inputs: readonly [];
|
|
766
|
+
readonly name: "getCoverDataCount";
|
|
767
|
+
readonly outputs: readonly [{
|
|
768
|
+
readonly internalType: "uint256";
|
|
769
|
+
readonly name: "";
|
|
770
|
+
readonly type: "uint256";
|
|
771
|
+
}];
|
|
772
|
+
readonly stateMutability: "view";
|
|
773
|
+
readonly type: "function";
|
|
774
|
+
}, {
|
|
775
|
+
readonly inputs: readonly [{
|
|
776
|
+
readonly internalType: "uint256";
|
|
777
|
+
readonly name: "coverId";
|
|
778
|
+
readonly type: "uint256";
|
|
779
|
+
}];
|
|
780
|
+
readonly name: "getCoverDataWithReference";
|
|
781
|
+
readonly outputs: readonly [{
|
|
782
|
+
readonly components: readonly [{
|
|
783
|
+
readonly internalType: "uint24";
|
|
784
|
+
readonly name: "productId";
|
|
785
|
+
readonly type: "uint24";
|
|
786
|
+
}, {
|
|
787
|
+
readonly internalType: "uint8";
|
|
788
|
+
readonly name: "coverAsset";
|
|
789
|
+
readonly type: "uint8";
|
|
790
|
+
}, {
|
|
791
|
+
readonly internalType: "uint96";
|
|
792
|
+
readonly name: "amount";
|
|
793
|
+
readonly type: "uint96";
|
|
794
|
+
}, {
|
|
795
|
+
readonly internalType: "uint32";
|
|
796
|
+
readonly name: "start";
|
|
797
|
+
readonly type: "uint32";
|
|
798
|
+
}, {
|
|
799
|
+
readonly internalType: "uint32";
|
|
800
|
+
readonly name: "period";
|
|
801
|
+
readonly type: "uint32";
|
|
802
|
+
}, {
|
|
803
|
+
readonly internalType: "uint32";
|
|
804
|
+
readonly name: "gracePeriod";
|
|
805
|
+
readonly type: "uint32";
|
|
806
|
+
}, {
|
|
807
|
+
readonly internalType: "uint16";
|
|
808
|
+
readonly name: "rewardsRatio";
|
|
809
|
+
readonly type: "uint16";
|
|
810
|
+
}, {
|
|
811
|
+
readonly internalType: "uint16";
|
|
812
|
+
readonly name: "capacityRatio";
|
|
813
|
+
readonly type: "uint16";
|
|
814
|
+
}];
|
|
815
|
+
readonly internalType: "struct CoverData";
|
|
816
|
+
readonly name: "";
|
|
817
|
+
readonly type: "tuple";
|
|
818
|
+
}, {
|
|
819
|
+
readonly components: readonly [{
|
|
820
|
+
readonly internalType: "uint32";
|
|
821
|
+
readonly name: "originalCoverId";
|
|
822
|
+
readonly type: "uint32";
|
|
823
|
+
}, {
|
|
824
|
+
readonly internalType: "uint32";
|
|
825
|
+
readonly name: "latestCoverId";
|
|
826
|
+
readonly type: "uint32";
|
|
827
|
+
}];
|
|
828
|
+
readonly internalType: "struct CoverReference";
|
|
829
|
+
readonly name: "";
|
|
830
|
+
readonly type: "tuple";
|
|
831
|
+
}];
|
|
832
|
+
readonly stateMutability: "view";
|
|
833
|
+
readonly type: "function";
|
|
834
|
+
}, {
|
|
835
|
+
readonly inputs: readonly [{
|
|
836
|
+
readonly internalType: "uint256";
|
|
837
|
+
readonly name: "coverId";
|
|
838
|
+
readonly type: "uint256";
|
|
839
|
+
}];
|
|
840
|
+
readonly name: "getCoverDataWithRi";
|
|
841
|
+
readonly outputs: readonly [{
|
|
842
|
+
readonly components: readonly [{
|
|
843
|
+
readonly internalType: "uint24";
|
|
844
|
+
readonly name: "productId";
|
|
845
|
+
readonly type: "uint24";
|
|
846
|
+
}, {
|
|
847
|
+
readonly internalType: "uint8";
|
|
848
|
+
readonly name: "coverAsset";
|
|
849
|
+
readonly type: "uint8";
|
|
850
|
+
}, {
|
|
851
|
+
readonly internalType: "uint96";
|
|
852
|
+
readonly name: "amount";
|
|
853
|
+
readonly type: "uint96";
|
|
854
|
+
}, {
|
|
855
|
+
readonly internalType: "uint32";
|
|
856
|
+
readonly name: "start";
|
|
857
|
+
readonly type: "uint32";
|
|
858
|
+
}, {
|
|
859
|
+
readonly internalType: "uint32";
|
|
860
|
+
readonly name: "period";
|
|
861
|
+
readonly type: "uint32";
|
|
862
|
+
}, {
|
|
863
|
+
readonly internalType: "uint32";
|
|
864
|
+
readonly name: "gracePeriod";
|
|
865
|
+
readonly type: "uint32";
|
|
866
|
+
}, {
|
|
867
|
+
readonly internalType: "uint16";
|
|
868
|
+
readonly name: "rewardsRatio";
|
|
869
|
+
readonly type: "uint16";
|
|
870
|
+
}, {
|
|
871
|
+
readonly internalType: "uint16";
|
|
872
|
+
readonly name: "capacityRatio";
|
|
873
|
+
readonly type: "uint16";
|
|
874
|
+
}];
|
|
875
|
+
readonly internalType: "struct CoverData";
|
|
876
|
+
readonly name: "";
|
|
877
|
+
readonly type: "tuple";
|
|
878
|
+
}, {
|
|
879
|
+
readonly components: readonly [{
|
|
880
|
+
readonly internalType: "uint24";
|
|
881
|
+
readonly name: "providerId";
|
|
882
|
+
readonly type: "uint24";
|
|
883
|
+
}, {
|
|
884
|
+
readonly internalType: "uint96";
|
|
885
|
+
readonly name: "amount";
|
|
886
|
+
readonly type: "uint96";
|
|
887
|
+
}];
|
|
888
|
+
readonly internalType: "struct Ri";
|
|
889
|
+
readonly name: "";
|
|
890
|
+
readonly type: "tuple";
|
|
891
|
+
}];
|
|
892
|
+
readonly stateMutability: "view";
|
|
893
|
+
readonly type: "function";
|
|
894
|
+
}, {
|
|
895
|
+
readonly inputs: readonly [{
|
|
896
|
+
readonly internalType: "uint256";
|
|
897
|
+
readonly name: "coverId";
|
|
898
|
+
readonly type: "uint256";
|
|
899
|
+
}];
|
|
900
|
+
readonly name: "getCoverMetadata";
|
|
901
|
+
readonly outputs: readonly [{
|
|
902
|
+
readonly internalType: "string";
|
|
903
|
+
readonly name: "";
|
|
904
|
+
readonly type: "string";
|
|
905
|
+
}];
|
|
906
|
+
readonly stateMutability: "view";
|
|
907
|
+
readonly type: "function";
|
|
908
|
+
}, {
|
|
909
|
+
readonly inputs: readonly [{
|
|
910
|
+
readonly internalType: "uint256";
|
|
911
|
+
readonly name: "coverId";
|
|
912
|
+
readonly type: "uint256";
|
|
913
|
+
}];
|
|
914
|
+
readonly name: "getCoverReference";
|
|
915
|
+
readonly outputs: readonly [{
|
|
916
|
+
readonly components: readonly [{
|
|
917
|
+
readonly internalType: "uint32";
|
|
918
|
+
readonly name: "originalCoverId";
|
|
919
|
+
readonly type: "uint32";
|
|
920
|
+
}, {
|
|
921
|
+
readonly internalType: "uint32";
|
|
922
|
+
readonly name: "latestCoverId";
|
|
923
|
+
readonly type: "uint32";
|
|
924
|
+
}];
|
|
925
|
+
readonly internalType: "struct CoverReference";
|
|
926
|
+
readonly name: "coverReference";
|
|
927
|
+
readonly type: "tuple";
|
|
928
|
+
}];
|
|
929
|
+
readonly stateMutability: "view";
|
|
930
|
+
readonly type: "function";
|
|
931
|
+
}, {
|
|
932
|
+
readonly inputs: readonly [{
|
|
933
|
+
readonly internalType: "uint256";
|
|
934
|
+
readonly name: "coverId";
|
|
935
|
+
readonly type: "uint256";
|
|
936
|
+
}];
|
|
937
|
+
readonly name: "getCoverRi";
|
|
938
|
+
readonly outputs: readonly [{
|
|
939
|
+
readonly components: readonly [{
|
|
940
|
+
readonly internalType: "uint24";
|
|
941
|
+
readonly name: "providerId";
|
|
942
|
+
readonly type: "uint24";
|
|
943
|
+
}, {
|
|
944
|
+
readonly internalType: "uint96";
|
|
945
|
+
readonly name: "amount";
|
|
946
|
+
readonly type: "uint96";
|
|
947
|
+
}];
|
|
948
|
+
readonly internalType: "struct Ri";
|
|
949
|
+
readonly name: "";
|
|
950
|
+
readonly type: "tuple";
|
|
951
|
+
}];
|
|
952
|
+
readonly stateMutability: "view";
|
|
953
|
+
readonly type: "function";
|
|
954
|
+
}, {
|
|
955
|
+
readonly inputs: readonly [];
|
|
956
|
+
readonly name: "getDefaultMinPriceRatio";
|
|
957
|
+
readonly outputs: readonly [{
|
|
958
|
+
readonly internalType: "uint256";
|
|
959
|
+
readonly name: "";
|
|
960
|
+
readonly type: "uint256";
|
|
961
|
+
}];
|
|
962
|
+
readonly stateMutability: "pure";
|
|
963
|
+
readonly type: "function";
|
|
964
|
+
}, {
|
|
965
|
+
readonly inputs: readonly [];
|
|
966
|
+
readonly name: "getGlobalCapacityAndPriceRatios";
|
|
967
|
+
readonly outputs: readonly [{
|
|
968
|
+
readonly internalType: "uint256";
|
|
969
|
+
readonly name: "_globalCapacityRatio";
|
|
970
|
+
readonly type: "uint256";
|
|
971
|
+
}, {
|
|
972
|
+
readonly internalType: "uint256";
|
|
973
|
+
readonly name: "_defaultMinPriceRatio";
|
|
974
|
+
readonly type: "uint256";
|
|
975
|
+
}];
|
|
976
|
+
readonly stateMutability: "pure";
|
|
977
|
+
readonly type: "function";
|
|
978
|
+
}, {
|
|
979
|
+
readonly inputs: readonly [];
|
|
980
|
+
readonly name: "getGlobalCapacityRatio";
|
|
981
|
+
readonly outputs: readonly [{
|
|
982
|
+
readonly internalType: "uint256";
|
|
983
|
+
readonly name: "";
|
|
984
|
+
readonly type: "uint256";
|
|
985
|
+
}];
|
|
986
|
+
readonly stateMutability: "pure";
|
|
987
|
+
readonly type: "function";
|
|
988
|
+
}, {
|
|
989
|
+
readonly inputs: readonly [];
|
|
990
|
+
readonly name: "getGlobalRewardsRatio";
|
|
991
|
+
readonly outputs: readonly [{
|
|
992
|
+
readonly internalType: "uint256";
|
|
993
|
+
readonly name: "";
|
|
994
|
+
readonly type: "uint256";
|
|
995
|
+
}];
|
|
996
|
+
readonly stateMutability: "pure";
|
|
997
|
+
readonly type: "function";
|
|
998
|
+
}, {
|
|
999
|
+
readonly inputs: readonly [{
|
|
1000
|
+
readonly internalType: "uint256";
|
|
1001
|
+
readonly name: "coverId";
|
|
1002
|
+
readonly type: "uint256";
|
|
1003
|
+
}];
|
|
1004
|
+
readonly name: "getLatestEditCoverData";
|
|
1005
|
+
readonly outputs: readonly [{
|
|
1006
|
+
readonly components: readonly [{
|
|
1007
|
+
readonly internalType: "uint24";
|
|
1008
|
+
readonly name: "productId";
|
|
1009
|
+
readonly type: "uint24";
|
|
1010
|
+
}, {
|
|
1011
|
+
readonly internalType: "uint8";
|
|
1012
|
+
readonly name: "coverAsset";
|
|
1013
|
+
readonly type: "uint8";
|
|
1014
|
+
}, {
|
|
1015
|
+
readonly internalType: "uint96";
|
|
1016
|
+
readonly name: "amount";
|
|
1017
|
+
readonly type: "uint96";
|
|
1018
|
+
}, {
|
|
1019
|
+
readonly internalType: "uint32";
|
|
1020
|
+
readonly name: "start";
|
|
1021
|
+
readonly type: "uint32";
|
|
1022
|
+
}, {
|
|
1023
|
+
readonly internalType: "uint32";
|
|
1024
|
+
readonly name: "period";
|
|
1025
|
+
readonly type: "uint32";
|
|
1026
|
+
}, {
|
|
1027
|
+
readonly internalType: "uint32";
|
|
1028
|
+
readonly name: "gracePeriod";
|
|
1029
|
+
readonly type: "uint32";
|
|
1030
|
+
}, {
|
|
1031
|
+
readonly internalType: "uint16";
|
|
1032
|
+
readonly name: "rewardsRatio";
|
|
1033
|
+
readonly type: "uint16";
|
|
1034
|
+
}, {
|
|
1035
|
+
readonly internalType: "uint16";
|
|
1036
|
+
readonly name: "capacityRatio";
|
|
1037
|
+
readonly type: "uint16";
|
|
1038
|
+
}];
|
|
1039
|
+
readonly internalType: "struct CoverData";
|
|
1040
|
+
readonly name: "";
|
|
1041
|
+
readonly type: "tuple";
|
|
1042
|
+
}];
|
|
1043
|
+
readonly stateMutability: "view";
|
|
1044
|
+
readonly type: "function";
|
|
1045
|
+
}, {
|
|
1046
|
+
readonly inputs: readonly [{
|
|
1047
|
+
readonly internalType: "uint256";
|
|
1048
|
+
readonly name: "coverId";
|
|
1049
|
+
readonly type: "uint256";
|
|
1050
|
+
}];
|
|
1051
|
+
readonly name: "getPoolAllocations";
|
|
1052
|
+
readonly outputs: readonly [{
|
|
1053
|
+
readonly components: readonly [{
|
|
1054
|
+
readonly internalType: "uint40";
|
|
1055
|
+
readonly name: "poolId";
|
|
1056
|
+
readonly type: "uint40";
|
|
1057
|
+
}, {
|
|
1058
|
+
readonly internalType: "uint96";
|
|
1059
|
+
readonly name: "coverAmountInNXM";
|
|
1060
|
+
readonly type: "uint96";
|
|
1061
|
+
}, {
|
|
1062
|
+
readonly internalType: "uint96";
|
|
1063
|
+
readonly name: "premiumInNXM";
|
|
1064
|
+
readonly type: "uint96";
|
|
1065
|
+
}, {
|
|
1066
|
+
readonly internalType: "uint24";
|
|
1067
|
+
readonly name: "allocationId";
|
|
1068
|
+
readonly type: "uint24";
|
|
1069
|
+
}];
|
|
1070
|
+
readonly internalType: "struct PoolAllocation[]";
|
|
1071
|
+
readonly name: "";
|
|
1072
|
+
readonly type: "tuple[]";
|
|
1073
|
+
}];
|
|
1074
|
+
readonly stateMutability: "view";
|
|
1075
|
+
readonly type: "function";
|
|
1076
|
+
}, {
|
|
1077
|
+
readonly inputs: readonly [{
|
|
1078
|
+
readonly internalType: "uint256";
|
|
1079
|
+
readonly name: "providerId";
|
|
1080
|
+
readonly type: "uint256";
|
|
1081
|
+
}];
|
|
1082
|
+
readonly name: "getRiProviderConfig";
|
|
1083
|
+
readonly outputs: readonly [{
|
|
1084
|
+
readonly components: readonly [{
|
|
1085
|
+
readonly internalType: "uint24";
|
|
1086
|
+
readonly name: "nextNonce";
|
|
1087
|
+
readonly type: "uint24";
|
|
1088
|
+
}, {
|
|
1089
|
+
readonly internalType: "address";
|
|
1090
|
+
readonly name: "premiumDestination";
|
|
1091
|
+
readonly type: "address";
|
|
1092
|
+
}];
|
|
1093
|
+
readonly internalType: "struct RiConfig";
|
|
1094
|
+
readonly name: "";
|
|
1095
|
+
readonly type: "tuple";
|
|
1096
|
+
}];
|
|
1097
|
+
readonly stateMutability: "view";
|
|
1098
|
+
readonly type: "function";
|
|
1099
|
+
}, {
|
|
1100
|
+
readonly inputs: readonly [{
|
|
1101
|
+
readonly internalType: "bytes[]";
|
|
1102
|
+
readonly name: "data";
|
|
1103
|
+
readonly type: "bytes[]";
|
|
1104
|
+
}];
|
|
1105
|
+
readonly name: "multicall";
|
|
1106
|
+
readonly outputs: readonly [{
|
|
1107
|
+
readonly internalType: "bytes[]";
|
|
1108
|
+
readonly name: "results";
|
|
1109
|
+
readonly type: "bytes[]";
|
|
1110
|
+
}];
|
|
1111
|
+
readonly stateMutability: "nonpayable";
|
|
1112
|
+
readonly type: "function";
|
|
1113
|
+
}, {
|
|
1114
|
+
readonly inputs: readonly [];
|
|
1115
|
+
readonly name: "pool";
|
|
1116
|
+
readonly outputs: readonly [{
|
|
1117
|
+
readonly internalType: "contract IPool";
|
|
1118
|
+
readonly name: "";
|
|
1119
|
+
readonly type: "address";
|
|
1120
|
+
}];
|
|
1121
|
+
readonly stateMutability: "view";
|
|
1122
|
+
readonly type: "function";
|
|
1123
|
+
}, {
|
|
1124
|
+
readonly inputs: readonly [{
|
|
1125
|
+
readonly internalType: "uint256[]";
|
|
1126
|
+
readonly name: "coverIds";
|
|
1127
|
+
readonly type: "uint256[]";
|
|
1128
|
+
}, {
|
|
1129
|
+
readonly internalType: "string[]";
|
|
1130
|
+
readonly name: "ipfsMetadata";
|
|
1131
|
+
readonly type: "string[]";
|
|
1132
|
+
}];
|
|
1133
|
+
readonly name: "populateIpfsMetadata";
|
|
1134
|
+
readonly outputs: readonly [];
|
|
1135
|
+
readonly stateMutability: "nonpayable";
|
|
1136
|
+
readonly type: "function";
|
|
1137
|
+
}, {
|
|
1138
|
+
readonly inputs: readonly [{
|
|
1139
|
+
readonly internalType: "uint256";
|
|
1140
|
+
readonly name: "coverAsset";
|
|
1141
|
+
readonly type: "uint256";
|
|
1142
|
+
}];
|
|
1143
|
+
readonly name: "recalculateActiveCoverInAsset";
|
|
1144
|
+
readonly outputs: readonly [];
|
|
1145
|
+
readonly stateMutability: "nonpayable";
|
|
1146
|
+
readonly type: "function";
|
|
1147
|
+
}, {
|
|
1148
|
+
readonly inputs: readonly [];
|
|
1149
|
+
readonly name: "registry";
|
|
1150
|
+
readonly outputs: readonly [{
|
|
1151
|
+
readonly internalType: "contract IRegistry";
|
|
1152
|
+
readonly name: "";
|
|
1153
|
+
readonly type: "address";
|
|
1154
|
+
}];
|
|
1155
|
+
readonly stateMutability: "view";
|
|
1156
|
+
readonly type: "function";
|
|
1157
|
+
}, {
|
|
1158
|
+
readonly inputs: readonly [];
|
|
1159
|
+
readonly name: "riSigner";
|
|
1160
|
+
readonly outputs: readonly [{
|
|
1161
|
+
readonly internalType: "address";
|
|
1162
|
+
readonly name: "";
|
|
1163
|
+
readonly type: "address";
|
|
1164
|
+
}];
|
|
1165
|
+
readonly stateMutability: "view";
|
|
1166
|
+
readonly type: "function";
|
|
1167
|
+
}, {
|
|
1168
|
+
readonly inputs: readonly [{
|
|
1169
|
+
readonly internalType: "uint256";
|
|
1170
|
+
readonly name: "providerId";
|
|
1171
|
+
readonly type: "uint256";
|
|
1172
|
+
}, {
|
|
1173
|
+
readonly internalType: "address";
|
|
1174
|
+
readonly name: "premiumDestination";
|
|
1175
|
+
readonly type: "address";
|
|
1176
|
+
}];
|
|
1177
|
+
readonly name: "setRiConfig";
|
|
1178
|
+
readonly outputs: readonly [];
|
|
1179
|
+
readonly stateMutability: "nonpayable";
|
|
1180
|
+
readonly type: "function";
|
|
1181
|
+
}, {
|
|
1182
|
+
readonly inputs: readonly [{
|
|
1183
|
+
readonly internalType: "address";
|
|
1184
|
+
readonly name: "_riSigner";
|
|
1185
|
+
readonly type: "address";
|
|
1186
|
+
}];
|
|
1187
|
+
readonly name: "setRiSigner";
|
|
1188
|
+
readonly outputs: readonly [];
|
|
1189
|
+
readonly stateMutability: "nonpayable";
|
|
1190
|
+
readonly type: "function";
|
|
1191
|
+
}, {
|
|
1192
|
+
readonly inputs: readonly [];
|
|
1193
|
+
readonly name: "stakingNFT";
|
|
1194
|
+
readonly outputs: readonly [{
|
|
1195
|
+
readonly internalType: "contract IStakingNFT";
|
|
1196
|
+
readonly name: "";
|
|
1197
|
+
readonly type: "address";
|
|
1198
|
+
}];
|
|
1199
|
+
readonly stateMutability: "view";
|
|
1200
|
+
readonly type: "function";
|
|
1201
|
+
}, {
|
|
1202
|
+
readonly inputs: readonly [{
|
|
1203
|
+
readonly internalType: "uint256";
|
|
1204
|
+
readonly name: "poolId";
|
|
1205
|
+
readonly type: "uint256";
|
|
1206
|
+
}];
|
|
1207
|
+
readonly name: "stakingPool";
|
|
1208
|
+
readonly outputs: readonly [{
|
|
1209
|
+
readonly internalType: "contract IStakingPool";
|
|
1210
|
+
readonly name: "";
|
|
1211
|
+
readonly type: "address";
|
|
1212
|
+
}];
|
|
1213
|
+
readonly stateMutability: "view";
|
|
1214
|
+
readonly type: "function";
|
|
1215
|
+
}, {
|
|
1216
|
+
readonly inputs: readonly [];
|
|
1217
|
+
readonly name: "stakingPoolFactory";
|
|
1218
|
+
readonly outputs: readonly [{
|
|
1219
|
+
readonly internalType: "address";
|
|
1220
|
+
readonly name: "";
|
|
1221
|
+
readonly type: "address";
|
|
1222
|
+
}];
|
|
1223
|
+
readonly stateMutability: "view";
|
|
1224
|
+
readonly type: "function";
|
|
1225
|
+
}, {
|
|
1226
|
+
readonly inputs: readonly [];
|
|
1227
|
+
readonly name: "stakingPoolImplementation";
|
|
1228
|
+
readonly outputs: readonly [{
|
|
1229
|
+
readonly internalType: "address";
|
|
1230
|
+
readonly name: "";
|
|
1231
|
+
readonly type: "address";
|
|
1232
|
+
}];
|
|
1233
|
+
readonly stateMutability: "view";
|
|
1234
|
+
readonly type: "function";
|
|
1235
|
+
}, {
|
|
1236
|
+
readonly inputs: readonly [];
|
|
1237
|
+
readonly name: "tokenController";
|
|
1238
|
+
readonly outputs: readonly [{
|
|
1239
|
+
readonly internalType: "contract ITokenController";
|
|
1240
|
+
readonly name: "";
|
|
1241
|
+
readonly type: "address";
|
|
1242
|
+
}];
|
|
1243
|
+
readonly stateMutability: "view";
|
|
1244
|
+
readonly type: "function";
|
|
1245
|
+
}, {
|
|
1246
|
+
readonly inputs: readonly [{
|
|
1247
|
+
readonly internalType: "uint256";
|
|
1248
|
+
readonly name: "assetId";
|
|
1249
|
+
readonly type: "uint256";
|
|
1250
|
+
}];
|
|
1251
|
+
readonly name: "totalActiveCoverInAsset";
|
|
1252
|
+
readonly outputs: readonly [{
|
|
1253
|
+
readonly internalType: "uint256";
|
|
1254
|
+
readonly name: "";
|
|
1255
|
+
readonly type: "uint256";
|
|
1256
|
+
}];
|
|
1257
|
+
readonly stateMutability: "view";
|
|
1258
|
+
readonly type: "function";
|
|
1259
|
+
}, {
|
|
1260
|
+
readonly inputs: readonly [{
|
|
1261
|
+
readonly internalType: "uint256";
|
|
1262
|
+
readonly name: "coverAsset";
|
|
1263
|
+
readonly type: "uint256";
|
|
1264
|
+
}];
|
|
1265
|
+
readonly name: "updateTotalActiveCoverAmount";
|
|
1266
|
+
readonly outputs: readonly [];
|
|
1267
|
+
readonly stateMutability: "nonpayable";
|
|
1268
|
+
readonly type: "function";
|
|
1269
|
+
}];
|
|
1270
|
+
/**
|
|
1271
|
+
* Type-safe ABI for Cover
|
|
1272
|
+
*/
|
|
1273
|
+
export type CoverAbi = typeof CoverAbi;
|
|
1274
|
+
/**
|
|
1275
|
+
* Contract instance type for Cover
|
|
1276
|
+
*/
|
|
1277
|
+
export type CoverContract = any;
|
|
1278
|
+
/**
|
|
1279
|
+
* Cover Contract Class
|
|
1280
|
+
*
|
|
1281
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1282
|
+
*
|
|
1283
|
+
* @example
|
|
1284
|
+
* ```typescript
|
|
1285
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1286
|
+
* import { mainnet } from 'viem/chains';
|
|
1287
|
+
* import { Cover } from 'Cover';
|
|
1288
|
+
*
|
|
1289
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1290
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1291
|
+
*
|
|
1292
|
+
* const contract = new Cover('0x...', { publicClient, walletClient });
|
|
1293
|
+
*
|
|
1294
|
+
* // Read functions
|
|
1295
|
+
* const result = await contract.balanceOf('0x...');
|
|
1296
|
+
*
|
|
1297
|
+
* // Write functions
|
|
1298
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
1299
|
+
*
|
|
1300
|
+
* // Simulate transactions (dry-run)
|
|
1301
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
1302
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
1303
|
+
*
|
|
1304
|
+
* // Watch events
|
|
1305
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1306
|
+
* console.log('Transfer event:', event);
|
|
1307
|
+
* });
|
|
1308
|
+
* ```
|
|
1309
|
+
*/
|
|
1310
|
+
export declare class Cover {
|
|
1311
|
+
private contract;
|
|
1312
|
+
private contractAddress;
|
|
1313
|
+
private publicClient;
|
|
1314
|
+
constructor(address: Address, clients: {
|
|
1315
|
+
publicClient: PublicClient;
|
|
1316
|
+
walletClient?: WalletClient;
|
|
1317
|
+
});
|
|
1318
|
+
/**
|
|
1319
|
+
* Get the contract address
|
|
1320
|
+
*/
|
|
1321
|
+
get address(): Address;
|
|
1322
|
+
/**
|
|
1323
|
+
* Get the underlying viem contract instance.
|
|
1324
|
+
*/
|
|
1325
|
+
getContract(): CoverContract;
|
|
1326
|
+
/**
|
|
1327
|
+
* DEFAULT_MIN_PRICE_RATIO
|
|
1328
|
+
* view
|
|
1329
|
+
*/
|
|
1330
|
+
DEFAULT_MIN_PRICE_RATIO(): Promise<bigint>;
|
|
1331
|
+
/**
|
|
1332
|
+
* DOMAIN_SEPARATOR
|
|
1333
|
+
* view
|
|
1334
|
+
*/
|
|
1335
|
+
DOMAIN_SEPARATOR(): Promise<`0x${string}`>;
|
|
1336
|
+
/**
|
|
1337
|
+
* MAX_COMMISSION_RATIO
|
|
1338
|
+
* view
|
|
1339
|
+
*/
|
|
1340
|
+
MAX_COMMISSION_RATIO(): Promise<bigint>;
|
|
1341
|
+
/**
|
|
1342
|
+
* NXM_PER_ALLOCATION_UNIT
|
|
1343
|
+
* view
|
|
1344
|
+
*/
|
|
1345
|
+
NXM_PER_ALLOCATION_UNIT(): Promise<bigint>;
|
|
1346
|
+
/**
|
|
1347
|
+
* activeCover
|
|
1348
|
+
* view
|
|
1349
|
+
*/
|
|
1350
|
+
activeCover(assetId: bigint): Promise<[bigint, bigint]>;
|
|
1351
|
+
/**
|
|
1352
|
+
* claims
|
|
1353
|
+
* view
|
|
1354
|
+
*/
|
|
1355
|
+
claims(): Promise<`0x${string}`>;
|
|
1356
|
+
/**
|
|
1357
|
+
* coverNFT
|
|
1358
|
+
* view
|
|
1359
|
+
*/
|
|
1360
|
+
coverNFT(): Promise<`0x${string}`>;
|
|
1361
|
+
/**
|
|
1362
|
+
* coverProducts
|
|
1363
|
+
* view
|
|
1364
|
+
*/
|
|
1365
|
+
coverProducts(): Promise<`0x${string}`>;
|
|
1366
|
+
/**
|
|
1367
|
+
* getCoverData
|
|
1368
|
+
* view
|
|
1369
|
+
*/
|
|
1370
|
+
getCoverData(coverId: bigint): Promise<CoverData>;
|
|
1371
|
+
/**
|
|
1372
|
+
* getCoverDataCount
|
|
1373
|
+
* view
|
|
1374
|
+
*/
|
|
1375
|
+
getCoverDataCount(): Promise<bigint>;
|
|
1376
|
+
/**
|
|
1377
|
+
* getCoverDataWithReference
|
|
1378
|
+
* view
|
|
1379
|
+
*/
|
|
1380
|
+
getCoverDataWithReference(coverId: bigint): Promise<[CoverData, CoverReference]>;
|
|
1381
|
+
/**
|
|
1382
|
+
* getCoverDataWithRi
|
|
1383
|
+
* view
|
|
1384
|
+
*/
|
|
1385
|
+
getCoverDataWithRi(coverId: bigint): Promise<[CoverData, Ri]>;
|
|
1386
|
+
/**
|
|
1387
|
+
* getCoverMetadata
|
|
1388
|
+
* view
|
|
1389
|
+
*/
|
|
1390
|
+
getCoverMetadata(coverId: bigint): Promise<string>;
|
|
1391
|
+
/**
|
|
1392
|
+
* getCoverReference
|
|
1393
|
+
* view
|
|
1394
|
+
*/
|
|
1395
|
+
getCoverReference(coverId: bigint): Promise<CoverReference>;
|
|
1396
|
+
/**
|
|
1397
|
+
* getCoverRi
|
|
1398
|
+
* view
|
|
1399
|
+
*/
|
|
1400
|
+
getCoverRi(coverId: bigint): Promise<Ri>;
|
|
1401
|
+
/**
|
|
1402
|
+
* getDefaultMinPriceRatio
|
|
1403
|
+
* pure
|
|
1404
|
+
*/
|
|
1405
|
+
getDefaultMinPriceRatio(): Promise<bigint>;
|
|
1406
|
+
/**
|
|
1407
|
+
* getGlobalCapacityAndPriceRatios
|
|
1408
|
+
* pure
|
|
1409
|
+
*/
|
|
1410
|
+
getGlobalCapacityAndPriceRatios(): Promise<[bigint, bigint]>;
|
|
1411
|
+
/**
|
|
1412
|
+
* getGlobalCapacityRatio
|
|
1413
|
+
* pure
|
|
1414
|
+
*/
|
|
1415
|
+
getGlobalCapacityRatio(): Promise<bigint>;
|
|
1416
|
+
/**
|
|
1417
|
+
* getGlobalRewardsRatio
|
|
1418
|
+
* pure
|
|
1419
|
+
*/
|
|
1420
|
+
getGlobalRewardsRatio(): Promise<bigint>;
|
|
1421
|
+
/**
|
|
1422
|
+
* getLatestEditCoverData
|
|
1423
|
+
* view
|
|
1424
|
+
*/
|
|
1425
|
+
getLatestEditCoverData(coverId: bigint): Promise<CoverData>;
|
|
1426
|
+
/**
|
|
1427
|
+
* getPoolAllocations
|
|
1428
|
+
* view
|
|
1429
|
+
*/
|
|
1430
|
+
getPoolAllocations(coverId: bigint): Promise<PoolAllocation[]>;
|
|
1431
|
+
/**
|
|
1432
|
+
* getRiProviderConfig
|
|
1433
|
+
* view
|
|
1434
|
+
*/
|
|
1435
|
+
getRiProviderConfig(providerId: bigint): Promise<RiConfig>;
|
|
1436
|
+
/**
|
|
1437
|
+
* pool
|
|
1438
|
+
* view
|
|
1439
|
+
*/
|
|
1440
|
+
pool(): Promise<`0x${string}`>;
|
|
1441
|
+
/**
|
|
1442
|
+
* registry
|
|
1443
|
+
* view
|
|
1444
|
+
*/
|
|
1445
|
+
registry(): Promise<`0x${string}`>;
|
|
1446
|
+
/**
|
|
1447
|
+
* riSigner
|
|
1448
|
+
* view
|
|
1449
|
+
*/
|
|
1450
|
+
riSigner(): Promise<`0x${string}`>;
|
|
1451
|
+
/**
|
|
1452
|
+
* stakingNFT
|
|
1453
|
+
* view
|
|
1454
|
+
*/
|
|
1455
|
+
stakingNFT(): Promise<`0x${string}`>;
|
|
1456
|
+
/**
|
|
1457
|
+
* stakingPool
|
|
1458
|
+
* view
|
|
1459
|
+
*/
|
|
1460
|
+
stakingPool(poolId: bigint): Promise<`0x${string}`>;
|
|
1461
|
+
/**
|
|
1462
|
+
* stakingPoolFactory
|
|
1463
|
+
* view
|
|
1464
|
+
*/
|
|
1465
|
+
stakingPoolFactory(): Promise<`0x${string}`>;
|
|
1466
|
+
/**
|
|
1467
|
+
* stakingPoolImplementation
|
|
1468
|
+
* view
|
|
1469
|
+
*/
|
|
1470
|
+
stakingPoolImplementation(): Promise<`0x${string}`>;
|
|
1471
|
+
/**
|
|
1472
|
+
* tokenController
|
|
1473
|
+
* view
|
|
1474
|
+
*/
|
|
1475
|
+
tokenController(): Promise<`0x${string}`>;
|
|
1476
|
+
/**
|
|
1477
|
+
* totalActiveCoverInAsset
|
|
1478
|
+
* view
|
|
1479
|
+
*/
|
|
1480
|
+
totalActiveCoverInAsset(assetId: bigint): Promise<bigint>;
|
|
1481
|
+
/**
|
|
1482
|
+
* burnStake
|
|
1483
|
+
* nonpayable
|
|
1484
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1485
|
+
*/
|
|
1486
|
+
burnStake(coverId: bigint, payoutAmountInAsset: bigint, options?: {
|
|
1487
|
+
accessList?: import('viem').AccessList;
|
|
1488
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1489
|
+
chain?: import('viem').Chain | null;
|
|
1490
|
+
dataSuffix?: `0x${string}`;
|
|
1491
|
+
gas?: bigint;
|
|
1492
|
+
gasPrice?: bigint;
|
|
1493
|
+
maxFeePerGas?: bigint;
|
|
1494
|
+
maxPriorityFeePerGas?: bigint;
|
|
1495
|
+
nonce?: number;
|
|
1496
|
+
value?: bigint;
|
|
1497
|
+
}): Promise<`0x${string}`>;
|
|
1498
|
+
/**
|
|
1499
|
+
* buyCover
|
|
1500
|
+
* payable
|
|
1501
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1502
|
+
*/
|
|
1503
|
+
buyCover(params: BuyCoverParams, poolAllocationRequests: PoolAllocationRequest[], options?: {
|
|
1504
|
+
accessList?: import('viem').AccessList;
|
|
1505
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1506
|
+
chain?: import('viem').Chain | null;
|
|
1507
|
+
dataSuffix?: `0x${string}`;
|
|
1508
|
+
gas?: bigint;
|
|
1509
|
+
gasPrice?: bigint;
|
|
1510
|
+
maxFeePerGas?: bigint;
|
|
1511
|
+
maxPriorityFeePerGas?: bigint;
|
|
1512
|
+
nonce?: number;
|
|
1513
|
+
value?: bigint;
|
|
1514
|
+
}): Promise<`0x${string}`>;
|
|
1515
|
+
/**
|
|
1516
|
+
* buyCoverWithRi
|
|
1517
|
+
* payable
|
|
1518
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1519
|
+
*/
|
|
1520
|
+
buyCoverWithRi(params: BuyCoverParams, poolAllocationRequests: PoolAllocationRequest[], riRequest: RiRequest, options?: {
|
|
1521
|
+
accessList?: import('viem').AccessList;
|
|
1522
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1523
|
+
chain?: import('viem').Chain | null;
|
|
1524
|
+
dataSuffix?: `0x${string}`;
|
|
1525
|
+
gas?: bigint;
|
|
1526
|
+
gasPrice?: bigint;
|
|
1527
|
+
maxFeePerGas?: bigint;
|
|
1528
|
+
maxPriorityFeePerGas?: bigint;
|
|
1529
|
+
nonce?: number;
|
|
1530
|
+
value?: bigint;
|
|
1531
|
+
}): Promise<`0x${string}`>;
|
|
1532
|
+
/**
|
|
1533
|
+
* changeCoverNFTDescriptor
|
|
1534
|
+
* nonpayable
|
|
1535
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1536
|
+
*/
|
|
1537
|
+
changeCoverNFTDescriptor(_coverNFTDescriptor: `0x${string}`, options?: {
|
|
1538
|
+
accessList?: import('viem').AccessList;
|
|
1539
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1540
|
+
chain?: import('viem').Chain | null;
|
|
1541
|
+
dataSuffix?: `0x${string}`;
|
|
1542
|
+
gas?: bigint;
|
|
1543
|
+
gasPrice?: bigint;
|
|
1544
|
+
maxFeePerGas?: bigint;
|
|
1545
|
+
maxPriorityFeePerGas?: bigint;
|
|
1546
|
+
nonce?: number;
|
|
1547
|
+
value?: bigint;
|
|
1548
|
+
}): Promise<`0x${string}`>;
|
|
1549
|
+
/**
|
|
1550
|
+
* changeStakingNFTDescriptor
|
|
1551
|
+
* nonpayable
|
|
1552
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1553
|
+
*/
|
|
1554
|
+
changeStakingNFTDescriptor(_stakingNFTDescriptor: `0x${string}`, options?: {
|
|
1555
|
+
accessList?: import('viem').AccessList;
|
|
1556
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1557
|
+
chain?: import('viem').Chain | null;
|
|
1558
|
+
dataSuffix?: `0x${string}`;
|
|
1559
|
+
gas?: bigint;
|
|
1560
|
+
gasPrice?: bigint;
|
|
1561
|
+
maxFeePerGas?: bigint;
|
|
1562
|
+
maxPriorityFeePerGas?: bigint;
|
|
1563
|
+
nonce?: number;
|
|
1564
|
+
value?: bigint;
|
|
1565
|
+
}): Promise<`0x${string}`>;
|
|
1566
|
+
/**
|
|
1567
|
+
* executeCoverBuy
|
|
1568
|
+
* payable
|
|
1569
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1570
|
+
*/
|
|
1571
|
+
executeCoverBuy(params: BuyCoverParams, poolAllocationRequests: PoolAllocationRequest[], buyer: `0x${string}`, options?: {
|
|
1572
|
+
accessList?: import('viem').AccessList;
|
|
1573
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1574
|
+
chain?: import('viem').Chain | null;
|
|
1575
|
+
dataSuffix?: `0x${string}`;
|
|
1576
|
+
gas?: bigint;
|
|
1577
|
+
gasPrice?: bigint;
|
|
1578
|
+
maxFeePerGas?: bigint;
|
|
1579
|
+
maxPriorityFeePerGas?: bigint;
|
|
1580
|
+
nonce?: number;
|
|
1581
|
+
value?: bigint;
|
|
1582
|
+
}): Promise<`0x${string}`>;
|
|
1583
|
+
/**
|
|
1584
|
+
* expireCover
|
|
1585
|
+
* nonpayable
|
|
1586
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1587
|
+
*/
|
|
1588
|
+
expireCover(coverId: bigint, options?: {
|
|
1589
|
+
accessList?: import('viem').AccessList;
|
|
1590
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1591
|
+
chain?: import('viem').Chain | null;
|
|
1592
|
+
dataSuffix?: `0x${string}`;
|
|
1593
|
+
gas?: bigint;
|
|
1594
|
+
gasPrice?: bigint;
|
|
1595
|
+
maxFeePerGas?: bigint;
|
|
1596
|
+
maxPriorityFeePerGas?: bigint;
|
|
1597
|
+
nonce?: number;
|
|
1598
|
+
value?: bigint;
|
|
1599
|
+
}): Promise<`0x${string}`>;
|
|
1600
|
+
/**
|
|
1601
|
+
* multicall
|
|
1602
|
+
* nonpayable
|
|
1603
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1604
|
+
*/
|
|
1605
|
+
multicall(data: `0x${string}`[], options?: {
|
|
1606
|
+
accessList?: import('viem').AccessList;
|
|
1607
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1608
|
+
chain?: import('viem').Chain | null;
|
|
1609
|
+
dataSuffix?: `0x${string}`;
|
|
1610
|
+
gas?: bigint;
|
|
1611
|
+
gasPrice?: bigint;
|
|
1612
|
+
maxFeePerGas?: bigint;
|
|
1613
|
+
maxPriorityFeePerGas?: bigint;
|
|
1614
|
+
nonce?: number;
|
|
1615
|
+
value?: bigint;
|
|
1616
|
+
}): Promise<`0x${string}`>;
|
|
1617
|
+
/**
|
|
1618
|
+
* populateIpfsMetadata
|
|
1619
|
+
* nonpayable
|
|
1620
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1621
|
+
*/
|
|
1622
|
+
populateIpfsMetadata(coverIds: bigint[], ipfsMetadata: string[], options?: {
|
|
1623
|
+
accessList?: import('viem').AccessList;
|
|
1624
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1625
|
+
chain?: import('viem').Chain | null;
|
|
1626
|
+
dataSuffix?: `0x${string}`;
|
|
1627
|
+
gas?: bigint;
|
|
1628
|
+
gasPrice?: bigint;
|
|
1629
|
+
maxFeePerGas?: bigint;
|
|
1630
|
+
maxPriorityFeePerGas?: bigint;
|
|
1631
|
+
nonce?: number;
|
|
1632
|
+
value?: bigint;
|
|
1633
|
+
}): Promise<`0x${string}`>;
|
|
1634
|
+
/**
|
|
1635
|
+
* recalculateActiveCoverInAsset
|
|
1636
|
+
* nonpayable
|
|
1637
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1638
|
+
*/
|
|
1639
|
+
recalculateActiveCoverInAsset(coverAsset: bigint, options?: {
|
|
1640
|
+
accessList?: import('viem').AccessList;
|
|
1641
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1642
|
+
chain?: import('viem').Chain | null;
|
|
1643
|
+
dataSuffix?: `0x${string}`;
|
|
1644
|
+
gas?: bigint;
|
|
1645
|
+
gasPrice?: bigint;
|
|
1646
|
+
maxFeePerGas?: bigint;
|
|
1647
|
+
maxPriorityFeePerGas?: bigint;
|
|
1648
|
+
nonce?: number;
|
|
1649
|
+
value?: bigint;
|
|
1650
|
+
}): Promise<`0x${string}`>;
|
|
1651
|
+
/**
|
|
1652
|
+
* setRiConfig
|
|
1653
|
+
* nonpayable
|
|
1654
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1655
|
+
*/
|
|
1656
|
+
setRiConfig(providerId: bigint, premiumDestination: `0x${string}`, options?: {
|
|
1657
|
+
accessList?: import('viem').AccessList;
|
|
1658
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1659
|
+
chain?: import('viem').Chain | null;
|
|
1660
|
+
dataSuffix?: `0x${string}`;
|
|
1661
|
+
gas?: bigint;
|
|
1662
|
+
gasPrice?: bigint;
|
|
1663
|
+
maxFeePerGas?: bigint;
|
|
1664
|
+
maxPriorityFeePerGas?: bigint;
|
|
1665
|
+
nonce?: number;
|
|
1666
|
+
value?: bigint;
|
|
1667
|
+
}): Promise<`0x${string}`>;
|
|
1668
|
+
/**
|
|
1669
|
+
* setRiSigner
|
|
1670
|
+
* nonpayable
|
|
1671
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1672
|
+
*/
|
|
1673
|
+
setRiSigner(_riSigner: `0x${string}`, options?: {
|
|
1674
|
+
accessList?: import('viem').AccessList;
|
|
1675
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1676
|
+
chain?: import('viem').Chain | null;
|
|
1677
|
+
dataSuffix?: `0x${string}`;
|
|
1678
|
+
gas?: bigint;
|
|
1679
|
+
gasPrice?: bigint;
|
|
1680
|
+
maxFeePerGas?: bigint;
|
|
1681
|
+
maxPriorityFeePerGas?: bigint;
|
|
1682
|
+
nonce?: number;
|
|
1683
|
+
value?: bigint;
|
|
1684
|
+
}): Promise<`0x${string}`>;
|
|
1685
|
+
/**
|
|
1686
|
+
* updateTotalActiveCoverAmount
|
|
1687
|
+
* nonpayable
|
|
1688
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1689
|
+
*/
|
|
1690
|
+
updateTotalActiveCoverAmount(coverAsset: bigint, options?: {
|
|
1691
|
+
accessList?: import('viem').AccessList;
|
|
1692
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1693
|
+
chain?: import('viem').Chain | null;
|
|
1694
|
+
dataSuffix?: `0x${string}`;
|
|
1695
|
+
gas?: bigint;
|
|
1696
|
+
gasPrice?: bigint;
|
|
1697
|
+
maxFeePerGas?: bigint;
|
|
1698
|
+
maxPriorityFeePerGas?: bigint;
|
|
1699
|
+
nonce?: number;
|
|
1700
|
+
value?: bigint;
|
|
1701
|
+
}): Promise<`0x${string}`>;
|
|
1702
|
+
/**
|
|
1703
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1704
|
+
*
|
|
1705
|
+
* @example
|
|
1706
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1707
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1708
|
+
* console.log('Would succeed:', result.result);
|
|
1709
|
+
*/
|
|
1710
|
+
get simulate(): {
|
|
1711
|
+
/**
|
|
1712
|
+
* Simulate burnStake
|
|
1713
|
+
* Returns gas estimate and result without sending transaction
|
|
1714
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1715
|
+
*/
|
|
1716
|
+
burnStake(coverId: bigint, payoutAmountInAsset: bigint, options?: {
|
|
1717
|
+
accessList?: import("viem").AccessList;
|
|
1718
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1719
|
+
chain?: import("viem").Chain | null;
|
|
1720
|
+
dataSuffix?: `0x${string}`;
|
|
1721
|
+
gas?: bigint;
|
|
1722
|
+
gasPrice?: bigint;
|
|
1723
|
+
maxFeePerGas?: bigint;
|
|
1724
|
+
maxPriorityFeePerGas?: bigint;
|
|
1725
|
+
nonce?: number;
|
|
1726
|
+
value?: bigint;
|
|
1727
|
+
}): Promise<void>;
|
|
1728
|
+
/**
|
|
1729
|
+
* Simulate buyCover
|
|
1730
|
+
* Returns gas estimate and result without sending transaction
|
|
1731
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1732
|
+
*/
|
|
1733
|
+
buyCover(params: BuyCoverParams, poolAllocationRequests: PoolAllocationRequest[], options?: {
|
|
1734
|
+
accessList?: import("viem").AccessList;
|
|
1735
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1736
|
+
chain?: import("viem").Chain | null;
|
|
1737
|
+
dataSuffix?: `0x${string}`;
|
|
1738
|
+
gas?: bigint;
|
|
1739
|
+
gasPrice?: bigint;
|
|
1740
|
+
maxFeePerGas?: bigint;
|
|
1741
|
+
maxPriorityFeePerGas?: bigint;
|
|
1742
|
+
nonce?: number;
|
|
1743
|
+
value?: bigint;
|
|
1744
|
+
}): Promise<bigint>;
|
|
1745
|
+
/**
|
|
1746
|
+
* Simulate buyCoverWithRi
|
|
1747
|
+
* Returns gas estimate and result without sending transaction
|
|
1748
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1749
|
+
*/
|
|
1750
|
+
buyCoverWithRi(params: BuyCoverParams, poolAllocationRequests: PoolAllocationRequest[], riRequest: RiRequest, options?: {
|
|
1751
|
+
accessList?: import("viem").AccessList;
|
|
1752
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1753
|
+
chain?: import("viem").Chain | null;
|
|
1754
|
+
dataSuffix?: `0x${string}`;
|
|
1755
|
+
gas?: bigint;
|
|
1756
|
+
gasPrice?: bigint;
|
|
1757
|
+
maxFeePerGas?: bigint;
|
|
1758
|
+
maxPriorityFeePerGas?: bigint;
|
|
1759
|
+
nonce?: number;
|
|
1760
|
+
value?: bigint;
|
|
1761
|
+
}): Promise<bigint>;
|
|
1762
|
+
/**
|
|
1763
|
+
* Simulate changeCoverNFTDescriptor
|
|
1764
|
+
* Returns gas estimate and result without sending transaction
|
|
1765
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1766
|
+
*/
|
|
1767
|
+
changeCoverNFTDescriptor(_coverNFTDescriptor: `0x${string}`, options?: {
|
|
1768
|
+
accessList?: import("viem").AccessList;
|
|
1769
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1770
|
+
chain?: import("viem").Chain | null;
|
|
1771
|
+
dataSuffix?: `0x${string}`;
|
|
1772
|
+
gas?: bigint;
|
|
1773
|
+
gasPrice?: bigint;
|
|
1774
|
+
maxFeePerGas?: bigint;
|
|
1775
|
+
maxPriorityFeePerGas?: bigint;
|
|
1776
|
+
nonce?: number;
|
|
1777
|
+
value?: bigint;
|
|
1778
|
+
}): Promise<void>;
|
|
1779
|
+
/**
|
|
1780
|
+
* Simulate changeStakingNFTDescriptor
|
|
1781
|
+
* Returns gas estimate and result without sending transaction
|
|
1782
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1783
|
+
*/
|
|
1784
|
+
changeStakingNFTDescriptor(_stakingNFTDescriptor: `0x${string}`, options?: {
|
|
1785
|
+
accessList?: import("viem").AccessList;
|
|
1786
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1787
|
+
chain?: import("viem").Chain | null;
|
|
1788
|
+
dataSuffix?: `0x${string}`;
|
|
1789
|
+
gas?: bigint;
|
|
1790
|
+
gasPrice?: bigint;
|
|
1791
|
+
maxFeePerGas?: bigint;
|
|
1792
|
+
maxPriorityFeePerGas?: bigint;
|
|
1793
|
+
nonce?: number;
|
|
1794
|
+
value?: bigint;
|
|
1795
|
+
}): Promise<void>;
|
|
1796
|
+
/**
|
|
1797
|
+
* Simulate executeCoverBuy
|
|
1798
|
+
* Returns gas estimate and result without sending transaction
|
|
1799
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1800
|
+
*/
|
|
1801
|
+
executeCoverBuy(params: BuyCoverParams, poolAllocationRequests: PoolAllocationRequest[], buyer: `0x${string}`, options?: {
|
|
1802
|
+
accessList?: import("viem").AccessList;
|
|
1803
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1804
|
+
chain?: import("viem").Chain | null;
|
|
1805
|
+
dataSuffix?: `0x${string}`;
|
|
1806
|
+
gas?: bigint;
|
|
1807
|
+
gasPrice?: bigint;
|
|
1808
|
+
maxFeePerGas?: bigint;
|
|
1809
|
+
maxPriorityFeePerGas?: bigint;
|
|
1810
|
+
nonce?: number;
|
|
1811
|
+
value?: bigint;
|
|
1812
|
+
}): Promise<bigint>;
|
|
1813
|
+
/**
|
|
1814
|
+
* Simulate expireCover
|
|
1815
|
+
* Returns gas estimate and result without sending transaction
|
|
1816
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1817
|
+
*/
|
|
1818
|
+
expireCover(coverId: bigint, options?: {
|
|
1819
|
+
accessList?: import("viem").AccessList;
|
|
1820
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1821
|
+
chain?: import("viem").Chain | null;
|
|
1822
|
+
dataSuffix?: `0x${string}`;
|
|
1823
|
+
gas?: bigint;
|
|
1824
|
+
gasPrice?: bigint;
|
|
1825
|
+
maxFeePerGas?: bigint;
|
|
1826
|
+
maxPriorityFeePerGas?: bigint;
|
|
1827
|
+
nonce?: number;
|
|
1828
|
+
value?: bigint;
|
|
1829
|
+
}): Promise<void>;
|
|
1830
|
+
/**
|
|
1831
|
+
* Simulate multicall
|
|
1832
|
+
* Returns gas estimate and result without sending transaction
|
|
1833
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1834
|
+
*/
|
|
1835
|
+
multicall(data: `0x${string}`[], options?: {
|
|
1836
|
+
accessList?: import("viem").AccessList;
|
|
1837
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1838
|
+
chain?: import("viem").Chain | null;
|
|
1839
|
+
dataSuffix?: `0x${string}`;
|
|
1840
|
+
gas?: bigint;
|
|
1841
|
+
gasPrice?: bigint;
|
|
1842
|
+
maxFeePerGas?: bigint;
|
|
1843
|
+
maxPriorityFeePerGas?: bigint;
|
|
1844
|
+
nonce?: number;
|
|
1845
|
+
value?: bigint;
|
|
1846
|
+
}): Promise<`0x${string}`[]>;
|
|
1847
|
+
/**
|
|
1848
|
+
* Simulate populateIpfsMetadata
|
|
1849
|
+
* Returns gas estimate and result without sending transaction
|
|
1850
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1851
|
+
*/
|
|
1852
|
+
populateIpfsMetadata(coverIds: bigint[], ipfsMetadata: string[], options?: {
|
|
1853
|
+
accessList?: import("viem").AccessList;
|
|
1854
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1855
|
+
chain?: import("viem").Chain | null;
|
|
1856
|
+
dataSuffix?: `0x${string}`;
|
|
1857
|
+
gas?: bigint;
|
|
1858
|
+
gasPrice?: bigint;
|
|
1859
|
+
maxFeePerGas?: bigint;
|
|
1860
|
+
maxPriorityFeePerGas?: bigint;
|
|
1861
|
+
nonce?: number;
|
|
1862
|
+
value?: bigint;
|
|
1863
|
+
}): Promise<void>;
|
|
1864
|
+
/**
|
|
1865
|
+
* Simulate recalculateActiveCoverInAsset
|
|
1866
|
+
* Returns gas estimate and result without sending transaction
|
|
1867
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1868
|
+
*/
|
|
1869
|
+
recalculateActiveCoverInAsset(coverAsset: bigint, options?: {
|
|
1870
|
+
accessList?: import("viem").AccessList;
|
|
1871
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1872
|
+
chain?: import("viem").Chain | null;
|
|
1873
|
+
dataSuffix?: `0x${string}`;
|
|
1874
|
+
gas?: bigint;
|
|
1875
|
+
gasPrice?: bigint;
|
|
1876
|
+
maxFeePerGas?: bigint;
|
|
1877
|
+
maxPriorityFeePerGas?: bigint;
|
|
1878
|
+
nonce?: number;
|
|
1879
|
+
value?: bigint;
|
|
1880
|
+
}): Promise<void>;
|
|
1881
|
+
/**
|
|
1882
|
+
* Simulate setRiConfig
|
|
1883
|
+
* Returns gas estimate and result without sending transaction
|
|
1884
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1885
|
+
*/
|
|
1886
|
+
setRiConfig(providerId: bigint, premiumDestination: `0x${string}`, options?: {
|
|
1887
|
+
accessList?: import("viem").AccessList;
|
|
1888
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1889
|
+
chain?: import("viem").Chain | null;
|
|
1890
|
+
dataSuffix?: `0x${string}`;
|
|
1891
|
+
gas?: bigint;
|
|
1892
|
+
gasPrice?: bigint;
|
|
1893
|
+
maxFeePerGas?: bigint;
|
|
1894
|
+
maxPriorityFeePerGas?: bigint;
|
|
1895
|
+
nonce?: number;
|
|
1896
|
+
value?: bigint;
|
|
1897
|
+
}): Promise<void>;
|
|
1898
|
+
/**
|
|
1899
|
+
* Simulate setRiSigner
|
|
1900
|
+
* Returns gas estimate and result without sending transaction
|
|
1901
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1902
|
+
*/
|
|
1903
|
+
setRiSigner(_riSigner: `0x${string}`, options?: {
|
|
1904
|
+
accessList?: import("viem").AccessList;
|
|
1905
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1906
|
+
chain?: import("viem").Chain | null;
|
|
1907
|
+
dataSuffix?: `0x${string}`;
|
|
1908
|
+
gas?: bigint;
|
|
1909
|
+
gasPrice?: bigint;
|
|
1910
|
+
maxFeePerGas?: bigint;
|
|
1911
|
+
maxPriorityFeePerGas?: bigint;
|
|
1912
|
+
nonce?: number;
|
|
1913
|
+
value?: bigint;
|
|
1914
|
+
}): Promise<void>;
|
|
1915
|
+
/**
|
|
1916
|
+
* Simulate updateTotalActiveCoverAmount
|
|
1917
|
+
* Returns gas estimate and result without sending transaction
|
|
1918
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1919
|
+
*/
|
|
1920
|
+
updateTotalActiveCoverAmount(coverAsset: bigint, options?: {
|
|
1921
|
+
accessList?: import("viem").AccessList;
|
|
1922
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1923
|
+
chain?: import("viem").Chain | null;
|
|
1924
|
+
dataSuffix?: `0x${string}`;
|
|
1925
|
+
gas?: bigint;
|
|
1926
|
+
gasPrice?: bigint;
|
|
1927
|
+
maxFeePerGas?: bigint;
|
|
1928
|
+
maxPriorityFeePerGas?: bigint;
|
|
1929
|
+
nonce?: number;
|
|
1930
|
+
value?: bigint;
|
|
1931
|
+
}): Promise<void>;
|
|
1932
|
+
};
|
|
1933
|
+
/**
|
|
1934
|
+
* Watch contract events
|
|
1935
|
+
*
|
|
1936
|
+
* @example
|
|
1937
|
+
* // Watch all Transfer events
|
|
1938
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1939
|
+
* console.log('Transfer:', event);
|
|
1940
|
+
* });
|
|
1941
|
+
*
|
|
1942
|
+
* // Stop watching
|
|
1943
|
+
* unwatch();
|
|
1944
|
+
*/
|
|
1945
|
+
get watch(): {
|
|
1946
|
+
/**
|
|
1947
|
+
* Watch CoverBought events
|
|
1948
|
+
* @param callback Function to call when event is emitted
|
|
1949
|
+
* @param filter Optional filter for indexed parameters
|
|
1950
|
+
* @returns Unwatch function to stop listening
|
|
1951
|
+
*/
|
|
1952
|
+
CoverBought: (callback: (event: {
|
|
1953
|
+
coverId: bigint;
|
|
1954
|
+
originalCoverId: bigint;
|
|
1955
|
+
buyerMemberId: bigint;
|
|
1956
|
+
productId: bigint;
|
|
1957
|
+
}) => void, filter?: {
|
|
1958
|
+
coverId?: bigint | bigint[] | null;
|
|
1959
|
+
originalCoverId?: bigint | bigint[] | null;
|
|
1960
|
+
buyerMemberId?: bigint | bigint[] | null;
|
|
1961
|
+
}) => () => void;
|
|
1962
|
+
/**
|
|
1963
|
+
* Watch CoverRiAllocated events
|
|
1964
|
+
* @param callback Function to call when event is emitted
|
|
1965
|
+
* @param filter Optional filter for indexed parameters
|
|
1966
|
+
* @returns Unwatch function to stop listening
|
|
1967
|
+
*/
|
|
1968
|
+
CoverRiAllocated: (callback: (event: {
|
|
1969
|
+
coverId: bigint;
|
|
1970
|
+
premium: bigint;
|
|
1971
|
+
paymentAsset: bigint;
|
|
1972
|
+
data: `0x${string}`;
|
|
1973
|
+
dataFormatVersion: bigint;
|
|
1974
|
+
}) => void, filter?: {
|
|
1975
|
+
coverId?: bigint | bigint[] | null;
|
|
1976
|
+
}) => () => void;
|
|
1977
|
+
};
|
|
1978
|
+
}
|