@gitmyabi/stakingmanager 1.0.5 → 1.0.6

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.
@@ -77,6 +77,76 @@ export const TransparentUpgradeableProxy_jsonAbi = [
77
77
  "stateMutability": "payable",
78
78
  "type": "fallback"
79
79
  },
80
+ {
81
+ "inputs": [],
82
+ "name": "admin",
83
+ "outputs": [
84
+ {
85
+ "internalType": "address",
86
+ "name": "admin_",
87
+ "type": "address"
88
+ }
89
+ ],
90
+ "stateMutability": "nonpayable",
91
+ "type": "function"
92
+ },
93
+ {
94
+ "inputs": [
95
+ {
96
+ "internalType": "address",
97
+ "name": "newAdmin",
98
+ "type": "address"
99
+ }
100
+ ],
101
+ "name": "changeAdmin",
102
+ "outputs": [],
103
+ "stateMutability": "nonpayable",
104
+ "type": "function"
105
+ },
106
+ {
107
+ "inputs": [],
108
+ "name": "implementation",
109
+ "outputs": [
110
+ {
111
+ "internalType": "address",
112
+ "name": "implementation_",
113
+ "type": "address"
114
+ }
115
+ ],
116
+ "stateMutability": "nonpayable",
117
+ "type": "function"
118
+ },
119
+ {
120
+ "inputs": [
121
+ {
122
+ "internalType": "address",
123
+ "name": "newImplementation",
124
+ "type": "address"
125
+ }
126
+ ],
127
+ "name": "upgradeTo",
128
+ "outputs": [],
129
+ "stateMutability": "nonpayable",
130
+ "type": "function"
131
+ },
132
+ {
133
+ "inputs": [
134
+ {
135
+ "internalType": "address",
136
+ "name": "newImplementation",
137
+ "type": "address"
138
+ },
139
+ {
140
+ "internalType": "bytes",
141
+ "name": "data",
142
+ "type": "bytes"
143
+ }
144
+ ],
145
+ "name": "upgradeToAndCall",
146
+ "outputs": [],
147
+ "stateMutability": "payable",
148
+ "type": "function"
149
+ },
80
150
  {
81
151
  "stateMutability": "payable",
82
152
  "type": "receive"
@@ -167,17 +237,233 @@ export class TransparentUpgradeableProxy_json {
167
237
 
168
238
  // No read functions
169
239
 
170
- // No write functions
240
+ /**
241
+ * admin
242
+ * nonpayable
243
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
244
+ */
245
+ async admin(options?: {
246
+ accessList?: import('viem').AccessList;
247
+ authorizationList?: import('viem').AuthorizationList;
248
+ chain?: import('viem').Chain | null;
249
+ dataSuffix?: `0x${string}`;
250
+ gas?: bigint;
251
+ gasPrice?: bigint;
252
+ maxFeePerGas?: bigint;
253
+ maxPriorityFeePerGas?: bigint;
254
+ nonce?: number;
255
+ value?: bigint;
256
+ }): Promise<`0x${string}`> {
257
+ if (!this.contract.write) {
258
+ throw new Error('Wallet client is required for write operations');
259
+ }
260
+ return this.contract.write.admin(options) as Promise<`0x${string}`>;
261
+ }
262
+
263
+ /**
264
+ * changeAdmin
265
+ * nonpayable
266
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
267
+ */
268
+ async changeAdmin(newAdmin: `0x${string}`, options?: {
269
+ accessList?: import('viem').AccessList;
270
+ authorizationList?: import('viem').AuthorizationList;
271
+ chain?: import('viem').Chain | null;
272
+ dataSuffix?: `0x${string}`;
273
+ gas?: bigint;
274
+ gasPrice?: bigint;
275
+ maxFeePerGas?: bigint;
276
+ maxPriorityFeePerGas?: bigint;
277
+ nonce?: number;
278
+ value?: bigint;
279
+ }): Promise<`0x${string}`> {
280
+ if (!this.contract.write) {
281
+ throw new Error('Wallet client is required for write operations');
282
+ }
283
+ return this.contract.write.changeAdmin([newAdmin] as const, options) as Promise<`0x${string}`>;
284
+ }
285
+
286
+ /**
287
+ * implementation
288
+ * nonpayable
289
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
290
+ */
291
+ async implementation(options?: {
292
+ accessList?: import('viem').AccessList;
293
+ authorizationList?: import('viem').AuthorizationList;
294
+ chain?: import('viem').Chain | null;
295
+ dataSuffix?: `0x${string}`;
296
+ gas?: bigint;
297
+ gasPrice?: bigint;
298
+ maxFeePerGas?: bigint;
299
+ maxPriorityFeePerGas?: bigint;
300
+ nonce?: number;
301
+ value?: bigint;
302
+ }): Promise<`0x${string}`> {
303
+ if (!this.contract.write) {
304
+ throw new Error('Wallet client is required for write operations');
305
+ }
306
+ return this.contract.write.implementation(options) as Promise<`0x${string}`>;
307
+ }
308
+
309
+ /**
310
+ * upgradeTo
311
+ * nonpayable
312
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
313
+ */
314
+ async upgradeTo(newImplementation: `0x${string}`, options?: {
315
+ accessList?: import('viem').AccessList;
316
+ authorizationList?: import('viem').AuthorizationList;
317
+ chain?: import('viem').Chain | null;
318
+ dataSuffix?: `0x${string}`;
319
+ gas?: bigint;
320
+ gasPrice?: bigint;
321
+ maxFeePerGas?: bigint;
322
+ maxPriorityFeePerGas?: bigint;
323
+ nonce?: number;
324
+ value?: bigint;
325
+ }): Promise<`0x${string}`> {
326
+ if (!this.contract.write) {
327
+ throw new Error('Wallet client is required for write operations');
328
+ }
329
+ return this.contract.write.upgradeTo([newImplementation] as const, options) as Promise<`0x${string}`>;
330
+ }
331
+
332
+ /**
333
+ * upgradeToAndCall
334
+ * payable
335
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
336
+ */
337
+ async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
338
+ accessList?: import('viem').AccessList;
339
+ authorizationList?: import('viem').AuthorizationList;
340
+ chain?: import('viem').Chain | null;
341
+ dataSuffix?: `0x${string}`;
342
+ gas?: bigint;
343
+ gasPrice?: bigint;
344
+ maxFeePerGas?: bigint;
345
+ maxPriorityFeePerGas?: bigint;
346
+ nonce?: number;
347
+ value?: bigint;
348
+ }): Promise<`0x${string}`> {
349
+ if (!this.contract.write) {
350
+ throw new Error('Wallet client is required for write operations');
351
+ }
352
+ return this.contract.write.upgradeToAndCall([newImplementation, data] as const, options) as Promise<`0x${string}`>;
353
+ }
171
354
 
