opnet 1.2.24 → 1.2.26
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/IMotoswapStakingContract.d.ts +75 -0
- package/browser/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.d.ts +3 -0
- package/browser/index.js +1 -1
- package/browser/providers/AbstractRpcProvider.d.ts +3 -1
- package/browser/providers/interfaces/JSONRpcMethods.d.ts +4 -4
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/abi/shared/interfaces/motoswap/IMotoswapStakingContract.d.ts +75 -0
- package/build/abi/shared/interfaces/motoswap/IMotoswapStakingContract.js +1 -0
- package/build/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.d.ts +3 -0
- package/build/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.js +158 -0
- package/build/contracts/CallResult.js +3 -1
- package/build/contracts/Contract.js +10 -0
- package/build/contracts/TypeToStr.js +1 -0
- package/build/providers/AbstractRpcProvider.d.ts +3 -1
- package/build/providers/AbstractRpcProvider.js +24 -4
- package/build/providers/interfaces/JSONRpcMethods.d.ts +4 -4
- package/build/providers/interfaces/JSONRpcMethods.js +3 -3
- package/package.json +108 -108
- package/src/_version.ts +1 -1
- package/src/abi/shared/interfaces/motoswap/IMotoswapStakingContract.ts +200 -0
- package/src/abi/shared/json/motoswap/MOTOSWAP_STAKING_ABI.ts +168 -0
- package/src/contracts/CallResult.ts +3 -1
- package/src/contracts/Contract.ts +10 -0
- package/src/contracts/TypeToStr.ts +1 -0
- package/src/providers/AbstractRpcProvider.ts +48 -5
- package/src/providers/interfaces/JSONRpcMethods.ts +7 -10
package/browser/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.2.
|
|
1
|
+
export declare const version = "1.2.26";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/transaction';
|
|
2
|
+
import { CallResult } from '../../../../opnet.js';
|
|
3
|
+
import { IOwnableReentrancyGuardContract } from './IOwnableReentrancyGuardContract.js';
|
|
4
|
+
export type GetMotoAddress = CallResult<{
|
|
5
|
+
motoAddress: Address;
|
|
6
|
+
}>;
|
|
7
|
+
export type BalanceOf = CallResult<{
|
|
8
|
+
balance: bigint;
|
|
9
|
+
}>;
|
|
10
|
+
export type TotalSupply = CallResult<{
|
|
11
|
+
totalSupply: bigint;
|
|
12
|
+
}>;
|
|
13
|
+
export type LastInteractedBlock = CallResult<{
|
|
14
|
+
lastInteractedBlock: bigint;
|
|
15
|
+
}>;
|
|
16
|
+
export type RewardDebt = CallResult<{
|
|
17
|
+
rewardDebt: bigint;
|
|
18
|
+
}>;
|
|
19
|
+
export type RewardBalances = CallResult<{
|
|
20
|
+
rewardBalance: bigint;
|
|
21
|
+
}>;
|
|
22
|
+
export type CalculateSlashingFee = CallResult<{
|
|
23
|
+
slashingFee: bigint;
|
|
24
|
+
}>;
|
|
25
|
+
export type EnabledRewardTokens = CallResult<{
|
|
26
|
+
enabledRewardTokens: Address[];
|
|
27
|
+
}>;
|
|
28
|
+
export type Stake = CallResult<{
|
|
29
|
+
success: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
export type Unstake = CallResult<{
|
|
32
|
+
success: boolean;
|
|
33
|
+
}>;
|
|
34
|
+
export type ClaimRewards = CallResult<{
|
|
35
|
+
success: boolean;
|
|
36
|
+
}>;
|
|
37
|
+
export type AdminAddRewardToken = CallResult<{
|
|
38
|
+
success: boolean;
|
|
39
|
+
}>;
|
|
40
|
+
export type AdminRemoveRewardToken = CallResult<{
|
|
41
|
+
success: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
export type AdminChangeMotoAddress = CallResult<{
|
|
44
|
+
success: boolean;
|
|
45
|
+
}>;
|
|
46
|
+
export type AdminChangeLockupParameters = CallResult<{
|
|
47
|
+
success: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
export type AdminEnableEmergencyWithdrawals = CallResult<{
|
|
50
|
+
success: boolean;
|
|
51
|
+
}>;
|
|
52
|
+
export type RewardTokenAddedEvent = {
|
|
53
|
+
readonly token: Address;
|
|
54
|
+
};
|
|
55
|
+
export type RewardTokenRemovedEvent = {
|
|
56
|
+
readonly token: Address;
|
|
57
|
+
};
|
|
58
|
+
export interface IMotoswapStakingContract extends IOwnableReentrancyGuardContract {
|
|
59
|
+
getMotoAddress(): Promise<GetMotoAddress>;
|
|
60
|
+
balanceOf(address: Address): Promise<BalanceOf>;
|
|
61
|
+
totalSupply(): Promise<TotalSupply>;
|
|
62
|
+
lastInteractedBlock(address: Address): Promise<LastInteractedBlock>;
|
|
63
|
+
rewardDebt(user: Address, rewardToken: Address): Promise<RewardDebt>;
|
|
64
|
+
rewardBalances(user: Address): Promise<RewardBalances>;
|
|
65
|
+
calculateSlashingFee(user: Address, amount: bigint): Promise<CalculateSlashingFee>;
|
|
66
|
+
enabledRewardTokens(): Promise<EnabledRewardTokens>;
|
|
67
|
+
stake(amount: bigint): Promise<Stake>;
|
|
68
|
+
unstake(): Promise<Unstake>;
|
|
69
|
+
claimRewards(): Promise<ClaimRewards>;
|
|
70
|
+
adminAddRewardToken(token: Address): Promise<AdminAddRewardToken>;
|
|
71
|
+
adminRemoveRewardToken(token: Address): Promise<AdminAddRewardToken>;
|
|
72
|
+
adminChangeMotoAddress(token: Address): Promise<AdminAddRewardToken>;
|
|
73
|
+
adminChangeLockupParameters(newLockupDuration: bigint, newMaxSlashingFeePercent: bigint, newBlocksPerOnePercentSlashingFeeReduction: bigint): Promise<AdminChangeLockupParameters>;
|
|
74
|
+
adminEnableEmergencyWithdrawals(): Promise<AdminEnableEmergencyWithdrawals>;
|
|
75
|
+
}
|