opnet 1.3.2 → 1.3.4

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 (99) hide show
  1. package/browser/_version.d.ts +1 -1
  2. package/browser/abi/shared/interfaces/motoswap/{IAdministeredOP20.d.ts → IMoto.d.ts} +2 -2
  3. package/browser/abi/shared/interfaces/motoswap/IMotoChef.d.ts +208 -0
  4. package/browser/abi/shared/interfaces/motoswap/IMotoswapPoolContract.d.ts +0 -4
  5. package/browser/abi/shared/interfaces/motoswap/IMotoswapStakingContract.d.ts +19 -3
  6. package/browser/abi/shared/interfaces/motoswap/INativeSwapContract.d.ts +13 -5
  7. package/browser/abi/shared/json/generic/STAKING_ABI.d.ts +0 -1
  8. package/{build/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.d.ts → browser/abi/shared/json/motoswap/MOTOCHEF_ABI.d.ts} +1 -1
  9. package/browser/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.d.ts +0 -1
  10. package/browser/abi/shared/json/motoswap/MOTO_ABI.d.ts +2 -0
  11. package/browser/abi/shared/json/motoswap/NATIVE_SWAP_ABI.d.ts +0 -1
  12. package/browser/fetch/fetch-browser.d.ts +4 -0
  13. package/browser/fetch/fetch.d.ts +2 -0
  14. package/browser/index.js +1 -1
  15. package/browser/opnet.d.ts +10 -12
  16. package/build/_version.d.ts +1 -1
  17. package/build/_version.js +1 -1
  18. package/build/abi/shared/interfaces/motoswap/{IAdministeredOP20.d.ts → IMoto.d.ts} +2 -2
  19. package/build/abi/shared/interfaces/motoswap/IMotoChef.d.ts +208 -0
  20. package/build/abi/shared/interfaces/motoswap/IMotoswapPoolContract.d.ts +0 -4
  21. package/build/abi/shared/interfaces/motoswap/IMotoswapStakingContract.d.ts +19 -3
  22. package/build/abi/shared/interfaces/motoswap/INativeSwapContract.d.ts +13 -5
  23. package/build/abi/shared/json/generic/STAKING_ABI.d.ts +0 -1
  24. package/build/abi/shared/json/generic/STAKING_ABI.js +1 -1
  25. package/{browser/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.d.ts → build/abi/shared/json/motoswap/MOTOCHEF_ABI.d.ts} +1 -1
  26. package/build/abi/shared/json/motoswap/MOTOCHEF_ABI.js +820 -0
  27. package/build/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.d.ts +0 -1
  28. package/build/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.js +45 -5
  29. package/build/abi/shared/json/motoswap/MOTO_ABI.d.ts +2 -0
  30. package/build/abi/shared/json/motoswap/{ADMINISTERD_OP_20_ABI.js → MOTO_ABI.js} +5 -13
  31. package/build/abi/shared/json/motoswap/NATIVE_SWAP_ABI.d.ts +0 -1
  32. package/build/abi/shared/json/motoswap/NATIVE_SWAP_ABI.js +15 -1
  33. package/build/abi/shared/json/opnet/OP_NET_ABI.js +7 -18
  34. package/build/contracts/Contract.js +2 -2
  35. package/build/fetch/fetch.d.ts +2 -0
  36. package/build/fetch/fetch.js +2 -0
  37. package/build/opnet.d.ts +10 -12
  38. package/build/opnet.js +10 -12
  39. package/build/providers/JSONRpcProvider.js +7 -1
  40. package/package.json +6 -4
  41. package/src/_version.ts +1 -1
  42. package/src/abi/shared/interfaces/motoswap/{IAdministeredOP20.ts → IMoto.ts} +4 -4
  43. package/src/abi/shared/interfaces/motoswap/IMotoChef.ts +485 -0
  44. package/src/abi/shared/interfaces/motoswap/IMotoswapPoolContract.ts +0 -5
  45. package/src/abi/shared/interfaces/motoswap/IMotoswapStakingContract.ts +50 -4
  46. package/src/abi/shared/interfaces/motoswap/INativeSwapContract.ts +19 -5
  47. package/src/abi/shared/json/generic/STAKING_ABI.ts +1 -7
  48. package/src/abi/shared/json/motoswap/MOTOCHEF_ABI.ts +831 -0
  49. package/src/abi/shared/json/motoswap/MOTOSWAP_FACTORY_ABI.ts +0 -6
  50. package/src/abi/shared/json/motoswap/MOTOSWAP_POOL_ABI.ts +0 -6
  51. package/src/abi/shared/json/motoswap/MOTOSWAP_ROUTER_ABI.ts +0 -3
  52. package/src/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.ts +51 -9
  53. package/src/abi/shared/json/motoswap/{ADMINISTERD_OP_20_ABI.ts → MOTO_ABI.ts} +7 -15
  54. package/src/abi/shared/json/motoswap/NATIVE_SWAP_ABI.ts +15 -7
  55. package/src/abi/shared/json/opnet/OP_NET_ABI.ts +7 -24
  56. package/src/contracts/CallResult.ts +1 -0
  57. package/src/contracts/Contract.ts +3 -3
  58. package/src/fetch/fetch-browser.js +5 -0
  59. package/src/fetch/fetch.ts +3 -0
  60. package/src/opnet.ts +10 -12
  61. package/src/providers/JSONRpcProvider.ts +9 -4
  62. package/webpack.config.js +1 -0
  63. package/browser/abi/shared/interfaces/motoswap/IMotoChefContract.d.ts +0 -229
  64. package/browser/abi/shared/interfaces/motoswap/IOwnableContract.d.ts +0 -12
  65. package/browser/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.d.ts +0 -13
  66. package/browser/abi/shared/interfaces/motoswap/IReentrancyGuardContract.d.ts +0 -7
  67. package/browser/abi/shared/interfaces/tests/IWBTCContract.d.ts +0 -13
  68. package/browser/abi/shared/json/motoswap/ADMINISTERD_OP_20_ABI.d.ts +0 -3
  69. package/browser/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.d.ts +0 -4
  70. package/browser/abi/shared/json/motoswap/OWNABLE_ABI.d.ts +0 -3
  71. package/browser/abi/shared/json/tests/WBTC_ABI.d.ts +0 -3
  72. package/build/abi/shared/interfaces/motoswap/IMotoChefContract.d.ts +0 -229
  73. package/build/abi/shared/interfaces/motoswap/IOwnableContract.d.ts +0 -12
  74. package/build/abi/shared/interfaces/motoswap/IOwnableContract.js +0 -1
  75. package/build/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.d.ts +0 -13
  76. package/build/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.js +0 -1
  77. package/build/abi/shared/interfaces/motoswap/IReentrancyGuardContract.d.ts +0 -7
  78. package/build/abi/shared/interfaces/motoswap/IReentrancyGuardContract.js +0 -1
  79. package/build/abi/shared/interfaces/tests/IWBTCContract.d.ts +0 -13
  80. package/build/abi/shared/interfaces/tests/IWBTCContract.js +0 -1
  81. package/build/abi/shared/json/motoswap/ADMINISTERD_OP_20_ABI.d.ts +0 -3
  82. package/build/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.d.ts +0 -4
  83. package/build/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.js +0 -508
  84. package/build/abi/shared/json/motoswap/OWNABLE_ABI.d.ts +0 -3
  85. package/build/abi/shared/json/motoswap/OWNABLE_ABI.js +0 -35
  86. package/build/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.js +0 -15
  87. package/build/abi/shared/json/tests/WBTC_ABI.d.ts +0 -3
  88. package/build/abi/shared/json/tests/WBTC_ABI.js +0 -57
  89. package/src/abi/shared/interfaces/motoswap/IMotoChefContract.ts +0 -484
  90. package/src/abi/shared/interfaces/motoswap/IOwnableContract.ts +0 -32
  91. package/src/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.ts +0 -33
  92. package/src/abi/shared/interfaces/motoswap/IReentrancyGuardContract.ts +0 -18
  93. package/src/abi/shared/interfaces/tests/IWBTCContract.ts +0 -35
  94. package/src/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.ts +0 -520
  95. package/src/abi/shared/json/motoswap/OWNABLE_ABI.ts +0 -38
  96. package/src/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.ts +0 -20
  97. package/src/abi/shared/json/tests/WBTC_ABI.ts +0 -73
  98. /package/build/abi/shared/interfaces/motoswap/{IAdministeredOP20.js → IMoto.js} +0 -0
  99. /package/build/abi/shared/interfaces/motoswap/{IMotoChefContract.js → IMotoChef.js} +0 -0