172
355
 
173
356
 
174
357
  /**
175
358
  * Simulate contract write operations (dry-run without sending transaction)
176
359
  *
177
- * Note: This contract has no write functions, so simulate returns an empty object.
360
+ * @example
361
+ * const result = await contract.simulate.transfer('0x...', 1000n);
362
+ * console.log('Gas estimate:', result.request.gas);
363
+ * console.log('Would succeed:', result.result);
178
364
  */
179
365
  get simulate() {
180
- return {};
366
+ const contract = this.contract;
367
+ if (!contract.simulate) {
368
+ throw new Error('Public client is required for simulation');
369
+ }
370
+ return {
371
+ /**
372
+ * Simulate admin
373
+ * Returns gas estimate and result without sending transaction
374
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
375
+ */
376
+ async admin(options?: {
377
+ accessList?: import('viem').AccessList;
378
+ authorizationList?: import('viem').AuthorizationList;
379
+ chain?: import('viem').Chain | null;
380
+ dataSuffix?: `0x${string}`;
381
+ gas?: bigint;
382
+ gasPrice?: bigint;
383
+ maxFeePerGas?: bigint;
384
+ maxPriorityFeePerGas?: bigint;
385
+ nonce?: number;
386
+ value?: bigint;
387
+ }): Promise<`0x${string}`> {
388
+ return contract.simulate.admin(options) as Promise<`0x${string}`>;
389
+ },
390
+ /**
391
+ * Simulate changeAdmin
392
+ * Returns gas estimate and result without sending transaction
393
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
394
+ */
395
+ async changeAdmin(newAdmin: `0x${string}`, options?: {
396
+ accessList?: import('viem').AccessList;
397
+ authorizationList?: import('viem').AuthorizationList;
398
+ chain?: import('viem').Chain | null;
399
+ dataSuffix?: `0x${string}`;
400
+ gas?: bigint;
401
+ gasPrice?: bigint;
402
+ maxFeePerGas?: bigint;
403
+ maxPriorityFeePerGas?: bigint;
404
+ nonce?: number;
405
+ value?: bigint;
406
+ }): Promise<void> {
407
+ return contract.simulate.changeAdmin([newAdmin] as const, options) as Promise<void>;
408
+ },
409
+ /**
410
+ * Simulate implementation
411
+ * Returns gas estimate and result without sending transaction
412
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
413
+ */
414
+ async implementation(options?: {
415
+ accessList?: import('viem').AccessList;
416
+ authorizationList?: import('viem').AuthorizationList;
417
+ chain?: import('viem').Chain | null;
418
+ dataSuffix?: `0x${string}`;
419
+ gas?: bigint;
420
+ gasPrice?: bigint;
421
+ maxFeePerGas?: bigint;
422
+ maxPriorityFeePerGas?: bigint;
423
+ nonce?: number;
424
+ value?: bigint;
425
+ }): Promise<`0x${string}`> {
426
+ return contract.simulate.implementation(options) as Promise<`0x${string}`>;
427
+ },
428
+ /**
429
+ * Simulate upgradeTo
430
+ * Returns gas estimate and result without sending transaction
431
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
432
+ */
433
+ async upgradeTo(newImplementation: `0x${string}`, options?: {
434
+ accessList?: import('viem').AccessList;
435
+ authorizationList?: import('viem').AuthorizationList;
436
+ chain?: import('viem').Chain | null;
437
+ dataSuffix?: `0x${string}`;
438
+ gas?: bigint;
439
+ gasPrice?: bigint;
440
+ maxFeePerGas?: bigint;
441
+ maxPriorityFeePerGas?: bigint;
442
+ nonce?: number;
443
+ value?: bigint;
444
+ }): Promise<void> {
445
+ return contract.simulate.upgradeTo([newImplementation] as const, options) as Promise<void>;
446
+ },
447
+ /**
448
+ * Simulate upgradeToAndCall
449
+ * Returns gas estimate and result without sending transaction
450
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
451
+ */
452
+ async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
453
+ accessList?: import('viem').AccessList;
454
+ authorizationList?: import('viem').AuthorizationList;
455
+ chain?: import('viem').Chain | null;
456
+ dataSuffix?: `0x${string}`;
457
+ gas?: bigint;
458
+ gasPrice?: bigint;
459
+ maxFeePerGas?: bigint;
460
+ maxPriorityFeePerGas?: bigint;
461
+ nonce?: number;
462
+ value?: bigint;
463
+ }): Promise<void> {
464
+ return contract.simulate.upgradeToAndCall([newImplementation, data] as const, options) as Promise<void>;
465
+ }
466
+ };
181
467
  }
