@gitmyabi/walletsimple 1.0.26 → 1.0.28
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 +277 -133
- package/contracts/WalletSimple_json.js +311 -148
- package/contracts/WalletSimple_json.ts +338 -149
- package/package.json +3 -3
|
@@ -9,266 +9,367 @@ const viem_1 = require("viem");
|
|
|
9
9
|
*/
|
|
10
10
|
exports.WalletSimple_jsonAbi = [
|
|
11
11
|
{
|
|
12
|
-
"
|
|
12
|
+
"anonymous": false,
|
|
13
13
|
"inputs": [
|
|
14
14
|
{
|
|
15
|
-
"
|
|
15
|
+
"indexed": false,
|
|
16
|
+
"internalType": "address",
|
|
17
|
+
"name": "msgSender",
|
|
16
18
|
"type": "address"
|
|
17
19
|
},
|
|
18
20
|
{
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
+
"indexed": false,
|
|
22
|
+
"internalType": "address",
|
|
23
|
+
"name": "otherSigner",
|
|
24
|
+
"type": "address"
|
|
21
25
|
},
|
|
22
26
|
{
|
|
23
|
-
"
|
|
27
|
+
"indexed": false,
|
|
28
|
+
"internalType": "bytes32",
|
|
29
|
+
"name": "operation",
|
|
30
|
+
"type": "bytes32"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"name": "BatchTransacted",
|
|
34
|
+
"type": "event"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"anonymous": false,
|
|
38
|
+
"inputs": [
|
|
39
|
+
{
|
|
40
|
+
"indexed": false,
|
|
41
|
+
"internalType": "address",
|
|
42
|
+
"name": "sender",
|
|
24
43
|
"type": "address"
|
|
25
44
|
},
|
|
26
45
|
{
|
|
27
|
-
"
|
|
28
|
-
"
|
|
46
|
+
"indexed": false,
|
|
47
|
+
"internalType": "address",
|
|
48
|
+
"name": "recipient",
|
|
49
|
+
"type": "address"
|
|
29
50
|
},
|
|
30
51
|
{
|
|
31
|
-
"
|
|
52
|
+
"indexed": false,
|
|
53
|
+
"internalType": "uint256",
|
|
54
|
+
"name": "value",
|
|
32
55
|
"type": "uint256"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"name": "signature",
|
|
36
|
-
"type": "bytes"
|
|
37
56
|
}
|
|
38
57
|
],
|
|
39
|
-
"name": "
|
|
40
|
-
"
|
|
41
|
-
"payable": false,
|
|
42
|
-
"stateMutability": "nonpayable",
|
|
43
|
-
"type": "function"
|
|
58
|
+
"name": "BatchTransfer",
|
|
59
|
+
"type": "event"
|
|
44
60
|
},
|
|
45
61
|
{
|
|
46
|
-
"
|
|
62
|
+
"anonymous": false,
|
|
47
63
|
"inputs": [
|
|
48
64
|
{
|
|
49
|
-
"
|
|
65
|
+
"indexed": false,
|
|
66
|
+
"internalType": "address",
|
|
67
|
+
"name": "from",
|
|
68
|
+
"type": "address"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"indexed": false,
|
|
72
|
+
"internalType": "uint256",
|
|
73
|
+
"name": "value",
|
|
50
74
|
"type": "uint256"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"name": "signers",
|
|
54
|
-
"outputs": [
|
|
75
|
+
},
|
|
55
76
|
{
|
|
56
|
-
"
|
|
57
|
-
"
|
|
77
|
+
"indexed": false,
|
|
78
|
+
"internalType": "bytes",
|
|
79
|
+
"name": "data",
|
|
80
|
+
"type": "bytes"
|
|
58
81
|
}
|
|
59
82
|
],
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"type": "function"
|
|
83
|
+
"name": "Deposited",
|
|
84
|
+
"type": "event"
|
|
63
85
|
},
|
|
64
86
|
{
|
|
65
|
-
"
|
|
87
|
+
"anonymous": false,
|
|
66
88
|
"inputs": [
|
|
67
89
|
{
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
"name": "tokenContractAddress",
|
|
90
|
+
"indexed": false,
|
|
91
|
+
"internalType": "address",
|
|
92
|
+
"name": "msgSender",
|
|
73
93
|
"type": "address"
|
|
74
94
|
}
|
|
75
95
|
],
|
|
76
|
-
"name": "
|
|
77
|
-
"
|
|
78
|
-
"payable": false,
|
|
79
|
-
"stateMutability": "nonpayable",
|
|
80
|
-
"type": "function"
|
|
96
|
+
"name": "SafeModeActivated",
|
|
97
|
+
"type": "event"
|
|
81
98
|
},
|
|
82
99
|
{
|
|
83
|
-
"
|
|
100
|
+
"anonymous": false,
|
|
84
101
|
"inputs": [
|
|
85
102
|
{
|
|
86
|
-
"
|
|
103
|
+
"indexed": false,
|
|
104
|
+
"internalType": "address",
|
|
105
|
+
"name": "msgSender",
|
|
87
106
|
"type": "address"
|
|
88
107
|
},
|
|
89
108
|
{
|
|
90
|
-
"
|
|
91
|
-
"
|
|
109
|
+
"indexed": false,
|
|
110
|
+
"internalType": "address",
|
|
111
|
+
"name": "otherSigner",
|
|
112
|
+
"type": "address"
|
|
92
113
|
},
|
|
93
114
|
{
|
|
94
|
-
"
|
|
95
|
-
"
|
|
115
|
+
"indexed": false,
|
|
116
|
+
"internalType": "bytes32",
|
|
117
|
+
"name": "operation",
|
|
118
|
+
"type": "bytes32"
|
|
96
119
|
},
|
|
97
120
|
{
|
|
98
|
-
"
|
|
99
|
-
"
|
|
121
|
+
"indexed": false,
|
|
122
|
+
"internalType": "address",
|
|
123
|
+
"name": "toAddress",
|
|
124
|
+
"type": "address"
|
|
100
125
|
},
|
|
101
126
|
{
|
|
102
|
-
"
|
|
127
|
+
"indexed": false,
|
|
128
|
+
"internalType": "uint256",
|
|
129
|
+
"name": "value",
|
|
103
130
|
"type": "uint256"
|
|
104
131
|
},
|
|
105
132
|
{
|
|
106
|
-
"
|
|
133
|
+
"indexed": false,
|
|
134
|
+
"internalType": "bytes",
|
|
135
|
+
"name": "data",
|
|
107
136
|
"type": "bytes"
|
|
108
137
|
}
|
|
109
138
|
],
|
|
110
|
-
"name": "
|
|
139
|
+
"name": "Transacted",
|
|
140
|
+
"type": "event"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"stateMutability": "payable",
|
|
144
|
+
"type": "fallback"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"inputs": [],
|
|
148
|
+
"name": "activateSafeMode",
|
|
111
149
|
"outputs": [],
|
|
112
|
-
"payable": false,
|
|
113
150
|
"stateMutability": "nonpayable",
|
|
114
151
|
"type": "function"
|
|
115
152
|
},
|
|
116
153
|
{
|
|
117
|
-
"constant": true,
|
|
118
154
|
"inputs": [
|
|
119
155
|
{
|
|
120
|
-
"
|
|
156
|
+
"internalType": "address payable",
|
|
157
|
+
"name": "forwarderAddress",
|
|
121
158
|
"type": "address"
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
"name": "isSigner",
|
|
125
|
-
"outputs": [
|
|
159
|
+
},
|
|
126
160
|
{
|
|
127
|
-
"
|
|
128
|
-
"
|
|
161
|
+
"internalType": "address",
|
|
162
|
+
"name": "tokenContractAddress",
|
|
163
|
+
"type": "address"
|
|
129
164
|
}
|
|
130
165
|
],
|
|
131
|
-
"
|
|
132
|
-
"
|
|
166
|
+
"name": "flushForwarderTokens",
|
|
167
|
+
"outputs": [],
|
|
168
|
+
"stateMutability": "nonpayable",
|
|
133
169
|
"type": "function"
|
|
134
170
|
},
|
|
135
171
|
{
|
|
136
|
-
"constant": true,
|
|
137
172
|
"inputs": [],
|
|
138
173
|
"name": "getNextSequenceId",
|
|
139
174
|
"outputs": [
|
|
140
175
|
{
|
|
176
|
+
"internalType": "uint256",
|
|
141
177
|
"name": "",
|
|
142
178
|
"type": "uint256"
|
|
143
179
|
}
|
|
144
180
|
],
|
|
145
|
-
"payable": false,
|
|
146
181
|
"stateMutability": "view",
|
|
147
182
|
"type": "function"
|
|
148
183
|
},
|
|
149
184
|
{
|
|
150
|
-
"
|
|
151
|
-
"inputs": [],
|
|
152
|
-
"name": "createForwarder",
|
|
153
|
-
"outputs": [
|
|
185
|
+
"inputs": [
|
|
154
186
|
{
|
|
155
|
-
"
|
|
156
|
-
"
|
|
187
|
+
"internalType": "address[]",
|
|
188
|
+
"name": "allowedSigners",
|
|
189
|
+
"type": "address[]"
|
|
157
190
|
}
|
|
158
191
|
],
|
|
159
|
-
"
|
|
192
|
+
"name": "init",
|
|
193
|
+
"outputs": [],
|
|
160
194
|
"stateMutability": "nonpayable",
|
|
161
195
|
"type": "function"
|
|
162
196
|
},
|
|
163
197
|
{
|
|
164
|
-
"constant": true,
|
|
165
198
|
"inputs": [],
|
|
166
|
-
"name": "
|
|
199
|
+
"name": "initialized",
|
|
167
200
|
"outputs": [
|
|
168
201
|
{
|
|
202
|
+
"internalType": "bool",
|
|
169
203
|
"name": "",
|
|
170
204
|
"type": "bool"
|
|
171
205
|
}
|
|
172
206
|
],
|
|
173
|
-
"payable": false,
|
|
174
207
|
"stateMutability": "view",
|
|
175
208
|
"type": "function"
|
|
176
209
|
},
|
|
177
|
-
{
|
|
178
|
-
"constant": false,
|
|
179
|
-
"inputs": [],
|
|
180
|
-
"name": "activateSafeMode",
|
|
181
|
-
"outputs": [],
|
|
182
|
-
"payable": false,
|
|
183
|
-
"stateMutability": "nonpayable",
|
|
184
|
-
"type": "function"
|
|
185
|
-
},
|
|
186
210
|
{
|
|
187
211
|
"inputs": [
|
|
188
212
|
{
|
|
189
|
-
"
|
|
190
|
-
"
|
|
213
|
+
"internalType": "address",
|
|
214
|
+
"name": "signer",
|
|
215
|
+
"type": "address"
|
|
191
216
|
}
|
|
192
217
|
],
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
|
|
218
|
+
"name": "isSigner",
|
|
219
|
+
"outputs": [
|
|
220
|
+
{
|
|
221
|
+
"internalType": "bool",
|
|
222
|
+
"name": "",
|
|
223
|
+
"type": "bool"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"stateMutability": "view",
|
|
227
|
+
"type": "function"
|
|
196
228
|
},
|
|
197
229
|
{
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"
|
|
230
|
+
"inputs": [],
|
|
231
|
+
"name": "safeMode",
|
|
232
|
+
"outputs": [
|
|
233
|
+
{
|
|
234
|
+
"internalType": "bool",
|
|
235
|
+
"name": "",
|
|
236
|
+
"type": "bool"
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"stateMutability": "view",
|
|
240
|
+
"type": "function"
|
|
201
241
|
},
|
|
202
242
|
{
|
|
203
|
-
"anonymous": false,
|
|
204
243
|
"inputs": [
|
|
205
244
|
{
|
|
206
|
-
"
|
|
207
|
-
"name": "
|
|
245
|
+
"internalType": "address",
|
|
246
|
+
"name": "toAddress",
|
|
208
247
|
"type": "address"
|
|
209
248
|
},
|
|
210
249
|
{
|
|
211
|
-
"
|
|
250
|
+
"internalType": "uint256",
|
|
212
251
|
"name": "value",
|
|
213
252
|
"type": "uint256"
|
|
214
253
|
},
|
|
215
254
|
{
|
|
216
|
-
"
|
|
255
|
+
"internalType": "bytes",
|
|
217
256
|
"name": "data",
|
|
218
257
|
"type": "bytes"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"internalType": "uint256",
|
|
261
|
+
"name": "expireTime",
|
|
262
|
+
"type": "uint256"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"internalType": "uint256",
|
|
266
|
+
"name": "sequenceId",
|
|
267
|
+
"type": "uint256"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"internalType": "bytes",
|
|
271
|
+
"name": "signature",
|
|
272
|
+
"type": "bytes"
|
|
219
273
|
}
|
|
220
274
|
],
|
|
221
|
-
"name": "
|
|
222
|
-
"
|
|
275
|
+
"name": "sendMultiSig",
|
|
276
|
+
"outputs": [],
|
|
277
|
+
"stateMutability": "nonpayable",
|
|
278
|
+
"type": "function"
|
|
223
279
|
},
|
|
224
280
|
{
|
|
225
|
-
"anonymous": false,
|
|
226
281
|
"inputs": [
|
|
227
282
|
{
|
|
228
|
-
"
|
|
229
|
-
"name": "
|
|
230
|
-
"type": "address"
|
|
283
|
+
"internalType": "address[]",
|
|
284
|
+
"name": "recipients",
|
|
285
|
+
"type": "address[]"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"internalType": "uint256[]",
|
|
289
|
+
"name": "values",
|
|
290
|
+
"type": "uint256[]"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"internalType": "uint256",
|
|
294
|
+
"name": "expireTime",
|
|
295
|
+
"type": "uint256"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"internalType": "uint256",
|
|
299
|
+
"name": "sequenceId",
|
|
300
|
+
"type": "uint256"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"internalType": "bytes",
|
|
304
|
+
"name": "signature",
|
|
305
|
+
"type": "bytes"
|
|
231
306
|
}
|
|
232
307
|
],
|
|
233
|
-
"name": "
|
|
234
|
-
"
|
|
308
|
+
"name": "sendMultiSigBatch",
|
|
309
|
+
"outputs": [],
|
|
310
|
+
"stateMutability": "nonpayable",
|
|
311
|
+
"type": "function"
|
|
235
312
|
},
|
|
236
313
|
{
|
|
237
|
-
"anonymous": false,
|
|
238
314
|
"inputs": [
|
|
239
315
|
{
|
|
240
|
-
"
|
|
241
|
-
"name": "
|
|
316
|
+
"internalType": "address",
|
|
317
|
+
"name": "toAddress",
|
|
242
318
|
"type": "address"
|
|
243
319
|
},
|
|
244
320
|
{
|
|
245
|
-
"
|
|
246
|
-
"name": "
|
|
247
|
-
"type": "
|
|
321
|
+
"internalType": "uint256",
|
|
322
|
+
"name": "value",
|
|
323
|
+
"type": "uint256"
|
|
248
324
|
},
|
|
249
325
|
{
|
|
250
|
-
"
|
|
251
|
-
"name": "
|
|
252
|
-
"type": "
|
|
326
|
+
"internalType": "address",
|
|
327
|
+
"name": "tokenContractAddress",
|
|
328
|
+
"type": "address"
|
|
253
329
|
},
|
|
254
330
|
{
|
|
255
|
-
"
|
|
256
|
-
"name": "
|
|
257
|
-
"type": "
|
|
331
|
+
"internalType": "uint256",
|
|
332
|
+
"name": "expireTime",
|
|
333
|
+
"type": "uint256"
|
|
258
334
|
},
|
|
259
335
|
{
|
|
260
|
-
"
|
|
261
|
-
"name": "
|
|
336
|
+
"internalType": "uint256",
|
|
337
|
+
"name": "sequenceId",
|
|
262
338
|
"type": "uint256"
|
|
263
339
|
},
|
|
264
340
|
{
|
|
265
|
-
"
|
|
266
|
-
"name": "
|
|
341
|
+
"internalType": "bytes",
|
|
342
|
+
"name": "signature",
|
|
267
343
|
"type": "bytes"
|
|
268
344
|
}
|
|
269
345
|
],
|
|
270
|
-
"name": "
|
|
271
|
-
"
|
|
346
|
+
"name": "sendMultiSigToken",
|
|
347
|
+
"outputs": [],
|
|
348
|
+
"stateMutability": "nonpayable",
|
|
349
|
+
"type": "function"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"inputs": [
|
|
353
|
+
{
|
|
354
|
+
"internalType": "address",
|
|
355
|
+
"name": "",
|
|
356
|
+
"type": "address"
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"name": "signers",
|
|
360
|
+
"outputs": [
|
|
361
|
+
{
|
|
362
|
+
"internalType": "bool",
|
|
363
|
+
"name": "",
|
|
364
|
+
"type": "bool"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"stateMutability": "view",
|
|
368
|
+
"type": "function"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"stateMutability": "payable",
|
|
372
|
+
"type": "receive"
|
|
272
373
|
}
|
|
273
374
|
];
|
|
274
375
|
/**
|
|
@@ -329,25 +430,25 @@ class WalletSimple_json {
|
|
|
329
430
|
return this.contract;
|
|
330
431
|
}
|
|
331
432
|
/**
|
|
332
|
-
*
|
|
433
|
+
* getNextSequenceId
|
|
333
434
|
* view
|
|
334
435
|
*/
|
|
335
|
-
async
|
|
336
|
-
return this.contract.read.
|
|
436
|
+
async getNextSequenceId() {
|
|
437
|
+
return this.contract.read.getNextSequenceId();
|
|
337
438
|
}
|
|
338
439
|
/**
|
|
339
|
-
*
|
|
440
|
+
* initialized
|
|
340
441
|
* view
|
|
341
442
|
*/
|
|
342
|
-
async
|
|
343
|
-
return this.contract.read.
|
|
443
|
+
async initialized() {
|
|
444
|
+
return this.contract.read.initialized();
|
|
344
445
|
}
|
|
345
446
|
/**
|
|
346
|
-
*
|
|
447
|
+
* isSigner
|
|
347
448
|
* view
|
|
348
449
|
*/
|
|
349
|
-
async
|
|
350
|
-
return this.contract.read.
|
|
450
|
+
async isSigner(signer) {
|
|
451
|
+
return this.contract.read.isSigner([signer]);
|
|
351
452
|
}
|
|
352
453
|
/**
|
|
353
454
|
* safeMode
|
|
@@ -357,15 +458,22 @@ class WalletSimple_json {
|
|
|
357
458
|
return this.contract.read.safeMode();
|
|
358
459
|
}
|
|
359
460
|
/**
|
|
360
|
-
*
|
|
461
|
+
* signers
|
|
462
|
+
* view
|
|
463
|
+
*/
|
|
464
|
+
async signers(arg0) {
|
|
465
|
+
return this.contract.read.signers([arg0]);
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* activateSafeMode
|
|
361
469
|
* nonpayable
|
|
362
470
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
363
471
|
*/
|
|
364
|
-
async
|
|
472
|
+
async activateSafeMode(options) {
|
|
365
473
|
if (!this.contract.write) {
|
|
366
474
|
throw new Error('Wallet client is required for write operations');
|
|
367
475
|
}
|
|
368
|
-
return this.contract.write.
|
|
476
|
+
return this.contract.write.activateSafeMode(options);
|
|
369
477
|
}
|
|
370
478
|
/**
|
|
371
479
|
* flushForwarderTokens
|
|
@@ -378,6 +486,17 @@ class WalletSimple_json {
|
|
|
378
486
|
}
|
|
379
487
|
return this.contract.write.flushForwarderTokens([forwarderAddress, tokenContractAddress], options);
|
|
380
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* init
|
|
491
|
+
* nonpayable
|
|
492
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
493
|
+
*/
|
|
494
|
+
async init(allowedSigners, options) {
|
|
495
|
+
if (!this.contract.write) {
|
|
496
|
+
throw new Error('Wallet client is required for write operations');
|
|
497
|
+
}
|
|
498
|
+
return this.contract.write.init([allowedSigners], options);
|
|
499
|
+
}
|
|
381
500
|
/**
|
|
382
501
|
* sendMultiSig
|
|
383
502
|
* nonpayable
|
|
@@ -390,26 +509,26 @@ class WalletSimple_json {
|
|
|
390
509
|
return this.contract.write.sendMultiSig([toAddress, value, data, expireTime, sequenceId, signature], options);
|
|
391
510
|
}
|
|
392
511
|
/**
|
|
393
|
-
*
|
|
512
|
+
* sendMultiSigBatch
|
|
394
513
|
* nonpayable
|
|
395
514
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
396
515
|
*/
|
|
397
|
-
async
|
|
516
|
+
async sendMultiSigBatch(recipients, values, expireTime, sequenceId, signature, options) {
|
|
398
517
|
if (!this.contract.write) {
|
|
399
518
|
throw new Error('Wallet client is required for write operations');
|
|
400
519
|
}
|
|
401
|
-
return this.contract.write.
|
|
520
|
+
return this.contract.write.sendMultiSigBatch([recipients, values, expireTime, sequenceId, signature], options);
|
|
402
521
|
}
|
|
403
522
|
/**
|
|
404
|
-
*
|
|
523
|
+
* sendMultiSigToken
|
|
405
524
|
* nonpayable
|
|
406
525
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
407
526
|
*/
|
|
408
|
-
async
|
|
527
|
+
async sendMultiSigToken(toAddress, value, tokenContractAddress, expireTime, sequenceId, signature, options) {
|
|
409
528
|
if (!this.contract.write) {
|
|
410
529
|
throw new Error('Wallet client is required for write operations');
|
|
411
530
|
}
|
|
412
|
-
return this.contract.write.
|
|
531
|
+
return this.contract.write.sendMultiSigToken([toAddress, value, tokenContractAddress, expireTime, sequenceId, signature], options);
|
|
413
532
|
}
|
|
414
533
|
/**
|
|
415
534
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
@@ -426,12 +545,12 @@ class WalletSimple_json {
|
|
|
426
545
|
}
|
|
427
546
|
return {
|
|
428
547
|
/**
|
|
429
|
-
* Simulate
|
|
548
|
+
* Simulate activateSafeMode
|
|
430
549
|
* Returns gas estimate and result without sending transaction
|
|
431
550
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
432
551
|
*/
|
|
433
|
-
async
|
|
434
|
-
return contract.simulate.
|
|
552
|
+
async activateSafeMode(options) {
|
|
553
|
+
return contract.simulate.activateSafeMode(options);
|
|
435
554
|
},
|
|
436
555
|
/**
|
|
437
556
|
* Simulate flushForwarderTokens
|
|
@@ -441,6 +560,14 @@ class WalletSimple_json {
|
|
|
441
560
|
async flushForwarderTokens(forwarderAddress, tokenContractAddress, options) {
|
|
442
561
|
return contract.simulate.flushForwarderTokens([forwarderAddress, tokenContractAddress], options);
|
|
443
562
|
},
|
|
563
|
+
/**
|
|
564
|
+
* Simulate init
|
|
565
|
+
* Returns gas estimate and result without sending transaction
|
|
566
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
567
|
+
*/
|
|
568
|
+
async init(allowedSigners, options) {
|
|
569
|
+
return contract.simulate.init([allowedSigners], options);
|
|
570
|
+
},
|
|
444
571
|
/**
|
|
445
572
|
* Simulate sendMultiSig
|
|
446
573
|
* Returns gas estimate and result without sending transaction
|
|
@@ -450,20 +577,20 @@ class WalletSimple_json {
|
|
|
450
577
|
return contract.simulate.sendMultiSig([toAddress, value, data, expireTime, sequenceId, signature], options);
|
|
451
578
|
},
|
|
452
579
|
/**
|
|
453
|
-
* Simulate
|
|
580
|
+
* Simulate sendMultiSigBatch
|
|
454
581
|
* Returns gas estimate and result without sending transaction
|
|
455
582
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
456
583
|
*/
|
|
457
|
-
async
|
|
458
|
-
return contract.simulate.
|
|
584
|
+
async sendMultiSigBatch(recipients, values, expireTime, sequenceId, signature, options) {
|
|
585
|
+
return contract.simulate.sendMultiSigBatch([recipients, values, expireTime, sequenceId, signature], options);
|
|
459
586
|
},
|
|
460
587
|
/**
|
|
461
|
-
* Simulate
|
|
588
|
+
* Simulate sendMultiSigToken
|
|
462
589
|
* Returns gas estimate and result without sending transaction
|
|
463
590
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
464
591
|
*/
|
|
465
|
-
async
|
|
466
|
-
return contract.simulate.
|
|
592
|
+
async sendMultiSigToken(toAddress, value, tokenContractAddress, expireTime, sequenceId, signature, options) {
|
|
593
|
+
return contract.simulate.sendMultiSigToken([toAddress, value, tokenContractAddress, expireTime, sequenceId, signature], options);
|
|
467
594
|
}
|
|
468
595
|
};
|
|
469
596
|
}
|
|
@@ -481,6 +608,42 @@ class WalletSimple_json {
|
|
|
481
608
|
*/
|
|
482
609
|
get watch() {
|
|
483
610
|
return {
|
|
611
|
+
/**
|
|
612
|
+
* Watch BatchTransacted events
|
|
613
|
+
* @param callback Function to call when event is emitted
|
|
614
|
+
* @param filter Optional filter for indexed parameters
|
|
615
|
+
* @returns Unwatch function to stop listening
|
|
616
|
+
*/
|
|
617
|
+
BatchTransacted: (callback) => {
|
|
618
|
+
return this.publicClient.watchContractEvent({
|
|
619
|
+
address: this.contractAddress,
|
|
620
|
+
abi: exports.WalletSimple_jsonAbi,
|
|
621
|
+
eventName: 'BatchTransacted',
|
|
622
|
+
onLogs: (logs) => {
|
|
623
|
+
logs.forEach((log) => {
|
|
624
|
+
callback(log.args);
|
|
625
|
+
});
|
|
626
|
+
},
|
|
627
|
+
});
|
|
628
|
+
},
|
|
629
|
+
/**
|
|
630
|
+
* Watch BatchTransfer events
|
|
631
|
+
* @param callback Function to call when event is emitted
|
|
632
|
+
* @param filter Optional filter for indexed parameters
|
|
633
|
+
* @returns Unwatch function to stop listening
|
|
634
|
+
*/
|
|
635
|
+
BatchTransfer: (callback) => {
|
|
636
|
+
return this.publicClient.watchContractEvent({
|
|
637
|
+
address: this.contractAddress,
|
|
638
|
+
abi: exports.WalletSimple_jsonAbi,
|
|
639
|
+
eventName: 'BatchTransfer',
|
|
640
|
+
onLogs: (logs) => {
|
|
641
|
+
logs.forEach((log) => {
|
|
642
|
+
callback(log.args);
|
|
643
|
+
});
|
|
644
|
+
},
|
|
645
|
+
});
|
|
646
|
+
},
|
|
484
647
|
/**
|
|
485
648
|
* Watch Deposited events
|
|
486
649
|
* @param callback Function to call when event is emitted
|