@gitmyabi/topup 1.0.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/README.md +108 -0
- package/contracts/TopUp_json.d.ts +644 -0
- package/contracts/TopUp_json.js +637 -0
- package/contracts/TopUp_json.ts +852 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* TopUp_json ABI
|
|
4
|
+
*
|
|
5
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TopUp_jsonAbi: readonly [{
|
|
8
|
+
readonly inputs: readonly [{
|
|
9
|
+
readonly internalType: "address";
|
|
10
|
+
readonly name: "_weth";
|
|
11
|
+
readonly type: "address";
|
|
12
|
+
}];
|
|
13
|
+
readonly stateMutability: "nonpayable";
|
|
14
|
+
readonly type: "constructor";
|
|
15
|
+
}, {
|
|
16
|
+
readonly inputs: readonly [];
|
|
17
|
+
readonly name: "AlreadyInitialized";
|
|
18
|
+
readonly type: "error";
|
|
19
|
+
}, {
|
|
20
|
+
readonly inputs: readonly [];
|
|
21
|
+
readonly name: "EthTransferFailed";
|
|
22
|
+
readonly type: "error";
|
|
23
|
+
}, {
|
|
24
|
+
readonly inputs: readonly [];
|
|
25
|
+
readonly name: "InvalidAmount";
|
|
26
|
+
readonly type: "error";
|
|
27
|
+
}, {
|
|
28
|
+
readonly inputs: readonly [];
|
|
29
|
+
readonly name: "NewOwnerIsZeroAddress";
|
|
30
|
+
readonly type: "error";
|
|
31
|
+
}, {
|
|
32
|
+
readonly inputs: readonly [];
|
|
33
|
+
readonly name: "NoHandoverRequest";
|
|
34
|
+
readonly type: "error";
|
|
35
|
+
}, {
|
|
36
|
+
readonly inputs: readonly [];
|
|
37
|
+
readonly name: "OnlyOwner";
|
|
38
|
+
readonly type: "error";
|
|
39
|
+
}, {
|
|
40
|
+
readonly inputs: readonly [{
|
|
41
|
+
readonly internalType: "address";
|
|
42
|
+
readonly name: "token";
|
|
43
|
+
readonly type: "address";
|
|
44
|
+
}];
|
|
45
|
+
readonly name: "SafeERC20FailedOperation";
|
|
46
|
+
readonly type: "error";
|
|
47
|
+
}, {
|
|
48
|
+
readonly inputs: readonly [];
|
|
49
|
+
readonly name: "Unauthorized";
|
|
50
|
+
readonly type: "error";
|
|
51
|
+
}, {
|
|
52
|
+
readonly anonymous: false;
|
|
53
|
+
readonly inputs: readonly [{
|
|
54
|
+
readonly indexed: true;
|
|
55
|
+
readonly internalType: "address";
|
|
56
|
+
readonly name: "pendingOwner";
|
|
57
|
+
readonly type: "address";
|
|
58
|
+
}];
|
|
59
|
+
readonly name: "OwnershipHandoverCanceled";
|
|
60
|
+
readonly type: "event";
|
|
61
|
+
}, {
|
|
62
|
+
readonly anonymous: false;
|
|
63
|
+
readonly inputs: readonly [{
|
|
64
|
+
readonly indexed: true;
|
|
65
|
+
readonly internalType: "address";
|
|
66
|
+
readonly name: "pendingOwner";
|
|
67
|
+
readonly type: "address";
|
|
68
|
+
}];
|
|
69
|
+
readonly name: "OwnershipHandoverRequested";
|
|
70
|
+
readonly type: "event";
|
|
71
|
+
}, {
|
|
72
|
+
readonly anonymous: false;
|
|
73
|
+
readonly inputs: readonly [{
|
|
74
|
+
readonly indexed: true;
|
|
75
|
+
readonly internalType: "address";
|
|
76
|
+
readonly name: "oldOwner";
|
|
77
|
+
readonly type: "address";
|
|
78
|
+
}, {
|
|
79
|
+
readonly indexed: true;
|
|
80
|
+
readonly internalType: "address";
|
|
81
|
+
readonly name: "newOwner";
|
|
82
|
+
readonly type: "address";
|
|
83
|
+
}];
|
|
84
|
+
readonly name: "OwnershipTransferred";
|
|
85
|
+
readonly type: "event";
|
|
86
|
+
}, {
|
|
87
|
+
readonly anonymous: false;
|
|
88
|
+
readonly inputs: readonly [{
|
|
89
|
+
readonly indexed: true;
|
|
90
|
+
readonly internalType: "address";
|
|
91
|
+
readonly name: "token";
|
|
92
|
+
readonly type: "address";
|
|
93
|
+
}, {
|
|
94
|
+
readonly indexed: false;
|
|
95
|
+
readonly internalType: "uint256";
|
|
96
|
+
readonly name: "amount";
|
|
97
|
+
readonly type: "uint256";
|
|
98
|
+
}];
|
|
99
|
+
readonly name: "ProcessTopUp";
|
|
100
|
+
readonly type: "event";
|
|
101
|
+
}, {
|
|
102
|
+
readonly inputs: readonly [];
|
|
103
|
+
readonly name: "ETH";
|
|
104
|
+
readonly outputs: readonly [{
|
|
105
|
+
readonly internalType: "address";
|
|
106
|
+
readonly name: "";
|
|
107
|
+
readonly type: "address";
|
|
108
|
+
}];
|
|
109
|
+
readonly stateMutability: "view";
|
|
110
|
+
readonly type: "function";
|
|
111
|
+
}, {
|
|
112
|
+
readonly inputs: readonly [];
|
|
113
|
+
readonly name: "cancelOwnershipHandover";
|
|
114
|
+
readonly outputs: readonly [];
|
|
115
|
+
readonly stateMutability: "payable";
|
|
116
|
+
readonly type: "function";
|
|
117
|
+
}, {
|
|
118
|
+
readonly inputs: readonly [{
|
|
119
|
+
readonly internalType: "address";
|
|
120
|
+
readonly name: "pendingOwner";
|
|
121
|
+
readonly type: "address";
|
|
122
|
+
}];
|
|
123
|
+
readonly name: "completeOwnershipHandover";
|
|
124
|
+
readonly outputs: readonly [];
|
|
125
|
+
readonly stateMutability: "payable";
|
|
126
|
+
readonly type: "function";
|
|
127
|
+
}, {
|
|
128
|
+
readonly inputs: readonly [{
|
|
129
|
+
readonly internalType: "address";
|
|
130
|
+
readonly name: "_owner";
|
|
131
|
+
readonly type: "address";
|
|
132
|
+
}];
|
|
133
|
+
readonly name: "initialize";
|
|
134
|
+
readonly outputs: readonly [];
|
|
135
|
+
readonly stateMutability: "nonpayable";
|
|
136
|
+
readonly type: "function";
|
|
137
|
+
}, {
|
|
138
|
+
readonly inputs: readonly [];
|
|
139
|
+
readonly name: "owner";
|
|
140
|
+
readonly outputs: readonly [{
|
|
141
|
+
readonly internalType: "address";
|
|
142
|
+
readonly name: "result";
|
|
143
|
+
readonly type: "address";
|
|
144
|
+
}];
|
|
145
|
+
readonly stateMutability: "view";
|
|
146
|
+
readonly type: "function";
|
|
147
|
+
}, {
|
|
148
|
+
readonly inputs: readonly [{
|
|
149
|
+
readonly internalType: "address";
|
|
150
|
+
readonly name: "pendingOwner";
|
|
151
|
+
readonly type: "address";
|
|
152
|
+
}];
|
|
153
|
+
readonly name: "ownershipHandoverExpiresAt";
|
|
154
|
+
readonly outputs: readonly [{
|
|
155
|
+
readonly internalType: "uint256";
|
|
156
|
+
readonly name: "result";
|
|
157
|
+
readonly type: "uint256";
|
|
158
|
+
}];
|
|
159
|
+
readonly stateMutability: "view";
|
|
160
|
+
readonly type: "function";
|
|
161
|
+
}, {
|
|
162
|
+
readonly inputs: readonly [{
|
|
163
|
+
readonly internalType: "address[]";
|
|
164
|
+
readonly name: "tokens";
|
|
165
|
+
readonly type: "address[]";
|
|
166
|
+
}];
|
|
167
|
+
readonly name: "processTopUp";
|
|
168
|
+
readonly outputs: readonly [];
|
|
169
|
+
readonly stateMutability: "nonpayable";
|
|
170
|
+
readonly type: "function";
|
|
171
|
+
}, {
|
|
172
|
+
readonly inputs: readonly [{
|
|
173
|
+
readonly internalType: "address";
|
|
174
|
+
readonly name: "token";
|
|
175
|
+
readonly type: "address";
|
|
176
|
+
}, {
|
|
177
|
+
readonly internalType: "address";
|
|
178
|
+
readonly name: "tradingSafe";
|
|
179
|
+
readonly type: "address";
|
|
180
|
+
}, {
|
|
181
|
+
readonly internalType: "uint256";
|
|
182
|
+
readonly name: "amount";
|
|
183
|
+
readonly type: "uint256";
|
|
184
|
+
}];
|
|
185
|
+
readonly name: "redirectToTradingSafe";
|
|
186
|
+
readonly outputs: readonly [];
|
|
187
|
+
readonly stateMutability: "nonpayable";
|
|
188
|
+
readonly type: "function";
|
|
189
|
+
}, {
|
|
190
|
+
readonly inputs: readonly [];
|
|
191
|
+
readonly name: "renounceOwnership";
|
|
192
|
+
readonly outputs: readonly [];
|
|
193
|
+
readonly stateMutability: "payable";
|
|
194
|
+
readonly type: "function";
|
|
195
|
+
}, {
|
|
196
|
+
readonly inputs: readonly [];
|
|
197
|
+
readonly name: "requestOwnershipHandover";
|
|
198
|
+
readonly outputs: readonly [];
|
|
199
|
+
readonly stateMutability: "payable";
|
|
200
|
+
readonly type: "function";
|
|
201
|
+
}, {
|
|
202
|
+
readonly inputs: readonly [{
|
|
203
|
+
readonly internalType: "address";
|
|
204
|
+
readonly name: "newOwner";
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
}];
|
|
207
|
+
readonly name: "transferOwnership";
|
|
208
|
+
readonly outputs: readonly [];
|
|
209
|
+
readonly stateMutability: "payable";
|
|
210
|
+
readonly type: "function";
|
|
211
|
+
}, {
|
|
212
|
+
readonly inputs: readonly [];
|
|
213
|
+
readonly name: "weth";
|
|
214
|
+
readonly outputs: readonly [{
|
|
215
|
+
readonly internalType: "address";
|
|
216
|
+
readonly name: "";
|
|
217
|
+
readonly type: "address";
|
|
218
|
+
}];
|
|
219
|
+
readonly stateMutability: "view";
|
|
220
|
+
readonly type: "function";
|
|
221
|
+
}, {
|
|
222
|
+
readonly stateMutability: "payable";
|
|
223
|
+
readonly type: "receive";
|
|
224
|
+
}];
|
|
225
|
+
/**
|
|
226
|
+
* Type-safe ABI for TopUp_json
|
|
227
|
+
*/
|
|
228
|
+
export type TopUp_jsonAbi = typeof TopUp_jsonAbi;
|
|
229
|
+
/**
|
|
230
|
+
* Contract instance type for TopUp_json
|
|
231
|
+
*/
|
|
232
|
+
export type TopUp_jsonContract = any;
|
|
233
|
+
/**
|
|
234
|
+
* TopUp_json Contract Class
|
|
235
|
+
*
|
|
236
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```typescript
|
|
240
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
241
|
+
* import { mainnet } from 'viem/chains';
|
|
242
|
+
* import { TopUp_json } from 'TopUp_json';
|
|
243
|
+
*
|
|
244
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
245
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
246
|
+
*
|
|
247
|
+
* const contract = new TopUp_json('0x...', { publicClient, walletClient });
|
|
248
|
+
*
|
|
249
|
+
* // Read functions
|
|
250
|
+
* const result = await contract.balanceOf('0x...');
|
|
251
|
+
*
|
|
252
|
+
* // Write functions
|
|
253
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
254
|
+
*
|
|
255
|
+
* // Simulate transactions (dry-run)
|
|
256
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
257
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
258
|
+
*
|
|
259
|
+
* // Watch events
|
|
260
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
261
|
+
* console.log('Transfer event:', event);
|
|
262
|
+
* });
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
265
|
+
export declare class TopUp_json {
|
|
266
|
+
private contract;
|
|
267
|
+
private contractAddress;
|
|
268
|
+
private publicClient;
|
|
269
|
+
constructor(address: Address, clients: {
|
|
270
|
+
publicClient: PublicClient;
|
|
271
|
+
walletClient?: WalletClient;
|
|
272
|
+
});
|
|
273
|
+
/**
|
|
274
|
+
* Get the contract address
|
|
275
|
+
*/
|
|
276
|
+
get address(): Address;
|
|
277
|
+
/**
|
|
278
|
+
* Get the underlying viem contract instance
|
|
279
|
+
*/
|
|
280
|
+
getContract(): TopUp_jsonContract;
|
|
281
|
+
/**
|
|
282
|
+
* ETH
|
|
283
|
+
* view
|
|
284
|
+
*/
|
|
285
|
+
ETH(): Promise<`0x${string}`>;
|
|
286
|
+
/**
|
|
287
|
+
* owner
|
|
288
|
+
* view
|
|
289
|
+
*/
|
|
290
|
+
owner(): Promise<`0x${string}`>;
|
|
291
|
+
/**
|
|
292
|
+
* ownershipHandoverExpiresAt
|
|
293
|
+
* view
|
|
294
|
+
*/
|
|
295
|
+
ownershipHandoverExpiresAt(pendingOwner: `0x${string}`): Promise<bigint>;
|
|
296
|
+
/**
|
|
297
|
+
* weth
|
|
298
|
+
* view
|
|
299
|
+
*/
|
|
300
|
+
weth(): Promise<`0x${string}`>;
|
|
301
|
+
/**
|
|
302
|
+
* cancelOwnershipHandover
|
|
303
|
+
* payable
|
|
304
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
305
|
+
*/
|
|
306
|
+
cancelOwnershipHandover(options?: {
|
|
307
|
+
accessList?: import('viem').AccessList;
|
|
308
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
309
|
+
chain?: import('viem').Chain | null;
|
|
310
|
+
dataSuffix?: `0x${string}`;
|
|
311
|
+
gas?: bigint;
|
|
312
|
+
gasPrice?: bigint;
|
|
313
|
+
maxFeePerGas?: bigint;
|
|
314
|
+
maxPriorityFeePerGas?: bigint;
|
|
315
|
+
nonce?: number;
|
|
316
|
+
value?: bigint;
|
|
317
|
+
}): Promise<`0x${string}`>;
|
|
318
|
+
/**
|
|
319
|
+
* completeOwnershipHandover
|
|
320
|
+
* payable
|
|
321
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
322
|
+
*/
|
|
323
|
+
completeOwnershipHandover(pendingOwner: `0x${string}`, options?: {
|
|
324
|
+
accessList?: import('viem').AccessList;
|
|
325
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
326
|
+
chain?: import('viem').Chain | null;
|
|
327
|
+
dataSuffix?: `0x${string}`;
|
|
328
|
+
gas?: bigint;
|
|
329
|
+
gasPrice?: bigint;
|
|
330
|
+
maxFeePerGas?: bigint;
|
|
331
|
+
maxPriorityFeePerGas?: bigint;
|
|
332
|
+
nonce?: number;
|
|
333
|
+
value?: bigint;
|
|
334
|
+
}): Promise<`0x${string}`>;
|
|
335
|
+
/**
|
|
336
|
+
* initialize
|
|
337
|
+
* nonpayable
|
|
338
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
339
|
+
*/
|
|
340
|
+
initialize(_owner: `0x${string}`, options?: {
|
|
341
|
+
accessList?: import('viem').AccessList;
|
|
342
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
343
|
+
chain?: import('viem').Chain | null;
|
|
344
|
+
dataSuffix?: `0x${string}`;
|
|
345
|
+
gas?: bigint;
|
|
346
|
+
gasPrice?: bigint;
|
|
347
|
+
maxFeePerGas?: bigint;
|
|
348
|
+
maxPriorityFeePerGas?: bigint;
|
|
349
|
+
nonce?: number;
|
|
350
|
+
value?: bigint;
|
|
351
|
+
}): Promise<`0x${string}`>;
|
|
352
|
+
/**
|
|
353
|
+
* processTopUp
|
|
354
|
+
* nonpayable
|
|
355
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
356
|
+
*/
|
|
357
|
+
processTopUp(tokens: `0x${string}`[], options?: {
|
|
358
|
+
accessList?: import('viem').AccessList;
|
|
359
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
360
|
+
chain?: import('viem').Chain | null;
|
|
361
|
+
dataSuffix?: `0x${string}`;
|
|
362
|
+
gas?: bigint;
|
|
363
|
+
gasPrice?: bigint;
|
|
364
|
+
maxFeePerGas?: bigint;
|
|
365
|
+
maxPriorityFeePerGas?: bigint;
|
|
366
|
+
nonce?: number;
|
|
367
|
+
value?: bigint;
|
|
368
|
+
}): Promise<`0x${string}`>;
|
|
369
|
+
/**
|
|
370
|
+
* redirectToTradingSafe
|
|
371
|
+
* nonpayable
|
|
372
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
373
|
+
*/
|
|
374
|
+
redirectToTradingSafe(token: `0x${string}`, tradingSafe: `0x${string}`, amount: bigint, options?: {
|
|
375
|
+
accessList?: import('viem').AccessList;
|
|
376
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
377
|
+
chain?: import('viem').Chain | null;
|
|
378
|
+
dataSuffix?: `0x${string}`;
|
|
379
|
+
gas?: bigint;
|
|
380
|
+
gasPrice?: bigint;
|
|
381
|
+
maxFeePerGas?: bigint;
|
|
382
|
+
maxPriorityFeePerGas?: bigint;
|
|
383
|
+
nonce?: number;
|
|
384
|
+
value?: bigint;
|
|
385
|
+
}): Promise<`0x${string}`>;
|
|
386
|
+
/**
|
|
387
|
+
* renounceOwnership
|
|
388
|
+
* payable
|
|
389
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
390
|
+
*/
|
|
391
|
+
renounceOwnership(options?: {
|
|
392
|
+
accessList?: import('viem').AccessList;
|
|
393
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
394
|
+
chain?: import('viem').Chain | null;
|
|
395
|
+
dataSuffix?: `0x${string}`;
|
|
396
|
+
gas?: bigint;
|
|
397
|
+
gasPrice?: bigint;
|
|
398
|
+
maxFeePerGas?: bigint;
|
|
399
|
+
maxPriorityFeePerGas?: bigint;
|
|
400
|
+
nonce?: number;
|
|
401
|
+
value?: bigint;
|
|
402
|
+
}): Promise<`0x${string}`>;
|
|
403
|
+
/**
|
|
404
|
+
* requestOwnershipHandover
|
|
405
|
+
* payable
|
|
406
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
407
|
+
*/
|
|
408
|
+
requestOwnershipHandover(options?: {
|
|
409
|
+
accessList?: import('viem').AccessList;
|
|
410
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
411
|
+
chain?: import('viem').Chain | null;
|
|
412
|
+
dataSuffix?: `0x${string}`;
|
|
413
|
+
gas?: bigint;
|
|
414
|
+
gasPrice?: bigint;
|
|
415
|
+
maxFeePerGas?: bigint;
|
|
416
|
+
maxPriorityFeePerGas?: bigint;
|
|
417
|
+
nonce?: number;
|
|
418
|
+
value?: bigint;
|
|
419
|
+
}): Promise<`0x${string}`>;
|
|
420
|
+
/**
|
|
421
|
+
* transferOwnership
|
|
422
|
+
* payable
|
|
423
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
424
|
+
*/
|
|
425
|
+
transferOwnership(newOwner: `0x${string}`, options?: {
|
|
426
|
+
accessList?: import('viem').AccessList;
|
|
427
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
428
|
+
chain?: import('viem').Chain | null;
|
|
429
|
+
dataSuffix?: `0x${string}`;
|
|
430
|
+
gas?: bigint;
|
|
431
|
+
gasPrice?: bigint;
|
|
432
|
+
maxFeePerGas?: bigint;
|
|
433
|
+
maxPriorityFeePerGas?: bigint;
|
|
434
|
+
nonce?: number;
|
|
435
|
+
value?: bigint;
|
|
436
|
+
}): Promise<`0x${string}`>;
|
|
437
|
+
/**
|
|
438
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
442
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
443
|
+
* console.log('Would succeed:', result.result);
|
|
444
|
+
*/
|
|
445
|
+
get simulate(): {
|
|
446
|
+
/**
|
|
447
|
+
* Simulate cancelOwnershipHandover
|
|
448
|
+
* Returns gas estimate and result without sending transaction
|
|
449
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
450
|
+
*/
|
|
451
|
+
cancelOwnershipHandover(options?: {
|
|
452
|
+
accessList?: import("viem").AccessList;
|
|
453
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
454
|
+
chain?: import("viem").Chain | null;
|
|
455
|
+
dataSuffix?: `0x${string}`;
|
|
456
|
+
gas?: bigint;
|
|
457
|
+
gasPrice?: bigint;
|
|
458
|
+
maxFeePerGas?: bigint;
|
|
459
|
+
maxPriorityFeePerGas?: bigint;
|
|
460
|
+
nonce?: number;
|
|
461
|
+
value?: bigint;
|
|
462
|
+
}): Promise<void>;
|
|
463
|
+
/**
|
|
464
|
+
* Simulate completeOwnershipHandover
|
|
465
|
+
* Returns gas estimate and result without sending transaction
|
|
466
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
467
|
+
*/
|
|
468
|
+
completeOwnershipHandover(pendingOwner: `0x${string}`, options?: {
|
|
469
|
+
accessList?: import("viem").AccessList;
|
|
470
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
471
|
+
chain?: import("viem").Chain | null;
|
|
472
|
+
dataSuffix?: `0x${string}`;
|
|
473
|
+
gas?: bigint;
|
|
474
|
+
gasPrice?: bigint;
|
|
475
|
+
maxFeePerGas?: bigint;
|
|
476
|
+
maxPriorityFeePerGas?: bigint;
|
|
477
|
+
nonce?: number;
|
|
478
|
+
value?: bigint;
|
|
479
|
+
}): Promise<void>;
|
|
480
|
+
/**
|
|
481
|
+
* Simulate initialize
|
|
482
|
+
* Returns gas estimate and result without sending transaction
|
|
483
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
484
|
+
*/
|
|
485
|
+
initialize(_owner: `0x${string}`, options?: {
|
|
486
|
+
accessList?: import("viem").AccessList;
|
|
487
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
488
|
+
chain?: import("viem").Chain | null;
|
|
489
|
+
dataSuffix?: `0x${string}`;
|
|
490
|
+
gas?: bigint;
|
|
491
|
+
gasPrice?: bigint;
|
|
492
|
+
maxFeePerGas?: bigint;
|
|
493
|
+
maxPriorityFeePerGas?: bigint;
|
|
494
|
+
nonce?: number;
|
|
495
|
+
value?: bigint;
|
|
496
|
+
}): Promise<void>;
|
|
497
|
+
/**
|
|
498
|
+
* Simulate processTopUp
|
|
499
|
+
* Returns gas estimate and result without sending transaction
|
|
500
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
501
|
+
*/
|
|
502
|
+
processTopUp(tokens: `0x${string}`[], options?: {
|
|
503
|
+
accessList?: import("viem").AccessList;
|
|
504
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
505
|
+
chain?: import("viem").Chain | null;
|
|
506
|
+
dataSuffix?: `0x${string}`;
|
|
507
|
+
gas?: bigint;
|
|
508
|
+
gasPrice?: bigint;
|
|
509
|
+
maxFeePerGas?: bigint;
|
|
510
|
+
maxPriorityFeePerGas?: bigint;
|
|
511
|
+
nonce?: number;
|
|
512
|
+
value?: bigint;
|
|
513
|
+
}): Promise<void>;
|
|
514
|
+
/**
|
|
515
|
+
* Simulate redirectToTradingSafe
|
|
516
|
+
* Returns gas estimate and result without sending transaction
|
|
517
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
518
|
+
*/
|
|
519
|
+
redirectToTradingSafe(token: `0x${string}`, tradingSafe: `0x${string}`, amount: bigint, options?: {
|
|
520
|
+
accessList?: import("viem").AccessList;
|
|
521
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
522
|
+
chain?: import("viem").Chain | null;
|
|
523
|
+
dataSuffix?: `0x${string}`;
|
|
524
|
+
gas?: bigint;
|
|
525
|
+
gasPrice?: bigint;
|
|
526
|
+
maxFeePerGas?: bigint;
|
|
527
|
+
maxPriorityFeePerGas?: bigint;
|
|
528
|
+
nonce?: number;
|
|
529
|
+
value?: bigint;
|
|
530
|
+
}): Promise<void>;
|
|
531
|
+
/**
|
|
532
|
+
* Simulate renounceOwnership
|
|
533
|
+
* Returns gas estimate and result without sending transaction
|
|
534
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
535
|
+
*/
|
|
536
|
+
renounceOwnership(options?: {
|
|
537
|
+
accessList?: import("viem").AccessList;
|
|
538
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
539
|
+
chain?: import("viem").Chain | null;
|
|
540
|
+
dataSuffix?: `0x${string}`;
|
|
541
|
+
gas?: bigint;
|
|
542
|
+
gasPrice?: bigint;
|
|
543
|
+
maxFeePerGas?: bigint;
|
|
544
|
+
maxPriorityFeePerGas?: bigint;
|
|
545
|
+
nonce?: number;
|
|
546
|
+
value?: bigint;
|
|
547
|
+
}): Promise<void>;
|
|
548
|
+
/**
|
|
549
|
+
* Simulate requestOwnershipHandover
|
|
550
|
+
* Returns gas estimate and result without sending transaction
|
|
551
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
552
|
+
*/
|
|
553
|
+
requestOwnershipHandover(options?: {
|
|
554
|
+
accessList?: import("viem").AccessList;
|
|
555
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
556
|
+
chain?: import("viem").Chain | null;
|
|
557
|
+
dataSuffix?: `0x${string}`;
|
|
558
|
+
gas?: bigint;
|
|
559
|
+
gasPrice?: bigint;
|
|
560
|
+
maxFeePerGas?: bigint;
|
|
561
|
+
maxPriorityFeePerGas?: bigint;
|
|
562
|
+
nonce?: number;
|
|
563
|
+
value?: bigint;
|
|
564
|
+
}): Promise<void>;
|
|
565
|
+
/**
|
|
566
|
+
* Simulate transferOwnership
|
|
567
|
+
* Returns gas estimate and result without sending transaction
|
|
568
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
569
|
+
*/
|
|
570
|
+
transferOwnership(newOwner: `0x${string}`, options?: {
|
|
571
|
+
accessList?: import("viem").AccessList;
|
|
572
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
573
|
+
chain?: import("viem").Chain | null;
|
|
574
|
+
dataSuffix?: `0x${string}`;
|
|
575
|
+
gas?: bigint;
|
|
576
|
+
gasPrice?: bigint;
|
|
577
|
+
maxFeePerGas?: bigint;
|
|
578
|
+
maxPriorityFeePerGas?: bigint;
|
|
579
|
+
nonce?: number;
|
|
580
|
+
value?: bigint;
|
|
581
|
+
}): Promise<void>;
|
|
582
|
+
};
|
|
583
|
+
/**
|
|
584
|
+
* Watch contract events
|
|
585
|
+
*
|
|
586
|
+
* @example
|
|
587
|
+
* // Watch all Transfer events
|
|
588
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
589
|
+
* console.log('Transfer:', event);
|
|
590
|
+
* });
|
|
591
|
+
*
|
|
592
|
+
* // Stop watching
|
|
593
|
+
* unwatch();
|
|
594
|
+
*/
|
|
595
|
+
get watch(): {
|
|
596
|
+
/**
|
|
597
|
+
* Watch OwnershipHandoverCanceled events
|
|
598
|
+
* @param callback Function to call when event is emitted
|
|
599
|
+
* @param filter Optional filter for indexed parameters
|
|
600
|
+
* @returns Unwatch function to stop listening
|
|
601
|
+
*/
|
|
602
|
+
OwnershipHandoverCanceled: (callback: (event: {
|
|
603
|
+
pendingOwner: `0x${string}`;
|
|
604
|
+
}) => void, filter?: {
|
|
605
|
+
pendingOwner: `0x${string}`;
|
|
606
|
+
}) => () => void;
|
|
607
|
+
/**
|
|
608
|
+
* Watch OwnershipHandoverRequested events
|
|
609
|
+
* @param callback Function to call when event is emitted
|
|
610
|
+
* @param filter Optional filter for indexed parameters
|
|
611
|
+
* @returns Unwatch function to stop listening
|
|
612
|
+
*/
|
|
613
|
+
OwnershipHandoverRequested: (callback: (event: {
|
|
614
|
+
pendingOwner: `0x${string}`;
|
|
615
|
+
}) => void, filter?: {
|
|
616
|
+
pendingOwner: `0x${string}`;
|
|
617
|
+
}) => () => void;
|
|
618
|
+
/**
|
|
619
|
+
* Watch OwnershipTransferred events
|
|
620
|
+
* @param callback Function to call when event is emitted
|
|
621
|
+
* @param filter Optional filter for indexed parameters
|
|
622
|
+
* @returns Unwatch function to stop listening
|
|
623
|
+
*/
|
|
624
|
+
OwnershipTransferred: (callback: (event: {
|
|
625
|
+
oldOwner: `0x${string}`;
|
|
626
|
+
newOwner: `0x${string}`;
|
|
627
|
+
}) => void, filter?: {
|
|
628
|
+
oldOwner: `0x${string}`;
|
|
629
|
+
newOwner: `0x${string}`;
|
|
630
|
+
}) => () => void;
|
|
631
|
+
/**
|
|
632
|
+
* Watch ProcessTopUp events
|
|
633
|
+
* @param callback Function to call when event is emitted
|
|
634
|
+
* @param filter Optional filter for indexed parameters
|
|
635
|
+
* @returns Unwatch function to stop listening
|
|
636
|
+
*/
|
|
637
|
+
ProcessTopUp: (callback: (event: {
|
|
638
|
+
token: `0x${string}`;
|
|
639
|
+
amount: bigint;
|
|
640
|
+
}) => void, filter?: {
|
|
641
|
+
token: `0x${string}`;
|
|
642
|
+
}) => () => void;
|
|
643
|
+
};
|
|
644
|
+
}
|