import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers"; import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../../../common"; export type OrderStruct = { salt: BigNumberish; expiry: BigNumberish; nonce: BigNumberish; orderType: BigNumberish; token: AddressLike; YT: AddressLike; maker: AddressLike; receiver: AddressLike; makingAmount: BigNumberish; lnImpliedRate: BigNumberish; failSafeRate: BigNumberish; permit: BytesLike; }; export type OrderStructOutput = [ salt: bigint, expiry: bigint, nonce: bigint, orderType: bigint, token: string, YT: string, maker: string, receiver: string, makingAmount: bigint, lnImpliedRate: bigint, failSafeRate: bigint, permit: string ] & { salt: bigint; expiry: bigint; nonce: bigint; orderType: bigint; token: string; YT: string; maker: string; receiver: string; makingAmount: bigint; lnImpliedRate: bigint; failSafeRate: bigint; permit: string; }; export type FillOrderParamsStruct = { order: OrderStruct; signature: BytesLike; makingAmount: BigNumberish; }; export type FillOrderParamsStructOutput = [ order: OrderStructOutput, signature: string, makingAmount: bigint ] & { order: OrderStructOutput; signature: string; makingAmount: bigint; }; export type LimitOrderDataStruct = { limitRouter: AddressLike; epsSkipMarket: BigNumberish; normalFills: FillOrderParamsStruct[]; flashFills: FillOrderParamsStruct[]; optData: BytesLike; }; export type LimitOrderDataStructOutput = [ limitRouter: string, epsSkipMarket: bigint, normalFills: FillOrderParamsStructOutput[], flashFills: FillOrderParamsStructOutput[], optData: string ] & { limitRouter: string; epsSkipMarket: bigint; normalFills: FillOrderParamsStructOutput[]; flashFills: FillOrderParamsStructOutput[]; optData: string; }; export type SwapDataStruct = { swapType: BigNumberish; extRouter: AddressLike; extCalldata: BytesLike; needScale: boolean; }; export type SwapDataStructOutput = [ swapType: bigint, extRouter: string, extCalldata: string, needScale: boolean ] & { swapType: bigint; extRouter: string; extCalldata: string; needScale: boolean; }; export type TokenOutputStruct = { tokenOut: AddressLike; minTokenOut: BigNumberish; tokenRedeemSy: AddressLike; pendleSwap: AddressLike; swapData: SwapDataStruct; }; export type TokenOutputStructOutput = [ tokenOut: string, minTokenOut: bigint, tokenRedeemSy: string, pendleSwap: string, swapData: SwapDataStructOutput ] & { tokenOut: string; minTokenOut: bigint; tokenRedeemSy: string; pendleSwap: string; swapData: SwapDataStructOutput; }; export type ApproxParamsStruct = { guessMin: BigNumberish; guessMax: BigNumberish; guessOffchain: BigNumberish; maxIteration: BigNumberish; eps: BigNumberish; }; export type ApproxParamsStructOutput = [ guessMin: bigint, guessMax: bigint, guessOffchain: bigint, maxIteration: bigint, eps: bigint ] & { guessMin: bigint; guessMax: bigint; guessOffchain: bigint; maxIteration: bigint; eps: bigint; }; export type TokenInputStruct = { tokenIn: AddressLike; netTokenIn: BigNumberish; tokenMintSy: AddressLike; pendleSwap: AddressLike; swapData: SwapDataStruct; }; export type TokenInputStructOutput = [ tokenIn: string, netTokenIn: bigint, tokenMintSy: string, pendleSwap: string, swapData: SwapDataStructOutput ] & { tokenIn: string; netTokenIn: bigint; tokenMintSy: string; pendleSwap: string; swapData: SwapDataStructOutput; }; export interface ActionSwapPTV3Interface extends Interface { getFunction(nameOrSignature: "swapExactPtForSy" | "swapExactPtForToken" | "swapExactSyForPt" | "swapExactTokenForPt"): FunctionFragment; getEvent(nameOrSignatureOrTopic: "SwapPtAndSy" | "SwapPtAndToken"): EventFragment; encodeFunctionData(functionFragment: "swapExactPtForSy", values: [ AddressLike, AddressLike, BigNumberish, BigNumberish, LimitOrderDataStruct ]): string; encodeFunctionData(functionFragment: "swapExactPtForToken", values: [ AddressLike, AddressLike, BigNumberish, TokenOutputStruct, LimitOrderDataStruct ]): string; encodeFunctionData(functionFragment: "swapExactSyForPt", values: [ AddressLike, AddressLike, BigNumberish, BigNumberish, ApproxParamsStruct, LimitOrderDataStruct ]): string; encodeFunctionData(functionFragment: "swapExactTokenForPt", values: [ AddressLike, AddressLike, BigNumberish, ApproxParamsStruct, TokenInputStruct, LimitOrderDataStruct ]): string; decodeFunctionResult(functionFragment: "swapExactPtForSy", data: BytesLike): Result; decodeFunctionResult(functionFragment: "swapExactPtForToken", data: BytesLike): Result; decodeFunctionResult(functionFragment: "swapExactSyForPt", data: BytesLike): Result; decodeFunctionResult(functionFragment: "swapExactTokenForPt", data: BytesLike): Result; } export declare namespace SwapPtAndSyEvent { type InputTuple = [ caller: AddressLike, market: AddressLike, receiver: AddressLike, netPtToAccount: BigNumberish, netSyToAccount: BigNumberish ]; type OutputTuple = [ caller: string, market: string, receiver: string, netPtToAccount: bigint, netSyToAccount: bigint ]; interface OutputObject { caller: string; market: string; receiver: string; netPtToAccount: bigint; netSyToAccount: bigint; } type Event = TypedContractEvent; type Filter = TypedDeferredTopicFilter; type Log = TypedEventLog; type LogDescription = TypedLogDescription; } export declare namespace SwapPtAndTokenEvent { type InputTuple = [ caller: AddressLike, market: AddressLike, token: AddressLike, receiver: AddressLike, netPtToAccount: BigNumberish, netTokenToAccount: BigNumberish, netSyInterm: BigNumberish ]; type OutputTuple = [ caller: string, market: string, token: string, receiver: string, netPtToAccount: bigint, netTokenToAccount: bigint, netSyInterm: bigint ]; interface OutputObject { caller: string; market: string; token: string; receiver: string; netPtToAccount: bigint; netTokenToAccount: bigint; netSyInterm: bigint; } type Event = TypedContractEvent; type Filter = TypedDeferredTopicFilter; type Log = TypedEventLog; type LogDescription = TypedLogDescription; } export interface ActionSwapPTV3 extends BaseContract { connect(runner?: ContractRunner | null): ActionSwapPTV3; waitForDeployment(): Promise; interface: ActionSwapPTV3Interface; queryFilter(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>>; queryFilter(filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>>; on(event: TCEvent, listener: TypedListener): Promise; on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise; once(event: TCEvent, listener: TypedListener): Promise; once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise; listeners(event: TCEvent): Promise>>; listeners(eventName?: string): Promise>; removeAllListeners(event?: TCEvent): Promise; swapExactPtForSy: TypedContractMethod<[ receiver: AddressLike, market: AddressLike, exactPtIn: BigNumberish, minSyOut: BigNumberish, limit: LimitOrderDataStruct ], [ [bigint, bigint] & { netSyOut: bigint; netSyFee: bigint; } ], "nonpayable">; swapExactPtForToken: TypedContractMethod<[ receiver: AddressLike, market: AddressLike, exactPtIn: BigNumberish, output: TokenOutputStruct, limit: LimitOrderDataStruct ], [ [ bigint, bigint, bigint ] & { netTokenOut: bigint; netSyFee: bigint; netSyInterm: bigint; } ], "nonpayable">; swapExactSyForPt: TypedContractMethod<[ receiver: AddressLike, market: AddressLike, exactSyIn: BigNumberish, minPtOut: BigNumberish, guessPtOut: ApproxParamsStruct, limit: LimitOrderDataStruct ], [ [bigint, bigint] & { netPtOut: bigint; netSyFee: bigint; } ], "nonpayable">; swapExactTokenForPt: TypedContractMethod<[ receiver: AddressLike, market: AddressLike, minPtOut: BigNumberish, guessPtOut: ApproxParamsStruct, input: TokenInputStruct, limit: LimitOrderDataStruct ], [ [ bigint, bigint, bigint ] & { netPtOut: bigint; netSyFee: bigint; netSyInterm: bigint; } ], "payable">; getFunction(key: string | FunctionFragment): T; getFunction(nameOrSignature: "swapExactPtForSy"): TypedContractMethod<[ receiver: AddressLike, market: AddressLike, exactPtIn: BigNumberish, minSyOut: BigNumberish, limit: LimitOrderDataStruct ], [ [bigint, bigint] & { netSyOut: bigint; netSyFee: bigint; } ], "nonpayable">; getFunction(nameOrSignature: "swapExactPtForToken"): TypedContractMethod<[ receiver: AddressLike, market: AddressLike, exactPtIn: BigNumberish, output: TokenOutputStruct, limit: LimitOrderDataStruct ], [ [ bigint, bigint, bigint ] & { netTokenOut: bigint; netSyFee: bigint; netSyInterm: bigint; } ], "nonpayable">; getFunction(nameOrSignature: "swapExactSyForPt"): TypedContractMethod<[ receiver: AddressLike, market: AddressLike, exactSyIn: BigNumberish, minPtOut: BigNumberish, guessPtOut: ApproxParamsStruct, limit: LimitOrderDataStruct ], [ [bigint, bigint] & { netPtOut: bigint; netSyFee: bigint; } ], "nonpayable">; getFunction(nameOrSignature: "swapExactTokenForPt"): TypedContractMethod<[ receiver: AddressLike, market: AddressLike, minPtOut: BigNumberish, guessPtOut: ApproxParamsStruct, input: TokenInputStruct, limit: LimitOrderDataStruct ], [ [ bigint, bigint, bigint ] & { netPtOut: bigint; netSyFee: bigint; netSyInterm: bigint; } ], "payable">; getEvent(key: "SwapPtAndSy"): TypedContractEvent; getEvent(key: "SwapPtAndToken"): TypedContractEvent; filters: { "SwapPtAndSy(address,address,address,int256,int256)": TypedContractEvent; SwapPtAndSy: TypedContractEvent; "SwapPtAndToken(address,address,address,address,int256,int256,uint256)": TypedContractEvent; SwapPtAndToken: TypedContractEvent; }; }