import { Address } from '@btc-vision/transaction'; import { CallResult } from '../../../../contracts/CallResult.js'; import { OPNetEvent } from '../../../../contracts/OPNetEvent.js'; import { IOP_NETContract } from '../opnet/IOP_NETContract.js'; export type OwnershipTransferredEvent = { readonly previousOwner: Address; readonly newOwner: Address; }; export type Owner = CallResult<{ owner: Address; }, OPNetEvent[]>; export type RenounceOwnership = CallResult<{}, OPNetEvent[]>; export type TransferOwnership = CallResult<{}, OPNetEvent[]>; interface IOwnable extends IOP_NETContract { owner(): Promise; renounceOwnership(): Promise; transferOwnership(newOwner: Address): Promise; } export type PoolAddedEvent = { readonly poolId: number; readonly allocPoint: bigint; readonly lpToken: Address; }; export type InitializedEvent = {}; export type PoolUpdatedEvent = { readonly poolId: number; readonly lastRewardBlock: bigint; readonly lpSupply: bigint; readonly accMotoPerShare: bigint; }; export type BTCStakedEvent = { readonly user: Address; readonly netAmount: bigint; readonly stakeTxId: bigint; readonly stakeIndex: bigint; }; export type BTCUnstakedEvent = { readonly user: Address; readonly pendingMoto: bigint; readonly storedTxId: bigint; readonly storedIndex: bigint; }; export type BTCStakeRemovedEvent = { readonly user: Address; readonly storedTxId: bigint; readonly storedIndex: bigint; }; export type PoolSetEvent = { readonly poolId: number; readonly allocPoint: bigint; }; export type DepositedEvent = { readonly user: Address; readonly poolId: number; readonly amount: bigint; readonly to: Address; }; export type WithdrawnEvent = { readonly user: Address; readonly poolId: number; readonly amount: bigint; readonly to: Address; }; export type HarvestedEvent = { readonly user: Address; readonly poolId: number; readonly amount: bigint; }; export type EmergencyWithdrawnEvent = { readonly user: Address; readonly poolId: number; readonly amount: bigint; readonly to: Address; }; export type Update = CallResult<{}, OPNetEvent[]>; export type Initialize = CallResult<{}, OPNetEvent[]>; export type TotalAllocPoint = CallResult<{ totalAllocPoint: bigint; }, OPNetEvent[]>; export type GetMotoPerBlock = CallResult<{ motoPerBlock: bigint; }, OPNetEvent[]>; export type GetBonusEndBlock = CallResult<{ bonusEndBlock: bigint; }, OPNetEvent[]>; export type GetBonusMultiplier = CallResult<{ bonusMultiplier: bigint; }, OPNetEvent[]>; export type GetLpTokens = CallResult<{ lpTokens: Address[]; }, OPNetEvent[]>; export type GetPoolsLength = CallResult<{ poolsLength: number; }, OPNetEvent[]>; export type GetLpToken = CallResult<{ lpToken: Address; }, OPNetEvent[]>; export type GetPoolInfo = CallResult<{ accMotoPerShare: bigint; lastRewardBlock: bigint; allocPoint: bigint; }, OPNetEvent[]>; export type GetUserInfo = CallResult<{ amount: bigint; rewardDebt: bigint; }, OPNetEvent[]>; export type GetMultiplier = CallResult<{ multiplier: bigint; }, OPNetEvent[]>; export type PendingMoto = CallResult<{ pendingMoto: bigint; }, OPNetEvent[]>; export type TreasuryAddress = CallResult<{ treasuryAddress: string; }, OPNetEvent[]>; export type GetStakingTxId = CallResult<{ stakingTxId: bigint; }, OPNetEvent[]>; export type GetStakingIndex = CallResult<{ stakingIndex: bigint; }, OPNetEvent[]>; export type TotalBTCStaked = CallResult<{ totalBTCStaked: bigint; }, OPNetEvent[]>; export type StakeBTC = CallResult<{}, OPNetEvent[]>; export type UnstakeBTC = CallResult<{}, OPNetEvent[]>; export type RemoveBTCStake = CallResult<{}, OPNetEvent[]>; export type Add = CallResult<{}, OPNetEvent[]>; export type Set = CallResult<{}, OPNetEvent[]>; export type UpdatePool = CallResult<{ accMotoPerShare: bigint; lastRewardBlock: bigint; allocPoint: bigint; }, OPNetEvent[]>; export type MassUpdatePools = CallResult<{}, OPNetEvent[]>; export type Deposit = CallResult<{}, OPNetEvent[]>; export type Withdraw = CallResult<{}, OPNetEvent[]>; export type Harvest = CallResult<{}, OPNetEvent[]>; export type WithdrawAndHarvest = CallResult<{}, OPNetEvent[]>; export type EmergencyWithdraw = CallResult<{}, OPNetEvent[]>; export type SetMotoPerBlock = CallResult<{}, OPNetEvent[]>; export type SetBonusEndBlock = CallResult<{}, OPNetEvent[]>; export type SetBonusMultiplier = CallResult<{}, OPNetEvent[]>; export type OnOP20Received = CallResult<{ selector: Uint8Array; }, OPNetEvent[]>; export interface IMotoChef extends IOwnable { update(sourceAddress: Address, updateCalldata: Uint8Array): Promise; initialize(motoAddress: Address, premineAmount: bigint, premineRecipient: Address, motoPerBlock: bigint, bonusEndBlock: bigint, bonusMultiplier: bigint, treasuryAddress: string, BTCAllocPoint: bigint, MOTOAllocPoint: bigint): Promise; totalAllocPoint(): Promise; getMotoPerBlock(): Promise; getBonusEndBlock(): Promise; getBonusMultiplier(): Promise; getLpTokens(): Promise; getPoolsLength(): Promise; getLpToken(poolId: number): Promise; getPoolInfo(poolId: number): Promise; getUserInfo(poolId: number, user: Address): Promise; getMultiplier(from: bigint, to: bigint): Promise; pendingMoto(poolId: number, user: Address): Promise; treasuryAddress(): Promise; getStakingTxId(user: Address): Promise; getStakingIndex(user: Address): Promise; totalBTCStaked(): Promise; stakeBTC(amount: bigint): Promise; unstakeBTC(): Promise; removeBTCStake(user: Address): Promise; add(allocPoint: bigint, lpToken: Address): Promise; set(poolId: number, allocPoint: bigint, withUpdate: number): Promise; updatePool(poolId: number): Promise; massUpdatePools(length: number, poolIds: number[]): Promise; deposit(poolId: number, amount: bigint, to: Address): Promise; withdraw(poolId: number, amount: bigint, to: Address): Promise; harvest(poolId: number, to: Address): Promise; withdrawAndHarvest(poolId: number, amount: bigint, to: Address): Promise; emergencyWithdraw(poolId: number, to: Address): Promise; onOP20Received(operator: Address, from: Address, amount: bigint, data: Uint8Array): Promise; setMotoPerBlock(motoPerBlock: bigint): Promise; setBonusEndBlock(bonusEndBlock: bigint): Promise; setBonusMultiplier(bonusMultiplier: bigint): Promise; } export {};