@@ -0,0 +1,485 @@
1
+ import { Address } from '@btc-vision/transaction';
2
+ import { CallResult, OPNetEvent } from '../../../../opnet';
3
+ import { IOP_NETContract } from '../opnet/IOP_NETContract';
4
+
5
+ // ------------------------------------------------------------------
6
+ // Event Definitions
7
+ // ------------------------------------------------------------------
8
+ export type OwnershipTransferredEvent = {
9
+ readonly previousOwner: Address;
10
+ readonly newOwner: Address;
11
+ };
12
+
13
+ // ------------------------------------------------------------------
14
+ // Call Results
15
+ // ------------------------------------------------------------------
16
+
17
+ /**
18
+ * @description Represents the result of the owner function call.
19
+ */
20
+ export type Owner = CallResult<
21
+ {
22
+ owner: Address;
23
+ },
24
+ OPNetEvent<never>[]
25
+ >;
26
+
27
+ /**
28
+ * @description Represents the result of the renounceOwnership function call.
29
+ */
30
+ export type RenounceOwnership = CallResult<
31
+ {
32
+ success: boolean;
33
+ },
34
+ OPNetEvent<OwnershipTransferredEvent>[]
35
+ >;
36
+
37
+ /**
38
+ * @description Represents the result of the transferOwnership function call.
39
+ */
40
+ export type TransferOwnership = CallResult<
41
+ {
42
+ success: boolean;
43
+ },
44
+ OPNetEvent<OwnershipTransferredEvent>[]
45
+ >;
46
+
47
+ // ------------------------------------------------------------------
48
+ // IOwnable
49
+ // ------------------------------------------------------------------
50
+ interface IOwnable extends IOP_NETContract {
51
+ owner(): Promise<Owner>;
52
+ renounceOwnership(): Promise<RenounceOwnership>;
53
+ transferOwnership(newOwner: Address): Promise<TransferOwnership>;
54
+ }
55
+
56
+ // ------------------------------------------------------------------
57
+ // Event Definitions
58
+ // ------------------------------------------------------------------
59
+ export type LogPoolAdditionEvent = {
60
+ readonly poolId: bigint;
61
+ readonly allocPoint: bigint;
62
+ readonly lpToken: Address;
63
+ };
64
+ export type LogInitEvent = {};
65
+ export type LogUpdatePoolEvent = {
66
+ readonly poolId: bigint;
67
+ readonly lastRewardBlock: bigint;
68
+ readonly lpSupply: bigint;
69
+ readonly accMotoPerShare: bigint;
70
+ };
71
+ export type StakedBTCEvent = {
72
+ readonly user: Address;
73
+ readonly netAmount: bigint;
74
+ readonly stakeTxHash: bigint;
75
+ readonly stakeIndex: bigint;
76
+ };
77
+ export type UnstakedBTCEvent = {
78
+ readonly user: Address;
79
+ readonly pendingMoto: bigint;
80
+ readonly storedTxHash: bigint;
81
+ readonly storedIndex: bigint;
82
+ };
83
+ export type LogSetPoolEvent = {
84
+ readonly poolId: bigint;
85
+ readonly allocPoint: bigint;
86
+ };
87
+ export type DepositEvent = {
88
+ readonly user: Address;
89
+ readonly poolId: bigint;
90
+ readonly amount: bigint;
91
+ readonly to: Address;
92
+ };
93
+ export type WithdrawEvent = {
94
+ readonly user: Address;
95
+ readonly poolId: bigint;
96
+ readonly amount: bigint;
97
+ readonly to: Address;
98
+ };
99
+ export type HarvestEvent = {
100
+ readonly user: Address;
101
+ readonly poolId: bigint;
102
+ readonly amount: bigint;
103
+ };
104
+ export type EmergencyWithdrawEvent = {
105
+ readonly user: Address;
106
+ readonly poolId: bigint;
107
+ readonly amount: bigint;
108
+ readonly to: Address;
109
+ };
110
+
111
+ // ------------------------------------------------------------------
112
+ // Call Results
113
+ // ------------------------------------------------------------------
114
+
115
+ /**
116
+ * @description Represents the result of the initialize function call.
117
+ */
118
+ export type Initialize = CallResult<
119
+ {
120
+ success: boolean;
121
+ },
122
+ OPNetEvent<LogPoolAdditionEvent | LogInitEvent>[]
123
+ >;
124
+
125
+ /**
126
+ * @description Represents the result of the totalAllocPoint function call.
127
+ */
128
+ export type TotalAllocPoint = CallResult<
129
+ {
130
+ totalAllocPoint: bigint;
131
+ },
132
+ OPNetEvent<never>[]
133
+ >;
134
+
135
+ /**
136
+ * @description Represents the result of the devAddress function call.
137
+ */
138
+ export type DevAddress = CallResult<
139
+ {
140
+ devAddress: Address;
141
+ },
142
+ OPNetEvent<never>[]
143
+ >;
144
+
145
+ /**
146
+ * @description Represents the result of the getMotoPerBlock function call.
147
+ */
148
+ export type GetMotoPerBlock = CallResult<
149
+ {
150
+ motoPerBlock: bigint;
151
+ },
152
+ OPNetEvent<never>[]
153
+ >;
154
+
155
+ /**
156
+ * @description Represents the result of the getBonusEndBlock function call.
157
+ */
158
+ export type GetBonusEndBlock = CallResult<
159
+ {
160
+ bonusEndBlock: bigint;
161
+ },
162
+ OPNetEvent<never>[]
163
+ >;
164
+
165
+ /**
166
+ * @description Represents the result of the getBonusMultiplier function call.
167
+ */
168
+ export type GetBonusMultiplier = CallResult<
169
+ {
170
+ bonusMultiplier: bigint;
171
+ },
172
+ OPNetEvent<never>[]
173
+ >;
174
+
175
+ /**
176
+ * @description Represents the result of the getLpTokens function call.
177
+ */
178
+ export type GetLpTokens = CallResult<
179
+ {
180
+ lpTokens: Address[];
181
+ },
182
+ OPNetEvent<never>[]
183
+ >;
184
+
185
+ /**
186
+ * @description Represents the result of the getPoolsLength function call.
187
+ */
188
+ export type GetPoolsLength = CallResult<
189
+ {
190
+ poolsLength: bigint;
191
+ },
192
+ OPNetEvent<never>[]
193
+ >;
194
+
195
+ /**
196
+ * @description Represents the result of the getLpToken function call.
197
+ */
198
+ export type GetLpToken = CallResult<
199
+ {
200
+ lpToken: Address;
201
+ },
202
+ OPNetEvent<never>[]
203
+ >;
204
+
205
+ /**
206
+ * @description Represents the result of the getPoolInfo function call.
207
+ */
208
+ export type GetPoolInfo = CallResult<
209
+ {
210
+ accMotoPerShare: bigint;
211
+ lastRewardBlock: bigint;
212
+ allocPoint: bigint;
213
+ },
214
+ OPNetEvent<never>[]
215
+ >;
216
+
217
+ /**
218
+ * @description Represents the result of the getUserInfo function call.
219
+ */
220
+ export type GetUserInfo = CallResult<
221
+ {
222
+ amount: bigint;
223
+ rewardDebt: bigint;
224
+ },
225
+ OPNetEvent<never>[]
226
+ >;
227
+
228
+ /**
229
+ * @description Represents the result of the getMultiplier function call.
230
+ */
231
+ export type GetMultiplier = CallResult<
232
+ {
233
+ multiplier: bigint;
234
+ },
235
+ OPNetEvent<never>[]
236
+ >;
237
+
238
+ /**
239
+ * @description Represents the result of the pendingMoto function call.
240
+ */
241
+ export type PendingMoto = CallResult<
242
+ {
243
+ pendingMoto: bigint;
244
+ },
245
+ OPNetEvent<never>[]
246
+ >;
247
+
248
+ /**
249
+ * @description Represents the result of the treasuryAddress function call.
250
+ */
251
+ export type TreasuryAddress = CallResult<
252
+ {
253
+ treasuryAddress: string;
254
+ },
255
+ OPNetEvent<never>[]
256
+ >;
257
+
258
+ /**
259
+ * @description Represents the result of the getStakingTxHash function call.
260
+ */
261
+ export type GetStakingTxHash = CallResult<
262
+ {
263
+ stakingTxHash: bigint;
264
+ },
265
+ OPNetEvent<never>[]
266
+ >;
267
+
268
+ /**
269
+ * @description Represents the result of the getStakingIndex function call.
270
+ */
271
+ export type GetStakingIndex = CallResult<
272
+ {
273
+ stakingIndex: bigint;
274
+ },
275
+ OPNetEvent<never>[]
276
+ >;
277
+
278
+ /**
279
+ * @description Represents the result of the totalBTCStaked function call.
280
+ */
281
+ export type TotalBTCStaked = CallResult<
282
+ {
283
+ totalBTCStaked: bigint;
284
+ },
285
+ OPNetEvent<never>[]
286
+ >;
287
+
288
+ /**
289
+ * @description Represents the result of the stakeBTC function call.
290
+ */
291
+ export type StakeBTC = CallResult<
292
+ {
293
+ success: boolean;
294
+ },
295
+ OPNetEvent<LogUpdatePoolEvent | StakedBTCEvent>[]
296
+ >;
297
+
298
+ /**
299
+ * @description Represents the result of the unstakeBTC function call.
300
+ */
301
+ export type UnstakeBTC = CallResult<
302
+ {
303
+ success: boolean;
304
+ },
305
+ OPNetEvent<LogUpdatePoolEvent | UnstakedBTCEvent>[]
306
+ >;
307
+
308
+ /**
309
+ * @description Represents the result of the add function call.
310
+ */
311
+ export type Add = CallResult<
312
+ {
313
+ success: boolean;
314
+ },
315
+ OPNetEvent<LogPoolAdditionEvent>[]
316
+ >;
317
+
318
+ /**
319
+ * @description Represents the result of the set function call.
320
+ */
321
+ export type Set = CallResult<
322
+ {
323
+ success: boolean;
324
+ },
325
+ OPNetEvent<LogSetPoolEvent>[]
326
+ >;
327
+
328
+ /**
329
+ * @description Represents the result of the updatePool function call.
330
+ */
331
+ export type UpdatePool = CallResult<
332
+ {
333
+ accMotoPerShare: bigint;
334
+ lastRewardBlock: bigint;
335
+ allocPoint: bigint;
336
+ },
337
+ OPNetEvent<LogUpdatePoolEvent>[]
338
+ >;
339
+
340
+ /**
341
+ * @description Represents the result of the massUpdatePools function call.
342
+ */
343
+ export type MassUpdatePools = CallResult<
344
+ {
345
+ success: boolean;
346
+ },
347
+ OPNetEvent<LogUpdatePoolEvent>[]
348
+ >;
349
+
350
+ /**
351
+ * @description Represents the result of the deposit function call.
352
+ */
353
+ export type Deposit = CallResult<
354
+ {
355
+ success: boolean;
356
+ },
357
+ OPNetEvent<LogUpdatePoolEvent | DepositEvent>[]
358
+ >;
359
+
360
+ /**
361
+ * @description Represents the result of the withdraw function call.
362
+ */
363
+ export type Withdraw = CallResult<
364
+ {
365
+ success: boolean;
366
+ },
367
+ OPNetEvent<LogUpdatePoolEvent | WithdrawEvent>[]
368
+ >;
369
+
370
+ /**
371
+ * @description Represents the result of the harvest function call.
372
+ */
373
+ export type Harvest = CallResult<
374
+ {
375
+ success: boolean;
376
+ },
377
+ OPNetEvent<LogUpdatePoolEvent | HarvestEvent>[]
378
+ >;
379
+
380
+ /**
381
+ * @description Represents the result of the withdrawAndHarvest function call.
382
+ */
383
+ export type WithdrawAndHarvest = CallResult<
384
+ {
385
+ success: boolean;
386
+ },
387
+ OPNetEvent<LogUpdatePoolEvent | WithdrawEvent | HarvestEvent>[]
388
+ >;
389
+
390
+ /**
391
+ * @description Represents the result of the emergencyWithdraw function call.
392
+ */
393
+ export type EmergencyWithdraw = CallResult<
394
+ {
395
+ success: boolean;
396
+ },
397
+ OPNetEvent<EmergencyWithdrawEvent>[]
398
+ >;
399
+
400
+ /**
401
+ * @description Represents the result of the setMotoPerBlock function call.
402
+ */
403
+ export type SetMotoPerBlock = CallResult<
404
+ {
405
+ success: boolean;
406
+ },
407
+ OPNetEvent<never>[]
408
+ >;
409
+
410
+ /**
411
+ * @description Represents the result of the setBonusEndBlock function call.
412
+ */
413
+ export type SetBonusEndBlock = CallResult<
414
+ {
415
+ success: boolean;
416
+ },
417
+ OPNetEvent<never>[]
418
+ >;
419
+
420
+ /**
421
+ * @description Represents the result of the setBonusMultiplier function call.
422
+ */
423
+ export type SetBonusMultiplier = CallResult<
424
+ {
425
+ success: boolean;
426
+ },
427
+ OPNetEvent<never>[]
428
+ >;
429
+
430
+ /**
431
+ * @description Represents the result of the setDev function call.
432
+ */
433
+ export type SetDev = CallResult<
434
+ {
435
+ success: boolean;
436
+ },
437
+ OPNetEvent<never>[]
438
+ >;
439
+
440
+ // ------------------------------------------------------------------
441
+ // IMotoChef
442
+ // ------------------------------------------------------------------
443
+ export interface IMotoChef extends IOwnable {
444
+ initialize(
445
+ motoAddress: Address,
446
+ premineAmount: bigint,
447
+ devAddress: Address,
448
+ motoPerBlock: bigint,
449
+ bonusEndBlock: bigint,
450
+ bonusMultiplier: bigint,
451
+ treasuryAddress: string,
452
+ BTCAllocPoint: bigint,
453
+ ): Promise<Initialize>;
454
+ totalAllocPoint(): Promise<TotalAllocPoint>;
455
+ devAddress(): Promise<DevAddress>;
456
+ getMotoPerBlock(): Promise<GetMotoPerBlock>;
457
+ getBonusEndBlock(): Promise<GetBonusEndBlock>;
458
+ getBonusMultiplier(): Promise<GetBonusMultiplier>;
459
+ getLpTokens(): Promise<GetLpTokens>;
460
+ getPoolsLength(): Promise<GetPoolsLength>;
461
+ getLpToken(poolId: bigint): Promise<GetLpToken>;
462
+ getPoolInfo(poolId: bigint): Promise<GetPoolInfo>;
463
+ getUserInfo(poolId: bigint, user: Address): Promise<GetUserInfo>;
464
+ getMultiplier(from: bigint, to: bigint): Promise<GetMultiplier>;
465
+ pendingMoto(poolId: bigint, user: Address): Promise<PendingMoto>;
466
+ treasuryAddress(): Promise<TreasuryAddress>;
467
+ getStakingTxHash(user: Address): Promise<GetStakingTxHash>;
468
+ getStakingIndex(user: Address): Promise<GetStakingIndex>;
469
+ totalBTCStaked(): Promise<TotalBTCStaked>;
470
+ stakeBTC(amount: bigint): Promise<StakeBTC>;
471
+ unstakeBTC(): Promise<UnstakeBTC>;
472
+ add(allocPoint: bigint, lpToken: Address): Promise<Add>;
473
+ set(poolId: bigint, allocPoint: bigint): Promise<Set>;
474
+ updatePool(poolId: bigint): Promise<UpdatePool>;
475
+ massUpdatePools(length: number, poolIds: bigint[]): Promise<MassUpdatePools>;
476
+ deposit(poolId: bigint, amount: bigint, to: Address): Promise<Deposit>;
477
+ withdraw(poolId: bigint, amount: bigint, to: Address): Promise<Withdraw>;
478
+ harvest(poolId: bigint, to: Address): Promise<Harvest>;
479
+ withdrawAndHarvest(poolId: bigint, amount: bigint, to: Address): Promise<WithdrawAndHarvest>;
480
+ emergencyWithdraw(poolId: bigint, to: Address): Promise<EmergencyWithdraw>;
481
+ setMotoPerBlock(motoPerBlock: bigint): Promise<SetMotoPerBlock>;
482
+ setBonusEndBlock(bonusEndBlock: bigint): Promise<SetBonusEndBlock>;
483
+ setBonusMultiplier(bonusMultiplier: bigint): Promise<SetBonusMultiplier>;
484
+ setDev(devAddress: Address): Promise<SetDev>;
485
+ }
@@ -31,11 +31,6 @@ export type SwapEvent = {
31
31
  readonly to: Address;
32
32
  };
