@gitmyabi/storage 1.0.1 → 1.0.2

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 CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Auto-generated TypeScript type bindings for **Storage**
4
4
 
5
- - **Build ID**: `etherscan-storage-9232d279-1786680828945`
5
+ - **Build ID**: `etherscan-storage-d49edad6-1787334000666`
6
6
  - **Build Number**: 1
7
- - **Commit**: `91f28db`
7
+ - **Commit**: `85d568f`
8
8
  - **Branch**: `etherscan`
9
9
  - **Target**: `ethers-v6`
10
10
  - **Contracts**: 1
@@ -12,7 +12,7 @@ Auto-generated TypeScript type bindings for **Storage**
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- npm install @gitmyabi/storage@1.0.1
15
+ npm install @gitmyabi/storage@1.0.2
16
16
  ```
17
17
 
18
18
  ## Usage
@@ -6,58 +6,7 @@ import type { Address, PublicClient, WalletClient } from 'viem';
6
6
  */
7
7
  export declare const Storage_jsonAbi: readonly [{
8
8
  readonly inputs: readonly [];
9
- readonly name: "InvalidOwner";
10
- readonly type: "error";
11
- }, {
12
- readonly inputs: readonly [];
13
- readonly name: "InvalidSessionId";
14
- readonly type: "error";
15
- }, {
16
- readonly inputs: readonly [{
17
- readonly internalType: "address";
18
- readonly name: "validator";
19
- readonly type: "address";
20
- }];
21
- readonly name: "InvalidValidator";
22
- readonly type: "error";
23
- }, {
24
- readonly anonymous: false;
25
- readonly inputs: readonly [{
26
- readonly indexed: false;
27
- readonly internalType: "uint256";
28
- readonly name: "utilisedNonce";
29
- readonly type: "uint256";
30
- }];
31
- readonly name: "NonceConsumed";
32
- readonly type: "event";
33
- }, {
34
- readonly anonymous: false;
35
- readonly inputs: readonly [{
36
- readonly indexed: false;
37
- readonly internalType: "uint256";
38
- readonly name: "id";
39
- readonly type: "uint256";
40
- }];
41
- readonly name: "SessionRevoked";
42
- readonly type: "event";
43
- }, {
44
- readonly anonymous: false;
45
- readonly inputs: readonly [{
46
- readonly indexed: false;
47
- readonly internalType: "address";
48
- readonly name: "validator";
49
- readonly type: "address";
50
- }, {
51
- readonly indexed: false;
52
- readonly internalType: "bool";
53
- readonly name: "status";
54
- readonly type: "bool";
55
- }];
56
- readonly name: "ValidatorStatusUpdated";
57
- readonly type: "event";
58
- }, {
59
- readonly inputs: readonly [];
60
- readonly name: "getNonce";
9
+ readonly name: "retrieve";
61
10
  readonly outputs: readonly [{
62
11
  readonly internalType: "uint256";
63
12
  readonly name: "";
@@ -65,78 +14,16 @@ export declare const Storage_jsonAbi: readonly [{
65
14
  }];
66
15
  readonly stateMutability: "view";
67
16
  readonly type: "function";
68
- }, {
69
- readonly inputs: readonly [];
70
- readonly name: "getOwner";
71
- readonly outputs: readonly [{
72
- readonly internalType: "address";
73
- readonly name: "";
74
- readonly type: "address";
75
- }];
76
- readonly stateMutability: "view";
77
- readonly type: "function";
78
17
  }, {
79
18
  readonly inputs: readonly [{
80
- readonly internalType: "address";
81
- readonly name: "validator";
82
- readonly type: "address";
83
- }];
84
- readonly name: "readAndUpdateNonce";
85
- readonly outputs: readonly [{
86
19
  readonly internalType: "uint256";
87
- readonly name: "";
20
+ readonly name: "num";
88
21
  readonly type: "uint256";
89
22
  }];
90
- readonly stateMutability: "nonpayable";
91
- readonly type: "function";
92
- }, {
93
- readonly inputs: readonly [{
94
- readonly internalType: "uint256";
95
- readonly name: "id";
96
- readonly type: "uint256";
97
- }];
98
- readonly name: "revokeSession";
99
- readonly outputs: readonly [];
100
- readonly stateMutability: "nonpayable";
101
- readonly type: "function";
102
- }, {
103
- readonly inputs: readonly [{
104
- readonly internalType: "address";
105
- readonly name: "validator";
106
- readonly type: "address";
107
- }, {
108
- readonly internalType: "bool";
109
- readonly name: "isValid";
110
- readonly type: "bool";
111
- }];
112
- readonly name: "setValidatorStatus";
23
+ readonly name: "store";
113
24
  readonly outputs: readonly [];
114
25
  readonly stateMutability: "nonpayable";
115
26
  readonly type: "function";
116
- }, {
117
- readonly inputs: readonly [{
118
- readonly internalType: "uint256";
119
- readonly name: "id";
120
- readonly type: "uint256";
121
- }, {
122
- readonly internalType: "address";
123
- readonly name: "validator";
124
- readonly type: "address";
125
- }];
126
- readonly name: "validateSession";
127
- readonly outputs: readonly [];
128
- readonly stateMutability: "view";
129
- readonly type: "function";
130
- }, {
131
- readonly inputs: readonly [{
132
- readonly internalType: "address";
133
- readonly name: "validator";
134
- readonly type: "address";
135
- }];
136
- readonly name: "validateValidator";
137
- readonly outputs: readonly [];
138
- readonly stateMutability: "view";
139
- readonly type: "function";
140
27
  }];
141
28
  /**
142
29
  * Type-safe ABI for Storage_json
@@ -195,65 +82,16 @@ export declare class Storage_json {
195
82
  */
196
83
  getContract(): Storage_jsonContract;
197
84
  /**
198
- * getNonce
199
- * view
200
- */
201
- getNonce(): Promise<bigint>;
202
- /**
203
- * getOwner
204
- * view
205
- */
206
- getOwner(): Promise<`0x${string}`>;
207
- /**
208
- * validateSession
85
+ * retrieve
209
86
  * view
210
87
  */
211
- validateSession(id: bigint, validator: `0x${string}`): Promise<void>;
212
- /**
213
- * validateValidator
214
- * view
215
- */
216
- validateValidator(validator: `0x${string}`): Promise<void>;
217
- /**
218
- * readAndUpdateNonce
219
- * nonpayable
220
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
221
- */
222
- readAndUpdateNonce(validator: `0x${string}`, options?: {
223
- accessList?: import('viem').AccessList;
224
- authorizationList?: import('viem').AuthorizationList;
225
- chain?: import('viem').Chain | null;
226
- dataSuffix?: `0x${string}`;
227
- gas?: bigint;
228
- gasPrice?: bigint;
229
- maxFeePerGas?: bigint;
230
- maxPriorityFeePerGas?: bigint;
231
- nonce?: number;
232
- value?: bigint;
233
- }): Promise<`0x${string}`>;
234
- /**
235
- * revokeSession
236
- * nonpayable
237
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
238
- */
239
- revokeSession(id: bigint, options?: {
240
- accessList?: import('viem').AccessList;
241
- authorizationList?: import('viem').AuthorizationList;
242
- chain?: import('viem').Chain | null;
243
- dataSuffix?: `0x${string}`;
244
- gas?: bigint;
245
- gasPrice?: bigint;
246
- maxFeePerGas?: bigint;
247
- maxPriorityFeePerGas?: bigint;
248
- nonce?: number;
249
- value?: bigint;
250
- }): Promise<`0x${string}`>;
88
+ retrieve(): Promise<bigint>;
251
89
  /**
252
- * setValidatorStatus
90
+ * store
253
91
  * nonpayable
254
92
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
255
93
  */
256
- setValidatorStatus(validator: `0x${string}`, isValid: boolean, options?: {
94
+ store(num: bigint, options?: {
257
95
  accessList?: import('viem').AccessList;
258
96
  authorizationList?: import('viem').AuthorizationList;
259
97
  chain?: import('viem').Chain | null;
@@ -275,45 +113,11 @@ export declare class Storage_json {
275
113
  */
276
114
  get simulate(): {
277
115
  /**
278
- * Simulate readAndUpdateNonce
116
+ * Simulate store
279
117
  * Returns gas estimate and result without sending transaction
280
118
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
281
119
  */
282
- readAndUpdateNonce(validator: `0x${string}`, options?: {
283
- accessList?: import("viem").AccessList;
284
- authorizationList?: import("viem").AuthorizationList;
285
- chain?: import("viem").Chain | null;
286
- dataSuffix?: `0x${string}`;
287
- gas?: bigint;
288
- gasPrice?: bigint;
289
- maxFeePerGas?: bigint;
290
- maxPriorityFeePerGas?: bigint;
291
- nonce?: number;
292
- value?: bigint;
293
- }): Promise<bigint>;
294
- /**
295
- * Simulate revokeSession
296
- * Returns gas estimate and result without sending transaction
297
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
298
- */
299
- revokeSession(id: bigint, options?: {
300
- accessList?: import("viem").AccessList;
301
- authorizationList?: import("viem").AuthorizationList;
302
- chain?: import("viem").Chain | null;
303
- dataSuffix?: `0x${string}`;
304
- gas?: bigint;
305
- gasPrice?: bigint;
306
- maxFeePerGas?: bigint;
307
- maxPriorityFeePerGas?: bigint;
308
- nonce?: number;
309
- value?: bigint;
310
- }): Promise<void>;
311
- /**
312
- * Simulate setValidatorStatus
313
- * Returns gas estimate and result without sending transaction
314
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
315
- */
316
- setValidatorStatus(validator: `0x${string}`, isValid: boolean, options?: {
120
+ store(num: bigint, options?: {
317
121
  accessList?: import("viem").AccessList;
318
122
  authorizationList?: import("viem").AuthorizationList;
319
123
  chain?: import("viem").Chain | null;
@@ -329,43 +133,7 @@ export declare class Storage_json {
329
133
  /**
330
134
  * Watch contract events
331
135
  *
332
- * @example
333
- * // Watch all Transfer events
334
- * const unwatch = contract.watch.Transfer((event) => {
335
- * console.log('Transfer:', event);
336
- * });
337
- *
338
- * // Stop watching
339
- * unwatch();
136
+ * Note: This contract has no events, so watch returns an empty object.
340
137
  */
341
- get watch(): {
342
- /**
343
- * Watch NonceConsumed events
344
- * @param callback Function to call when event is emitted
345
- * @param filter Optional filter for indexed parameters
346
- * @returns Unwatch function to stop listening
347
- */
348
- NonceConsumed: (callback: (event: {
349
- utilisedNonce: bigint;
350
- }) => void) => () => void;
351
- /**
352
- * Watch SessionRevoked events
353
- * @param callback Function to call when event is emitted
354
- * @param filter Optional filter for indexed parameters
355
- * @returns Unwatch function to stop listening
356
- */
357
- SessionRevoked: (callback: (event: {
358
- id: bigint;
359
- }) => void) => () => void;
360
- /**
361
- * Watch ValidatorStatusUpdated events
362
- * @param callback Function to call when event is emitted
363
- * @param filter Optional filter for indexed parameters
364
- * @returns Unwatch function to stop listening
365
- */
366
- ValidatorStatusUpdated: (callback: (event: {
367
- validator: `0x${string}`;
368
- status: boolean;
369
- }) => void) => () => void;
370
- };
138
+ get watch(): {};
371
139
  }
@@ -10,73 +10,7 @@ const viem_1 = require("viem");
10
10
  exports.Storage_jsonAbi = [
11
11
  {
12
12
  "inputs": [],
13
- "name": "InvalidOwner",
14
- "type": "error"
15
- },
16
- {
17
- "inputs": [],
18
- "name": "InvalidSessionId",
19
- "type": "error"
20
- },
21
- {
22
- "inputs": [
23
- {
24
- "internalType": "address",
25
- "name": "validator",
26
- "type": "address"
27
- }
28
- ],
29
- "name": "InvalidValidator",
30
- "type": "error"
31
- },
32
- {
33
- "anonymous": false,
34
- "inputs": [
35
- {
36
- "indexed": false,
37
- "internalType": "uint256",
38
- "name": "utilisedNonce",
39
- "type": "uint256"
40
- }
41
- ],
42
- "name": "NonceConsumed",
43
- "type": "event"
44
- },
45
- {
46
- "anonymous": false,
47
- "inputs": [
48
- {
49
- "indexed": false,
50
- "internalType": "uint256",
51
- "name": "id",
52
- "type": "uint256"
53
- }
54
- ],
55
- "name": "SessionRevoked",
56
- "type": "event"
57
- },
58
- {
59
- "anonymous": false,
60
- "inputs": [
61
- {
62
- "indexed": false,
63
- "internalType": "address",
64
- "name": "validator",
65
- "type": "address"
66
- },
67
- {
68
- "indexed": false,
69
- "internalType": "bool",
70
- "name": "status",
71
- "type": "bool"
72
- }
73
- ],
74
- "name": "ValidatorStatusUpdated",
75
- "type": "event"
76
- },
77
- {
78
- "inputs": [],
79
- "name": "getNonce",
13
+ "name": "retrieve",
80
14
  "outputs": [
81
15
  {
82
16
  "internalType": "uint256",
@@ -87,99 +21,18 @@ exports.Storage_jsonAbi = [
87
21
  "stateMutability": "view",
88
22
  "type": "function"
89
23
  },
90
- {
91
- "inputs": [],
92
- "name": "getOwner",
93
- "outputs": [
94
- {
95
- "internalType": "address",
96
- "name": "",
97
- "type": "address"
98
- }
99
- ],
100
- "stateMutability": "view",
101
- "type": "function"
102
- },
103
- {
104
- "inputs": [
105
- {
106
- "internalType": "address",
107
- "name": "validator",
108
- "type": "address"
109
- }
110
- ],
111
- "name": "readAndUpdateNonce",
112
- "outputs": [
113
- {
114
- "internalType": "uint256",
115
- "name": "",
116
- "type": "uint256"
117
- }
118
- ],
119
- "stateMutability": "nonpayable",
120
- "type": "function"
121
- },
122
24
  {
123
25
  "inputs": [
124
26
  {
125
27
  "internalType": "uint256",
126
- "name": "id",
28
+ "name": "num",
127
29
  "type": "uint256"
128
30
  }
129
31
  ],
130
- "name": "revokeSession",
131
- "outputs": [],
132
- "stateMutability": "nonpayable",
133
- "type": "function"
134
- },
135
- {
136
- "inputs": [
137
- {
138
- "internalType": "address",
139
- "name": "validator",
140
- "type": "address"
141
- },
142
- {
143
- "internalType": "bool",
144
- "name": "isValid",
145
- "type": "bool"
146
- }
147
- ],
148
- "name": "setValidatorStatus",
32
+ "name": "store",
149
33
  "outputs": [],
150
34
  "stateMutability": "nonpayable",
151
35
  "type": "function"
152
- },
153
- {
154
- "inputs": [
155
- {
156
- "internalType": "uint256",
157
- "name": "id",
158
- "type": "uint256"
159
- },
160
- {
161
- "internalType": "address",
162
- "name": "validator",
163
- "type": "address"
164
- }
165
- ],
166
- "name": "validateSession",
167
- "outputs": [],
168
- "stateMutability": "view",
169
- "type": "function"
170
- },
171
- {
172
- "inputs": [
173
- {
174
- "internalType": "address",
175
- "name": "validator",
176
- "type": "address"
177
- }
178
- ],
179
- "name": "validateValidator",
180
- "outputs": [],
181
- "stateMutability": "view",
182
- "type": "function"
183
36
  }
184
37
  ];
185
38
  /**
@@ -240,65 +93,22 @@ class Storage_json {
240
93
  return this.contract;
241
94
  }
242
95
  /**
243
- * getNonce
244
- * view
245
- */
246
- async getNonce() {
247
- return this.contract.read.getNonce();
248
- }
249
- /**
250
- * getOwner
251
- * view
252
- */
253
- async getOwner() {
254
- return this.contract.read.getOwner();
255
- }
256
- /**
257
- * validateSession
96
+ * retrieve
258
97
  * view
259
98
  */
260
- async validateSession(id, validator) {
261
- return this.contract.read.validateSession([id, validator]);
262
- }
263
- /**
264
- * validateValidator
265
- * view
266
- */
267
- async validateValidator(validator) {
268
- return this.contract.read.validateValidator([validator]);
269
- }
270
- /**
271
- * readAndUpdateNonce
272
- * nonpayable
273
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
274
- */
275
- async readAndUpdateNonce(validator, options) {
276
- if (!this.contract.write) {
277
- throw new Error('Wallet client is required for write operations');
278
- }
279
- return this.contract.write.readAndUpdateNonce([validator], options);
280
- }
281
- /**
282
- * revokeSession
283
- * nonpayable
284
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
285
- */
286
- async revokeSession(id, options) {
287
- if (!this.contract.write) {
288
- throw new Error('Wallet client is required for write operations');
289
- }
290
- return this.contract.write.revokeSession([id], options);
99
+ async retrieve() {
100
+ return this.contract.read.retrieve();
291
101
  }
292
102
  /**
293
- * setValidatorStatus
103
+ * store
294
104
  * nonpayable
295
105
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
296
106
  */
297
- async setValidatorStatus(validator, isValid, options) {
107
+ async store(num, options) {
298
108
  if (!this.contract.write) {
299
109
  throw new Error('Wallet client is required for write operations');
300
110
  }
301
- return this.contract.write.setValidatorStatus([validator, isValid], options);
111
+ return this.contract.write.store([num], options);
302
112
  }
303
113
  /**
304
114
  * Simulate contract write operations (dry-run without sending transaction)
@@ -315,100 +125,22 @@ class Storage_json {
315
125
  }
316
126
  return {
317
127
  /**
318
- * Simulate readAndUpdateNonce
319
- * Returns gas estimate and result without sending transaction
320
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
321
- */
322
- async readAndUpdateNonce(validator, options) {
323
- return contract.simulate.readAndUpdateNonce([validator], options);
324
- },
325
- /**
326
- * Simulate revokeSession
128
+ * Simulate store
327
129
  * Returns gas estimate and result without sending transaction
328
130
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
329
131
  */
330
- async revokeSession(id, options) {
331
- return contract.simulate.revokeSession([id], options);
332
- },
333
- /**
334
- * Simulate setValidatorStatus
335
- * Returns gas estimate and result without sending transaction
336
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
337
- */
338
- async setValidatorStatus(validator, isValid, options) {
339
- return contract.simulate.setValidatorStatus([validator, isValid], options);
132
+ async store(num, options) {
133
+ return contract.simulate.store([num], options);
340
134
  }
341
135
  };
342
136
  }
343
137
  /**
344
138
  * Watch contract events
345
139
  *
346
- * @example
347
- * // Watch all Transfer events
348
- * const unwatch = contract.watch.Transfer((event) => {
349
- * console.log('Transfer:', event);
350
- * });
351
- *
352
- * // Stop watching
353
- * unwatch();
140
+ * Note: This contract has no events, so watch returns an empty object.
354
141
  */
355
142
  get watch() {
356
- return {
357
- /**
358
- * Watch NonceConsumed events
359
- * @param callback Function to call when event is emitted
360
- * @param filter Optional filter for indexed parameters
361
- * @returns Unwatch function to stop listening
362
- */
363
- NonceConsumed: (callback) => {
364
- return this.publicClient.watchContractEvent({
365
- address: this.contractAddress,
366
- abi: exports.Storage_jsonAbi,
367
- eventName: 'NonceConsumed',
368
- onLogs: (logs) => {
369
- logs.forEach((log) => {
370
- callback(log.args);
371
- });
372
- },
373
- });
374
- },
375
- /**
376
- * Watch SessionRevoked events
377
- * @param callback Function to call when event is emitted
378
- * @param filter Optional filter for indexed parameters
379
- * @returns Unwatch function to stop listening
380
- */
381
- SessionRevoked: (callback) => {
382
- return this.publicClient.watchContractEvent({
383
- address: this.contractAddress,
384
- abi: exports.Storage_jsonAbi,
385
- eventName: 'SessionRevoked',
386
- onLogs: (logs) => {
387
- logs.forEach((log) => {
388
- callback(log.args);
389
- });
390
- },
391
- });
392
- },
393
- /**
394
- * Watch ValidatorStatusUpdated events
395
- * @param callback Function to call when event is emitted
396
- * @param filter Optional filter for indexed parameters
397
- * @returns Unwatch function to stop listening
398
- */
399
- ValidatorStatusUpdated: (callback) => {
400
- return this.publicClient.watchContractEvent({
401
- address: this.contractAddress,
402
- abi: exports.Storage_jsonAbi,
403
- eventName: 'ValidatorStatusUpdated',
404
- onLogs: (logs) => {
405
- logs.forEach((log) => {
406
- callback(log.args);
407
- });
408
- },
409
- });
410
- }
411
- };
143
+ return {};
412
144
  }
413
145
  }
414
146
  exports.Storage_json = Storage_json;
@@ -9,73 +9,7 @@ import { getContract } from 'viem';
9
9
  export const Storage_jsonAbi = [
10
10
  {
11
11
  "inputs": [],
12
- "name": "InvalidOwner",
13
- "type": "error"
14
- },
15
- {
16
- "inputs": [],
17
- "name": "InvalidSessionId",
18
- "type": "error"
19
- },
20
- {
21
- "inputs": [
22
- {
23
- "internalType": "address",
24
- "name": "validator",
25
- "type": "address"
26
- }
27
- ],
28
- "name": "InvalidValidator",
29
- "type": "error"
30
- },
31
- {
32
- "anonymous": false,
33
- "inputs": [
34
- {
35
- "indexed": false,
36
- "internalType": "uint256",
37
- "name": "utilisedNonce",
38
- "type": "uint256"
39
- }
40
- ],
41
- "name": "NonceConsumed",
42
- "type": "event"
43
- },
44
- {
45
- "anonymous": false,
46
- "inputs": [
47
- {
48
- "indexed": false,
49
- "internalType": "uint256",
50
- "name": "id",
51
- "type": "uint256"
52
- }
53
- ],
54
- "name": "SessionRevoked",
55
- "type": "event"
56
- },
57
- {
58
- "anonymous": false,
59
- "inputs": [
60
- {
61
- "indexed": false,
62
- "internalType": "address",
63
- "name": "validator",
64
- "type": "address"
65
- },
66
- {
67
- "indexed": false,
68
- "internalType": "bool",
69
- "name": "status",
70
- "type": "bool"
71
- }
72
- ],
73
- "name": "ValidatorStatusUpdated",
74
- "type": "event"
75
- },
76
- {
77
- "inputs": [],
78
- "name": "getNonce",
12
+ "name": "retrieve",
79
13
  "outputs": [
80
14
  {
81
15
  "internalType": "uint256",
@@ -86,99 +20,18 @@ export const Storage_jsonAbi = [
86
20
  "stateMutability": "view",
87
21
  "type": "function"
88
22
  },
89
- {
90
- "inputs": [],
91
- "name": "getOwner",
92
- "outputs": [
93
- {
94
- "internalType": "address",
95
- "name": "",
96
- "type": "address"
97
- }
98
- ],
99
- "stateMutability": "view",
100
- "type": "function"
101
- },
102
- {
103
- "inputs": [
104
- {
105
- "internalType": "address",
106
- "name": "validator",
107
- "type": "address"
108
- }
109
- ],
110
- "name": "readAndUpdateNonce",
111
- "outputs": [
112
- {
113
- "internalType": "uint256",
114
- "name": "",
115
- "type": "uint256"
116
- }
117
- ],
118
- "stateMutability": "nonpayable",
119
- "type": "function"
120
- },
121
23
  {
122
24
  "inputs": [
123
25
  {
124
26
  "internalType": "uint256",
125
- "name": "id",
27
+ "name": "num",
126
28
  "type": "uint256"
127
29
  }
128
30
  ],
129
- "name": "revokeSession",
31
+ "name": "store",
130
32
  "outputs": [],
131
33
  "stateMutability": "nonpayable",
132
34
  "type": "function"
133
- },
134
- {
135
- "inputs": [
136
- {
137
- "internalType": "address",
138
- "name": "validator",
139
- "type": "address"
140
- },
141
- {
142
- "internalType": "bool",
143
- "name": "isValid",
144
- "type": "bool"
145
- }
146
- ],
147
- "name": "setValidatorStatus",
148
- "outputs": [],
149
- "stateMutability": "nonpayable",
150
- "type": "function"
151
- },
152
- {
153
- "inputs": [
154
- {
155
- "internalType": "uint256",
156
- "name": "id",
157
- "type": "uint256"
158
- },
159
- {
160
- "internalType": "address",
161
- "name": "validator",
162
- "type": "address"
163
- }
164
- ],
165
- "name": "validateSession",
166
- "outputs": [],
167
- "stateMutability": "view",
168
- "type": "function"
169
- },
170
- {
171
- "inputs": [
172
- {
173
- "internalType": "address",
174
- "name": "validator",
175
- "type": "address"
176
- }
177
- ],
178
- "name": "validateValidator",
179
- "outputs": [],
180
- "stateMutability": "view",
181
- "type": "function"
182
35
  }
183
36
  ] as const satisfies Abi;
184
37
 
@@ -265,89 +118,19 @@ export class Storage_json {
265
118
  }
266
119
 
267
120
  /**
268
- * getNonce
121
+ * retrieve
269
122
  * view
270
123
  */
271
- async getNonce(): Promise<bigint> {
272
- return this.contract.read.getNonce() as Promise<bigint>;
124
+ async retrieve(): Promise<bigint> {
125
+ return this.contract.read.retrieve() as Promise<bigint>;
273
126
  }
274
127
 
275
128
  /**
276
- * getOwner
277
- * view
278
- */
279
- async getOwner(): Promise<`0x${string}`> {
280
- return this.contract.read.getOwner() as Promise<`0x${string}`>;
281
- }
282
-
283
- /**
284
- * validateSession
285
- * view
286
- */
287
- async validateSession(id: bigint, validator: `0x${string}`): Promise<void> {
288
- return this.contract.read.validateSession([id, validator] as const) as Promise<void>;
289
- }
290
-
291
- /**
292
- * validateValidator
293
- * view
294
- */
295
- async validateValidator(validator: `0x${string}`): Promise<void> {
296
- return this.contract.read.validateValidator([validator] as const) as Promise<void>;
297
- }
298
-
299
- /**
300
- * readAndUpdateNonce
301
- * nonpayable
302
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
303
- */
304
- async readAndUpdateNonce(validator: `0x${string}`, options?: {
305
- accessList?: import('viem').AccessList;
306
- authorizationList?: import('viem').AuthorizationList;
307
- chain?: import('viem').Chain | null;
308
- dataSuffix?: `0x${string}`;
309
- gas?: bigint;
310
- gasPrice?: bigint;
311
- maxFeePerGas?: bigint;
312
- maxPriorityFeePerGas?: bigint;
313
- nonce?: number;
314
- value?: bigint;
315
- }): Promise<`0x${string}`> {
316
- if (!this.contract.write) {
317
- throw new Error('Wallet client is required for write operations');
318
- }
319
- return this.contract.write.readAndUpdateNonce([validator] as const, options) as Promise<`0x${string}`>;
320
- }
321
-
322
- /**
323
- * revokeSession
324
- * nonpayable
325
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
326
- */
327
- async revokeSession(id: bigint, options?: {
328
- accessList?: import('viem').AccessList;
329
- authorizationList?: import('viem').AuthorizationList;
330
- chain?: import('viem').Chain | null;
331
- dataSuffix?: `0x${string}`;
332
- gas?: bigint;
333
- gasPrice?: bigint;
334
- maxFeePerGas?: bigint;
335
- maxPriorityFeePerGas?: bigint;
336
- nonce?: number;
337
- value?: bigint;
338
- }): Promise<`0x${string}`> {
339
- if (!this.contract.write) {
340
- throw new Error('Wallet client is required for write operations');
341
- }
342
- return this.contract.write.revokeSession([id] as const, options) as Promise<`0x${string}`>;
343
- }
344
-
345
- /**
346
- * setValidatorStatus
129
+ * store
347
130
  * nonpayable
348
131
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
349
132
  */
350
- async setValidatorStatus(validator: `0x${string}`, isValid: boolean, options?: {
133
+ async store(num: bigint, options?: {
351
134
  accessList?: import('viem').AccessList;
352
135
  authorizationList?: import('viem').AuthorizationList;
353
136
  chain?: import('viem').Chain | null;
@@ -362,7 +145,7 @@ export class Storage_json {
362
145
  if (!this.contract.write) {
363
146
  throw new Error('Wallet client is required for write operations');
364
147
  }
365
- return this.contract.write.setValidatorStatus([validator, isValid] as const, options) as Promise<`0x${string}`>;
148
+ return this.contract.write.store([num] as const, options) as Promise<`0x${string}`>;
366
149
  }
367
150
 
368
151
 
@@ -382,49 +165,11 @@ export class Storage_json {
382
165
  }
383
166
  return {
384
167
  /**
385
- * Simulate readAndUpdateNonce
386
- * Returns gas estimate and result without sending transaction
387
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
388
- */
389
- async readAndUpdateNonce(validator: `0x${string}`, options?: {
390
- accessList?: import('viem').AccessList;
391
- authorizationList?: import('viem').AuthorizationList;
392
- chain?: import('viem').Chain | null;
393
- dataSuffix?: `0x${string}`;
394
- gas?: bigint;
395
- gasPrice?: bigint;
396
- maxFeePerGas?: bigint;
397
- maxPriorityFeePerGas?: bigint;
398
- nonce?: number;
399
- value?: bigint;
400
- }): Promise<bigint> {
401
- return contract.simulate.readAndUpdateNonce([validator] as const, options) as Promise<bigint>;
402
- },
403
- /**
404
- * Simulate revokeSession
405
- * Returns gas estimate and result without sending transaction
406
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
407
- */
408
- async revokeSession(id: bigint, 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<void> {
420
- return contract.simulate.revokeSession([id] as const, options) as Promise<void>;
421
- },
422
- /**
423
- * Simulate setValidatorStatus
168
+ * Simulate store
424
169
  * Returns gas estimate and result without sending transaction
425
170
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
426
171
  */
427
- async setValidatorStatus(validator: `0x${string}`, isValid: boolean, options?: {
172
+ async store(num: bigint, options?: {
428
173
  accessList?: import('viem').AccessList;
429
174
  authorizationList?: import('viem').AuthorizationList;
430
175
  chain?: import('viem').Chain | null;
@@ -436,7 +181,7 @@ export class Storage_json {
436
181
  nonce?: number;
437
182
  value?: bigint;
438
183
  }): Promise<void> {
439
- return contract.simulate.setValidatorStatus([validator, isValid] as const, options) as Promise<void>;
184
+ return contract.simulate.store([num] as const, options) as Promise<void>;
440
185
  }
441
186
  };
442
187
  }
@@ -444,74 +189,9 @@ export class Storage_json {
444
189
  /**
445
190
  * Watch contract events
446
191
  *
447
- * @example
448
- * // Watch all Transfer events
449
- * const unwatch = contract.watch.Transfer((event) => {
450
- * console.log('Transfer:', event);
451
- * });
452
- *
453
- * // Stop watching
454
- * unwatch();
192
+ * Note: This contract has no events, so watch returns an empty object.
455
193
  */
456
194
  get watch() {
457
- return {
458
- /**
459
- * Watch NonceConsumed events
460
- * @param callback Function to call when event is emitted
461
- * @param filter Optional filter for indexed parameters
462
- * @returns Unwatch function to stop listening
463
- */
464
- NonceConsumed: (callback: (event: { utilisedNonce: bigint }) => void) => {
465
- return this.publicClient.watchContractEvent({
466
- address: this.contractAddress,
467
- abi: Storage_jsonAbi,
468
- eventName: 'NonceConsumed',
469
-
470
- onLogs: (logs: any[]) => {
471
- logs.forEach((log: any) => {
472
- callback(log.args as any);
473
- });
474
- },
475
- }) as () => void;
476
- },
477
- /**
478
- * Watch SessionRevoked events
479
- * @param callback Function to call when event is emitted
480
- * @param filter Optional filter for indexed parameters
481
- * @returns Unwatch function to stop listening
482
- */
483
- SessionRevoked: (callback: (event: { id: bigint }) => void) => {
484
- return this.publicClient.watchContractEvent({
485
- address: this.contractAddress,
486
- abi: Storage_jsonAbi,
487
- eventName: 'SessionRevoked',
488
-
489
- onLogs: (logs: any[]) => {
490
- logs.forEach((log: any) => {
491
- callback(log.args as any);
492
- });
493
- },
494
- }) as () => void;
495
- },
496
- /**
497
- * Watch ValidatorStatusUpdated events
498
- * @param callback Function to call when event is emitted
499
- * @param filter Optional filter for indexed parameters
500
- * @returns Unwatch function to stop listening
501
- */
502
- ValidatorStatusUpdated: (callback: (event: { validator: `0x${string}`; status: boolean }) => void) => {
503
- return this.publicClient.watchContractEvent({
504
- address: this.contractAddress,
505
- abi: Storage_jsonAbi,
506
- eventName: 'ValidatorStatusUpdated',
507
-
508
- onLogs: (logs: any[]) => {
509
- logs.forEach((log: any) => {
510
- callback(log.args as any);
511
- });
512
- },
513
- }) as () => void;
514
- }
515
- };
195
+ return {};
516
196
  }
517
197
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gitmyabi/storage",
3
- "version": "1.0.1",
4
- "description": "Auto-generated TypeScript type bindings for Storage (build etherscan-storage-9232d279-1786680828945, commit 91f28db, branch etherscan)",
3
+ "version": "1.0.2",
4
+ "description": "Auto-generated TypeScript type bindings for Storage (build etherscan-storage-d49edad6-1787334000666, commit 85d568f, branch etherscan)",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
7
7
  "exports": {
@@ -39,5 +39,5 @@
39
39
  "url": "https://github.com/etherscan/storage"
40
40
  },
41
41
  "branch": "etherscan",
42
- "shortHash": "91f28db"
42
+ "shortHash": "85d568f"
43
43
  }