UNPKG

@hifi/protocol

Version:

The Hifi fixed-rate, fixed-term lending protocol

821 lines (717 loc) 23.5 kB
/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ import { ethers, EventFilter, Signer, BigNumber, BigNumberish, PopulatedTransaction, BaseContract, ContractTransaction, Overrides, CallOverrides, } from "ethers"; import { BytesLike } from "@ethersproject/bytes"; import { Listener, Provider } from "@ethersproject/providers"; import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; interface IBalanceSheetV1Interface extends ethers.utils.Interface { functions: { "_renounceOwnership()": FunctionFragment; "_transferOwnership(address)": FunctionFragment; "borrow(address,uint256)": FunctionFragment; "depositCollateral(address,uint256)": FunctionFragment; "getBondList(address)": FunctionFragment; "getCollateralAmount(address,address)": FunctionFragment; "getCollateralList(address)": FunctionFragment; "getCurrentAccountLiquidity(address)": FunctionFragment; "getDebtAmount(address,address)": FunctionFragment; "getHypotheticalAccountLiquidity(address,address,uint256,address,uint256)": FunctionFragment; "getSeizableCollateralAmount(address,uint256,address)": FunctionFragment; "liquidateBorrow(address,address,uint256,address)": FunctionFragment; "owner()": FunctionFragment; "repayBorrow(address,uint256)": FunctionFragment; "repayBorrowBehalf(address,address,uint256)": FunctionFragment; "setOracle(address)": FunctionFragment; "withdrawCollateral(address,uint256)": FunctionFragment; }; encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", values: [string] ): string; encodeFunctionData( functionFragment: "borrow", values: [string, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositCollateral", values: [string, BigNumberish] ): string; encodeFunctionData(functionFragment: "getBondList", values: [string]): string; encodeFunctionData( functionFragment: "getCollateralAmount", values: [string, string] ): string; encodeFunctionData( functionFragment: "getCollateralList", values: [string] ): string; encodeFunctionData( functionFragment: "getCurrentAccountLiquidity", values: [string] ): string; encodeFunctionData( functionFragment: "getDebtAmount", values: [string, string] ): string; encodeFunctionData( functionFragment: "getHypotheticalAccountLiquidity", values: [string, string, BigNumberish, string, BigNumberish] ): string; encodeFunctionData( functionFragment: "getSeizableCollateralAmount", values: [string, BigNumberish, string] ): string; encodeFunctionData( functionFragment: "liquidateBorrow", values: [string, string, BigNumberish, string] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "repayBorrow", values: [string, BigNumberish] ): string; encodeFunctionData( functionFragment: "repayBorrowBehalf", values: [string, string, BigNumberish] ): string; encodeFunctionData(functionFragment: "setOracle", values: [string]): string; encodeFunctionData( functionFragment: "withdrawCollateral", values: [string, BigNumberish] ): string; decodeFunctionResult( functionFragment: "_renounceOwnership", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "_transferOwnership", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "borrow", data: BytesLike): Result; decodeFunctionResult( functionFragment: "depositCollateral", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getBondList", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getCollateralAmount", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getCollateralList", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getCurrentAccountLiquidity", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getDebtAmount", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getHypotheticalAccountLiquidity", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "getSeizableCollateralAmount", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "liquidateBorrow", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; decodeFunctionResult( functionFragment: "repayBorrow", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "repayBorrowBehalf", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "setOracle", data: BytesLike): Result; decodeFunctionResult( functionFragment: "withdrawCollateral", data: BytesLike ): Result; events: { "Borrow(address,address,uint256)": EventFragment; "DepositCollateral(address,address,uint256)": EventFragment; "LiquidateBorrow(address,address,address,uint256,address,uint256)": EventFragment; "RepayBorrow(address,address,address,uint256,uint256)": EventFragment; "SetOracle(address,address,address)": EventFragment; "TransferOwnership(address,address)": EventFragment; "WithdrawCollateral(address,address,uint256)": EventFragment; }; getEvent(nameOrSignatureOrTopic: "Borrow"): EventFragment; getEvent(nameOrSignatureOrTopic: "DepositCollateral"): EventFragment; getEvent(nameOrSignatureOrTopic: "LiquidateBorrow"): EventFragment; getEvent(nameOrSignatureOrTopic: "RepayBorrow"): EventFragment; getEvent(nameOrSignatureOrTopic: "SetOracle"): EventFragment; getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; getEvent(nameOrSignatureOrTopic: "WithdrawCollateral"): EventFragment; } export class IBalanceSheetV1 extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise<this>; listeners<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject> ): Array<TypedListener<EventArgsArray, EventArgsObject>>; off<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>, listener: TypedListener<EventArgsArray, EventArgsObject> ): this; on<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>, listener: TypedListener<EventArgsArray, EventArgsObject> ): this; once<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>, listener: TypedListener<EventArgsArray, EventArgsObject> ): this; removeListener<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>, listener: TypedListener<EventArgsArray, EventArgsObject> ): this; removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>( eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject> ): this; listeners(eventName?: string): Array<Listener>; off(eventName: string, listener: Listener): this; on(eventName: string, listener: Listener): this; once(eventName: string, listener: Listener): this; removeListener(eventName: string, listener: Listener): this; removeAllListeners(eventName?: string): this; queryFilter<EventArgsArray extends Array<any>, EventArgsObject>( event: TypedEventFilter<EventArgsArray, EventArgsObject>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined ): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>; interface: IBalanceSheetV1Interface; functions: { _renounceOwnership( overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; _transferOwnership( newOwner: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; borrow( bond: string, borrowAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; depositCollateral( collateral: string, depositAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; getBondList( account: string, overrides?: CallOverrides ): Promise<[string[]]>; getCollateralAmount( account: string, collateral: string, overrides?: CallOverrides ): Promise<[BigNumber] & { collateralAmount: BigNumber }>; getCollateralList( account: string, overrides?: CallOverrides ): Promise<[string[]]>; getCurrentAccountLiquidity( account: string, overrides?: CallOverrides ): Promise< [BigNumber, BigNumber] & { excessLiquidity: BigNumber; shortfallLiquidity: BigNumber; } >; getDebtAmount( account: string, bond: string, overrides?: CallOverrides ): Promise<[BigNumber] & { debtAmount: BigNumber }>; getHypotheticalAccountLiquidity( account: string, collateralModify: string, collateralAmountModify: BigNumberish, bondModify: string, debtAmountModify: BigNumberish, overrides?: CallOverrides ): Promise< [BigNumber, BigNumber] & { excessLiquidity: BigNumber; shortfallLiquidity: BigNumber; } >; getSeizableCollateralAmount( bond: string, repayAmount: BigNumberish, collateral: string, overrides?: CallOverrides ): Promise<[BigNumber] & { seizableCollateralAmount: BigNumber }>; liquidateBorrow( borrower: string, bond: string, repayAmount: BigNumberish, collateral: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; owner(overrides?: CallOverrides): Promise<[string]>; repayBorrow( bond: string, repayAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; repayBorrowBehalf( borrower: string, bond: string, repayAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; setOracle( newOracle: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; withdrawCollateral( collateral: string, withdrawAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; }; _renounceOwnership( overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; _transferOwnership( newOwner: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; borrow( bond: string, borrowAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; depositCollateral( collateral: string, depositAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; getBondList(account: string, overrides?: CallOverrides): Promise<string[]>; getCollateralAmount( account: string, collateral: string, overrides?: CallOverrides ): Promise<BigNumber>; getCollateralList( account: string, overrides?: CallOverrides ): Promise<string[]>; getCurrentAccountLiquidity( account: string, overrides?: CallOverrides ): Promise< [BigNumber, BigNumber] & { excessLiquidity: BigNumber; shortfallLiquidity: BigNumber; } >; getDebtAmount( account: string, bond: string, overrides?: CallOverrides ): Promise<BigNumber>; getHypotheticalAccountLiquidity( account: string, collateralModify: string, collateralAmountModify: BigNumberish, bondModify: string, debtAmountModify: BigNumberish, overrides?: CallOverrides ): Promise< [BigNumber, BigNumber] & { excessLiquidity: BigNumber; shortfallLiquidity: BigNumber; } >; getSeizableCollateralAmount( bond: string, repayAmount: BigNumberish, collateral: string, overrides?: CallOverrides ): Promise<BigNumber>; liquidateBorrow( borrower: string, bond: string, repayAmount: BigNumberish, collateral: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; owner(overrides?: CallOverrides): Promise<string>; repayBorrow( bond: string, repayAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; repayBorrowBehalf( borrower: string, bond: string, repayAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; setOracle( newOracle: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; withdrawCollateral( collateral: string, withdrawAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; callStatic: { _renounceOwnership(overrides?: CallOverrides): Promise<void>; _transferOwnership( newOwner: string, overrides?: CallOverrides ): Promise<void>; borrow( bond: string, borrowAmount: BigNumberish, overrides?: CallOverrides ): Promise<void>; depositCollateral( collateral: string, depositAmount: BigNumberish, overrides?: CallOverrides ): Promise<void>; getBondList(account: string, overrides?: CallOverrides): Promise<string[]>; getCollateralAmount( account: string, collateral: string, overrides?: CallOverrides ): Promise<BigNumber>; getCollateralList( account: string, overrides?: CallOverrides ): Promise<string[]>; getCurrentAccountLiquidity( account: string, overrides?: CallOverrides ): Promise< [BigNumber, BigNumber] & { excessLiquidity: BigNumber; shortfallLiquidity: BigNumber; } >; getDebtAmount( account: string, bond: string, overrides?: CallOverrides ): Promise<BigNumber>; getHypotheticalAccountLiquidity( account: string, collateralModify: string, collateralAmountModify: BigNumberish, bondModify: string, debtAmountModify: BigNumberish, overrides?: CallOverrides ): Promise< [BigNumber, BigNumber] & { excessLiquidity: BigNumber; shortfallLiquidity: BigNumber; } >; getSeizableCollateralAmount( bond: string, repayAmount: BigNumberish, collateral: string, overrides?: CallOverrides ): Promise<BigNumber>; liquidateBorrow( borrower: string, bond: string, repayAmount: BigNumberish, collateral: string, overrides?: CallOverrides ): Promise<void>; owner(overrides?: CallOverrides): Promise<string>; repayBorrow( bond: string, repayAmount: BigNumberish, overrides?: CallOverrides ): Promise<void>; repayBorrowBehalf( borrower: string, bond: string, repayAmount: BigNumberish, overrides?: CallOverrides ): Promise<void>; setOracle(newOracle: string, overrides?: CallOverrides): Promise<void>; withdrawCollateral( collateral: string, withdrawAmount: BigNumberish, overrides?: CallOverrides ): Promise<void>; }; filters: { Borrow( account?: string | null, bond?: string | null, borrowAmount?: null ): TypedEventFilter< [string, string, BigNumber], { account: string; bond: string; borrowAmount: BigNumber } >; DepositCollateral( account?: string | null, collateral?: string | null, collateralAmount?: null ): TypedEventFilter< [string, string, BigNumber], { account: string; collateral: string; collateralAmount: BigNumber } >; LiquidateBorrow( liquidator?: string | null, borrower?: string | null, bond?: string | null, repayAmount?: null, collateral?: null, seizedCollateralAmount?: null ): TypedEventFilter< [string, string, string, BigNumber, string, BigNumber], { liquidator: string; borrower: string; bond: string; repayAmount: BigNumber; collateral: string; seizedCollateralAmount: BigNumber; } >; RepayBorrow( payer?: string | null, borrower?: string | null, bond?: string | null, repayAmount?: null, newDebtAmount?: null ): TypedEventFilter< [string, string, string, BigNumber, BigNumber], { payer: string; borrower: string; bond: string; repayAmount: BigNumber; newDebtAmount: BigNumber; } >; SetOracle( owner?: string | null, oldOracle?: null, newOracle?: null ): TypedEventFilter< [string, string, string], { owner: string; oldOracle: string; newOracle: string } >; TransferOwnership( oldOwner?: string | null, newOwner?: string | null ): TypedEventFilter< [string, string], { oldOwner: string; newOwner: string } >; WithdrawCollateral( account?: string | null, collateral?: string | null, collateralAmount?: null ): TypedEventFilter< [string, string, BigNumber], { account: string; collateral: string; collateralAmount: BigNumber } >; }; estimateGas: { _renounceOwnership( overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; _transferOwnership( newOwner: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; borrow( bond: string, borrowAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; depositCollateral( collateral: string, depositAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; getBondList(account: string, overrides?: CallOverrides): Promise<BigNumber>; getCollateralAmount( account: string, collateral: string, overrides?: CallOverrides ): Promise<BigNumber>; getCollateralList( account: string, overrides?: CallOverrides ): Promise<BigNumber>; getCurrentAccountLiquidity( account: string, overrides?: CallOverrides ): Promise<BigNumber>; getDebtAmount( account: string, bond: string, overrides?: CallOverrides ): Promise<BigNumber>; getHypotheticalAccountLiquidity( account: string, collateralModify: string, collateralAmountModify: BigNumberish, bondModify: string, debtAmountModify: BigNumberish, overrides?: CallOverrides ): Promise<BigNumber>; getSeizableCollateralAmount( bond: string, repayAmount: BigNumberish, collateral: string, overrides?: CallOverrides ): Promise<BigNumber>; liquidateBorrow( borrower: string, bond: string, repayAmount: BigNumberish, collateral: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; owner(overrides?: CallOverrides): Promise<BigNumber>; repayBorrow( bond: string, repayAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; repayBorrowBehalf( borrower: string, bond: string, repayAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; setOracle( newOracle: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; withdrawCollateral( collateral: string, withdrawAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<BigNumber>; }; populateTransaction: { _renounceOwnership( overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; _transferOwnership( newOwner: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; borrow( bond: string, borrowAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; depositCollateral( collateral: string, depositAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; getBondList( account: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; getCollateralAmount( account: string, collateral: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; getCollateralList( account: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; getCurrentAccountLiquidity( account: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; getDebtAmount( account: string, bond: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; getHypotheticalAccountLiquidity( account: string, collateralModify: string, collateralAmountModify: BigNumberish, bondModify: string, debtAmountModify: BigNumberish, overrides?: CallOverrides ): Promise<PopulatedTransaction>; getSeizableCollateralAmount( bond: string, repayAmount: BigNumberish, collateral: string, overrides?: CallOverrides ): Promise<PopulatedTransaction>; liquidateBorrow( borrower: string, bond: string, repayAmount: BigNumberish, collateral: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; owner(overrides?: CallOverrides): Promise<PopulatedTransaction>; repayBorrow( bond: string, repayAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; repayBorrowBehalf( borrower: string, bond: string, repayAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; setOracle( newOracle: string, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; withdrawCollateral( collateral: string, withdrawAmount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<PopulatedTransaction>; }; }