33
33
 
34
- export type SyncEvent = {
35
- readonly reserve0: bigint;
36
- readonly reserve1: bigint;
37
- };
38
-
39
34
  /**
40
35
  * @description This interface represents a motoswap pool contract.
41
36
  * @interface IMotoswapPoolContract
@@ -1,6 +1,52 @@
1
1
  import { Address } from '@btc-vision/transaction';
2
- import { CallResult } from '../../../../opnet.js';
3
- import { IOwnableReentrancyGuardContract } from './IOwnableReentrancyGuardContract.js';
2
+ import { CallResult, IOP_NETContract } from '../../../../opnet.js';
3
+
4
+ export type Status = CallResult<{ status: bigint }>;
5
+
6
+ /**
7
+ * @description This interface represents the ReentrancyGuard contract.
8
+ * @interface IMotoswapReentrancyGuard
9
+ * @extends {IOP_NETContract}
10
+ * @category Contracts
11
+ *
12
+ */
13
+ interface IMotoswapReentrancyGuard extends IOP_NETContract {
14
+ /**
15
+ * @description Gets the current admin address.
16
+ * @returns {Status}
17
+ */
18
+ status(): Promise<Status>;
19
+ }
20
+
21
+ export type Admin = CallResult<{
22
+ adminAddress: Address;
23
+ }>;
24
+
25
+ export type ChangeAdmin = CallResult<{
26
+ success: boolean;
27
+ }>;
28
+
29
+ /**
30
+ * @description This interface represents the OwnableReentrancyGuard contract.
31
+ * @interface IMotoswapOwnableReentrancyGuard
32
+ * @extends {IOP_NETContract}
33
+ * @category Contracts
34
+ *
35
+ */
36
+ interface IMotoswapOwnableReentrancyGuard extends IMotoswapReentrancyGuard {
37
+ /**
38
+ * @description Gets the current admin address.
39
+ * @returns {Admin}
40
+ */
41
+ admin(): Promise<Admin>;
42
+
43
+ /**
44
+ * @description Changes the contract admin. Only callable by the current admin.
45
+ * @param {Address} newAdmin The new admin address.
46
+ * @returns {ChangeAdmin}
47
+ */
48
+ changeAdmin(newAdmin: Address): Promise<ChangeAdmin>;
49
+ }
4
50
 
