@gitmyabi/basewallet 1.0.1 → 1.0.3
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 +5 -5
- package/contracts/BaseWallet_json.d.ts +159 -171
- package/contracts/BaseWallet_json.js +187 -200
- package/contracts/BaseWallet_json.ts +191 -204
- package/contracts/index.d.ts +0 -2
- package/contracts/index.js +1 -4
- package/contracts/index.ts +0 -2
- package/package.json +3 -3
- package/contracts/Proxy_json.d.ts +0 -132
- package/contracts/Proxy_json.js +0 -159
- package/contracts/Proxy_json.ts +0 -188
|
@@ -8,175 +8,91 @@ import { getContract } from 'viem';
|
|
|
8
8
|
*/
|
|
9
9
|
export const BaseWallet_jsonAbi = [
|
|
10
10
|
{
|
|
11
|
-
"
|
|
11
|
+
"constant": false,
|
|
12
12
|
"inputs": [
|
|
13
13
|
{
|
|
14
|
-
"
|
|
15
|
-
"internalType": "address",
|
|
16
|
-
"name": "module",
|
|
14
|
+
"name": "_newOwner",
|
|
17
15
|
"type": "address"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"indexed": false,
|
|
21
|
-
"internalType": "bool",
|
|
22
|
-
"name": "value",
|
|
23
|
-
"type": "bool"
|
|
24
16
|
}
|
|
25
17
|
],
|
|
26
|
-
"name": "
|
|
27
|
-
"
|
|
18
|
+
"name": "setOwner",
|
|
19
|
+
"outputs": [],
|
|
20
|
+
"payable": false,
|
|
21
|
+
"stateMutability": "nonpayable",
|
|
22
|
+
"type": "function"
|
|
28
23
|
},
|
|
29
24
|
{
|
|
30
|
-
"
|
|
25
|
+
"constant": false,
|
|
31
26
|
"inputs": [
|
|
32
27
|
{
|
|
33
|
-
"
|
|
34
|
-
"internalType": "address",
|
|
35
|
-
"name": "module",
|
|
28
|
+
"name": "_module",
|
|
36
29
|
"type": "address"
|
|
37
30
|
},
|
|
38
31
|
{
|
|
39
|
-
"
|
|
40
|
-
"internalType": "bytes4",
|
|
41
|
-
"name": "method",
|
|
32
|
+
"name": "_method",
|
|
42
33
|
"type": "bytes4"
|
|
43
34
|
}
|
|
44
35
|
],
|
|
45
|
-
"name": "
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
"inputs": [
|
|
51
|
-
{
|
|
52
|
-
"indexed": true,
|
|
53
|
-
"internalType": "address",
|
|
54
|
-
"name": "module",
|
|
55
|
-
"type": "address"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"indexed": true,
|
|
59
|
-
"internalType": "address",
|
|
60
|
-
"name": "target",
|
|
61
|
-
"type": "address"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"indexed": true,
|
|
65
|
-
"internalType": "uint256",
|
|
66
|
-
"name": "value",
|
|
67
|
-
"type": "uint256"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"indexed": false,
|
|
71
|
-
"internalType": "bytes",
|
|
72
|
-
"name": "data",
|
|
73
|
-
"type": "bytes"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"name": "Invoked",
|
|
77
|
-
"type": "event"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"anonymous": false,
|
|
81
|
-
"inputs": [
|
|
82
|
-
{
|
|
83
|
-
"indexed": false,
|
|
84
|
-
"internalType": "address",
|
|
85
|
-
"name": "owner",
|
|
86
|
-
"type": "address"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"name": "OwnerChanged",
|
|
90
|
-
"type": "event"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"anonymous": false,
|
|
94
|
-
"inputs": [
|
|
95
|
-
{
|
|
96
|
-
"indexed": true,
|
|
97
|
-
"internalType": "uint256",
|
|
98
|
-
"name": "value",
|
|
99
|
-
"type": "uint256"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"indexed": true,
|
|
103
|
-
"internalType": "address",
|
|
104
|
-
"name": "sender",
|
|
105
|
-
"type": "address"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"indexed": false,
|
|
109
|
-
"internalType": "bytes",
|
|
110
|
-
"name": "data",
|
|
111
|
-
"type": "bytes"
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"name": "Received",
|
|
115
|
-
"type": "event"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"stateMutability": "payable",
|
|
119
|
-
"type": "fallback"
|
|
36
|
+
"name": "enableStaticCall",
|
|
37
|
+
"outputs": [],
|
|
38
|
+
"payable": false,
|
|
39
|
+
"stateMutability": "nonpayable",
|
|
40
|
+
"type": "function"
|
|
120
41
|
},
|
|
121
42
|
{
|
|
43
|
+
"constant": false,
|
|
122
44
|
"inputs": [
|
|
123
45
|
{
|
|
124
|
-
"internalType": "address",
|
|
125
46
|
"name": "_module",
|
|
126
47
|
"type": "address"
|
|
127
48
|
},
|
|
128
49
|
{
|
|
129
|
-
"internalType": "bool",
|
|
130
50
|
"name": "_value",
|
|
131
51
|
"type": "bool"
|
|
132
52
|
}
|
|
133
53
|
],
|
|
134
54
|
"name": "authoriseModule",
|
|
135
55
|
"outputs": [],
|
|
56
|
+
"payable": false,
|
|
136
57
|
"stateMutability": "nonpayable",
|
|
137
58
|
"type": "function"
|
|
138
59
|
},
|
|
139
60
|
{
|
|
61
|
+
"constant": false,
|
|
140
62
|
"inputs": [
|
|
141
63
|
{
|
|
142
|
-
"
|
|
143
|
-
"name": "",
|
|
64
|
+
"name": "_owner",
|
|
144
65
|
"type": "address"
|
|
145
|
-
}
|
|
146
|
-
],
|
|
147
|
-
"name": "authorised",
|
|
148
|
-
"outputs": [
|
|
66
|
+
},
|
|
149
67
|
{
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"type": "bool"
|
|
68
|
+
"name": "_modules",
|
|
69
|
+
"type": "address[]"
|
|
153
70
|
}
|
|
154
71
|
],
|
|
155
|
-
"
|
|
72
|
+
"name": "init",
|
|
73
|
+
"outputs": [],
|
|
74
|
+
"payable": false,
|
|
75
|
+
"stateMutability": "nonpayable",
|
|
156
76
|
"type": "function"
|
|
157
77
|
},
|
|
158
78
|
{
|
|
159
|
-
"
|
|
79
|
+
"constant": true,
|
|
80
|
+
"inputs": [],
|
|
81
|
+
"name": "implementation",
|
|
82
|
+
"outputs": [
|
|
160
83
|
{
|
|
161
|
-
"
|
|
162
|
-
"name": "_module",
|
|
84
|
+
"name": "",
|
|
163
85
|
"type": "address"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"internalType": "bytes4",
|
|
167
|
-
"name": "_method",
|
|
168
|
-
"type": "bytes4"
|
|
169
86
|
}
|
|
170
87
|
],
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"stateMutability": "nonpayable",
|
|
88
|
+
"payable": false,
|
|
89
|
+
"stateMutability": "view",
|
|
174
90
|
"type": "function"
|
|
175
91
|
},
|
|
176
92
|
{
|
|
93
|
+
"constant": true,
|
|
177
94
|
"inputs": [
|
|
178
95
|
{
|
|
179
|
-
"internalType": "bytes4",
|
|
180
96
|
"name": "",
|
|
181
97
|
"type": "bytes4"
|
|
182
98
|
}
|
|
@@ -184,59 +100,40 @@ export const BaseWallet_jsonAbi = [
|
|
|
184
100
|
"name": "enabled",
|
|
185
101
|
"outputs": [
|
|
186
102
|
{
|
|
187
|
-
"internalType": "address",
|
|
188
103
|
"name": "",
|
|
189
104
|
"type": "address"
|
|
190
105
|
}
|
|
191
106
|
],
|
|
107
|
+
"payable": false,
|
|
192
108
|
"stateMutability": "view",
|
|
193
109
|
"type": "function"
|
|
194
110
|
},
|
|
195
111
|
{
|
|
112
|
+
"constant": true,
|
|
196
113
|
"inputs": [],
|
|
197
|
-
"name": "
|
|
114
|
+
"name": "owner",
|
|
198
115
|
"outputs": [
|
|
199
116
|
{
|
|
200
|
-
"internalType": "address",
|
|
201
117
|
"name": "",
|
|
202
118
|
"type": "address"
|
|
203
119
|
}
|
|
204
120
|
],
|
|
121
|
+
"payable": false,
|
|
205
122
|
"stateMutability": "view",
|
|
206
123
|
"type": "function"
|
|
207
124
|
},
|
|
208
125
|
{
|
|
126
|
+
"constant": false,
|
|
209
127
|
"inputs": [
|
|
210
128
|
{
|
|
211
|
-
"internalType": "address",
|
|
212
|
-
"name": "_owner",
|
|
213
|
-
"type": "address"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"internalType": "address[]",
|
|
217
|
-
"name": "_modules",
|
|
218
|
-
"type": "address[]"
|
|
219
|
-
}
|
|
220
|
-
],
|
|
221
|
-
"name": "init",
|
|
222
|
-
"outputs": [],
|
|
223
|
-
"stateMutability": "nonpayable",
|
|
224
|
-
"type": "function"
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
"inputs": [
|
|
228
|
-
{
|
|
229
|
-
"internalType": "address",
|
|
230
129
|
"name": "_target",
|
|
231
130
|
"type": "address"
|
|
232
131
|
},
|
|
233
132
|
{
|
|
234
|
-
"internalType": "uint256",
|
|
235
133
|
"name": "_value",
|
|
236
134
|
"type": "uint256"
|
|
237
135
|
},
|
|
238
136
|
{
|
|
239
|
-
"internalType": "bytes",
|
|
240
137
|
"name": "_data",
|
|
241
138
|
"type": "bytes"
|
|
242
139
|
}
|
|
@@ -244,56 +141,146 @@ export const BaseWallet_jsonAbi = [
|
|
|
244
141
|
"name": "invoke",
|
|
245
142
|
"outputs": [
|
|
246
143
|
{
|
|
247
|
-
"internalType": "bytes",
|
|
248
144
|
"name": "_result",
|
|
249
145
|
"type": "bytes"
|
|
250
146
|
}
|
|
251
147
|
],
|
|
148
|
+
"payable": false,
|
|
252
149
|
"stateMutability": "nonpayable",
|
|
253
150
|
"type": "function"
|
|
254
151
|
},
|
|
255
152
|
{
|
|
256
|
-
"
|
|
257
|
-
"
|
|
153
|
+
"constant": true,
|
|
154
|
+
"inputs": [
|
|
155
|
+
{
|
|
156
|
+
"name": "",
|
|
157
|
+
"type": "address"
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"name": "authorised",
|
|
258
161
|
"outputs": [
|
|
259
162
|
{
|
|
260
|
-
"internalType": "uint256",
|
|
261
163
|
"name": "",
|
|
262
|
-
"type": "
|
|
164
|
+
"type": "bool"
|
|
263
165
|
}
|
|
264
166
|
],
|
|
167
|
+
"payable": false,
|
|
265
168
|
"stateMutability": "view",
|
|
266
169
|
"type": "function"
|
|
267
170
|
},
|
|
268
171
|
{
|
|
172
|
+
"constant": true,
|
|
269
173
|
"inputs": [],
|
|
270
|
-
"name": "
|
|
174
|
+
"name": "modules",
|
|
271
175
|
"outputs": [
|
|
272
176
|
{
|
|
273
|
-
"internalType": "address",
|
|
274
177
|
"name": "",
|
|
275
|
-
"type": "
|
|
178
|
+
"type": "uint256"
|
|
276
179
|
}
|
|
277
180
|
],
|
|
181
|
+
"payable": false,
|
|
278
182
|
"stateMutability": "view",
|
|
279
183
|
"type": "function"
|
|
280
184
|
},
|
|
281
185
|
{
|
|
186
|
+
"payable": true,
|
|
187
|
+
"stateMutability": "payable",
|
|
188
|
+
"type": "fallback"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"anonymous": false,
|
|
282
192
|
"inputs": [
|
|
283
193
|
{
|
|
284
|
-
"
|
|
285
|
-
"name": "
|
|
194
|
+
"indexed": true,
|
|
195
|
+
"name": "module",
|
|
286
196
|
"type": "address"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"indexed": false,
|
|
200
|
+
"name": "value",
|
|
201
|
+
"type": "bool"
|
|
287
202
|
}
|
|
288
203
|
],
|
|
289
|
-
"name": "
|
|
290
|
-
"
|
|
291
|
-
"stateMutability": "nonpayable",
|
|
292
|
-
"type": "function"
|
|
204
|
+
"name": "AuthorisedModule",
|
|
205
|
+
"type": "event"
|
|
293
206
|
},
|
|
294
207
|
{
|
|
295
|
-
"
|
|
296
|
-
"
|
|
208
|
+
"anonymous": false,
|
|
209
|
+
"inputs": [
|
|
210
|
+
{
|
|
211
|
+
"indexed": true,
|
|
212
|
+
"name": "module",
|
|
213
|
+
"type": "address"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"indexed": true,
|
|
217
|
+
"name": "method",
|
|
218
|
+
"type": "bytes4"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"name": "EnabledStaticCall",
|
|
222
|
+
"type": "event"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"anonymous": false,
|
|
226
|
+
"inputs": [
|
|
227
|
+
{
|
|
228
|
+
"indexed": true,
|
|
229
|
+
"name": "module",
|
|
230
|
+
"type": "address"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"indexed": true,
|
|
234
|
+
"name": "target",
|
|
235
|
+
"type": "address"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"indexed": true,
|
|
239
|
+
"name": "value",
|
|
240
|
+
"type": "uint256"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"indexed": false,
|
|
244
|
+
"name": "data",
|
|
245
|
+
"type": "bytes"
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"name": "Invoked",
|
|
249
|
+
"type": "event"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"anonymous": false,
|
|
253
|
+
"inputs": [
|
|
254
|
+
{
|
|
255
|
+
"indexed": true,
|
|
256
|
+
"name": "value",
|
|
257
|
+
"type": "uint256"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"indexed": true,
|
|
261
|
+
"name": "sender",
|
|
262
|
+
"type": "address"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"indexed": false,
|
|
266
|
+
"name": "data",
|
|
267
|
+
"type": "bytes"
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"name": "Received",
|
|
271
|
+
"type": "event"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"anonymous": false,
|
|
275
|
+
"inputs": [
|
|
276
|
+
{
|
|
277
|
+
"indexed": false,
|
|
278
|
+
"name": "owner",
|
|
279
|
+
"type": "address"
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"name": "OwnerChanged",
|
|
283
|
+
"type": "event"
|
|
297
284
|
}
|
|
298
285
|
] as const satisfies Abi;
|
|
299
286
|
|
|
@@ -380,11 +367,11 @@ export class BaseWallet_json {
|
|
|
380
367
|
}
|
|
381
368
|
|
|
382
369
|
/**
|
|
383
|
-
*
|
|
370
|
+
* implementation
|
|
384
371
|
* view
|
|
385
372
|
*/
|
|
386
|
-
async
|
|
387
|
-
return this.contract.read.
|
|
373
|
+
async implementation(): Promise<`0x${string}`> {
|
|
374
|
+
return this.contract.read.implementation() as Promise<`0x${string}`>;
|
|
388
375
|
}
|
|
389
376
|
|
|
390
377
|
/**
|
|
@@ -396,35 +383,35 @@ export class BaseWallet_json {
|
|
|
396
383
|
}
|
|
397
384
|
|
|
398
385
|
/**
|
|
399
|
-
*
|
|
386
|
+
* owner
|
|
400
387
|
* view
|
|
401
388
|
*/
|
|
402
|
-
async
|
|
403
|
-
return this.contract.read.
|
|
389
|
+
async owner(): Promise<`0x${string}`> {
|
|
390
|
+
return this.contract.read.owner() as Promise<`0x${string}`>;
|
|
404
391
|
}
|
|
405
392
|
|
|
406
393
|
/**
|
|
407
|
-
*
|
|
394
|
+
* authorised
|
|
408
395
|
* view
|
|
409
396
|
*/
|
|
410
|
-
async
|
|
411
|
-
return this.contract.read.
|
|
397
|
+
async authorised(arg0: `0x${string}`): Promise<boolean> {
|
|
398
|
+
return this.contract.read.authorised([arg0] as const) as Promise<boolean>;
|
|
412
399
|
}
|
|
413
400
|
|
|
414
401
|
/**
|
|
415
|
-
*
|
|
402
|
+
* modules
|
|
416
403
|
* view
|
|
417
404
|
*/
|
|
418
|
-
async
|
|
419
|
-
return this.contract.read.
|
|
405
|
+
async modules(): Promise<bigint> {
|
|
406
|
+
return this.contract.read.modules() as Promise<bigint>;
|
|
420
407
|
}
|
|
421
408
|
|
|
422
409
|
/**
|
|
423
|
-
*
|
|
410
|
+
* setOwner
|
|
424
411
|
* nonpayable
|
|
425
412
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
426
413
|
*/
|
|
427
|
-
async
|
|
414
|
+
async setOwner(_newOwner: `0x${string}`, options?: {
|
|
428
415
|
accessList?: import('viem').AccessList;
|
|
429
416
|
authorizationList?: import('viem').AuthorizationList;
|
|
430
417
|
chain?: import('viem').Chain | null;
|
|
@@ -439,7 +426,7 @@ export class BaseWallet_json {
|
|
|
439
426
|
if (!this.contract.write) {
|
|
440
427
|
throw new Error('Wallet client is required for write operations');
|
|
441
428
|
}
|
|
442
|
-
return this.contract.write.
|
|
429
|
+
return this.contract.write.setOwner([_newOwner] as const, options) as Promise<`0x${string}`>;
|
|
443
430
|
}
|
|
444
431
|
|
|
445
432
|
/**
|
|
@@ -466,11 +453,11 @@ export class BaseWallet_json {
|
|
|
466
453
|
}
|
|
467
454
|
|
|
468
455
|
/**
|
|
469
|
-
*
|
|
456
|
+
* authoriseModule
|
|
470
457
|
* nonpayable
|
|
471
458
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
472
459
|
*/
|
|
473
|
-
async
|
|
460
|
+
async authoriseModule(_module: `0x${string}`, _value: boolean, options?: {
|
|
474
461
|
accessList?: import('viem').AccessList;
|
|
475
462
|
authorizationList?: import('viem').AuthorizationList;
|
|
476
463
|
chain?: import('viem').Chain | null;
|
|
@@ -485,15 +472,15 @@ export class BaseWallet_json {
|
|
|
485
472
|
if (!this.contract.write) {
|
|
486
473
|
throw new Error('Wallet client is required for write operations');
|
|
487
474
|
}
|
|
488
|
-
return this.contract.write.
|
|
475
|
+
return this.contract.write.authoriseModule([_module, _value] as const, options) as Promise<`0x${string}`>;
|
|
489
476
|
}
|
|
490
477
|
|
|
491
478
|
/**
|
|
492
|
-
*
|
|
479
|
+
* init
|
|
493
480
|
* nonpayable
|
|
494
481
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
495
482
|
*/
|
|
496
|
-
async
|
|
483
|
+
async init(_owner: `0x${string}`, _modules: `0x${string}`[], options?: {
|
|
497
484
|
accessList?: import('viem').AccessList;
|
|
498
485
|
authorizationList?: import('viem').AuthorizationList;
|
|
499
486
|
chain?: import('viem').Chain | null;
|
|
@@ -508,15 +495,15 @@ export class BaseWallet_json {
|
|
|
508
495
|
if (!this.contract.write) {
|
|
509
496
|
throw new Error('Wallet client is required for write operations');
|
|
510
497
|
}
|
|
511
|
-
return this.contract.write.
|
|
498
|
+
return this.contract.write.init([_owner, _modules] as const, options) as Promise<`0x${string}`>;
|
|
512
499
|
}
|
|
513
500
|
|
|
514
501
|
/**
|
|
515
|
-
*
|
|
502
|
+
* invoke
|
|
516
503
|
* nonpayable
|
|
517
504
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
518
505
|
*/
|
|
519
|
-
async
|
|
506
|
+
async invoke(_target: `0x${string}`, _value: bigint, _data: `0x${string}`, options?: {
|
|
520
507
|
accessList?: import('viem').AccessList;
|
|
521
508
|
authorizationList?: import('viem').AuthorizationList;
|
|
522
509
|
chain?: import('viem').Chain | null;
|
|
@@ -531,7 +518,7 @@ export class BaseWallet_json {
|
|
|
531
518
|
if (!this.contract.write) {
|
|
532
519
|
throw new Error('Wallet client is required for write operations');
|
|
533
520
|
}
|
|
534
|
-
return this.contract.write.
|
|
521
|
+
return this.contract.write.invoke([_target, _value, _data] as const, options) as Promise<`0x${string}`>;
|
|
535
522
|
}
|
|
536
523
|
|
|
537
524
|
|
|
@@ -551,11 +538,11 @@ export class BaseWallet_json {
|
|
|
551
538
|
}
|
|
552
539
|
return {
|
|
553
540
|
/**
|
|
554
|
-
* Simulate
|
|
541
|
+
* Simulate setOwner
|
|
555
542
|
* Returns gas estimate and result without sending transaction
|
|
556
543
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
557
544
|
*/
|
|
558
|
-
async
|
|
545
|
+
async setOwner(_newOwner: `0x${string}`, options?: {
|
|
559
546
|
accessList?: import('viem').AccessList;
|
|
560
547
|
authorizationList?: import('viem').AuthorizationList;
|
|
561
548
|
chain?: import('viem').Chain | null;
|
|
@@ -567,7 +554,7 @@ export class BaseWallet_json {
|
|
|
567
554
|
nonce?: number;
|
|
568
555
|
value?: bigint;
|
|
569
556
|
}): Promise<void> {
|
|
570
|
-
return contract.simulate.
|
|
557
|
+
return contract.simulate.setOwner([_newOwner] as const, options) as Promise<void>;
|
|
571
558
|
},
|
|
572
559
|
/**
|
|
573
560
|
* Simulate enableStaticCall
|
|
@@ -589,11 +576,11 @@ export class BaseWallet_json {
|
|
|
589
576
|
return contract.simulate.enableStaticCall([_module, _method] as const, options) as Promise<void>;
|
|
590
577
|
},
|
|
591
578
|
/**
|
|
592
|
-
* Simulate
|
|
579
|
+
* Simulate authoriseModule
|
|
593
580
|
* Returns gas estimate and result without sending transaction
|
|
594
581
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
595
582
|
*/
|
|
596
|
-
async
|
|
583
|
+
async authoriseModule(_module: `0x${string}`, _value: boolean, options?: {
|
|
597
584
|
accessList?: import('viem').AccessList;
|
|
598
585
|
authorizationList?: import('viem').AuthorizationList;
|
|
599
586
|
chain?: import('viem').Chain | null;
|
|
@@ -605,14 +592,14 @@ export class BaseWallet_json {
|
|
|
605
592
|
nonce?: number;
|
|
606
593
|
value?: bigint;
|
|
607
594
|
}): Promise<void> {
|
|
608
|
-
return contract.simulate.
|
|
595
|
+
return contract.simulate.authoriseModule([_module, _value] as const, options) as Promise<void>;
|
|
609
596
|
},
|
|
610
597
|
/**
|
|
611
|
-
* Simulate
|
|
598
|
+
* Simulate init
|
|
612
599
|
* Returns gas estimate and result without sending transaction
|
|
613
600
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
614
601
|
*/
|
|
615
|
-
async
|
|
602
|
+
async init(_owner: `0x${string}`, _modules: `0x${string}`[], options?: {
|
|
616
603
|
accessList?: import('viem').AccessList;
|
|
617
604
|
authorizationList?: import('viem').AuthorizationList;
|
|
618
605
|
chain?: import('viem').Chain | null;
|
|
@@ -623,15 +610,15 @@ export class BaseWallet_json {
|
|
|
623
610
|
maxPriorityFeePerGas?: bigint;
|
|
624
611
|
nonce?: number;
|
|
625
612
|
value?: bigint;
|
|
626
|
-
}): Promise
|
|
627
|
-
return contract.simulate.
|
|
613
|
+
}): Promise<void> {
|
|
614
|
+
return contract.simulate.init([_owner, _modules] as const, options) as Promise<void>;
|
|
628
615
|
},
|
|
629
616
|
/**
|
|
630
|
-
* Simulate
|
|
617
|
+
* Simulate invoke
|
|
631
618
|
* Returns gas estimate and result without sending transaction
|
|
632
619
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
633
620
|
*/
|
|
634
|
-
async
|
|
621
|
+
async invoke(_target: `0x${string}`, _value: bigint, _data: `0x${string}`, options?: {
|
|
635
622
|
accessList?: import('viem').AccessList;
|
|
636
623
|
authorizationList?: import('viem').AuthorizationList;
|
|
637
624
|
chain?: import('viem').Chain | null;
|
|
@@ -642,8 +629,8 @@ export class BaseWallet_json {
|
|
|
642
629
|
maxPriorityFeePerGas?: bigint;
|
|
643
630
|
nonce?: number;
|
|
644
631
|
value?: bigint;
|
|
645
|
-
}): Promise
|
|
646
|
-
return contract.simulate.
|
|
632
|
+
}): Promise<`0x${string}`> {
|
|
633
|
+
return contract.simulate.invoke([_target, _value, _data] as const, options) as Promise<`0x${string}`>;
|
|
647
634
|
}
|
|
648
635
|
};
|
|
649
636
|
}
|
|
@@ -720,17 +707,17 @@ export class BaseWallet_json {
|
|
|
720
707
|
}) as () => void;
|
|
721
708
|
},
|
|
722
709
|
/**
|
|
723
|
-
* Watch
|
|
710
|
+
* Watch Received events
|
|
724
711
|
* @param callback Function to call when event is emitted
|
|
725
712
|
* @param filter Optional filter for indexed parameters
|
|
726
713
|
* @returns Unwatch function to stop listening
|
|
727
714
|
*/
|
|
728
|
-
|
|
715
|
+
Received: (callback: (event: { value: bigint; sender: `0x${string}`; data: `0x${string}` }) => void, filter?: { value: bigint; sender: `0x${string}` }) => {
|
|
729
716
|
return this.publicClient.watchContractEvent({
|
|
730
717
|
address: this.contractAddress,
|
|
731
718
|
abi: BaseWallet_jsonAbi,
|
|
732
|
-
eventName: '
|
|
733
|
-
|
|
719
|
+
eventName: 'Received',
|
|
720
|
+
args: filter,
|
|
734
721
|
onLogs: (logs: any[]) => {
|
|
735
722
|
logs.forEach((log: any) => {
|
|
736
723
|
callback(log.args as any);
|
|
@@ -739,17 +726,17 @@ export class BaseWallet_json {
|
|
|
739
726
|
}) as () => void;
|
|
740
727
|
},
|
|
741
728
|
/**
|
|
742
|
-
* Watch
|
|
729
|
+
* Watch OwnerChanged events
|
|
743
730
|
* @param callback Function to call when event is emitted
|
|
744
731
|
* @param filter Optional filter for indexed parameters
|
|
745
732
|
* @returns Unwatch function to stop listening
|
|
746
733
|
*/
|
|
747
|
-
|
|
734
|
+
OwnerChanged: (callback: (event: { owner: `0x${string}` }) => void) => {
|
|
748
735
|
return this.publicClient.watchContractEvent({
|
|
749
736
|
address: this.contractAddress,
|
|
750
737
|
abi: BaseWallet_jsonAbi,
|
|
751
|
-
eventName: '
|
|
752
|
-
|
|
738
|
+
eventName: 'OwnerChanged',
|
|
739
|
+
|
|
753
740
|
onLogs: (logs: any[]) => {
|
|
754
741
|
logs.forEach((log: any) => {
|
|
755
742
|
callback(log.args as any);
|