opnet 1.2.26 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/_version.d.ts +1 -1
- package/browser/abi/shared/interfaces/motoswap/IMotoChefContract.d.ts +101 -34
- package/browser/abi/shared/interfaces/motoswap/IMotoswapFactoryContract.d.ts +6 -0
- package/browser/abi/shared/interfaces/motoswap/IMotoswapPoolContract.d.ts +13 -1
- package/browser/abi/shared/interfaces/motoswap/IMotoswapStakingContract.d.ts +4 -1
- package/browser/abi/shared/interfaces/motoswap/INativeSwapContract.d.ts +3 -4
- package/browser/abi/shared/interfaces/opnet/IOP_20Contract.d.ts +1 -1
- package/browser/index.js +1 -1
- package/browser/providers/AbstractRpcProvider.d.ts +1 -1
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/abi/shared/interfaces/motoswap/IMotoChefContract.d.ts +101 -34
- package/build/abi/shared/interfaces/motoswap/IMotoswapFactoryContract.d.ts +6 -0
- package/build/abi/shared/interfaces/motoswap/IMotoswapPoolContract.d.ts +13 -1
- package/build/abi/shared/interfaces/motoswap/IMotoswapStakingContract.d.ts +4 -1
- package/build/abi/shared/interfaces/motoswap/INativeSwapContract.d.ts +3 -4
- package/build/abi/shared/interfaces/opnet/IOP_20Contract.d.ts +1 -1
- package/build/abi/shared/json/motoswap/MOTOSWAP_FACTORY_ABI.js +27 -0
- package/build/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.js +115 -50
- package/build/abi/shared/json/motoswap/MOTOSWAP_POOL_ABI.js +12 -1
- package/build/abi/shared/json/motoswap/MOTOSWAP_ROUTER_ABI.js +2 -2
- package/build/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.js +14 -6
- package/build/abi/shared/json/motoswap/NATIVE_SWAP_ABI.js +107 -363
- package/build/abi/shared/json/opnet/OP_20_ABI.js +1 -1
- package/build/contracts/Contract.js +2 -12
- package/build/contracts/TypeToStr.js +0 -1
- package/build/providers/AbstractRpcProvider.d.ts +1 -1
- package/build/providers/AbstractRpcProvider.js +8 -4
- package/package.json +13 -13
- package/src/_version.ts +1 -1
- package/src/abi/shared/interfaces/motoswap/IMotoChefContract.ts +147 -62
- package/src/abi/shared/interfaces/motoswap/IMotoswapFactoryContract.ts +6 -0
- package/src/abi/shared/interfaces/motoswap/IMotoswapPoolContract.ts +9 -1
- package/src/abi/shared/interfaces/motoswap/IMotoswapStakingContract.ts +12 -7
- package/src/abi/shared/interfaces/motoswap/INativeSwapContract.ts +31 -11
- package/src/abi/shared/interfaces/opnet/IOP_20Contract.ts +1 -1
- package/src/abi/shared/json/motoswap/MOTOSWAP_FACTORY_ABI.ts +27 -0
- package/src/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.ts +116 -51
- package/src/abi/shared/json/motoswap/MOTOSWAP_POOL_ABI.ts +12 -1
- package/src/abi/shared/json/motoswap/MOTOSWAP_ROUTER_ABI.ts +2 -2
- package/src/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.ts +15 -6
- package/src/abi/shared/json/motoswap/NATIVE_SWAP_ABI.ts +128 -375
- package/src/abi/shared/json/opnet/OP_20_ABI.ts +1 -1
- package/src/contracts/Contract.ts +2 -13
- package/src/contracts/TypeToStr.ts +0 -1
- package/src/providers/AbstractRpcProvider.ts +21 -32
|
@@ -4,6 +4,10 @@ import { OPNetEvent } from '../../../../contracts/OPNetEvent.js';
|
|
|
4
4
|
import { TransferEvent } from '../opnet/IOP_20Contract.js';
|
|
5
5
|
import { IOP_NETContract } from '../opnet/IOP_NETContract.js';
|
|
6
6
|
|
|
7
|
+
/** ------------------------------------------------------------------
|
|
8
|
+
* Event Definitions
|
|
9
|
+
* ------------------------------------------------------------------ */
|
|
10
|
+
|
|
7
11
|
export type LiquidityAddedEvent = {
|
|
8
12
|
readonly totalTokensContributed: bigint;
|
|
9
13
|
readonly virtualTokenExchanged: bigint;
|
|
@@ -43,6 +47,10 @@ export type LiquidityReservedEvent = {
|
|
|
43
47
|
readonly amount: bigint;
|
|
44
48
|
};
|
|
45
49
|
|
|
50
|
+
/** ------------------------------------------------------------------
|
|
51
|
+
* Call Results
|
|
52
|
+
* ------------------------------------------------------------------ */
|
|
53
|
+
|
|
46
54
|
/**
|
|
47
55
|
* @description Represents the result of the reserve function call.
|
|
48
56
|
*/
|
|
@@ -120,7 +128,6 @@ export type GetFees = CallResult<
|
|
|
120
128
|
{
|
|
121
129
|
reservationBaseFee: bigint;
|
|
122
130
|
priorityQueueBaseFee: bigint;
|
|
123
|
-
pricePerUserInPriorityQueueBTC: bigint;
|
|
124
131
|
},
|
|
125
132
|
[]
|
|
126
133
|
>;
|
|
@@ -151,7 +158,6 @@ export type GetReserve = CallResult<
|
|
|
151
158
|
|
|
152
159
|
/**
|
|
153
160
|
* @description Represents the result of the getQuote function call.
|
|
154
|
-
* Renamed currentPrice -> price.
|
|
155
161
|
*/
|
|
156
162
|
export type GetQuote = CallResult<
|
|
157
163
|
{
|
|
@@ -185,6 +191,10 @@ export type GetPriorityQueueCost = CallResult<
|
|
|
185
191
|
[]
|
|
186
192
|
>;
|
|
187
193
|
|
|
194
|
+
/** ------------------------------------------------------------------
|
|
195
|
+
* NativeSwap Interface
|
|
196
|
+
* ------------------------------------------------------------------ */
|
|
197
|
+
|
|
188
198
|
/**
|
|
189
199
|
* @description This interface represents the NativeSwap contract,
|
|
190
200
|
* including all new/updated methods and type definitions.
|
|
@@ -200,6 +210,7 @@ export interface INativeSwapContract extends IOP_NETContract {
|
|
|
200
210
|
* @param maximumAmountIn - The maximum amount of tokens to reserve.
|
|
201
211
|
* @param minimumAmountOut - The minimum amount of tokens expected out.
|
|
202
212
|
* @param forLP - Whether this reservation is for LP or not.
|
|
213
|
+
* @param activationDelay - Number of blocks before activation (if used).
|
|
203
214
|
* @returns {Promise<ReserveNativeSwap>}
|
|
204
215
|
*/
|
|
205
216
|
reserve(
|
|
@@ -207,6 +218,7 @@ export interface INativeSwapContract extends IOP_NETContract {
|
|
|
207
218
|
maximumAmountIn: bigint,
|
|
208
219
|
minimumAmountOut: bigint,
|
|
209
220
|
forLP: boolean,
|
|
221
|
+
activationDelay: number,
|
|
210
222
|
): Promise<ReserveNativeSwap>;
|
|
211
223
|
|
|
212
224
|
/**
|
|
@@ -252,6 +264,20 @@ export interface INativeSwapContract extends IOP_NETContract {
|
|
|
252
264
|
maxReservesIn5BlocksPercent: number,
|
|
253
265
|
): Promise<CreatePool>;
|
|
254
266
|
|
|
267
|
+
/**
|
|
268
|
+
* @description Creates a new liquidity pool with an approval signature (new).
|
|
269
|
+
* @param signature - Buffer for the signature.
|
|
270
|
+
* @param approveAmount - Amount to approve.
|
|
271
|
+
* @param nonce - Approval nonce.
|
|
272
|
+
* @param token - The token address.
|
|
273
|
+
* @param floorPrice - The floor price to set.
|
|
274
|
+
* @param initialLiquidity - The amount of liquidity to seed.
|
|
275
|
+
* @param receiver - The Bitcoin address for receiving payments.
|
|
276
|
+
* @param antiBotEnabledFor - Number of blocks for anti-bot protection.
|
|
277
|
+
* @param antiBotMaximumTokensPerReservation - Anti-bot max tokens per user.
|
|
278
|
+
* @param maxReservesIn5BlocksPercent - Cap on reserves in a short window.
|
|
279
|
+
* @returns {Promise<CreatePool>}
|
|
280
|
+
*/
|
|
255
281
|
createPoolWithSignature(
|
|
256
282
|
signature: Buffer,
|
|
257
283
|
approveAmount: bigint,
|
|
@@ -269,14 +295,9 @@ export interface INativeSwapContract extends IOP_NETContract {
|
|
|
269
295
|
* @description Sets the global fee parameters (new).
|
|
270
296
|
* @param reservationBaseFee - Base fee for a reservation.
|
|
271
297
|
* @param priorityQueueBaseFee - Base fee for priority queue usage.
|
|
272
|
-
* @param pricePerUserInPriorityQueueBTC - Additional cost per user in queue.
|
|
273
298
|
* @returns {Promise<SetFees>}
|
|
274
299
|
*/
|
|
275
|
-
setFees(
|
|
276
|
-
reservationBaseFee: bigint,
|
|
277
|
-
priorityQueueBaseFee: bigint,
|
|
278
|
-
pricePerUserInPriorityQueueBTC: bigint,
|
|
279
|
-
): Promise<SetFees>;
|
|
300
|
+
setFees(reservationBaseFee: bigint, priorityQueueBaseFee: bigint): Promise<SetFees>;
|
|
280
301
|
|
|
281
302
|
/**
|
|
282
303
|
* @description Retrieves the current fee parameters (new).
|
|
@@ -293,12 +314,11 @@ export interface INativeSwapContract extends IOP_NETContract {
|
|
|
293
314
|
addLiquidity(token: Address, receiver: string): Promise<AddLiquidity>;
|
|
294
315
|
|
|
295
316
|
/**
|
|
296
|
-
* @description Removes liquidity from the contract.
|
|
317
|
+
* @description Removes all liquidity from the contract for the given token.
|
|
297
318
|
* @param token - The address of the token to remove liquidity for.
|
|
298
|
-
* @param amount
|
|
299
319
|
* @returns {Promise<RemoveLiquidity>}
|
|
300
320
|
*/
|
|
301
|
-
removeLiquidity(token: Address
|
|
321
|
+
removeLiquidity(token: Address): Promise<RemoveLiquidity>;
|
|
302
322
|
|
|
303
323
|
/**
|
|
304
324
|
* @description Executes a swap operation.
|
|
@@ -106,7 +106,7 @@ export interface IOP_20Contract extends IOP_NETContract {
|
|
|
106
106
|
|
|
107
107
|
mint(address: Address, value: bigint): Promise<Mint>;
|
|
108
108
|
|
|
109
|
-
airdrop(
|
|
109
|
+
airdrop(map: AddressMap<bigint>): Promise<Airdrop>;
|
|
110
110
|
|
|
111
111
|
airdropWithAmount(amount: bigint, addresses: Address[]): Promise<AirdropWithAmount>;
|
|
112
112
|
}
|
|
@@ -75,6 +75,33 @@ export const MotoSwapFactoryAbi: BitcoinInterfaceAbi = [
|
|
|
75
75
|
],
|
|
76
76
|
type: BitcoinAbiTypes.Function,
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
name: 'setStakingContractAddress',
|
|
80
|
+
inputs: [
|
|
81
|
+
{
|
|
82
|
+
name: 'stakingContractAddress',
|
|
83
|
+
type: ABIDataTypes.ADDRESS,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
outputs: [
|
|
87
|
+
{
|
|
88
|
+
name: 'success',
|
|
89
|
+
type: ABIDataTypes.BOOL,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
type: BitcoinAbiTypes.Function,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'getStakingContractAddress',
|
|
96
|
+
inputs: [],
|
|
97
|
+
outputs: [
|
|
98
|
+
{
|
|
99
|
+
name: 'stakingContractAddress',
|
|
100
|
+
type: ABIDataTypes.ADDRESS,
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
type: BitcoinAbiTypes.Function,
|
|
104
|
+
},
|
|
78
105
|
|
|
79
106
|
...MotoSwapFactoryEvents,
|
|
80
107
|
|
|
@@ -17,7 +17,7 @@ export const MotoChefEvents: BitcoinInterfaceAbi = [
|
|
|
17
17
|
values: [
|
|
18
18
|
{
|
|
19
19
|
name: 'pid',
|
|
20
|
-
type: ABIDataTypes.
|
|
20
|
+
type: ABIDataTypes.UINT64,
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
name: 'allocPoint',
|
|
@@ -27,10 +27,6 @@ export const MotoChefEvents: BitcoinInterfaceAbi = [
|
|
|
27
27
|
name: 'lpToken',
|
|
28
28
|
type: ABIDataTypes.ADDRESS,
|
|
29
29
|
},
|
|
30
|
-
{
|
|
31
|
-
name: 'rewarder',
|
|
32
|
-
type: ABIDataTypes.ADDRESS,
|
|
33
|
-
},
|
|
34
30
|
],
|
|
35
31
|
},
|
|
36
32
|
{
|
|
@@ -39,20 +35,12 @@ export const MotoChefEvents: BitcoinInterfaceAbi = [
|
|
|
39
35
|
values: [
|
|
40
36
|
{
|
|
41
37
|
name: 'pid',
|
|
42
|
-
type: ABIDataTypes.
|
|
38
|
+
type: ABIDataTypes.UINT64,
|
|
43
39
|
},
|
|
44
40
|
{
|
|
45
41
|
name: 'allocPoint',
|
|
46
42
|
type: ABIDataTypes.UINT256,
|
|
47
43
|
},
|
|
48
|
-
{
|
|
49
|
-
name: 'rewarder',
|
|
50
|
-
type: ABIDataTypes.ADDRESS,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: 'overwrite',
|
|
54
|
-
type: ABIDataTypes.BOOL,
|
|
55
|
-
},
|
|
56
44
|
],
|
|
57
45
|
},
|
|
58
46
|
{
|
|
@@ -61,7 +49,7 @@ export const MotoChefEvents: BitcoinInterfaceAbi = [
|
|
|
61
49
|
values: [
|
|
62
50
|
{
|
|
63
51
|
name: 'pid',
|
|
64
|
-
type: ABIDataTypes.
|
|
52
|
+
type: ABIDataTypes.UINT64,
|
|
65
53
|
},
|
|
66
54
|
{
|
|
67
55
|
name: 'lastRewardBlock',
|
|
@@ -87,7 +75,7 @@ export const MotoChefEvents: BitcoinInterfaceAbi = [
|
|
|
87
75
|
},
|
|
88
76
|
{
|
|
89
77
|
name: 'pid',
|
|
90
|
-
type: ABIDataTypes.
|
|
78
|
+
type: ABIDataTypes.UINT64,
|
|
91
79
|
},
|
|
92
80
|
{
|
|
93
81
|
name: 'amount',
|
|
@@ -109,7 +97,7 @@ export const MotoChefEvents: BitcoinInterfaceAbi = [
|
|
|
109
97
|
},
|
|
110
98
|
{
|
|
111
99
|
name: 'pid',
|
|
112
|
-
type: ABIDataTypes.
|
|
100
|
+
type: ABIDataTypes.UINT64,
|
|
113
101
|
},
|
|
114
102
|
{
|
|
115
103
|
name: 'amount',
|
|
@@ -131,7 +119,7 @@ export const MotoChefEvents: BitcoinInterfaceAbi = [
|
|
|
131
119
|
},
|
|
132
120
|
{
|
|
133
121
|
name: 'pid',
|
|
134
|
-
type: ABIDataTypes.
|
|
122
|
+
type: ABIDataTypes.UINT64,
|
|
135
123
|
},
|
|
136
124
|
{
|
|
137
125
|
name: 'amount',
|
|
@@ -149,7 +137,7 @@ export const MotoChefEvents: BitcoinInterfaceAbi = [
|
|
|
149
137
|
},
|
|
150
138
|
{
|
|
151
139
|
name: 'pid',
|
|
152
|
-
type: ABIDataTypes.
|
|
140
|
+
type: ABIDataTypes.UINT64,
|
|
153
141
|
},
|
|
154
142
|
{
|
|
155
143
|
name: 'amount',
|
|
@@ -161,6 +149,50 @@ export const MotoChefEvents: BitcoinInterfaceAbi = [
|
|
|
161
149
|
},
|
|
162
150
|
],
|
|
163
151
|
},
|
|
152
|
+
{
|
|
153
|
+
name: 'StakeBTC',
|
|
154
|
+
type: BitcoinAbiTypes.Event,
|
|
155
|
+
values: [
|
|
156
|
+
{
|
|
157
|
+
name: 'user',
|
|
158
|
+
type: ABIDataTypes.ADDRESS,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: 'amount',
|
|
162
|
+
type: ABIDataTypes.UINT256,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'stakingTxId',
|
|
166
|
+
type: ABIDataTypes.UINT256,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'stakingIndex',
|
|
170
|
+
type: ABIDataTypes.UINT256,
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'UnstakeBTC',
|
|
176
|
+
type: BitcoinAbiTypes.Event,
|
|
177
|
+
values: [
|
|
178
|
+
{
|
|
179
|
+
name: 'user',
|
|
180
|
+
type: ABIDataTypes.ADDRESS,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: 'amount',
|
|
184
|
+
type: ABIDataTypes.UINT256,
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: 'stakingTxId',
|
|
188
|
+
type: ABIDataTypes.UINT256,
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: 'stakingIndex',
|
|
192
|
+
type: ABIDataTypes.UINT256,
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
},
|
|
164
196
|
];
|
|
165
197
|
|
|
166
198
|
const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
@@ -176,6 +208,8 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
176
208
|
{ name: 'motoPerBlock', type: ABIDataTypes.UINT256 },
|
|
177
209
|
{ name: 'bonusEndBlock', type: ABIDataTypes.UINT256 },
|
|
178
210
|
{ name: 'bonusMultiplier', type: ABIDataTypes.UINT256 },
|
|
211
|
+
{ name: 'treasuryAddress', type: ABIDataTypes.STRING },
|
|
212
|
+
{ name: 'btcAllocPoint', type: ABIDataTypes.UINT256 },
|
|
179
213
|
],
|
|
180
214
|
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
181
215
|
},
|
|
@@ -183,49 +217,45 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
183
217
|
name: 'getLpToken',
|
|
184
218
|
type: BitcoinAbiTypes.Function,
|
|
185
219
|
constant: true,
|
|
186
|
-
inputs: [{ name: 'pid', type: ABIDataTypes.
|
|
220
|
+
inputs: [{ name: 'pid', type: ABIDataTypes.UINT64 }],
|
|
187
221
|
outputs: [{ name: 'lpTokenAddress', type: ABIDataTypes.ADDRESS }],
|
|
188
222
|
},
|
|
189
223
|
{
|
|
190
|
-
name: '
|
|
224
|
+
name: 'getLpTokens',
|
|
191
225
|
type: BitcoinAbiTypes.Function,
|
|
192
226
|
constant: true,
|
|
193
|
-
inputs: [
|
|
194
|
-
outputs: [{ name: '
|
|
227
|
+
inputs: [],
|
|
228
|
+
outputs: [{ name: 'lpTokens', type: ABIDataTypes.ARRAY_OF_ADDRESSES }],
|
|
195
229
|
},
|
|
196
230
|
{
|
|
197
231
|
name: 'getPoolInfo',
|
|
198
232
|
type: BitcoinAbiTypes.Function,
|
|
199
233
|
constant: true,
|
|
200
|
-
inputs: [{ name: 'pid', type: ABIDataTypes.
|
|
234
|
+
inputs: [{ name: 'pid', type: ABIDataTypes.UINT64 }],
|
|
201
235
|
outputs: [
|
|
202
|
-
{ name: 'allocPoint', type: ABIDataTypes.UINT64 },
|
|
203
|
-
{ name: 'lastRewardBlock', type: ABIDataTypes.UINT64 },
|
|
204
236
|
{ name: 'accMotoPerShare', type: ABIDataTypes.UINT256 },
|
|
237
|
+
{ name: 'lastRewardBlock', type: ABIDataTypes.UINT64 },
|
|
238
|
+
{ name: 'allocPoint', type: ABIDataTypes.UINT64 },
|
|
205
239
|
],
|
|
206
240
|
},
|
|
207
241
|
{
|
|
208
|
-
name: '
|
|
242
|
+
name: 'getPoolsLength',
|
|
209
243
|
type: BitcoinAbiTypes.Function,
|
|
210
244
|
constant: true,
|
|
211
245
|
inputs: [],
|
|
212
|
-
outputs: [
|
|
213
|
-
{ name: 'poolLength', type: ABIDataTypes.UINT32 },
|
|
214
|
-
{ name: 'poolsData', type: ABIDataTypes.BYTES },
|
|
215
|
-
],
|
|
246
|
+
outputs: [{ name: 'poolLength', type: ABIDataTypes.UINT64 }],
|
|
216
247
|
},
|
|
217
248
|
{
|
|
218
249
|
name: 'getUserInfo',
|
|
219
250
|
type: BitcoinAbiTypes.Function,
|
|
220
251
|
constant: true,
|
|
221
252
|
inputs: [
|
|
222
|
-
{ name: 'pid', type: ABIDataTypes.
|
|
253
|
+
{ name: 'pid', type: ABIDataTypes.UINT64 },
|
|
223
254
|
{ name: 'user', type: ABIDataTypes.ADDRESS },
|
|
224
255
|
],
|
|
225
256
|
outputs: [
|
|
226
257
|
{ name: 'amount', type: ABIDataTypes.UINT256 },
|
|
227
|
-
|
|
228
|
-
{ name: 'rewardDebt', type: ABIDataTypes.UINT256 },
|
|
258
|
+
{ name: 'rewardDebt', type: ABIDataTypes.INT128 },
|
|
229
259
|
],
|
|
230
260
|
},
|
|
231
261
|
{
|
|
@@ -257,11 +287,32 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
257
287
|
outputs: [{ name: 'bonusEndBlock', type: ABIDataTypes.UINT256 }],
|
|
258
288
|
},
|
|
259
289
|
{
|
|
260
|
-
name: '
|
|
290
|
+
name: 'totalBtcStaked',
|
|
291
|
+
type: BitcoinAbiTypes.Function,
|
|
292
|
+
constant: true,
|
|
293
|
+
inputs: [],
|
|
294
|
+
outputs: [{ name: 'totalBtcStaked', type: ABIDataTypes.UINT256 }],
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: 'treasuryAddress',
|
|
298
|
+
type: BitcoinAbiTypes.Function,
|
|
299
|
+
constant: true,
|
|
300
|
+
inputs: [],
|
|
301
|
+
outputs: [{ name: 'treasuryAddress', type: ABIDataTypes.STRING }],
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
name: 'getStakingTxId',
|
|
261
305
|
type: BitcoinAbiTypes.Function,
|
|
262
306
|
constant: true,
|
|
263
307
|
inputs: [],
|
|
264
|
-
outputs: [{ name: '
|
|
308
|
+
outputs: [{ name: 'stakingTxId', type: ABIDataTypes.UINT256 }],
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
name: 'getStakingIndex',
|
|
312
|
+
type: BitcoinAbiTypes.Function,
|
|
313
|
+
constant: true,
|
|
314
|
+
inputs: [],
|
|
315
|
+
outputs: [{ name: 'stakingIndex', type: ABIDataTypes.UINT256 }],
|
|
265
316
|
},
|
|
266
317
|
{
|
|
267
318
|
name: 'setMotoPerBlock',
|
|
@@ -295,7 +346,6 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
295
346
|
inputs: [
|
|
296
347
|
{ name: 'allocPoint', type: ABIDataTypes.UINT256 },
|
|
297
348
|
{ name: 'lpToken', type: ABIDataTypes.ADDRESS },
|
|
298
|
-
{ name: 'rewarder', type: ABIDataTypes.ADDRESS },
|
|
299
349
|
],
|
|
300
350
|
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
301
351
|
},
|
|
@@ -305,10 +355,8 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
305
355
|
constant: false,
|
|
306
356
|
payable: false,
|
|
307
357
|
inputs: [
|
|
308
|
-
{ name: 'pid', type: ABIDataTypes.
|
|
358
|
+
{ name: 'pid', type: ABIDataTypes.UINT64 },
|
|
309
359
|
{ name: 'allocPoint', type: ABIDataTypes.UINT256 },
|
|
310
|
-
{ name: 'rewarder', type: ABIDataTypes.ADDRESS },
|
|
311
|
-
{ name: 'overwrite', type: ABIDataTypes.BOOL },
|
|
312
360
|
],
|
|
313
361
|
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
314
362
|
},
|
|
@@ -325,7 +373,7 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
325
373
|
type: BitcoinAbiTypes.Function,
|
|
326
374
|
constant: false,
|
|
327
375
|
payable: false,
|
|
328
|
-
inputs: [{ name: 'pid', type: ABIDataTypes.
|
|
376
|
+
inputs: [{ name: 'pid', type: ABIDataTypes.UINT64 }],
|
|
329
377
|
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
330
378
|
},
|
|
331
379
|
{
|
|
@@ -345,7 +393,7 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
345
393
|
constant: false,
|
|
346
394
|
payable: false,
|
|
347
395
|
inputs: [
|
|
348
|
-
{ name: 'pid', type: ABIDataTypes.
|
|
396
|
+
{ name: 'pid', type: ABIDataTypes.UINT64 },
|
|
349
397
|
{ name: 'user', type: ABIDataTypes.ADDRESS },
|
|
350
398
|
],
|
|
351
399
|
outputs: [{ name: 'pendingMoto', type: ABIDataTypes.UINT256 }],
|
|
@@ -357,7 +405,7 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
357
405
|
payable: false,
|
|
358
406
|
inputs: [
|
|
359
407
|
{ name: 'length', type: ABIDataTypes.UINT32 },
|
|
360
|
-
{ name: 'pids', type: ABIDataTypes.
|
|
408
|
+
{ name: 'pids', type: ABIDataTypes.ARRAY_OF_UINT64 },
|
|
361
409
|
],
|
|
362
410
|
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
363
411
|
},
|
|
@@ -366,11 +414,11 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
366
414
|
type: BitcoinAbiTypes.Function,
|
|
367
415
|
constant: false,
|
|
368
416
|
payable: false,
|
|
369
|
-
inputs: [{ name: 'pid', type: ABIDataTypes.
|
|
417
|
+
inputs: [{ name: 'pid', type: ABIDataTypes.UINT64 }],
|
|
370
418
|
outputs: [
|
|
371
|
-
{ name: 'allocPoint', type: ABIDataTypes.UINT64 },
|
|
372
|
-
{ name: 'lastRewardBlock', type: ABIDataTypes.UINT64 },
|
|
373
419
|
{ name: 'accMotoPerShare', type: ABIDataTypes.UINT256 },
|
|
420
|
+
{ name: 'lastRewardBlock', type: ABIDataTypes.UINT64 },
|
|
421
|
+
{ name: 'allocPoint', type: ABIDataTypes.UINT64 },
|
|
374
422
|
],
|
|
375
423
|
},
|
|
376
424
|
{
|
|
@@ -379,7 +427,7 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
379
427
|
constant: false,
|
|
380
428
|
payable: false,
|
|
381
429
|
inputs: [
|
|
382
|
-
{ name: 'pid', type: ABIDataTypes.
|
|
430
|
+
{ name: 'pid', type: ABIDataTypes.UINT64 },
|
|
383
431
|
{ name: 'amount', type: ABIDataTypes.UINT256 },
|
|
384
432
|
{ name: 'to', type: ABIDataTypes.ADDRESS },
|
|
385
433
|
],
|
|
@@ -391,7 +439,7 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
391
439
|
constant: false,
|
|
392
440
|
payable: false,
|
|
393
441
|
inputs: [
|
|
394
|
-
{ name: 'pid', type: ABIDataTypes.
|
|
442
|
+
{ name: 'pid', type: ABIDataTypes.UINT64 },
|
|
395
443
|
{ name: 'amount', type: ABIDataTypes.UINT256 },
|
|
396
444
|
{ name: 'to', type: ABIDataTypes.ADDRESS },
|
|
397
445
|
],
|
|
@@ -403,7 +451,7 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
403
451
|
constant: false,
|
|
404
452
|
payable: false,
|
|
405
453
|
inputs: [
|
|
406
|
-
{ name: 'pid', type: ABIDataTypes.
|
|
454
|
+
{ name: 'pid', type: ABIDataTypes.UINT64 },
|
|
407
455
|
{ name: 'to', type: ABIDataTypes.ADDRESS },
|
|
408
456
|
],
|
|
409
457
|
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
@@ -414,7 +462,7 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
414
462
|
constant: false,
|
|
415
463
|
payable: false,
|
|
416
464
|
inputs: [
|
|
417
|
-
{ name: 'pid', type: ABIDataTypes.
|
|
465
|
+
{ name: 'pid', type: ABIDataTypes.UINT64 },
|
|
418
466
|
{ name: 'amount', type: ABIDataTypes.UINT256 },
|
|
419
467
|
{ name: 'to', type: ABIDataTypes.ADDRESS },
|
|
420
468
|
],
|
|
@@ -426,7 +474,7 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
426
474
|
constant: false,
|
|
427
475
|
payable: false,
|
|
428
476
|
inputs: [
|
|
429
|
-
{ name: 'pid', type: ABIDataTypes.
|
|
477
|
+
{ name: 'pid', type: ABIDataTypes.UINT64 },
|
|
430
478
|
{ name: 'to', type: ABIDataTypes.ADDRESS },
|
|
431
479
|
],
|
|
432
480
|
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
@@ -439,6 +487,23 @@ const MOTOCHEF_ABI: BitcoinInterfaceAbi = [
|
|
|
439
487
|
inputs: [{ name: 'devaddr', type: ABIDataTypes.ADDRESS }],
|
|
440
488
|
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
441
489
|
},
|
|
490
|
+
{
|
|
491
|
+
name: 'stakeBtc',
|
|
492
|
+
type: BitcoinAbiTypes.Function,
|
|
493
|
+
constant: false,
|
|
494
|
+
payable: false,
|
|
495
|
+
inputs: [{ name: 'stakeAmount', type: ABIDataTypes.UINT256 }],
|
|
496
|
+
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: 'unstakeBtc',
|
|
500
|
+
type: BitcoinAbiTypes.Function,
|
|
501
|
+
constant: false,
|
|
502
|
+
payable: false,
|
|
503
|
+
inputs: [],
|
|
504
|
+
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
505
|
+
},
|
|
506
|
+
|
|
442
507
|
// Events
|
|
443
508
|
...MotoChefEvents,
|
|
444
509
|
|
|
@@ -241,7 +241,7 @@ export const MotoswapPoolAbi: BitcoinInterfaceAbi = [
|
|
|
241
241
|
outputs: [
|
|
242
242
|
{
|
|
243
243
|
name: 'blockTimestampLast',
|
|
244
|
-
type: ABIDataTypes.
|
|
244
|
+
type: ABIDataTypes.UINT256,
|
|
245
245
|
},
|
|
246
246
|
],
|
|
247
247
|
type: BitcoinAbiTypes.Function,
|
|
@@ -257,6 +257,17 @@ export const MotoswapPoolAbi: BitcoinInterfaceAbi = [
|
|
|
257
257
|
],
|
|
258
258
|
type: BitcoinAbiTypes.Function,
|
|
259
259
|
},
|
|
260
|
+
{
|
|
261
|
+
name: 'MINIMUM_LIQUIDITY',
|
|
262
|
+
inputs: [],
|
|
263
|
+
outputs: [
|
|
264
|
+
{
|
|
265
|
+
name: 'MINIMUM_LIQUIDITY',
|
|
266
|
+
type: ABIDataTypes.UINT256,
|
|
267
|
+
},
|
|
268
|
+
],
|
|
269
|
+
type: BitcoinAbiTypes.Function,
|
|
270
|
+
},
|
|
260
271
|
|
|
261
272
|
// Overwrites
|
|
262
273
|
{
|
|
@@ -197,7 +197,7 @@ export const MOTOSWAP_ROUTER_ABI: BitcoinInterfaceAbi = [
|
|
|
197
197
|
outputs: [
|
|
198
198
|
{
|
|
199
199
|
name: 'amountsOut',
|
|
200
|
-
type: ABIDataTypes.
|
|
200
|
+
type: ABIDataTypes.ARRAY_OF_UINT256,
|
|
201
201
|
},
|
|
202
202
|
],
|
|
203
203
|
type: BitcoinAbiTypes.Function,
|
|
@@ -217,7 +217,7 @@ export const MOTOSWAP_ROUTER_ABI: BitcoinInterfaceAbi = [
|
|
|
217
217
|
outputs: [
|
|
218
218
|
{
|
|
219
219
|
name: 'amountsIn',
|
|
220
|
-
type: ABIDataTypes.
|
|
220
|
+
type: ABIDataTypes.ARRAY_OF_UINT256,
|
|
221
221
|
},
|
|
222
222
|
],
|
|
223
223
|
type: BitcoinAbiTypes.Function,
|
|
@@ -30,18 +30,18 @@ export const MotoswapStakingEvents: BitcoinInterfaceAbi = [
|
|
|
30
30
|
|
|
31
31
|
export const MOTOSWAP_STAKING_ABI: BitcoinInterfaceAbi = [
|
|
32
32
|
{
|
|
33
|
-
name: '
|
|
33
|
+
name: 'balanceOf',
|
|
34
34
|
type: BitcoinAbiTypes.Function,
|
|
35
35
|
constant: true,
|
|
36
|
-
inputs: [],
|
|
37
|
-
outputs: [{ name: '
|
|
36
|
+
inputs: [{ name: 'address', type: ABIDataTypes.ADDRESS }],
|
|
37
|
+
outputs: [{ name: 'balance', type: ABIDataTypes.UINT256 }],
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
name: '
|
|
40
|
+
name: 'motoAddress',
|
|
41
41
|
type: BitcoinAbiTypes.Function,
|
|
42
42
|
constant: true,
|
|
43
|
-
inputs: [
|
|
44
|
-
outputs: [{ name: '
|
|
43
|
+
inputs: [],
|
|
44
|
+
outputs: [{ name: 'motoAddress', type: ABIDataTypes.ADDRESS }],
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
name: 'totalSupply',
|
|
@@ -154,6 +154,15 @@ export const MOTOSWAP_STAKING_ABI: BitcoinInterfaceAbi = [
|
|
|
154
154
|
],
|
|
155
155
|
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
156
156
|
},
|
|
157
|
+
{
|
|
158
|
+
name: 'adminEnableEmergencyWithdrawals',
|
|
159
|
+
type: BitcoinAbiTypes.Function,
|
|
160
|
+
constant: false,
|
|
161
|
+
payable: false,
|
|
162
|
+
inputs: [],
|
|
163
|
+
outputs: [{ name: 'success', type: ABIDataTypes.BOOL }],
|
|
164
|
+
},
|
|
165
|
+
|
|
157
166
|
// Events
|
|
158
167
|
...MotoswapStakingEvents,
|
|
159
168
|
|