opnet 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/browser/_version.d.ts +1 -1
  2. package/browser/abi/shared/interfaces/motoswap/IAdministeredOP20.d.ts +21 -0
  3. package/browser/abi/shared/interfaces/motoswap/IMotoChefContract.d.ts +121 -0
  4. package/browser/abi/shared/interfaces/motoswap/IOwnableContract.d.ts +12 -0
  5. package/browser/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.d.ts +13 -0
  6. package/browser/abi/shared/interfaces/motoswap/IReentrancyGuardContract.d.ts +7 -0
  7. package/browser/abi/shared/json/motoswap/ADMINISTERD_OP_20_ABI.d.ts +3 -0
  8. package/browser/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.d.ts +4 -0
  9. package/browser/abi/shared/json/motoswap/OWNABLE_ABI.d.ts +3 -0
  10. package/browser/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.d.ts +2 -0
  11. package/browser/index.js +1 -1
  12. package/browser/opnet.d.ts +4 -0
  13. package/build/_version.d.ts +1 -1
  14. package/build/_version.js +1 -1
  15. package/build/abi/shared/interfaces/motoswap/IAdministeredOP20.d.ts +21 -0
  16. package/build/abi/shared/interfaces/motoswap/IAdministeredOP20.js +1 -0
  17. package/build/abi/shared/interfaces/motoswap/IMotoChefContract.d.ts +121 -0
  18. package/build/abi/shared/interfaces/motoswap/IMotoChefContract.js +1 -0
  19. package/build/abi/shared/interfaces/motoswap/IOwnableContract.d.ts +12 -0
  20. package/build/abi/shared/interfaces/motoswap/IOwnableContract.js +1 -0
  21. package/build/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.d.ts +13 -0
  22. package/build/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.js +1 -0
  23. package/build/abi/shared/interfaces/motoswap/IReentrancyGuardContract.d.ts +7 -0
  24. package/build/abi/shared/interfaces/motoswap/IReentrancyGuardContract.js +1 -0
  25. package/build/abi/shared/json/motoswap/ADMINISTERD_OP_20_ABI.d.ts +3 -0
  26. package/build/abi/shared/json/motoswap/ADMINISTERD_OP_20_ABI.js +81 -0
  27. package/build/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.d.ts +4 -0
  28. package/build/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.js +443 -0
  29. package/build/abi/shared/json/motoswap/OWNABLE_ABI.d.ts +3 -0
  30. package/build/abi/shared/json/motoswap/OWNABLE_ABI.js +35 -0
  31. package/build/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.d.ts +2 -0
  32. package/build/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.js +15 -0
  33. package/build/opnet.d.ts +4 -0
  34. package/build/opnet.js +4 -0
  35. package/package.json +3 -3
  36. package/src/_version.ts +1 -1
  37. package/src/abi/shared/interfaces/motoswap/IAdministeredOP20.ts +56 -0
  38. package/src/abi/shared/interfaces/motoswap/IMotoChefContract.ts +348 -0
  39. package/src/abi/shared/interfaces/motoswap/IOwnableContract.ts +32 -0
  40. package/src/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.ts +33 -0
  41. package/src/abi/shared/interfaces/motoswap/IReentrancyGuardContract.ts +18 -0
  42. package/src/abi/shared/json/motoswap/ADMINISTERD_OP_20_ABI.ts +85 -0
  43. package/src/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.ts +455 -0
  44. package/src/abi/shared/json/motoswap/OWNABLE_ABI.ts +38 -0
  45. package/src/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.ts +20 -0
  46. package/src/opnet.ts +4 -0
