@gitmyabi/borg 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/contracts/{SwissBorgToken_json.d.ts → BORG_json.d.ts} +668 -305
- package/contracts/{SwissBorgToken_json.js → BORG_json.js} +663 -346
- package/contracts/{SwissBorgToken_json.ts → BORG_json.ts} +863 -384
- package/contracts/index.d.ts +2 -2
- package/contracts/index.js +4 -4
- package/contracts/index.ts +2 -2
- package/package.json +3 -3
|
@@ -1,47 +1,43 @@
|
|
|
1
1
|
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* ERC20Votes.Checkpoint struct type
|
|
7
|
-
*/
|
|
8
|
-
export type ERC20Votes_Checkpoint = {
|
|
9
|
-
fromBlock: bigint;
|
|
10
|
-
votes: bigint;
|
|
11
|
-
};
|
|
12
4
|
/**
|
|
13
|
-
*
|
|
5
|
+
* BORG_json ABI
|
|
14
6
|
*
|
|
15
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
16
8
|
*/
|
|
17
|
-
export const
|
|
9
|
+
export const BORG_jsonAbi = [
|
|
18
10
|
{
|
|
19
11
|
"inputs": [
|
|
12
|
+
{
|
|
13
|
+
"internalType": "uint8",
|
|
14
|
+
"name": "_feeDecimals",
|
|
15
|
+
"type": "uint8"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"internalType": "uint32",
|
|
19
|
+
"name": "_feePercentage",
|
|
20
|
+
"type": "uint32"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"internalType": "uint256",
|
|
24
|
+
"name": "_minTokensBeforeAddToLP",
|
|
25
|
+
"type": "uint256"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"internalType": "bool",
|
|
29
|
+
"name": "_swapAndAbsorbEnabled",
|
|
30
|
+
"type": "bool"
|
|
31
|
+
},
|
|
20
32
|
{
|
|
21
33
|
"internalType": "address",
|
|
22
|
-
"name": "
|
|
34
|
+
"name": "_presale",
|
|
23
35
|
"type": "address"
|
|
24
36
|
}
|
|
25
37
|
],
|
|
26
38
|
"stateMutability": "nonpayable",
|
|
27
39
|
"type": "constructor"
|
|
28
40
|
},
|
|
29
|
-
{
|
|
30
|
-
"inputs": [],
|
|
31
|
-
"name": "InvalidShortString",
|
|
32
|
-
"type": "error"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"inputs": [
|
|
36
|
-
{
|
|
37
|
-
"internalType": "string",
|
|
38
|
-
"name": "str",
|
|
39
|
-
"type": "string"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"name": "StringTooLong",
|
|
43
|
-
"type": "error"
|
|
44
|
-
},
|
|
45
41
|
{
|
|
46
42
|
"anonymous": false,
|
|
47
43
|
"inputs": [
|
|
@@ -71,56 +67,89 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
71
67
|
"anonymous": false,
|
|
72
68
|
"inputs": [
|
|
73
69
|
{
|
|
74
|
-
"indexed":
|
|
75
|
-
"internalType": "
|
|
76
|
-
"name": "
|
|
77
|
-
"type": "
|
|
70
|
+
"indexed": false,
|
|
71
|
+
"internalType": "uint8",
|
|
72
|
+
"name": "feeDecimals",
|
|
73
|
+
"type": "uint8"
|
|
78
74
|
},
|
|
75
|
+
{
|
|
76
|
+
"indexed": false,
|
|
77
|
+
"internalType": "uint32",
|
|
78
|
+
"name": "feePercentage",
|
|
79
|
+
"type": "uint32"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"name": "FeeUpdated",
|
|
83
|
+
"type": "event"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"anonymous": false,
|
|
87
|
+
"inputs": [
|
|
88
|
+
{
|
|
89
|
+
"indexed": false,
|
|
90
|
+
"internalType": "uint256",
|
|
91
|
+
"name": "minTokensBeforeAddToLP",
|
|
92
|
+
"type": "uint256"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"name": "MinTokensBeforeAddToLPUpdated",
|
|
96
|
+
"type": "event"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"anonymous": false,
|
|
100
|
+
"inputs": [
|
|
79
101
|
{
|
|
80
102
|
"indexed": true,
|
|
81
103
|
"internalType": "address",
|
|
82
|
-
"name": "
|
|
104
|
+
"name": "previousOwner",
|
|
83
105
|
"type": "address"
|
|
84
106
|
},
|
|
85
107
|
{
|
|
86
108
|
"indexed": true,
|
|
87
109
|
"internalType": "address",
|
|
88
|
-
"name": "
|
|
110
|
+
"name": "newOwner",
|
|
89
111
|
"type": "address"
|
|
90
112
|
}
|
|
91
113
|
],
|
|
92
|
-
"name": "
|
|
114
|
+
"name": "OwnershipTransferred",
|
|
93
115
|
"type": "event"
|
|
94
116
|
},
|
|
95
117
|
{
|
|
96
118
|
"anonymous": false,
|
|
97
119
|
"inputs": [
|
|
98
120
|
{
|
|
99
|
-
"indexed":
|
|
100
|
-
"internalType": "
|
|
101
|
-
"name": "
|
|
102
|
-
"type": "
|
|
121
|
+
"indexed": false,
|
|
122
|
+
"internalType": "uint256",
|
|
123
|
+
"name": "tokensSwapped",
|
|
124
|
+
"type": "uint256"
|
|
103
125
|
},
|
|
104
126
|
{
|
|
105
127
|
"indexed": false,
|
|
106
128
|
"internalType": "uint256",
|
|
107
|
-
"name": "
|
|
129
|
+
"name": "ethReceived",
|
|
108
130
|
"type": "uint256"
|
|
109
131
|
},
|
|
110
132
|
{
|
|
111
133
|
"indexed": false,
|
|
112
134
|
"internalType": "uint256",
|
|
113
|
-
"name": "
|
|
135
|
+
"name": "tokensIntoLiquidity",
|
|
114
136
|
"type": "uint256"
|
|
115
137
|
}
|
|
116
138
|
],
|
|
117
|
-
"name": "
|
|
139
|
+
"name": "SwapAndAbsorb",
|
|
118
140
|
"type": "event"
|
|
119
141
|
},
|
|
120
142
|
{
|
|
121
143
|
"anonymous": false,
|
|
122
|
-
"inputs": [
|
|
123
|
-
|
|
144
|
+
"inputs": [
|
|
145
|
+
{
|
|
146
|
+
"indexed": false,
|
|
147
|
+
"internalType": "bool",
|
|
148
|
+
"name": "enabled",
|
|
149
|
+
"type": "bool"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"name": "SwapAndAbsorbEnabledUpdated",
|
|
124
153
|
"type": "event"
|
|
125
154
|
},
|
|
126
155
|
{
|
|
@@ -150,12 +179,38 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
150
179
|
},
|
|
151
180
|
{
|
|
152
181
|
"inputs": [],
|
|
153
|
-
"name": "
|
|
182
|
+
"name": "_balanceOfLpTokens",
|
|
154
183
|
"outputs": [
|
|
155
184
|
{
|
|
156
|
-
"internalType": "
|
|
185
|
+
"internalType": "uint256",
|
|
157
186
|
"name": "",
|
|
158
|
-
"type": "
|
|
187
|
+
"type": "uint256"
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"stateMutability": "view",
|
|
191
|
+
"type": "function"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"inputs": [],
|
|
195
|
+
"name": "_burnPool",
|
|
196
|
+
"outputs": [
|
|
197
|
+
{
|
|
198
|
+
"internalType": "address",
|
|
199
|
+
"name": "",
|
|
200
|
+
"type": "address"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"stateMutability": "view",
|
|
204
|
+
"type": "function"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"inputs": [],
|
|
208
|
+
"name": "_totalBurnedLpTokens",
|
|
209
|
+
"outputs": [
|
|
210
|
+
{
|
|
211
|
+
"internalType": "uint256",
|
|
212
|
+
"name": "",
|
|
213
|
+
"type": "uint256"
|
|
159
214
|
}
|
|
160
215
|
],
|
|
161
216
|
"stateMutability": "view",
|
|
@@ -163,12 +218,49 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
163
218
|
},
|
|
164
219
|
{
|
|
165
220
|
"inputs": [],
|
|
166
|
-
"name": "
|
|
221
|
+
"name": "_totalBurnedTokens",
|
|
222
|
+
"outputs": [
|
|
223
|
+
{
|
|
224
|
+
"internalType": "uint256",
|
|
225
|
+
"name": "",
|
|
226
|
+
"type": "uint256"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"stateMutability": "view",
|
|
230
|
+
"type": "function"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"inputs": [
|
|
234
|
+
{
|
|
235
|
+
"internalType": "uint256",
|
|
236
|
+
"name": "tAmount",
|
|
237
|
+
"type": "uint256"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"name": "allocate",
|
|
241
|
+
"outputs": [],
|
|
242
|
+
"stateMutability": "nonpayable",
|
|
243
|
+
"type": "function"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"inputs": [
|
|
247
|
+
{
|
|
248
|
+
"internalType": "uint256",
|
|
249
|
+
"name": "tAmount",
|
|
250
|
+
"type": "uint256"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"internalType": "bool",
|
|
254
|
+
"name": "deductTransferFee",
|
|
255
|
+
"type": "bool"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"name": "allocationFromToken",
|
|
167
259
|
"outputs": [
|
|
168
260
|
{
|
|
169
|
-
"internalType": "
|
|
261
|
+
"internalType": "uint256",
|
|
170
262
|
"name": "",
|
|
171
|
-
"type": "
|
|
263
|
+
"type": "uint256"
|
|
172
264
|
}
|
|
173
265
|
],
|
|
174
266
|
"stateMutability": "view",
|
|
@@ -244,30 +336,22 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
244
336
|
{
|
|
245
337
|
"inputs": [
|
|
246
338
|
{
|
|
247
|
-
"internalType": "
|
|
248
|
-
"name": "
|
|
249
|
-
"type": "
|
|
250
|
-
}
|
|
251
|
-
],
|
|
252
|
-
"name": "burn",
|
|
253
|
-
"outputs": [],
|
|
254
|
-
"stateMutability": "nonpayable",
|
|
255
|
-
"type": "function"
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
"inputs": [
|
|
339
|
+
"internalType": "address",
|
|
340
|
+
"name": "_token",
|
|
341
|
+
"type": "address"
|
|
342
|
+
},
|
|
259
343
|
{
|
|
260
344
|
"internalType": "address",
|
|
261
|
-
"name": "
|
|
345
|
+
"name": "_to",
|
|
262
346
|
"type": "address"
|
|
263
347
|
},
|
|
264
348
|
{
|
|
265
349
|
"internalType": "uint256",
|
|
266
|
-
"name": "
|
|
350
|
+
"name": "_amount",
|
|
267
351
|
"type": "uint256"
|
|
268
352
|
}
|
|
269
353
|
],
|
|
270
|
-
"name": "
|
|
354
|
+
"name": "burnLiq",
|
|
271
355
|
"outputs": [],
|
|
272
356
|
"stateMutability": "nonpayable",
|
|
273
357
|
"type": "function"
|
|
@@ -275,50 +359,43 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
275
359
|
{
|
|
276
360
|
"inputs": [
|
|
277
361
|
{
|
|
278
|
-
"internalType": "
|
|
279
|
-
"name": "
|
|
280
|
-
"type": "
|
|
362
|
+
"internalType": "uint256",
|
|
363
|
+
"name": "_amount",
|
|
364
|
+
"type": "uint256"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"internalType": "uint8",
|
|
368
|
+
"name": "_feeDecimals",
|
|
369
|
+
"type": "uint8"
|
|
281
370
|
},
|
|
282
371
|
{
|
|
283
372
|
"internalType": "uint32",
|
|
284
|
-
"name": "
|
|
373
|
+
"name": "_feePercentage",
|
|
285
374
|
"type": "uint32"
|
|
286
375
|
}
|
|
287
376
|
],
|
|
288
|
-
"name": "
|
|
377
|
+
"name": "calcTokenFee",
|
|
289
378
|
"outputs": [
|
|
290
379
|
{
|
|
291
|
-
"
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
"name": "fromBlock",
|
|
295
|
-
"type": "uint32"
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"internalType": "uint224",
|
|
299
|
-
"name": "votes",
|
|
300
|
-
"type": "uint224"
|
|
301
|
-
}
|
|
302
|
-
],
|
|
303
|
-
"internalType": "struct ERC20Votes.Checkpoint",
|
|
304
|
-
"name": "",
|
|
305
|
-
"type": "tuple"
|
|
380
|
+
"internalType": "uint256",
|
|
381
|
+
"name": "locked",
|
|
382
|
+
"type": "uint256"
|
|
306
383
|
}
|
|
307
384
|
],
|
|
308
|
-
"stateMutability": "
|
|
385
|
+
"stateMutability": "pure",
|
|
309
386
|
"type": "function"
|
|
310
387
|
},
|
|
311
388
|
{
|
|
312
|
-
"inputs": [
|
|
313
|
-
"name": "clock",
|
|
314
|
-
"outputs": [
|
|
389
|
+
"inputs": [
|
|
315
390
|
{
|
|
316
|
-
"internalType": "
|
|
317
|
-
"name": "",
|
|
318
|
-
"type": "
|
|
391
|
+
"internalType": "uint256",
|
|
392
|
+
"name": "n",
|
|
393
|
+
"type": "uint256"
|
|
319
394
|
}
|
|
320
395
|
],
|
|
321
|
-
"
|
|
396
|
+
"name": "changeFeeDivider",
|
|
397
|
+
"outputs": [],
|
|
398
|
+
"stateMutability": "nonpayable",
|
|
322
399
|
"type": "function"
|
|
323
400
|
},
|
|
324
401
|
{
|
|
@@ -362,67 +439,36 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
362
439
|
"inputs": [
|
|
363
440
|
{
|
|
364
441
|
"internalType": "address",
|
|
365
|
-
"name": "
|
|
442
|
+
"name": "account",
|
|
366
443
|
"type": "address"
|
|
367
444
|
}
|
|
368
445
|
],
|
|
369
|
-
"name": "
|
|
446
|
+
"name": "excludeAccount",
|
|
370
447
|
"outputs": [],
|
|
371
448
|
"stateMutability": "nonpayable",
|
|
372
449
|
"type": "function"
|
|
373
450
|
},
|
|
374
451
|
{
|
|
375
|
-
"inputs": [
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
"name": "delegatee",
|
|
379
|
-
"type": "address"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
"internalType": "uint256",
|
|
383
|
-
"name": "nonce",
|
|
384
|
-
"type": "uint256"
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
"internalType": "uint256",
|
|
388
|
-
"name": "expiry",
|
|
389
|
-
"type": "uint256"
|
|
390
|
-
},
|
|
452
|
+
"inputs": [],
|
|
453
|
+
"name": "feeDecimals",
|
|
454
|
+
"outputs": [
|
|
391
455
|
{
|
|
392
456
|
"internalType": "uint8",
|
|
393
|
-
"name": "
|
|
457
|
+
"name": "",
|
|
394
458
|
"type": "uint8"
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
"internalType": "bytes32",
|
|
398
|
-
"name": "r",
|
|
399
|
-
"type": "bytes32"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"internalType": "bytes32",
|
|
403
|
-
"name": "s",
|
|
404
|
-
"type": "bytes32"
|
|
405
459
|
}
|
|
406
460
|
],
|
|
407
|
-
"
|
|
408
|
-
"outputs": [],
|
|
409
|
-
"stateMutability": "nonpayable",
|
|
461
|
+
"stateMutability": "view",
|
|
410
462
|
"type": "function"
|
|
411
463
|
},
|
|
412
464
|
{
|
|
413
|
-
"inputs": [
|
|
414
|
-
|
|
415
|
-
"internalType": "address",
|
|
416
|
-
"name": "account",
|
|
417
|
-
"type": "address"
|
|
418
|
-
}
|
|
419
|
-
],
|
|
420
|
-
"name": "delegates",
|
|
465
|
+
"inputs": [],
|
|
466
|
+
"name": "feePercentage",
|
|
421
467
|
"outputs": [
|
|
422
468
|
{
|
|
423
|
-
"internalType": "
|
|
469
|
+
"internalType": "uint32",
|
|
424
470
|
"name": "",
|
|
425
|
-
"type": "
|
|
471
|
+
"type": "uint32"
|
|
426
472
|
}
|
|
427
473
|
],
|
|
428
474
|
"stateMutability": "view",
|
|
@@ -430,42 +476,12 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
430
476
|
},
|
|
431
477
|
{
|
|
432
478
|
"inputs": [],
|
|
433
|
-
"name": "
|
|
479
|
+
"name": "inSwapAndAbsorb",
|
|
434
480
|
"outputs": [
|
|
435
481
|
{
|
|
436
|
-
"internalType": "
|
|
437
|
-
"name": "
|
|
438
|
-
"type": "
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
"internalType": "string",
|
|
442
|
-
"name": "name",
|
|
443
|
-
"type": "string"
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"internalType": "string",
|
|
447
|
-
"name": "version",
|
|
448
|
-
"type": "string"
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
"internalType": "uint256",
|
|
452
|
-
"name": "chainId",
|
|
453
|
-
"type": "uint256"
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
"internalType": "address",
|
|
457
|
-
"name": "verifyingContract",
|
|
458
|
-
"type": "address"
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"internalType": "bytes32",
|
|
462
|
-
"name": "salt",
|
|
463
|
-
"type": "bytes32"
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
"internalType": "uint256[]",
|
|
467
|
-
"name": "extensions",
|
|
468
|
-
"type": "uint256[]"
|
|
482
|
+
"internalType": "bool",
|
|
483
|
+
"name": "",
|
|
484
|
+
"type": "bool"
|
|
469
485
|
}
|
|
470
486
|
],
|
|
471
487
|
"stateMutability": "view",
|
|
@@ -474,55 +490,56 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
474
490
|
{
|
|
475
491
|
"inputs": [
|
|
476
492
|
{
|
|
477
|
-
"internalType": "
|
|
478
|
-
"name": "
|
|
479
|
-
"type": "
|
|
480
|
-
}
|
|
481
|
-
],
|
|
482
|
-
"name": "getPastTotalSupply",
|
|
483
|
-
"outputs": [
|
|
484
|
-
{
|
|
485
|
-
"internalType": "uint256",
|
|
486
|
-
"name": "",
|
|
487
|
-
"type": "uint256"
|
|
493
|
+
"internalType": "address",
|
|
494
|
+
"name": "account",
|
|
495
|
+
"type": "address"
|
|
488
496
|
}
|
|
489
497
|
],
|
|
490
|
-
"
|
|
498
|
+
"name": "includeAccount",
|
|
499
|
+
"outputs": [],
|
|
500
|
+
"stateMutability": "nonpayable",
|
|
491
501
|
"type": "function"
|
|
492
502
|
},
|
|
493
503
|
{
|
|
494
504
|
"inputs": [
|
|
495
505
|
{
|
|
496
506
|
"internalType": "address",
|
|
497
|
-
"name": "
|
|
507
|
+
"name": "spender",
|
|
498
508
|
"type": "address"
|
|
499
509
|
},
|
|
500
510
|
{
|
|
501
511
|
"internalType": "uint256",
|
|
502
|
-
"name": "
|
|
512
|
+
"name": "addedValue",
|
|
503
513
|
"type": "uint256"
|
|
504
514
|
}
|
|
505
515
|
],
|
|
506
|
-
"name": "
|
|
516
|
+
"name": "increaseAllowance",
|
|
507
517
|
"outputs": [
|
|
508
518
|
{
|
|
509
|
-
"internalType": "
|
|
519
|
+
"internalType": "bool",
|
|
510
520
|
"name": "",
|
|
511
|
-
"type": "
|
|
521
|
+
"type": "bool"
|
|
512
522
|
}
|
|
513
523
|
],
|
|
514
|
-
"stateMutability": "
|
|
524
|
+
"stateMutability": "nonpayable",
|
|
515
525
|
"type": "function"
|
|
516
526
|
},
|
|
517
527
|
{
|
|
518
|
-
"inputs": [
|
|
528
|
+
"inputs": [],
|
|
529
|
+
"name": "minTokensBeforeAddToLP",
|
|
530
|
+
"outputs": [
|
|
519
531
|
{
|
|
520
|
-
"internalType": "
|
|
521
|
-
"name": "
|
|
522
|
-
"type": "
|
|
532
|
+
"internalType": "uint256",
|
|
533
|
+
"name": "",
|
|
534
|
+
"type": "uint256"
|
|
523
535
|
}
|
|
524
536
|
],
|
|
525
|
-
"
|
|
537
|
+
"stateMutability": "view",
|
|
538
|
+
"type": "function"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"inputs": [],
|
|
542
|
+
"name": "minimumSupply",
|
|
526
543
|
"outputs": [
|
|
527
544
|
{
|
|
528
545
|
"internalType": "uint256",
|
|
@@ -534,19 +551,54 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
534
551
|
"type": "function"
|
|
535
552
|
},
|
|
536
553
|
{
|
|
537
|
-
"inputs": [
|
|
554
|
+
"inputs": [],
|
|
555
|
+
"name": "name",
|
|
556
|
+
"outputs": [
|
|
557
|
+
{
|
|
558
|
+
"internalType": "string",
|
|
559
|
+
"name": "",
|
|
560
|
+
"type": "string"
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
"stateMutability": "view",
|
|
564
|
+
"type": "function"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"inputs": [],
|
|
568
|
+
"name": "owner",
|
|
569
|
+
"outputs": [
|
|
538
570
|
{
|
|
539
571
|
"internalType": "address",
|
|
540
|
-
"name": "
|
|
572
|
+
"name": "",
|
|
541
573
|
"type": "address"
|
|
542
|
-
}
|
|
574
|
+
}
|
|
575
|
+
],
|
|
576
|
+
"stateMutability": "view",
|
|
577
|
+
"type": "function"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"inputs": [],
|
|
581
|
+
"name": "presale",
|
|
582
|
+
"outputs": [
|
|
543
583
|
{
|
|
544
|
-
"internalType": "
|
|
545
|
-
"name": "
|
|
546
|
-
"type": "
|
|
584
|
+
"internalType": "address",
|
|
585
|
+
"name": "",
|
|
586
|
+
"type": "address"
|
|
547
587
|
}
|
|
548
588
|
],
|
|
549
|
-
"
|
|
589
|
+
"stateMutability": "view",
|
|
590
|
+
"type": "function"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"inputs": [],
|
|
594
|
+
"name": "renounceOwnership",
|
|
595
|
+
"outputs": [],
|
|
596
|
+
"stateMutability": "nonpayable",
|
|
597
|
+
"type": "function"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"inputs": [],
|
|
601
|
+
"name": "swapAndAbsorbEnabled",
|
|
550
602
|
"outputs": [
|
|
551
603
|
{
|
|
552
604
|
"internalType": "bool",
|
|
@@ -554,12 +606,12 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
554
606
|
"type": "bool"
|
|
555
607
|
}
|
|
556
608
|
],
|
|
557
|
-
"stateMutability": "
|
|
609
|
+
"stateMutability": "view",
|
|
558
610
|
"type": "function"
|
|
559
611
|
},
|
|
560
612
|
{
|
|
561
613
|
"inputs": [],
|
|
562
|
-
"name": "
|
|
614
|
+
"name": "symbol",
|
|
563
615
|
"outputs": [
|
|
564
616
|
{
|
|
565
617
|
"internalType": "string",
|
|
@@ -573,12 +625,25 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
573
625
|
{
|
|
574
626
|
"inputs": [
|
|
575
627
|
{
|
|
576
|
-
"internalType": "
|
|
577
|
-
"name": "
|
|
578
|
-
"type": "
|
|
628
|
+
"internalType": "uint256",
|
|
629
|
+
"name": "aAmount",
|
|
630
|
+
"type": "uint256"
|
|
579
631
|
}
|
|
580
632
|
],
|
|
581
|
-
"name": "
|
|
633
|
+
"name": "tokenFromAllocation",
|
|
634
|
+
"outputs": [
|
|
635
|
+
{
|
|
636
|
+
"internalType": "uint256",
|
|
637
|
+
"name": "",
|
|
638
|
+
"type": "uint256"
|
|
639
|
+
}
|
|
640
|
+
],
|
|
641
|
+
"stateMutability": "view",
|
|
642
|
+
"type": "function"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"inputs": [],
|
|
646
|
+
"name": "totalSupply",
|
|
582
647
|
"outputs": [
|
|
583
648
|
{
|
|
584
649
|
"internalType": "uint256",
|
|
@@ -593,72 +658,83 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
593
658
|
"inputs": [
|
|
594
659
|
{
|
|
595
660
|
"internalType": "address",
|
|
596
|
-
"name": "
|
|
661
|
+
"name": "recipient",
|
|
597
662
|
"type": "address"
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"internalType": "uint256",
|
|
666
|
+
"name": "amount",
|
|
667
|
+
"type": "uint256"
|
|
598
668
|
}
|
|
599
669
|
],
|
|
600
|
-
"name": "
|
|
670
|
+
"name": "transfer",
|
|
601
671
|
"outputs": [
|
|
602
672
|
{
|
|
603
|
-
"internalType": "
|
|
673
|
+
"internalType": "bool",
|
|
604
674
|
"name": "",
|
|
605
|
-
"type": "
|
|
675
|
+
"type": "bool"
|
|
606
676
|
}
|
|
607
677
|
],
|
|
608
|
-
"stateMutability": "
|
|
678
|
+
"stateMutability": "nonpayable",
|
|
609
679
|
"type": "function"
|
|
610
680
|
},
|
|
611
681
|
{
|
|
612
682
|
"inputs": [
|
|
613
683
|
{
|
|
614
684
|
"internalType": "address",
|
|
615
|
-
"name": "
|
|
685
|
+
"name": "sender",
|
|
616
686
|
"type": "address"
|
|
617
687
|
},
|
|
618
688
|
{
|
|
619
689
|
"internalType": "address",
|
|
620
|
-
"name": "
|
|
690
|
+
"name": "recipient",
|
|
621
691
|
"type": "address"
|
|
622
692
|
},
|
|
623
693
|
{
|
|
624
694
|
"internalType": "uint256",
|
|
625
|
-
"name": "
|
|
626
|
-
"type": "uint256"
|
|
627
|
-
},
|
|
628
|
-
{
|
|
629
|
-
"internalType": "uint256",
|
|
630
|
-
"name": "deadline",
|
|
695
|
+
"name": "amount",
|
|
631
696
|
"type": "uint256"
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
"type": "uint8"
|
|
637
|
-
},
|
|
697
|
+
}
|
|
698
|
+
],
|
|
699
|
+
"name": "transferFrom",
|
|
700
|
+
"outputs": [
|
|
638
701
|
{
|
|
639
|
-
"internalType": "
|
|
640
|
-
"name": "
|
|
641
|
-
"type": "
|
|
642
|
-
}
|
|
702
|
+
"internalType": "bool",
|
|
703
|
+
"name": "",
|
|
704
|
+
"type": "bool"
|
|
705
|
+
}
|
|
706
|
+
],
|
|
707
|
+
"stateMutability": "nonpayable",
|
|
708
|
+
"type": "function"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"inputs": [
|
|
643
712
|
{
|
|
644
|
-
"internalType": "
|
|
645
|
-
"name": "
|
|
646
|
-
"type": "
|
|
713
|
+
"internalType": "address",
|
|
714
|
+
"name": "newOwner",
|
|
715
|
+
"type": "address"
|
|
647
716
|
}
|
|
648
717
|
],
|
|
649
|
-
"name": "
|
|
718
|
+
"name": "transferOwnership",
|
|
650
719
|
"outputs": [],
|
|
651
720
|
"stateMutability": "nonpayable",
|
|
652
721
|
"type": "function"
|
|
653
722
|
},
|
|
654
723
|
{
|
|
655
724
|
"inputs": [],
|
|
656
|
-
"name": "
|
|
725
|
+
"name": "unPauseTransferForever",
|
|
726
|
+
"outputs": [],
|
|
727
|
+
"stateMutability": "nonpayable",
|
|
728
|
+
"type": "function"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"inputs": [],
|
|
732
|
+
"name": "uniswapV2Pair",
|
|
657
733
|
"outputs": [
|
|
658
734
|
{
|
|
659
|
-
"internalType": "
|
|
735
|
+
"internalType": "address",
|
|
660
736
|
"name": "",
|
|
661
|
-
"type": "
|
|
737
|
+
"type": "address"
|
|
662
738
|
}
|
|
663
739
|
],
|
|
664
740
|
"stateMutability": "view",
|
|
@@ -666,12 +742,12 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
666
742
|
},
|
|
667
743
|
{
|
|
668
744
|
"inputs": [],
|
|
669
|
-
"name": "
|
|
745
|
+
"name": "uniswapV2Router",
|
|
670
746
|
"outputs": [
|
|
671
747
|
{
|
|
672
|
-
"internalType": "
|
|
748
|
+
"internalType": "contract IUniswapV2Router02",
|
|
673
749
|
"name": "",
|
|
674
|
-
"type": "
|
|
750
|
+
"type": "address"
|
|
675
751
|
}
|
|
676
752
|
],
|
|
677
753
|
"stateMutability": "view",
|
|
@@ -680,72 +756,95 @@ export const SwissBorgToken_jsonAbi = [
|
|
|
680
756
|
{
|
|
681
757
|
"inputs": [
|
|
682
758
|
{
|
|
683
|
-
"internalType": "
|
|
684
|
-
"name": "
|
|
685
|
-
"type": "
|
|
759
|
+
"internalType": "uint8",
|
|
760
|
+
"name": "_feeDecimals",
|
|
761
|
+
"type": "uint8"
|
|
686
762
|
},
|
|
687
763
|
{
|
|
688
|
-
"internalType": "
|
|
689
|
-
"name": "
|
|
690
|
-
"type": "
|
|
764
|
+
"internalType": "uint32",
|
|
765
|
+
"name": "_feePercentage",
|
|
766
|
+
"type": "uint32"
|
|
691
767
|
}
|
|
692
768
|
],
|
|
693
|
-
"name": "
|
|
694
|
-
"outputs": [
|
|
769
|
+
"name": "updateFee",
|
|
770
|
+
"outputs": [],
|
|
771
|
+
"stateMutability": "nonpayable",
|
|
772
|
+
"type": "function"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"inputs": [
|
|
776
|
+
{
|
|
777
|
+
"internalType": "uint8",
|
|
778
|
+
"name": "absFeeDecimals",
|
|
779
|
+
"type": "uint8"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"internalType": "uint32",
|
|
783
|
+
"name": "absFeePercentage",
|
|
784
|
+
"type": "uint32"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"internalType": "uint256",
|
|
788
|
+
"name": "absFeeDivider",
|
|
789
|
+
"type": "uint256"
|
|
790
|
+
},
|
|
695
791
|
{
|
|
696
792
|
"internalType": "bool",
|
|
697
|
-
"name": "",
|
|
793
|
+
"name": "_enabled",
|
|
698
794
|
"type": "bool"
|
|
699
795
|
}
|
|
700
796
|
],
|
|
797
|
+
"name": "updateFeesAndSwapsEnabled",
|
|
798
|
+
"outputs": [],
|
|
701
799
|
"stateMutability": "nonpayable",
|
|
702
800
|
"type": "function"
|
|
703
801
|
},
|
|
704
802
|
{
|
|
705
803
|
"inputs": [
|
|
706
|
-
{
|
|
707
|
-
"internalType": "address",
|
|
708
|
-
"name": "from",
|
|
709
|
-
"type": "address"
|
|
710
|
-
},
|
|
711
|
-
{
|
|
712
|
-
"internalType": "address",
|
|
713
|
-
"name": "to",
|
|
714
|
-
"type": "address"
|
|
715
|
-
},
|
|
716
804
|
{
|
|
717
805
|
"internalType": "uint256",
|
|
718
|
-
"name": "
|
|
806
|
+
"name": "_minTokensBeforeAddToLP",
|
|
719
807
|
"type": "uint256"
|
|
720
808
|
}
|
|
721
809
|
],
|
|
722
|
-
"name": "
|
|
723
|
-
"outputs": [
|
|
810
|
+
"name": "updateMinTokensBeforeAddToLP",
|
|
811
|
+
"outputs": [],
|
|
812
|
+
"stateMutability": "nonpayable",
|
|
813
|
+
"type": "function"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"inputs": [
|
|
724
817
|
{
|
|
725
818
|
"internalType": "bool",
|
|
726
|
-
"name": "",
|
|
819
|
+
"name": "_enabled",
|
|
727
820
|
"type": "bool"
|
|
728
821
|
}
|
|
729
822
|
],
|
|
823
|
+
"name": "updateSwapAndAbsorbEnabled",
|
|
824
|
+
"outputs": [],
|
|
730
825
|
"stateMutability": "nonpayable",
|
|
731
826
|
"type": "function"
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"stateMutability": "payable",
|
|
830
|
+
"type": "receive"
|
|
732
831
|
}
|
|
733
832
|
] as const satisfies Abi;
|
|
734
833
|
|
|
735
834
|
/**
|
|
736
|
-
* Type-safe ABI for
|
|
835
|
+
* Type-safe ABI for BORG_json
|
|
737
836
|
*/
|
|
738
|
-
export type
|
|
837
|
+
export type BORG_jsonAbi = typeof BORG_jsonAbi;
|
|
739
838
|
|
|
740
839
|
/**
|
|
741
|
-
* Contract instance type for
|
|
840
|
+
* Contract instance type for BORG_json
|
|
742
841
|
*/
|
|
743
842
|
// Use any for contract type to avoid complex viem type issues
|
|
744
843
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
745
|
-
export type
|
|
844
|
+
export type BORG_jsonContract = any;
|
|
746
845
|
|
|
747
846
|
/**
|
|
748
|
-
*
|
|
847
|
+
* BORG_json Contract Class
|
|
749
848
|
*
|
|
750
849
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
751
850
|
*
|
|
@@ -753,12 +852,12 @@ export type SwissBorgToken_jsonContract = any;
|
|
|
753
852
|
* ```typescript
|
|
754
853
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
755
854
|
* import { mainnet } from 'viem/chains';
|
|
756
|
-
* import {
|
|
855
|
+
* import { BORG_json } from 'BORG_json';
|
|
757
856
|
*
|
|
758
857
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
759
858
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
760
859
|
*
|
|
761
|
-
* const contract = new
|
|
860
|
+
* const contract = new BORG_json('0x...', { publicClient, walletClient });
|
|
762
861
|
*
|
|
763
862
|
* // Read functions
|
|
764
863
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -776,8 +875,8 @@ export type SwissBorgToken_jsonContract = any;
|
|
|
776
875
|
* });
|
|
777
876
|
* ```
|
|
778
877
|
*/
|
|
779
|
-
export class
|
|
780
|
-
private contract:
|
|
878
|
+
export class BORG_json {
|
|
879
|
+
private contract: BORG_jsonContract;
|
|
781
880
|
private contractAddress: Address;
|
|
782
881
|
private publicClient: PublicClient;
|
|
783
882
|
|
|
@@ -792,7 +891,7 @@ export class SwissBorgToken_json {
|
|
|
792
891
|
this.publicClient = clients.publicClient;
|
|
793
892
|
this.contract = getContract({
|
|
794
893
|
address,
|
|
795
|
-
abi:
|
|
894
|
+
abi: BORG_jsonAbi,
|
|
796
895
|
client: {
|
|
797
896
|
public: clients.publicClient,
|
|
798
897
|
wallet: clients.walletClient,
|
|
@@ -810,24 +909,48 @@ export class SwissBorgToken_json {
|
|
|
810
909
|
/**
|
|
811
910
|
* Get the underlying viem contract instance
|
|
812
911
|
*/
|
|
813
|
-
getContract():
|
|
912
|
+
getContract(): BORG_jsonContract {
|
|
814
913
|
return this.contract;
|
|
815
914
|
}
|
|
816
915
|
|
|
817
916
|
/**
|
|
818
|
-
*
|
|
917
|
+
* _balanceOfLpTokens
|
|
918
|
+
* view
|
|
919
|
+
*/
|
|
920
|
+
async _balanceOfLpTokens(): Promise<bigint> {
|
|
921
|
+
return this.contract.read._balanceOfLpTokens() as Promise<bigint>;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* _burnPool
|
|
819
926
|
* view
|
|
820
927
|
*/
|
|
821
|
-
async
|
|
822
|
-
return this.contract.read.
|
|
928
|
+
async _burnPool(): Promise<`0x${string}`> {
|
|
929
|
+
return this.contract.read._burnPool() as Promise<`0x${string}`>;
|
|
823
930
|
}
|
|
824
931
|
|
|
825
932
|
/**
|
|
826
|
-
*
|
|
933
|
+
* _totalBurnedLpTokens
|
|
827
934
|
* view
|
|
828
935
|
*/
|
|
829
|
-
async
|
|
830
|
-
return this.contract.read.
|
|
936
|
+
async _totalBurnedLpTokens(): Promise<bigint> {
|
|
937
|
+
return this.contract.read._totalBurnedLpTokens() as Promise<bigint>;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* _totalBurnedTokens
|
|
942
|
+
* view
|
|
943
|
+
*/
|
|
944
|
+
async _totalBurnedTokens(): Promise<bigint> {
|
|
945
|
+
return this.contract.read._totalBurnedTokens() as Promise<bigint>;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* allocationFromToken
|
|
950
|
+
* view
|
|
951
|
+
*/
|
|
952
|
+
async allocationFromToken(tAmount: bigint, deductTransferFee: boolean): Promise<bigint> {
|
|
953
|
+
return this.contract.read.allocationFromToken([tAmount, deductTransferFee] as const) as Promise<bigint>;
|
|
831
954
|
}
|
|
832
955
|
|
|
833
956
|
/**
|
|
@@ -847,115 +970,300 @@ export class SwissBorgToken_json {
|
|
|
847
970
|
}
|
|
848
971
|
|
|
849
972
|
/**
|
|
850
|
-
*
|
|
973
|
+
* calcTokenFee
|
|
974
|
+
* pure
|
|
975
|
+
*/
|
|
976
|
+
async calcTokenFee(_amount: bigint, _feeDecimals: bigint, _feePercentage: bigint): Promise<bigint> {
|
|
977
|
+
return this.contract.read.calcTokenFee([_amount, _feeDecimals, _feePercentage] as const) as Promise<bigint>;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* decimals
|
|
851
982
|
* view
|
|
852
983
|
*/
|
|
853
|
-
async
|
|
854
|
-
return this.contract.read.
|
|
984
|
+
async decimals(): Promise<bigint> {
|
|
985
|
+
return this.contract.read.decimals() as Promise<bigint>;
|
|
855
986
|
}
|
|
856
987
|
|
|
857
988
|
/**
|
|
858
|
-
*
|
|
989
|
+
* feeDecimals
|
|
859
990
|
* view
|
|
860
991
|
*/
|
|
861
|
-
async
|
|
862
|
-
return this.contract.read.
|
|
992
|
+
async feeDecimals(): Promise<bigint> {
|
|
993
|
+
return this.contract.read.feeDecimals() as Promise<bigint>;
|
|
863
994
|
}
|
|
864
995
|
|
|
865
996
|
/**
|
|
866
|
-
*
|
|
997
|
+
* feePercentage
|
|
867
998
|
* view
|
|
868
999
|
*/
|
|
869
|
-
async
|
|
870
|
-
return this.contract.read.
|
|
1000
|
+
async feePercentage(): Promise<bigint> {
|
|
1001
|
+
return this.contract.read.feePercentage() as Promise<bigint>;
|
|
871
1002
|
}
|
|
872
1003
|
|
|
873
1004
|
/**
|
|
874
|
-
*
|
|
1005
|
+
* inSwapAndAbsorb
|
|
875
1006
|
* view
|
|
876
1007
|
*/
|
|
877
|
-
async
|
|
878
|
-
return this.contract.read.
|
|
1008
|
+
async inSwapAndAbsorb(): Promise<boolean> {
|
|
1009
|
+
return this.contract.read.inSwapAndAbsorb() as Promise<boolean>;
|
|
879
1010
|
}
|
|
880
1011
|
|
|
881
1012
|
/**
|
|
882
|
-
*
|
|
1013
|
+
* minTokensBeforeAddToLP
|
|
883
1014
|
* view
|
|
884
1015
|
*/
|
|
885
|
-
async
|
|
886
|
-
return this.contract.read.
|
|
1016
|
+
async minTokensBeforeAddToLP(): Promise<bigint> {
|
|
1017
|
+
return this.contract.read.minTokensBeforeAddToLP() as Promise<bigint>;
|
|
887
1018
|
}
|
|
888
1019
|
|
|
889
1020
|
/**
|
|
890
|
-
*
|
|
1021
|
+
* minimumSupply
|
|
891
1022
|
* view
|
|
892
1023
|
*/
|
|
893
|
-
async
|
|
894
|
-
return this.contract.read.
|
|
1024
|
+
async minimumSupply(): Promise<bigint> {
|
|
1025
|
+
return this.contract.read.minimumSupply() as Promise<bigint>;
|
|
895
1026
|
}
|
|
896
1027
|
|
|
897
1028
|
/**
|
|
898
|
-
*
|
|
1029
|
+
* name
|
|
899
1030
|
* view
|
|
900
1031
|
*/
|
|
901
|
-
async
|
|
902
|
-
return this.contract.read.
|
|
1032
|
+
async name(): Promise<string> {
|
|
1033
|
+
return this.contract.read.name() as Promise<string>;
|
|
903
1034
|
}
|
|
904
1035
|
|
|
905
1036
|
/**
|
|
906
|
-
*
|
|
1037
|
+
* owner
|
|
907
1038
|
* view
|
|
908
1039
|
*/
|
|
909
|
-
async
|
|
910
|
-
return this.contract.read.
|
|
1040
|
+
async owner(): Promise<`0x${string}`> {
|
|
1041
|
+
return this.contract.read.owner() as Promise<`0x${string}`>;
|
|
911
1042
|
}
|
|
912
1043
|
|
|
913
1044
|
/**
|
|
914
|
-
*
|
|
1045
|
+
* presale
|
|
915
1046
|
* view
|
|
916
1047
|
*/
|
|
917
|
-
async
|
|
918
|
-
return this.contract.read.
|
|
1048
|
+
async presale(): Promise<`0x${string}`> {
|
|
1049
|
+
return this.contract.read.presale() as Promise<`0x${string}`>;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* swapAndAbsorbEnabled
|
|
1054
|
+
* view
|
|
1055
|
+
*/
|
|
1056
|
+
async swapAndAbsorbEnabled(): Promise<boolean> {
|
|
1057
|
+
return this.contract.read.swapAndAbsorbEnabled() as Promise<boolean>;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* symbol
|
|
1062
|
+
* view
|
|
1063
|
+
*/
|
|
1064
|
+
async symbol(): Promise<string> {
|
|
1065
|
+
return this.contract.read.symbol() as Promise<string>;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* tokenFromAllocation
|
|
1070
|
+
* view
|
|
1071
|
+
*/
|
|
1072
|
+
async tokenFromAllocation(aAmount: bigint): Promise<bigint> {
|
|
1073
|
+
return this.contract.read.tokenFromAllocation([aAmount] as const) as Promise<bigint>;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* totalSupply
|
|
1078
|
+
* view
|
|
1079
|
+
*/
|
|
1080
|
+
async totalSupply(): Promise<bigint> {
|
|
1081
|
+
return this.contract.read.totalSupply() as Promise<bigint>;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* uniswapV2Pair
|
|
1086
|
+
* view
|
|
1087
|
+
*/
|
|
1088
|
+
async uniswapV2Pair(): Promise<`0x${string}`> {
|
|
1089
|
+
return this.contract.read.uniswapV2Pair() as Promise<`0x${string}`>;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* uniswapV2Router
|
|
1094
|
+
* view
|
|
1095
|
+
*/
|
|
1096
|
+
async uniswapV2Router(): Promise<`0x${string}`> {
|
|
1097
|
+
return this.contract.read.uniswapV2Router() as Promise<`0x${string}`>;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* allocate
|
|
1102
|
+
* nonpayable
|
|
1103
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1104
|
+
*/
|
|
1105
|
+
async allocate(tAmount: bigint, options?: {
|
|
1106
|
+
accessList?: import('viem').AccessList;
|
|
1107
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1108
|
+
chain?: import('viem').Chain | null;
|
|
1109
|
+
dataSuffix?: `0x${string}`;
|
|
1110
|
+
gas?: bigint;
|
|
1111
|
+
gasPrice?: bigint;
|
|
1112
|
+
maxFeePerGas?: bigint;
|
|
1113
|
+
maxPriorityFeePerGas?: bigint;
|
|
1114
|
+
nonce?: number;
|
|
1115
|
+
value?: bigint;
|
|
1116
|
+
}): Promise<`0x${string}`> {
|
|
1117
|
+
if (!this.contract.write) {
|
|
1118
|
+
throw new Error('Wallet client is required for write operations');
|
|
1119
|
+
}
|
|
1120
|
+
return this.contract.write.allocate([tAmount] as const, options) as Promise<`0x${string}`>;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* approve
|
|
1125
|
+
* nonpayable
|
|
1126
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1127
|
+
*/
|
|
1128
|
+
async approve(spender: `0x${string}`, amount: bigint, options?: {
|
|
1129
|
+
accessList?: import('viem').AccessList;
|
|
1130
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1131
|
+
chain?: import('viem').Chain | null;
|
|
1132
|
+
dataSuffix?: `0x${string}`;
|
|
1133
|
+
gas?: bigint;
|
|
1134
|
+
gasPrice?: bigint;
|
|
1135
|
+
maxFeePerGas?: bigint;
|
|
1136
|
+
maxPriorityFeePerGas?: bigint;
|
|
1137
|
+
nonce?: number;
|
|
1138
|
+
value?: bigint;
|
|
1139
|
+
}): Promise<`0x${string}`> {
|
|
1140
|
+
if (!this.contract.write) {
|
|
1141
|
+
throw new Error('Wallet client is required for write operations');
|
|
1142
|
+
}
|
|
1143
|
+
return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* burnLiq
|
|
1148
|
+
* nonpayable
|
|
1149
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1150
|
+
*/
|
|
1151
|
+
async burnLiq(_token: `0x${string}`, _to: `0x${string}`, _amount: bigint, options?: {
|
|
1152
|
+
accessList?: import('viem').AccessList;
|
|
1153
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1154
|
+
chain?: import('viem').Chain | null;
|
|
1155
|
+
dataSuffix?: `0x${string}`;
|
|
1156
|
+
gas?: bigint;
|
|
1157
|
+
gasPrice?: bigint;
|
|
1158
|
+
maxFeePerGas?: bigint;
|
|
1159
|
+
maxPriorityFeePerGas?: bigint;
|
|
1160
|
+
nonce?: number;
|
|
1161
|
+
value?: bigint;
|
|
1162
|
+
}): Promise<`0x${string}`> {
|
|
1163
|
+
if (!this.contract.write) {
|
|
1164
|
+
throw new Error('Wallet client is required for write operations');
|
|
1165
|
+
}
|
|
1166
|
+
return this.contract.write.burnLiq([_token, _to, _amount] as const, options) as Promise<`0x${string}`>;
|
|
919
1167
|
}
|
|
920
1168
|
|
|
921
1169
|
/**
|
|
922
|
-
*
|
|
923
|
-
*
|
|
1170
|
+
* changeFeeDivider
|
|
1171
|
+
* nonpayable
|
|
1172
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
924
1173
|
*/
|
|
925
|
-
async
|
|
926
|
-
|
|
1174
|
+
async changeFeeDivider(n: bigint, options?: {
|
|
1175
|
+
accessList?: import('viem').AccessList;
|
|
1176
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1177
|
+
chain?: import('viem').Chain | null;
|
|
1178
|
+
dataSuffix?: `0x${string}`;
|
|
1179
|
+
gas?: bigint;
|
|
1180
|
+
gasPrice?: bigint;
|
|
1181
|
+
maxFeePerGas?: bigint;
|
|
1182
|
+
maxPriorityFeePerGas?: bigint;
|
|
1183
|
+
nonce?: number;
|
|
1184
|
+
value?: bigint;
|
|
1185
|
+
}): Promise<`0x${string}`> {
|
|
1186
|
+
if (!this.contract.write) {
|
|
1187
|
+
throw new Error('Wallet client is required for write operations');
|
|
1188
|
+
}
|
|
1189
|
+
return this.contract.write.changeFeeDivider([n] as const, options) as Promise<`0x${string}`>;
|
|
927
1190
|
}
|
|
928
1191
|
|
|
929
1192
|
/**
|
|
930
|
-
*
|
|
931
|
-
*
|
|
1193
|
+
* decreaseAllowance
|
|
1194
|
+
* nonpayable
|
|
1195
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
932
1196
|
*/
|
|
933
|
-
async
|
|
934
|
-
|
|
1197
|
+
async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
|
|
1198
|
+
accessList?: import('viem').AccessList;
|
|
1199
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1200
|
+
chain?: import('viem').Chain | null;
|
|
1201
|
+
dataSuffix?: `0x${string}`;
|
|
1202
|
+
gas?: bigint;
|
|
1203
|
+
gasPrice?: bigint;
|
|
1204
|
+
maxFeePerGas?: bigint;
|
|
1205
|
+
maxPriorityFeePerGas?: bigint;
|
|
1206
|
+
nonce?: number;
|
|
1207
|
+
value?: bigint;
|
|
1208
|
+
}): Promise<`0x${string}`> {
|
|
1209
|
+
if (!this.contract.write) {
|
|
1210
|
+
throw new Error('Wallet client is required for write operations');
|
|
1211
|
+
}
|
|
1212
|
+
return this.contract.write.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<`0x${string}`>;
|
|
935
1213
|
}
|
|
936
1214
|
|
|
937
1215
|
/**
|
|
938
|
-
*
|
|
939
|
-
*
|
|
1216
|
+
* excludeAccount
|
|
1217
|
+
* nonpayable
|
|
1218
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
940
1219
|
*/
|
|
941
|
-
async
|
|
942
|
-
|
|
1220
|
+
async excludeAccount(account: `0x${string}`, options?: {
|
|
1221
|
+
accessList?: import('viem').AccessList;
|
|
1222
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1223
|
+
chain?: import('viem').Chain | null;
|
|
1224
|
+
dataSuffix?: `0x${string}`;
|
|
1225
|
+
gas?: bigint;
|
|
1226
|
+
gasPrice?: bigint;
|
|
1227
|
+
maxFeePerGas?: bigint;
|
|
1228
|
+
maxPriorityFeePerGas?: bigint;
|
|
1229
|
+
nonce?: number;
|
|
1230
|
+
value?: bigint;
|
|
1231
|
+
}): Promise<`0x${string}`> {
|
|
1232
|
+
if (!this.contract.write) {
|
|
1233
|
+
throw new Error('Wallet client is required for write operations');
|
|
1234
|
+
}
|
|
1235
|
+
return this.contract.write.excludeAccount([account] as const, options) as Promise<`0x${string}`>;
|
|
943
1236
|
}
|
|
944
1237
|
|
|
945
1238
|
/**
|
|
946
|
-
*
|
|
947
|
-
*
|
|
1239
|
+
* includeAccount
|
|
1240
|
+
* nonpayable
|
|
1241
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
948
1242
|
*/
|
|
949
|
-
async
|
|
950
|
-
|
|
1243
|
+
async includeAccount(account: `0x${string}`, options?: {
|
|
1244
|
+
accessList?: import('viem').AccessList;
|
|
1245
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1246
|
+
chain?: import('viem').Chain | null;
|
|
1247
|
+
dataSuffix?: `0x${string}`;
|
|
1248
|
+
gas?: bigint;
|
|
1249
|
+
gasPrice?: bigint;
|
|
1250
|
+
maxFeePerGas?: bigint;
|
|
1251
|
+
maxPriorityFeePerGas?: bigint;
|
|
1252
|
+
nonce?: number;
|
|
1253
|
+
value?: bigint;
|
|
1254
|
+
}): Promise<`0x${string}`> {
|
|
1255
|
+
if (!this.contract.write) {
|
|
1256
|
+
throw new Error('Wallet client is required for write operations');
|
|
1257
|
+
}
|
|
1258
|
+
return this.contract.write.includeAccount([account] as const, options) as Promise<`0x${string}`>;
|
|
951
1259
|
}
|
|
952
1260
|
|
|
953
1261
|
/**
|
|
954
|
-
*
|
|
1262
|
+
* increaseAllowance
|
|
955
1263
|
* nonpayable
|
|
956
1264
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
957
1265
|
*/
|
|
958
|
-
async
|
|
1266
|
+
async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
|
|
959
1267
|
accessList?: import('viem').AccessList;
|
|
960
1268
|
authorizationList?: import('viem').AuthorizationList;
|
|
961
1269
|
chain?: import('viem').Chain | null;
|
|
@@ -970,15 +1278,15 @@ export class SwissBorgToken_json {
|
|
|
970
1278
|
if (!this.contract.write) {
|
|
971
1279
|
throw new Error('Wallet client is required for write operations');
|
|
972
1280
|
}
|
|
973
|
-
return this.contract.write.
|
|
1281
|
+
return this.contract.write.increaseAllowance([spender, addedValue] as const, options) as Promise<`0x${string}`>;
|
|
974
1282
|
}
|
|
975
1283
|
|
|
976
1284
|
/**
|
|
977
|
-
*
|
|
1285
|
+
* renounceOwnership
|
|
978
1286
|
* nonpayable
|
|
979
1287
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
980
1288
|
*/
|
|
981
|
-
async
|
|
1289
|
+
async renounceOwnership(options?: {
|
|
982
1290
|
accessList?: import('viem').AccessList;
|
|
983
1291
|
authorizationList?: import('viem').AuthorizationList;
|
|
984
1292
|
chain?: import('viem').Chain | null;
|
|
@@ -993,15 +1301,15 @@ export class SwissBorgToken_json {
|
|
|
993
1301
|
if (!this.contract.write) {
|
|
994
1302
|
throw new Error('Wallet client is required for write operations');
|
|
995
1303
|
}
|
|
996
|
-
return this.contract.write.
|
|
1304
|
+
return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
|
|
997
1305
|
}
|
|
998
1306
|
|
|
999
1307
|
/**
|
|
1000
|
-
*
|
|
1308
|
+
* transfer
|
|
1001
1309
|
* nonpayable
|
|
1002
1310
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1003
1311
|
*/
|
|
1004
|
-
async
|
|
1312
|
+
async transfer(recipient: `0x${string}`, amount: bigint, options?: {
|
|
1005
1313
|
accessList?: import('viem').AccessList;
|
|
1006
1314
|
authorizationList?: import('viem').AuthorizationList;
|
|
1007
1315
|
chain?: import('viem').Chain | null;
|
|
@@ -1016,15 +1324,15 @@ export class SwissBorgToken_json {
|
|
|
1016
1324
|
if (!this.contract.write) {
|
|
1017
1325
|
throw new Error('Wallet client is required for write operations');
|
|
1018
1326
|
}
|
|
1019
|
-
return this.contract.write.
|
|
1327
|
+
return this.contract.write.transfer([recipient, amount] as const, options) as Promise<`0x${string}`>;
|
|
1020
1328
|
}
|
|
1021
1329
|
|
|
1022
1330
|
/**
|
|
1023
|
-
*
|
|
1331
|
+
* transferFrom
|
|
1024
1332
|
* nonpayable
|
|
1025
1333
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1026
1334
|
*/
|
|
1027
|
-
async
|
|
1335
|
+
async transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
|
|
1028
1336
|
accessList?: import('viem').AccessList;
|
|
1029
1337
|
authorizationList?: import('viem').AuthorizationList;
|
|
1030
1338
|
chain?: import('viem').Chain | null;
|
|
@@ -1039,15 +1347,15 @@ export class SwissBorgToken_json {
|
|
|
1039
1347
|
if (!this.contract.write) {
|
|
1040
1348
|
throw new Error('Wallet client is required for write operations');
|
|
1041
1349
|
}
|
|
1042
|
-
return this.contract.write.
|
|
1350
|
+
return this.contract.write.transferFrom([sender, recipient, amount] as const, options) as Promise<`0x${string}`>;
|
|
1043
1351
|
}
|
|
1044
1352
|
|
|
1045
1353
|
/**
|
|
1046
|
-
*
|
|
1354
|
+
* transferOwnership
|
|
1047
1355
|
* nonpayable
|
|
1048
1356
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1049
1357
|
*/
|
|
1050
|
-
async
|
|
1358
|
+
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
1051
1359
|
accessList?: import('viem').AccessList;
|
|
1052
1360
|
authorizationList?: import('viem').AuthorizationList;
|
|
1053
1361
|
chain?: import('viem').Chain | null;
|
|
@@ -1062,15 +1370,15 @@ export class SwissBorgToken_json {
|
|
|
1062
1370
|
if (!this.contract.write) {
|
|
1063
1371
|
throw new Error('Wallet client is required for write operations');
|
|
1064
1372
|
}
|
|
1065
|
-
return this.contract.write.
|
|
1373
|
+
return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
|
|
1066
1374
|
}
|
|
1067
1375
|
|
|
1068
1376
|
/**
|
|
1069
|
-
*
|
|
1377
|
+
* unPauseTransferForever
|
|
1070
1378
|
* nonpayable
|
|
1071
1379
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1072
1380
|
*/
|
|
1073
|
-
async
|
|
1381
|
+
async unPauseTransferForever(options?: {
|
|
1074
1382
|
accessList?: import('viem').AccessList;
|
|
1075
1383
|
authorizationList?: import('viem').AuthorizationList;
|
|
1076
1384
|
chain?: import('viem').Chain | null;
|
|
@@ -1085,15 +1393,15 @@ export class SwissBorgToken_json {
|
|
|
1085
1393
|
if (!this.contract.write) {
|
|
1086
1394
|
throw new Error('Wallet client is required for write operations');
|
|
1087
1395
|
}
|
|
1088
|
-
return this.contract.write.
|
|
1396
|
+
return this.contract.write.unPauseTransferForever(options) as Promise<`0x${string}`>;
|
|
1089
1397
|
}
|
|
1090
1398
|
|
|
1091
1399
|
/**
|
|
1092
|
-
*
|
|
1400
|
+
* updateFee
|
|
1093
1401
|
* nonpayable
|
|
1094
1402
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1095
1403
|
*/
|
|
1096
|
-
async
|
|
1404
|
+
async updateFee(_feeDecimals: bigint, _feePercentage: bigint, options?: {
|
|
1097
1405
|
accessList?: import('viem').AccessList;
|
|
1098
1406
|
authorizationList?: import('viem').AuthorizationList;
|
|
1099
1407
|
chain?: import('viem').Chain | null;
|
|
@@ -1108,15 +1416,15 @@ export class SwissBorgToken_json {
|
|
|
1108
1416
|
if (!this.contract.write) {
|
|
1109
1417
|
throw new Error('Wallet client is required for write operations');
|
|
1110
1418
|
}
|
|
1111
|
-
return this.contract.write.
|
|
1419
|
+
return this.contract.write.updateFee([_feeDecimals, _feePercentage] as const, options) as Promise<`0x${string}`>;
|
|
1112
1420
|
}
|
|
1113
1421
|
|
|
1114
1422
|
/**
|
|
1115
|
-
*
|
|
1423
|
+
* updateFeesAndSwapsEnabled
|
|
1116
1424
|
* nonpayable
|
|
1117
1425
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1118
1426
|
*/
|
|
1119
|
-
async
|
|
1427
|
+
async updateFeesAndSwapsEnabled(absFeeDecimals: bigint, absFeePercentage: bigint, absFeeDivider: bigint, _enabled: boolean, options?: {
|
|
1120
1428
|
accessList?: import('viem').AccessList;
|
|
1121
1429
|
authorizationList?: import('viem').AuthorizationList;
|
|
1122
1430
|
chain?: import('viem').Chain | null;
|
|
@@ -1131,15 +1439,15 @@ export class SwissBorgToken_json {
|
|
|
1131
1439
|
if (!this.contract.write) {
|
|
1132
1440
|
throw new Error('Wallet client is required for write operations');
|
|
1133
1441
|
}
|
|
1134
|
-
return this.contract.write.
|
|
1442
|
+
return this.contract.write.updateFeesAndSwapsEnabled([absFeeDecimals, absFeePercentage, absFeeDivider, _enabled] as const, options) as Promise<`0x${string}`>;
|
|
1135
1443
|
}
|
|
1136
1444
|
|
|
1137
1445
|
/**
|
|
1138
|
-
*
|
|
1446
|
+
* updateMinTokensBeforeAddToLP
|
|
1139
1447
|
* nonpayable
|
|
1140
1448
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1141
1449
|
*/
|
|
1142
|
-
async
|
|
1450
|
+
async updateMinTokensBeforeAddToLP(_minTokensBeforeAddToLP: bigint, options?: {
|
|
1143
1451
|
accessList?: import('viem').AccessList;
|
|
1144
1452
|
authorizationList?: import('viem').AuthorizationList;
|
|
1145
1453
|
chain?: import('viem').Chain | null;
|
|
@@ -1154,15 +1462,15 @@ export class SwissBorgToken_json {
|
|
|
1154
1462
|
if (!this.contract.write) {
|
|
1155
1463
|
throw new Error('Wallet client is required for write operations');
|
|
1156
1464
|
}
|
|
1157
|
-
return this.contract.write.
|
|
1465
|
+
return this.contract.write.updateMinTokensBeforeAddToLP([_minTokensBeforeAddToLP] as const, options) as Promise<`0x${string}`>;
|
|
1158
1466
|
}
|
|
1159
1467
|
|
|
1160
1468
|
/**
|
|
1161
|
-
*
|
|
1469
|
+
* updateSwapAndAbsorbEnabled
|
|
1162
1470
|
* nonpayable
|
|
1163
1471
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1164
1472
|
*/
|
|
1165
|
-
async
|
|
1473
|
+
async updateSwapAndAbsorbEnabled(_enabled: boolean, options?: {
|
|
1166
1474
|
accessList?: import('viem').AccessList;
|
|
1167
1475
|
authorizationList?: import('viem').AuthorizationList;
|
|
1168
1476
|
chain?: import('viem').Chain | null;
|
|
@@ -1177,7 +1485,7 @@ export class SwissBorgToken_json {
|
|
|
1177
1485
|
if (!this.contract.write) {
|
|
1178
1486
|
throw new Error('Wallet client is required for write operations');
|
|
1179
1487
|
}
|
|
1180
|
-
return this.contract.write.
|
|
1488
|
+
return this.contract.write.updateSwapAndAbsorbEnabled([_enabled] as const, options) as Promise<`0x${string}`>;
|
|
1181
1489
|
}
|
|
1182
1490
|
|
|
1183
1491
|
|
|
@@ -1196,6 +1504,25 @@ export class SwissBorgToken_json {
|
|
|
1196
1504
|
throw new Error('Public client is required for simulation');
|
|
1197
1505
|
}
|
|
1198
1506
|
return {
|
|
1507
|
+
/**
|
|
1508
|
+
* Simulate allocate
|
|
1509
|
+
* Returns gas estimate and result without sending transaction
|
|
1510
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1511
|
+
*/
|
|
1512
|
+
async allocate(tAmount: bigint, options?: {
|
|
1513
|
+
accessList?: import('viem').AccessList;
|
|
1514
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1515
|
+
chain?: import('viem').Chain | null;
|
|
1516
|
+
dataSuffix?: `0x${string}`;
|
|
1517
|
+
gas?: bigint;
|
|
1518
|
+
gasPrice?: bigint;
|
|
1519
|
+
maxFeePerGas?: bigint;
|
|
1520
|
+
maxPriorityFeePerGas?: bigint;
|
|
1521
|
+
nonce?: number;
|
|
1522
|
+
value?: bigint;
|
|
1523
|
+
}): Promise<void> {
|
|
1524
|
+
return contract.simulate.allocate([tAmount] as const, options) as Promise<void>;
|
|
1525
|
+
},
|
|
1199
1526
|
/**
|
|
1200
1527
|
* Simulate approve
|
|
1201
1528
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1216,11 +1543,11 @@ export class SwissBorgToken_json {
|
|
|
1216
1543
|
return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
|
|
1217
1544
|
},
|
|
1218
1545
|
/**
|
|
1219
|
-
* Simulate
|
|
1546
|
+
* Simulate burnLiq
|
|
1220
1547
|
* Returns gas estimate and result without sending transaction
|
|
1221
1548
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1222
1549
|
*/
|
|
1223
|
-
async
|
|
1550
|
+
async burnLiq(_token: `0x${string}`, _to: `0x${string}`, _amount: bigint, options?: {
|
|
1224
1551
|
accessList?: import('viem').AccessList;
|
|
1225
1552
|
authorizationList?: import('viem').AuthorizationList;
|
|
1226
1553
|
chain?: import('viem').Chain | null;
|
|
@@ -1232,14 +1559,14 @@ export class SwissBorgToken_json {
|
|
|
1232
1559
|
nonce?: number;
|
|
1233
1560
|
value?: bigint;
|
|
1234
1561
|
}): Promise<void> {
|
|
1235
|
-
return contract.simulate.
|
|
1562
|
+
return contract.simulate.burnLiq([_token, _to, _amount] as const, options) as Promise<void>;
|
|
1236
1563
|
},
|
|
1237
1564
|
/**
|
|
1238
|
-
* Simulate
|
|
1565
|
+
* Simulate changeFeeDivider
|
|
1239
1566
|
* Returns gas estimate and result without sending transaction
|
|
1240
1567
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1241
1568
|
*/
|
|
1242
|
-
async
|
|
1569
|
+
async changeFeeDivider(n: bigint, options?: {
|
|
1243
1570
|
accessList?: import('viem').AccessList;
|
|
1244
1571
|
authorizationList?: import('viem').AuthorizationList;
|
|
1245
1572
|
chain?: import('viem').Chain | null;
|
|
@@ -1251,7 +1578,7 @@ export class SwissBorgToken_json {
|
|
|
1251
1578
|
nonce?: number;
|
|
1252
1579
|
value?: bigint;
|
|
1253
1580
|
}): Promise<void> {
|
|
1254
|
-
return contract.simulate.
|
|
1581
|
+
return contract.simulate.changeFeeDivider([n] as const, options) as Promise<void>;
|
|
1255
1582
|
},
|
|
1256
1583
|
/**
|
|
1257
1584
|
* Simulate decreaseAllowance
|
|
@@ -1273,11 +1600,11 @@ export class SwissBorgToken_json {
|
|
|
1273
1600
|
return contract.simulate.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<boolean>;
|
|
1274
1601
|
},
|
|
1275
1602
|
/**
|
|
1276
|
-
* Simulate
|
|
1603
|
+
* Simulate excludeAccount
|
|
1277
1604
|
* Returns gas estimate and result without sending transaction
|
|
1278
1605
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1279
1606
|
*/
|
|
1280
|
-
async
|
|
1607
|
+
async excludeAccount(account: `0x${string}`, options?: {
|
|
1281
1608
|
accessList?: import('viem').AccessList;
|
|
1282
1609
|
authorizationList?: import('viem').AuthorizationList;
|
|
1283
1610
|
chain?: import('viem').Chain | null;
|
|
@@ -1289,14 +1616,14 @@ export class SwissBorgToken_json {
|
|
|
1289
1616
|
nonce?: number;
|
|
1290
1617
|
value?: bigint;
|
|
1291
1618
|
}): Promise<void> {
|
|
1292
|
-
return contract.simulate.
|
|
1619
|
+
return contract.simulate.excludeAccount([account] as const, options) as Promise<void>;
|
|
1293
1620
|
},
|
|
1294
1621
|
/**
|
|
1295
|
-
* Simulate
|
|
1622
|
+
* Simulate includeAccount
|
|
1296
1623
|
* Returns gas estimate and result without sending transaction
|
|
1297
1624
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1298
1625
|
*/
|
|
1299
|
-
async
|
|
1626
|
+
async includeAccount(account: `0x${string}`, options?: {
|
|
1300
1627
|
accessList?: import('viem').AccessList;
|
|
1301
1628
|
authorizationList?: import('viem').AuthorizationList;
|
|
1302
1629
|
chain?: import('viem').Chain | null;
|
|
@@ -1308,7 +1635,7 @@ export class SwissBorgToken_json {
|
|
|
1308
1635
|
nonce?: number;
|
|
1309
1636
|
value?: bigint;
|
|
1310
1637
|
}): Promise<void> {
|
|
1311
|
-
return contract.simulate.
|
|
1638
|
+
return contract.simulate.includeAccount([account] as const, options) as Promise<void>;
|
|
1312
1639
|
},
|
|
1313
1640
|
/**
|
|
1314
1641
|
* Simulate increaseAllowance
|
|
@@ -1330,11 +1657,11 @@ export class SwissBorgToken_json {
|
|
|
1330
1657
|
return contract.simulate.increaseAllowance([spender, addedValue] as const, options) as Promise<boolean>;
|
|
1331
1658
|
},
|
|
1332
1659
|
/**
|
|
1333
|
-
* Simulate
|
|
1660
|
+
* Simulate renounceOwnership
|
|
1334
1661
|
* Returns gas estimate and result without sending transaction
|
|
1335
1662
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1336
1663
|
*/
|
|
1337
|
-
async
|
|
1664
|
+
async renounceOwnership(options?: {
|
|
1338
1665
|
accessList?: import('viem').AccessList;
|
|
1339
1666
|
authorizationList?: import('viem').AuthorizationList;
|
|
1340
1667
|
chain?: import('viem').Chain | null;
|
|
@@ -1346,14 +1673,14 @@ export class SwissBorgToken_json {
|
|
|
1346
1673
|
nonce?: number;
|
|
1347
1674
|
value?: bigint;
|
|
1348
1675
|
}): Promise<void> {
|
|
1349
|
-
return contract.simulate.
|
|
1676
|
+
return contract.simulate.renounceOwnership(options) as Promise<void>;
|
|
1350
1677
|
},
|
|
1351
1678
|
/**
|
|
1352
1679
|
* Simulate transfer
|
|
1353
1680
|
* Returns gas estimate and result without sending transaction
|
|
1354
1681
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1355
1682
|
*/
|
|
1356
|
-
async transfer(
|
|
1683
|
+
async transfer(recipient: `0x${string}`, amount: bigint, options?: {
|
|
1357
1684
|
accessList?: import('viem').AccessList;
|
|
1358
1685
|
authorizationList?: import('viem').AuthorizationList;
|
|
1359
1686
|
chain?: import('viem').Chain | null;
|
|
@@ -1365,14 +1692,14 @@ export class SwissBorgToken_json {
|
|
|
1365
1692
|
nonce?: number;
|
|
1366
1693
|
value?: bigint;
|
|
1367
1694
|
}): Promise<boolean> {
|
|
1368
|
-
return contract.simulate.transfer([
|
|
1695
|
+
return contract.simulate.transfer([recipient, amount] as const, options) as Promise<boolean>;
|
|
1369
1696
|
},
|
|
1370
1697
|
/**
|
|
1371
1698
|
* Simulate transferFrom
|
|
1372
1699
|
* Returns gas estimate and result without sending transaction
|
|
1373
1700
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1374
1701
|
*/
|
|
1375
|
-
async transferFrom(
|
|
1702
|
+
async transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
|
|
1376
1703
|
accessList?: import('viem').AccessList;
|
|
1377
1704
|
authorizationList?: import('viem').AuthorizationList;
|
|
1378
1705
|
chain?: import('viem').Chain | null;
|
|
@@ -1384,7 +1711,121 @@ export class SwissBorgToken_json {
|
|
|
1384
1711
|
nonce?: number;
|
|
1385
1712
|
value?: bigint;
|
|
1386
1713
|
}): Promise<boolean> {
|
|
1387
|
-
return contract.simulate.transferFrom([
|
|
1714
|
+
return contract.simulate.transferFrom([sender, recipient, amount] as const, options) as Promise<boolean>;
|
|
1715
|
+
},
|
|
1716
|
+
/**
|
|
1717
|
+
* Simulate transferOwnership
|
|
1718
|
+
* Returns gas estimate and result without sending transaction
|
|
1719
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1720
|
+
*/
|
|
1721
|
+
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
1722
|
+
accessList?: import('viem').AccessList;
|
|
1723
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1724
|
+
chain?: import('viem').Chain | null;
|
|
1725
|
+
dataSuffix?: `0x${string}`;
|
|
1726
|
+
gas?: bigint;
|
|
1727
|
+
gasPrice?: bigint;
|
|
1728
|
+
maxFeePerGas?: bigint;
|
|
1729
|
+
maxPriorityFeePerGas?: bigint;
|
|
1730
|
+
nonce?: number;
|
|
1731
|
+
value?: bigint;
|
|
1732
|
+
}): Promise<void> {
|
|
1733
|
+
return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
|
|
1734
|
+
},
|
|
1735
|
+
/**
|
|
1736
|
+
* Simulate unPauseTransferForever
|
|
1737
|
+
* Returns gas estimate and result without sending transaction
|
|
1738
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1739
|
+
*/
|
|
1740
|
+
async unPauseTransferForever(options?: {
|
|
1741
|
+
accessList?: import('viem').AccessList;
|
|
1742
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1743
|
+
chain?: import('viem').Chain | null;
|
|
1744
|
+
dataSuffix?: `0x${string}`;
|
|
1745
|
+
gas?: bigint;
|
|
1746
|
+
gasPrice?: bigint;
|
|
1747
|
+
maxFeePerGas?: bigint;
|
|
1748
|
+
maxPriorityFeePerGas?: bigint;
|
|
1749
|
+
nonce?: number;
|
|
1750
|
+
value?: bigint;
|
|
1751
|
+
}): Promise<void> {
|
|
1752
|
+
return contract.simulate.unPauseTransferForever(options) as Promise<void>;
|
|
1753
|
+
},
|
|
1754
|
+
/**
|
|
1755
|
+
* Simulate updateFee
|
|
1756
|
+
* Returns gas estimate and result without sending transaction
|
|
1757
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1758
|
+
*/
|
|
1759
|
+
async updateFee(_feeDecimals: bigint, _feePercentage: bigint, options?: {
|
|
1760
|
+
accessList?: import('viem').AccessList;
|
|
1761
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1762
|
+
chain?: import('viem').Chain | null;
|
|
1763
|
+
dataSuffix?: `0x${string}`;
|
|
1764
|
+
gas?: bigint;
|
|
1765
|
+
gasPrice?: bigint;
|
|
1766
|
+
maxFeePerGas?: bigint;
|
|
1767
|
+
maxPriorityFeePerGas?: bigint;
|
|
1768
|
+
nonce?: number;
|
|
1769
|
+
value?: bigint;
|
|
1770
|
+
}): Promise<void> {
|
|
1771
|
+
return contract.simulate.updateFee([_feeDecimals, _feePercentage] as const, options) as Promise<void>;
|
|
1772
|
+
},
|
|
1773
|
+
/**
|
|
1774
|
+
* Simulate updateFeesAndSwapsEnabled
|
|
1775
|
+
* Returns gas estimate and result without sending transaction
|
|
1776
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1777
|
+
*/
|
|
1778
|
+
async updateFeesAndSwapsEnabled(absFeeDecimals: bigint, absFeePercentage: bigint, absFeeDivider: bigint, _enabled: boolean, options?: {
|
|
1779
|
+
accessList?: import('viem').AccessList;
|
|
1780
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1781
|
+
chain?: import('viem').Chain | null;
|
|
1782
|
+
dataSuffix?: `0x${string}`;
|
|
1783
|
+
gas?: bigint;
|
|
1784
|
+
gasPrice?: bigint;
|
|
1785
|
+
maxFeePerGas?: bigint;
|
|
1786
|
+
maxPriorityFeePerGas?: bigint;
|
|
1787
|
+
nonce?: number;
|
|
1788
|
+
value?: bigint;
|
|
1789
|
+
}): Promise<void> {
|
|
1790
|
+
return contract.simulate.updateFeesAndSwapsEnabled([absFeeDecimals, absFeePercentage, absFeeDivider, _enabled] as const, options) as Promise<void>;
|
|
1791
|
+
},
|
|
1792
|
+
/**
|
|
1793
|
+
* Simulate updateMinTokensBeforeAddToLP
|
|
1794
|
+
* Returns gas estimate and result without sending transaction
|
|
1795
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1796
|
+
*/
|
|
1797
|
+
async updateMinTokensBeforeAddToLP(_minTokensBeforeAddToLP: bigint, options?: {
|
|
1798
|
+
accessList?: import('viem').AccessList;
|
|
1799
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1800
|
+
chain?: import('viem').Chain | null;
|
|
1801
|
+
dataSuffix?: `0x${string}`;
|
|
1802
|
+
gas?: bigint;
|
|
1803
|
+
gasPrice?: bigint;
|
|
1804
|
+
maxFeePerGas?: bigint;
|
|
1805
|
+
maxPriorityFeePerGas?: bigint;
|
|
1806
|
+
nonce?: number;
|
|
1807
|
+
value?: bigint;
|
|
1808
|
+
}): Promise<void> {
|
|
1809
|
+
return contract.simulate.updateMinTokensBeforeAddToLP([_minTokensBeforeAddToLP] as const, options) as Promise<void>;
|
|
1810
|
+
},
|
|
1811
|
+
/**
|
|
1812
|
+
* Simulate updateSwapAndAbsorbEnabled
|
|
1813
|
+
* Returns gas estimate and result without sending transaction
|
|
1814
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1815
|
+
*/
|
|
1816
|
+
async updateSwapAndAbsorbEnabled(_enabled: boolean, options?: {
|
|
1817
|
+
accessList?: import('viem').AccessList;
|
|
1818
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1819
|
+
chain?: import('viem').Chain | null;
|
|
1820
|
+
dataSuffix?: `0x${string}`;
|
|
1821
|
+
gas?: bigint;
|
|
1822
|
+
gasPrice?: bigint;
|
|
1823
|
+
maxFeePerGas?: bigint;
|
|
1824
|
+
maxPriorityFeePerGas?: bigint;
|
|
1825
|
+
nonce?: number;
|
|
1826
|
+
value?: bigint;
|
|
1827
|
+
}): Promise<void> {
|
|
1828
|
+
return contract.simulate.updateSwapAndAbsorbEnabled([_enabled] as const, options) as Promise<void>;
|
|
1388
1829
|
}
|
|
1389
1830
|
};
|
|
1390
1831
|
}
|
|
@@ -1412,7 +1853,7 @@ export class SwissBorgToken_json {
|
|
|
1412
1853
|
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
|
|
1413
1854
|
return this.publicClient.watchContractEvent({
|
|
1414
1855
|
address: this.contractAddress,
|
|
1415
|
-
abi:
|
|
1856
|
+
abi: BORG_jsonAbi,
|
|
1416
1857
|
eventName: 'Approval',
|
|
1417
1858
|
args: filter,
|
|
1418
1859
|
onLogs: (logs: any[]) => {
|
|
@@ -1423,17 +1864,36 @@ export class SwissBorgToken_json {
|
|
|
1423
1864
|
}) as () => void;
|
|
1424
1865
|
},
|
|
1425
1866
|
/**
|
|
1426
|
-
* Watch
|
|
1867
|
+
* Watch FeeUpdated events
|
|
1427
1868
|
* @param callback Function to call when event is emitted
|
|
1428
1869
|
* @param filter Optional filter for indexed parameters
|
|
1429
1870
|
* @returns Unwatch function to stop listening
|
|
1430
1871
|
*/
|
|
1431
|
-
|
|
1872
|
+
FeeUpdated: (callback: (event: { feeDecimals: bigint; feePercentage: bigint }) => void) => {
|
|
1432
1873
|
return this.publicClient.watchContractEvent({
|
|
1433
1874
|
address: this.contractAddress,
|
|
1434
|
-
abi:
|
|
1435
|
-
eventName: '
|
|
1436
|
-
|
|
1875
|
+
abi: BORG_jsonAbi,
|
|
1876
|
+
eventName: 'FeeUpdated',
|
|
1877
|
+
|
|
1878
|
+
onLogs: (logs: any[]) => {
|
|
1879
|
+
logs.forEach((log: any) => {
|
|
1880
|
+
callback(log.args as any);
|
|
1881
|
+
});
|
|
1882
|
+
},
|
|
1883
|
+
}) as () => void;
|
|
1884
|
+
},
|
|
1885
|
+
/**
|
|
1886
|
+
* Watch MinTokensBeforeAddToLPUpdated events
|
|
1887
|
+
* @param callback Function to call when event is emitted
|
|
1888
|
+
* @param filter Optional filter for indexed parameters
|
|
1889
|
+
* @returns Unwatch function to stop listening
|
|
1890
|
+
*/
|
|
1891
|
+
MinTokensBeforeAddToLPUpdated: (callback: (event: { minTokensBeforeAddToLP: bigint }) => void) => {
|
|
1892
|
+
return this.publicClient.watchContractEvent({
|
|
1893
|
+
address: this.contractAddress,
|
|
1894
|
+
abi: BORG_jsonAbi,
|
|
1895
|
+
eventName: 'MinTokensBeforeAddToLPUpdated',
|
|
1896
|
+
|
|
1437
1897
|
onLogs: (logs: any[]) => {
|
|
1438
1898
|
logs.forEach((log: any) => {
|
|
1439
1899
|
callback(log.args as any);
|
|
@@ -1442,16 +1902,16 @@ export class SwissBorgToken_json {
|
|
|
1442
1902
|
}) as () => void;
|
|
1443
1903
|
},
|
|
1444
1904
|
/**
|
|
1445
|
-
* Watch
|
|
1905
|
+
* Watch OwnershipTransferred events
|
|
1446
1906
|
* @param callback Function to call when event is emitted
|
|
1447
1907
|
* @param filter Optional filter for indexed parameters
|
|
1448
1908
|
* @returns Unwatch function to stop listening
|
|
1449
1909
|
*/
|
|
1450
|
-
|
|
1910
|
+
OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
|
|
1451
1911
|
return this.publicClient.watchContractEvent({
|
|
1452
1912
|
address: this.contractAddress,
|
|
1453
|
-
abi:
|
|
1454
|
-
eventName: '
|
|
1913
|
+
abi: BORG_jsonAbi,
|
|
1914
|
+
eventName: 'OwnershipTransferred',
|
|
1455
1915
|
args: filter,
|
|
1456
1916
|
onLogs: (logs: any[]) => {
|
|
1457
1917
|
logs.forEach((log: any) => {
|
|
@@ -1461,16 +1921,35 @@ export class SwissBorgToken_json {
|
|
|
1461
1921
|
}) as () => void;
|
|
1462
1922
|
},
|
|
1463
1923
|
/**
|
|
1464
|
-
* Watch
|
|
1924
|
+
* Watch SwapAndAbsorb events
|
|
1925
|
+
* @param callback Function to call when event is emitted
|
|
1926
|
+
* @param filter Optional filter for indexed parameters
|
|
1927
|
+
* @returns Unwatch function to stop listening
|
|
1928
|
+
*/
|
|
1929
|
+
SwapAndAbsorb: (callback: (event: { tokensSwapped: bigint; ethReceived: bigint; tokensIntoLiquidity: bigint }) => void) => {
|
|
1930
|
+
return this.publicClient.watchContractEvent({
|
|
1931
|
+
address: this.contractAddress,
|
|
1932
|
+
abi: BORG_jsonAbi,
|
|
1933
|
+
eventName: 'SwapAndAbsorb',
|
|
1934
|
+
|
|
1935
|
+
onLogs: (logs: any[]) => {
|
|
1936
|
+
logs.forEach((log: any) => {
|
|
1937
|
+
callback(log.args as any);
|
|
1938
|
+
});
|
|
1939
|
+
},
|
|
1940
|
+
}) as () => void;
|
|
1941
|
+
},
|
|
1942
|
+
/**
|
|
1943
|
+
* Watch SwapAndAbsorbEnabledUpdated events
|
|
1465
1944
|
* @param callback Function to call when event is emitted
|
|
1466
1945
|
* @param filter Optional filter for indexed parameters
|
|
1467
1946
|
* @returns Unwatch function to stop listening
|
|
1468
1947
|
*/
|
|
1469
|
-
|
|
1948
|
+
SwapAndAbsorbEnabledUpdated: (callback: (event: { enabled: boolean }) => void) => {
|
|
1470
1949
|
return this.publicClient.watchContractEvent({
|
|
1471
1950
|
address: this.contractAddress,
|
|
1472
|
-
abi:
|
|
1473
|
-
eventName: '
|
|
1951
|
+
abi: BORG_jsonAbi,
|
|
1952
|
+
eventName: 'SwapAndAbsorbEnabledUpdated',
|
|
1474
1953
|
|
|
1475
1954
|
onLogs: (logs: any[]) => {
|
|
1476
1955
|
logs.forEach((log: any) => {
|
|
@@ -1488,7 +1967,7 @@ export class SwissBorgToken_json {
|
|
|
1488
1967
|
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
|
|
1489
1968
|
return this.publicClient.watchContractEvent({
|
|
1490
1969
|
address: this.contractAddress,
|
|
1491
|
-
abi:
|
|
1970
|
+
abi: BORG_jsonAbi,
|
|
1492
1971
|
eventName: 'Transfer',
|
|
1493
1972
|
args: filter,
|
|
1494
1973
|
onLogs: (logs: any[]) => {
|