5
51
  export type GetMotoAddress = CallResult<{
6
52
  motoAddress: Address;
@@ -82,10 +128,10 @@ export type RewardTokenRemovedEvent = {
82
128
  /**
83
129
  * @description This interface represents the MotoChef contract.
84
130
  * @interface IMotoswapStakingContract
85
- * @extends {IOwnableReentrancyGuardContract}
131
+ * @extends {IMotoswapOwnableReentrancyGuard}
86
132
  * @cathegory Contracts
87
133
  */
88
- export interface IMotoswapStakingContract extends IOwnableReentrancyGuardContract {
134
+ export interface IMotoswapStakingContract extends IMotoswapOwnableReentrancyGuard {
89
135
  /**
90
136
  * @description Gets the stake of a given user
91
137
  * @param address {Address} the address of the staker
@@ -45,6 +45,16 @@ export type UnlistEvent = {
45
45
  export type LiquidityReservedEvent = {
46
46
  readonly depositAddress: string;
47
47
  readonly amount: bigint;
48
+ readonly providerId: bigint;
49
+ };
50
+
51
+ export type ActivateProviderEvent = {
52
+ readonly providerId: bigint;
53
+ readonly listingAmount: bigint;
54
+ };
55
+
56
+ export type FulfilledProviderEvent = {
57
+ readonly providerId: bigint;
48
58
  };
49
59
 
50
60
  /** ------------------------------------------------------------------
@@ -58,7 +68,9 @@ export type ReserveNativeSwap = CallResult<
58
68
  {
59
69
  ok: boolean;
60
70
  },
61
- OPNetEvent<LiquidityReservedEvent | ReservationCreatedEvent | TransferEvent>[]
71
+ OPNetEvent<
72
+ LiquidityReservedEvent | ReservationCreatedEvent | TransferEvent | FulfilledProviderEvent
73
+ >[]
62
74
  >;
63
75
 
64
76
  /**
@@ -68,7 +80,9 @@ export type AddLiquidity = CallResult<
68
80
  {
69
81
  ok: boolean;
70
82
  },
71
- OPNetEvent<LiquidityAddedEvent | TransferEvent>[]
83
+ OPNetEvent<
84
+ LiquidityAddedEvent | TransferEvent | ActivateProviderEvent | FulfilledProviderEvent
85
+ >[]
72
86
  >;
73
87
 
74
88
  /**
@@ -78,7 +92,7 @@ export type RemoveLiquidity = CallResult<
78
92
  {
79
93
  ok: boolean;
80
94
  },
81
- OPNetEvent<LiquidityRemovedEvent | TransferEvent>[]
95
+ OPNetEvent<LiquidityRemovedEvent | TransferEvent | FulfilledProviderEvent>[]
82
96
  >;
83
97
 
84
98
  /**
@@ -98,7 +112,7 @@ export type CancelListing = CallResult<
98
112
  {
99
113
  ok: boolean;
100
114
  },
101
- OPNetEvent<UnlistEvent | TransferEvent>[]
115
+ OPNetEvent<UnlistEvent | TransferEvent | FulfilledProviderEvent>[]
102
116
  >;
103
117
 
104
118
  /**
@@ -139,7 +153,7 @@ export type Swap = CallResult<
139
153
  {
140
154
  ok: boolean;
141
155
  },
142
- OPNetEvent<SwapExecutedEvent | TransferEvent>[]
156
+ OPNetEvent<SwapExecutedEvent | TransferEvent | ActivateProviderEvent | FulfilledProviderEvent>[]
143
157
  >;
144
158
 
145
159
  /**
@@ -2,10 +2,7 @@ import { ABIDataTypes } from '@btc-vision/transaction';
2
2
  import { BitcoinAbiTypes } from '../../../BitcoinAbiTypes.js';
3
3
  import { BitcoinInterfaceAbi } from '../../../interfaces/BitcoinInterfaceAbi.js';
4
4
 
5
- /**
6
- * @category Events
7
- */
8
- export const StackingEvents: BitcoinInterfaceAbi = [
5
+ const StackingEvents: BitcoinInterfaceAbi = [
9
6
  {
10
7
  name: 'Stake',
11
8
  values: [
@@ -38,9 +35,6 @@ export const StackingEvents: BitcoinInterfaceAbi = [
38
35
  },
39
36
  ];
40
37
 
41
- /**
42
- * @category ABI
43
- */
44
38
  export const STAKING_ABI: BitcoinInterfaceAbi = [
45
39
  {
46
40
  name: 'stake',