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 TokenDeployedEvent = { readonly deployer: Address; readonly token: Address; readonly name: string; readonly symbol: string; }; export type MotoChefDeployedEvent = { readonly deployer: Address; readonly token: Address; readonly motoChef: Address; readonly userBTCFeePercentage: bigint; readonly farmName: string; }; export type FactoryPausedEvent = { readonly by: Address; }; export type FactoryUnpausedEvent = { readonly by: Address; }; export type InitializeFactory = CallResult<{ success: boolean }, []>; export type Owner = CallResult<{ owner: Address }, []>; export type PauseFactory = CallResult<{ success: boolean }, [OPNetEvent]>; export type UnpauseFactory = CallResult<{ success: boolean }, [OPNetEvent]>; export type IsPaused = CallResult<{ isPaused: boolean }, []>; export type GetTokenDeployer = CallResult<{ deployer: Address }, []>; export type GetTokenOwner = CallResult<{ owner: Address }, []>; export type DeployToken = CallResult<{ success: boolean }, [OPNetEvent]>; export type DeployMotoChef = CallResult<{ success: boolean }, [OPNetEvent]>; export type UpdateTokenOwner = CallResult<{ success: boolean }, []>; export type GetUserTokens = CallResult<{ tokens: Uint8Array }, []>; export type GetDeploymentInfo = CallResult< { has: boolean; token: Address; motoChef: Address; block: bigint }, [] >; export type GetDeploymentsCount = CallResult<{ count: number }, []>; export type GetDeploymentByIndex = CallResult< { deployer: Address; token: Address; motoChef: Address; block: bigint }, [] >; export type GetTokenMotoChef = CallResult<{ motoChefAddress: Address }, []>; export type OnOP20Received = CallResult<{ selector: Uint8Array }, []>; export interface IMotoChefFactory extends IOP_NETContract { owner(): Promise; initialize(): Promise; pauseFactory(): Promise; unpauseFactory(): Promise; isPaused(): Promise; getTokenDeployer(tokenAddress: Address): Promise; getTokenOwner(tokenAddress: Address): Promise; deployToken( maxSupply: bigint, decimals: number, name: string, symbol: string, initialMintTo: Address, initialMintAmount: bigint, freeMintSupply: bigint, freeMintPerTx: bigint, tokenOwner: Address, ): Promise; deployMotoChef( tokenPerBlock: bigint, bonusEndBlock: bigint, bonusMultiplier: bigint, BTCAllocPoint: bigint, tokenAddress: Address, tokenAllocPoint: bigint, userBTCFeePercentage: bigint, userFeeRecipient: string, farmName: string, farmBanner: string, additionalPoolTokens: Address[], additionalPoolAllocPoints: bigint[], ): Promise; updateTokenOwner(tokenAddress: Address, newOwner: Address): Promise; getUserTokens(deployer: Address): Promise; getDeploymentInfo(deployer: Address): Promise; getDeploymentsCount(): Promise; getDeploymentByIndex(index: number): Promise; getTokenMotoChef(tokenAddress: Address): Promise; onOP20Received( operator: Address, from: Address, amount: bigint, data: Uint8Array, ): Promise; } export default IMotoChefFactory;