UNPKG

@hifi/flash-swap

Version:

Flash swap implementations for liquidating underwater accounts

141 lines 7.65 kB
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; import type { Listener, Provider } from "@ethersproject/providers"; import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "../../common"; export declare namespace IFlashUniswapV3 { type FlashLiquidateParamsStruct = { borrower: PromiseOrValue<string>; bond: PromiseOrValue<string>; collateral: PromiseOrValue<string>; path: PromiseOrValue<BytesLike>; turnout: PromiseOrValue<BigNumberish>; underlyingAmount: PromiseOrValue<BigNumberish>; }; type FlashLiquidateParamsStructOutput = [ string, string, string, string, BigNumber, BigNumber ] & { borrower: string; bond: string; collateral: string; path: string; turnout: BigNumber; underlyingAmount: BigNumber; }; } export interface FlashUniswapV3Interface extends utils.Interface { functions: { "balanceSheet()": FunctionFragment; "flashLiquidate((address,address,address,bytes,int256,uint256))": FunctionFragment; "uniV3Factory()": FunctionFragment; "uniswapV3SwapCallback(int256,int256,bytes)": FunctionFragment; }; getFunction(nameOrSignatureOrTopic: "balanceSheet" | "flashLiquidate" | "uniV3Factory" | "uniswapV3SwapCallback"): FunctionFragment; encodeFunctionData(functionFragment: "balanceSheet", values?: undefined): string; encodeFunctionData(functionFragment: "flashLiquidate", values: [IFlashUniswapV3.FlashLiquidateParamsStruct]): string; encodeFunctionData(functionFragment: "uniV3Factory", values?: undefined): string; encodeFunctionData(functionFragment: "uniswapV3SwapCallback", values: [ PromiseOrValue<BigNumberish>, PromiseOrValue<BigNumberish>, PromiseOrValue<BytesLike> ]): string; decodeFunctionResult(functionFragment: "balanceSheet", data: BytesLike): Result; decodeFunctionResult(functionFragment: "flashLiquidate", data: BytesLike): Result; decodeFunctionResult(functionFragment: "uniV3Factory", data: BytesLike): Result; decodeFunctionResult(functionFragment: "uniswapV3SwapCallback", data: BytesLike): Result; events: { "FlashLiquidate(address,address,address,address,uint256,uint256,uint256,uint256,uint256)": EventFragment; }; getEvent(nameOrSignatureOrTopic: "FlashLiquidate"): EventFragment; } export interface FlashLiquidateEventObject { liquidator: string; borrower: string; bond: string; collateral: string; underlyingAmount: BigNumber; seizeAmount: BigNumber; repayAmount: BigNumber; subsidyAmount: BigNumber; profitAmount: BigNumber; } export type FlashLiquidateEvent = TypedEvent<[ string, string, string, string, BigNumber, BigNumber, BigNumber, BigNumber, BigNumber ], FlashLiquidateEventObject>; export type FlashLiquidateEventFilter = TypedEventFilter<FlashLiquidateEvent>; export interface FlashUniswapV3 extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise<this>; interface: FlashUniswapV3Interface; queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>; listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>; listeners(eventName?: string): Array<Listener>; removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this; removeAllListeners(eventName?: string): this; off: OnEvent<this>; on: OnEvent<this>; once: OnEvent<this>; removeListener: OnEvent<this>; functions: { balanceSheet(overrides?: CallOverrides): Promise<[string]>; flashLiquidate(params: IFlashUniswapV3.FlashLiquidateParamsStruct, overrides?: Overrides & { from?: PromiseOrValue<string>; }): Promise<ContractTransaction>; uniV3Factory(overrides?: CallOverrides): Promise<[string]>; uniswapV3SwapCallback(amount0Delta: PromiseOrValue<BigNumberish>, amount1Delta: PromiseOrValue<BigNumberish>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & { from?: PromiseOrValue<string>; }): Promise<ContractTransaction>; }; balanceSheet(overrides?: CallOverrides): Promise<string>; flashLiquidate(params: IFlashUniswapV3.FlashLiquidateParamsStruct, overrides?: Overrides & { from?: PromiseOrValue<string>; }): Promise<ContractTransaction>; uniV3Factory(overrides?: CallOverrides): Promise<string>; uniswapV3SwapCallback(amount0Delta: PromiseOrValue<BigNumberish>, amount1Delta: PromiseOrValue<BigNumberish>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & { from?: PromiseOrValue<string>; }): Promise<ContractTransaction>; callStatic: { balanceSheet(overrides?: CallOverrides): Promise<string>; flashLiquidate(params: IFlashUniswapV3.FlashLiquidateParamsStruct, overrides?: CallOverrides): Promise<void>; uniV3Factory(overrides?: CallOverrides): Promise<string>; uniswapV3SwapCallback(amount0Delta: PromiseOrValue<BigNumberish>, amount1Delta: PromiseOrValue<BigNumberish>, data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<void>; }; filters: { "FlashLiquidate(address,address,address,address,uint256,uint256,uint256,uint256,uint256)"(liquidator?: PromiseOrValue<string> | null, borrower?: PromiseOrValue<string> | null, bond?: PromiseOrValue<string> | null, collateral?: null, underlyingAmount?: null, seizeAmount?: null, repayAmount?: null, subsidyAmount?: null, profitAmount?: null): FlashLiquidateEventFilter; FlashLiquidate(liquidator?: PromiseOrValue<string> | null, borrower?: PromiseOrValue<string> | null, bond?: PromiseOrValue<string> | null, collateral?: null, underlyingAmount?: null, seizeAmount?: null, repayAmount?: null, subsidyAmount?: null, profitAmount?: null): FlashLiquidateEventFilter; }; estimateGas: { balanceSheet(overrides?: CallOverrides): Promise<BigNumber>; flashLiquidate(params: IFlashUniswapV3.FlashLiquidateParamsStruct, overrides?: Overrides & { from?: PromiseOrValue<string>; }): Promise<BigNumber>; uniV3Factory(overrides?: CallOverrides): Promise<BigNumber>; uniswapV3SwapCallback(amount0Delta: PromiseOrValue<BigNumberish>, amount1Delta: PromiseOrValue<BigNumberish>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & { from?: PromiseOrValue<string>; }): Promise<BigNumber>; }; populateTransaction: { balanceSheet(overrides?: CallOverrides): Promise<PopulatedTransaction>; flashLiquidate(params: IFlashUniswapV3.FlashLiquidateParamsStruct, overrides?: Overrides & { from?: PromiseOrValue<string>; }): Promise<PopulatedTransaction>; uniV3Factory(overrides?: CallOverrides): Promise<PopulatedTransaction>; uniswapV3SwapCallback(amount0Delta: PromiseOrValue<BigNumberish>, amount1Delta: PromiseOrValue<BigNumberish>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & { from?: PromiseOrValue<string>; }): Promise<PopulatedTransaction>; }; } //# sourceMappingURL=FlashUniswapV3.d.ts.map