@gitmyabi/walletsimple 1.0.28 → 1.0.30
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 +3 -3
- package/contracts/WalletSimple_json.d.ts +133 -277
- package/contracts/WalletSimple_json.js +148 -311
- package/contracts/WalletSimple_json.ts +149 -338
- package/package.json +3 -3
|
@@ -8,367 +8,266 @@ import { getContract } from 'viem';
|
|
|
8
8
|
*/
|
|
9
9
|
export const WalletSimple_jsonAbi = [
|
|
10
10
|
{
|
|
11
|
-
"
|
|
11
|
+
"constant": false,
|
|
12
12
|
"inputs": [
|
|
13
13
|
{
|
|
14
|
-
"
|
|
15
|
-
"internalType": "address",
|
|
16
|
-
"name": "msgSender",
|
|
14
|
+
"name": "toAddress",
|
|
17
15
|
"type": "address"
|
|
18
16
|
},
|
|
19
17
|
{
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"name": "otherSigner",
|
|
23
|
-
"type": "address"
|
|
18
|
+
"name": "value",
|
|
19
|
+
"type": "uint256"
|
|
24
20
|
},
|
|
25
21
|
{
|
|
26
|
-
"
|
|
27
|
-
"internalType": "bytes32",
|
|
28
|
-
"name": "operation",
|
|
29
|
-
"type": "bytes32"
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"name": "BatchTransacted",
|
|
33
|
-
"type": "event"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"anonymous": false,
|
|
37
|
-
"inputs": [
|
|
38
|
-
{
|
|
39
|
-
"indexed": false,
|
|
40
|
-
"internalType": "address",
|
|
41
|
-
"name": "sender",
|
|
22
|
+
"name": "tokenContractAddress",
|
|
42
23
|
"type": "address"
|
|
43
24
|
},
|
|
44
25
|
{
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"name": "recipient",
|
|
48
|
-
"type": "address"
|
|
26
|
+
"name": "expireTime",
|
|
27
|
+
"type": "uint256"
|
|
49
28
|
},
|
|
50
29
|
{
|
|
51
|
-
"
|
|
52
|
-
"internalType": "uint256",
|
|
53
|
-
"name": "value",
|
|
30
|
+
"name": "sequenceId",
|
|
54
31
|
"type": "uint256"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "signature",
|
|
35
|
+
"type": "bytes"
|
|
55
36
|
}
|
|
56
37
|
],
|
|
57
|
-
"name": "
|
|
58
|
-
"
|
|
38
|
+
"name": "sendMultiSigToken",
|
|
39
|
+
"outputs": [],
|
|
40
|
+
"payable": false,
|
|
41
|
+
"stateMutability": "nonpayable",
|
|
42
|
+
"type": "function"
|
|
59
43
|
},
|
|
60
44
|
{
|
|
61
|
-
"
|
|
45
|
+
"constant": true,
|
|
62
46
|
"inputs": [
|
|
63
47
|
{
|
|
64
|
-
"
|
|
65
|
-
"internalType": "address",
|
|
66
|
-
"name": "from",
|
|
67
|
-
"type": "address"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"indexed": false,
|
|
71
|
-
"internalType": "uint256",
|
|
72
|
-
"name": "value",
|
|
48
|
+
"name": "",
|
|
73
49
|
"type": "uint256"
|
|
74
|
-
}
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"name": "signers",
|
|
53
|
+
"outputs": [
|
|
75
54
|
{
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"name": "data",
|
|
79
|
-
"type": "bytes"
|
|
55
|
+
"name": "",
|
|
56
|
+
"type": "address"
|
|
80
57
|
}
|
|
81
58
|
],
|
|
82
|
-
"
|
|
83
|
-
"
|
|
59
|
+
"payable": false,
|
|
60
|
+
"stateMutability": "view",
|
|
61
|
+
"type": "function"
|
|
84
62
|
},
|
|
85
63
|
{
|
|
86
|
-
"
|
|
64
|
+
"constant": false,
|
|
87
65
|
"inputs": [
|
|
88
66
|
{
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
67
|
+
"name": "forwarderAddress",
|
|
68
|
+
"type": "address"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "tokenContractAddress",
|
|
92
72
|
"type": "address"
|
|
93
73
|
}
|
|
94
74
|
],
|
|
95
|
-
"name": "
|
|
96
|
-
"
|
|
75
|
+
"name": "flushForwarderTokens",
|
|
76
|
+
"outputs": [],
|
|
77
|
+
"payable": false,
|
|
78
|
+
"stateMutability": "nonpayable",
|
|
79
|
+
"type": "function"
|
|
97
80
|
},
|
|
98
81
|
{
|
|
99
|
-
"
|
|
82
|
+
"constant": false,
|
|
100
83
|
"inputs": [
|
|
101
84
|
{
|
|
102
|
-
"
|
|
103
|
-
"internalType": "address",
|
|
104
|
-
"name": "msgSender",
|
|
85
|
+
"name": "toAddress",
|
|
105
86
|
"type": "address"
|
|
106
87
|
},
|
|
107
88
|
{
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"name": "otherSigner",
|
|
111
|
-
"type": "address"
|
|
89
|
+
"name": "value",
|
|
90
|
+
"type": "uint256"
|
|
112
91
|
},
|
|
113
92
|
{
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"name": "operation",
|
|
117
|
-
"type": "bytes32"
|
|
93
|
+
"name": "data",
|
|
94
|
+
"type": "bytes"
|
|
118
95
|
},
|
|
119
96
|
{
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"name": "toAddress",
|
|
123
|
-
"type": "address"
|
|
97
|
+
"name": "expireTime",
|
|
98
|
+
"type": "uint256"
|
|
124
99
|
},
|
|
125
100
|
{
|
|
126
|
-
"
|
|
127
|
-
"internalType": "uint256",
|
|
128
|
-
"name": "value",
|
|
101
|
+
"name": "sequenceId",
|
|
129
102
|
"type": "uint256"
|
|
130
103
|
},
|
|
131
104
|
{
|
|
132
|
-
"
|
|
133
|
-
"internalType": "bytes",
|
|
134
|
-
"name": "data",
|
|
105
|
+
"name": "signature",
|
|
135
106
|
"type": "bytes"
|
|
136
107
|
}
|
|
137
108
|
],
|
|
138
|
-
"name": "
|
|
139
|
-
"type": "event"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"stateMutability": "payable",
|
|
143
|
-
"type": "fallback"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"inputs": [],
|
|
147
|
-
"name": "activateSafeMode",
|
|
109
|
+
"name": "sendMultiSig",
|
|
148
110
|
"outputs": [],
|
|
111
|
+
"payable": false,
|
|
149
112
|
"stateMutability": "nonpayable",
|
|
150
113
|
"type": "function"
|
|
151
114
|
},
|
|
152
115
|
{
|
|
116
|
+
"constant": true,
|
|
153
117
|
"inputs": [
|
|
154
118
|
{
|
|
155
|
-
"
|
|
156
|
-
"name": "forwarderAddress",
|
|
119
|
+
"name": "signer",
|
|
157
120
|
"type": "address"
|
|
158
|
-
}
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"name": "isSigner",
|
|
124
|
+
"outputs": [
|
|
159
125
|
{
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"type": "address"
|
|
126
|
+
"name": "",
|
|
127
|
+
"type": "bool"
|
|
163
128
|
}
|
|
164
129
|
],
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
"stateMutability": "nonpayable",
|
|
130
|
+
"payable": false,
|
|
131
|
+
"stateMutability": "view",
|
|
168
132
|
"type": "function"
|
|
169
133
|
},
|
|
170
134
|
{
|
|
135
|
+
"constant": true,
|
|
171
136
|
"inputs": [],
|
|
172
137
|
"name": "getNextSequenceId",
|
|
173
138
|
"outputs": [
|
|
174
139
|
{
|
|
175
|
-
"internalType": "uint256",
|
|
176
140
|
"name": "",
|
|
177
141
|
"type": "uint256"
|
|
178
142
|
}
|
|
179
143
|
],
|
|
144
|
+
"payable": false,
|
|
180
145
|
"stateMutability": "view",
|
|
181
146
|
"type": "function"
|
|
182
147
|
},
|
|
183
148
|
{
|
|
184
|
-
"
|
|
149
|
+
"constant": false,
|
|
150
|
+
"inputs": [],
|
|
151
|
+
"name": "createForwarder",
|
|
152
|
+
"outputs": [
|
|
185
153
|
{
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"type": "address[]"
|
|
154
|
+
"name": "",
|
|
155
|
+
"type": "address"
|
|
189
156
|
}
|
|
190
157
|
],
|
|
191
|
-
"
|
|
192
|
-
"outputs": [],
|
|
158
|
+
"payable": false,
|
|
193
159
|
"stateMutability": "nonpayable",
|
|
194
160
|
"type": "function"
|
|
195
161
|
},
|
|
196
162
|
{
|
|
163
|
+
"constant": true,
|
|
197
164
|
"inputs": [],
|
|
198
|
-
"name": "
|
|
165
|
+
"name": "safeMode",
|
|
199
166
|
"outputs": [
|
|
200
167
|
{
|
|
201
|
-
"internalType": "bool",
|
|
202
168
|
"name": "",
|
|
203
169
|
"type": "bool"
|
|
204
170
|
}
|
|
205
171
|
],
|
|
172
|
+
"payable": false,
|
|
206
173
|
"stateMutability": "view",
|
|
207
174
|
"type": "function"
|
|
208
175
|
},
|
|
209
176
|
{
|
|
210
|
-
"
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
],
|
|
217
|
-
"name": "isSigner",
|
|
218
|
-
"outputs": [
|
|
219
|
-
{
|
|
220
|
-
"internalType": "bool",
|
|
221
|
-
"name": "",
|
|
222
|
-
"type": "bool"
|
|
223
|
-
}
|
|
224
|
-
],
|
|
225
|
-
"stateMutability": "view",
|
|
177
|
+
"constant": false,
|
|
178
|
+
"inputs": [],
|
|
179
|
+
"name": "activateSafeMode",
|
|
180
|
+
"outputs": [],
|
|
181
|
+
"payable": false,
|
|
182
|
+
"stateMutability": "nonpayable",
|
|
226
183
|
"type": "function"
|
|
227
184
|
},
|
|
228
185
|
{
|
|
229
|
-
"inputs": [
|
|
230
|
-
"name": "safeMode",
|
|
231
|
-
"outputs": [
|
|
186
|
+
"inputs": [
|
|
232
187
|
{
|
|
233
|
-
"
|
|
234
|
-
"
|
|
235
|
-
"type": "bool"
|
|
188
|
+
"name": "allowedSigners",
|
|
189
|
+
"type": "address[]"
|
|
236
190
|
}
|
|
237
191
|
],
|
|
238
|
-
"
|
|
239
|
-
"
|
|
192
|
+
"payable": false,
|
|
193
|
+
"stateMutability": "nonpayable",
|
|
194
|
+
"type": "constructor"
|
|
240
195
|
},
|
|
241
196
|
{
|
|
197
|
+
"payable": true,
|
|
198
|
+
"stateMutability": "payable",
|
|
199
|
+
"type": "fallback"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"anonymous": false,
|
|
242
203
|
"inputs": [
|
|
243
204
|
{
|
|
244
|
-
"
|
|
245
|
-
"name": "
|
|
205
|
+
"indexed": false,
|
|
206
|
+
"name": "from",
|
|
246
207
|
"type": "address"
|
|
247
208
|
},
|
|
248
209
|
{
|
|
249
|
-
"
|
|
210
|
+
"indexed": false,
|
|
250
211
|
"name": "value",
|
|
251
212
|
"type": "uint256"
|
|
252
213
|
},
|
|
253
214
|
{
|
|
254
|
-
"
|
|
215
|
+
"indexed": false,
|
|
255
216
|
"name": "data",
|
|
256
217
|
"type": "bytes"
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"internalType": "uint256",
|
|
260
|
-
"name": "expireTime",
|
|
261
|
-
"type": "uint256"
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"internalType": "uint256",
|
|
265
|
-
"name": "sequenceId",
|
|
266
|
-
"type": "uint256"
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"internalType": "bytes",
|
|
270
|
-
"name": "signature",
|
|
271
|
-
"type": "bytes"
|
|
272
218
|
}
|
|
273
219
|
],
|
|
274
|
-
"name": "
|
|
275
|
-
"
|
|
276
|
-
"stateMutability": "nonpayable",
|
|
277
|
-
"type": "function"
|
|
220
|
+
"name": "Deposited",
|
|
221
|
+
"type": "event"
|
|
278
222
|
},
|
|
279
223
|
{
|
|
224
|
+
"anonymous": false,
|
|
280
225
|
"inputs": [
|
|
281
226
|
{
|
|
282
|
-
"
|
|
283
|
-
"name": "
|
|
284
|
-
"type": "address
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
"internalType": "uint256[]",
|
|
288
|
-
"name": "values",
|
|
289
|
-
"type": "uint256[]"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"internalType": "uint256",
|
|
293
|
-
"name": "expireTime",
|
|
294
|
-
"type": "uint256"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
"internalType": "uint256",
|
|
298
|
-
"name": "sequenceId",
|
|
299
|
-
"type": "uint256"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"internalType": "bytes",
|
|
303
|
-
"name": "signature",
|
|
304
|
-
"type": "bytes"
|
|
227
|
+
"indexed": false,
|
|
228
|
+
"name": "msgSender",
|
|
229
|
+
"type": "address"
|
|
305
230
|
}
|
|
306
231
|
],
|
|
307
|
-
"name": "
|
|
308
|
-
"
|
|
309
|
-
"stateMutability": "nonpayable",
|
|
310
|
-
"type": "function"
|
|
232
|
+
"name": "SafeModeActivated",
|
|
233
|
+
"type": "event"
|
|
311
234
|
},
|
|
312
235
|
{
|
|
236
|
+
"anonymous": false,
|
|
313
237
|
"inputs": [
|
|
314
238
|
{
|
|
315
|
-
"
|
|
316
|
-
"name": "
|
|
239
|
+
"indexed": false,
|
|
240
|
+
"name": "msgSender",
|
|
317
241
|
"type": "address"
|
|
318
242
|
},
|
|
319
243
|
{
|
|
320
|
-
"
|
|
321
|
-
"name": "
|
|
322
|
-
"type": "
|
|
244
|
+
"indexed": false,
|
|
245
|
+
"name": "otherSigner",
|
|
246
|
+
"type": "address"
|
|
323
247
|
},
|
|
324
248
|
{
|
|
325
|
-
"
|
|
326
|
-
"name": "
|
|
327
|
-
"type": "
|
|
249
|
+
"indexed": false,
|
|
250
|
+
"name": "operation",
|
|
251
|
+
"type": "bytes32"
|
|
328
252
|
},
|
|
329
253
|
{
|
|
330
|
-
"
|
|
331
|
-
"name": "
|
|
332
|
-
"type": "
|
|
254
|
+
"indexed": false,
|
|
255
|
+
"name": "toAddress",
|
|
256
|
+
"type": "address"
|
|
333
257
|
},
|
|
334
258
|
{
|
|
335
|
-
"
|
|
336
|
-
"name": "
|
|
259
|
+
"indexed": false,
|
|
260
|
+
"name": "value",
|
|
337
261
|
"type": "uint256"
|
|
338
262
|
},
|
|
339
263
|
{
|
|
340
|
-
"
|
|
341
|
-
"name": "
|
|
264
|
+
"indexed": false,
|
|
265
|
+
"name": "data",
|
|
342
266
|
"type": "bytes"
|
|
343
267
|
}
|
|
344
268
|
],
|
|
345
|
-
"name": "
|
|
346
|
-
"
|
|
347
|
-
"stateMutability": "nonpayable",
|
|
348
|
-
"type": "function"
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
"inputs": [
|
|
352
|
-
{
|
|
353
|
-
"internalType": "address",
|
|
354
|
-
"name": "",
|
|
355
|
-
"type": "address"
|
|
356
|
-
}
|
|
357
|
-
],
|
|
358
|
-
"name": "signers",
|
|
359
|
-
"outputs": [
|
|
360
|
-
{
|
|
361
|
-
"internalType": "bool",
|
|
362
|
-
"name": "",
|
|
363
|
-
"type": "bool"
|
|
364
|
-
}
|
|
365
|
-
],
|
|
366
|
-
"stateMutability": "view",
|
|
367
|
-
"type": "function"
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
"stateMutability": "payable",
|
|
371
|
-
"type": "receive"
|
|
269
|
+
"name": "Transacted",
|
|
270
|
+
"type": "event"
|
|
372
271
|
}
|
|
373
272
|
] as const satisfies Abi;
|
|
374
273
|
|
|
@@ -455,19 +354,11 @@ export class WalletSimple_json {
|
|
|
455
354
|
}
|
|
456
355
|
|
|
457
356
|
/**
|
|
458
|
-
*
|
|
459
|
-
* view
|
|
460
|
-
*/
|
|
461
|
-
async getNextSequenceId(): Promise<bigint> {
|
|
462
|
-
return this.contract.read.getNextSequenceId() as Promise<bigint>;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* initialized
|
|
357
|
+
* signers
|
|
467
358
|
* view
|
|
468
359
|
*/
|
|
469
|
-
async
|
|
470
|
-
return this.contract.read.
|
|
360
|
+
async signers(arg0: bigint): Promise<`0x${string}`> {
|
|
361
|
+
return this.contract.read.signers([arg0] as const) as Promise<`0x${string}`>;
|
|
471
362
|
}
|
|
472
363
|
|
|
473
364
|
/**
|
|
@@ -479,27 +370,27 @@ export class WalletSimple_json {
|
|
|
479
370
|
}
|
|
480
371
|
|
|
481
372
|
/**
|
|
482
|
-
*
|
|
373
|
+
* getNextSequenceId
|
|
483
374
|
* view
|
|
484
375
|
*/
|
|
485
|
-
async
|
|
486
|
-
return this.contract.read.
|
|
376
|
+
async getNextSequenceId(): Promise<bigint> {
|
|
377
|
+
return this.contract.read.getNextSequenceId() as Promise<bigint>;
|
|
487
378
|
}
|
|
488
379
|
|
|
489
380
|
/**
|
|
490
|
-
*
|
|
381
|
+
* safeMode
|
|
491
382
|
* view
|
|
492
383
|
*/
|
|
493
|
-
async
|
|
494
|
-
return this.contract.read.
|
|
384
|
+
async safeMode(): Promise<boolean> {
|
|
385
|
+
return this.contract.read.safeMode() as Promise<boolean>;
|
|
495
386
|
}
|
|
496
387
|
|
|
497
388
|
/**
|
|
498
|
-
*
|
|
389
|
+
* sendMultiSigToken
|
|
499
390
|
* nonpayable
|
|
500
391
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
501
392
|
*/
|
|
502
|
-
async
|
|
393
|
+
async sendMultiSigToken(toAddress: `0x${string}`, value: bigint, tokenContractAddress: `0x${string}`, expireTime: bigint, sequenceId: bigint, signature: `0x${string}`, options?: {
|
|
503
394
|
accessList?: import('viem').AccessList;
|
|
504
395
|
authorizationList?: import('viem').AuthorizationList;
|
|
505
396
|
chain?: import('viem').Chain | null;
|
|
@@ -514,7 +405,7 @@ export class WalletSimple_json {
|
|
|
514
405
|
if (!this.contract.write) {
|
|
515
406
|
throw new Error('Wallet client is required for write operations');
|
|
516
407
|
}
|
|
517
|
-
return this.contract.write.
|
|
408
|
+
return this.contract.write.sendMultiSigToken([toAddress, value, tokenContractAddress, expireTime, sequenceId, signature] as const, options) as Promise<`0x${string}`>;
|
|
518
409
|
}
|
|
519
410
|
|
|
520
411
|
/**
|
|
@@ -540,29 +431,6 @@ export class WalletSimple_json {
|
|
|
540
431
|
return this.contract.write.flushForwarderTokens([forwarderAddress, tokenContractAddress] as const, options) as Promise<`0x${string}`>;
|
|
541
432
|
}
|
|
542
433
|
|
|
543
|
-
/**
|
|
544
|
-
* init
|
|
545
|
-
* nonpayable
|
|
546
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
547
|
-
*/
|
|
548
|
-
async init(allowedSigners: `0x${string}`[], options?: {
|
|
549
|
-
accessList?: import('viem').AccessList;
|
|
550
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
551
|
-
chain?: import('viem').Chain | null;
|
|
552
|
-
dataSuffix?: `0x${string}`;
|
|
553
|
-
gas?: bigint;
|
|
554
|
-
gasPrice?: bigint;
|
|
555
|
-
maxFeePerGas?: bigint;
|
|
556
|
-
maxPriorityFeePerGas?: bigint;
|
|
557
|
-
nonce?: number;
|
|
558
|
-
value?: bigint;
|
|
559
|
-
}): Promise<`0x${string}`> {
|
|
560
|
-
if (!this.contract.write) {
|
|
561
|
-
throw new Error('Wallet client is required for write operations');
|
|
562
|
-
}
|
|
563
|
-
return this.contract.write.init([allowedSigners] as const, options) as Promise<`0x${string}`>;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
434
|
/**
|
|
567
435
|
* sendMultiSig
|
|
568
436
|
* nonpayable
|
|
@@ -587,11 +455,11 @@ export class WalletSimple_json {
|
|
|
587
455
|
}
|
|
588
456
|
|
|
589
457
|
/**
|
|
590
|
-
*
|
|
458
|
+
* createForwarder
|
|
591
459
|
* nonpayable
|
|
592
460
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
593
461
|
*/
|
|
594
|
-
async
|
|
462
|
+
async createForwarder(options?: {
|
|
595
463
|
accessList?: import('viem').AccessList;
|
|
596
464
|
authorizationList?: import('viem').AuthorizationList;
|
|
597
465
|
chain?: import('viem').Chain | null;
|
|
@@ -606,15 +474,15 @@ export class WalletSimple_json {
|
|
|
606
474
|
if (!this.contract.write) {
|
|
607
475
|
throw new Error('Wallet client is required for write operations');
|
|
608
476
|
}
|
|
609
|
-
return this.contract.write.
|
|
477
|
+
return this.contract.write.createForwarder(options) as Promise<`0x${string}`>;
|
|
610
478
|
}
|
|
611
479
|
|
|
612
480
|
/**
|
|
613
|
-
*
|
|
481
|
+
* activateSafeMode
|
|
614
482
|
* nonpayable
|
|
615
483
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
616
484
|
*/
|
|
617
|
-
async
|
|
485
|
+
async activateSafeMode(options?: {
|
|
618
486
|
accessList?: import('viem').AccessList;
|
|
619
487
|
authorizationList?: import('viem').AuthorizationList;
|
|
620
488
|
chain?: import('viem').Chain | null;
|
|
@@ -629,7 +497,7 @@ export class WalletSimple_json {
|
|
|
629
497
|
if (!this.contract.write) {
|
|
630
498
|
throw new Error('Wallet client is required for write operations');
|
|
631
499
|
}
|
|
632
|
-
return this.contract.write.
|
|
500
|
+
return this.contract.write.activateSafeMode(options) as Promise<`0x${string}`>;
|
|
633
501
|
}
|
|
634
502
|
|
|
635
503
|
|
|
@@ -649,11 +517,11 @@ export class WalletSimple_json {
|
|
|
649
517
|
}
|
|
650
518
|
return {
|
|
651
519
|
/**
|
|
652
|
-
* Simulate
|
|
520
|
+
* Simulate sendMultiSigToken
|
|
653
521
|
* Returns gas estimate and result without sending transaction
|
|
654
522
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
655
523
|
*/
|
|
656
|
-
async
|
|
524
|
+
async sendMultiSigToken(toAddress: `0x${string}`, value: bigint, tokenContractAddress: `0x${string}`, expireTime: bigint, sequenceId: bigint, signature: `0x${string}`, options?: {
|
|
657
525
|
accessList?: import('viem').AccessList;
|
|
658
526
|
authorizationList?: import('viem').AuthorizationList;
|
|
659
527
|
chain?: import('viem').Chain | null;
|
|
@@ -665,7 +533,7 @@ export class WalletSimple_json {
|
|
|
665
533
|
nonce?: number;
|
|
666
534
|
value?: bigint;
|
|
667
535
|
}): Promise<void> {
|
|
668
|
-
return contract.simulate.
|
|
536
|
+
return contract.simulate.sendMultiSigToken([toAddress, value, tokenContractAddress, expireTime, sequenceId, signature] as const, options) as Promise<void>;
|
|
669
537
|
},
|
|
670
538
|
/**
|
|
671
539
|
* Simulate flushForwarderTokens
|
|
@@ -686,25 +554,6 @@ export class WalletSimple_json {
|
|
|
686
554
|
}): Promise<void> {
|
|
687
555
|
return contract.simulate.flushForwarderTokens([forwarderAddress, tokenContractAddress] as const, options) as Promise<void>;
|
|
688
556
|
},
|
|
689
|
-
/**
|
|
690
|
-
* Simulate init
|
|
691
|
-
* Returns gas estimate and result without sending transaction
|
|
692
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
693
|
-
*/
|
|
694
|
-
async init(allowedSigners: `0x${string}`[], options?: {
|
|
695
|
-
accessList?: import('viem').AccessList;
|
|
696
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
697
|
-
chain?: import('viem').Chain | null;
|
|
698
|
-
dataSuffix?: `0x${string}`;
|
|
699
|
-
gas?: bigint;
|
|
700
|
-
gasPrice?: bigint;
|
|
701
|
-
maxFeePerGas?: bigint;
|
|
702
|
-
maxPriorityFeePerGas?: bigint;
|
|
703
|
-
nonce?: number;
|
|
704
|
-
value?: bigint;
|
|
705
|
-
}): Promise<void> {
|
|
706
|
-
return contract.simulate.init([allowedSigners] as const, options) as Promise<void>;
|
|
707
|
-
},
|
|
708
557
|
/**
|
|
709
558
|
* Simulate sendMultiSig
|
|
710
559
|
* Returns gas estimate and result without sending transaction
|
|
@@ -725,11 +574,11 @@ export class WalletSimple_json {
|
|
|
725
574
|
return contract.simulate.sendMultiSig([toAddress, value, data, expireTime, sequenceId, signature] as const, options) as Promise<void>;
|
|
726
575
|
},
|
|
727
576
|
/**
|
|
728
|
-
* Simulate
|
|
577
|
+
* Simulate createForwarder
|
|
729
578
|
* Returns gas estimate and result without sending transaction
|
|
730
579
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
731
580
|
*/
|
|
732
|
-
async
|
|
581
|
+
async createForwarder(options?: {
|
|
733
582
|
accessList?: import('viem').AccessList;
|
|
734
583
|
authorizationList?: import('viem').AuthorizationList;
|
|
735
584
|
chain?: import('viem').Chain | null;
|
|
@@ -740,15 +589,15 @@ export class WalletSimple_json {
|
|
|
740
589
|
maxPriorityFeePerGas?: bigint;
|
|
741
590
|
nonce?: number;
|
|
742
591
|
value?: bigint;
|
|
743
|
-
}): Promise
|
|
744
|
-
return contract.simulate.
|
|
592
|
+
}): Promise<`0x${string}`> {
|
|
593
|
+
return contract.simulate.createForwarder(options) as Promise<`0x${string}`>;
|
|
745
594
|
},
|
|
746
595
|
/**
|
|
747
|
-
* Simulate
|
|
596
|
+
* Simulate activateSafeMode
|
|
748
597
|
* Returns gas estimate and result without sending transaction
|
|
749
598
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
750
599
|
*/
|
|
751
|
-
async
|
|
600
|
+
async activateSafeMode(options?: {
|
|
752
601
|
accessList?: import('viem').AccessList;
|
|
753
602
|
authorizationList?: import('viem').AuthorizationList;
|
|
754
603
|
chain?: import('viem').Chain | null;
|
|
@@ -760,7 +609,7 @@ export class WalletSimple_json {
|
|
|
760
609
|
nonce?: number;
|
|
761
610
|
value?: bigint;
|
|
762
611
|
}): Promise<void> {
|
|
763
|
-
return contract.simulate.
|
|
612
|
+
return contract.simulate.activateSafeMode(options) as Promise<void>;
|
|
764
613
|
}
|
|
765
614
|
};
|
|
766
615
|
}
|
|
@@ -779,44 +628,6 @@ export class WalletSimple_json {
|
|
|
779
628
|
*/
|
|
780
629
|
get watch() {
|
|
781
630
|
return {
|
|
782
|
-
/**
|
|
783
|
-
* Watch BatchTransacted events
|
|
784
|
-
* @param callback Function to call when event is emitted
|
|
785
|
-
* @param filter Optional filter for indexed parameters
|
|
786
|
-
* @returns Unwatch function to stop listening
|
|
787
|
-
*/
|
|
788
|
-
BatchTransacted: (callback: (event: { msgSender: `0x${string}`; otherSigner: `0x${string}`; operation: `0x${string}` }) => void) => {
|
|
789
|
-
return this.publicClient.watchContractEvent({
|
|
790
|
-
address: this.contractAddress,
|
|
791
|
-
abi: WalletSimple_jsonAbi,
|
|
792
|
-
eventName: 'BatchTransacted',
|
|
793
|
-
|
|
794
|
-
onLogs: (logs: any[]) => {
|
|
795
|
-
logs.forEach((log: any) => {
|
|
796
|
-
callback(log.args as any);
|
|
797
|
-
});
|
|
798
|
-
},
|
|
799
|
-
}) as () => void;
|
|
800
|
-
},
|
|
801
|
-
/**
|
|
802
|
-
* Watch BatchTransfer events
|
|
803
|
-
* @param callback Function to call when event is emitted
|
|
804
|
-
* @param filter Optional filter for indexed parameters
|
|
805
|
-
* @returns Unwatch function to stop listening
|
|
806
|
-
*/
|
|
807
|
-
BatchTransfer: (callback: (event: { sender: `0x${string}`; recipient: `0x${string}`; value: bigint }) => void) => {
|
|
808
|
-
return this.publicClient.watchContractEvent({
|
|
809
|
-
address: this.contractAddress,
|
|
810
|
-
abi: WalletSimple_jsonAbi,
|
|
811
|
-
eventName: 'BatchTransfer',
|
|
812
|
-
|
|
813
|
-
onLogs: (logs: any[]) => {
|
|
814
|
-
logs.forEach((log: any) => {
|
|
815
|
-
callback(log.args as any);
|
|
816
|
-
});
|
|
817
|
-
},
|
|
818
|
-
}) as () => void;
|
|
819
|
-
},
|
|
820
631
|
/**
|
|
821
632
|
* Watch Deposited events
|
|
822
633
|
* @param callback Function to call when event is emitted
|