182
468
 
183
469
  /**
@@ -1,4 +1,4 @@
1
1
  export { TransparentUpgradeableProxy_jsonAbi, TransparentUpgradeableProxy_json } from './TransparentUpgradeableProxy_json';
2
2
  export type { TransparentUpgradeableProxy_jsonAbi as TransparentUpgradeableProxy_jsonAbiType, TransparentUpgradeableProxy_jsonContract } from './TransparentUpgradeableProxy_json';
3
- export { stakingManagerV4_jsonAbi, stakingManagerV4_json } from './stakingManagerV4_json';
4
- export type { stakingManagerV4_jsonAbi as stakingManagerV4_jsonAbiType, stakingManagerV4_jsonContract } from './stakingManagerV4_json';
3
+ export { stakingManager_jsonAbi, stakingManager_json } from './stakingManager_json';
4
+ export type { stakingManager_jsonAbi as stakingManager_jsonAbiType, stakingManager_jsonContract } from './stakingManager_json';
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stakingManagerV4_json = exports.stakingManagerV4_jsonAbi = exports.TransparentUpgradeableProxy_json = exports.TransparentUpgradeableProxy_jsonAbi = void 0;
3
+ exports.stakingManager_json = exports.stakingManager_jsonAbi = exports.TransparentUpgradeableProxy_json = exports.TransparentUpgradeableProxy_jsonAbi = void 0;
4
4
  // Auto-generated exports for all contracts
5
5
  var TransparentUpgradeableProxy_json_1 = require("./TransparentUpgradeableProxy_json");
6
6
  Object.defineProperty(exports, "TransparentUpgradeableProxy_jsonAbi", { enumerable: true, get: function () { return TransparentUpgradeableProxy_json_1.TransparentUpgradeableProxy_jsonAbi; } });
7
7
  Object.defineProperty(exports, "TransparentUpgradeableProxy_json", { enumerable: true, get: function () { return TransparentUpgradeableProxy_json_1.TransparentUpgradeableProxy_json; } });
8
- var stakingManagerV4_json_1 = require("./stakingManagerV4_json");
9
- Object.defineProperty(exports, "stakingManagerV4_jsonAbi", { enumerable: true, get: function () { return stakingManagerV4_json_1.stakingManagerV4_jsonAbi; } });
10
- Object.defineProperty(exports, "stakingManagerV4_json", { enumerable: true, get: function () { return stakingManagerV4_json_1.stakingManagerV4_json; } });
8
+ var stakingManager_json_1 = require("./stakingManager_json");
9
+ Object.defineProperty(exports, "stakingManager_jsonAbi", { enumerable: true, get: function () { return stakingManager_json_1.stakingManager_jsonAbi; } });
10
+ Object.defineProperty(exports, "stakingManager_json", { enumerable: true, get: function () { return stakingManager_json_1.stakingManager_json; } });
@@ -1,5 +1,5 @@
1
1
  // Auto-generated exports for all contracts
2
2
  export { TransparentUpgradeableProxy_jsonAbi, TransparentUpgradeableProxy_json } from './TransparentUpgradeableProxy_json';
3
3
  export type { TransparentUpgradeableProxy_jsonAbi as TransparentUpgradeableProxy_jsonAbiType, TransparentUpgradeableProxy_jsonContract } from './TransparentUpgradeableProxy_json';
4
- export { stakingManagerV4_jsonAbi, stakingManagerV4_json } from './stakingManagerV4_json';
5
- export type { stakingManagerV4_jsonAbi as stakingManagerV4_jsonAbiType, stakingManagerV4_jsonContract } from './stakingManagerV4_json';
4
+ export { stakingManager_jsonAbi, stakingManager_json } from './stakingManager_json';
5
+ export type { stakingManager_jsonAbi as stakingManager_jsonAbiType, stakingManager_jsonContract } from './stakingManager_json';