opnet 1.3.2 → 1.3.3
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/{IAdministeredOP20.d.ts → IMoto.d.ts} +2 -2
- package/browser/abi/shared/interfaces/motoswap/IMotoChef.d.ts +208 -0
- package/browser/abi/shared/interfaces/motoswap/IMotoswapPoolContract.d.ts +0 -4
- package/browser/abi/shared/interfaces/motoswap/IMotoswapStakingContract.d.ts +19 -3
- package/browser/abi/shared/interfaces/motoswap/INativeSwapContract.d.ts +13 -5
- package/browser/abi/shared/interfaces/opnet/IOP_NETContract.d.ts +2 -2
- package/browser/abi/shared/json/generic/STAKING_ABI.d.ts +0 -1
- package/{build/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.d.ts → browser/abi/shared/json/motoswap/MOTOCHEF_ABI.d.ts} +1 -1
- package/browser/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.d.ts +0 -1
- package/browser/abi/shared/json/motoswap/MOTO_ABI.d.ts +2 -0
- package/browser/abi/shared/json/motoswap/NATIVE_SWAP_ABI.d.ts +0 -1
- package/browser/fetch/fetch-browser.d.ts +4 -0
- package/browser/fetch/fetch.d.ts +2 -0
- package/browser/index.js +1 -1
- package/browser/opnet.d.ts +10 -12
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/abi/shared/interfaces/motoswap/{IAdministeredOP20.d.ts → IMoto.d.ts} +2 -2
- package/build/abi/shared/interfaces/motoswap/IMotoChef.d.ts +208 -0
- package/build/abi/shared/interfaces/motoswap/IMotoswapPoolContract.d.ts +0 -4
- package/build/abi/shared/interfaces/motoswap/IMotoswapStakingContract.d.ts +19 -3
- package/build/abi/shared/interfaces/motoswap/INativeSwapContract.d.ts +13 -5
- package/build/abi/shared/interfaces/opnet/IOP_NETContract.d.ts +2 -2
- package/build/abi/shared/json/generic/STAKING_ABI.d.ts +0 -1
- package/build/abi/shared/json/generic/STAKING_ABI.js +1 -1
- package/{browser/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.d.ts → build/abi/shared/json/motoswap/MOTOCHEF_ABI.d.ts} +1 -1
- package/build/abi/shared/json/motoswap/MOTOCHEF_ABI.js +820 -0
- package/build/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.d.ts +0 -1
- package/build/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.js +45 -5
- package/build/abi/shared/json/motoswap/MOTO_ABI.d.ts +2 -0
- package/build/abi/shared/json/motoswap/{ADMINISTERD_OP_20_ABI.js → MOTO_ABI.js} +5 -13
- package/build/abi/shared/json/motoswap/NATIVE_SWAP_ABI.d.ts +0 -1
- package/build/abi/shared/json/motoswap/NATIVE_SWAP_ABI.js +15 -1
- package/build/abi/shared/json/opnet/OP_NET_ABI.js +7 -18
- package/build/contracts/Contract.js +2 -2
- package/build/fetch/fetch.d.ts +2 -0
- package/build/fetch/fetch.js +2 -0
- package/build/opnet.d.ts +10 -12
- package/build/opnet.js +10 -12
- package/build/providers/JSONRpcProvider.js +7 -1
- package/package.json +6 -4
- package/src/_version.ts +1 -1
- package/src/abi/shared/interfaces/motoswap/{IAdministeredOP20.ts → IMoto.ts} +4 -4
- package/src/abi/shared/interfaces/motoswap/IMotoChef.ts +485 -0
- package/src/abi/shared/interfaces/motoswap/IMotoswapPoolContract.ts +0 -5
- package/src/abi/shared/interfaces/motoswap/IMotoswapStakingContract.ts +50 -4
- package/src/abi/shared/interfaces/motoswap/INativeSwapContract.ts +19 -5
- package/src/abi/shared/interfaces/opnet/IOP_NETContract.ts +1 -1
- package/src/abi/shared/json/generic/STAKING_ABI.ts +1 -7
- package/src/abi/shared/json/motoswap/MOTOCHEF_ABI.ts +831 -0
- package/src/abi/shared/json/motoswap/MOTOSWAP_FACTORY_ABI.ts +0 -6
- package/src/abi/shared/json/motoswap/MOTOSWAP_POOL_ABI.ts +0 -6
- package/src/abi/shared/json/motoswap/MOTOSWAP_ROUTER_ABI.ts +0 -3
- package/src/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.ts +51 -9
- package/src/abi/shared/json/motoswap/{ADMINISTERD_OP_20_ABI.ts → MOTO_ABI.ts} +7 -15
- package/src/abi/shared/json/motoswap/NATIVE_SWAP_ABI.ts +15 -7
- package/src/abi/shared/json/opnet/OP_NET_ABI.ts +7 -24
- package/src/contracts/CallResult.ts +1 -0
- package/src/contracts/Contract.ts +3 -3
- package/src/fetch/fetch-browser.js +5 -0
- package/src/fetch/fetch.ts +3 -0
- package/src/opnet.ts +10 -12
- package/src/providers/JSONRpcProvider.ts +9 -4
- package/webpack.config.js +1 -0
- package/browser/abi/shared/interfaces/motoswap/IMotoChefContract.d.ts +0 -229
- package/browser/abi/shared/interfaces/motoswap/IOwnableContract.d.ts +0 -12
- package/browser/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.d.ts +0 -13
- package/browser/abi/shared/interfaces/motoswap/IReentrancyGuardContract.d.ts +0 -7
- package/browser/abi/shared/interfaces/tests/IWBTCContract.d.ts +0 -13
- package/browser/abi/shared/json/motoswap/ADMINISTERD_OP_20_ABI.d.ts +0 -3
- package/browser/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.d.ts +0 -4
- package/browser/abi/shared/json/motoswap/OWNABLE_ABI.d.ts +0 -3
- package/browser/abi/shared/json/tests/WBTC_ABI.d.ts +0 -3
- package/build/abi/shared/interfaces/motoswap/IMotoChefContract.d.ts +0 -229
- package/build/abi/shared/interfaces/motoswap/IOwnableContract.d.ts +0 -12
- package/build/abi/shared/interfaces/motoswap/IOwnableContract.js +0 -1
- package/build/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.d.ts +0 -13
- package/build/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.js +0 -1
- package/build/abi/shared/interfaces/motoswap/IReentrancyGuardContract.d.ts +0 -7
- package/build/abi/shared/interfaces/motoswap/IReentrancyGuardContract.js +0 -1
- package/build/abi/shared/interfaces/tests/IWBTCContract.d.ts +0 -13
- package/build/abi/shared/interfaces/tests/IWBTCContract.js +0 -1
- package/build/abi/shared/json/motoswap/ADMINISTERD_OP_20_ABI.d.ts +0 -3
- package/build/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.d.ts +0 -4
- package/build/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.js +0 -508
- package/build/abi/shared/json/motoswap/OWNABLE_ABI.d.ts +0 -3
- package/build/abi/shared/json/motoswap/OWNABLE_ABI.js +0 -35
- package/build/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.js +0 -15
- package/build/abi/shared/json/tests/WBTC_ABI.d.ts +0 -3
- package/build/abi/shared/json/tests/WBTC_ABI.js +0 -57
- package/src/abi/shared/interfaces/motoswap/IMotoChefContract.ts +0 -484
- package/src/abi/shared/interfaces/motoswap/IOwnableContract.ts +0 -32
- package/src/abi/shared/interfaces/motoswap/IOwnableReentrancyGuardContract.ts +0 -33
- package/src/abi/shared/interfaces/motoswap/IReentrancyGuardContract.ts +0 -18
- package/src/abi/shared/interfaces/tests/IWBTCContract.ts +0 -35
- package/src/abi/shared/json/motoswap/MOTOSWAP_MOTOCHEF_ABI.ts +0 -520
- package/src/abi/shared/json/motoswap/OWNABLE_ABI.ts +0 -38
- package/src/abi/shared/json/motoswap/REENTRANCY_GUARD_ABI.ts +0 -20
- package/src/abi/shared/json/tests/WBTC_ABI.ts +0 -73
- /package/build/abi/shared/interfaces/motoswap/{IAdministeredOP20.js → IMoto.js} +0 -0
- /package/build/abi/shared/interfaces/motoswap/{IMotoChefContract.js → IMotoChef.js} +0 -0
package/browser/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.3.
|
|
1
|
+
export declare const version = "1.3.3";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Address } from '@btc-vision/transaction';
|
|
2
|
-
import { IOP_20Contract } from '../opnet/IOP_20Contract';
|
|
3
2
|
import { CallResult } from '../../../../opnet';
|
|
3
|
+
import { IOP_20Contract } from '../opnet/IOP_20Contract';
|
|
4
4
|
export type Admin = CallResult<{
|
|
5
5
|
ADDRESS: Address;
|
|
6
6
|
}>;
|
|
@@ -13,7 +13,7 @@ export type AdminMint = CallResult<{
|
|
|
13
13
|
export type AdminBurn = CallResult<{
|
|
14
14
|
success: boolean;
|
|
15
15
|
}>;
|
|
16
|
-
export interface
|
|
16
|
+
export interface IMoto extends IOP_20Contract {
|
|
17
17
|
admin(): Promise<Admin>;
|
|
18
18
|
changeAdmin(newAdmin: Address): Promise<ChangeAdmin>;
|
|
19
19
|
adminMint(to: Address, amount: bigint): Promise<AdminMint>;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/transaction';
|
|
2
|
+
import { CallResult, OPNetEvent } from '../../../../opnet';
|
|
3
|
+
import { IOP_NETContract } from '../opnet/IOP_NETContract';
|
|
4
|
+
export type OwnershipTransferredEvent = {
|
|
5
|
+
readonly previousOwner: Address;
|
|
6
|
+
readonly newOwner: Address;
|
|
7
|
+
};
|
|
8
|
+
export type Owner = CallResult<{
|
|
9
|
+
owner: Address;
|
|
10
|
+
}, OPNetEvent<never>[]>;
|
|
11
|
+
export type RenounceOwnership = CallResult<{
|
|
12
|
+
success: boolean;
|
|
13
|
+
}, OPNetEvent<OwnershipTransferredEvent>[]>;
|
|
14
|
+
export type TransferOwnership = CallResult<{
|
|
15
|
+
success: boolean;
|
|
16
|
+
}, OPNetEvent<OwnershipTransferredEvent>[]>;
|
|
17
|
+
interface IOwnable extends IOP_NETContract {
|
|
18
|
+
owner(): Promise<Owner>;
|
|
19
|
+
renounceOwnership(): Promise<RenounceOwnership>;
|
|
20
|
+
transferOwnership(newOwner: Address): Promise<TransferOwnership>;
|
|
21
|
+
}
|
|
22
|
+
export type LogPoolAdditionEvent = {
|
|
23
|
+
readonly poolId: bigint;
|
|
24
|
+
readonly allocPoint: bigint;
|
|
25
|
+
readonly lpToken: Address;
|
|
26
|
+
};
|
|
27
|
+
export type LogInitEvent = {};
|
|
28
|
+
export type LogUpdatePoolEvent = {
|
|
29
|
+
readonly poolId: bigint;
|
|
30
|
+
readonly lastRewardBlock: bigint;
|
|
31
|
+
readonly lpSupply: bigint;
|
|
32
|
+
readonly accMotoPerShare: bigint;
|
|
33
|
+
};
|
|
34
|
+
export type StakedBTCEvent = {
|
|
35
|
+
readonly user: Address;
|
|
36
|
+
readonly netAmount: bigint;
|
|
37
|
+
readonly stakeTxHash: bigint;
|
|
38
|
+
readonly stakeIndex: bigint;
|
|
39
|
+
};
|
|
40
|
+
export type UnstakedBTCEvent = {
|
|
41
|
+
readonly user: Address;
|
|
42
|
+
readonly pendingMoto: bigint;
|
|
43
|
+
readonly storedTxHash: bigint;
|
|
44
|
+
readonly storedIndex: bigint;
|
|
45
|
+
};
|
|
46
|
+
export type LogSetPoolEvent = {
|
|
47
|
+
readonly poolId: bigint;
|
|
48
|
+
readonly allocPoint: bigint;
|
|
49
|
+
};
|
|
50
|
+
export type DepositEvent = {
|
|
51
|
+
readonly user: Address;
|
|
52
|
+
readonly poolId: bigint;
|
|
53
|
+
readonly amount: bigint;
|
|
54
|
+
readonly to: Address;
|
|
55
|
+
};
|
|
56
|
+
export type WithdrawEvent = {
|
|
57
|
+
readonly user: Address;
|
|
58
|
+
readonly poolId: bigint;
|
|
59
|
+
readonly amount: bigint;
|
|
60
|
+
readonly to: Address;
|
|
61
|
+
};
|
|
62
|
+
export type HarvestEvent = {
|
|
63
|
+
readonly user: Address;
|
|
64
|
+
readonly poolId: bigint;
|
|
65
|
+
readonly amount: bigint;
|
|
66
|
+
};
|
|
67
|
+
export type EmergencyWithdrawEvent = {
|
|
68
|
+
readonly user: Address;
|
|
69
|
+
readonly poolId: bigint;
|
|
70
|
+
readonly amount: bigint;
|
|
71
|
+
readonly to: Address;
|
|
72
|
+
};
|
|
73
|
+
export type Initialize = CallResult<{
|
|
74
|
+
success: boolean;
|
|
75
|
+
}, OPNetEvent<LogPoolAdditionEvent | LogInitEvent>[]>;
|
|
76
|
+
export type TotalAllocPoint = CallResult<{
|
|
77
|
+
totalAllocPoint: bigint;
|
|
78
|
+
}, OPNetEvent<never>[]>;
|
|
79
|
+
export type DevAddress = CallResult<{
|
|
80
|
+
devAddress: Address;
|
|
81
|
+
}, OPNetEvent<never>[]>;
|
|
82
|
+
export type GetMotoPerBlock = CallResult<{
|
|
83
|
+
motoPerBlock: bigint;
|
|
84
|
+
}, OPNetEvent<never>[]>;
|
|
85
|
+
export type GetBonusEndBlock = CallResult<{
|
|
86
|
+
bonusEndBlock: bigint;
|
|
87
|
+
}, OPNetEvent<never>[]>;
|
|
88
|
+
export type GetBonusMultiplier = CallResult<{
|
|
89
|
+
bonusMultiplier: bigint;
|
|
90
|
+
}, OPNetEvent<never>[]>;
|
|
91
|
+
export type GetLpTokens = CallResult<{
|
|
92
|
+
lpTokens: Address[];
|
|
93
|
+
}, OPNetEvent<never>[]>;
|
|
94
|
+
export type GetPoolsLength = CallResult<{
|
|
95
|
+
poolsLength: bigint;
|
|
96
|
+
}, OPNetEvent<never>[]>;
|
|
97
|
+
export type GetLpToken = CallResult<{
|
|
98
|
+
lpToken: Address;
|
|
99
|
+
}, OPNetEvent<never>[]>;
|
|
100
|
+
export type GetPoolInfo = CallResult<{
|
|
101
|
+
accMotoPerShare: bigint;
|
|
102
|
+
lastRewardBlock: bigint;
|
|
103
|
+
allocPoint: bigint;
|
|
104
|
+
}, OPNetEvent<never>[]>;
|
|
105
|
+
export type GetUserInfo = CallResult<{
|
|
106
|
+
amount: bigint;
|
|
107
|
+
rewardDebt: bigint;
|
|
108
|
+
}, OPNetEvent<never>[]>;
|
|
109
|
+
export type GetMultiplier = CallResult<{
|
|
110
|
+
multiplier: bigint;
|
|
111
|
+
}, OPNetEvent<never>[]>;
|
|
112
|
+
export type PendingMoto = CallResult<{
|
|
113
|
+
pendingMoto: bigint;
|
|
114
|
+
}, OPNetEvent<never>[]>;
|
|
115
|
+
export type TreasuryAddress = CallResult<{
|
|
116
|
+
treasuryAddress: string;
|
|
117
|
+
}, OPNetEvent<never>[]>;
|
|
118
|
+
export type GetStakingTxHash = CallResult<{
|
|
119
|
+
stakingTxHash: bigint;
|
|
120
|
+
}, OPNetEvent<never>[]>;
|
|
121
|
+
export type GetStakingIndex = CallResult<{
|
|
122
|
+
stakingIndex: bigint;
|
|
123
|
+
}, OPNetEvent<never>[]>;
|
|
124
|
+
export type TotalBTCStaked = CallResult<{
|
|
125
|
+
totalBTCStaked: bigint;
|
|
126
|
+
}, OPNetEvent<never>[]>;
|
|
127
|
+
export type StakeBTC = CallResult<{
|
|
128
|
+
success: boolean;
|
|
129
|
+
}, OPNetEvent<LogUpdatePoolEvent | StakedBTCEvent>[]>;
|
|
130
|
+
export type UnstakeBTC = CallResult<{
|
|
131
|
+
success: boolean;
|
|
132
|
+
}, OPNetEvent<LogUpdatePoolEvent | UnstakedBTCEvent>[]>;
|
|
133
|
+
export type Add = CallResult<{
|
|
134
|
+
success: boolean;
|
|
135
|
+
}, OPNetEvent<LogPoolAdditionEvent>[]>;
|
|
136
|
+
export type Set = CallResult<{
|
|
137
|
+
success: boolean;
|
|
138
|
+
}, OPNetEvent<LogSetPoolEvent>[]>;
|
|
139
|
+
export type UpdatePool = CallResult<{
|
|
140
|
+
accMotoPerShare: bigint;
|
|
141
|
+
lastRewardBlock: bigint;
|
|
142
|
+
allocPoint: bigint;
|
|
143
|
+
}, OPNetEvent<LogUpdatePoolEvent>[]>;
|
|
144
|
+
export type MassUpdatePools = CallResult<{
|
|
145
|
+
success: boolean;
|
|
146
|
+
}, OPNetEvent<LogUpdatePoolEvent>[]>;
|
|
147
|
+
export type Deposit = CallResult<{
|
|
148
|
+
success: boolean;
|
|
149
|
+
}, OPNetEvent<LogUpdatePoolEvent | DepositEvent>[]>;
|
|
150
|
+
export type Withdraw = CallResult<{
|
|
151
|
+
success: boolean;
|
|
152
|
+
}, OPNetEvent<LogUpdatePoolEvent | WithdrawEvent>[]>;
|
|
153
|
+
export type Harvest = CallResult<{
|
|
154
|
+
success: boolean;
|
|
155
|
+
}, OPNetEvent<LogUpdatePoolEvent | HarvestEvent>[]>;
|
|
156
|
+
export type WithdrawAndHarvest = CallResult<{
|
|
157
|
+
success: boolean;
|
|
158
|
+
}, OPNetEvent<LogUpdatePoolEvent | WithdrawEvent | HarvestEvent>[]>;
|
|
159
|
+
export type EmergencyWithdraw = CallResult<{
|
|
160
|
+
success: boolean;
|
|
161
|
+
}, OPNetEvent<EmergencyWithdrawEvent>[]>;
|
|
162
|
+
export type SetMotoPerBlock = CallResult<{
|
|
163
|
+
success: boolean;
|
|
164
|
+
}, OPNetEvent<never>[]>;
|
|
165
|
+
export type SetBonusEndBlock = CallResult<{
|
|
166
|
+
success: boolean;
|
|
167
|
+
}, OPNetEvent<never>[]>;
|
|
168
|
+
export type SetBonusMultiplier = CallResult<{
|
|
169
|
+
success: boolean;
|
|
170
|
+
}, OPNetEvent<never>[]>;
|
|
171
|
+
export type SetDev = CallResult<{
|
|
172
|
+
success: boolean;
|
|
173
|
+
}, OPNetEvent<never>[]>;
|
|
174
|
+
export interface IMotoChef extends IOwnable {
|
|
175
|
+
initialize(motoAddress: Address, premineAmount: bigint, devAddress: Address, motoPerBlock: bigint, bonusEndBlock: bigint, bonusMultiplier: bigint, treasuryAddress: string, BTCAllocPoint: bigint): Promise<Initialize>;
|
|
176
|
+
totalAllocPoint(): Promise<TotalAllocPoint>;
|
|
177
|
+
devAddress(): Promise<DevAddress>;
|
|
178
|
+
getMotoPerBlock(): Promise<GetMotoPerBlock>;
|
|
179
|
+
getBonusEndBlock(): Promise<GetBonusEndBlock>;
|
|
180
|
+
getBonusMultiplier(): Promise<GetBonusMultiplier>;
|
|
181
|
+
getLpTokens(): Promise<GetLpTokens>;
|
|
182
|
+
getPoolsLength(): Promise<GetPoolsLength>;
|
|
183
|
+
getLpToken(poolId: bigint): Promise<GetLpToken>;
|
|
184
|
+
getPoolInfo(poolId: bigint): Promise<GetPoolInfo>;
|
|
185
|
+
getUserInfo(poolId: bigint, user: Address): Promise<GetUserInfo>;
|
|
186
|
+
getMultiplier(from: bigint, to: bigint): Promise<GetMultiplier>;
|
|
187
|
+
pendingMoto(poolId: bigint, user: Address): Promise<PendingMoto>;
|
|
188
|
+
treasuryAddress(): Promise<TreasuryAddress>;
|
|
189
|
+
getStakingTxHash(user: Address): Promise<GetStakingTxHash>;
|
|
190
|
+
getStakingIndex(user: Address): Promise<GetStakingIndex>;
|
|
191
|
+
totalBTCStaked(): Promise<TotalBTCStaked>;
|
|
192
|
+
stakeBTC(amount: bigint): Promise<StakeBTC>;
|
|
193
|
+
unstakeBTC(): Promise<UnstakeBTC>;
|
|
194
|
+
add(allocPoint: bigint, lpToken: Address): Promise<Add>;
|
|
195
|
+
set(poolId: bigint, allocPoint: bigint): Promise<Set>;
|
|
196
|
+
updatePool(poolId: bigint): Promise<UpdatePool>;
|
|
197
|
+
massUpdatePools(length: number, poolIds: bigint[]): Promise<MassUpdatePools>;
|
|
198
|
+
deposit(poolId: bigint, amount: bigint, to: Address): Promise<Deposit>;
|
|
199
|
+
withdraw(poolId: bigint, amount: bigint, to: Address): Promise<Withdraw>;
|
|
200
|
+
harvest(poolId: bigint, to: Address): Promise<Harvest>;
|
|
201
|
+
withdrawAndHarvest(poolId: bigint, amount: bigint, to: Address): Promise<WithdrawAndHarvest>;
|
|
202
|
+
emergencyWithdraw(poolId: bigint, to: Address): Promise<EmergencyWithdraw>;
|
|
203
|
+
setMotoPerBlock(motoPerBlock: bigint): Promise<SetMotoPerBlock>;
|
|
204
|
+
setBonusEndBlock(bonusEndBlock: bigint): Promise<SetBonusEndBlock>;
|
|
205
|
+
setBonusMultiplier(bonusMultiplier: bigint): Promise<SetBonusMultiplier>;
|
|
206
|
+
setDev(devAddress: Address): Promise<SetDev>;
|
|
207
|
+
}
|
|
208
|
+
export {};
|
|
@@ -25,10 +25,6 @@ export type SwapEvent = {
|
|
|
25
25
|
readonly amount1Out: bigint;
|
|
26
26
|
readonly to: Address;
|
|
27
27
|
};
|
|
28
|
-
export type SyncEvent = {
|
|
29
|
-
readonly reserve0: bigint;
|
|
30
|
-
readonly reserve1: bigint;
|
|
31
|
-
};
|
|
32
28
|
export interface IMotoswapPoolContract extends Omit<IOP_20Contract, 'burn' | 'mint'> {
|
|
33
29
|
token0(): Promise<CallResult<{
|
|
34
30
|
token0: Address;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { Address } from '@btc-vision/transaction';
|
|
2
|
-
import { CallResult } from '../../../../opnet.js';
|
|
3
|
-
|
|
2
|
+
import { CallResult, IOP_NETContract } from '../../../../opnet.js';
|
|
3
|
+
export type Status = CallResult<{
|
|
4
|
+
status: bigint;
|
|
5
|
+
}>;
|
|
6
|
+
interface IMotoswapReentrancyGuard extends IOP_NETContract {
|
|
7
|
+
status(): Promise<Status>;
|
|
8
|
+
}
|
|
9
|
+
export type Admin = CallResult<{
|
|
10
|
+
adminAddress: Address;
|
|
11
|
+
}>;
|
|
12
|
+
export type ChangeAdmin = CallResult<{
|
|
13
|
+
success: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
interface IMotoswapOwnableReentrancyGuard extends IMotoswapReentrancyGuard {
|
|
16
|
+
admin(): Promise<Admin>;
|
|
17
|
+
changeAdmin(newAdmin: Address): Promise<ChangeAdmin>;
|
|
18
|
+
}
|
|
4
19
|
export type GetMotoAddress = CallResult<{
|
|
5
20
|
motoAddress: Address;
|
|
6
21
|
}>;
|
|
@@ -58,7 +73,7 @@ export type RewardTokenAddedEvent = {
|
|
|
58
73
|
export type RewardTokenRemovedEvent = {
|
|
59
74
|
readonly token: Address;
|
|
60
75
|
};
|
|
61
|
-
export interface IMotoswapStakingContract extends
|
|
76
|
+
export interface IMotoswapStakingContract extends IMotoswapOwnableReentrancyGuard {
|
|
62
77
|
balanceOf(address: Address): Promise<BalanceOf>;
|
|
63
78
|
totalSupply(): Promise<TotalSupply>;
|
|
64
79
|
motoAddress(): Promise<MotoAddress>;
|
|
@@ -76,3 +91,4 @@ export interface IMotoswapStakingContract extends IOwnableReentrancyGuardContrac
|
|
|
76
91
|
adminChangeLockupParameters(newLockupDuration: bigint, newMaxSlashingFeePercent: bigint, newBlocksPerOnePercentSlashingFeeReduction: bigint): Promise<AdminChangeLockupParameters>;
|
|
77
92
|
adminEnableEmergencyWithdrawals(): Promise<AdminEnableEmergencyWithdrawals>;
|
|
78
93
|
}
|
|
94
|
+
export {};
|
|
@@ -34,22 +34,30 @@ export type UnlistEvent = {
|
|
|
34
34
|
export type LiquidityReservedEvent = {
|
|
35
35
|
readonly depositAddress: string;
|
|
36
36
|
readonly amount: bigint;
|
|
37
|
+
readonly providerId: bigint;
|
|
38
|
+
};
|
|
39
|
+
export type ActivateProviderEvent = {
|
|
40
|
+
readonly providerId: bigint;
|
|
41
|
+
readonly listingAmount: bigint;
|
|
42
|
+
};
|
|
43
|
+
export type FulfilledProviderEvent = {
|
|
44
|
+
readonly providerId: bigint;
|
|
37
45
|
};
|
|
38
46
|
export type ReserveNativeSwap = CallResult<{
|
|
39
47
|
ok: boolean;
|
|
40
|
-
}, OPNetEvent<LiquidityReservedEvent | ReservationCreatedEvent | TransferEvent>[]>;
|
|
48
|
+
}, OPNetEvent<LiquidityReservedEvent | ReservationCreatedEvent | TransferEvent | FulfilledProviderEvent>[]>;
|
|
41
49
|
export type AddLiquidity = CallResult<{
|
|
42
50
|
ok: boolean;
|
|
43
|
-
}, OPNetEvent<LiquidityAddedEvent | TransferEvent>[]>;
|
|
51
|
+
}, OPNetEvent<LiquidityAddedEvent | TransferEvent | ActivateProviderEvent | FulfilledProviderEvent>[]>;
|
|
44
52
|
export type RemoveLiquidity = CallResult<{
|
|
45
53
|
ok: boolean;
|
|
46
|
-
}, OPNetEvent<LiquidityRemovedEvent | TransferEvent>[]>;
|
|
54
|
+
}, OPNetEvent<LiquidityRemovedEvent | TransferEvent | FulfilledProviderEvent>[]>;
|
|
47
55
|
export type ListLiquidity = CallResult<{
|
|
48
56
|
ok: boolean;
|
|
49
57
|
}, OPNetEvent<LiquidityListedEvent>[]>;
|
|
50
58
|
export type CancelListing = CallResult<{
|
|
51
59
|
ok: boolean;
|
|
52
|
-
}, OPNetEvent<UnlistEvent | TransferEvent>[]>;
|
|
60
|
+
}, OPNetEvent<UnlistEvent | TransferEvent | FulfilledProviderEvent>[]>;
|
|
53
61
|
export type CreatePool = CallResult<{
|
|
54
62
|
ok: boolean;
|
|
55
63
|
}, OPNetEvent<TransferEvent | LiquidityAddedEvent>[]>;
|
|
@@ -64,7 +72,7 @@ export type GetFees = CallResult<{
|
|
|
64
72
|
]>;
|
|
65
73
|
export type Swap = CallResult<{
|
|
66
74
|
ok: boolean;
|
|
67
|
-
}, OPNetEvent<SwapExecutedEvent | TransferEvent>[]>;
|
|
75
|
+
}, OPNetEvent<SwapExecutedEvent | TransferEvent | ActivateProviderEvent | FulfilledProviderEvent>[]>;
|
|
68
76
|
export type GetReserve = CallResult<{
|
|
69
77
|
liquidity: bigint;
|
|
70
78
|
reservedLiquidity: bigint;
|
|
@@ -2,7 +2,7 @@ import { Address } from '@btc-vision/transaction';
|
|
|
2
2
|
import { CallResult } from '../../../../contracts/CallResult.js';
|
|
3
3
|
import { BaseContractProperties } from '../../../interfaces/BaseContractProperties.js';
|
|
4
4
|
export interface IOP_NETContract extends BaseContractProperties {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
contractDeployer(): Promise<CallResult<{
|
|
6
|
+
contractDeployer: Address;
|
|
7
7
|
}>>;
|
|
8
8
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BitcoinInterfaceAbi } from '../../../interfaces/BitcoinInterfaceAbi.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const MOTOCHEF_ABI: BitcoinInterfaceAbi;
|