UNPKG

opnet

Version:

The perfect library for building Bitcoin-based applications.

77 lines (76 loc) 3.08 kB
import { Address } from '../../../../../node_modules/@btc-vision/transaction/build/index.js'; import { CallResult } from '../../../../contracts/CallResult.js'; import { BalanceOf, TotalSupply } from '../opnet/IOP20Contract.js'; import { IOP_NETContract } from '../opnet/IOP_NETContract.js'; export type Status = CallResult<{ status: bigint; }>; interface IMotoswapReentrancyGuard extends IOP_NETContract { status(): Promise<Status>; } export type Admin = CallResult<{ adminAddress: Address; }>; export type ChangeAdmin = CallResult; interface IMotoswapOwnableReentrancyGuard extends IMotoswapReentrancyGuard { admin(): Promise<Admin>; changeAdmin(newAdmin: Address): Promise<ChangeAdmin>; } export type GetMotoAddress = CallResult<{ motoAddress: Address; }>; export type MotoAddress = CallResult<{ totalSupply: bigint; }>; export type LastInteractedBlock = CallResult<{ lastInteractedBlock: bigint; }>; export type RewardDebt = CallResult<{ rewardDebt: bigint; }>; export type RewardBalance = CallResult<{ rewardBalance: bigint; }>; export type PendingReward = CallResult<{ pendingReward: bigint; }>; export type CalculateSlashingFee = CallResult<{ slashingFee: bigint; }>; export type EnabledRewardTokens = CallResult<{ enabledRewardTokens: Address[]; }>; export type Stake = CallResult; export type Unstake = CallResult; export type ClaimRewards = CallResult; export type AdminAddRewardToken = CallResult; export type AdminRemoveRewardToken = CallResult; export type AdminChangeMotoAddress = CallResult; export type AdminChangeLockupParameters = CallResult; export type AdminEnableEmergencyWithdrawals = CallResult; export type RewardTokenAddedEvent = { readonly token: Address; }; export type RewardTokenRemovedEvent = { readonly token: Address; }; export interface IMotoswapStakingContract extends IMotoswapOwnableReentrancyGuard { balanceOf(address: Address): Promise<BalanceOf>; totalSupply(): Promise<TotalSupply>; motoAddress(): Promise<MotoAddress>; lastInteractedBlock(address: Address): Promise<LastInteractedBlock>; rewardDebt(user: Address, rewardToken: Address): Promise<RewardDebt>; rewardBalance(user: Address): Promise<RewardBalance>; pendingReward(user: Address, rewardToken: Address): Promise<PendingReward>; calculateSlashingFee(user: Address, amount: bigint): Promise<CalculateSlashingFee>; enabledRewardTokens(): Promise<EnabledRewardTokens>; stake(amount: bigint): Promise<Stake>; unstake(): Promise<Unstake>; claimRewards(): Promise<ClaimRewards>; adminAddRewardToken(token: Address): Promise<AdminAddRewardToken>; adminRemoveRewardToken(token: Address): Promise<AdminAddRewardToken>; adminChangeMotoAddress(token: Address): Promise<AdminAddRewardToken>; adminChangeLockupParameters(newLockupDuration: bigint, newMaxSlashingFeePercent: bigint, newBlocksPerOnePercentSlashingFeeReduction: bigint): Promise<AdminChangeLockupParameters>; adminEnableEmergencyWithdrawals(): Promise<AdminEnableEmergencyWithdrawals>; } export {};