@gitmyabi/minter 0.0.0-stage → 1.0.0
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 +107 -2
- package/contracts/Minter_json.d.ts +439 -0
- package/contracts/Minter_json.js +437 -0
- package/contracts/Minter_json.ts +584 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +40 -3
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
|
+
import { getContract } from 'viem';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Minter_json ABI
|
|
6
|
+
*
|
|
7
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
8
|
+
*/
|
|
9
|
+
export const Minter_jsonAbi = [
|
|
10
|
+
{
|
|
11
|
+
"inputs": [
|
|
12
|
+
{
|
|
13
|
+
"internalType": "uint256",
|
|
14
|
+
"name": "_threshold",
|
|
15
|
+
"type": "uint256"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"internalType": "uint256",
|
|
19
|
+
"name": "_nonce",
|
|
20
|
+
"type": "uint256"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"internalType": "address[]",
|
|
24
|
+
"name": "_signers",
|
|
25
|
+
"type": "address[]"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"stateMutability": "nonpayable",
|
|
29
|
+
"type": "constructor"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"inputs": [
|
|
33
|
+
{
|
|
34
|
+
"internalType": "address",
|
|
35
|
+
"name": "_signer",
|
|
36
|
+
"type": "address"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"internalType": "bytes[]",
|
|
40
|
+
"name": "_signatures",
|
|
41
|
+
"type": "bytes[]"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"name": "addSigner",
|
|
45
|
+
"outputs": [],
|
|
46
|
+
"stateMutability": "nonpayable",
|
|
47
|
+
"type": "function"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"inputs": [
|
|
51
|
+
{
|
|
52
|
+
"internalType": "uint256",
|
|
53
|
+
"name": "_newThreshold",
|
|
54
|
+
"type": "uint256"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"internalType": "bytes[]",
|
|
58
|
+
"name": "_signatures",
|
|
59
|
+
"type": "bytes[]"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"name": "changeThreshold",
|
|
63
|
+
"outputs": [],
|
|
64
|
+
"stateMutability": "nonpayable",
|
|
65
|
+
"type": "function"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"inputs": [
|
|
69
|
+
{
|
|
70
|
+
"internalType": "address",
|
|
71
|
+
"name": "_token",
|
|
72
|
+
"type": "address"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"internalType": "address",
|
|
76
|
+
"name": "_to",
|
|
77
|
+
"type": "address"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"internalType": "bytes[]",
|
|
81
|
+
"name": "_signatures",
|
|
82
|
+
"type": "bytes[]"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"name": "collectOwnership",
|
|
86
|
+
"outputs": [],
|
|
87
|
+
"stateMutability": "nonpayable",
|
|
88
|
+
"type": "function"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"inputs": [
|
|
92
|
+
{
|
|
93
|
+
"internalType": "address",
|
|
94
|
+
"name": "_candidate",
|
|
95
|
+
"type": "address"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"name": "isSigner",
|
|
99
|
+
"outputs": [
|
|
100
|
+
{
|
|
101
|
+
"internalType": "bool",
|
|
102
|
+
"name": "",
|
|
103
|
+
"type": "bool"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"stateMutability": "view",
|
|
107
|
+
"type": "function"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"inputs": [
|
|
111
|
+
{
|
|
112
|
+
"internalType": "address",
|
|
113
|
+
"name": "_token",
|
|
114
|
+
"type": "address"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"internalType": "address",
|
|
118
|
+
"name": "_to",
|
|
119
|
+
"type": "address"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"internalType": "uint256",
|
|
123
|
+
"name": "_amount",
|
|
124
|
+
"type": "uint256"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"internalType": "bytes32",
|
|
128
|
+
"name": "_txHash",
|
|
129
|
+
"type": "bytes32"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"internalType": "bytes[]",
|
|
133
|
+
"name": "_signatures",
|
|
134
|
+
"type": "bytes[]"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"name": "mint",
|
|
138
|
+
"outputs": [],
|
|
139
|
+
"stateMutability": "nonpayable",
|
|
140
|
+
"type": "function"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"inputs": [],
|
|
144
|
+
"name": "nonce",
|
|
145
|
+
"outputs": [
|
|
146
|
+
{
|
|
147
|
+
"internalType": "uint256",
|
|
148
|
+
"name": "",
|
|
149
|
+
"type": "uint256"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"stateMutability": "view",
|
|
153
|
+
"type": "function"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"inputs": [
|
|
157
|
+
{
|
|
158
|
+
"internalType": "address",
|
|
159
|
+
"name": "_signer",
|
|
160
|
+
"type": "address"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"internalType": "bytes[]",
|
|
164
|
+
"name": "_signatures",
|
|
165
|
+
"type": "bytes[]"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"name": "removeSigner",
|
|
169
|
+
"outputs": [],
|
|
170
|
+
"stateMutability": "nonpayable",
|
|
171
|
+
"type": "function"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"inputs": [],
|
|
175
|
+
"name": "signerLength",
|
|
176
|
+
"outputs": [
|
|
177
|
+
{
|
|
178
|
+
"internalType": "uint256",
|
|
179
|
+
"name": "",
|
|
180
|
+
"type": "uint256"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"stateMutability": "view",
|
|
184
|
+
"type": "function"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"inputs": [],
|
|
188
|
+
"name": "threshold",
|
|
189
|
+
"outputs": [
|
|
190
|
+
{
|
|
191
|
+
"internalType": "uint256",
|
|
192
|
+
"name": "",
|
|
193
|
+
"type": "uint256"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"stateMutability": "view",
|
|
197
|
+
"type": "function"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"inputs": [
|
|
201
|
+
{
|
|
202
|
+
"internalType": "bytes32",
|
|
203
|
+
"name": "_hash",
|
|
204
|
+
"type": "bytes32"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"internalType": "bytes[]",
|
|
208
|
+
"name": "_signatures",
|
|
209
|
+
"type": "bytes[]"
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"name": "verify",
|
|
213
|
+
"outputs": [
|
|
214
|
+
{
|
|
215
|
+
"internalType": "bool",
|
|
216
|
+
"name": "",
|
|
217
|
+
"type": "bool"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"stateMutability": "view",
|
|
221
|
+
"type": "function"
|
|
222
|
+
}
|
|
223
|
+
] as const satisfies Abi;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Type-safe ABI for Minter_json
|
|
227
|
+
*/
|
|
228
|
+
export type Minter_jsonAbi = typeof Minter_jsonAbi;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Contract instance type for Minter_json
|
|
232
|
+
*/
|
|
233
|
+
// Use any for contract type to avoid complex viem type issues
|
|
234
|
+
// The runtime behavior is type-safe through viem's ABI typing
|
|
235
|
+
export type Minter_jsonContract = any;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Minter_json Contract Class
|
|
239
|
+
*
|
|
240
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
* ```typescript
|
|
244
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
245
|
+
* import { mainnet } from 'viem/chains';
|
|
246
|
+
* import { Minter_json } from 'Minter_json';
|
|
247
|
+
*
|
|
248
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
249
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
250
|
+
*
|
|
251
|
+
* const contract = new Minter_json('0x...', { publicClient, walletClient });
|
|
252
|
+
*
|
|
253
|
+
* // Read functions
|
|
254
|
+
* const result = await contract.balanceOf('0x...');
|
|
255
|
+
*
|
|
256
|
+
* // Write functions
|
|
257
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
258
|
+
*
|
|
259
|
+
* // Simulate transactions (dry-run)
|
|
260
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
261
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
262
|
+
*
|
|
263
|
+
* // Watch events
|
|
264
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
265
|
+
* console.log('Transfer event:', event);
|
|
266
|
+
* });
|
|
267
|
+
* ```
|
|
268
|
+
*/
|
|
269
|
+
export class Minter_json {
|
|
270
|
+
private contract: Minter_jsonContract;
|
|
271
|
+
private contractAddress: Address;
|
|
272
|
+
private publicClient: PublicClient;
|
|
273
|
+
|
|
274
|
+
constructor(
|
|
275
|
+
address: Address,
|
|
276
|
+
clients: {
|
|
277
|
+
publicClient: PublicClient;
|
|
278
|
+
walletClient?: WalletClient;
|
|
279
|
+
}
|
|
280
|
+
) {
|
|
281
|
+
this.contractAddress = address;
|
|
282
|
+
this.publicClient = clients.publicClient;
|
|
283
|
+
this.contract = getContract({
|
|
284
|
+
address,
|
|
285
|
+
abi: Minter_jsonAbi,
|
|
286
|
+
client: {
|
|
287
|
+
public: clients.publicClient,
|
|
288
|
+
wallet: clients.walletClient,
|
|
289
|
+
},
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Get the contract address
|
|
295
|
+
*/
|
|
296
|
+
get address(): Address {
|
|
297
|
+
return this.contractAddress;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Get the underlying viem contract instance
|
|
302
|
+
*/
|
|
303
|
+
getContract(): Minter_jsonContract {
|
|
304
|
+
return this.contract;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* isSigner
|
|
309
|
+
* view
|
|
310
|
+
*/
|
|
311
|
+
async isSigner(_candidate: `0x${string}`): Promise<boolean> {
|
|
312
|
+
return this.contract.read.isSigner([_candidate] as const) as Promise<boolean>;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* nonce
|
|
317
|
+
* view
|
|
318
|
+
*/
|
|
319
|
+
async nonce(): Promise<bigint> {
|
|
320
|
+
return this.contract.read.nonce() as Promise<bigint>;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* signerLength
|
|
325
|
+
* view
|
|
326
|
+
*/
|
|
327
|
+
async signerLength(): Promise<bigint> {
|
|
328
|
+
return this.contract.read.signerLength() as Promise<bigint>;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* threshold
|
|
333
|
+
* view
|
|
334
|
+
*/
|
|
335
|
+
async threshold(): Promise<bigint> {
|
|
336
|
+
return this.contract.read.threshold() as Promise<bigint>;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* verify
|
|
341
|
+
* view
|
|
342
|
+
*/
|
|
343
|
+
async verify(_hash: `0x${string}`, _signatures: `0x${string}`[]): Promise<boolean> {
|
|
344
|
+
return this.contract.read.verify([_hash, _signatures] as const) as Promise<boolean>;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* addSigner
|
|
349
|
+
* nonpayable
|
|
350
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
351
|
+
*/
|
|
352
|
+
async addSigner(_signer: `0x${string}`, _signatures: `0x${string}`[], options?: {
|
|
353
|
+
accessList?: import('viem').AccessList;
|
|
354
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
355
|
+
chain?: import('viem').Chain | null;
|
|
356
|
+
dataSuffix?: `0x${string}`;
|
|
357
|
+
gas?: bigint;
|
|
358
|
+
gasPrice?: bigint;
|
|
359
|
+
maxFeePerGas?: bigint;
|
|
360
|
+
maxPriorityFeePerGas?: bigint;
|
|
361
|
+
nonce?: number;
|
|
362
|
+
value?: bigint;
|
|
363
|
+
}): Promise<`0x${string}`> {
|
|
364
|
+
if (!this.contract.write) {
|
|
365
|
+
throw new Error('Wallet client is required for write operations');
|
|
366
|
+
}
|
|
367
|
+
return this.contract.write.addSigner([_signer, _signatures] as const, options) as Promise<`0x${string}`>;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* changeThreshold
|
|
372
|
+
* nonpayable
|
|
373
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
374
|
+
*/
|
|
375
|
+
async changeThreshold(_newThreshold: bigint, _signatures: `0x${string}`[], options?: {
|
|
376
|
+
accessList?: import('viem').AccessList;
|
|
377
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
378
|
+
chain?: import('viem').Chain | null;
|
|
379
|
+
dataSuffix?: `0x${string}`;
|
|
380
|
+
gas?: bigint;
|
|
381
|
+
gasPrice?: bigint;
|
|
382
|
+
maxFeePerGas?: bigint;
|
|
383
|
+
maxPriorityFeePerGas?: bigint;
|
|
384
|
+
nonce?: number;
|
|
385
|
+
value?: bigint;
|
|
386
|
+
}): Promise<`0x${string}`> {
|
|
387
|
+
if (!this.contract.write) {
|
|
388
|
+
throw new Error('Wallet client is required for write operations');
|
|
389
|
+
}
|
|
390
|
+
return this.contract.write.changeThreshold([_newThreshold, _signatures] as const, options) as Promise<`0x${string}`>;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* collectOwnership
|
|
395
|
+
* nonpayable
|
|
396
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
397
|
+
*/
|
|
398
|
+
async collectOwnership(_token: `0x${string}`, _to: `0x${string}`, _signatures: `0x${string}`[], options?: {
|
|
399
|
+
accessList?: import('viem').AccessList;
|
|
400
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
401
|
+
chain?: import('viem').Chain | null;
|
|
402
|
+
dataSuffix?: `0x${string}`;
|
|
403
|
+
gas?: bigint;
|
|
404
|
+
gasPrice?: bigint;
|
|
405
|
+
maxFeePerGas?: bigint;
|
|
406
|
+
maxPriorityFeePerGas?: bigint;
|
|
407
|
+
nonce?: number;
|
|
408
|
+
value?: bigint;
|
|
409
|
+
}): Promise<`0x${string}`> {
|
|
410
|
+
if (!this.contract.write) {
|
|
411
|
+
throw new Error('Wallet client is required for write operations');
|
|
412
|
+
}
|
|
413
|
+
return this.contract.write.collectOwnership([_token, _to, _signatures] as const, options) as Promise<`0x${string}`>;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* mint
|
|
418
|
+
* nonpayable
|
|
419
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
420
|
+
*/
|
|
421
|
+
async mint(_token: `0x${string}`, _to: `0x${string}`, _amount: bigint, _txHash: `0x${string}`, _signatures: `0x${string}`[], options?: {
|
|
422
|
+
accessList?: import('viem').AccessList;
|
|
423
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
424
|
+
chain?: import('viem').Chain | null;
|
|
425
|
+
dataSuffix?: `0x${string}`;
|
|
426
|
+
gas?: bigint;
|
|
427
|
+
gasPrice?: bigint;
|
|
428
|
+
maxFeePerGas?: bigint;
|
|
429
|
+
maxPriorityFeePerGas?: bigint;
|
|
430
|
+
nonce?: number;
|
|
431
|
+
value?: bigint;
|
|
432
|
+
}): Promise<`0x${string}`> {
|
|
433
|
+
if (!this.contract.write) {
|
|
434
|
+
throw new Error('Wallet client is required for write operations');
|
|
435
|
+
}
|
|
436
|
+
return this.contract.write.mint([_token, _to, _amount, _txHash, _signatures] as const, options) as Promise<`0x${string}`>;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* removeSigner
|
|
441
|
+
* nonpayable
|
|
442
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
443
|
+
*/
|
|
444
|
+
async removeSigner(_signer: `0x${string}`, _signatures: `0x${string}`[], options?: {
|
|
445
|
+
accessList?: import('viem').AccessList;
|
|
446
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
447
|
+
chain?: import('viem').Chain | null;
|
|
448
|
+
dataSuffix?: `0x${string}`;
|
|
449
|
+
gas?: bigint;
|
|
450
|
+
gasPrice?: bigint;
|
|
451
|
+
maxFeePerGas?: bigint;
|
|
452
|
+
maxPriorityFeePerGas?: bigint;
|
|
453
|
+
nonce?: number;
|
|
454
|
+
value?: bigint;
|
|
455
|
+
}): Promise<`0x${string}`> {
|
|
456
|
+
if (!this.contract.write) {
|
|
457
|
+
throw new Error('Wallet client is required for write operations');
|
|
458
|
+
}
|
|
459
|
+
return this.contract.write.removeSigner([_signer, _signatures] as const, options) as Promise<`0x${string}`>;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
466
|
+
*
|
|
467
|
+
* @example
|
|
468
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
469
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
470
|
+
* console.log('Would succeed:', result.result);
|
|
471
|
+
*/
|
|
472
|
+
get simulate() {
|
|
473
|
+
const contract = this.contract;
|
|
474
|
+
if (!contract.simulate) {
|
|
475
|
+
throw new Error('Public client is required for simulation');
|
|
476
|
+
}
|
|
477
|
+
return {
|
|
478
|
+
/**
|
|
479
|
+
* Simulate addSigner
|
|
480
|
+
* Returns gas estimate and result without sending transaction
|
|
481
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
482
|
+
*/
|
|
483
|
+
async addSigner(_signer: `0x${string}`, _signatures: `0x${string}`[], options?: {
|
|
484
|
+
accessList?: import('viem').AccessList;
|
|
485
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
486
|
+
chain?: import('viem').Chain | null;
|
|
487
|
+
dataSuffix?: `0x${string}`;
|
|
488
|
+
gas?: bigint;
|
|
489
|
+
gasPrice?: bigint;
|
|
490
|
+
maxFeePerGas?: bigint;
|
|
491
|
+
maxPriorityFeePerGas?: bigint;
|
|
492
|
+
nonce?: number;
|
|
493
|
+
value?: bigint;
|
|
494
|
+
}): Promise<void> {
|
|
495
|
+
return contract.simulate.addSigner([_signer, _signatures] as const, options) as Promise<void>;
|
|
496
|
+
},
|
|
497
|
+
/**
|
|
498
|
+
* Simulate changeThreshold
|
|
499
|
+
* Returns gas estimate and result without sending transaction
|
|
500
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
501
|
+
*/
|
|
502
|
+
async changeThreshold(_newThreshold: bigint, _signatures: `0x${string}`[], options?: {
|
|
503
|
+
accessList?: import('viem').AccessList;
|
|
504
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
505
|
+
chain?: import('viem').Chain | null;
|
|
506
|
+
dataSuffix?: `0x${string}`;
|
|
507
|
+
gas?: bigint;
|
|
508
|
+
gasPrice?: bigint;
|
|
509
|
+
maxFeePerGas?: bigint;
|
|
510
|
+
maxPriorityFeePerGas?: bigint;
|
|
511
|
+
nonce?: number;
|
|
512
|
+
value?: bigint;
|
|
513
|
+
}): Promise<void> {
|
|
514
|
+
return contract.simulate.changeThreshold([_newThreshold, _signatures] as const, options) as Promise<void>;
|
|
515
|
+
},
|
|
516
|
+
/**
|
|
517
|
+
* Simulate collectOwnership
|
|
518
|
+
* Returns gas estimate and result without sending transaction
|
|
519
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
520
|
+
*/
|
|
521
|
+
async collectOwnership(_token: `0x${string}`, _to: `0x${string}`, _signatures: `0x${string}`[], options?: {
|
|
522
|
+
accessList?: import('viem').AccessList;
|
|
523
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
524
|
+
chain?: import('viem').Chain | null;
|
|
525
|
+
dataSuffix?: `0x${string}`;
|
|
526
|
+
gas?: bigint;
|
|
527
|
+
gasPrice?: bigint;
|
|
528
|
+
maxFeePerGas?: bigint;
|
|
529
|
+
maxPriorityFeePerGas?: bigint;
|
|
530
|
+
nonce?: number;
|
|
531
|
+
value?: bigint;
|
|
532
|
+
}): Promise<void> {
|
|
533
|
+
return contract.simulate.collectOwnership([_token, _to, _signatures] as const, options) as Promise<void>;
|
|
534
|
+
},
|
|
535
|
+
/**
|
|
536
|
+
* Simulate mint
|
|
537
|
+
* Returns gas estimate and result without sending transaction
|
|
538
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
539
|
+
*/
|
|
540
|
+
async mint(_token: `0x${string}`, _to: `0x${string}`, _amount: bigint, _txHash: `0x${string}`, _signatures: `0x${string}`[], options?: {
|
|
541
|
+
accessList?: import('viem').AccessList;
|
|
542
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
543
|
+
chain?: import('viem').Chain | null;
|
|
544
|
+
dataSuffix?: `0x${string}`;
|
|
545
|
+
gas?: bigint;
|
|
546
|
+
gasPrice?: bigint;
|
|
547
|
+
maxFeePerGas?: bigint;
|
|
548
|
+
maxPriorityFeePerGas?: bigint;
|
|
549
|
+
nonce?: number;
|
|
550
|
+
value?: bigint;
|
|
551
|
+
}): Promise<void> {
|
|
552
|
+
return contract.simulate.mint([_token, _to, _amount, _txHash, _signatures] as const, options) as Promise<void>;
|
|
553
|
+
},
|
|
554
|
+
/**
|
|
555
|
+
* Simulate removeSigner
|
|
556
|
+
* Returns gas estimate and result without sending transaction
|
|
557
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
558
|
+
*/
|
|
559
|
+
async removeSigner(_signer: `0x${string}`, _signatures: `0x${string}`[], options?: {
|
|
560
|
+
accessList?: import('viem').AccessList;
|
|
561
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
562
|
+
chain?: import('viem').Chain | null;
|
|
563
|
+
dataSuffix?: `0x${string}`;
|
|
564
|
+
gas?: bigint;
|
|
565
|
+
gasPrice?: bigint;
|
|
566
|
+
maxFeePerGas?: bigint;
|
|
567
|
+
maxPriorityFeePerGas?: bigint;
|
|
568
|
+
nonce?: number;
|
|
569
|
+
value?: bigint;
|
|
570
|
+
}): Promise<void> {
|
|
571
|
+
return contract.simulate.removeSigner([_signer, _signatures] as const, options) as Promise<void>;
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Watch contract events
|
|
578
|
+
*
|
|
579
|
+
* Note: This contract has no events, so watch returns an empty object.
|
|
580
|
+
*/
|
|
581
|
+
get watch() {
|
|
582
|
+
return {};
|
|
583
|
+
}
|
|
584
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Minter_json = exports.Minter_jsonAbi = void 0;
|
|
4
|
+
// Auto-generated exports for all contracts
|
|
5
|
+
var Minter_json_1 = require("./Minter_json");
|
|
6
|
+
Object.defineProperty(exports, "Minter_jsonAbi", { enumerable: true, get: function () { return Minter_json_1.Minter_jsonAbi; } });
|
|
7
|
+
Object.defineProperty(exports, "Minter_json", { enumerable: true, get: function () { return Minter_json_1.Minter_json; } });
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './contracts';
|
package/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated TypeScript type bindings
|
|
3
|
+
// This file exports all generated contract types
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
__exportStar(require("./contracts"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitmyabi/minter",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Auto-generated TypeScript type bindings for Minter (build etherscan-minter-9123077a-1793740696942, commit 51a1126, branch etherscan)",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./index.js",
|
|
10
|
+
"require": "./index.js",
|
|
11
|
+
"types": "./index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./contracts": {
|
|
14
|
+
"import": "./contracts/index.js",
|
|
15
|
+
"require": "./contracts/index.js",
|
|
16
|
+
"types": "./contracts/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"index.js",
|
|
21
|
+
"index.d.ts",
|
|
22
|
+
"contracts"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"ethereum",
|
|
26
|
+
"smart-contracts",
|
|
27
|
+
"viem",
|
|
28
|
+
"wagmi",
|
|
29
|
+
"typescript",
|
|
30
|
+
"abi",
|
|
31
|
+
"ethers-v6"
|
|
32
|
+
],
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"viem": "^2.0.0"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/etherscan/minter"
|
|
40
|
+
},
|
|
41
|
+
"branch": "etherscan",
|
|
42
|
+
"shortHash": "51a1126"
|
|
6
43
|
}
|