opnet 1.8.11 → 1.8.13

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opnet",
3
3
  "type": "module",
4
- "version": "1.8.11",
4
+ "version": "1.8.13",
5
5
  "author": "OP_NET",
6
6
  "description": "The perfect library for building Bitcoin-based applications.",
7
7
  "engines": {
package/src/_version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '1.8.11';
1
+ export const version = '1.8.13';
@@ -110,6 +110,11 @@ export type EmergencyWithdrawnEvent = {
110
110
  // Call Results
111
111
  // ------------------------------------------------------------------
112
112
 
113
+ /**
114
+ * @description Represents the result of the update function call.
115
+ */
116
+ export type Update = CallResult<{}, OPNetEvent<never>[]>;
117
+
113
118
  /**
114
119
  * @description Represents the result of the initialize function call.
115
120
  */
@@ -125,16 +130,6 @@ export type TotalAllocPoint = CallResult<
125
130
  OPNetEvent<never>[]
126
131
  >;
127
132
 
128
- /**
129
- * @description Represents the result of the devAddress function call.
130
- */
131
- export type DevAddress = CallResult<
132
- {
133
- devAddress: Address;
134
- },
135
- OPNetEvent<never>[]
136
- >;
137
-
138
133
  /**
139
134
  * @description Represents the result of the getMotoPerBlock function call.
140
135
  */
@@ -366,11 +361,6 @@ export type SetBonusEndBlock = CallResult<{}, OPNetEvent<never>[]>;
366
361
  */
367
362
  export type SetBonusMultiplier = CallResult<{}, OPNetEvent<never>[]>;
368
363
 
369
- /**
370
- * @description Represents the result of the setDev function call.
371
- */
372
- export type SetDev = CallResult<{}, OPNetEvent<never>[]>;
373
-
374
364
  /**
375
365
  * @description Represents the result of the onOP20Received function call.
376
366
  */
@@ -378,17 +368,19 @@ export type OnOP20Received = CallResult<
378
368
  {
379
369
  selector: Uint8Array;
380
370
  },
381
- []
371
+ OPNetEvent<never>[]
382
372
  >;
383
373
 
384
374
  // ------------------------------------------------------------------
385
375
  // IMotoChef
386
376
  // ------------------------------------------------------------------
387
377
  export interface IMotoChef extends IOwnable {
378
+ update(sourceAddress: Address, updateCalldata: Uint8Array): Promise<Update>;
379
+
388
380
  initialize(
389
381
  motoAddress: Address,
390
382
  premineAmount: bigint,
391
- devAddress: Address,
383
+ premineRecipient: Address,
392
384
  motoPerBlock: bigint,
393
385
  bonusEndBlock: bigint,
394
386
  bonusMultiplier: bigint,
@@ -399,8 +391,6 @@ export interface IMotoChef extends IOwnable {
399
391
 
400
392
  totalAllocPoint(): Promise<TotalAllocPoint>;
401
393
 
402
- devAddress(): Promise<DevAddress>;
403
-
404
394
  getMotoPerBlock(): Promise<GetMotoPerBlock>;
405
395
 
406
396
  getBonusEndBlock(): Promise<GetBonusEndBlock>;
@@ -437,7 +427,7 @@ export interface IMotoChef extends IOwnable {
437
427
 
438
428
  add(allocPoint: bigint, lpToken: Address): Promise<Add>;
439
429
 
440
- set(poolId: number, allocPoint: bigint): Promise<Set>;
430
+ set(poolId: number, allocPoint: bigint, withUpdate: number): Promise<Set>;
441
431
 
442
432
  updatePool(poolId: number): Promise<UpdatePool>;
443
433
 
@@ -453,18 +443,16 @@ export interface IMotoChef extends IOwnable {
453
443
 
454
444
  emergencyWithdraw(poolId: number, to: Address): Promise<EmergencyWithdraw>;
455
445
 
456
- setMotoPerBlock(motoPerBlock: bigint): Promise<SetMotoPerBlock>;
457
-
458
- setBonusEndBlock(bonusEndBlock: bigint): Promise<SetBonusEndBlock>;
459
-
460
- setBonusMultiplier(bonusMultiplier: bigint): Promise<SetBonusMultiplier>;
461
-
462
- setDev(devAddress: Address): Promise<SetDev>;
463
-
464
446
  onOP20Received(
465
447
  operator: Address,
466
448
  from: Address,
467
449
  amount: bigint,
468
450
  data: Uint8Array,
469
451
  ): Promise<OnOP20Received>;
452
+
453
+ setMotoPerBlock(motoPerBlock: bigint): Promise<SetMotoPerBlock>;
454
+
455
+ setBonusEndBlock(bonusEndBlock: bigint): Promise<SetBonusEndBlock>;
456
+
457
+ setBonusMultiplier(bonusMultiplier: bigint): Promise<SetBonusMultiplier>;
470
458
  }
@@ -261,6 +261,21 @@ const MotoChefEvents: BitcoinInterfaceAbi = [
261
261
  ];
262
262
 
263
263
  export const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
264
+ {
265
+ name: 'update',
266
+ type: BitcoinAbiTypes.Function,
267
+ inputs: [
268
+ {
269
+ name: 'sourceAddress',
270
+ type: ABIDataTypes.ADDRESS,
271
+ },
272
+ {
273
+ name: 'updateCalldata',
274
+ type: ABIDataTypes.BYTES,
275
+ },
276
+ ],
277
+ outputs: [],
278
+ },
264
279
  {
265
280
  name: 'initialize',
266
281
  type: BitcoinAbiTypes.Function,
@@ -274,7 +289,7 @@ export const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
274
289
  type: ABIDataTypes.UINT256,
275
290
  },
276
291
  {
277
- name: 'devAddress',
292
+ name: 'premineRecipient',
278
293
  type: ABIDataTypes.ADDRESS,
279
294
  },
280
295
  {
@@ -316,18 +331,6 @@ export const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
316
331
  },
317
332
  ],
318
333
  },
319
- {
320
- name: 'devAddress',
321
- type: BitcoinAbiTypes.Function,
322
- constant: true,
323
- inputs: [],
324
- outputs: [
325
- {
326
- name: 'devAddress',
327
- type: ABIDataTypes.ADDRESS,
328
- },
329
- ],
330
- },
331
334
  {
332
335
  name: 'getMotoPerBlock',
333
336
  type: BitcoinAbiTypes.Function,
@@ -610,6 +613,10 @@ export const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
610
613
  name: 'allocPoint',
611
614
  type: ABIDataTypes.UINT256,
612
615
  },
616
+ {
617
+ name: 'withUpdate',
618
+ type: ABIDataTypes.UINT8,
619
+ },
613
620
  ],
614
621
  outputs: [],
615
622
  },
@@ -800,17 +807,6 @@ export const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
800
807
  ],
801
808
  outputs: [],
802
809
  },
803
- {
804
- name: 'setDev',
805
- type: BitcoinAbiTypes.Function,
806
- inputs: [
807
- {
808
- name: 'devAddress',
809
- type: ABIDataTypes.ADDRESS,
810
- },
811
- ],
812
- outputs: [],
813
- },
814
810
 
815
811
  // Ownable
816
812
  ...OwnableEvents,