@@ -0,0 +1,443 @@
1
+ import { ABIDataTypes } from '@btc-vision/transaction';
2
+ import { BitcoinAbiTypes } from '../../../BitcoinAbiTypes';
3
+ import { OP_NET_ABI } from '../opnet/OP_NET_ABI';
4
+ import { REENTRANCY_GUARD_ABI } from './REENTRANCY_GUARD_ABI';
5
+ import OWNABLE_ABI from './OWNABLE_ABI';
6
+ export const MotoChefEvents = [
7
+ {
8
+ name: 'LogInit',
9
+ type: BitcoinAbiTypes.Event,
10
+ values: [],
11
+ },
12
+ {
13
+ name: 'LogPoolAddition',
14
+ type: BitcoinAbiTypes.Event,
15
+ values: [
16
+ {
17
+ name: 'pid',
18
+ type: ABIDataTypes.UINT32,
19
+ },
20
+ {
21
+ name: 'allocPoint',
22
+ type: ABIDataTypes.UINT256,
23
+ },
24
+ {
25
+ name: 'lpToken',
26
+ type: ABIDataTypes.ADDRESS,
27
+ },
28
+ {
29
+ name: 'rewarder',
30
+ type: ABIDataTypes.ADDRESS,
31
+ },
32
+ ],
33
+ },
34
+ {
35
+ name: 'LogSetPool',
36
+ type: BitcoinAbiTypes.Event,
37
+ values: [
38
+ {
39
+ name: 'pid',
40
+ type: ABIDataTypes.UINT32,
41
+ },
42
+ {
43
+ name: 'allocPoint',
44
+ type: ABIDataTypes.UINT256,
45
+ },
46
+ {
47
+ name: 'rewarder',
48
+ type: ABIDataTypes.ADDRESS,
49
+ },
50
+ {
51
+ name: 'overwrite',
52
+ type: ABIDataTypes.BOOL,
53
+ },
54
+ ],
55
+ },
56
+ {
57
+ name: 'LogUpdatePool',
58
+ type: BitcoinAbiTypes.Event,
59
+ values: [
60
+ {
61
+ name: 'pid',
62
+ type: ABIDataTypes.UINT32,
63
+ },
64
+ {
65
+ name: 'lastRewardBlock',
66
+ type: ABIDataTypes.UINT64,
67
+ },
68
+ {
69
+ name: 'lpSupply',
70
+ type: ABIDataTypes.UINT256,
71
+ },
72
+ {
73
+ name: 'accMotoPerShare',
74
+ type: ABIDataTypes.UINT256,
75
+ },
76
+ ],
77
+ },
78
+ {
79
+ name: 'Deposit',
80
+ type: BitcoinAbiTypes.Event,
81
+ values: [
82
+ {
83
+ name: 'user',
84
+ type: ABIDataTypes.ADDRESS,
85
+ },
86
+ {
87
+ name: 'pid',
88
+ type: ABIDataTypes.UINT32,
89
+ },
90
+ {
91
+ name: 'amount',
92
+ type: ABIDataTypes.UINT256,
93
+ },
94
+ {
95
+ name: 'to',
96
+ type: ABIDataTypes.ADDRESS,
97
+ },
98
+ ],
99
+ },
100
+ {
101
+ name: 'Withdraw',
102
+ type: BitcoinAbiTypes.Event,
103
+ values: [
104
+ {
105
+ name: 'user',
106
+ type: ABIDataTypes.ADDRESS,
107
+ },
108
+ {
109
+ name: 'pid',
110
+ type: ABIDataTypes.UINT32,
111
+ },
112
+ {
113
+ name: 'amount',
114
+ type: ABIDataTypes.UINT256,
115
+ },
116
+ {
117
+ name: 'to',
118
+ type: ABIDataTypes.ADDRESS,
119
+ },
120
+ ],
121
+ },
122
+ {
123
+ name: 'Harvest',
124
+ type: BitcoinAbiTypes.Event,
125
+ values: [
126
+ {
127
+ name: 'user',
128
+ type: ABIDataTypes.ADDRESS,
129
+ },
130
+ {
131
+ name: 'pid',
132
+ type: ABIDataTypes.UINT32,
133
+ },
134
+ {
135
+ name: 'amount',
136
+ type: ABIDataTypes.UINT256,
137
+ },
138
+ ],
139
+ },
140
+ {
141
+ name: 'EmergencyWithdraw',
142
+ type: BitcoinAbiTypes.Event,
143
+ values: [
144
+ {
145
+ name: 'user',
146
+ type: ABIDataTypes.ADDRESS,
147
+ },
148
+ {
149
+ name: 'pid',
150
+ type: ABIDataTypes.UINT32,
151
+ },
152
+ {
153
+ name: 'amount',
154
+ type: ABIDataTypes.UINT256,
155
+ },
156
+ {
157
+ name: 'to',
158
+ type: ABIDataTypes.ADDRESS,
159
+ },
160
+ ],
161
+ },
162
+ ];
163
+ const MOTOCHEF_ABI = [
164
+ {
165
+ name: 'initialize',
166
+ type: BitcoinAbiTypes.Function,
167
+ constant: false,
168
+ payable: false,
169
+ inputs: [
170
+ { name: 'MOTO', type: ABIDataTypes.ADDRESS },
171
+ { name: 'premineAmount', type: ABIDataTypes.UINT256 },
172
+ { name: 'devaddr', type: ABIDataTypes.ADDRESS },
173
+ { name: 'motoPerBlock', type: ABIDataTypes.UINT256 },
174
+ { name: 'bonusEndBlock', type: ABIDataTypes.UINT256 },
175
+ { name: 'bonusMultiplier', type: ABIDataTypes.UINT256 },
176
+ ],
177
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
178
+ },
179
+ {
180
+ name: 'getLpToken',
181
+ type: BitcoinAbiTypes.Function,
182
+ constant: true,
183
+ inputs: [{ name: 'pid', type: ABIDataTypes.UINT32 }],
184
+ outputs: [{ name: 'lpTokenAddress', type: ABIDataTypes.ADDRESS }],
185
+ },
186
+ {
187
+ name: 'getRewarder',
188
+ type: BitcoinAbiTypes.Function,
189
+ constant: true,
190
+ inputs: [{ name: 'pid', type: ABIDataTypes.UINT32 }],
191
+ outputs: [{ name: 'rewarderAddress', type: ABIDataTypes.ADDRESS }],
192
+ },
193
+ {
194
+ name: 'getPoolInfo',
195
+ type: BitcoinAbiTypes.Function,
196
+ constant: true,
197
+ inputs: [{ name: 'pid', type: ABIDataTypes.UINT32 }],
198
+ outputs: [
199
+ { name: 'allocPoint', type: ABIDataTypes.UINT64 },
200
+ { name: 'lastRewardBlock', type: ABIDataTypes.UINT64 },
201
+ { name: 'accMotoPerShare', type: ABIDataTypes.UINT256 },
202
+ ],
203
+ },
204
+ {
205
+ name: 'pools',
206
+ type: BitcoinAbiTypes.Function,
207
+ constant: true,
208
+ inputs: [],
209
+ outputs: [
210
+ { name: 'poolLength', type: ABIDataTypes.UINT32 },
211
+ { name: 'poolsData', type: ABIDataTypes.BYTES },
212
+ ],
213
+ },
214
+ {
215
+ name: 'getUserInfo',
216
+ type: BitcoinAbiTypes.Function,
217
+ constant: true,
218
+ inputs: [
219
+ { name: 'pid', type: ABIDataTypes.UINT32 },
220
+ { name: 'user', type: ABIDataTypes.ADDRESS },
221
+ ],
222
+ outputs: [
223
+ { name: 'amount', type: ABIDataTypes.UINT256 },
224
+ { name: 'rewardDebt', type: ABIDataTypes.UINT256 },
225
+ ],
226
+ },
227
+ {
228
+ name: 'totalAllocPoint',
229
+ type: BitcoinAbiTypes.Function,
230
+ constant: true,
231
+ inputs: [],
232
+ outputs: [{ name: 'totalAllocPoint', type: ABIDataTypes.UINT256 }],
233
+ },
234
+ {
235
+ name: 'devaddr',
236
+ type: BitcoinAbiTypes.Function,
237
+ constant: true,
238
+ inputs: [],
239
+ outputs: [{ name: 'devaddr', type: ABIDataTypes.ADDRESS }],
240
+ },
241
+ {
242
+ name: 'getMotoPerBlock',
243
+ type: BitcoinAbiTypes.Function,
244
+ constant: true,
245
+ inputs: [],
246
+ outputs: [{ name: 'motoPerBlock', type: ABIDataTypes.UINT256 }],
247
+ },
248
+ {
249
+ name: 'getBonusEndBlock',
250
+ type: BitcoinAbiTypes.Function,
251
+ constant: true,
252
+ inputs: [],
253
+ outputs: [{ name: 'bonusEndBlock', type: ABIDataTypes.UINT256 }],
254
+ },
255
+ {
256
+ name: 'getBonusMultiplier',
257
+ type: BitcoinAbiTypes.Function,
258
+ constant: true,
259
+ inputs: [],
260
+ outputs: [{ name: 'bonusMultiplier', type: ABIDataTypes.UINT256 }],
261
+ },
262
+ {
263
+ name: 'setMotoPerBlock',
264
+ type: BitcoinAbiTypes.Function,
265
+ constant: false,
266
+ payable: false,
267
+ inputs: [{ name: 'motoPerBlock', type: ABIDataTypes.UINT256 }],
268
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
269
+ },
270
+ {
271
+ name: 'setBonusEndBlock',
272
+ type: BitcoinAbiTypes.Function,
273
+ constant: false,
274
+ payable: false,
275
+ inputs: [{ name: 'bonusEndBlock', type: ABIDataTypes.UINT256 }],
276
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
277
+ },
278
+ {
279
+ name: 'setBonusMultiplier',
280
+ type: BitcoinAbiTypes.Function,
281
+ constant: false,
282
+ payable: false,
283
+ inputs: [{ name: 'bonusMultiplier', type: ABIDataTypes.UINT256 }],
284
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
285
+ },
286
+ {
287
+ name: 'add',
288
+ type: BitcoinAbiTypes.Function,
289
+ constant: false,
290
+ payable: false,
291
+ inputs: [
292
+ { name: 'allocPoint', type: ABIDataTypes.UINT256 },
293
+ { name: 'lpToken', type: ABIDataTypes.ADDRESS },
294
+ { name: 'rewarder', type: ABIDataTypes.ADDRESS },
295
+ ],
296
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
297
+ },
298
+ {
299
+ name: 'set',
300
+ type: BitcoinAbiTypes.Function,
301
+ constant: false,
302
+ payable: false,
303
+ inputs: [
304
+ { name: 'pid', type: ABIDataTypes.UINT32 },
305
+ { name: 'allocPoint', type: ABIDataTypes.UINT256 },
306
+ { name: 'rewarder', type: ABIDataTypes.ADDRESS },
307
+ { name: 'overwrite', type: ABIDataTypes.BOOL },
308
+ ],
309
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
310
+ },
311
+ {
312
+ name: 'setMigrator',
313
+ type: BitcoinAbiTypes.Function,
314
+ constant: false,
315
+ payable: false,
316
+ inputs: [{ name: 'migrator', type: ABIDataTypes.ADDRESS }],
317
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
318
+ },
319
+ {
320
+ name: 'migrate',
321
+ type: BitcoinAbiTypes.Function,
322
+ constant: false,
323
+ payable: false,
324
+ inputs: [{ name: 'pid', type: ABIDataTypes.UINT32 }],
325
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
326
+ },
327
+ {
328
+ name: 'getMultiplier',
329
+ type: BitcoinAbiTypes.Function,
330
+ constant: false,
331
+ payable: false,
332
+ inputs: [
333
+ { name: 'from', type: ABIDataTypes.UINT256 },
334
+ { name: 'to', type: ABIDataTypes.UINT256 },
335
+ ],
336
+ outputs: [{ name: 'multiplier', type: ABIDataTypes.UINT256 }],
337
+ },
338
+ {
339
+ name: 'pendingMoto',
340
+ type: BitcoinAbiTypes.Function,
341
+ constant: false,
342
+ payable: false,
343
+ inputs: [
344
+ { name: 'pid', type: ABIDataTypes.UINT32 },
345
+ { name: 'user', type: ABIDataTypes.ADDRESS },
346
+ ],
347
+ outputs: [{ name: 'pendingMoto', type: ABIDataTypes.UINT256 }],
348
+ },
349
+ {
350
+ name: 'massUpdatePools',
351
+ type: BitcoinAbiTypes.Function,
352
+ constant: false,
353
+ payable: false,
354
+ inputs: [
355
+ { name: 'length', type: ABIDataTypes.UINT32 },
356
+ { name: 'pids', type: ABIDataTypes.ARRAY_OF_UINT32 },
357
+ ],
358
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
359
+ },
360
+ {
361
+ name: 'updatePool',
362
+ type: BitcoinAbiTypes.Function,
363
+ constant: false,
364
+ payable: false,
365
+ inputs: [{ name: 'pid', type: ABIDataTypes.UINT32 }],
366
+ outputs: [
367
+ { name: 'allocPoint', type: ABIDataTypes.UINT64 },
368
+ { name: 'lastRewardBlock', type: ABIDataTypes.UINT64 },
369
+ { name: 'accMotoPerShare', type: ABIDataTypes.UINT256 },
370
+ ],
371
+ },
372
+ {
373
+ name: 'deposit',
374
+ type: BitcoinAbiTypes.Function,
375
+ constant: false,
376
+ payable: false,
377
+ inputs: [
378
+ { name: 'pid', type: ABIDataTypes.UINT32 },
379
+ { name: 'amount', type: ABIDataTypes.UINT256 },
380
+ { name: 'to', type: ABIDataTypes.ADDRESS },
381
+ ],
382
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
383
+ },
384
+ {
385
+ name: 'withdraw',
386
+ type: BitcoinAbiTypes.Function,
387
+ constant: false,
388
+ payable: false,
389
+ inputs: [
390
+ { name: 'pid', type: ABIDataTypes.UINT32 },
391
+ { name: 'amount', type: ABIDataTypes.UINT256 },
392
+ { name: 'to', type: ABIDataTypes.ADDRESS },
393
+ ],
394
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
395
+ },
396
+ {
397
+ name: 'harvest',
398
+ type: BitcoinAbiTypes.Function,
399
+ constant: false,
400
+ payable: false,
401
+ inputs: [
402
+ { name: 'pid', type: ABIDataTypes.UINT32 },
403
+ { name: 'to', type: ABIDataTypes.ADDRESS },
404
+ ],
405
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
406
+ },
407
+ {
408
+ name: 'withdrawAndHarvest',
409
+ type: BitcoinAbiTypes.Function,
410
+ constant: false,
411
+ payable: false,
412
+ inputs: [
413
+ { name: 'pid', type: ABIDataTypes.UINT32 },
414
+ { name: 'amount', type: ABIDataTypes.UINT256 },
415
+ { name: 'to', type: ABIDataTypes.ADDRESS },
416
+ ],
417
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
418
+ },
419
+ {
420
+ name: 'emergencyWithdraw',
421
+ type: BitcoinAbiTypes.Function,
422
+ constant: false,
423
+ payable: false,
424
+ inputs: [
425
+ { name: 'pid', type: ABIDataTypes.UINT32 },
426
+ { name: 'to', type: ABIDataTypes.ADDRESS },
427
+ ],
428
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
429
+ },
430
+ {
431
+ name: 'setDev',
432
+ type: BitcoinAbiTypes.Function,
433
+ constant: false,
434
+ payable: false,
435
+ inputs: [{ name: 'devaddr', type: ABIDataTypes.ADDRESS }],
436
+ outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
437
+ },
438
+ ...MotoChefEvents,
439
+ ...OP_NET_ABI,
440
+ ...REENTRANCY_GUARD_ABI,
441
+ ...OWNABLE_ABI,
442
+ ];
443
+ export default MOTOCHEF_ABI;
@@ -0,0 +1,3 @@
1
+ import { BitcoinInterfaceAbi } from '../../../interfaces/BitcoinInterfaceAbi';
2
+ declare const OWNABLE_ABI: BitcoinInterfaceAbi;
3
+ export default OWNABLE_ABI;
@@ -0,0 +1,35 @@
1
+ import { ABIDataTypes } from '@btc-vision/transaction';
2
+ import { BitcoinAbiTypes } from '../../../BitcoinAbiTypes';
3
+ const OWNABLE_ABI = [
4
+ {
5
+ name: 'admin',
6
+ type: BitcoinAbiTypes.Function,
7
+ constant: true,
8
+ inputs: [],
9
+ outputs: [
10
+ {
11
+ name: 'adminAddress',
12
+ type: ABIDataTypes.ADDRESS,
13
+ },
14
+ ],
15
+ },
16
+ {
17
+ name: 'changeAdmin',
18
+ type: BitcoinAbiTypes.Function,
19
+ constant: false,
20
+ payable: false,
21
+ inputs: [
22
+ {
23
+ name: 'newAdmin',
24
+ type: ABIDataTypes.ADDRESS,
25
+ },
26
+ ],
27
+ outputs: [
28
+ {
29
+ name: 'success',
30
+ type: ABIDataTypes.BOOL,
31
+ },
32
+ ],
33
+ },
34
+ ];
35
+ export default OWNABLE_ABI;
@@ -0,0 +1,2 @@
1
+ import { BitcoinInterfaceAbi } from '../../../interfaces/BitcoinInterfaceAbi';
2
+ export declare const REENTRANCY_GUARD_ABI: BitcoinInterfaceAbi;
@@ -0,0 +1,15 @@
1
+ import { ABIDataTypes } from '@btc-vision/transaction';
2
+ import { BitcoinAbiTypes } from '../../../BitcoinAbiTypes';
3
+ export const REENTRANCY_GUARD_ABI = [
4
+ {
5
+ name: 'status',
6
+ inputs: [],
7
+ outputs: [
8
+ {
9
+ name: 'status',
10
+ type: ABIDataTypes.UINT256,
11
+ },
12
+ ],
13
+ type: BitcoinAbiTypes.Function,
14
+ },
15
+ ];
package/build/opnet.d.ts CHANGED
@@ -52,6 +52,8 @@ export { ABIDataTypes } from '@btc-vision/transaction';
52
52
  export * from './abi/shared/json/motoswap/MOTOSWAP_FACTORY_ABI.js';
53
53
  export * from './abi/shared/json/motoswap/MOTOSWAP_POOL_ABI.js';
54
54
  export * from './abi/shared/json/motoswap/MOTOSWAP_ROUTER_ABI.js';
55
+ export * from './abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.js';
56
+ export * from './abi/shared/json/motoswap/ADMINISTERD_OP_20_ABI.js';
55
57
  export * from './abi/shared/json/opnet/OP_20_ABI.js';
56
58
  export * from './abi/shared/json/opnet/OP_NET_ABI.js';
57
59
  export * from './abi/shared/json/generic/STAKING_ABI.js';
@@ -60,6 +62,8 @@ export * from './abi/shared/json/motoswap/EWMA_ABI.js';
60
62
  export * from './abi/shared/interfaces/motoswap/IMotoswapFactoryContract.js';
61
63
  export * from './abi/shared/interfaces/motoswap/IMotoswapPoolContract.js';
62
64
  export * from './abi/shared/interfaces/motoswap/IMotoswapRouterContract.js';
65
+ export * from './abi/shared/interfaces/motoswap/IMotoChefContract.js';
66
+ export * from './abi/shared/interfaces/motoswap/IAdministeredOP20.js';
63
67
  export * from './abi/shared/interfaces/opnet/IOP_20Contract.js';
64
68
  export * from './abi/shared/interfaces/opnet/IOP_NETContract.js';
65
69
  export * from './abi/shared/interfaces/generic/IStackingContract.js';
package/build/opnet.js CHANGED
@@ -52,6 +52,8 @@ export { ABIDataTypes } from '@btc-vision/transaction';
52
52
  export * from './abi/shared/json/motoswap/MOTOSWAP_FACTORY_ABI.js';
53
53
  export * from './abi/shared/json/motoswap/MOTOSWAP_POOL_ABI.js';
54
54
  export * from './abi/shared/json/motoswap/MOTOSWAP_ROUTER_ABI.js';
55
+ export * from './abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.js';
56
+ export * from './abi/shared/json/motoswap/ADMINISTERD_OP_20_ABI.js';
55
57
  export * from './abi/shared/json/opnet/OP_20_ABI.js';
56
58
  export * from './abi/shared/json/opnet/OP_NET_ABI.js';
57
59
  export * from './abi/shared/json/generic/STAKING_ABI.js';
@@ -60,6 +62,8 @@ export * from './abi/shared/json/motoswap/EWMA_ABI.js';
60
62
  export * from './abi/shared/interfaces/motoswap/IMotoswapFactoryContract.js';
61
63
  export * from './abi/shared/interfaces/motoswap/IMotoswapPoolContract.js';
62
64
  export * from './abi/shared/interfaces/motoswap/IMotoswapRouterContract.js';
65
+ export * from './abi/shared/interfaces/motoswap/IMotoChefContract.js';
66
+ export * from './abi/shared/interfaces/motoswap/IAdministeredOP20.js';
63
67
  export * from './abi/shared/interfaces/opnet/IOP_20Contract.js';
64
68
  export * from './abi/shared/interfaces/opnet/IOP_NETContract.js';
65
69
  export * from './abi/shared/interfaces/generic/IStackingContract.js';
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "opnet",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.2.2",
5
5
  "author": "OP_NET",
6
6
  "description": "The perfect library for building Bitcoin-based applications.",
7
7
  "engines": {
8
- "node": ">=16.0.0"
8
+ "node": ">=21.0.0"
9
9
  },
10
10
  "exports": {
11
11
  ".": {
@@ -101,7 +101,7 @@
101
101
  "@bitcoinerlab/secp256k1": "^1.1.1",
102
102
  "@btc-vision/bitcoin": "^6.3.2",
103
103
  "@btc-vision/bsi-bitcoin-rpc": ">=1.0.29",
104
- "@btc-vision/transaction": "^1.2.0",
104
+ "@btc-vision/transaction": "^1.2.2",
105
105
  "@noble/hashes": "^1.6.1",
106
106
  "bignumber.js": "^9.1.2",
107
107
  "buffer": "^6.0.3",
package/src/_version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '1.2.0';
1
+ export const version = '1.2.2';
@@ -0,0 +1,56 @@
1
+ import { Address } from '@btc-vision/transaction';
2
+ import { IOP_20Contract } from '../opnet/IOP_20Contract';
3
+ import { CallResult } from '../../../../opnet';
4
+
5
+ export type Admin = CallResult<{
6
+ ADDRESS: Address;
7
+ }>;
8
+
9
+ export type ChangeAdmin = CallResult<{
10
+ success: boolean;
11
+ }>;
12
+
13
+ export type AdminMint = CallResult<{
14
+ success: boolean;
15
+ }>;
16
+
17
+ export type AdminBurn = CallResult<{
18
+ success: boolean;
19
+ }>;
20
+
21
+ /**
22
+ * @description This interface represents the IAdministeredOP20Contract contract. It extends the IOP_20Contract and adds the ability to have an admin address that can mint and burn tokens.
23
+ * @interface IMotoChefContract
24
+ * @extends {IOwnableReentrancyGuardContract}
25
+ * @cathegory Contracts
26
+ */
27
+ export interface IAdministeredOP20Contract extends IOP_20Contract {
28
+ /**
29
+ * @description Gets the current admin address.
30
+ * @returns {Admin}
31
+ */
32
+ admin(): Promise<Admin>;
33
+
34
+ /**
35
+ * @description Changes the contract admin. Only callable by the current admin.
36
+ * @param {Address} newAdmin The new admin address.
37
+ * @returns {ChangeAdmin}
38
+ */
39
+ changeAdmin(newAdmin: Address): Promise<ChangeAdmin>;
40
+
41
+ /**
42
+ * @description Mints tokens to a specified address. Only callable by the admin.
43
+ * @param {Address} to The address to mint tokens to.
44
+ * @param {bigint} amount The amount of tokens to mint.
45
+ * @returns {AdminMint}
46
+ */
47
+ adminMint(to: Address, amount: bigint): Promise<AdminMint>;
48
+
49
+ /**
50
+ * @description Burns tokens from a specified address. Only callable by the admin.
51
+ * @param {Address} from The address to burn tokens from.
52
+ * @param {bigint} amount The amount of tokens to burn.
53
+ * @returns {AdminBurn}
54
+ */
55
+ adminBurn(from: Address, amount: bigint): Promise<AdminBurn>;
56
+ }