diff --git a/packages/amm/hardhat.config.ts b/packages/amm/hardhat.config.ts index cac62772..bad19c53 100644 --- a/packages/amm/hardhat.config.ts +++ b/packages/amm/hardhat.config.ts @@ -79,7 +79,6 @@ const config: HardhatUserConfig = { }, typechain: { outDir: "src/types", - target: "ethers-v5", }, }; diff --git a/packages/amm/package.json b/packages/amm/package.json index 081c7f1e..ac919ea1 100644 --- a/packages/amm/package.json +++ b/packages/amm/package.json @@ -18,7 +18,7 @@ "@openzeppelin/contracts-upgradeable": "4.5.2", "@prb/contracts": "3.8.1", "@prb/math": "2.5.0", - "ethers": "^5.7.2" + "ethers": "^6.8.1" }, "devDependencies": { "@ethersproject/abstract-provider": "^5.7.0", @@ -32,7 +32,7 @@ "@nomiclabs/hardhat-ethers": "^2.2.3", "@nomiclabs/hardhat-etherscan": "^3.1.7", "@nomiclabs/hardhat-waffle": "^2.0.6", - "@typechain/ethers-v5": "^10.2.1", + "@typechain/ethers-v6": "^0.5.1", "@typechain/hardhat": "^9.1.0", "@types/chai": "^4.3.10", "@types/mocha": "^10.0.4", diff --git a/packages/amm/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts b/packages/amm/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts index 464a6e30..9b46ca02 100644 --- a/packages/amm/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts +++ b/packages/amm/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IOwnableUpgradeableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IOwnableUpgradeableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface IOwnableUpgradeableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IOwnableUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IOwnableUpgradeable; + waitForDeployment(): Promise; interface: IOwnableUpgradeableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts b/packages/amm/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts index a8f46fdb..fe8c21e5 100644 --- a/packages/amm/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts +++ b/packages/amm/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts @@ -3,55 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IBalanceSheetV2Interface extends 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; - "getRepayAmount(address,uint256,address)": FunctionFragment; - "getSeizableCollateralAmount(address,uint256,address)": FunctionFragment; - "liquidateBorrow(address,address,uint256,address)": FunctionFragment; - "owner()": FunctionFragment; - "repayBorrow(address,uint256)": FunctionFragment; - "repayBorrowBehalf(address,address,uint256)": FunctionFragment; - "setFintroller(address)": FunctionFragment; - "setOracle(address)": FunctionFragment; - "withdrawCollateral(address,uint256)": FunctionFragment; - }; - +export interface IBalanceSheetV2Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "borrow" @@ -73,101 +47,90 @@ export interface IBalanceSheetV2Interface extends utils.Interface { | "withdrawCollateral" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Borrow" + | "DepositCollateral" + | "LiquidateBorrow" + | "RepayBorrow" + | "SetFintroller" + | "SetOracle" + | "TransferOwnership" + | "WithdrawCollateral" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "borrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getBondList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCurrentAccountLiquidity", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getHypotheticalAccountLiquidity", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getRepayAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "getSeizableCollateralAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "liquidateBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "repayBorrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "repayBorrowBehalf", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setFintroller", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "setOracle", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "withdrawCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -237,838 +200,627 @@ export interface IBalanceSheetV2Interface extends utils.Interface { 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; - "SetFintroller(address,address,address)": 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: "SetFintroller"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetOracle"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawCollateral"): EventFragment; } -export interface BorrowEventObject { - account: string; - bond: string; - borrowAmount: BigNumber; +export namespace BorrowEvent { + export type InputTuple = [ + account: AddressLike, + bond: AddressLike, + borrowAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + bond: string, + borrowAmount: bigint + ]; + export interface OutputObject { + account: string; + bond: string; + borrowAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BorrowEvent = TypedEvent< - [string, string, BigNumber], - BorrowEventObject ->; -export type BorrowEventFilter = TypedEventFilter; - -export interface DepositCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace DepositCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositCollateralEvent = TypedEvent< - [string, string, BigNumber], - DepositCollateralEventObject ->; - -export type DepositCollateralEventFilter = - TypedEventFilter; -export interface LiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - collateral: string; - seizedCollateralAmount: BigNumber; +export namespace LiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike, + seizedCollateralAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + repayAmount: bigint, + collateral: string, + seizedCollateralAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + repayAmount: bigint; + collateral: string; + seizedCollateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type LiquidateBorrowEvent = TypedEvent< - [string, string, string, BigNumber, string, BigNumber], - LiquidateBorrowEventObject ->; - -export type LiquidateBorrowEventFilter = TypedEventFilter; -export interface RepayBorrowEventObject { - payer: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - newDebtAmount: BigNumber; +export namespace RepayBorrowEvent { + export type InputTuple = [ + payer: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + newDebtAmount: BigNumberish + ]; + export type OutputTuple = [ + payer: string, + borrower: string, + bond: string, + repayAmount: bigint, + newDebtAmount: bigint + ]; + export interface OutputObject { + payer: string; + borrower: string; + bond: string; + repayAmount: bigint; + newDebtAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RepayBorrowEvent = TypedEvent< - [string, string, string, BigNumber, BigNumber], - RepayBorrowEventObject ->; -export type RepayBorrowEventFilter = TypedEventFilter; - -export interface SetFintrollerEventObject { - owner: string; - oldFintroller: string; - newFintroller: string; +export namespace SetFintrollerEvent { + export type InputTuple = [ + owner: AddressLike, + oldFintroller: AddressLike, + newFintroller: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldFintroller: string, + newFintroller: string + ]; + export interface OutputObject { + owner: string; + oldFintroller: string; + newFintroller: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFintrollerEvent = TypedEvent< - [string, string, string], - SetFintrollerEventObject ->; - -export type SetFintrollerEventFilter = TypedEventFilter; -export interface SetOracleEventObject { - owner: string; - oldOracle: string; - newOracle: string; +export namespace SetOracleEvent { + export type InputTuple = [ + owner: AddressLike, + oldOracle: AddressLike, + newOracle: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldOracle: string, + newOracle: string + ]; + export interface OutputObject { + owner: string; + oldOracle: string; + newOracle: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetOracleEvent = TypedEvent< - [string, string, string], - SetOracleEventObject ->; - -export type SetOracleEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace WithdrawCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawCollateralEvent = TypedEvent< - [string, string, BigNumber], - WithdrawCollateralEventObject ->; - -export type WithdrawCollateralEventFilter = - TypedEventFilter; export interface IBalanceSheetV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IBalanceSheetV2; + waitForDeployment(): Promise; interface: IBalanceSheetV2Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { collateralAmount: BigNumber }>; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { debtAmount: BigNumber }>; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { repayAmount: BigNumber }>; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { seizableCollateralAmount: BigNumber }>; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + borrow: TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + depositCollateral: TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" >; - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getBondList: TypedContractMethod<[account: AddressLike], [string[]], "view">; - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + getCollateralAmount: TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getCollateralList: TypedContractMethod< + [account: AddressLike], + [string[]], + "view" + >; - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getCurrentAccountLiquidity: TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getDebtAmount: TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; - owner(overrides?: CallOverrides): Promise; + getHypotheticalAccountLiquidity: TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getRepayAmount: TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getSeizableCollateralAmount: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + liquidateBorrow: TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + owner: TypedContractMethod<[], [string], "view">; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + repayBorrow: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + repayBorrowBehalf: TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setFintroller: TypedContractMethod< + [newFintroller: AddressLike], + [void], + "nonpayable" + >; - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setOracle: TypedContractMethod< + [newOracle: AddressLike], + [void], + "nonpayable" + >; - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + withdrawCollateral: TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "borrow" + ): TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateral" + ): TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "getBondList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCollateralAmount" + ): TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getCollateralList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCurrentAccountLiquidity" + ): TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getDebtAmount" + ): TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getHypotheticalAccountLiquidity" + ): TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getRepayAmount" + ): TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getSeizableCollateralAmount" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "liquidateBorrow" + ): TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "repayBorrow" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "repayBorrowBehalf" + ): TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFintroller" + ): TypedContractMethod<[newFintroller: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setOracle" + ): TypedContractMethod<[newOracle: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getEvent( + key: "Borrow" + ): TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject + >; + getEvent( + key: "DepositCollateral" + ): TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + getEvent( + key: "LiquidateBorrow" + ): TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + getEvent( + key: "RepayBorrow" + ): TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + getEvent( + key: "SetFintroller" + ): TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + getEvent( + key: "SetOracle" + ): TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawCollateral" + ): TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + filters: { + "Borrow(address,address,uint256)": TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + Borrow: TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Borrow(address,address,uint256)"( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - Borrow( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - - "DepositCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - DepositCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - - "LiquidateBorrow(address,address,address,uint256,address,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - LiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - - "RepayBorrow(address,address,address,uint256,uint256)"( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - RepayBorrow( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - - "SetFintroller(address,address,address)"( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - SetFintroller( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - - "SetOracle(address,address,address)"( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - SetOracle( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - WithdrawCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "DepositCollateral(address,address,uint256)": TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + DepositCollateral: TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; - owner(overrides?: CallOverrides): Promise; + "LiquidateBorrow(address,address,address,uint256,address,uint256)": TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + LiquidateBorrow: TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "RepayBorrow(address,address,address,uint256,uint256)": TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + RepayBorrow: TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetFintroller(address,address,address)": TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + SetFintroller: TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetOracle(address,address,address)": TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + SetOracle: TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "WithdrawCollateral(address,address,uint256)": TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + WithdrawCollateral: TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts b/packages/amm/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts index c57af283..a24df57f 100644 --- a/packages/amm/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts +++ b/packages/amm/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts @@ -3,49 +3,45 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; export declare namespace IFintroller { export type BondStruct = { - debtCeiling: PromiseOrValue; - isBorrowAllowed: PromiseOrValue; - isDepositUnderlyingAllowed: PromiseOrValue; - isLiquidateBorrowAllowed: PromiseOrValue; - isListed: PromiseOrValue; - isRepayBorrowAllowed: PromiseOrValue; + debtCeiling: BigNumberish; + isBorrowAllowed: boolean; + isDepositUnderlyingAllowed: boolean; + isLiquidateBorrowAllowed: boolean; + isListed: boolean; + isRepayBorrowAllowed: boolean; }; export type BondStructOutput = [ - BigNumber, - boolean, - boolean, - boolean, - boolean, - boolean + debtCeiling: bigint, + isBorrowAllowed: boolean, + isDepositUnderlyingAllowed: boolean, + isLiquidateBorrowAllowed: boolean, + isListed: boolean, + isRepayBorrowAllowed: boolean ] & { - debtCeiling: BigNumber; + debtCeiling: bigint; isBorrowAllowed: boolean; isDepositUnderlyingAllowed: boolean; isLiquidateBorrowAllowed: boolean; @@ -54,65 +50,31 @@ export declare namespace IFintroller { }; export type CollateralStruct = { - ceiling: PromiseOrValue; - ratio: PromiseOrValue; - liquidationIncentive: PromiseOrValue; - isDepositCollateralAllowed: PromiseOrValue; - isListed: PromiseOrValue; + ceiling: BigNumberish; + ratio: BigNumberish; + liquidationIncentive: BigNumberish; + isDepositCollateralAllowed: boolean; + isListed: boolean; }; export type CollateralStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - boolean, - boolean + ceiling: bigint, + ratio: bigint, + liquidationIncentive: bigint, + isDepositCollateralAllowed: boolean, + isListed: boolean ] & { - ceiling: BigNumber; - ratio: BigNumber; - liquidationIncentive: BigNumber; + ceiling: bigint; + ratio: bigint; + liquidationIncentive: bigint; isDepositCollateralAllowed: boolean; isListed: boolean; }; } -export interface IFintrollerInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "getBond(address)": FunctionFragment; - "getBorrowAllowed(address)": FunctionFragment; - "getCollateral(address)": FunctionFragment; - "getCollateralCeiling(address)": FunctionFragment; - "getCollateralRatio(address)": FunctionFragment; - "getDebtCeiling(address)": FunctionFragment; - "getDepositCollateralAllowed(address)": FunctionFragment; - "getDepositUnderlyingAllowed(address)": FunctionFragment; - "getLiquidateBorrowAllowed(address)": FunctionFragment; - "getLiquidationIncentive(address)": FunctionFragment; - "getRepayBorrowAllowed(address)": FunctionFragment; - "isBondListed(address)": FunctionFragment; - "isCollateralListed(address)": FunctionFragment; - "listBond(address)": FunctionFragment; - "listCollateral(address)": FunctionFragment; - "maxBonds()": FunctionFragment; - "maxCollaterals()": FunctionFragment; - "owner()": FunctionFragment; - "setBorrowAllowed(address,bool)": FunctionFragment; - "setCollateralCeiling(address,uint256)": FunctionFragment; - "setCollateralRatio(address,uint256)": FunctionFragment; - "setDebtCeiling(address,uint256)": FunctionFragment; - "setDepositCollateralAllowed(address,bool)": FunctionFragment; - "setDepositUnderlyingAllowed(address,bool)": FunctionFragment; - "setLiquidateBorrowAllowed(address,bool)": FunctionFragment; - "setLiquidationIncentive(address,uint256)": FunctionFragment; - "setMaxBonds(uint256)": FunctionFragment; - "setMaxCollaterals(uint256)": FunctionFragment; - "setRepayBorrowAllowed(address,bool)": FunctionFragment; - }; - +export interface IFintrollerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "getBond" @@ -146,73 +108,91 @@ export interface IFintrollerInterface extends utils.Interface { | "setRepayBorrowAllowed" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "ListBond" + | "ListCollateral" + | "SetBorrowAllowed" + | "SetCollateralCeiling" + | "SetCollateralRatio" + | "SetDebtCeiling" + | "SetDepositCollateralAllowed" + | "SetDepositUnderlyingAllowed" + | "SetLiquidateBorrowAllowed" + | "SetLiquidationIncentive" + | "SetMaxBonds" + | "SetMaxCollaterals" + | "SetRepayBorrowAllowed" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralRatio", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositCollateralAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositUnderlyingAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidateBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidationIncentive", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getRepayBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isBondListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isCollateralListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "maxBonds", values?: undefined): string; encodeFunctionData( @@ -222,47 +202,47 @@ export interface IFintrollerInterface extends utils.Interface { encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "setBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setCollateralCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setCollateralRatio", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDebtCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDepositCollateralAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setDepositUnderlyingAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidateBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidationIncentive", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxBonds", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxCollaterals", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setRepayBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; decodeFunctionResult( @@ -377,1177 +357,876 @@ export interface IFintrollerInterface extends utils.Interface { functionFragment: "setRepayBorrowAllowed", data: BytesLike ): Result; - - events: { - "ListBond(address,address)": EventFragment; - "ListCollateral(address,address)": EventFragment; - "SetBorrowAllowed(address,address,bool)": EventFragment; - "SetCollateralCeiling(address,address,uint256,uint256)": EventFragment; - "SetCollateralRatio(address,address,uint256,uint256)": EventFragment; - "SetDebtCeiling(address,address,uint256,uint256)": EventFragment; - "SetDepositCollateralAllowed(address,address,bool)": EventFragment; - "SetDepositUnderlyingAllowed(address,address,bool)": EventFragment; - "SetLiquidateBorrowAllowed(address,address,bool)": EventFragment; - "SetLiquidationIncentive(address,address,uint256,uint256)": EventFragment; - "SetMaxBonds(address,uint256,uint256)": EventFragment; - "SetMaxCollaterals(address,uint256,uint256)": EventFragment; - "SetRepayBorrowAllowed(address,address,bool)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ListBond"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ListCollateral"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralCeiling"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralRatio"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetDebtCeiling"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositCollateralAllowed" - ): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositUnderlyingAllowed" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidateBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidationIncentive"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxBonds"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxCollaterals"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetRepayBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface ListBondEventObject { - owner: string; - bond: string; +export namespace ListBondEvent { + export type InputTuple = [owner: AddressLike, bond: AddressLike]; + export type OutputTuple = [owner: string, bond: string]; + export interface OutputObject { + owner: string; + bond: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListBondEvent = TypedEvent<[string, string], ListBondEventObject>; - -export type ListBondEventFilter = TypedEventFilter; -export interface ListCollateralEventObject { - owner: string; - collateral: string; +export namespace ListCollateralEvent { + export type InputTuple = [owner: AddressLike, collateral: AddressLike]; + export type OutputTuple = [owner: string, collateral: string]; + export interface OutputObject { + owner: string; + collateral: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListCollateralEvent = TypedEvent< - [string, string], - ListCollateralEventObject ->; - -export type ListCollateralEventFilter = TypedEventFilter; -export interface SetBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; -} -export type SetBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetBorrowAllowedEventObject ->; - -export type SetBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetCollateralCeilingEventObject { - owner: string; - collateral: string; - oldCollateralCeiling: BigNumber; - newCollateralCeiling: BigNumber; -} -export type SetCollateralCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralCeilingEventObject ->; - -export type SetCollateralCeilingEventFilter = - TypedEventFilter; - -export interface SetCollateralRatioEventObject { - owner: string; - collateral: string; - oldCollateralRatio: BigNumber; - newCollateralRatio: BigNumber; -} -export type SetCollateralRatioEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralRatioEventObject ->; - -export type SetCollateralRatioEventFilter = - TypedEventFilter; - -export interface SetDebtCeilingEventObject { - owner: string; - bond: string; - oldDebtCeiling: BigNumber; - newDebtCeiling: BigNumber; +export namespace SetBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDebtCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetDebtCeilingEventObject ->; -export type SetDebtCeilingEventFilter = TypedEventFilter; - -export interface SetDepositCollateralAllowedEventObject { - owner: string; - collateral: string; - state: boolean; +export namespace SetCollateralCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralCeiling: BigNumberish, + newCollateralCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralCeiling: bigint, + newCollateralCeiling: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralCeiling: bigint; + newCollateralCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositCollateralAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositCollateralAllowedEventObject ->; - -export type SetDepositCollateralAllowedEventFilter = - TypedEventFilter; - -export interface SetDepositUnderlyingAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetCollateralRatioEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralRatio: BigNumberish, + newCollateralRatio: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralRatio: bigint, + newCollateralRatio: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralRatio: bigint; + newCollateralRatio: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositUnderlyingAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositUnderlyingAllowedEventObject ->; - -export type SetDepositUnderlyingAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidateBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetDebtCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + oldDebtCeiling: BigNumberish, + newDebtCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + bond: string, + oldDebtCeiling: bigint, + newDebtCeiling: bigint + ]; + export interface OutputObject { + owner: string; + bond: string; + oldDebtCeiling: bigint; + newDebtCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidateBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetLiquidateBorrowAllowedEventObject ->; - -export type SetLiquidateBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidationIncentiveEventObject { - owner: string; - collateral: string; - oldLiquidationIncentive: BigNumber; - newLiquidationIncentive: BigNumber; + +export namespace SetDepositCollateralAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, collateral: string, state: boolean]; + export interface OutputObject { + owner: string; + collateral: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidationIncentiveEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetLiquidationIncentiveEventObject ->; - -export type SetLiquidationIncentiveEventFilter = - TypedEventFilter; - -export interface SetMaxBondsEventObject { - owner: string; - oldMaxBonds: BigNumber; - newMaxBonds: BigNumber; + +export namespace SetDepositUnderlyingAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxBondsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxBondsEventObject ->; -export type SetMaxBondsEventFilter = TypedEventFilter; +export namespace SetLiquidateBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface SetMaxCollateralsEventObject { - owner: string; - oldMaxCollaterals: BigNumber; - newMaxCollaterals: BigNumber; +export namespace SetLiquidationIncentiveEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldLiquidationIncentive: BigNumberish, + newLiquidationIncentive: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldLiquidationIncentive: bigint, + newLiquidationIncentive: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldLiquidationIncentive: bigint; + newLiquidationIncentive: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxCollateralsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxCollateralsEventObject ->; - -export type SetMaxCollateralsEventFilter = - TypedEventFilter; - -export interface SetRepayBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetMaxBondsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxBonds: BigNumberish, + newMaxBonds: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxBonds: bigint, + newMaxBonds: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxBonds: bigint; + newMaxBonds: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetRepayBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetRepayBorrowAllowedEventObject ->; -export type SetRepayBorrowAllowedEventFilter = - TypedEventFilter; +export namespace SetMaxCollateralsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxCollaterals: BigNumberish, + newMaxCollaterals: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxCollaterals: bigint, + newMaxCollaterals: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxCollaterals: bigint; + newMaxCollaterals: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace SetRepayBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface IFintroller extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IFintroller; + waitForDeployment(): Promise; interface: IFintrollerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.BondStructOutput]>; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.CollateralStructOutput]>; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise<[BigNumber]>; - - maxCollaterals(overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + getBond: TypedContractMethod< + [bond: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + + getBorrowAllowed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + getCollateral: TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + + getCollateralCeiling: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getCollateralRatio: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getDebtCeiling: TypedContractMethod<[bond: AddressLike], [bigint], "view">; + + getDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + getDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + isBondListed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + isCollateralListed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + listBond: TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + + listCollateral: TypedContractMethod< + [collateral: AddressLike], + [void], + "nonpayable" + >; + + maxBonds: TypedContractMethod<[], [bigint], "view">; + + maxCollaterals: TypedContractMethod<[], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + setBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setCollateralCeiling: TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setCollateralRatio: TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + + setDebtCeiling: TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + + setMaxBonds: TypedContractMethod< + [newMaxBonds: BigNumberish], + [void], + "nonpayable" + >; + + setMaxCollaterals: TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + + setRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - filters: { - "ListBond(address,address)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - ListBond( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - - "ListCollateral(address,address)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - ListCollateral( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - - "SetBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - SetBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - - "SetCollateralCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - SetCollateralCeiling( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - - "SetCollateralRatio(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - SetCollateralRatio( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - - "SetDebtCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - SetDebtCeiling( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - - "SetDepositCollateralAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - SetDepositCollateralAllowed( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - - "SetDepositUnderlyingAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - SetDepositUnderlyingAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - - "SetLiquidateBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - SetLiquidateBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - - "SetLiquidationIncentive(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - SetLiquidationIncentive( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - - "SetMaxBonds(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - SetMaxBonds( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - - "SetMaxCollaterals(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - SetMaxCollaterals( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - - "SetRepayBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - SetRepayBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "getBond" + ): TypedContractMethod< + [bond: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getCollateral" + ): TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getCollateralCeiling" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getCollateralRatio" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDebtCeiling" + ): TypedContractMethod<[bond: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDepositCollateralAllowed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getDepositUnderlyingAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidateBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidationIncentive" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getRepayBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isBondListed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isCollateralListed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "listBond" + ): TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "listCollateral" + ): TypedContractMethod<[collateral: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "maxBonds" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxCollaterals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralCeiling" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralRatio" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDebtCeiling" + ): TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositCollateralAllowed" + ): TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositUnderlyingAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidateBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidationIncentive" + ): TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxBonds" + ): TypedContractMethod<[newMaxBonds: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setMaxCollaterals" + ): TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setRepayBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getEvent( + key: "ListBond" + ): TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + getEvent( + key: "ListCollateral" + ): TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + getEvent( + key: "SetBorrowAllowed" + ): TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetCollateralCeiling" + ): TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + getEvent( + key: "SetCollateralRatio" + ): TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + getEvent( + key: "SetDebtCeiling" + ): TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + getEvent( + key: "SetDepositCollateralAllowed" + ): TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + getEvent( + key: "SetDepositUnderlyingAllowed" + ): TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidateBorrowAllowed" + ): TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidationIncentive" + ): TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + getEvent( + key: "SetMaxBonds" + ): TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + getEvent( + key: "SetMaxCollaterals" + ): TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + getEvent( + key: "SetRepayBorrowAllowed" + ): TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + filters: { + "ListBond(address,address)": TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + ListBond: TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + + "ListCollateral(address,address)": TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + ListCollateral: TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + + "SetBorrowAllowed(address,address,bool)": TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + SetBorrowAllowed: TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + + "SetCollateralCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + SetCollateralCeiling: TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + + "SetCollateralRatio(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + SetCollateralRatio: TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + + "SetDebtCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + SetDebtCeiling: TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + + "SetDepositCollateralAllowed(address,address,bool)": TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + SetDepositCollateralAllowed: TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + + "SetDepositUnderlyingAllowed(address,address,bool)": TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + SetDepositUnderlyingAllowed: TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + + "SetLiquidateBorrowAllowed(address,address,bool)": TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + SetLiquidateBorrowAllowed: TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + + "SetLiquidationIncentive(address,address,uint256,uint256)": TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + SetLiquidationIncentive: TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + + "SetMaxBonds(address,uint256,uint256)": TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + SetMaxBonds: TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + + "SetMaxCollaterals(address,uint256,uint256)": TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + SetMaxCollaterals: TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + + "SetRepayBorrowAllowed(address,address,bool)": TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + SetRepayBorrowAllowed: TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@hifi/protocol/contracts/core/h-token/HToken.ts b/packages/amm/src/types/@hifi/protocol/contracts/core/h-token/HToken.ts index 07c2ac4d..020e23a4 100644 --- a/packages/amm/src/types/@hifi/protocol/contracts/core/h-token/HToken.ts +++ b/packages/amm/src/types/@hifi/protocol/contracts/core/h-token/HToken.ts @@ -3,72 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface HTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setBalanceSheet(address)": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "balanceSheet()": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "depositUnderlying(uint256)": FunctionFragment; - "fintroller()": FunctionFragment; - "getDepositorBalance(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "isMatured()": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "nonces(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "redeem(uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "totalUnderlyingReserve()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - "withdrawUnderlying(uint256)": FunctionFragment; - }; - +export interface HTokenInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "_recover" @@ -107,6 +64,21 @@ export interface HTokenInterface extends utils.Interface { | "withdrawUnderlying" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "DepositUnderlying" + | "Mint" + | "Recover" + | "Redeem" + | "SetBalanceSheet" + | "SetNonRecoverableTokens" + | "Transfer" + | "TransferOwnership" + | "WithdrawUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -117,7 +89,7 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -125,27 +97,27 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setBalanceSheet", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "balanceSheet", @@ -153,16 +125,16 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -170,43 +142,40 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getDepositorBalance", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "isMatured", values?: undefined): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; encodeFunctionData( functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "redeem", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -219,15 +188,11 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -240,7 +205,7 @@ export interface HTokenInterface extends utils.Interface { encodeFunctionData(functionFragment: "version", values?: undefined): string; encodeFunctionData( functionFragment: "withdrawUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -330,1058 +295,775 @@ export interface HTokenInterface extends utils.Interface { functionFragment: "withdrawUnderlying", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "DepositUnderlying(address,uint256,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Recover(address,address,uint256)": EventFragment; - "Redeem(address,uint256,uint256)": EventFragment; - "SetBalanceSheet(address,address,address)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "WithdrawUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DepositUnderlying"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBalanceSheet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawUnderlying"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface DepositUnderlyingEventObject { - depositor: string; - depositUnderlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace DepositUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + depositUnderlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + depositUnderlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + depositUnderlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - DepositUnderlyingEventObject ->; - -export type DepositUnderlyingEventFilter = - TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; -export type MintEventFilter = TypedEventFilter; - -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface RedeemEventObject { - account: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace RedeemEvent { + export type InputTuple = [ + account: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + account: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RedeemEvent = TypedEvent< - [string, BigNumber, BigNumber], - RedeemEventObject ->; - -export type RedeemEventFilter = TypedEventFilter; -export interface SetBalanceSheetEventObject { - owner: string; - oldBalanceSheet: string; - newBalanceSheet: string; +export namespace SetBalanceSheetEvent { + export type InputTuple = [ + owner: AddressLike, + oldBalanceSheet: AddressLike, + newBalanceSheet: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldBalanceSheet: string, + newBalanceSheet: string + ]; + export interface OutputObject { + owner: string; + oldBalanceSheet: string; + newBalanceSheet: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetBalanceSheetEvent = TypedEvent< - [string, string, string], - SetBalanceSheetEventObject ->; -export type SetBalanceSheetEventFilter = TypedEventFilter; - -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; -} -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; - -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawUnderlyingEventObject { - depositor: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; + +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - WithdrawUnderlyingEventObject ->; -export type WithdrawUnderlyingEventFilter = - TypedEventFilter; +export namespace WithdrawUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface HToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): HToken; + waitForDeployment(): Promise; interface: HTokenInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amount: BigNumber }>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise<[boolean]>; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setBalanceSheet: TypedContractMethod< + [newBalanceSheet: AddressLike], + [void], + "nonpayable" + >; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + depositUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + fintroller: TypedContractMethod<[], [string], "view">; + + getDepositorBalance: TypedContractMethod< + [depositor: AddressLike], + [bigint], + "view" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + isMatured: TypedContractMethod<[], [boolean], "view">; + + maturity: TypedContractMethod<[], [bigint], "view">; + + mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonRecoverableTokens: TypedContractMethod< + [arg0: BigNumberish], + [string], + "view" + >; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + totalUnderlyingReserve: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - name(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [string], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + withdrawUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setBalanceSheet" + ): TypedContractMethod<[newBalanceSheet: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getDepositorBalance" + ): TypedContractMethod<[depositor: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "isMatured" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "totalUnderlyingReserve" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "withdrawUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "DepositUnderlying" + ): TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "Redeem" + ): TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + getEvent( + key: "SetBalanceSheet" + ): TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawUnderlying" + ): TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "DepositUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - DepositUnderlying( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "Redeem(address,uint256,uint256)"( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - Redeem( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - - "SetBalanceSheet(address,address,address)"( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - SetBalanceSheet( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - WithdrawUnderlying( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve( - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "DepositUnderlying(address,uint256,uint256)": TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + DepositUnderlying: TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "Redeem(address,uint256,uint256)": TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + Redeem: TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + + "SetBalanceSheet(address,address,address)": TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + SetBalanceSheet: TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "WithdrawUnderlying(address,uint256,uint256)": TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; + WithdrawUnderlying: TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts b/packages/amm/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts index 96753024..724cb96f 100644 --- a/packages/amm/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts +++ b/packages/amm/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts @@ -3,72 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IHTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setBalanceSheet(address)": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "balanceSheet()": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "depositUnderlying(uint256)": FunctionFragment; - "fintroller()": FunctionFragment; - "getDepositorBalance(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "isMatured()": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "nonces(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "redeem(uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "totalUnderlyingReserve()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - "withdrawUnderlying(uint256)": FunctionFragment; - }; - +export interface IHTokenInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "_recover" @@ -107,6 +64,21 @@ export interface IHTokenInterface extends utils.Interface { | "withdrawUnderlying" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "DepositUnderlying" + | "Mint" + | "Recover" + | "Redeem" + | "SetBalanceSheet" + | "SetNonRecoverableTokens" + | "Transfer" + | "TransferOwnership" + | "WithdrawUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -117,7 +89,7 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -125,27 +97,27 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setBalanceSheet", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "balanceSheet", @@ -153,16 +125,16 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -170,43 +142,40 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getDepositorBalance", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "isMatured", values?: undefined): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; encodeFunctionData( functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "redeem", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -219,15 +188,11 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -240,7 +205,7 @@ export interface IHTokenInterface extends utils.Interface { encodeFunctionData(functionFragment: "version", values?: undefined): string; encodeFunctionData( functionFragment: "withdrawUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -330,1058 +295,775 @@ export interface IHTokenInterface extends utils.Interface { functionFragment: "withdrawUnderlying", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "DepositUnderlying(address,uint256,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Recover(address,address,uint256)": EventFragment; - "Redeem(address,uint256,uint256)": EventFragment; - "SetBalanceSheet(address,address,address)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "WithdrawUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DepositUnderlying"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBalanceSheet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawUnderlying"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface DepositUnderlyingEventObject { - depositor: string; - depositUnderlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace DepositUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + depositUnderlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + depositUnderlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + depositUnderlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - DepositUnderlyingEventObject ->; - -export type DepositUnderlyingEventFilter = - TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; -export type MintEventFilter = TypedEventFilter; - -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface RedeemEventObject { - account: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace RedeemEvent { + export type InputTuple = [ + account: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + account: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RedeemEvent = TypedEvent< - [string, BigNumber, BigNumber], - RedeemEventObject ->; - -export type RedeemEventFilter = TypedEventFilter; -export interface SetBalanceSheetEventObject { - owner: string; - oldBalanceSheet: string; - newBalanceSheet: string; +export namespace SetBalanceSheetEvent { + export type InputTuple = [ + owner: AddressLike, + oldBalanceSheet: AddressLike, + newBalanceSheet: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldBalanceSheet: string, + newBalanceSheet: string + ]; + export interface OutputObject { + owner: string; + oldBalanceSheet: string; + newBalanceSheet: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetBalanceSheetEvent = TypedEvent< - [string, string, string], - SetBalanceSheetEventObject ->; -export type SetBalanceSheetEventFilter = TypedEventFilter; - -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; -} -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; - -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawUnderlyingEventObject { - depositor: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; + +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - WithdrawUnderlyingEventObject ->; -export type WithdrawUnderlyingEventFilter = - TypedEventFilter; +export namespace WithdrawUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface IHToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IHToken; + waitForDeployment(): Promise; interface: IHTokenInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amount: BigNumber }>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise<[boolean]>; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setBalanceSheet: TypedContractMethod< + [newBalanceSheet: AddressLike], + [void], + "nonpayable" + >; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + depositUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + fintroller: TypedContractMethod<[], [string], "view">; + + getDepositorBalance: TypedContractMethod< + [depositor: AddressLike], + [bigint], + "view" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + isMatured: TypedContractMethod<[], [boolean], "view">; + + maturity: TypedContractMethod<[], [bigint], "view">; + + mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonRecoverableTokens: TypedContractMethod< + [index: BigNumberish], + [string], + "view" + >; + + nonces: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + totalUnderlyingReserve: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - name(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [string], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + withdrawUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setBalanceSheet" + ): TypedContractMethod<[newBalanceSheet: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getDepositorBalance" + ): TypedContractMethod<[depositor: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "isMatured" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[index: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "totalUnderlyingReserve" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "withdrawUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "DepositUnderlying" + ): TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "Redeem" + ): TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + getEvent( + key: "SetBalanceSheet" + ): TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawUnderlying" + ): TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "DepositUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - DepositUnderlying( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "Redeem(address,uint256,uint256)"( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - Redeem( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - - "SetBalanceSheet(address,address,address)"( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - SetBalanceSheet( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - WithdrawUnderlying( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve( - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "DepositUnderlying(address,uint256,uint256)": TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + DepositUnderlying: TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "Redeem(address,uint256,uint256)": TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + Redeem: TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + + "SetBalanceSheet(address,address,address)": TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + SetBalanceSheet: TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "WithdrawUnderlying(address,uint256,uint256)": TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; + WithdrawUnderlying: TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts b/packages/amm/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts index 0a5be3c3..803089bd 100644 --- a/packages/amm/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts +++ b/packages/amm/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts @@ -3,35 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IAggregatorV3Interface extends utils.Interface { - functions: { - "decimals()": FunctionFragment; - "description()": FunctionFragment; - "getRoundData(uint80)": FunctionFragment; - "latestRoundData()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IAggregatorV3Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "decimals" | "description" | "getRoundData" @@ -46,7 +37,7 @@ export interface IAggregatorV3Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getRoundData", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "latestRoundData", @@ -68,162 +59,128 @@ export interface IAggregatorV3Interface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: {}; } export interface IAggregatorV3 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IAggregatorV3; + waitForDeployment(): Promise; interface: IAggregatorV3Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - decimals(overrides?: CallOverrides): Promise<[number]>; - - description(overrides?: CallOverrides): Promise<[string]>; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ): 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; + + decimals: TypedContractMethod<[], [bigint], "view">; + + description: TypedContractMethod<[], [string], "view">; + + getRoundData: TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - version(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + ], + "view" >; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; + } + ], + "view" >; - version(overrides?: CallOverrides): Promise; - - callStatic: { - decimals(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRoundData" + ): TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - version(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; filters: {}; - - estimateGas: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/amm/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts b/packages/amm/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts index b7048921..01ff7e8f 100644 --- a/packages/amm/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts +++ b/packages/amm/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts @@ -3,45 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IChainlinkOperatorInterface extends utils.Interface { - functions: { - "deleteFeed(string)": FunctionFragment; - "getFeed(string)": FunctionFragment; - "getNormalizedPrice(string)": FunctionFragment; - "getPrice(string)": FunctionFragment; - "pricePrecision()": FunctionFragment; - "pricePrecisionScalar()": FunctionFragment; - "priceStalenessThreshold()": FunctionFragment; - "setFeed(address,address)": FunctionFragment; - "setPriceStalenessThreshold(uint256)": FunctionFragment; - }; - +export interface IChainlinkOperatorInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "deleteFeed" | "getFeed" | "getNormalizedPrice" @@ -53,22 +37,20 @@ export interface IChainlinkOperatorInterface extends utils.Interface { | "setPriceStalenessThreshold" ): FunctionFragment; - encodeFunctionData( - functionFragment: "deleteFeed", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getFeed", - values: [PromiseOrValue] - ): string; + getEvent( + nameOrSignatureOrTopic: + | "DeleteFeed" + | "SetFeed" + | "SetPriceStalenessThreshold" + ): EventFragment; + + encodeFunctionData(functionFragment: "deleteFeed", values: [string]): string; + encodeFunctionData(functionFragment: "getFeed", values: [string]): string; encodeFunctionData( functionFragment: "getNormalizedPrice", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getPrice", - values: [PromiseOrValue] + values: [string] ): string; + encodeFunctionData(functionFragment: "getPrice", values: [string]): string; encodeFunctionData( functionFragment: "pricePrecision", values?: undefined @@ -83,11 +65,11 @@ export interface IChainlinkOperatorInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setFeed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "setPriceStalenessThreshold", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult(functionFragment: "deleteFeed", data: BytesLike): Result; @@ -114,298 +96,220 @@ export interface IChainlinkOperatorInterface extends utils.Interface { functionFragment: "setPriceStalenessThreshold", data: BytesLike ): Result; - - events: { - "DeleteFeed(address,address)": EventFragment; - "SetFeed(address,address)": EventFragment; - "SetPriceStalenessThreshold(uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DeleteFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetPriceStalenessThreshold"): EventFragment; } -export interface DeleteFeedEventObject { - asset: string; - feed: string; +export namespace DeleteFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DeleteFeedEvent = TypedEvent< - [string, string], - DeleteFeedEventObject ->; - -export type DeleteFeedEventFilter = TypedEventFilter; -export interface SetFeedEventObject { - asset: string; - feed: string; +export namespace SetFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFeedEvent = TypedEvent<[string, string], SetFeedEventObject>; - -export type SetFeedEventFilter = TypedEventFilter; -export interface SetPriceStalenessThresholdEventObject { - oldPriceStalenessThreshold: BigNumber; - newPriceStalenessThreshold: BigNumber; +export namespace SetPriceStalenessThresholdEvent { + export type InputTuple = [ + oldPriceStalenessThreshold: BigNumberish, + newPriceStalenessThreshold: BigNumberish + ]; + export type OutputTuple = [ + oldPriceStalenessThreshold: bigint, + newPriceStalenessThreshold: bigint + ]; + export interface OutputObject { + oldPriceStalenessThreshold: bigint; + newPriceStalenessThreshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetPriceStalenessThresholdEvent = TypedEvent< - [BigNumber, BigNumber], - SetPriceStalenessThresholdEventObject ->; - -export type SetPriceStalenessThresholdEventFilter = - TypedEventFilter; export interface IChainlinkOperator extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IChainlinkOperator; + waitForDeployment(): Promise; interface: IChainlinkOperatorInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - pricePrecision(overrides?: CallOverrides): Promise<[BigNumber]>; - - pricePrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - priceStalenessThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + deleteFeed: TypedContractMethod<[symbol: string], [void], "nonpayable">; + + getFeed: TypedContractMethod< + [symbol: string], + [[string, string, boolean]], + "view" + >; + + getNormalizedPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + getPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + pricePrecision: TypedContractMethod<[], [bigint], "view">; + + pricePrecisionScalar: TypedContractMethod<[], [bigint], "view">; + + priceStalenessThreshold: TypedContractMethod<[], [bigint], "view">; + + setFeed: TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + + setPriceStalenessThreshold: TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "deleteFeed" + ): TypedContractMethod<[symbol: string], [void], "nonpayable">; + getFunction( + nameOrSignature: "getFeed" + ): TypedContractMethod<[symbol: string], [[string, string, boolean]], "view">; + getFunction( + nameOrSignature: "getNormalizedPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "getPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "pricePrecision" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "pricePrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "priceStalenessThreshold" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "setFeed" + ): TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setPriceStalenessThreshold" + ): TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "DeleteFeed" + ): TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + getEvent( + key: "SetFeed" + ): TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + getEvent( + key: "SetPriceStalenessThreshold" + ): TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; filters: { - "DeleteFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - DeleteFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - - "SetFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - SetFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - - "SetPriceStalenessThreshold(uint256,uint256)"( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - SetPriceStalenessThreshold( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - }; - - estimateGas: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar( - overrides?: CallOverrides - ): Promise; - - priceStalenessThreshold( - overrides?: CallOverrides - ): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "DeleteFeed(address,address)": TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + DeleteFeed: TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + + "SetFeed(address,address)": TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + SetFeed: TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + + "SetPriceStalenessThreshold(uint256,uint256)": TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; + SetPriceStalenessThreshold: TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@prb/contracts/access/IOwnable.ts b/packages/amm/src/types/@prb/contracts/access/IOwnable.ts index 249b973a..9991d058 100644 --- a/packages/amm/src/types/@prb/contracts/access/IOwnable.ts +++ b/packages/amm/src/types/@prb/contracts/access/IOwnable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IOwnableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IOwnableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface IOwnableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IOwnable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IOwnable; + waitForDeployment(): Promise; interface: IOwnableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@prb/contracts/access/Ownable.ts b/packages/amm/src/types/@prb/contracts/access/Ownable.ts index 3957bdb5..85ddc922 100644 --- a/packages/amm/src/types/@prb/contracts/access/Ownable.ts +++ b/packages/amm/src/types/@prb/contracts/access/Ownable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface OwnableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface OwnableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface OwnableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface Ownable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Ownable; + waitForDeployment(): Promise; interface: OwnableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@prb/contracts/token/erc20/Erc20.ts b/packages/amm/src/types/@prb/contracts/token/erc20/Erc20.ts index 5b82f637..848dc820 100644 --- a/packages/amm/src/types/@prb/contracts/token/erc20/Erc20.ts +++ b/packages/amm/src/types/@prb/contracts/token/erc20/Erc20.ts @@ -3,47 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface Erc20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface Erc20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -57,26 +39,28 @@ export interface Erc20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -86,15 +70,11 @@ export interface Erc20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -120,345 +100,231 @@ export interface Erc20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface Erc20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Erc20; + waitForDeployment(): Promise; interface: Erc20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@prb/contracts/token/erc20/Erc20Permit.ts b/packages/amm/src/types/@prb/contracts/token/erc20/Erc20Permit.ts index b2db9bf4..ec167ebb 100644 --- a/packages/amm/src/types/@prb/contracts/token/erc20/Erc20Permit.ts +++ b/packages/amm/src/types/@prb/contracts/token/erc20/Erc20Permit.ts @@ -3,52 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface Erc20PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface Erc20PermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -67,6 +44,8 @@ export interface Erc20PermitInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -77,40 +56,37 @@ export interface Erc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -120,15 +96,11 @@ export interface Erc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "version", values?: undefined): string; @@ -166,455 +138,280 @@ export interface Erc20PermitInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface Erc20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Erc20Permit; + waitForDeployment(): Promise; interface: Erc20PermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[string]>; - }; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + version: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@prb/contracts/token/erc20/Erc20Recover.ts b/packages/amm/src/types/@prb/contracts/token/erc20/Erc20Recover.ts index 447e7490..af0b02fa 100644 --- a/packages/amm/src/types/@prb/contracts/token/erc20/Erc20Recover.ts +++ b/packages/amm/src/types/@prb/contracts/token/erc20/Erc20Recover.ts @@ -3,42 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface Erc20RecoverInterface extends utils.Interface { - functions: { - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface Erc20RecoverInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_recover" | "_renounceOwnership" | "_setNonRecoverableTokens" @@ -47,9 +34,16 @@ export interface Erc20RecoverInterface extends utils.Interface { | "owner" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Recover" + | "SetNonRecoverableTokens" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -57,15 +51,15 @@ export interface Erc20RecoverInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -87,249 +81,211 @@ export interface Erc20RecoverInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "Recover(address,address,uint256)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface Erc20Recover extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Erc20Recover; + waitForDeployment(): Promise; interface: Erc20RecoverInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + nonRecoverableTokens: TypedContractMethod< + [arg0: BigNumberish], + [string], + "view" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - owner(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@prb/contracts/token/erc20/IErc20.ts b/packages/amm/src/types/@prb/contracts/token/erc20/IErc20.ts index 6e2011b4..bd2fe3fa 100644 --- a/packages/amm/src/types/@prb/contracts/token/erc20/IErc20.ts +++ b/packages/amm/src/types/@prb/contracts/token/erc20/IErc20.ts @@ -3,47 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IErc20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -57,26 +39,28 @@ export interface IErc20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -86,15 +70,11 @@ export interface IErc20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -120,345 +100,231 @@ export interface IErc20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IErc20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20; + waitForDeployment(): Promise; interface: IErc20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@prb/contracts/token/erc20/IErc20Permit.ts b/packages/amm/src/types/@prb/contracts/token/erc20/IErc20Permit.ts index 8c497255..7a9333d8 100644 --- a/packages/amm/src/types/@prb/contracts/token/erc20/IErc20Permit.ts +++ b/packages/amm/src/types/@prb/contracts/token/erc20/IErc20Permit.ts @@ -3,52 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IErc20PermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -67,6 +44,8 @@ export interface IErc20PermitInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -77,40 +56,37 @@ export interface IErc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -120,15 +96,11 @@ export interface IErc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "version", values?: undefined): string; @@ -166,455 +138,280 @@ export interface IErc20PermitInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IErc20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20Permit; + waitForDeployment(): Promise; interface: IErc20PermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[string]>; - }; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + version: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/@prb/contracts/token/erc20/IErc20Recover.ts b/packages/amm/src/types/@prb/contracts/token/erc20/IErc20Recover.ts index db433f4a..f259b269 100644 --- a/packages/amm/src/types/@prb/contracts/token/erc20/IErc20Recover.ts +++ b/packages/amm/src/types/@prb/contracts/token/erc20/IErc20Recover.ts @@ -3,42 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20RecoverInterface extends utils.Interface { - functions: { - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IErc20RecoverInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_recover" | "_renounceOwnership" | "_setNonRecoverableTokens" @@ -47,9 +34,16 @@ export interface IErc20RecoverInterface extends utils.Interface { | "owner" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Recover" + | "SetNonRecoverableTokens" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -57,15 +51,15 @@ export interface IErc20RecoverInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -87,249 +81,211 @@ export interface IErc20RecoverInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "Recover(address,address,uint256)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IErc20Recover extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20Recover; + waitForDeployment(): Promise; interface: IErc20RecoverInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + nonRecoverableTokens: TypedContractMethod< + [index: BigNumberish], + [string], + "view" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - owner(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[index: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/common.ts b/packages/amm/src/types/common.ts index 4c90b08b..56b5f21e 100644 --- a/packages/amm/src/types/common.ts +++ b/packages/amm/src/types/common.ts @@ -1,33 +1,66 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import type { Listener } from "@ethersproject/providers"; -import type { Event, EventFilter } from "ethers"; - -export interface TypedEvent< - TArgsArray extends Array = any, - TArgsObject = any -> extends Event { - args: TArgsArray & TArgsObject; -} +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from "ethers"; -export interface TypedEventFilter<_TEvent extends TypedEvent> - extends EventFilter {} +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> + extends DeferredTopicFilter {} -export interface TypedListener { - (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any +> { + (...args: Partial): TypedDeferredTopicFilter< + TypedContractEvent + >; + name: string; + fragment: EventFragment; + getFragment(...args: Partial): EventFragment; } -type __TypechainArgsArray = T extends TypedEvent ? U : never; +type __TypechainAOutputTuple = T extends TypedContractEvent< + infer _U, + infer W +> + ? W + : never; +type __TypechainOutputObject = T extends TypedContractEvent< + infer _U, + infer _W, + infer V +> + ? V + : never; -export interface OnEvent { - ( - eventFilter: TypedEventFilter, - listener: TypedListener - ): TRes; - (eventName: string, listener: Listener): TRes; +export interface TypedEventLog + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; } +export interface TypedLogDescription + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export type TypedListener = ( + ...listenerArg: [ + ...__TypechainAOutputTuple, + TypedEventLog, + ...undefined[] + ] +) => void; + export type MinEthersFactory = { deploy(...a: ARGS[]): Promise; }; @@ -38,9 +71,61 @@ export type GetContractTypeFromFactory = F extends MinEthersFactory< > ? C : never; - export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; -export type PromiseOrValue = T | Promise; +export type StateMutability = "nonpayable" | "payable" | "view"; + +export type BaseOverrides = Omit; +export type NonPayableOverrides = Omit< + BaseOverrides, + "value" | "blockTag" | "enableCcipRead" +>; +export type PayableOverrides = Omit< + BaseOverrides, + "blockTag" | "enableCcipRead" +>; +export type ViewOverrides = Omit; +export type Overrides = S extends "nonpayable" + ? NonPayableOverrides + : S extends "payable" + ? PayableOverrides + : ViewOverrides; + +export type PostfixOverrides, S extends StateMutability> = + | A + | [...A, Overrides]; +export type ContractMethodArgs< + A extends Array, + S extends StateMutability +> = PostfixOverrides<{ [I in keyof A]-?: A[I] | Typed }, S>; + +export type DefaultReturnType = R extends Array ? R[0] : R; + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod< + A extends Array = Array, + R = any, + S extends StateMutability = "payable" +> { + (...args: ContractMethodArgs): S extends "view" + ? Promise> + : Promise; + + name: string; + + fragment: FunctionFragment; + + getFragment(...args: ContractMethodArgs): FunctionFragment; + + populateTransaction( + ...args: ContractMethodArgs + ): Promise; + staticCall( + ...args: ContractMethodArgs + ): Promise>; + send(...args: ContractMethodArgs): Promise; + estimateGas(...args: ContractMethodArgs): Promise; + staticCallResult(...args: ContractMethodArgs): Promise; +} diff --git a/packages/amm/src/types/contracts/HifiPool.ts b/packages/amm/src/types/contracts/HifiPool.ts index 5d77151c..43668107 100644 --- a/packages/amm/src/types/contracts/HifiPool.ts +++ b/packages/amm/src/types/contracts/HifiPool.ts @@ -3,70 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../common"; -export interface HifiPoolInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(uint256)": FunctionFragment; - "buyHToken(address,uint256)": FunctionFragment; - "buyUnderlying(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "getBurnOutputs(uint256)": FunctionFragment; - "getMintInputs(uint256)": FunctionFragment; - "getNormalizedUnderlyingReserves()": FunctionFragment; - "getQuoteForBuyingHToken(uint256)": FunctionFragment; - "getQuoteForBuyingUnderlying(uint256)": FunctionFragment; - "getQuoteForSellingHToken(uint256)": FunctionFragment; - "getQuoteForSellingUnderlying(uint256)": FunctionFragment; - "getVirtualHTokenReserves()": FunctionFragment; - "hToken()": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "maturity()": FunctionFragment; - "mint(uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "sellHToken(address,uint256)": FunctionFragment; - "sellUnderlying(address,uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface HifiPoolInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -103,6 +62,15 @@ export interface HifiPoolInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "AddLiquidity" + | "Approval" + | "RemoveLiquidity" + | "Trade" + | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -113,40 +81,37 @@ export interface HifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue] + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; encodeFunctionData( functionFragment: "buyHToken", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "buyUnderlying", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getBurnOutputs", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getMintInputs", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getNormalizedUnderlyingReserves", @@ -154,19 +119,19 @@ export interface HifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getQuoteForBuyingHToken", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForBuyingUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForSellingHToken", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForSellingUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getVirtualHTokenReserves", @@ -175,37 +140,31 @@ export interface HifiPoolInterface extends utils.Interface { encodeFunctionData(functionFragment: "hToken", values?: undefined): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; - encodeFunctionData( - functionFragment: "mint", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "mint", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "sellHToken", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "sellUnderlying", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -214,15 +173,11 @@ export interface HifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -319,979 +274,588 @@ export interface HifiPoolInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "AddLiquidity(uint256,address,uint256,uint256,uint256)": EventFragment; - "Approval(address,address,uint256)": EventFragment; - "RemoveLiquidity(uint256,address,uint256,uint256,uint256)": EventFragment; - "Trade(uint256,address,address,int256,int256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AddLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RemoveLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Trade"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface AddLiquidityEventObject { - maturity: BigNumber; - provider: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; - poolTokenAmount: BigNumber; +export namespace AddLiquidityEvent { + export type InputTuple = [ + maturity: BigNumberish, + provider: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish, + poolTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + provider: string, + underlyingAmount: bigint, + hTokenAmount: bigint, + poolTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + provider: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + poolTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type AddLiquidityEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber, BigNumber], - AddLiquidityEventObject ->; - -export type AddLiquidityEventFilter = TypedEventFilter; -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface RemoveLiquidityEventObject { - maturity: BigNumber; - provider: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; - poolTokenAmount: BigNumber; +export namespace RemoveLiquidityEvent { + export type InputTuple = [ + maturity: BigNumberish, + provider: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish, + poolTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + provider: string, + underlyingAmount: bigint, + hTokenAmount: bigint, + poolTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + provider: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + poolTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RemoveLiquidityEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber, BigNumber], - RemoveLiquidityEventObject ->; - -export type RemoveLiquidityEventFilter = TypedEventFilter; -export interface TradeEventObject { - maturity: BigNumber; - from: string; - to: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace TradeEvent { + export type InputTuple = [ + maturity: BigNumberish, + from: AddressLike, + to: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + from: string, + to: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + from: string; + to: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TradeEvent = TypedEvent< - [BigNumber, string, string, BigNumber, BigNumber], - TradeEventObject ->; -export type TradeEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface HifiPool extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): HifiPool; + waitForDeployment(): Promise; interface: HifiPoolInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } - >; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } - >; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise<[BigNumber] & { normalizedUnderlyingReserves: BigNumber }>; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { underlyingIn: BigNumber }>; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { hTokenIn: BigNumber }>; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { underlyingOut: BigNumber }>; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { hTokenOut: BigNumber }>; - - getVirtualHTokenReserves( - overrides?: CallOverrides - ): Promise<[BigNumber] & { virtualHTokenReserves: BigNumber }>; - - hToken(overrides?: CallOverrides): Promise<[string]>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; - decimals(overrides?: CallOverrides): Promise; + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + burn: TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "nonpayable" >; - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } + buyHToken: TypedContractMethod< + [to: AddressLike, hTokenOut: BigNumberish], + [bigint], + "nonpayable" >; - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; + buyUnderlying: TypedContractMethod< + [to: AddressLike, underlyingOut: BigNumberish], + [bigint], + "nonpayable" + >; - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + decimals: TypedContractMethod<[], [bigint], "view">; - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getBurnOutputs: TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "view" + >; - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getMintInputs: TypedContractMethod< + [underlyingOffered: BigNumberish], + [[bigint, bigint] & { hTokenRequired: bigint; poolTokensMinted: bigint }], + "view" + >; - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; + getNormalizedUnderlyingReserves: TypedContractMethod<[], [bigint], "view">; - hToken(overrides?: CallOverrides): Promise; + getQuoteForBuyingHToken: TypedContractMethod< + [hTokenOut: BigNumberish], + [bigint], + "view" + >; - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getQuoteForBuyingUnderlying: TypedContractMethod< + [underlyingOut: BigNumberish], + [bigint], + "view" + >; - maturity(overrides?: CallOverrides): Promise; + getQuoteForSellingHToken: TypedContractMethod< + [hTokenIn: BigNumberish], + [bigint], + "view" + >; - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getQuoteForSellingUnderlying: TypedContractMethod< + [underlyingIn: BigNumberish], + [bigint], + "view" + >; - name(overrides?: CallOverrides): Promise; + getVirtualHTokenReserves: TypedContractMethod<[], [bigint], "view">; - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + hToken: TypedContractMethod<[], [string], "view">; - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + maturity: TypedContractMethod<[], [bigint], "view">; - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + mint: TypedContractMethod< + [underlyingOffered: BigNumberish], + [bigint], + "nonpayable" + >; - symbol(overrides?: CallOverrides): Promise; + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; - totalSupply(overrides?: CallOverrides): Promise; + sellHToken: TypedContractMethod< + [to: AddressLike, hTokenIn: BigNumberish], + [bigint], + "nonpayable" + >; - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + sellUnderlying: TypedContractMethod< + [to: AddressLike, underlyingIn: BigNumberish], + [bigint], + "nonpayable" + >; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + symbol: TypedContractMethod<[], [string], "view">; - underlying(overrides?: CallOverrides): Promise; + totalSupply: TypedContractMethod<[], [bigint], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + version: TypedContractMethod<[], [string], "view">; - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyHToken" + ): TypedContractMethod< + [to: AddressLike, hTokenOut: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyUnderlying" + ): TypedContractMethod< + [to: AddressLike, underlyingOut: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "getBurnOutputs" + ): TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "view" + >; + getFunction( + nameOrSignature: "getMintInputs" + ): TypedContractMethod< + [underlyingOffered: BigNumberish], + [[bigint, bigint] & { hTokenRequired: bigint; poolTokensMinted: bigint }], + "view" + >; + getFunction( + nameOrSignature: "getNormalizedUnderlyingReserves" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForBuyingHToken" + ): TypedContractMethod<[hTokenOut: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForBuyingUnderlying" + ): TypedContractMethod<[underlyingOut: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForSellingHToken" + ): TypedContractMethod<[hTokenIn: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForSellingUnderlying" + ): TypedContractMethod<[underlyingIn: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getVirtualHTokenReserves" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "hToken" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [underlyingOffered: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellHToken" + ): TypedContractMethod< + [to: AddressLike, hTokenIn: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlying" + ): TypedContractMethod< + [to: AddressLike, underlyingIn: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "AddLiquidity" + ): TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject + >; + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "RemoveLiquidity" + ): TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; + getEvent( + key: "Trade" + ): TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; - burn( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + filters: { + "AddLiquidity(uint256,address,uint256,uint256,uint256)": TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject >; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + AddLiquidity: TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject >; - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject >; - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - filters: { - "AddLiquidity(uint256,address,uint256,uint256,uint256)"( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): AddLiquidityEventFilter; - AddLiquidity( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): AddLiquidityEventFilter; - - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "RemoveLiquidity(uint256,address,uint256,uint256,uint256)"( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): RemoveLiquidityEventFilter; - RemoveLiquidity( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): RemoveLiquidityEventFilter; - - "Trade(uint256,address,address,int256,int256)"( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): TradeEventFilter; - Trade( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): TradeEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves( - overrides?: CallOverrides - ): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; + "RemoveLiquidity(uint256,address,uint256,uint256,uint256)": TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; + RemoveLiquidity: TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; + "Trade(uint256,address,address,int256,int256)": TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; + Trade: TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; - version(overrides?: CallOverrides): Promise; + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/contracts/HifiPoolRegistry.ts b/packages/amm/src/types/contracts/HifiPoolRegistry.ts index 4a0b8e80..08c8f901 100644 --- a/packages/amm/src/types/contracts/HifiPoolRegistry.ts +++ b/packages/amm/src/types/contracts/HifiPoolRegistry.ts @@ -3,41 +3,28 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../common"; -export interface HifiPoolRegistryInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - "pools(address)": FunctionFragment; - "trackPool(address)": FunctionFragment; - "untrackPool(address)": FunctionFragment; - }; - +export interface HifiPoolRegistryInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "owner" @@ -46,26 +33,27 @@ export interface HifiPoolRegistryInterface extends utils.Interface { | "untrackPool" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "TrackPool" | "TransferOwnership" | "UntrackPool" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "pools", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "pools", values: [AddressLike]): string; encodeFunctionData( functionFragment: "trackPool", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "untrackPool", - values: [PromiseOrValue] + values: [AddressLike] ): string; decodeFunctionResult( @@ -83,224 +71,181 @@ export interface HifiPoolRegistryInterface extends utils.Interface { functionFragment: "untrackPool", data: BytesLike ): Result; - - events: { - "TrackPool(address)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "UntrackPool(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TrackPool"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "UntrackPool"): EventFragment; } -export interface TrackPoolEventObject { - pool: string; +export namespace TrackPoolEvent { + export type InputTuple = [pool: AddressLike]; + export type OutputTuple = [pool: string]; + export interface OutputObject { + pool: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TrackPoolEvent = TypedEvent<[string], TrackPoolEventObject>; - -export type TrackPoolEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface UntrackPoolEventObject { - pool: string; +export namespace UntrackPoolEvent { + export type InputTuple = [pool: AddressLike]; + export type OutputTuple = [pool: string]; + export interface OutputObject { + pool: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type UntrackPoolEvent = TypedEvent<[string], UntrackPoolEventObject>; - -export type UntrackPoolEventFilter = TypedEventFilter; export interface HifiPoolRegistry extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): HifiPoolRegistry; + waitForDeployment(): Promise; interface: HifiPoolRegistryInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + pools: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; + + trackPool: TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + + untrackPool: TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; - untrackPool( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "pools" + ): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "trackPool" + ): TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "untrackPool" + ): TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + + getEvent( + key: "TrackPool" + ): TypedContractEvent< + TrackPoolEvent.InputTuple, + TrackPoolEvent.OutputTuple, + TrackPoolEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "UntrackPool" + ): TypedContractEvent< + UntrackPoolEvent.InputTuple, + UntrackPoolEvent.OutputTuple, + UntrackPoolEvent.OutputObject + >; filters: { - "TrackPool(address)"( - pool?: PromiseOrValue | null - ): TrackPoolEventFilter; - TrackPool(pool?: PromiseOrValue | null): TrackPoolEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "UntrackPool(address)"( - pool?: PromiseOrValue | null - ): UntrackPoolEventFilter; - UntrackPool(pool?: PromiseOrValue | null): UntrackPoolEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TrackPool(address)": TypedContractEvent< + TrackPoolEvent.InputTuple, + TrackPoolEvent.OutputTuple, + TrackPoolEvent.OutputObject + >; + TrackPool: TypedContractEvent< + TrackPoolEvent.InputTuple, + TrackPoolEvent.OutputTuple, + TrackPoolEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "UntrackPool(address)": TypedContractEvent< + UntrackPoolEvent.InputTuple, + UntrackPoolEvent.OutputTuple, + UntrackPoolEvent.OutputObject + >; + UntrackPool: TypedContractEvent< + UntrackPoolEvent.InputTuple, + UntrackPoolEvent.OutputTuple, + UntrackPoolEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/contracts/IHifiPool.ts b/packages/amm/src/types/contracts/IHifiPool.ts index 9b1e24c8..a15e161c 100644 --- a/packages/amm/src/types/contracts/IHifiPool.ts +++ b/packages/amm/src/types/contracts/IHifiPool.ts @@ -3,70 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../common"; -export interface IHifiPoolInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(uint256)": FunctionFragment; - "buyHToken(address,uint256)": FunctionFragment; - "buyUnderlying(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "getBurnOutputs(uint256)": FunctionFragment; - "getMintInputs(uint256)": FunctionFragment; - "getNormalizedUnderlyingReserves()": FunctionFragment; - "getQuoteForBuyingHToken(uint256)": FunctionFragment; - "getQuoteForBuyingUnderlying(uint256)": FunctionFragment; - "getQuoteForSellingHToken(uint256)": FunctionFragment; - "getQuoteForSellingUnderlying(uint256)": FunctionFragment; - "getVirtualHTokenReserves()": FunctionFragment; - "hToken()": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "maturity()": FunctionFragment; - "mint(uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "sellHToken(address,uint256)": FunctionFragment; - "sellUnderlying(address,uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IHifiPoolInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -103,6 +62,15 @@ export interface IHifiPoolInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "AddLiquidity" + | "Approval" + | "RemoveLiquidity" + | "Trade" + | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -113,40 +81,37 @@ export interface IHifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue] + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; encodeFunctionData( functionFragment: "buyHToken", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "buyUnderlying", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getBurnOutputs", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getMintInputs", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getNormalizedUnderlyingReserves", @@ -154,19 +119,19 @@ export interface IHifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getQuoteForBuyingHToken", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForBuyingUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForSellingHToken", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForSellingUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getVirtualHTokenReserves", @@ -175,37 +140,31 @@ export interface IHifiPoolInterface extends utils.Interface { encodeFunctionData(functionFragment: "hToken", values?: undefined): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; - encodeFunctionData( - functionFragment: "mint", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "mint", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "sellHToken", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "sellUnderlying", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -214,15 +173,11 @@ export interface IHifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -319,979 +274,588 @@ export interface IHifiPoolInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "AddLiquidity(uint256,address,uint256,uint256,uint256)": EventFragment; - "Approval(address,address,uint256)": EventFragment; - "RemoveLiquidity(uint256,address,uint256,uint256,uint256)": EventFragment; - "Trade(uint256,address,address,int256,int256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AddLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RemoveLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Trade"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface AddLiquidityEventObject { - maturity: BigNumber; - provider: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; - poolTokenAmount: BigNumber; +export namespace AddLiquidityEvent { + export type InputTuple = [ + maturity: BigNumberish, + provider: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish, + poolTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + provider: string, + underlyingAmount: bigint, + hTokenAmount: bigint, + poolTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + provider: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + poolTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type AddLiquidityEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber, BigNumber], - AddLiquidityEventObject ->; - -export type AddLiquidityEventFilter = TypedEventFilter; -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface RemoveLiquidityEventObject { - maturity: BigNumber; - provider: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; - poolTokenAmount: BigNumber; +export namespace RemoveLiquidityEvent { + export type InputTuple = [ + maturity: BigNumberish, + provider: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish, + poolTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + provider: string, + underlyingAmount: bigint, + hTokenAmount: bigint, + poolTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + provider: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + poolTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RemoveLiquidityEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber, BigNumber], - RemoveLiquidityEventObject ->; - -export type RemoveLiquidityEventFilter = TypedEventFilter; -export interface TradeEventObject { - maturity: BigNumber; - from: string; - to: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace TradeEvent { + export type InputTuple = [ + maturity: BigNumberish, + from: AddressLike, + to: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + from: string, + to: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + from: string; + to: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TradeEvent = TypedEvent< - [BigNumber, string, string, BigNumber, BigNumber], - TradeEventObject ->; -export type TradeEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IHifiPool extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IHifiPool; + waitForDeployment(): Promise; interface: IHifiPoolInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } - >; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } - >; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise<[BigNumber] & { normalizedUnderlyingReserves: BigNumber }>; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { underlyingIn: BigNumber }>; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { hTokenIn: BigNumber }>; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { underlyingOut: BigNumber }>; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { hTokenOut: BigNumber }>; - - getVirtualHTokenReserves( - overrides?: CallOverrides - ): Promise<[BigNumber] & { virtualHTokenReserves: BigNumber }>; - - hToken(overrides?: CallOverrides): Promise<[string]>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; - decimals(overrides?: CallOverrides): Promise; + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + burn: TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "nonpayable" >; - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } + buyHToken: TypedContractMethod< + [to: AddressLike, hTokenOut: BigNumberish], + [bigint], + "nonpayable" >; - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; + buyUnderlying: TypedContractMethod< + [to: AddressLike, underlyingOut: BigNumberish], + [bigint], + "nonpayable" + >; - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + decimals: TypedContractMethod<[], [bigint], "view">; - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getBurnOutputs: TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "view" + >; - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getMintInputs: TypedContractMethod< + [underlyingOffered: BigNumberish], + [[bigint, bigint] & { hTokenRequired: bigint; poolTokensMinted: bigint }], + "view" + >; - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; + getNormalizedUnderlyingReserves: TypedContractMethod<[], [bigint], "view">; - hToken(overrides?: CallOverrides): Promise; + getQuoteForBuyingHToken: TypedContractMethod< + [hTokenOut: BigNumberish], + [bigint], + "view" + >; - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getQuoteForBuyingUnderlying: TypedContractMethod< + [underlyingOut: BigNumberish], + [bigint], + "view" + >; - maturity(overrides?: CallOverrides): Promise; + getQuoteForSellingHToken: TypedContractMethod< + [hTokenIn: BigNumberish], + [bigint], + "view" + >; - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getQuoteForSellingUnderlying: TypedContractMethod< + [underlyingIn: BigNumberish], + [bigint], + "view" + >; - name(overrides?: CallOverrides): Promise; + getVirtualHTokenReserves: TypedContractMethod<[], [bigint], "view">; - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + hToken: TypedContractMethod<[], [string], "view">; - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + maturity: TypedContractMethod<[], [bigint], "view">; - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + mint: TypedContractMethod< + [underlyingOffered: BigNumberish], + [bigint], + "nonpayable" + >; - symbol(overrides?: CallOverrides): Promise; + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; - totalSupply(overrides?: CallOverrides): Promise; + sellHToken: TypedContractMethod< + [to: AddressLike, hTokenIn: BigNumberish], + [bigint], + "nonpayable" + >; - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + sellUnderlying: TypedContractMethod< + [to: AddressLike, underlyingIn: BigNumberish], + [bigint], + "nonpayable" + >; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + symbol: TypedContractMethod<[], [string], "view">; - underlying(overrides?: CallOverrides): Promise; + totalSupply: TypedContractMethod<[], [bigint], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + version: TypedContractMethod<[], [string], "view">; - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyHToken" + ): TypedContractMethod< + [to: AddressLike, hTokenOut: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyUnderlying" + ): TypedContractMethod< + [to: AddressLike, underlyingOut: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "getBurnOutputs" + ): TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "view" + >; + getFunction( + nameOrSignature: "getMintInputs" + ): TypedContractMethod< + [underlyingOffered: BigNumberish], + [[bigint, bigint] & { hTokenRequired: bigint; poolTokensMinted: bigint }], + "view" + >; + getFunction( + nameOrSignature: "getNormalizedUnderlyingReserves" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForBuyingHToken" + ): TypedContractMethod<[hTokenOut: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForBuyingUnderlying" + ): TypedContractMethod<[underlyingOut: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForSellingHToken" + ): TypedContractMethod<[hTokenIn: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForSellingUnderlying" + ): TypedContractMethod<[underlyingIn: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getVirtualHTokenReserves" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "hToken" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [underlyingOffered: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellHToken" + ): TypedContractMethod< + [to: AddressLike, hTokenIn: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlying" + ): TypedContractMethod< + [to: AddressLike, underlyingIn: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "AddLiquidity" + ): TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject + >; + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "RemoveLiquidity" + ): TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; + getEvent( + key: "Trade" + ): TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; - burn( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + filters: { + "AddLiquidity(uint256,address,uint256,uint256,uint256)": TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject >; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + AddLiquidity: TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject >; - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject >; - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - filters: { - "AddLiquidity(uint256,address,uint256,uint256,uint256)"( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): AddLiquidityEventFilter; - AddLiquidity( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): AddLiquidityEventFilter; - - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "RemoveLiquidity(uint256,address,uint256,uint256,uint256)"( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): RemoveLiquidityEventFilter; - RemoveLiquidity( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): RemoveLiquidityEventFilter; - - "Trade(uint256,address,address,int256,int256)"( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): TradeEventFilter; - Trade( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): TradeEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves( - overrides?: CallOverrides - ): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; + "RemoveLiquidity(uint256,address,uint256,uint256,uint256)": TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; + RemoveLiquidity: TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; + "Trade(uint256,address,address,int256,int256)": TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; + Trade: TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; - version(overrides?: CallOverrides): Promise; + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/contracts/IHifiPoolRegistry.ts b/packages/amm/src/types/contracts/IHifiPoolRegistry.ts index 3e9326e0..5d2e6e6f 100644 --- a/packages/amm/src/types/contracts/IHifiPoolRegistry.ts +++ b/packages/amm/src/types/contracts/IHifiPoolRegistry.ts @@ -3,41 +3,28 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../common"; -export interface IHifiPoolRegistryInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - "pools(address)": FunctionFragment; - "trackPool(address)": FunctionFragment; - "untrackPool(address)": FunctionFragment; - }; - +export interface IHifiPoolRegistryInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "owner" @@ -46,26 +33,27 @@ export interface IHifiPoolRegistryInterface extends utils.Interface { | "untrackPool" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "TrackPool" | "TransferOwnership" | "UntrackPool" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "pools", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "pools", values: [AddressLike]): string; encodeFunctionData( functionFragment: "trackPool", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "untrackPool", - values: [PromiseOrValue] + values: [AddressLike] ): string; decodeFunctionResult( @@ -83,224 +71,181 @@ export interface IHifiPoolRegistryInterface extends utils.Interface { functionFragment: "untrackPool", data: BytesLike ): Result; - - events: { - "TrackPool(address)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "UntrackPool(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TrackPool"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "UntrackPool"): EventFragment; } -export interface TrackPoolEventObject { - pool: string; +export namespace TrackPoolEvent { + export type InputTuple = [pool: AddressLike]; + export type OutputTuple = [pool: string]; + export interface OutputObject { + pool: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TrackPoolEvent = TypedEvent<[string], TrackPoolEventObject>; - -export type TrackPoolEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface UntrackPoolEventObject { - pool: string; +export namespace UntrackPoolEvent { + export type InputTuple = [pool: AddressLike]; + export type OutputTuple = [pool: string]; + export interface OutputObject { + pool: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type UntrackPoolEvent = TypedEvent<[string], UntrackPoolEventObject>; - -export type UntrackPoolEventFilter = TypedEventFilter; export interface IHifiPoolRegistry extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IHifiPoolRegistry; + waitForDeployment(): Promise; interface: IHifiPoolRegistryInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - pools( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + pools: TypedContractMethod<[pool: AddressLike], [boolean], "view">; + + trackPool: TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + + untrackPool: TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; - untrackPool( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "pools" + ): TypedContractMethod<[pool: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "trackPool" + ): TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "untrackPool" + ): TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + + getEvent( + key: "TrackPool" + ): TypedContractEvent< + TrackPoolEvent.InputTuple, + TrackPoolEvent.OutputTuple, + TrackPoolEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "UntrackPool" + ): TypedContractEvent< + UntrackPoolEvent.InputTuple, + UntrackPoolEvent.OutputTuple, + UntrackPoolEvent.OutputObject + >; filters: { - "TrackPool(address)"( - pool?: PromiseOrValue | null - ): TrackPoolEventFilter; - TrackPool(pool?: PromiseOrValue | null): TrackPoolEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "UntrackPool(address)"( - pool?: PromiseOrValue | null - ): UntrackPoolEventFilter; - UntrackPool(pool?: PromiseOrValue | null): UntrackPoolEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TrackPool(address)": TypedContractEvent< + TrackPoolEvent.InputTuple, + TrackPoolEvent.OutputTuple, + TrackPoolEvent.OutputObject + >; + TrackPool: TypedContractEvent< + TrackPoolEvent.InputTuple, + TrackPoolEvent.OutputTuple, + TrackPoolEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "UntrackPool(address)": TypedContractEvent< + UntrackPoolEvent.InputTuple, + UntrackPoolEvent.OutputTuple, + UntrackPoolEvent.OutputObject + >; + UntrackPool: TypedContractEvent< + UntrackPoolEvent.InputTuple, + UntrackPoolEvent.OutputTuple, + UntrackPoolEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/contracts/math/YieldSpace.ts b/packages/amm/src/types/contracts/math/YieldSpace.ts index 2ea85a17..142eca95 100644 --- a/packages/amm/src/types/contracts/math/YieldSpace.ts +++ b/packages/amm/src/types/contracts/math/YieldSpace.ts @@ -1,55 +1,69 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import type { BaseContract, Signer, utils } from "ethers"; - -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + BaseContract, + FunctionFragment, + Interface, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, } from "../../common"; -export interface YieldSpaceInterface extends utils.Interface { - functions: {}; - - events: {}; -} +export interface YieldSpaceInterface extends Interface {} export interface YieldSpace extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): YieldSpace; + waitForDeployment(): Promise; interface: YieldSpaceInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; - functions: {}; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - callStatic: {}; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - filters: {}; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - estimateGas: {}; + getFunction( + key: string | FunctionFragment + ): T; - populateTransaction: {}; + filters: {}; } diff --git a/packages/amm/src/types/contracts/test/GodModeErc20.ts b/packages/amm/src/types/contracts/test/GodModeErc20.ts index 34319c72..fd2bf037 100644 --- a/packages/amm/src/types/contracts/test/GodModeErc20.ts +++ b/packages/amm/src/types/contracts/test/GodModeErc20.ts @@ -3,49 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeErc20Interface extends utils.Interface { - functions: { - "__godMode_burn(address,uint256)": FunctionFragment; - "__godMode_mint(address,uint256)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface GodModeErc20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "__godMode_burn" | "__godMode_mint" | "allowance" @@ -61,34 +41,38 @@ export interface GodModeErc20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "Approval" | "Burn" | "Mint" | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "__godMode_burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -98,15 +82,11 @@ export interface GodModeErc20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -140,443 +120,319 @@ export interface GodModeErc20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; -export type MintEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface GodModeErc20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeErc20; + waitForDeployment(): Promise; interface: GodModeErc20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + ): 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; + + __godMode_burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + __godMode_mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "__godMode_burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/contracts/test/GodModeHToken.ts b/packages/amm/src/types/contracts/test/GodModeHToken.ts index 9c8f4aba..5268ff1c 100644 --- a/packages/amm/src/types/contracts/test/GodModeHToken.ts +++ b/packages/amm/src/types/contracts/test/GodModeHToken.ts @@ -3,73 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeHTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "__godMode_mint(address,uint256)": FunctionFragment; - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setBalanceSheet(address)": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "balanceSheet()": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "depositUnderlying(uint256)": FunctionFragment; - "fintroller()": FunctionFragment; - "getDepositorBalance(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "isMatured()": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "nonces(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "redeem(uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "totalUnderlyingReserve()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - "withdrawUnderlying(uint256)": FunctionFragment; - }; - +export interface GodModeHTokenInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "__godMode_mint" @@ -109,6 +65,21 @@ export interface GodModeHTokenInterface extends utils.Interface { | "withdrawUnderlying" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "DepositUnderlying" + | "Mint" + | "Recover" + | "Redeem" + | "SetBalanceSheet" + | "SetNonRecoverableTokens" + | "Transfer" + | "TransferOwnership" + | "WithdrawUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -119,11 +90,11 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "__godMode_mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -131,27 +102,27 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setBalanceSheet", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "balanceSheet", @@ -159,16 +130,16 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -176,43 +147,40 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getDepositorBalance", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "isMatured", values?: undefined): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; encodeFunctionData( functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "redeem", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -225,15 +193,11 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -246,7 +210,7 @@ export interface GodModeHTokenInterface extends utils.Interface { encodeFunctionData(functionFragment: "version", values?: undefined): string; encodeFunctionData( functionFragment: "withdrawUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -340,1088 +304,788 @@ export interface GodModeHTokenInterface extends utils.Interface { functionFragment: "withdrawUnderlying", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "DepositUnderlying(address,uint256,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Recover(address,address,uint256)": EventFragment; - "Redeem(address,uint256,uint256)": EventFragment; - "SetBalanceSheet(address,address,address)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "WithdrawUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DepositUnderlying"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBalanceSheet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawUnderlying"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; -export type BurnEventFilter = TypedEventFilter; - -export interface DepositUnderlyingEventObject { - depositor: string; - depositUnderlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace DepositUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + depositUnderlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + depositUnderlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + depositUnderlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - DepositUnderlyingEventObject ->; - -export type DepositUnderlyingEventFilter = - TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; - -export type MintEventFilter = TypedEventFilter; -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; -export type RecoverEventFilter = TypedEventFilter; - -export interface RedeemEventObject { - account: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace RedeemEvent { + export type InputTuple = [ + account: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + account: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RedeemEvent = TypedEvent< - [string, BigNumber, BigNumber], - RedeemEventObject ->; - -export type RedeemEventFilter = TypedEventFilter; -export interface SetBalanceSheetEventObject { - owner: string; - oldBalanceSheet: string; - newBalanceSheet: string; +export namespace SetBalanceSheetEvent { + export type InputTuple = [ + owner: AddressLike, + oldBalanceSheet: AddressLike, + newBalanceSheet: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldBalanceSheet: string, + newBalanceSheet: string + ]; + export interface OutputObject { + owner: string; + oldBalanceSheet: string; + newBalanceSheet: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetBalanceSheetEvent = TypedEvent< - [string, string, string], - SetBalanceSheetEventObject ->; -export type SetBalanceSheetEventFilter = TypedEventFilter; - -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; -} -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; - -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawUnderlyingEventObject { - depositor: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; + +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - WithdrawUnderlyingEventObject ->; -export type WithdrawUnderlyingEventFilter = - TypedEventFilter; +export namespace WithdrawUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface GodModeHToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeHToken; + waitForDeployment(): Promise; interface: GodModeHTokenInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amount: BigNumber }>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise<[boolean]>; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + __godMode_mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setBalanceSheet: TypedContractMethod< + [newBalanceSheet: AddressLike], + [void], + "nonpayable" + >; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + depositUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + fintroller: TypedContractMethod<[], [string], "view">; + + getDepositorBalance: TypedContractMethod< + [depositor: AddressLike], + [bigint], + "view" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + isMatured: TypedContractMethod<[], [boolean], "view">; + + maturity: TypedContractMethod<[], [bigint], "view">; + + mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonRecoverableTokens: TypedContractMethod< + [arg0: BigNumberish], + [string], + "view" + >; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + totalUnderlyingReserve: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [string], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + withdrawUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "__godMode_mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setBalanceSheet" + ): TypedContractMethod<[newBalanceSheet: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getDepositorBalance" + ): TypedContractMethod<[depositor: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "isMatured" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "totalUnderlyingReserve" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "withdrawUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "DepositUnderlying" + ): TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "Redeem" + ): TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + getEvent( + key: "SetBalanceSheet" + ): TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawUnderlying" + ): TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "DepositUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - DepositUnderlying( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "Redeem(address,uint256,uint256)"( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - Redeem( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - - "SetBalanceSheet(address,address,address)"( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - SetBalanceSheet( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - WithdrawUnderlying( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve( - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "DepositUnderlying(address,uint256,uint256)": TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + DepositUnderlying: TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "Redeem(address,uint256,uint256)": TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + Redeem: TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + + "SetBalanceSheet(address,address,address)": TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + SetBalanceSheet: TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "WithdrawUnderlying(address,uint256,uint256)": TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; + WithdrawUnderlying: TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/contracts/test/GodModeHifiPool.ts b/packages/amm/src/types/contracts/test/GodModeHifiPool.ts index 70d26f6b..2302c2a7 100644 --- a/packages/amm/src/types/contracts/test/GodModeHifiPool.ts +++ b/packages/amm/src/types/contracts/test/GodModeHifiPool.ts @@ -3,75 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeHifiPoolInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "__godMode_mint(uint256)": FunctionFragment; - "__godMode_setMaturity(uint256)": FunctionFragment; - "__godMode_setTotalSupply(uint256)": FunctionFragment; - "__godMode_setUnderlyingPrecisionScalar(uint256)": FunctionFragment; - "__godMode_toInt256(uint256)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(uint256)": FunctionFragment; - "buyHToken(address,uint256)": FunctionFragment; - "buyUnderlying(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "getBurnOutputs(uint256)": FunctionFragment; - "getMintInputs(uint256)": FunctionFragment; - "getNormalizedUnderlyingReserves()": FunctionFragment; - "getQuoteForBuyingHToken(uint256)": FunctionFragment; - "getQuoteForBuyingUnderlying(uint256)": FunctionFragment; - "getQuoteForSellingHToken(uint256)": FunctionFragment; - "getQuoteForSellingUnderlying(uint256)": FunctionFragment; - "getVirtualHTokenReserves()": FunctionFragment; - "hToken()": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "maturity()": FunctionFragment; - "mint(uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "sellHToken(address,uint256)": FunctionFragment; - "sellUnderlying(address,uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface GodModeHifiPoolInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "__godMode_mint" @@ -113,6 +67,15 @@ export interface GodModeHifiPoolInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "AddLiquidity" + | "Approval" + | "RemoveLiquidity" + | "Trade" + | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -123,60 +86,57 @@ export interface GodModeHifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "__godMode_mint", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_setMaturity", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_setTotalSupply", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_setUnderlyingPrecisionScalar", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_toInt256", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue] + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; encodeFunctionData( functionFragment: "buyHToken", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "buyUnderlying", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getBurnOutputs", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getMintInputs", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getNormalizedUnderlyingReserves", @@ -184,19 +144,19 @@ export interface GodModeHifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getQuoteForBuyingHToken", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForBuyingUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForSellingHToken", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForSellingUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getVirtualHTokenReserves", @@ -205,37 +165,31 @@ export interface GodModeHifiPoolInterface extends utils.Interface { encodeFunctionData(functionFragment: "hToken", values?: undefined): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; - encodeFunctionData( - functionFragment: "mint", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "mint", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "sellHToken", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "sellUnderlying", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -244,15 +198,11 @@ export interface GodModeHifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -369,1104 +319,633 @@ export interface GodModeHifiPoolInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "AddLiquidity(uint256,address,uint256,uint256,uint256)": EventFragment; - "Approval(address,address,uint256)": EventFragment; - "RemoveLiquidity(uint256,address,uint256,uint256,uint256)": EventFragment; - "Trade(uint256,address,address,int256,int256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AddLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RemoveLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Trade"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface AddLiquidityEventObject { - maturity: BigNumber; - provider: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; - poolTokenAmount: BigNumber; +export namespace AddLiquidityEvent { + export type InputTuple = [ + maturity: BigNumberish, + provider: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish, + poolTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + provider: string, + underlyingAmount: bigint, + hTokenAmount: bigint, + poolTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + provider: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + poolTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type AddLiquidityEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber, BigNumber], - AddLiquidityEventObject ->; - -export type AddLiquidityEventFilter = TypedEventFilter; -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; -export interface RemoveLiquidityEventObject { - maturity: BigNumber; - provider: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; - poolTokenAmount: BigNumber; +export namespace RemoveLiquidityEvent { + export type InputTuple = [ + maturity: BigNumberish, + provider: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish, + poolTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + provider: string, + underlyingAmount: bigint, + hTokenAmount: bigint, + poolTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + provider: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + poolTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RemoveLiquidityEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber, BigNumber], - RemoveLiquidityEventObject ->; -export type RemoveLiquidityEventFilter = TypedEventFilter; - -export interface TradeEventObject { - maturity: BigNumber; - from: string; - to: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace TradeEvent { + export type InputTuple = [ + maturity: BigNumberish, + from: AddressLike, + to: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + from: string, + to: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + from: string; + to: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TradeEvent = TypedEvent< - [BigNumber, string, string, BigNumber, BigNumber], - TradeEventObject ->; - -export type TradeEventFilter = TypedEventFilter; -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface GodModeHifiPool extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeHifiPool; + waitForDeployment(): Promise; interface: GodModeHifiPoolInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - __godMode_mint( - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTotalSupply( - totalSupply_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlyingPrecisionScalar( - underlyingPrecisionScalar_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_toInt256( - x: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { xs: BigNumber }>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } - >; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } - >; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise<[BigNumber] & { normalizedUnderlyingReserves: BigNumber }>; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { underlyingIn: BigNumber }>; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { hTokenIn: BigNumber }>; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { underlyingOut: BigNumber }>; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { hTokenOut: BigNumber }>; - - getVirtualHTokenReserves( - overrides?: CallOverrides - ): Promise<[BigNumber] & { virtualHTokenReserves: BigNumber }>; - - hToken(overrides?: CallOverrides): Promise<[string]>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTotalSupply( - totalSupply_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlyingPrecisionScalar( - underlyingPrecisionScalar_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_toInt256( - x: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + __godMode_mint: TypedContractMethod< + [mintAmount: BigNumberish], + [void], + "nonpayable" + >; - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + __godMode_setMaturity: TypedContractMethod< + [newMaturity: BigNumberish], + [void], + "nonpayable" + >; - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + __godMode_setTotalSupply: TypedContractMethod< + [totalSupply_: BigNumberish], + [void], + "nonpayable" + >; - decimals(overrides?: CallOverrides): Promise; + __godMode_setUnderlyingPrecisionScalar: TypedContractMethod< + [underlyingPrecisionScalar_: BigNumberish], + [void], + "nonpayable" + >; - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + __godMode_toInt256: TypedContractMethod<[x: BigNumberish], [bigint], "view">; - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" >; - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" >; - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + burn: TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "nonpayable" + >; - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + buyHToken: TypedContractMethod< + [to: AddressLike, hTokenOut: BigNumberish], + [bigint], + "nonpayable" + >; - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; + buyUnderlying: TypedContractMethod< + [to: AddressLike, underlyingOut: BigNumberish], + [bigint], + "nonpayable" + >; - hToken(overrides?: CallOverrides): Promise; + decimals: TypedContractMethod<[], [bigint], "view">; - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; - maturity(overrides?: CallOverrides): Promise; + getBurnOutputs: TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "view" + >; - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getMintInputs: TypedContractMethod< + [underlyingOffered: BigNumberish], + [[bigint, bigint] & { hTokenRequired: bigint; poolTokensMinted: bigint }], + "view" + >; - name(overrides?: CallOverrides): Promise; + getNormalizedUnderlyingReserves: TypedContractMethod<[], [bigint], "view">; - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getQuoteForBuyingHToken: TypedContractMethod< + [hTokenOut: BigNumberish], + [bigint], + "view" + >; - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getQuoteForBuyingUnderlying: TypedContractMethod< + [underlyingOut: BigNumberish], + [bigint], + "view" + >; - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getQuoteForSellingHToken: TypedContractMethod< + [hTokenIn: BigNumberish], + [bigint], + "view" + >; - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getQuoteForSellingUnderlying: TypedContractMethod< + [underlyingIn: BigNumberish], + [bigint], + "view" + >; - symbol(overrides?: CallOverrides): Promise; + getVirtualHTokenReserves: TypedContractMethod<[], [bigint], "view">; - totalSupply(overrides?: CallOverrides): Promise; + hToken: TypedContractMethod<[], [string], "view">; - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + maturity: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + mint: TypedContractMethod< + [underlyingOffered: BigNumberish], + [bigint], + "nonpayable" + >; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + sellHToken: TypedContractMethod< + [to: AddressLike, hTokenIn: BigNumberish], + [bigint], + "nonpayable" + >; - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + sellUnderlying: TypedContractMethod< + [to: AddressLike, underlyingIn: BigNumberish], + [bigint], + "nonpayable" + >; - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + symbol: TypedContractMethod<[], [string], "view">; - __godMode_mint( - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + totalSupply: TypedContractMethod<[], [bigint], "view">; - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - __godMode_setTotalSupply( - totalSupply_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - __godMode_setUnderlyingPrecisionScalar( - underlyingPrecisionScalar_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlying: TypedContractMethod<[], [string], "view">; - __godMode_toInt256( - x: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + version: TypedContractMethod<[], [string], "view">; - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "__godMode_mint" + ): TypedContractMethod<[mintAmount: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "__godMode_setMaturity" + ): TypedContractMethod<[newMaturity: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "__godMode_setTotalSupply" + ): TypedContractMethod<[totalSupply_: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "__godMode_setUnderlyingPrecisionScalar" + ): TypedContractMethod< + [underlyingPrecisionScalar_: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_toInt256" + ): TypedContractMethod<[x: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyHToken" + ): TypedContractMethod< + [to: AddressLike, hTokenOut: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyUnderlying" + ): TypedContractMethod< + [to: AddressLike, underlyingOut: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "getBurnOutputs" + ): TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "view" + >; + getFunction( + nameOrSignature: "getMintInputs" + ): TypedContractMethod< + [underlyingOffered: BigNumberish], + [[bigint, bigint] & { hTokenRequired: bigint; poolTokensMinted: bigint }], + "view" + >; + getFunction( + nameOrSignature: "getNormalizedUnderlyingReserves" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForBuyingHToken" + ): TypedContractMethod<[hTokenOut: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForBuyingUnderlying" + ): TypedContractMethod<[underlyingOut: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForSellingHToken" + ): TypedContractMethod<[hTokenIn: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForSellingUnderlying" + ): TypedContractMethod<[underlyingIn: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getVirtualHTokenReserves" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "hToken" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [underlyingOffered: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellHToken" + ): TypedContractMethod< + [to: AddressLike, hTokenIn: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlying" + ): TypedContractMethod< + [to: AddressLike, underlyingIn: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "AddLiquidity" + ): TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject + >; + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "RemoveLiquidity" + ): TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; + getEvent( + key: "Trade" + ): TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; - burn( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + filters: { + "AddLiquidity(uint256,address,uint256,uint256,uint256)": TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject >; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + AddLiquidity: TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject >; - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject >; - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - filters: { - "AddLiquidity(uint256,address,uint256,uint256,uint256)"( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): AddLiquidityEventFilter; - AddLiquidity( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): AddLiquidityEventFilter; - - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "RemoveLiquidity(uint256,address,uint256,uint256,uint256)"( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): RemoveLiquidityEventFilter; - RemoveLiquidity( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): RemoveLiquidityEventFilter; - - "Trade(uint256,address,address,int256,int256)"( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): TradeEventFilter; - Trade( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): TradeEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTotalSupply( - totalSupply_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlyingPrecisionScalar( - underlyingPrecisionScalar_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_toInt256( - x: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTotalSupply( - totalSupply_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlyingPrecisionScalar( - underlyingPrecisionScalar_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_toInt256( - x: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves( - overrides?: CallOverrides - ): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; + "RemoveLiquidity(uint256,address,uint256,uint256,uint256)": TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; + RemoveLiquidity: TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; + "Trade(uint256,address,address,int256,int256)": TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; + Trade: TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; - version(overrides?: CallOverrides): Promise; + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/contracts/test/GodModeHifiPoolRegistry.ts b/packages/amm/src/types/contracts/test/GodModeHifiPoolRegistry.ts index e7e188dd..02bcded5 100644 --- a/packages/amm/src/types/contracts/test/GodModeHifiPoolRegistry.ts +++ b/packages/amm/src/types/contracts/test/GodModeHifiPoolRegistry.ts @@ -3,43 +3,28 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeHifiPoolRegistryInterface extends utils.Interface { - functions: { - "__godMode_trackPools(address[])": FunctionFragment; - "__godMode_untrackPools(address[])": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - "pools(address)": FunctionFragment; - "trackPool(address)": FunctionFragment; - "untrackPool(address)": FunctionFragment; - }; - +export interface GodModeHifiPoolRegistryInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "__godMode_trackPools" | "__godMode_untrackPools" | "_renounceOwnership" @@ -50,13 +35,17 @@ export interface GodModeHifiPoolRegistryInterface extends utils.Interface { | "untrackPool" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "TrackPool" | "TransferOwnership" | "UntrackPool" + ): EventFragment; + encodeFunctionData( functionFragment: "__godMode_trackPools", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "__godMode_untrackPools", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -64,20 +53,17 @@ export interface GodModeHifiPoolRegistryInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "pools", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "pools", values: [AddressLike]): string; encodeFunctionData( functionFragment: "trackPool", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "untrackPool", - values: [PromiseOrValue] + values: [AddressLike] ): string; decodeFunctionResult( @@ -103,274 +89,199 @@ export interface GodModeHifiPoolRegistryInterface extends utils.Interface { functionFragment: "untrackPool", data: BytesLike ): Result; - - events: { - "TrackPool(address)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "UntrackPool(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TrackPool"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "UntrackPool"): EventFragment; } -export interface TrackPoolEventObject { - pool: string; +export namespace TrackPoolEvent { + export type InputTuple = [pool: AddressLike]; + export type OutputTuple = [pool: string]; + export interface OutputObject { + pool: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TrackPoolEvent = TypedEvent<[string], TrackPoolEventObject>; - -export type TrackPoolEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface UntrackPoolEventObject { - pool: string; +export namespace UntrackPoolEvent { + export type InputTuple = [pool: AddressLike]; + export type OutputTuple = [pool: string]; + export interface OutputObject { + pool: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type UntrackPoolEvent = TypedEvent<[string], UntrackPoolEventObject>; - -export type UntrackPoolEventFilter = TypedEventFilter; export interface GodModeHifiPoolRegistry extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeHifiPoolRegistry; + waitForDeployment(): Promise; interface: GodModeHifiPoolRegistryInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - __godMode_trackPools( - pools_: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_untrackPools( - pools_: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - __godMode_trackPools( - pools_: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_untrackPools( - pools_: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - __godMode_trackPools( - pools_: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - __godMode_untrackPools( - pools_: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + __godMode_trackPools: TypedContractMethod< + [pools_: AddressLike[]], + [void], + "nonpayable" + >; + + __godMode_untrackPools: TypedContractMethod< + [pools_: AddressLike[]], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + pools: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; + + trackPool: TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + + untrackPool: TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; - untrackPool( - pool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "__godMode_trackPools" + ): TypedContractMethod<[pools_: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "__godMode_untrackPools" + ): TypedContractMethod<[pools_: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "pools" + ): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "trackPool" + ): TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "untrackPool" + ): TypedContractMethod<[pool: AddressLike], [void], "nonpayable">; + + getEvent( + key: "TrackPool" + ): TypedContractEvent< + TrackPoolEvent.InputTuple, + TrackPoolEvent.OutputTuple, + TrackPoolEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "UntrackPool" + ): TypedContractEvent< + UntrackPoolEvent.InputTuple, + UntrackPoolEvent.OutputTuple, + UntrackPoolEvent.OutputObject + >; filters: { - "TrackPool(address)"( - pool?: PromiseOrValue | null - ): TrackPoolEventFilter; - TrackPool(pool?: PromiseOrValue | null): TrackPoolEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "UntrackPool(address)"( - pool?: PromiseOrValue | null - ): UntrackPoolEventFilter; - UntrackPool(pool?: PromiseOrValue | null): UntrackPoolEventFilter; - }; - - estimateGas: { - __godMode_trackPools( - pools_: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_untrackPools( - pools_: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - __godMode_trackPools( - pools_: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_untrackPools( - pools_: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pools( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - trackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - untrackPool( - pool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TrackPool(address)": TypedContractEvent< + TrackPoolEvent.InputTuple, + TrackPoolEvent.OutputTuple, + TrackPoolEvent.OutputObject + >; + TrackPool: TypedContractEvent< + TrackPoolEvent.InputTuple, + TrackPoolEvent.OutputTuple, + TrackPoolEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "UntrackPool(address)": TypedContractEvent< + UntrackPoolEvent.InputTuple, + UntrackPoolEvent.OutputTuple, + UntrackPoolEvent.OutputObject + >; + UntrackPool: TypedContractEvent< + UntrackPoolEvent.InputTuple, + UntrackPoolEvent.OutputTuple, + UntrackPoolEvent.OutputObject + >; }; } diff --git a/packages/amm/src/types/contracts/test/YieldSpaceMock.ts b/packages/amm/src/types/contracts/test/YieldSpaceMock.ts index ac6ed23e..ef858370 100644 --- a/packages/amm/src/types/contracts/test/YieldSpaceMock.ts +++ b/packages/amm/src/types/contracts/test/YieldSpaceMock.ts @@ -3,35 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface YieldSpaceMockInterface extends utils.Interface { - functions: { - "doGetYieldExponent(uint256,uint256)": FunctionFragment; - "doHTokenInForUnderlyingOut(uint256,uint256,uint256,uint256)": FunctionFragment; - "doHTokenOutForUnderlyingIn(uint256,uint256,uint256,uint256)": FunctionFragment; - "doUnderlyingInForHTokenOut(uint256,uint256,uint256,uint256)": FunctionFragment; - "doUnderlyingOutForHTokenIn(uint256,uint256,uint256,uint256)": FunctionFragment; - }; - +export interface YieldSpaceMockInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "doGetYieldExponent" | "doHTokenInForUnderlyingOut" | "doHTokenOutForUnderlyingIn" @@ -41,43 +32,23 @@ export interface YieldSpaceMockInterface extends utils.Interface { encodeFunctionData( functionFragment: "doGetYieldExponent", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "doHTokenInForUnderlyingOut", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "doHTokenOutForUnderlyingIn", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "doUnderlyingInForHTokenOut", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "doUnderlyingOutForHTokenIn", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish] ): string; decodeFunctionResult( @@ -100,233 +71,160 @@ export interface YieldSpaceMockInterface extends utils.Interface { functionFragment: "doUnderlyingOutForHTokenIn", data: BytesLike ): Result; - - events: {}; } export interface YieldSpaceMock extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): YieldSpaceMock; + waitForDeployment(): Promise; interface: YieldSpaceMockInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - doGetYieldExponent( - timeToMaturity: PromiseOrValue, - g: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { a: BigNumber }>; - - doHTokenInForUnderlyingOut( - normalizedUnderlyingReserves: PromiseOrValue, - hTokenReserves: PromiseOrValue, - normalizedUnderlyingOut: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { hTokenIn: BigNumber }>; - - doHTokenOutForUnderlyingIn( - normalizedUnderlyingReserves: PromiseOrValue, - hTokenReserves: PromiseOrValue, - normalizedUnderlyingIn: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { hTokenOut: BigNumber }>; - - doUnderlyingInForHTokenOut( - hTokenReserves: PromiseOrValue, - normalizedUnderlyingReserves: PromiseOrValue, - hTokenOut: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { normalizedUnderlyingIn: BigNumber }>; - - doUnderlyingOutForHTokenIn( - hTokenReserves: PromiseOrValue, - normalizedUnderlyingReserves: PromiseOrValue, - hTokenIn: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { normalizedUnderlyingOut: BigNumber }>; - }; - - doGetYieldExponent( - timeToMaturity: PromiseOrValue, - g: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doHTokenInForUnderlyingOut( - normalizedUnderlyingReserves: PromiseOrValue, - hTokenReserves: PromiseOrValue, - normalizedUnderlyingOut: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doHTokenOutForUnderlyingIn( - normalizedUnderlyingReserves: PromiseOrValue, - hTokenReserves: PromiseOrValue, - normalizedUnderlyingIn: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doUnderlyingInForHTokenOut( - hTokenReserves: PromiseOrValue, - normalizedUnderlyingReserves: PromiseOrValue, - hTokenOut: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doUnderlyingOutForHTokenIn( - hTokenReserves: PromiseOrValue, - normalizedUnderlyingReserves: PromiseOrValue, - hTokenIn: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - doGetYieldExponent( - timeToMaturity: PromiseOrValue, - g: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doHTokenInForUnderlyingOut( - normalizedUnderlyingReserves: PromiseOrValue, - hTokenReserves: PromiseOrValue, - normalizedUnderlyingOut: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doHTokenOutForUnderlyingIn( - normalizedUnderlyingReserves: PromiseOrValue, - hTokenReserves: PromiseOrValue, - normalizedUnderlyingIn: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doUnderlyingInForHTokenOut( - hTokenReserves: PromiseOrValue, - normalizedUnderlyingReserves: PromiseOrValue, - hTokenOut: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + doGetYieldExponent: TypedContractMethod< + [timeToMaturity: BigNumberish, g: BigNumberish], + [bigint], + "view" + >; + + doHTokenInForUnderlyingOut: TypedContractMethod< + [ + normalizedUnderlyingReserves: BigNumberish, + hTokenReserves: BigNumberish, + normalizedUnderlyingOut: BigNumberish, + timeToMaturity: BigNumberish + ], + [bigint], + "view" + >; + + doHTokenOutForUnderlyingIn: TypedContractMethod< + [ + normalizedUnderlyingReserves: BigNumberish, + hTokenReserves: BigNumberish, + normalizedUnderlyingIn: BigNumberish, + timeToMaturity: BigNumberish + ], + [bigint], + "view" + >; + + doUnderlyingInForHTokenOut: TypedContractMethod< + [ + hTokenReserves: BigNumberish, + normalizedUnderlyingReserves: BigNumberish, + hTokenOut: BigNumberish, + timeToMaturity: BigNumberish + ], + [bigint], + "view" + >; + + doUnderlyingOutForHTokenIn: TypedContractMethod< + [ + hTokenReserves: BigNumberish, + normalizedUnderlyingReserves: BigNumberish, + hTokenIn: BigNumberish, + timeToMaturity: BigNumberish + ], + [bigint], + "view" + >; + + getFunction( + key: string | FunctionFragment + ): T; - doUnderlyingOutForHTokenIn( - hTokenReserves: PromiseOrValue, - normalizedUnderlyingReserves: PromiseOrValue, - hTokenIn: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "doGetYieldExponent" + ): TypedContractMethod< + [timeToMaturity: BigNumberish, g: BigNumberish], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "doHTokenInForUnderlyingOut" + ): TypedContractMethod< + [ + normalizedUnderlyingReserves: BigNumberish, + hTokenReserves: BigNumberish, + normalizedUnderlyingOut: BigNumberish, + timeToMaturity: BigNumberish + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "doHTokenOutForUnderlyingIn" + ): TypedContractMethod< + [ + normalizedUnderlyingReserves: BigNumberish, + hTokenReserves: BigNumberish, + normalizedUnderlyingIn: BigNumberish, + timeToMaturity: BigNumberish + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "doUnderlyingInForHTokenOut" + ): TypedContractMethod< + [ + hTokenReserves: BigNumberish, + normalizedUnderlyingReserves: BigNumberish, + hTokenOut: BigNumberish, + timeToMaturity: BigNumberish + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "doUnderlyingOutForHTokenIn" + ): TypedContractMethod< + [ + hTokenReserves: BigNumberish, + normalizedUnderlyingReserves: BigNumberish, + hTokenIn: BigNumberish, + timeToMaturity: BigNumberish + ], + [bigint], + "view" + >; filters: {}; - - estimateGas: { - doGetYieldExponent( - timeToMaturity: PromiseOrValue, - g: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doHTokenInForUnderlyingOut( - normalizedUnderlyingReserves: PromiseOrValue, - hTokenReserves: PromiseOrValue, - normalizedUnderlyingOut: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doHTokenOutForUnderlyingIn( - normalizedUnderlyingReserves: PromiseOrValue, - hTokenReserves: PromiseOrValue, - normalizedUnderlyingIn: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doUnderlyingInForHTokenOut( - hTokenReserves: PromiseOrValue, - normalizedUnderlyingReserves: PromiseOrValue, - hTokenOut: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doUnderlyingOutForHTokenIn( - hTokenReserves: PromiseOrValue, - normalizedUnderlyingReserves: PromiseOrValue, - hTokenIn: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - doGetYieldExponent( - timeToMaturity: PromiseOrValue, - g: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doHTokenInForUnderlyingOut( - normalizedUnderlyingReserves: PromiseOrValue, - hTokenReserves: PromiseOrValue, - normalizedUnderlyingOut: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doHTokenOutForUnderlyingIn( - normalizedUnderlyingReserves: PromiseOrValue, - hTokenReserves: PromiseOrValue, - normalizedUnderlyingIn: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doUnderlyingInForHTokenOut( - hTokenReserves: PromiseOrValue, - normalizedUnderlyingReserves: PromiseOrValue, - hTokenOut: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - doUnderlyingOutForHTokenIn( - hTokenReserves: PromiseOrValue, - normalizedUnderlyingReserves: PromiseOrValue, - hTokenIn: PromiseOrValue, - timeToMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; } diff --git a/packages/amm/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts b/packages/amm/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts index 1fc574b9..b2ac7751 100644 --- a/packages/amm/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts +++ b/packages/amm/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IOwnableUpgradeable, IOwnableUpgradeableInterface, @@ -88,12 +87,16 @@ const _abi = [ export class IOwnableUpgradeable__factory { static readonly abi = _abi; static createInterface(): IOwnableUpgradeableInterface { - return new utils.Interface(_abi) as IOwnableUpgradeableInterface; + return new Interface(_abi) as IOwnableUpgradeableInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IOwnableUpgradeable { - return new Contract(address, _abi, signerOrProvider) as IOwnableUpgradeable; + return new Contract( + address, + _abi, + runner + ) as unknown as IOwnableUpgradeable; } } diff --git a/packages/amm/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts b/packages/amm/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts index a0acdb8b..40898d6e 100644 --- a/packages/amm/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts +++ b/packages/amm/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IBalanceSheetV2, IBalanceSheetV2Interface, @@ -935,12 +934,12 @@ const _abi = [ export class IBalanceSheetV2__factory { static readonly abi = _abi; static createInterface(): IBalanceSheetV2Interface { - return new utils.Interface(_abi) as IBalanceSheetV2Interface; + return new Interface(_abi) as IBalanceSheetV2Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IBalanceSheetV2 { - return new Contract(address, _abi, signerOrProvider) as IBalanceSheetV2; + return new Contract(address, _abi, runner) as unknown as IBalanceSheetV2; } } diff --git a/packages/amm/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts b/packages/amm/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts index f2ac1393..c705c131 100644 --- a/packages/amm/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts +++ b/packages/amm/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IFintroller, IFintrollerInterface, @@ -1090,12 +1089,9 @@ const _abi = [ export class IFintroller__factory { static readonly abi = _abi; static createInterface(): IFintrollerInterface { - return new utils.Interface(_abi) as IFintrollerInterface; + return new Interface(_abi) as IFintrollerInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IFintroller { - return new Contract(address, _abi, signerOrProvider) as IFintroller; + static connect(address: string, runner?: ContractRunner | null): IFintroller { + return new Contract(address, _abi, runner) as unknown as IFintroller; } } diff --git a/packages/amm/src/types/factories/@hifi/protocol/contracts/core/h-token/HToken__factory.ts b/packages/amm/src/types/factories/@hifi/protocol/contracts/core/h-token/HToken__factory.ts index de7c806f..1ac6ec77 100644 --- a/packages/amm/src/types/factories/@hifi/protocol/contracts/core/h-token/HToken__factory.ts +++ b/packages/amm/src/types/factories/@hifi/protocol/contracts/core/h-token/HToken__factory.ts @@ -2,15 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + AddressLike, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../../common"; +import type { NonPayableOverrides } from "../../../../../../common"; import type { HToken, HTokenInterface, @@ -1243,16 +1247,16 @@ export class HToken__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - balanceSheet_: PromiseOrValue, - fintroller_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( + override getDeployTransaction( + name_: string, + symbol_: string, + maturity_: BigNumberish, + balanceSheet_: AddressLike, + fintroller_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( name_, symbol_, maturity_, @@ -1260,18 +1264,18 @@ export class HToken__factory extends ContractFactory { fintroller_, underlying_, overrides || {} - ) as Promise; + ); } - override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - balanceSheet_: PromiseOrValue, - fintroller_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction( + override deploy( + name_: string, + symbol_: string, + maturity_: BigNumberish, + balanceSheet_: AddressLike, + fintroller_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( name_, symbol_, maturity_, @@ -1279,21 +1283,22 @@ export class HToken__factory extends ContractFactory { fintroller_, underlying_, overrides || {} - ); - } - override attach(address: string): HToken { - return super.attach(address) as HToken; + ) as Promise< + HToken & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): HToken__factory { - return super.connect(signer) as HToken__factory; + override connect(runner: ContractRunner | null): HToken__factory { + return super.connect(runner) as HToken__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): HTokenInterface { - return new utils.Interface(_abi) as HTokenInterface; + return new Interface(_abi) as HTokenInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): HToken { - return new Contract(address, _abi, signerOrProvider) as HToken; + static connect(address: string, runner?: ContractRunner | null): HToken { + return new Contract(address, _abi, runner) as unknown as HToken; } } diff --git a/packages/amm/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts b/packages/amm/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts index eddefb97..347415b4 100644 --- a/packages/amm/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts +++ b/packages/amm/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IHToken, IHTokenInterface, @@ -1011,12 +1010,9 @@ const _abi = [ export class IHToken__factory { static readonly abi = _abi; static createInterface(): IHTokenInterface { - return new utils.Interface(_abi) as IHTokenInterface; + return new Interface(_abi) as IHTokenInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IHToken { - return new Contract(address, _abi, signerOrProvider) as IHToken; + static connect(address: string, runner?: ContractRunner | null): IHToken { + return new Contract(address, _abi, runner) as unknown as IHToken; } } diff --git a/packages/amm/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts b/packages/amm/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts index e1523a24..f5accd9e 100644 --- a/packages/amm/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts +++ b/packages/amm/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IAggregatorV3, IAggregatorV3Interface, @@ -126,12 +125,12 @@ const _abi = [ export class IAggregatorV3__factory { static readonly abi = _abi; static createInterface(): IAggregatorV3Interface { - return new utils.Interface(_abi) as IAggregatorV3Interface; + return new Interface(_abi) as IAggregatorV3Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IAggregatorV3 { - return new Contract(address, _abi, signerOrProvider) as IAggregatorV3; + return new Contract(address, _abi, runner) as unknown as IAggregatorV3; } } diff --git a/packages/amm/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts b/packages/amm/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts index 401ad9fb..66e49da1 100644 --- a/packages/amm/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts +++ b/packages/amm/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IChainlinkOperator, IChainlinkOperatorInterface, @@ -271,12 +270,12 @@ const _abi = [ export class IChainlinkOperator__factory { static readonly abi = _abi; static createInterface(): IChainlinkOperatorInterface { - return new utils.Interface(_abi) as IChainlinkOperatorInterface; + return new Interface(_abi) as IChainlinkOperatorInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IChainlinkOperator { - return new Contract(address, _abi, signerOrProvider) as IChainlinkOperator; + return new Contract(address, _abi, runner) as unknown as IChainlinkOperator; } } diff --git a/packages/amm/src/types/factories/@prb/contracts/access/IOwnable__factory.ts b/packages/amm/src/types/factories/@prb/contracts/access/IOwnable__factory.ts index 19e3f14c..0c4b5713 100644 --- a/packages/amm/src/types/factories/@prb/contracts/access/IOwnable__factory.ts +++ b/packages/amm/src/types/factories/@prb/contracts/access/IOwnable__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IOwnable, IOwnableInterface, @@ -67,12 +66,9 @@ const _abi = [ export class IOwnable__factory { static readonly abi = _abi; static createInterface(): IOwnableInterface { - return new utils.Interface(_abi) as IOwnableInterface; + return new Interface(_abi) as IOwnableInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IOwnable { - return new Contract(address, _abi, signerOrProvider) as IOwnable; + static connect(address: string, runner?: ContractRunner | null): IOwnable { + return new Contract(address, _abi, runner) as unknown as IOwnable; } } diff --git a/packages/amm/src/types/factories/@prb/contracts/access/Ownable__factory.ts b/packages/amm/src/types/factories/@prb/contracts/access/Ownable__factory.ts index 44e96ef3..5535b2da 100644 --- a/packages/amm/src/types/factories/@prb/contracts/access/Ownable__factory.ts +++ b/packages/amm/src/types/factories/@prb/contracts/access/Ownable__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { Ownable, OwnableInterface, @@ -110,32 +115,28 @@ export class Ownable__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): Ownable { - return super.attach(address) as Ownable; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + Ownable & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Ownable__factory { - return super.connect(signer) as Ownable__factory; + override connect(runner: ContractRunner | null): Ownable__factory { + return super.connect(runner) as Ownable__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): OwnableInterface { - return new utils.Interface(_abi) as OwnableInterface; + return new Interface(_abi) as OwnableInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Ownable { - return new Contract(address, _abi, signerOrProvider) as Ownable; + static connect(address: string, runner?: ContractRunner | null): Ownable { + return new Contract(address, _abi, runner) as unknown as Ownable; } } diff --git a/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts b/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts index 8f5dd542..6e3417a4 100644 --- a/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts +++ b/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts @@ -2,15 +2,18 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; +import type { NonPayableOverrides } from "../../../../../common"; import type { Erc20Permit, Erc20PermitInterface, @@ -530,25 +533,12 @@ export class Erc20Permit__factory extends ContractFactory { } } - override deploy( - _name: PromiseOrValue, - _symbol: PromiseOrValue, - _decimals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - _name, - _symbol, - _decimals, - overrides || {} - ) as Promise; - } override getDeployTransaction( - _name: PromiseOrValue, - _symbol: PromiseOrValue, - _decimals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + _name: string, + _symbol: string, + _decimals: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( _name, _symbol, @@ -556,22 +546,28 @@ export class Erc20Permit__factory extends ContractFactory { overrides || {} ); } - override attach(address: string): Erc20Permit { - return super.attach(address) as Erc20Permit; + override deploy( + _name: string, + _symbol: string, + _decimals: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(_name, _symbol, _decimals, overrides || {}) as Promise< + Erc20Permit & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Erc20Permit__factory { - return super.connect(signer) as Erc20Permit__factory; + override connect(runner: ContractRunner | null): Erc20Permit__factory { + return super.connect(runner) as Erc20Permit__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): Erc20PermitInterface { - return new utils.Interface(_abi) as Erc20PermitInterface; + return new Interface(_abi) as Erc20PermitInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Erc20Permit { - return new Contract(address, _abi, signerOrProvider) as Erc20Permit; + static connect(address: string, runner?: ContractRunner | null): Erc20Permit { + return new Contract(address, _abi, runner) as unknown as Erc20Permit; } } diff --git a/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts b/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts index a565fae0..f505e93f 100644 --- a/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts +++ b/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { Erc20Recover, Erc20RecoverInterface, @@ -224,12 +223,12 @@ const _abi = [ export class Erc20Recover__factory { static readonly abi = _abi; static createInterface(): Erc20RecoverInterface { - return new utils.Interface(_abi) as Erc20RecoverInterface; + return new Interface(_abi) as Erc20RecoverInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): Erc20Recover { - return new Contract(address, _abi, signerOrProvider) as Erc20Recover; + return new Contract(address, _abi, runner) as unknown as Erc20Recover; } } diff --git a/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts b/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts index f8ccda02..6e258a19 100644 --- a/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts +++ b/packages/amm/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts @@ -2,15 +2,18 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; +import type { NonPayableOverrides } from "../../../../../common"; import type { Erc20, Erc20Interface, @@ -382,25 +385,12 @@ export class Erc20__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - name_, - symbol_, - decimals_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( name_, symbol_, @@ -408,19 +398,28 @@ export class Erc20__factory extends ContractFactory { overrides || {} ); } - override attach(address: string): Erc20 { - return super.attach(address) as Erc20; + override deploy( + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(name_, symbol_, decimals_, overrides || {}) as Promise< + Erc20 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Erc20__factory { - return super.connect(signer) as Erc20__factory; + override connect(runner: ContractRunner | null): Erc20__factory { + return super.connect(runner) as Erc20__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): Erc20Interface { - return new utils.Interface(_abi) as Erc20Interface; + return new Interface(_abi) as Erc20Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): Erc20 { - return new Contract(address, _abi, signerOrProvider) as Erc20; + static connect(address: string, runner?: ContractRunner | null): Erc20 { + return new Contract(address, _abi, runner) as unknown as Erc20; } } diff --git a/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts b/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts index 05eb441a..9b6c0a46 100644 --- a/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts +++ b/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20Permit, IErc20PermitInterface, @@ -386,12 +385,12 @@ const _abi = [ export class IErc20Permit__factory { static readonly abi = _abi; static createInterface(): IErc20PermitInterface { - return new utils.Interface(_abi) as IErc20PermitInterface; + return new Interface(_abi) as IErc20PermitInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IErc20Permit { - return new Contract(address, _abi, signerOrProvider) as IErc20Permit; + return new Contract(address, _abi, runner) as unknown as IErc20Permit; } } diff --git a/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts b/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts index b9104d39..56d4c9ce 100644 --- a/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts +++ b/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20Recover, IErc20RecoverInterface, @@ -161,12 +160,12 @@ const _abi = [ export class IErc20Recover__factory { static readonly abi = _abi; static createInterface(): IErc20RecoverInterface { - return new utils.Interface(_abi) as IErc20RecoverInterface; + return new Interface(_abi) as IErc20RecoverInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IErc20Recover { - return new Contract(address, _abi, signerOrProvider) as IErc20Recover; + return new Contract(address, _abi, runner) as unknown as IErc20Recover; } } diff --git a/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts b/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts index 9661f226..573bf6fe 100644 --- a/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts +++ b/packages/amm/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20, IErc20Interface, @@ -285,9 +284,9 @@ const _abi = [ export class IErc20__factory { static readonly abi = _abi; static createInterface(): IErc20Interface { - return new utils.Interface(_abi) as IErc20Interface; + return new Interface(_abi) as IErc20Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): IErc20 { - return new Contract(address, _abi, signerOrProvider) as IErc20; + static connect(address: string, runner?: ContractRunner | null): IErc20 { + return new Contract(address, _abi, runner) as unknown as IErc20; } } diff --git a/packages/amm/src/types/factories/contracts/HifiPoolRegistry__factory.ts b/packages/amm/src/types/factories/contracts/HifiPoolRegistry__factory.ts index deb6c2d9..fec33edb 100644 --- a/packages/amm/src/types/factories/contracts/HifiPoolRegistry__factory.ts +++ b/packages/amm/src/types/factories/contracts/HifiPoolRegistry__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../common"; import type { HifiPoolRegistry, HifiPoolRegistryInterface, @@ -203,32 +208,31 @@ export class HifiPoolRegistry__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): HifiPoolRegistry { - return super.attach(address) as HifiPoolRegistry; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + HifiPoolRegistry & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): HifiPoolRegistry__factory { - return super.connect(signer) as HifiPoolRegistry__factory; + override connect(runner: ContractRunner | null): HifiPoolRegistry__factory { + return super.connect(runner) as HifiPoolRegistry__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): HifiPoolRegistryInterface { - return new utils.Interface(_abi) as HifiPoolRegistryInterface; + return new Interface(_abi) as HifiPoolRegistryInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): HifiPoolRegistry { - return new Contract(address, _abi, signerOrProvider) as HifiPoolRegistry; + return new Contract(address, _abi, runner) as unknown as HifiPoolRegistry; } } diff --git a/packages/amm/src/types/factories/contracts/HifiPool__factory.ts b/packages/amm/src/types/factories/contracts/HifiPool__factory.ts index 195c4508..c60e58ff 100644 --- a/packages/amm/src/types/factories/contracts/HifiPool__factory.ts +++ b/packages/amm/src/types/factories/contracts/HifiPool__factory.ts @@ -1,9 +1,19 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../../common"; import type { HifiPool, HifiPoolInterface } from "../../contracts/HifiPool"; const _abi = [ @@ -1263,43 +1273,36 @@ export class HifiPool__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - hToken_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - name_, - symbol_, - hToken_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - hToken_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + name_: string, + symbol_: string, + hToken_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(name_, symbol_, hToken_, overrides || {}); } - override attach(address: string): HifiPool { - return super.attach(address) as HifiPool; + override deploy( + name_: string, + symbol_: string, + hToken_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(name_, symbol_, hToken_, overrides || {}) as Promise< + HifiPool & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): HifiPool__factory { - return super.connect(signer) as HifiPool__factory; + override connect(runner: ContractRunner | null): HifiPool__factory { + return super.connect(runner) as HifiPool__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): HifiPoolInterface { - return new utils.Interface(_abi) as HifiPoolInterface; + return new Interface(_abi) as HifiPoolInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): HifiPool { - return new Contract(address, _abi, signerOrProvider) as HifiPool; + static connect(address: string, runner?: ContractRunner | null): HifiPool { + return new Contract(address, _abi, runner) as unknown as HifiPool; } } diff --git a/packages/amm/src/types/factories/contracts/IHifiPoolRegistry__factory.ts b/packages/amm/src/types/factories/contracts/IHifiPoolRegistry__factory.ts index 33cf18c5..c321e1c3 100644 --- a/packages/amm/src/types/factories/contracts/IHifiPoolRegistry__factory.ts +++ b/packages/amm/src/types/factories/contracts/IHifiPoolRegistry__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IHifiPoolRegistry, IHifiPoolRegistryInterface, @@ -160,12 +159,12 @@ const _abi = [ export class IHifiPoolRegistry__factory { static readonly abi = _abi; static createInterface(): IHifiPoolRegistryInterface { - return new utils.Interface(_abi) as IHifiPoolRegistryInterface; + return new Interface(_abi) as IHifiPoolRegistryInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IHifiPoolRegistry { - return new Contract(address, _abi, signerOrProvider) as IHifiPoolRegistry; + return new Contract(address, _abi, runner) as unknown as IHifiPoolRegistry; } } diff --git a/packages/amm/src/types/factories/contracts/IHifiPool__factory.ts b/packages/amm/src/types/factories/contracts/IHifiPool__factory.ts index 176e510c..ea4a45cf 100644 --- a/packages/amm/src/types/factories/contracts/IHifiPool__factory.ts +++ b/packages/amm/src/types/factories/contracts/IHifiPool__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IHifiPool, IHifiPoolInterface } from "../../contracts/IHifiPool"; const _abi = [ @@ -933,12 +932,9 @@ const _abi = [ export class IHifiPool__factory { static readonly abi = _abi; static createInterface(): IHifiPoolInterface { - return new utils.Interface(_abi) as IHifiPoolInterface; + return new Interface(_abi) as IHifiPoolInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IHifiPool { - return new Contract(address, _abi, signerOrProvider) as IHifiPool; + static connect(address: string, runner?: ContractRunner | null): IHifiPool { + return new Contract(address, _abi, runner) as unknown as IHifiPool; } } diff --git a/packages/amm/src/types/factories/contracts/math/YieldSpace__factory.ts b/packages/amm/src/types/factories/contracts/math/YieldSpace__factory.ts index d2ebd3a7..4f520501 100644 --- a/packages/amm/src/types/factories/contracts/math/YieldSpace__factory.ts +++ b/packages/amm/src/types/factories/contracts/math/YieldSpace__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { YieldSpace, YieldSpaceInterface, @@ -155,32 +160,28 @@ export class YieldSpace__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): YieldSpace { - return super.attach(address) as YieldSpace; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + YieldSpace & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): YieldSpace__factory { - return super.connect(signer) as YieldSpace__factory; + override connect(runner: ContractRunner | null): YieldSpace__factory { + return super.connect(runner) as YieldSpace__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): YieldSpaceInterface { - return new utils.Interface(_abi) as YieldSpaceInterface; + return new Interface(_abi) as YieldSpaceInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): YieldSpace { - return new Contract(address, _abi, signerOrProvider) as YieldSpace; + static connect(address: string, runner?: ContractRunner | null): YieldSpace { + return new Contract(address, _abi, runner) as unknown as YieldSpace; } } diff --git a/packages/amm/src/types/factories/contracts/test/GodModeErc20__factory.ts b/packages/amm/src/types/factories/contracts/test/GodModeErc20__factory.ts index 0edf1047..323adc47 100644 --- a/packages/amm/src/types/factories/contracts/test/GodModeErc20__factory.ts +++ b/packages/amm/src/types/factories/contracts/test/GodModeErc20__factory.ts @@ -2,15 +2,18 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeErc20, GodModeErc20Interface, @@ -466,25 +469,12 @@ export class GodModeErc20__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - name_, - symbol_, - decimals_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( name_, symbol_, @@ -492,22 +482,31 @@ export class GodModeErc20__factory extends ContractFactory { overrides || {} ); } - override attach(address: string): GodModeErc20 { - return super.attach(address) as GodModeErc20; + override deploy( + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(name_, symbol_, decimals_, overrides || {}) as Promise< + GodModeErc20 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeErc20__factory { - return super.connect(signer) as GodModeErc20__factory; + override connect(runner: ContractRunner | null): GodModeErc20__factory { + return super.connect(runner) as GodModeErc20__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeErc20Interface { - return new utils.Interface(_abi) as GodModeErc20Interface; + return new Interface(_abi) as GodModeErc20Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeErc20 { - return new Contract(address, _abi, signerOrProvider) as GodModeErc20; + return new Contract(address, _abi, runner) as unknown as GodModeErc20; } } diff --git a/packages/amm/src/types/factories/contracts/test/GodModeHToken__factory.ts b/packages/amm/src/types/factories/contracts/test/GodModeHToken__factory.ts index ef3730fa..cd589177 100644 --- a/packages/amm/src/types/factories/contracts/test/GodModeHToken__factory.ts +++ b/packages/amm/src/types/factories/contracts/test/GodModeHToken__factory.ts @@ -2,15 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + AddressLike, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeHToken, GodModeHTokenInterface, @@ -1251,52 +1255,53 @@ export class GodModeHToken__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( + override getDeployTransaction( + name_: string, + symbol_: string, + maturity_: BigNumberish, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( name_, symbol_, maturity_, underlying_, overrides || {} - ) as Promise; + ); } - override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction( + override deploy( + name_: string, + symbol_: string, + maturity_: BigNumberish, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( name_, symbol_, maturity_, underlying_, overrides || {} - ); - } - override attach(address: string): GodModeHToken { - return super.attach(address) as GodModeHToken; + ) as Promise< + GodModeHToken & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeHToken__factory { - return super.connect(signer) as GodModeHToken__factory; + override connect(runner: ContractRunner | null): GodModeHToken__factory { + return super.connect(runner) as GodModeHToken__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeHTokenInterface { - return new utils.Interface(_abi) as GodModeHTokenInterface; + return new Interface(_abi) as GodModeHTokenInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeHToken { - return new Contract(address, _abi, signerOrProvider) as GodModeHToken; + return new Contract(address, _abi, runner) as unknown as GodModeHToken; } } diff --git a/packages/amm/src/types/factories/contracts/test/GodModeHifiPoolRegistry__factory.ts b/packages/amm/src/types/factories/contracts/test/GodModeHifiPoolRegistry__factory.ts index 3d8468eb..0b255c0c 100644 --- a/packages/amm/src/types/factories/contracts/test/GodModeHifiPoolRegistry__factory.ts +++ b/packages/amm/src/types/factories/contracts/test/GodModeHifiPoolRegistry__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeHifiPoolRegistry, GodModeHifiPoolRegistryInterface, @@ -224,36 +229,37 @@ export class GodModeHifiPoolRegistry__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): GodModeHifiPoolRegistry { - return super.attach(address) as GodModeHifiPoolRegistry; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + GodModeHifiPoolRegistry & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeHifiPoolRegistry__factory { - return super.connect(signer) as GodModeHifiPoolRegistry__factory; + override connect( + runner: ContractRunner | null + ): GodModeHifiPoolRegistry__factory { + return super.connect(runner) as GodModeHifiPoolRegistry__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeHifiPoolRegistryInterface { - return new utils.Interface(_abi) as GodModeHifiPoolRegistryInterface; + return new Interface(_abi) as GodModeHifiPoolRegistryInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeHifiPoolRegistry { return new Contract( address, _abi, - signerOrProvider - ) as GodModeHifiPoolRegistry; + runner + ) as unknown as GodModeHifiPoolRegistry; } } diff --git a/packages/amm/src/types/factories/contracts/test/GodModeHifiPool__factory.ts b/packages/amm/src/types/factories/contracts/test/GodModeHifiPool__factory.ts index e668c341..dc4a2d60 100644 --- a/packages/amm/src/types/factories/contracts/test/GodModeHifiPool__factory.ts +++ b/packages/amm/src/types/factories/contracts/test/GodModeHifiPool__factory.ts @@ -1,9 +1,19 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeHifiPool, GodModeHifiPoolInterface, @@ -1337,43 +1347,39 @@ export class GodModeHifiPool__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - hToken_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - name_, - symbol_, - hToken_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - hToken_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + name_: string, + symbol_: string, + hToken_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(name_, symbol_, hToken_, overrides || {}); } - override attach(address: string): GodModeHifiPool { - return super.attach(address) as GodModeHifiPool; + override deploy( + name_: string, + symbol_: string, + hToken_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(name_, symbol_, hToken_, overrides || {}) as Promise< + GodModeHifiPool & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeHifiPool__factory { - return super.connect(signer) as GodModeHifiPool__factory; + override connect(runner: ContractRunner | null): GodModeHifiPool__factory { + return super.connect(runner) as GodModeHifiPool__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeHifiPoolInterface { - return new utils.Interface(_abi) as GodModeHifiPoolInterface; + return new Interface(_abi) as GodModeHifiPoolInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeHifiPool { - return new Contract(address, _abi, signerOrProvider) as GodModeHifiPool; + return new Contract(address, _abi, runner) as unknown as GodModeHifiPool; } } diff --git a/packages/amm/src/types/factories/contracts/test/YieldSpaceMock__factory.ts b/packages/amm/src/types/factories/contracts/test/YieldSpaceMock__factory.ts index 4ca2dbbd..fe836692 100644 --- a/packages/amm/src/types/factories/contracts/test/YieldSpaceMock__factory.ts +++ b/packages/amm/src/types/factories/contracts/test/YieldSpaceMock__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { YieldSpaceMock, YieldSpaceMockInterface, @@ -359,32 +364,31 @@ export class YieldSpaceMock__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): YieldSpaceMock { - return super.attach(address) as YieldSpaceMock; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + YieldSpaceMock & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): YieldSpaceMock__factory { - return super.connect(signer) as YieldSpaceMock__factory; + override connect(runner: ContractRunner | null): YieldSpaceMock__factory { + return super.connect(runner) as YieldSpaceMock__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): YieldSpaceMockInterface { - return new utils.Interface(_abi) as YieldSpaceMockInterface; + return new Interface(_abi) as YieldSpaceMockInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): YieldSpaceMock { - return new Contract(address, _abi, signerOrProvider) as YieldSpaceMock; + return new Contract(address, _abi, runner) as unknown as YieldSpaceMock; } } diff --git a/packages/amm/src/types/hardhat.d.ts b/packages/amm/src/types/hardhat.d.ts index cc409ebc..81d8252c 100644 --- a/packages/amm/src/types/hardhat.d.ts +++ b/packages/amm/src/types/hardhat.d.ts @@ -4,9 +4,10 @@ import { ethers } from "ethers"; import { + DeployContractOptions, FactoryOptions, HardhatEthersHelpers as HardhatEthersHelpersBase, -} from "@nomiclabs/hardhat-ethers/types"; +} from "@nomicfoundation/hardhat-ethers/types"; import * as Contracts from "."; @@ -115,130 +116,357 @@ declare module "hardhat/types/runtime" { getContractAt( name: "IOwnableUpgradeable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IBalanceSheetV2", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IFintroller", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "HToken", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IHToken", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IAggregatorV3", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IChainlinkOperator", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IOwnable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Ownable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Erc20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Erc20Permit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Erc20Recover", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20Permit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20Recover", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "HifiPool", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "HifiPoolRegistry", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IHifiPool", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IHifiPoolRegistry", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "YieldSpace", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeErc20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeHifiPool", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeHifiPoolRegistry", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeHToken", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "YieldSpaceMock", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; + deployContract( + name: "IOwnableUpgradeable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IBalanceSheetV2", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFintroller", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HToken", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHToken", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IAggregatorV3", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IChainlinkOperator", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IOwnable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Ownable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Recover", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Recover", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HifiPool", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HifiPoolRegistry", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHifiPool", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHifiPoolRegistry", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "YieldSpace", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeErc20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeHifiPool", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeHifiPoolRegistry", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeHToken", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "YieldSpaceMock", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + + deployContract( + name: "IOwnableUpgradeable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IBalanceSheetV2", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFintroller", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HToken", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHToken", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IAggregatorV3", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IChainlinkOperator", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IOwnable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Ownable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Recover", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Recover", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HifiPool", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HifiPoolRegistry", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHifiPool", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHifiPoolRegistry", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "YieldSpace", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeErc20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeHifiPool", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeHifiPoolRegistry", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeHToken", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "YieldSpaceMock", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + // default types getContractFactory( name: string, @@ -246,13 +474,22 @@ declare module "hardhat/types/runtime" { ): Promise; getContractFactory( abi: any[], - bytecode: ethers.utils.BytesLike, + bytecode: ethers.BytesLike, signer?: ethers.Signer ): Promise; getContractAt( nameOrAbi: string | any[], - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; + deployContract( + name: string, + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: string, + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; } } diff --git a/packages/flash-swap/hardhat.config.ts b/packages/flash-swap/hardhat.config.ts index 211d7125..54928c48 100644 --- a/packages/flash-swap/hardhat.config.ts +++ b/packages/flash-swap/hardhat.config.ts @@ -118,7 +118,6 @@ const config: HardhatUserConfig = { }, typechain: { outDir: "src/types", - target: "ethers-v5", }, }; diff --git a/packages/flash-swap/package.json b/packages/flash-swap/package.json index 5e711169..cce5ba01 100644 --- a/packages/flash-swap/package.json +++ b/packages/flash-swap/package.json @@ -22,7 +22,7 @@ "@uniswap/v3-core": "1.0.1", "@uniswap/v3-periphery": "1.0.1", "@uniswap/v3-sdk": "^3.10.0", - "ethers": "^5.7.2" + "ethers": "^6.8.1" }, "devDependencies": { "@ethersproject/abstract-signer": "^5.7.0", @@ -34,7 +34,7 @@ "@nomiclabs/hardhat-ethers": "^2.2.3", "@nomiclabs/hardhat-etherscan": "^3.1.7", "@nomiclabs/hardhat-waffle": "^2.0.6", - "@typechain/ethers-v5": "^10.2.1", + "@typechain/ethers-v6": "^0.5.1", "@typechain/hardhat": "^9.1.0", "@types/chai": "^4.3.10", "@types/mocha": "^10.0.4", diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts index 464a6e30..9b46ca02 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IOwnableUpgradeableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IOwnableUpgradeableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface IOwnableUpgradeableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IOwnableUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IOwnableUpgradeable; + waitForDeployment(): Promise; interface: IOwnableUpgradeableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/access/OwnableUpgradeable.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/access/OwnableUpgradeable.ts index b71a00bd..1312a454 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/access/OwnableUpgradeable.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/access/OwnableUpgradeable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface OwnableUpgradeableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface OwnableUpgradeableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface OwnableUpgradeableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface OwnableUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): OwnableUpgradeable; + waitForDeployment(): Promise; interface: OwnableUpgradeableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/BalanceSheetV2.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/BalanceSheetV2.ts index cae07b5b..9a1f1d07 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/BalanceSheetV2.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/BalanceSheetV2.ts @@ -3,58 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface BalanceSheetV2Interface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "borrow(address,uint256)": FunctionFragment; - "depositCollateral(address,uint256)": FunctionFragment; - "fintroller()": 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; - "getRepayAmount(address,uint256,address)": FunctionFragment; - "getSeizableCollateralAmount(address,uint256,address)": FunctionFragment; - "initialize(address,address)": FunctionFragment; - "liquidateBorrow(address,address,uint256,address)": FunctionFragment; - "oracle()": FunctionFragment; - "owner()": FunctionFragment; - "repayBorrow(address,uint256)": FunctionFragment; - "repayBorrowBehalf(address,address,uint256)": FunctionFragment; - "setFintroller(address)": FunctionFragment; - "setOracle(address)": FunctionFragment; - "withdrawCollateral(address,uint256)": FunctionFragment; - }; - +export interface BalanceSheetV2Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "borrow" @@ -79,21 +50,33 @@ export interface BalanceSheetV2Interface extends utils.Interface { | "withdrawCollateral" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Borrow" + | "DepositCollateral" + | "LiquidateBorrow" + | "RepayBorrow" + | "SetFintroller" + | "SetOracle" + | "TransferOwnership" + | "WithdrawCollateral" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "borrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -101,88 +84,65 @@ export interface BalanceSheetV2Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getBondList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCurrentAccountLiquidity", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getHypotheticalAccountLiquidity", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getRepayAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "getSeizableCollateralAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "initialize", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "liquidateBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData(functionFragment: "oracle", values?: undefined): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "repayBorrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "repayBorrowBehalf", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setFintroller", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "setOracle", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "withdrawCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -255,888 +215,650 @@ export interface BalanceSheetV2Interface extends utils.Interface { 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; - "SetFintroller(address,address,address)": 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: "SetFintroller"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetOracle"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawCollateral"): EventFragment; } -export interface BorrowEventObject { - account: string; - bond: string; - borrowAmount: BigNumber; +export namespace BorrowEvent { + export type InputTuple = [ + account: AddressLike, + bond: AddressLike, + borrowAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + bond: string, + borrowAmount: bigint + ]; + export interface OutputObject { + account: string; + bond: string; + borrowAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BorrowEvent = TypedEvent< - [string, string, BigNumber], - BorrowEventObject ->; - -export type BorrowEventFilter = TypedEventFilter; -export interface DepositCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace DepositCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositCollateralEvent = TypedEvent< - [string, string, BigNumber], - DepositCollateralEventObject ->; -export type DepositCollateralEventFilter = - TypedEventFilter; - -export interface LiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - collateral: string; - seizedCollateralAmount: BigNumber; +export namespace LiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike, + seizedCollateralAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + repayAmount: bigint, + collateral: string, + seizedCollateralAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + repayAmount: bigint; + collateral: string; + seizedCollateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type LiquidateBorrowEvent = TypedEvent< - [string, string, string, BigNumber, string, BigNumber], - LiquidateBorrowEventObject ->; - -export type LiquidateBorrowEventFilter = TypedEventFilter; -export interface RepayBorrowEventObject { - payer: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - newDebtAmount: BigNumber; +export namespace RepayBorrowEvent { + export type InputTuple = [ + payer: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + newDebtAmount: BigNumberish + ]; + export type OutputTuple = [ + payer: string, + borrower: string, + bond: string, + repayAmount: bigint, + newDebtAmount: bigint + ]; + export interface OutputObject { + payer: string; + borrower: string; + bond: string; + repayAmount: bigint; + newDebtAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RepayBorrowEvent = TypedEvent< - [string, string, string, BigNumber, BigNumber], - RepayBorrowEventObject ->; - -export type RepayBorrowEventFilter = TypedEventFilter; -export interface SetFintrollerEventObject { - owner: string; - oldFintroller: string; - newFintroller: string; +export namespace SetFintrollerEvent { + export type InputTuple = [ + owner: AddressLike, + oldFintroller: AddressLike, + newFintroller: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldFintroller: string, + newFintroller: string + ]; + export interface OutputObject { + owner: string; + oldFintroller: string; + newFintroller: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFintrollerEvent = TypedEvent< - [string, string, string], - SetFintrollerEventObject ->; -export type SetFintrollerEventFilter = TypedEventFilter; - -export interface SetOracleEventObject { - owner: string; - oldOracle: string; - newOracle: string; +export namespace SetOracleEvent { + export type InputTuple = [ + owner: AddressLike, + oldOracle: AddressLike, + newOracle: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldOracle: string, + newOracle: string + ]; + export interface OutputObject { + owner: string; + oldOracle: string; + newOracle: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetOracleEvent = TypedEvent< - [string, string, string], - SetOracleEventObject ->; - -export type SetOracleEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; -export interface WithdrawCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace WithdrawCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawCollateralEvent = TypedEvent< - [string, string, BigNumber], - WithdrawCollateralEventObject ->; - -export type WithdrawCollateralEventFilter = - TypedEventFilter; export interface BalanceSheetV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): BalanceSheetV2; + waitForDeployment(): Promise; interface: BalanceSheetV2Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { collateralAmount: BigNumber }>; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { debtAmount: BigNumber }>; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { repayAmount: BigNumber }>; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { seizableCollateralAmount: BigNumber }>; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - oracle(overrides?: CallOverrides): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; - fintroller(overrides?: CallOverrides): Promise; + borrow: TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + depositCollateral: TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" + >; - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + fintroller: TypedContractMethod<[], [string], "view">; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getBondList: TypedContractMethod<[account: AddressLike], [string[]], "view">; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + getCollateralAmount: TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" >; - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + getCollateralList: TypedContractMethod< + [account: AddressLike], + [string[]], + "view" >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getCurrentAccountLiquidity: TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getDebtAmount: TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; - oracle(overrides?: CallOverrides): Promise; + getHypotheticalAccountLiquidity: TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - owner(overrides?: CallOverrides): Promise; + getRepayAmount: TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getSeizableCollateralAmount: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + initialize: TypedContractMethod< + [fintroller_: AddressLike, oracle_: AddressLike], + [void], + "nonpayable" + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + liquidateBorrow: TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + oracle: TypedContractMethod<[], [string], "view">; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + owner: TypedContractMethod<[], [string], "view">; - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + repayBorrow: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + repayBorrowBehalf: TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setFintroller: TypedContractMethod< + [newFintroller: AddressLike], + [void], + "nonpayable" + >; - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setOracle: TypedContractMethod< + [newOracle: AddressLike], + [void], + "nonpayable" + >; - fintroller(overrides?: CallOverrides): Promise; + withdrawCollateral: TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "borrow" + ): TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateral" + ): TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getBondList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCollateralAmount" + ): TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getCollateralList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCurrentAccountLiquidity" + ): TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getDebtAmount" + ): TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getHypotheticalAccountLiquidity" + ): TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getRepayAmount" + ): TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getSeizableCollateralAmount" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod< + [fintroller_: AddressLike, oracle_: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "liquidateBorrow" + ): TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "oracle" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "repayBorrow" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "repayBorrowBehalf" + ): TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFintroller" + ): TypedContractMethod<[newFintroller: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setOracle" + ): TypedContractMethod<[newOracle: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getEvent( + key: "Borrow" + ): TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject + >; + getEvent( + key: "DepositCollateral" + ): TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + getEvent( + key: "LiquidateBorrow" + ): TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + getEvent( + key: "RepayBorrow" + ): TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + getEvent( + key: "SetFintroller" + ): TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + getEvent( + key: "SetOracle" + ): TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawCollateral" + ): TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + filters: { + "Borrow(address,address,uint256)": TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + Borrow: TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - oracle(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Borrow(address,address,uint256)"( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - Borrow( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - - "DepositCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - DepositCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - - "LiquidateBorrow(address,address,address,uint256,address,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - LiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - - "RepayBorrow(address,address,address,uint256,uint256)"( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - RepayBorrow( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - - "SetFintroller(address,address,address)"( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - SetFintroller( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - - "SetOracle(address,address,address)"( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - SetOracle( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - WithdrawCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - oracle(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - oracle(overrides?: CallOverrides): Promise; + "DepositCollateral(address,address,uint256)": TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + DepositCollateral: TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; - owner(overrides?: CallOverrides): Promise; + "LiquidateBorrow(address,address,address,uint256,address,uint256)": TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + LiquidateBorrow: TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "RepayBorrow(address,address,address,uint256,uint256)": TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + RepayBorrow: TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetFintroller(address,address,address)": TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + SetFintroller: TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetOracle(address,address,address)": TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + SetOracle: TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "WithdrawCollateral(address,address,uint256)": TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + WithdrawCollateral: TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts index a8f46fdb..fe8c21e5 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts @@ -3,55 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IBalanceSheetV2Interface extends 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; - "getRepayAmount(address,uint256,address)": FunctionFragment; - "getSeizableCollateralAmount(address,uint256,address)": FunctionFragment; - "liquidateBorrow(address,address,uint256,address)": FunctionFragment; - "owner()": FunctionFragment; - "repayBorrow(address,uint256)": FunctionFragment; - "repayBorrowBehalf(address,address,uint256)": FunctionFragment; - "setFintroller(address)": FunctionFragment; - "setOracle(address)": FunctionFragment; - "withdrawCollateral(address,uint256)": FunctionFragment; - }; - +export interface IBalanceSheetV2Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "borrow" @@ -73,101 +47,90 @@ export interface IBalanceSheetV2Interface extends utils.Interface { | "withdrawCollateral" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Borrow" + | "DepositCollateral" + | "LiquidateBorrow" + | "RepayBorrow" + | "SetFintroller" + | "SetOracle" + | "TransferOwnership" + | "WithdrawCollateral" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "borrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getBondList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCurrentAccountLiquidity", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getHypotheticalAccountLiquidity", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getRepayAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "getSeizableCollateralAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "liquidateBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "repayBorrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "repayBorrowBehalf", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setFintroller", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "setOracle", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "withdrawCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -237,838 +200,627 @@ export interface IBalanceSheetV2Interface extends utils.Interface { 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; - "SetFintroller(address,address,address)": 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: "SetFintroller"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetOracle"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawCollateral"): EventFragment; } -export interface BorrowEventObject { - account: string; - bond: string; - borrowAmount: BigNumber; +export namespace BorrowEvent { + export type InputTuple = [ + account: AddressLike, + bond: AddressLike, + borrowAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + bond: string, + borrowAmount: bigint + ]; + export interface OutputObject { + account: string; + bond: string; + borrowAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BorrowEvent = TypedEvent< - [string, string, BigNumber], - BorrowEventObject ->; -export type BorrowEventFilter = TypedEventFilter; - -export interface DepositCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace DepositCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositCollateralEvent = TypedEvent< - [string, string, BigNumber], - DepositCollateralEventObject ->; - -export type DepositCollateralEventFilter = - TypedEventFilter; -export interface LiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - collateral: string; - seizedCollateralAmount: BigNumber; +export namespace LiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike, + seizedCollateralAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + repayAmount: bigint, + collateral: string, + seizedCollateralAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + repayAmount: bigint; + collateral: string; + seizedCollateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type LiquidateBorrowEvent = TypedEvent< - [string, string, string, BigNumber, string, BigNumber], - LiquidateBorrowEventObject ->; - -export type LiquidateBorrowEventFilter = TypedEventFilter; -export interface RepayBorrowEventObject { - payer: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - newDebtAmount: BigNumber; +export namespace RepayBorrowEvent { + export type InputTuple = [ + payer: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + newDebtAmount: BigNumberish + ]; + export type OutputTuple = [ + payer: string, + borrower: string, + bond: string, + repayAmount: bigint, + newDebtAmount: bigint + ]; + export interface OutputObject { + payer: string; + borrower: string; + bond: string; + repayAmount: bigint; + newDebtAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RepayBorrowEvent = TypedEvent< - [string, string, string, BigNumber, BigNumber], - RepayBorrowEventObject ->; -export type RepayBorrowEventFilter = TypedEventFilter; - -export interface SetFintrollerEventObject { - owner: string; - oldFintroller: string; - newFintroller: string; +export namespace SetFintrollerEvent { + export type InputTuple = [ + owner: AddressLike, + oldFintroller: AddressLike, + newFintroller: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldFintroller: string, + newFintroller: string + ]; + export interface OutputObject { + owner: string; + oldFintroller: string; + newFintroller: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFintrollerEvent = TypedEvent< - [string, string, string], - SetFintrollerEventObject ->; - -export type SetFintrollerEventFilter = TypedEventFilter; -export interface SetOracleEventObject { - owner: string; - oldOracle: string; - newOracle: string; +export namespace SetOracleEvent { + export type InputTuple = [ + owner: AddressLike, + oldOracle: AddressLike, + newOracle: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldOracle: string, + newOracle: string + ]; + export interface OutputObject { + owner: string; + oldOracle: string; + newOracle: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetOracleEvent = TypedEvent< - [string, string, string], - SetOracleEventObject ->; - -export type SetOracleEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace WithdrawCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawCollateralEvent = TypedEvent< - [string, string, BigNumber], - WithdrawCollateralEventObject ->; - -export type WithdrawCollateralEventFilter = - TypedEventFilter; export interface IBalanceSheetV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IBalanceSheetV2; + waitForDeployment(): Promise; interface: IBalanceSheetV2Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { collateralAmount: BigNumber }>; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { debtAmount: BigNumber }>; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { repayAmount: BigNumber }>; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { seizableCollateralAmount: BigNumber }>; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + borrow: TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + depositCollateral: TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" >; - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getBondList: TypedContractMethod<[account: AddressLike], [string[]], "view">; - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + getCollateralAmount: TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getCollateralList: TypedContractMethod< + [account: AddressLike], + [string[]], + "view" + >; - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getCurrentAccountLiquidity: TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getDebtAmount: TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; - owner(overrides?: CallOverrides): Promise; + getHypotheticalAccountLiquidity: TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getRepayAmount: TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getSeizableCollateralAmount: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + liquidateBorrow: TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + owner: TypedContractMethod<[], [string], "view">; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + repayBorrow: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + repayBorrowBehalf: TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setFintroller: TypedContractMethod< + [newFintroller: AddressLike], + [void], + "nonpayable" + >; - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setOracle: TypedContractMethod< + [newOracle: AddressLike], + [void], + "nonpayable" + >; - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + withdrawCollateral: TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "borrow" + ): TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateral" + ): TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "getBondList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCollateralAmount" + ): TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getCollateralList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCurrentAccountLiquidity" + ): TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getDebtAmount" + ): TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getHypotheticalAccountLiquidity" + ): TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getRepayAmount" + ): TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getSeizableCollateralAmount" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "liquidateBorrow" + ): TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "repayBorrow" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "repayBorrowBehalf" + ): TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFintroller" + ): TypedContractMethod<[newFintroller: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setOracle" + ): TypedContractMethod<[newOracle: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getEvent( + key: "Borrow" + ): TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject + >; + getEvent( + key: "DepositCollateral" + ): TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + getEvent( + key: "LiquidateBorrow" + ): TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + getEvent( + key: "RepayBorrow" + ): TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + getEvent( + key: "SetFintroller" + ): TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + getEvent( + key: "SetOracle" + ): TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawCollateral" + ): TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + filters: { + "Borrow(address,address,uint256)": TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + Borrow: TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Borrow(address,address,uint256)"( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - Borrow( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - - "DepositCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - DepositCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - - "LiquidateBorrow(address,address,address,uint256,address,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - LiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - - "RepayBorrow(address,address,address,uint256,uint256)"( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - RepayBorrow( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - - "SetFintroller(address,address,address)"( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - SetFintroller( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - - "SetOracle(address,address,address)"( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - SetOracle( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - WithdrawCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "DepositCollateral(address,address,uint256)": TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + DepositCollateral: TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; - owner(overrides?: CallOverrides): Promise; + "LiquidateBorrow(address,address,address,uint256,address,uint256)": TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + LiquidateBorrow: TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "RepayBorrow(address,address,address,uint256,uint256)": TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + RepayBorrow: TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetFintroller(address,address,address)": TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + SetFintroller: TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetOracle(address,address,address)": TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + SetOracle: TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "WithdrawCollateral(address,address,uint256)": TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + WithdrawCollateral: TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV1.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV1.ts index d2756d2d..a5a0abab 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV1.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV1.ts @@ -3,31 +3,24 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, + TypedContractMethod, } from "../../../../../common"; -export interface SBalanceSheetV1Interface extends utils.Interface { - functions: { - "fintroller()": FunctionFragment; - "oracle()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "fintroller" | "oracle" - ): FunctionFragment; +export interface SBalanceSheetV1Interface extends Interface { + getFunction(nameOrSignature: "fintroller" | "oracle"): FunctionFragment; encodeFunctionData( functionFragment: "fintroller", @@ -37,63 +30,65 @@ export interface SBalanceSheetV1Interface extends utils.Interface { decodeFunctionResult(functionFragment: "fintroller", data: BytesLike): Result; decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - - events: {}; } export interface SBalanceSheetV1 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): SBalanceSheetV1; + waitForDeployment(): Promise; interface: SBalanceSheetV1Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - fintroller(overrides?: CallOverrides): Promise<[string]>; - - oracle(overrides?: CallOverrides): Promise<[string]>; - }; - - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - - callStatic: { - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + fintroller: TypedContractMethod<[], [string], "view">; + + oracle: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - oracle(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "oracle" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV2.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV2.ts index 87082e37..e917a5f2 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV2.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV2.ts @@ -3,31 +3,24 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, + TypedContractMethod, } from "../../../../../common"; -export interface SBalanceSheetV2Interface extends utils.Interface { - functions: { - "fintroller()": FunctionFragment; - "oracle()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "fintroller" | "oracle" - ): FunctionFragment; +export interface SBalanceSheetV2Interface extends Interface { + getFunction(nameOrSignature: "fintroller" | "oracle"): FunctionFragment; encodeFunctionData( functionFragment: "fintroller", @@ -37,63 +30,65 @@ export interface SBalanceSheetV2Interface extends utils.Interface { decodeFunctionResult(functionFragment: "fintroller", data: BytesLike): Result; decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - - events: {}; } export interface SBalanceSheetV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): SBalanceSheetV2; + waitForDeployment(): Promise; interface: SBalanceSheetV2Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - fintroller(overrides?: CallOverrides): Promise<[string]>; - - oracle(overrides?: CallOverrides): Promise<[string]>; - }; - - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - - callStatic: { - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + fintroller: TypedContractMethod<[], [string], "view">; + + oracle: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - oracle(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "oracle" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/fintroller/Fintroller.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/fintroller/Fintroller.ts index 0bb0b3f7..d8e675ca 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/fintroller/Fintroller.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/fintroller/Fintroller.ts @@ -3,49 +3,45 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; export declare namespace IFintroller { export type BondStruct = { - debtCeiling: PromiseOrValue; - isBorrowAllowed: PromiseOrValue; - isDepositUnderlyingAllowed: PromiseOrValue; - isLiquidateBorrowAllowed: PromiseOrValue; - isListed: PromiseOrValue; - isRepayBorrowAllowed: PromiseOrValue; + debtCeiling: BigNumberish; + isBorrowAllowed: boolean; + isDepositUnderlyingAllowed: boolean; + isLiquidateBorrowAllowed: boolean; + isListed: boolean; + isRepayBorrowAllowed: boolean; }; export type BondStructOutput = [ - BigNumber, - boolean, - boolean, - boolean, - boolean, - boolean + debtCeiling: bigint, + isBorrowAllowed: boolean, + isDepositUnderlyingAllowed: boolean, + isLiquidateBorrowAllowed: boolean, + isListed: boolean, + isRepayBorrowAllowed: boolean ] & { - debtCeiling: BigNumber; + debtCeiling: bigint; isBorrowAllowed: boolean; isDepositUnderlyingAllowed: boolean; isLiquidateBorrowAllowed: boolean; @@ -54,65 +50,31 @@ export declare namespace IFintroller { }; export type CollateralStruct = { - ceiling: PromiseOrValue; - ratio: PromiseOrValue; - liquidationIncentive: PromiseOrValue; - isDepositCollateralAllowed: PromiseOrValue; - isListed: PromiseOrValue; + ceiling: BigNumberish; + ratio: BigNumberish; + liquidationIncentive: BigNumberish; + isDepositCollateralAllowed: boolean; + isListed: boolean; }; export type CollateralStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - boolean, - boolean + ceiling: bigint, + ratio: bigint, + liquidationIncentive: bigint, + isDepositCollateralAllowed: boolean, + isListed: boolean ] & { - ceiling: BigNumber; - ratio: BigNumber; - liquidationIncentive: BigNumber; + ceiling: bigint; + ratio: bigint; + liquidationIncentive: bigint; isDepositCollateralAllowed: boolean; isListed: boolean; }; } -export interface FintrollerInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "getBond(address)": FunctionFragment; - "getBorrowAllowed(address)": FunctionFragment; - "getCollateral(address)": FunctionFragment; - "getCollateralCeiling(address)": FunctionFragment; - "getCollateralRatio(address)": FunctionFragment; - "getDebtCeiling(address)": FunctionFragment; - "getDepositCollateralAllowed(address)": FunctionFragment; - "getDepositUnderlyingAllowed(address)": FunctionFragment; - "getLiquidateBorrowAllowed(address)": FunctionFragment; - "getLiquidationIncentive(address)": FunctionFragment; - "getRepayBorrowAllowed(address)": FunctionFragment; - "isBondListed(address)": FunctionFragment; - "isCollateralListed(address)": FunctionFragment; - "listBond(address)": FunctionFragment; - "listCollateral(address)": FunctionFragment; - "maxBonds()": FunctionFragment; - "maxCollaterals()": FunctionFragment; - "owner()": FunctionFragment; - "setBorrowAllowed(address,bool)": FunctionFragment; - "setCollateralCeiling(address,uint256)": FunctionFragment; - "setCollateralRatio(address,uint256)": FunctionFragment; - "setDebtCeiling(address,uint256)": FunctionFragment; - "setDepositCollateralAllowed(address,bool)": FunctionFragment; - "setDepositUnderlyingAllowed(address,bool)": FunctionFragment; - "setLiquidateBorrowAllowed(address,bool)": FunctionFragment; - "setLiquidationIncentive(address,uint256)": FunctionFragment; - "setMaxBonds(uint256)": FunctionFragment; - "setMaxCollaterals(uint256)": FunctionFragment; - "setRepayBorrowAllowed(address,bool)": FunctionFragment; - }; - +export interface FintrollerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "getBond" @@ -146,73 +108,91 @@ export interface FintrollerInterface extends utils.Interface { | "setRepayBorrowAllowed" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "ListBond" + | "ListCollateral" + | "SetBorrowAllowed" + | "SetCollateralCeiling" + | "SetCollateralRatio" + | "SetDebtCeiling" + | "SetDepositCollateralAllowed" + | "SetDepositUnderlyingAllowed" + | "SetLiquidateBorrowAllowed" + | "SetLiquidationIncentive" + | "SetMaxBonds" + | "SetMaxCollaterals" + | "SetRepayBorrowAllowed" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralRatio", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositCollateralAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositUnderlyingAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidateBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidationIncentive", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getRepayBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isBondListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isCollateralListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "maxBonds", values?: undefined): string; encodeFunctionData( @@ -222,47 +202,47 @@ export interface FintrollerInterface extends utils.Interface { encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "setBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setCollateralCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setCollateralRatio", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDebtCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDepositCollateralAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setDepositUnderlyingAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidateBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidationIncentive", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxBonds", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxCollaterals", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setRepayBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; decodeFunctionResult( @@ -377,1177 +357,876 @@ export interface FintrollerInterface extends utils.Interface { functionFragment: "setRepayBorrowAllowed", data: BytesLike ): Result; - - events: { - "ListBond(address,address)": EventFragment; - "ListCollateral(address,address)": EventFragment; - "SetBorrowAllowed(address,address,bool)": EventFragment; - "SetCollateralCeiling(address,address,uint256,uint256)": EventFragment; - "SetCollateralRatio(address,address,uint256,uint256)": EventFragment; - "SetDebtCeiling(address,address,uint256,uint256)": EventFragment; - "SetDepositCollateralAllowed(address,address,bool)": EventFragment; - "SetDepositUnderlyingAllowed(address,address,bool)": EventFragment; - "SetLiquidateBorrowAllowed(address,address,bool)": EventFragment; - "SetLiquidationIncentive(address,address,uint256,uint256)": EventFragment; - "SetMaxBonds(address,uint256,uint256)": EventFragment; - "SetMaxCollaterals(address,uint256,uint256)": EventFragment; - "SetRepayBorrowAllowed(address,address,bool)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ListBond"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ListCollateral"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralCeiling"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralRatio"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetDebtCeiling"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositCollateralAllowed" - ): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositUnderlyingAllowed" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidateBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidationIncentive"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxBonds"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxCollaterals"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetRepayBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface ListBondEventObject { - owner: string; - bond: string; +export namespace ListBondEvent { + export type InputTuple = [owner: AddressLike, bond: AddressLike]; + export type OutputTuple = [owner: string, bond: string]; + export interface OutputObject { + owner: string; + bond: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListBondEvent = TypedEvent<[string, string], ListBondEventObject>; - -export type ListBondEventFilter = TypedEventFilter; -export interface ListCollateralEventObject { - owner: string; - collateral: string; +export namespace ListCollateralEvent { + export type InputTuple = [owner: AddressLike, collateral: AddressLike]; + export type OutputTuple = [owner: string, collateral: string]; + export interface OutputObject { + owner: string; + collateral: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListCollateralEvent = TypedEvent< - [string, string], - ListCollateralEventObject ->; - -export type ListCollateralEventFilter = TypedEventFilter; -export interface SetBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; -} -export type SetBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetBorrowAllowedEventObject ->; - -export type SetBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetCollateralCeilingEventObject { - owner: string; - collateral: string; - oldCollateralCeiling: BigNumber; - newCollateralCeiling: BigNumber; -} -export type SetCollateralCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralCeilingEventObject ->; - -export type SetCollateralCeilingEventFilter = - TypedEventFilter; - -export interface SetCollateralRatioEventObject { - owner: string; - collateral: string; - oldCollateralRatio: BigNumber; - newCollateralRatio: BigNumber; -} -export type SetCollateralRatioEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralRatioEventObject ->; - -export type SetCollateralRatioEventFilter = - TypedEventFilter; - -export interface SetDebtCeilingEventObject { - owner: string; - bond: string; - oldDebtCeiling: BigNumber; - newDebtCeiling: BigNumber; +export namespace SetBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDebtCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetDebtCeilingEventObject ->; -export type SetDebtCeilingEventFilter = TypedEventFilter; - -export interface SetDepositCollateralAllowedEventObject { - owner: string; - collateral: string; - state: boolean; +export namespace SetCollateralCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralCeiling: BigNumberish, + newCollateralCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralCeiling: bigint, + newCollateralCeiling: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralCeiling: bigint; + newCollateralCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositCollateralAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositCollateralAllowedEventObject ->; - -export type SetDepositCollateralAllowedEventFilter = - TypedEventFilter; - -export interface SetDepositUnderlyingAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetCollateralRatioEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralRatio: BigNumberish, + newCollateralRatio: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralRatio: bigint, + newCollateralRatio: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralRatio: bigint; + newCollateralRatio: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositUnderlyingAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositUnderlyingAllowedEventObject ->; - -export type SetDepositUnderlyingAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidateBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetDebtCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + oldDebtCeiling: BigNumberish, + newDebtCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + bond: string, + oldDebtCeiling: bigint, + newDebtCeiling: bigint + ]; + export interface OutputObject { + owner: string; + bond: string; + oldDebtCeiling: bigint; + newDebtCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidateBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetLiquidateBorrowAllowedEventObject ->; - -export type SetLiquidateBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidationIncentiveEventObject { - owner: string; - collateral: string; - oldLiquidationIncentive: BigNumber; - newLiquidationIncentive: BigNumber; + +export namespace SetDepositCollateralAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, collateral: string, state: boolean]; + export interface OutputObject { + owner: string; + collateral: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidationIncentiveEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetLiquidationIncentiveEventObject ->; - -export type SetLiquidationIncentiveEventFilter = - TypedEventFilter; - -export interface SetMaxBondsEventObject { - owner: string; - oldMaxBonds: BigNumber; - newMaxBonds: BigNumber; + +export namespace SetDepositUnderlyingAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxBondsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxBondsEventObject ->; -export type SetMaxBondsEventFilter = TypedEventFilter; +export namespace SetLiquidateBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface SetMaxCollateralsEventObject { - owner: string; - oldMaxCollaterals: BigNumber; - newMaxCollaterals: BigNumber; +export namespace SetLiquidationIncentiveEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldLiquidationIncentive: BigNumberish, + newLiquidationIncentive: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldLiquidationIncentive: bigint, + newLiquidationIncentive: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldLiquidationIncentive: bigint; + newLiquidationIncentive: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxCollateralsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxCollateralsEventObject ->; - -export type SetMaxCollateralsEventFilter = - TypedEventFilter; - -export interface SetRepayBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetMaxBondsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxBonds: BigNumberish, + newMaxBonds: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxBonds: bigint, + newMaxBonds: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxBonds: bigint; + newMaxBonds: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetRepayBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetRepayBorrowAllowedEventObject ->; -export type SetRepayBorrowAllowedEventFilter = - TypedEventFilter; +export namespace SetMaxCollateralsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxCollaterals: BigNumberish, + newMaxCollaterals: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxCollaterals: bigint, + newMaxCollaterals: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxCollaterals: bigint; + newMaxCollaterals: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace SetRepayBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface Fintroller extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Fintroller; + waitForDeployment(): Promise; interface: FintrollerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.BondStructOutput]>; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.CollateralStructOutput]>; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise<[BigNumber]>; - - maxCollaterals(overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + getBond: TypedContractMethod< + [hToken: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + + getBorrowAllowed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + getCollateral: TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + + getCollateralCeiling: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getCollateralRatio: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getDebtCeiling: TypedContractMethod<[bond: AddressLike], [bigint], "view">; + + getDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + getDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + isBondListed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + isCollateralListed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + listBond: TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + + listCollateral: TypedContractMethod< + [collateral: AddressLike], + [void], + "nonpayable" + >; + + maxBonds: TypedContractMethod<[], [bigint], "view">; + + maxCollaterals: TypedContractMethod<[], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + setBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setCollateralCeiling: TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setCollateralRatio: TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + + setDebtCeiling: TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + + setMaxBonds: TypedContractMethod< + [newMaxBonds: BigNumberish], + [void], + "nonpayable" + >; + + setMaxCollaterals: TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + + setRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - filters: { - "ListBond(address,address)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - ListBond( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - - "ListCollateral(address,address)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - ListCollateral( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - - "SetBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - SetBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - - "SetCollateralCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - SetCollateralCeiling( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - - "SetCollateralRatio(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - SetCollateralRatio( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - - "SetDebtCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - SetDebtCeiling( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - - "SetDepositCollateralAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - SetDepositCollateralAllowed( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - - "SetDepositUnderlyingAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - SetDepositUnderlyingAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - - "SetLiquidateBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - SetLiquidateBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - - "SetLiquidationIncentive(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - SetLiquidationIncentive( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - - "SetMaxBonds(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - SetMaxBonds( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - - "SetMaxCollaterals(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - SetMaxCollaterals( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - - "SetRepayBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - SetRepayBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "getBond" + ): TypedContractMethod< + [hToken: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getCollateral" + ): TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getCollateralCeiling" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getCollateralRatio" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDebtCeiling" + ): TypedContractMethod<[bond: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDepositCollateralAllowed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getDepositUnderlyingAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidateBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidationIncentive" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getRepayBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isBondListed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isCollateralListed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "listBond" + ): TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "listCollateral" + ): TypedContractMethod<[collateral: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "maxBonds" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxCollaterals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralCeiling" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralRatio" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDebtCeiling" + ): TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositCollateralAllowed" + ): TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositUnderlyingAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidateBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidationIncentive" + ): TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxBonds" + ): TypedContractMethod<[newMaxBonds: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setMaxCollaterals" + ): TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setRepayBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getEvent( + key: "ListBond" + ): TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + getEvent( + key: "ListCollateral" + ): TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + getEvent( + key: "SetBorrowAllowed" + ): TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetCollateralCeiling" + ): TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + getEvent( + key: "SetCollateralRatio" + ): TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + getEvent( + key: "SetDebtCeiling" + ): TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + getEvent( + key: "SetDepositCollateralAllowed" + ): TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + getEvent( + key: "SetDepositUnderlyingAllowed" + ): TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidateBorrowAllowed" + ): TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidationIncentive" + ): TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + getEvent( + key: "SetMaxBonds" + ): TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + getEvent( + key: "SetMaxCollaterals" + ): TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + getEvent( + key: "SetRepayBorrowAllowed" + ): TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + filters: { + "ListBond(address,address)": TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + ListBond: TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + + "ListCollateral(address,address)": TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + ListCollateral: TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + + "SetBorrowAllowed(address,address,bool)": TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + SetBorrowAllowed: TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + + "SetCollateralCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + SetCollateralCeiling: TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + + "SetCollateralRatio(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + SetCollateralRatio: TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + + "SetDebtCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + SetDebtCeiling: TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + + "SetDepositCollateralAllowed(address,address,bool)": TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + SetDepositCollateralAllowed: TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + + "SetDepositUnderlyingAllowed(address,address,bool)": TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + SetDepositUnderlyingAllowed: TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + + "SetLiquidateBorrowAllowed(address,address,bool)": TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + SetLiquidateBorrowAllowed: TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + + "SetLiquidationIncentive(address,address,uint256,uint256)": TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + SetLiquidationIncentive: TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + + "SetMaxBonds(address,uint256,uint256)": TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + SetMaxBonds: TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + + "SetMaxCollaterals(address,uint256,uint256)": TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + SetMaxCollaterals: TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + + "SetRepayBorrowAllowed(address,address,bool)": TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + SetRepayBorrowAllowed: TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts index c57af283..a24df57f 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts @@ -3,49 +3,45 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; export declare namespace IFintroller { export type BondStruct = { - debtCeiling: PromiseOrValue; - isBorrowAllowed: PromiseOrValue; - isDepositUnderlyingAllowed: PromiseOrValue; - isLiquidateBorrowAllowed: PromiseOrValue; - isListed: PromiseOrValue; - isRepayBorrowAllowed: PromiseOrValue; + debtCeiling: BigNumberish; + isBorrowAllowed: boolean; + isDepositUnderlyingAllowed: boolean; + isLiquidateBorrowAllowed: boolean; + isListed: boolean; + isRepayBorrowAllowed: boolean; }; export type BondStructOutput = [ - BigNumber, - boolean, - boolean, - boolean, - boolean, - boolean + debtCeiling: bigint, + isBorrowAllowed: boolean, + isDepositUnderlyingAllowed: boolean, + isLiquidateBorrowAllowed: boolean, + isListed: boolean, + isRepayBorrowAllowed: boolean ] & { - debtCeiling: BigNumber; + debtCeiling: bigint; isBorrowAllowed: boolean; isDepositUnderlyingAllowed: boolean; isLiquidateBorrowAllowed: boolean; @@ -54,65 +50,31 @@ export declare namespace IFintroller { }; export type CollateralStruct = { - ceiling: PromiseOrValue; - ratio: PromiseOrValue; - liquidationIncentive: PromiseOrValue; - isDepositCollateralAllowed: PromiseOrValue; - isListed: PromiseOrValue; + ceiling: BigNumberish; + ratio: BigNumberish; + liquidationIncentive: BigNumberish; + isDepositCollateralAllowed: boolean; + isListed: boolean; }; export type CollateralStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - boolean, - boolean + ceiling: bigint, + ratio: bigint, + liquidationIncentive: bigint, + isDepositCollateralAllowed: boolean, + isListed: boolean ] & { - ceiling: BigNumber; - ratio: BigNumber; - liquidationIncentive: BigNumber; + ceiling: bigint; + ratio: bigint; + liquidationIncentive: bigint; isDepositCollateralAllowed: boolean; isListed: boolean; }; } -export interface IFintrollerInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "getBond(address)": FunctionFragment; - "getBorrowAllowed(address)": FunctionFragment; - "getCollateral(address)": FunctionFragment; - "getCollateralCeiling(address)": FunctionFragment; - "getCollateralRatio(address)": FunctionFragment; - "getDebtCeiling(address)": FunctionFragment; - "getDepositCollateralAllowed(address)": FunctionFragment; - "getDepositUnderlyingAllowed(address)": FunctionFragment; - "getLiquidateBorrowAllowed(address)": FunctionFragment; - "getLiquidationIncentive(address)": FunctionFragment; - "getRepayBorrowAllowed(address)": FunctionFragment; - "isBondListed(address)": FunctionFragment; - "isCollateralListed(address)": FunctionFragment; - "listBond(address)": FunctionFragment; - "listCollateral(address)": FunctionFragment; - "maxBonds()": FunctionFragment; - "maxCollaterals()": FunctionFragment; - "owner()": FunctionFragment; - "setBorrowAllowed(address,bool)": FunctionFragment; - "setCollateralCeiling(address,uint256)": FunctionFragment; - "setCollateralRatio(address,uint256)": FunctionFragment; - "setDebtCeiling(address,uint256)": FunctionFragment; - "setDepositCollateralAllowed(address,bool)": FunctionFragment; - "setDepositUnderlyingAllowed(address,bool)": FunctionFragment; - "setLiquidateBorrowAllowed(address,bool)": FunctionFragment; - "setLiquidationIncentive(address,uint256)": FunctionFragment; - "setMaxBonds(uint256)": FunctionFragment; - "setMaxCollaterals(uint256)": FunctionFragment; - "setRepayBorrowAllowed(address,bool)": FunctionFragment; - }; - +export interface IFintrollerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "getBond" @@ -146,73 +108,91 @@ export interface IFintrollerInterface extends utils.Interface { | "setRepayBorrowAllowed" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "ListBond" + | "ListCollateral" + | "SetBorrowAllowed" + | "SetCollateralCeiling" + | "SetCollateralRatio" + | "SetDebtCeiling" + | "SetDepositCollateralAllowed" + | "SetDepositUnderlyingAllowed" + | "SetLiquidateBorrowAllowed" + | "SetLiquidationIncentive" + | "SetMaxBonds" + | "SetMaxCollaterals" + | "SetRepayBorrowAllowed" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralRatio", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositCollateralAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositUnderlyingAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidateBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidationIncentive", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getRepayBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isBondListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isCollateralListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "maxBonds", values?: undefined): string; encodeFunctionData( @@ -222,47 +202,47 @@ export interface IFintrollerInterface extends utils.Interface { encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "setBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setCollateralCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setCollateralRatio", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDebtCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDepositCollateralAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setDepositUnderlyingAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidateBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidationIncentive", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxBonds", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxCollaterals", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setRepayBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; decodeFunctionResult( @@ -377,1177 +357,876 @@ export interface IFintrollerInterface extends utils.Interface { functionFragment: "setRepayBorrowAllowed", data: BytesLike ): Result; - - events: { - "ListBond(address,address)": EventFragment; - "ListCollateral(address,address)": EventFragment; - "SetBorrowAllowed(address,address,bool)": EventFragment; - "SetCollateralCeiling(address,address,uint256,uint256)": EventFragment; - "SetCollateralRatio(address,address,uint256,uint256)": EventFragment; - "SetDebtCeiling(address,address,uint256,uint256)": EventFragment; - "SetDepositCollateralAllowed(address,address,bool)": EventFragment; - "SetDepositUnderlyingAllowed(address,address,bool)": EventFragment; - "SetLiquidateBorrowAllowed(address,address,bool)": EventFragment; - "SetLiquidationIncentive(address,address,uint256,uint256)": EventFragment; - "SetMaxBonds(address,uint256,uint256)": EventFragment; - "SetMaxCollaterals(address,uint256,uint256)": EventFragment; - "SetRepayBorrowAllowed(address,address,bool)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ListBond"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ListCollateral"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralCeiling"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralRatio"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetDebtCeiling"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositCollateralAllowed" - ): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositUnderlyingAllowed" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidateBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidationIncentive"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxBonds"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxCollaterals"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetRepayBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface ListBondEventObject { - owner: string; - bond: string; +export namespace ListBondEvent { + export type InputTuple = [owner: AddressLike, bond: AddressLike]; + export type OutputTuple = [owner: string, bond: string]; + export interface OutputObject { + owner: string; + bond: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListBondEvent = TypedEvent<[string, string], ListBondEventObject>; - -export type ListBondEventFilter = TypedEventFilter; -export interface ListCollateralEventObject { - owner: string; - collateral: string; +export namespace ListCollateralEvent { + export type InputTuple = [owner: AddressLike, collateral: AddressLike]; + export type OutputTuple = [owner: string, collateral: string]; + export interface OutputObject { + owner: string; + collateral: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListCollateralEvent = TypedEvent< - [string, string], - ListCollateralEventObject ->; - -export type ListCollateralEventFilter = TypedEventFilter; -export interface SetBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; -} -export type SetBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetBorrowAllowedEventObject ->; - -export type SetBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetCollateralCeilingEventObject { - owner: string; - collateral: string; - oldCollateralCeiling: BigNumber; - newCollateralCeiling: BigNumber; -} -export type SetCollateralCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralCeilingEventObject ->; - -export type SetCollateralCeilingEventFilter = - TypedEventFilter; - -export interface SetCollateralRatioEventObject { - owner: string; - collateral: string; - oldCollateralRatio: BigNumber; - newCollateralRatio: BigNumber; -} -export type SetCollateralRatioEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralRatioEventObject ->; - -export type SetCollateralRatioEventFilter = - TypedEventFilter; - -export interface SetDebtCeilingEventObject { - owner: string; - bond: string; - oldDebtCeiling: BigNumber; - newDebtCeiling: BigNumber; +export namespace SetBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDebtCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetDebtCeilingEventObject ->; -export type SetDebtCeilingEventFilter = TypedEventFilter; - -export interface SetDepositCollateralAllowedEventObject { - owner: string; - collateral: string; - state: boolean; +export namespace SetCollateralCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralCeiling: BigNumberish, + newCollateralCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralCeiling: bigint, + newCollateralCeiling: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralCeiling: bigint; + newCollateralCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositCollateralAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositCollateralAllowedEventObject ->; - -export type SetDepositCollateralAllowedEventFilter = - TypedEventFilter; - -export interface SetDepositUnderlyingAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetCollateralRatioEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralRatio: BigNumberish, + newCollateralRatio: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralRatio: bigint, + newCollateralRatio: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralRatio: bigint; + newCollateralRatio: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositUnderlyingAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositUnderlyingAllowedEventObject ->; - -export type SetDepositUnderlyingAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidateBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetDebtCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + oldDebtCeiling: BigNumberish, + newDebtCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + bond: string, + oldDebtCeiling: bigint, + newDebtCeiling: bigint + ]; + export interface OutputObject { + owner: string; + bond: string; + oldDebtCeiling: bigint; + newDebtCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidateBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetLiquidateBorrowAllowedEventObject ->; - -export type SetLiquidateBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidationIncentiveEventObject { - owner: string; - collateral: string; - oldLiquidationIncentive: BigNumber; - newLiquidationIncentive: BigNumber; + +export namespace SetDepositCollateralAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, collateral: string, state: boolean]; + export interface OutputObject { + owner: string; + collateral: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidationIncentiveEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetLiquidationIncentiveEventObject ->; - -export type SetLiquidationIncentiveEventFilter = - TypedEventFilter; - -export interface SetMaxBondsEventObject { - owner: string; - oldMaxBonds: BigNumber; - newMaxBonds: BigNumber; + +export namespace SetDepositUnderlyingAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxBondsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxBondsEventObject ->; -export type SetMaxBondsEventFilter = TypedEventFilter; +export namespace SetLiquidateBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface SetMaxCollateralsEventObject { - owner: string; - oldMaxCollaterals: BigNumber; - newMaxCollaterals: BigNumber; +export namespace SetLiquidationIncentiveEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldLiquidationIncentive: BigNumberish, + newLiquidationIncentive: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldLiquidationIncentive: bigint, + newLiquidationIncentive: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldLiquidationIncentive: bigint; + newLiquidationIncentive: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxCollateralsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxCollateralsEventObject ->; - -export type SetMaxCollateralsEventFilter = - TypedEventFilter; - -export interface SetRepayBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetMaxBondsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxBonds: BigNumberish, + newMaxBonds: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxBonds: bigint, + newMaxBonds: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxBonds: bigint; + newMaxBonds: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetRepayBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetRepayBorrowAllowedEventObject ->; -export type SetRepayBorrowAllowedEventFilter = - TypedEventFilter; +export namespace SetMaxCollateralsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxCollaterals: BigNumberish, + newMaxCollaterals: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxCollaterals: bigint, + newMaxCollaterals: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxCollaterals: bigint; + newMaxCollaterals: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace SetRepayBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface IFintroller extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IFintroller; + waitForDeployment(): Promise; interface: IFintrollerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.BondStructOutput]>; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.CollateralStructOutput]>; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise<[BigNumber]>; - - maxCollaterals(overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + getBond: TypedContractMethod< + [bond: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + + getBorrowAllowed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + getCollateral: TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + + getCollateralCeiling: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getCollateralRatio: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getDebtCeiling: TypedContractMethod<[bond: AddressLike], [bigint], "view">; + + getDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + getDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + isBondListed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + isCollateralListed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + listBond: TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + + listCollateral: TypedContractMethod< + [collateral: AddressLike], + [void], + "nonpayable" + >; + + maxBonds: TypedContractMethod<[], [bigint], "view">; + + maxCollaterals: TypedContractMethod<[], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + setBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setCollateralCeiling: TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setCollateralRatio: TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + + setDebtCeiling: TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + + setMaxBonds: TypedContractMethod< + [newMaxBonds: BigNumberish], + [void], + "nonpayable" + >; + + setMaxCollaterals: TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + + setRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - filters: { - "ListBond(address,address)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - ListBond( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - - "ListCollateral(address,address)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - ListCollateral( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - - "SetBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - SetBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - - "SetCollateralCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - SetCollateralCeiling( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - - "SetCollateralRatio(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - SetCollateralRatio( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - - "SetDebtCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - SetDebtCeiling( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - - "SetDepositCollateralAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - SetDepositCollateralAllowed( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - - "SetDepositUnderlyingAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - SetDepositUnderlyingAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - - "SetLiquidateBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - SetLiquidateBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - - "SetLiquidationIncentive(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - SetLiquidationIncentive( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - - "SetMaxBonds(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - SetMaxBonds( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - - "SetMaxCollaterals(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - SetMaxCollaterals( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - - "SetRepayBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - SetRepayBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "getBond" + ): TypedContractMethod< + [bond: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getCollateral" + ): TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getCollateralCeiling" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getCollateralRatio" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDebtCeiling" + ): TypedContractMethod<[bond: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDepositCollateralAllowed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getDepositUnderlyingAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidateBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidationIncentive" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getRepayBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isBondListed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isCollateralListed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "listBond" + ): TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "listCollateral" + ): TypedContractMethod<[collateral: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "maxBonds" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxCollaterals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralCeiling" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralRatio" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDebtCeiling" + ): TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositCollateralAllowed" + ): TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositUnderlyingAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidateBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidationIncentive" + ): TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxBonds" + ): TypedContractMethod<[newMaxBonds: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setMaxCollaterals" + ): TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setRepayBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getEvent( + key: "ListBond" + ): TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + getEvent( + key: "ListCollateral" + ): TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + getEvent( + key: "SetBorrowAllowed" + ): TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetCollateralCeiling" + ): TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + getEvent( + key: "SetCollateralRatio" + ): TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + getEvent( + key: "SetDebtCeiling" + ): TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + getEvent( + key: "SetDepositCollateralAllowed" + ): TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + getEvent( + key: "SetDepositUnderlyingAllowed" + ): TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidateBorrowAllowed" + ): TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidationIncentive" + ): TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + getEvent( + key: "SetMaxBonds" + ): TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + getEvent( + key: "SetMaxCollaterals" + ): TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + getEvent( + key: "SetRepayBorrowAllowed" + ): TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + filters: { + "ListBond(address,address)": TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + ListBond: TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + + "ListCollateral(address,address)": TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + ListCollateral: TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + + "SetBorrowAllowed(address,address,bool)": TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + SetBorrowAllowed: TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + + "SetCollateralCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + SetCollateralCeiling: TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + + "SetCollateralRatio(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + SetCollateralRatio: TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + + "SetDebtCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + SetDebtCeiling: TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + + "SetDepositCollateralAllowed(address,address,bool)": TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + SetDepositCollateralAllowed: TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + + "SetDepositUnderlyingAllowed(address,address,bool)": TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + SetDepositUnderlyingAllowed: TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + + "SetLiquidateBorrowAllowed(address,address,bool)": TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + SetLiquidateBorrowAllowed: TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + + "SetLiquidationIncentive(address,address,uint256,uint256)": TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + SetLiquidationIncentive: TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + + "SetMaxBonds(address,uint256,uint256)": TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + SetMaxBonds: TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + + "SetMaxCollaterals(address,uint256,uint256)": TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + SetMaxCollaterals: TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + + "SetRepayBorrowAllowed(address,address,bool)": TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + SetRepayBorrowAllowed: TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/h-token/HToken.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/h-token/HToken.ts index 07c2ac4d..020e23a4 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/h-token/HToken.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/h-token/HToken.ts @@ -3,72 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface HTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setBalanceSheet(address)": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "balanceSheet()": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "depositUnderlying(uint256)": FunctionFragment; - "fintroller()": FunctionFragment; - "getDepositorBalance(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "isMatured()": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "nonces(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "redeem(uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "totalUnderlyingReserve()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - "withdrawUnderlying(uint256)": FunctionFragment; - }; - +export interface HTokenInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "_recover" @@ -107,6 +64,21 @@ export interface HTokenInterface extends utils.Interface { | "withdrawUnderlying" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "DepositUnderlying" + | "Mint" + | "Recover" + | "Redeem" + | "SetBalanceSheet" + | "SetNonRecoverableTokens" + | "Transfer" + | "TransferOwnership" + | "WithdrawUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -117,7 +89,7 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -125,27 +97,27 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setBalanceSheet", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "balanceSheet", @@ -153,16 +125,16 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -170,43 +142,40 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getDepositorBalance", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "isMatured", values?: undefined): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; encodeFunctionData( functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "redeem", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -219,15 +188,11 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -240,7 +205,7 @@ export interface HTokenInterface extends utils.Interface { encodeFunctionData(functionFragment: "version", values?: undefined): string; encodeFunctionData( functionFragment: "withdrawUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -330,1058 +295,775 @@ export interface HTokenInterface extends utils.Interface { functionFragment: "withdrawUnderlying", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "DepositUnderlying(address,uint256,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Recover(address,address,uint256)": EventFragment; - "Redeem(address,uint256,uint256)": EventFragment; - "SetBalanceSheet(address,address,address)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "WithdrawUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DepositUnderlying"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBalanceSheet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawUnderlying"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface DepositUnderlyingEventObject { - depositor: string; - depositUnderlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace DepositUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + depositUnderlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + depositUnderlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + depositUnderlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - DepositUnderlyingEventObject ->; - -export type DepositUnderlyingEventFilter = - TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; -export type MintEventFilter = TypedEventFilter; - -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface RedeemEventObject { - account: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace RedeemEvent { + export type InputTuple = [ + account: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + account: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RedeemEvent = TypedEvent< - [string, BigNumber, BigNumber], - RedeemEventObject ->; - -export type RedeemEventFilter = TypedEventFilter; -export interface SetBalanceSheetEventObject { - owner: string; - oldBalanceSheet: string; - newBalanceSheet: string; +export namespace SetBalanceSheetEvent { + export type InputTuple = [ + owner: AddressLike, + oldBalanceSheet: AddressLike, + newBalanceSheet: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldBalanceSheet: string, + newBalanceSheet: string + ]; + export interface OutputObject { + owner: string; + oldBalanceSheet: string; + newBalanceSheet: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetBalanceSheetEvent = TypedEvent< - [string, string, string], - SetBalanceSheetEventObject ->; -export type SetBalanceSheetEventFilter = TypedEventFilter; - -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; -} -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; - -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawUnderlyingEventObject { - depositor: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; + +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - WithdrawUnderlyingEventObject ->; -export type WithdrawUnderlyingEventFilter = - TypedEventFilter; +export namespace WithdrawUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface HToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): HToken; + waitForDeployment(): Promise; interface: HTokenInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amount: BigNumber }>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise<[boolean]>; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setBalanceSheet: TypedContractMethod< + [newBalanceSheet: AddressLike], + [void], + "nonpayable" + >; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + depositUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + fintroller: TypedContractMethod<[], [string], "view">; + + getDepositorBalance: TypedContractMethod< + [depositor: AddressLike], + [bigint], + "view" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + isMatured: TypedContractMethod<[], [boolean], "view">; + + maturity: TypedContractMethod<[], [bigint], "view">; + + mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonRecoverableTokens: TypedContractMethod< + [arg0: BigNumberish], + [string], + "view" + >; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + totalUnderlyingReserve: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - name(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [string], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + withdrawUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setBalanceSheet" + ): TypedContractMethod<[newBalanceSheet: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getDepositorBalance" + ): TypedContractMethod<[depositor: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "isMatured" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "totalUnderlyingReserve" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "withdrawUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "DepositUnderlying" + ): TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "Redeem" + ): TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + getEvent( + key: "SetBalanceSheet" + ): TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawUnderlying" + ): TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "DepositUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - DepositUnderlying( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "Redeem(address,uint256,uint256)"( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - Redeem( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - - "SetBalanceSheet(address,address,address)"( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - SetBalanceSheet( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - WithdrawUnderlying( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve( - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "DepositUnderlying(address,uint256,uint256)": TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + DepositUnderlying: TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "Redeem(address,uint256,uint256)": TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + Redeem: TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + + "SetBalanceSheet(address,address,address)": TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + SetBalanceSheet: TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "WithdrawUnderlying(address,uint256,uint256)": TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; + WithdrawUnderlying: TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts index 96753024..724cb96f 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts @@ -3,72 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IHTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setBalanceSheet(address)": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "balanceSheet()": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "depositUnderlying(uint256)": FunctionFragment; - "fintroller()": FunctionFragment; - "getDepositorBalance(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "isMatured()": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "nonces(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "redeem(uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "totalUnderlyingReserve()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - "withdrawUnderlying(uint256)": FunctionFragment; - }; - +export interface IHTokenInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "_recover" @@ -107,6 +64,21 @@ export interface IHTokenInterface extends utils.Interface { | "withdrawUnderlying" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "DepositUnderlying" + | "Mint" + | "Recover" + | "Redeem" + | "SetBalanceSheet" + | "SetNonRecoverableTokens" + | "Transfer" + | "TransferOwnership" + | "WithdrawUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -117,7 +89,7 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -125,27 +97,27 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setBalanceSheet", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "balanceSheet", @@ -153,16 +125,16 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -170,43 +142,40 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getDepositorBalance", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "isMatured", values?: undefined): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; encodeFunctionData( functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "redeem", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -219,15 +188,11 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -240,7 +205,7 @@ export interface IHTokenInterface extends utils.Interface { encodeFunctionData(functionFragment: "version", values?: undefined): string; encodeFunctionData( functionFragment: "withdrawUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -330,1058 +295,775 @@ export interface IHTokenInterface extends utils.Interface { functionFragment: "withdrawUnderlying", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "DepositUnderlying(address,uint256,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Recover(address,address,uint256)": EventFragment; - "Redeem(address,uint256,uint256)": EventFragment; - "SetBalanceSheet(address,address,address)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "WithdrawUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DepositUnderlying"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBalanceSheet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawUnderlying"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface DepositUnderlyingEventObject { - depositor: string; - depositUnderlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace DepositUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + depositUnderlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + depositUnderlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + depositUnderlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - DepositUnderlyingEventObject ->; - -export type DepositUnderlyingEventFilter = - TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; -export type MintEventFilter = TypedEventFilter; - -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface RedeemEventObject { - account: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace RedeemEvent { + export type InputTuple = [ + account: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + account: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RedeemEvent = TypedEvent< - [string, BigNumber, BigNumber], - RedeemEventObject ->; - -export type RedeemEventFilter = TypedEventFilter; -export interface SetBalanceSheetEventObject { - owner: string; - oldBalanceSheet: string; - newBalanceSheet: string; +export namespace SetBalanceSheetEvent { + export type InputTuple = [ + owner: AddressLike, + oldBalanceSheet: AddressLike, + newBalanceSheet: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldBalanceSheet: string, + newBalanceSheet: string + ]; + export interface OutputObject { + owner: string; + oldBalanceSheet: string; + newBalanceSheet: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetBalanceSheetEvent = TypedEvent< - [string, string, string], - SetBalanceSheetEventObject ->; -export type SetBalanceSheetEventFilter = TypedEventFilter; - -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; -} -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; - -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawUnderlyingEventObject { - depositor: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; + +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - WithdrawUnderlyingEventObject ->; -export type WithdrawUnderlyingEventFilter = - TypedEventFilter; +export namespace WithdrawUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface IHToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IHToken; + waitForDeployment(): Promise; interface: IHTokenInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amount: BigNumber }>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise<[boolean]>; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setBalanceSheet: TypedContractMethod< + [newBalanceSheet: AddressLike], + [void], + "nonpayable" + >; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + depositUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + fintroller: TypedContractMethod<[], [string], "view">; + + getDepositorBalance: TypedContractMethod< + [depositor: AddressLike], + [bigint], + "view" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + isMatured: TypedContractMethod<[], [boolean], "view">; + + maturity: TypedContractMethod<[], [bigint], "view">; + + mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonRecoverableTokens: TypedContractMethod< + [index: BigNumberish], + [string], + "view" + >; + + nonces: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + totalUnderlyingReserve: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - name(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [string], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + withdrawUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setBalanceSheet" + ): TypedContractMethod<[newBalanceSheet: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getDepositorBalance" + ): TypedContractMethod<[depositor: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "isMatured" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[index: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "totalUnderlyingReserve" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "withdrawUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "DepositUnderlying" + ): TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "Redeem" + ): TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + getEvent( + key: "SetBalanceSheet" + ): TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawUnderlying" + ): TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "DepositUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - DepositUnderlying( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "Redeem(address,uint256,uint256)"( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - Redeem( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - - "SetBalanceSheet(address,address,address)"( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - SetBalanceSheet( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - WithdrawUnderlying( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve( - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "DepositUnderlying(address,uint256,uint256)": TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + DepositUnderlying: TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "Redeem(address,uint256,uint256)": TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + Redeem: TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + + "SetBalanceSheet(address,address,address)": TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + SetBalanceSheet: TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "WithdrawUnderlying(address,uint256,uint256)": TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; + WithdrawUnderlying: TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts index 0a5be3c3..803089bd 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts @@ -3,35 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IAggregatorV3Interface extends utils.Interface { - functions: { - "decimals()": FunctionFragment; - "description()": FunctionFragment; - "getRoundData(uint80)": FunctionFragment; - "latestRoundData()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IAggregatorV3Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "decimals" | "description" | "getRoundData" @@ -46,7 +37,7 @@ export interface IAggregatorV3Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getRoundData", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "latestRoundData", @@ -68,162 +59,128 @@ export interface IAggregatorV3Interface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: {}; } export interface IAggregatorV3 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IAggregatorV3; + waitForDeployment(): Promise; interface: IAggregatorV3Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - decimals(overrides?: CallOverrides): Promise<[number]>; - - description(overrides?: CallOverrides): Promise<[string]>; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ): 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; + + decimals: TypedContractMethod<[], [bigint], "view">; + + description: TypedContractMethod<[], [string], "view">; + + getRoundData: TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - version(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + ], + "view" >; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; + } + ], + "view" >; - version(overrides?: CallOverrides): Promise; - - callStatic: { - decimals(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRoundData" + ): TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - version(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; filters: {}; - - estimateGas: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/oracles/ChainlinkOperator.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/oracles/ChainlinkOperator.ts index 34c37289..e48455f5 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/oracles/ChainlinkOperator.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/oracles/ChainlinkOperator.ts @@ -3,48 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface ChainlinkOperatorInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "deleteFeed(string)": FunctionFragment; - "getFeed(string)": FunctionFragment; - "getNormalizedPrice(string)": FunctionFragment; - "getPrice(string)": FunctionFragment; - "owner()": FunctionFragment; - "pricePrecision()": FunctionFragment; - "pricePrecisionScalar()": FunctionFragment; - "priceStalenessThreshold()": FunctionFragment; - "setFeed(address,address)": FunctionFragment; - "setPriceStalenessThreshold(uint256)": FunctionFragment; - }; - +export interface ChainlinkOperatorInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "deleteFeed" @@ -59,30 +40,29 @@ export interface ChainlinkOperatorInterface extends utils.Interface { | "setPriceStalenessThreshold" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "DeleteFeed" + | "SetFeed" + | "SetPriceStalenessThreshold" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "deleteFeed", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getFeed", - values: [PromiseOrValue] + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "deleteFeed", values: [string]): string; + encodeFunctionData(functionFragment: "getFeed", values: [string]): string; encodeFunctionData( functionFragment: "getNormalizedPrice", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getPrice", - values: [PromiseOrValue] + values: [string] ): string; + encodeFunctionData(functionFragment: "getPrice", values: [string]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "pricePrecision", @@ -98,11 +78,11 @@ export interface ChainlinkOperatorInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setFeed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "setPriceStalenessThreshold", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -138,374 +118,270 @@ export interface ChainlinkOperatorInterface extends utils.Interface { functionFragment: "setPriceStalenessThreshold", data: BytesLike ): Result; - - events: { - "DeleteFeed(address,address)": EventFragment; - "SetFeed(address,address)": EventFragment; - "SetPriceStalenessThreshold(uint256,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DeleteFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetPriceStalenessThreshold"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface DeleteFeedEventObject { - asset: string; - feed: string; +export namespace DeleteFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DeleteFeedEvent = TypedEvent< - [string, string], - DeleteFeedEventObject ->; -export type DeleteFeedEventFilter = TypedEventFilter; - -export interface SetFeedEventObject { - asset: string; - feed: string; +export namespace SetFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFeedEvent = TypedEvent<[string, string], SetFeedEventObject>; - -export type SetFeedEventFilter = TypedEventFilter; -export interface SetPriceStalenessThresholdEventObject { - oldPriceStalenessThreshold: BigNumber; - newPriceStalenessThreshold: BigNumber; +export namespace SetPriceStalenessThresholdEvent { + export type InputTuple = [ + oldPriceStalenessThreshold: BigNumberish, + newPriceStalenessThreshold: BigNumberish + ]; + export type OutputTuple = [ + oldPriceStalenessThreshold: bigint, + newPriceStalenessThreshold: bigint + ]; + export interface OutputObject { + oldPriceStalenessThreshold: bigint; + newPriceStalenessThreshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetPriceStalenessThresholdEvent = TypedEvent< - [BigNumber, BigNumber], - SetPriceStalenessThresholdEventObject ->; -export type SetPriceStalenessThresholdEventFilter = - TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface ChainlinkOperator extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): ChainlinkOperator; + waitForDeployment(): Promise; interface: ChainlinkOperatorInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - pricePrecision(overrides?: CallOverrides): Promise<[BigNumber]>; - - pricePrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - priceStalenessThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + deleteFeed: TypedContractMethod<[symbol: string], [void], "nonpayable">; + + getFeed: TypedContractMethod< + [symbol: string], + [[string, string, boolean]], + "view" + >; + + getNormalizedPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + getPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + pricePrecision: TypedContractMethod<[], [bigint], "view">; + + pricePrecisionScalar: TypedContractMethod<[], [bigint], "view">; + + priceStalenessThreshold: TypedContractMethod<[], [bigint], "view">; + + setFeed: TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + + setPriceStalenessThreshold: TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "deleteFeed" + ): TypedContractMethod<[symbol: string], [void], "nonpayable">; + getFunction( + nameOrSignature: "getFeed" + ): TypedContractMethod<[symbol: string], [[string, string, boolean]], "view">; + getFunction( + nameOrSignature: "getNormalizedPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "getPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "pricePrecision" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "pricePrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "priceStalenessThreshold" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "setFeed" + ): TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setPriceStalenessThreshold" + ): TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "DeleteFeed" + ): TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + getEvent( + key: "SetFeed" + ): TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + getEvent( + key: "SetPriceStalenessThreshold" + ): TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "DeleteFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - DeleteFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - - "SetFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - SetFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - - "SetPriceStalenessThreshold(uint256,uint256)"( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - SetPriceStalenessThreshold( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar( - overrides?: CallOverrides - ): Promise; - - priceStalenessThreshold( - overrides?: CallOverrides - ): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "DeleteFeed(address,address)": TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + DeleteFeed: TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + + "SetFeed(address,address)": TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + SetFeed: TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + + "SetPriceStalenessThreshold(uint256,uint256)": TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; + SetPriceStalenessThreshold: TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts b/packages/flash-swap/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts index b7048921..01ff7e8f 100644 --- a/packages/flash-swap/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts +++ b/packages/flash-swap/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts @@ -3,45 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IChainlinkOperatorInterface extends utils.Interface { - functions: { - "deleteFeed(string)": FunctionFragment; - "getFeed(string)": FunctionFragment; - "getNormalizedPrice(string)": FunctionFragment; - "getPrice(string)": FunctionFragment; - "pricePrecision()": FunctionFragment; - "pricePrecisionScalar()": FunctionFragment; - "priceStalenessThreshold()": FunctionFragment; - "setFeed(address,address)": FunctionFragment; - "setPriceStalenessThreshold(uint256)": FunctionFragment; - }; - +export interface IChainlinkOperatorInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "deleteFeed" | "getFeed" | "getNormalizedPrice" @@ -53,22 +37,20 @@ export interface IChainlinkOperatorInterface extends utils.Interface { | "setPriceStalenessThreshold" ): FunctionFragment; - encodeFunctionData( - functionFragment: "deleteFeed", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getFeed", - values: [PromiseOrValue] - ): string; + getEvent( + nameOrSignatureOrTopic: + | "DeleteFeed" + | "SetFeed" + | "SetPriceStalenessThreshold" + ): EventFragment; + + encodeFunctionData(functionFragment: "deleteFeed", values: [string]): string; + encodeFunctionData(functionFragment: "getFeed", values: [string]): string; encodeFunctionData( functionFragment: "getNormalizedPrice", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getPrice", - values: [PromiseOrValue] + values: [string] ): string; + encodeFunctionData(functionFragment: "getPrice", values: [string]): string; encodeFunctionData( functionFragment: "pricePrecision", values?: undefined @@ -83,11 +65,11 @@ export interface IChainlinkOperatorInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setFeed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "setPriceStalenessThreshold", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult(functionFragment: "deleteFeed", data: BytesLike): Result; @@ -114,298 +96,220 @@ export interface IChainlinkOperatorInterface extends utils.Interface { functionFragment: "setPriceStalenessThreshold", data: BytesLike ): Result; - - events: { - "DeleteFeed(address,address)": EventFragment; - "SetFeed(address,address)": EventFragment; - "SetPriceStalenessThreshold(uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DeleteFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetPriceStalenessThreshold"): EventFragment; } -export interface DeleteFeedEventObject { - asset: string; - feed: string; +export namespace DeleteFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DeleteFeedEvent = TypedEvent< - [string, string], - DeleteFeedEventObject ->; - -export type DeleteFeedEventFilter = TypedEventFilter; -export interface SetFeedEventObject { - asset: string; - feed: string; +export namespace SetFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFeedEvent = TypedEvent<[string, string], SetFeedEventObject>; - -export type SetFeedEventFilter = TypedEventFilter; -export interface SetPriceStalenessThresholdEventObject { - oldPriceStalenessThreshold: BigNumber; - newPriceStalenessThreshold: BigNumber; +export namespace SetPriceStalenessThresholdEvent { + export type InputTuple = [ + oldPriceStalenessThreshold: BigNumberish, + newPriceStalenessThreshold: BigNumberish + ]; + export type OutputTuple = [ + oldPriceStalenessThreshold: bigint, + newPriceStalenessThreshold: bigint + ]; + export interface OutputObject { + oldPriceStalenessThreshold: bigint; + newPriceStalenessThreshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetPriceStalenessThresholdEvent = TypedEvent< - [BigNumber, BigNumber], - SetPriceStalenessThresholdEventObject ->; - -export type SetPriceStalenessThresholdEventFilter = - TypedEventFilter; export interface IChainlinkOperator extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IChainlinkOperator; + waitForDeployment(): Promise; interface: IChainlinkOperatorInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - pricePrecision(overrides?: CallOverrides): Promise<[BigNumber]>; - - pricePrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - priceStalenessThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + deleteFeed: TypedContractMethod<[symbol: string], [void], "nonpayable">; + + getFeed: TypedContractMethod< + [symbol: string], + [[string, string, boolean]], + "view" + >; + + getNormalizedPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + getPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + pricePrecision: TypedContractMethod<[], [bigint], "view">; + + pricePrecisionScalar: TypedContractMethod<[], [bigint], "view">; + + priceStalenessThreshold: TypedContractMethod<[], [bigint], "view">; + + setFeed: TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + + setPriceStalenessThreshold: TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "deleteFeed" + ): TypedContractMethod<[symbol: string], [void], "nonpayable">; + getFunction( + nameOrSignature: "getFeed" + ): TypedContractMethod<[symbol: string], [[string, string, boolean]], "view">; + getFunction( + nameOrSignature: "getNormalizedPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "getPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "pricePrecision" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "pricePrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "priceStalenessThreshold" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "setFeed" + ): TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setPriceStalenessThreshold" + ): TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "DeleteFeed" + ): TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + getEvent( + key: "SetFeed" + ): TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + getEvent( + key: "SetPriceStalenessThreshold" + ): TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; filters: { - "DeleteFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - DeleteFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - - "SetFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - SetFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - - "SetPriceStalenessThreshold(uint256,uint256)"( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - SetPriceStalenessThreshold( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - }; - - estimateGas: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar( - overrides?: CallOverrides - ): Promise; - - priceStalenessThreshold( - overrides?: CallOverrides - ): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "DeleteFeed(address,address)": TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + DeleteFeed: TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + + "SetFeed(address,address)": TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + SetFeed: TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + + "SetPriceStalenessThreshold(uint256,uint256)": TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; + SetPriceStalenessThreshold: TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@openzeppelin/contracts/drafts/IERC20Permit.ts b/packages/flash-swap/src/types/@openzeppelin/contracts/drafts/IERC20Permit.ts index e250ea61..66571b06 100644 --- a/packages/flash-swap/src/types/@openzeppelin/contracts/drafts/IERC20Permit.ts +++ b/packages/flash-swap/src/types/@openzeppelin/contracts/drafts/IERC20Permit.ts @@ -3,55 +3,44 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IERC20PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - }; - +export interface IERC20PermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "nonces" | "permit" + nameOrSignature: "DOMAIN_SEPARATOR" | "nonces" | "permit" ): FunctionFragment; encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; @@ -61,133 +50,94 @@ export interface IERC20PermitInterface extends utils.Interface { ): Result; decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - - events: {}; } export interface IERC20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC20Permit; + waitForDeployment(): Promise; interface: IERC20PermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; filters: {}; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; } diff --git a/packages/flash-swap/src/types/@openzeppelin/contracts/introspection/ERC165.ts b/packages/flash-swap/src/types/@openzeppelin/contracts/introspection/ERC165.ts index 08686325..125b8b58 100644 --- a/packages/flash-swap/src/types/@openzeppelin/contracts/introspection/ERC165.ts +++ b/packages/flash-swap/src/types/@openzeppelin/contracts/introspection/ERC165.ts @@ -3,101 +3,92 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface ERC165Interface extends utils.Interface { - functions: { - "supportsInterface(bytes4)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "supportsInterface"): FunctionFragment; +export interface ERC165Interface extends Interface { + getFunction(nameOrSignature: "supportsInterface"): FunctionFragment; encodeFunctionData( functionFragment: "supportsInterface", - values: [PromiseOrValue] + values: [BytesLike] ): string; decodeFunctionResult( functionFragment: "supportsInterface", data: BytesLike ): Result; - - events: {}; } export interface ERC165 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): ERC165; + waitForDeployment(): Promise; interface: ERC165Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; - populateTransaction: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@openzeppelin/contracts/introspection/IERC165.ts b/packages/flash-swap/src/types/@openzeppelin/contracts/introspection/IERC165.ts index 5478400e..55438e22 100644 --- a/packages/flash-swap/src/types/@openzeppelin/contracts/introspection/IERC165.ts +++ b/packages/flash-swap/src/types/@openzeppelin/contracts/introspection/IERC165.ts @@ -3,101 +3,92 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IERC165Interface extends utils.Interface { - functions: { - "supportsInterface(bytes4)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "supportsInterface"): FunctionFragment; +export interface IERC165Interface extends Interface { + getFunction(nameOrSignature: "supportsInterface"): FunctionFragment; encodeFunctionData( functionFragment: "supportsInterface", - values: [PromiseOrValue] + values: [BytesLike] ): string; decodeFunctionResult( functionFragment: "supportsInterface", data: BytesLike ): Result; - - events: {}; } export interface IERC165 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC165; + waitForDeployment(): Promise; interface: IERC165Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; - populateTransaction: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC20/IERC20.ts b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC20/IERC20.ts index 2a8369be..2ffc2824 100644 --- a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC20/IERC20.ts +++ b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC20/IERC20.ts @@ -3,42 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IERC20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IERC20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -47,17 +34,19 @@ export interface IERC20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "totalSupply", @@ -65,15 +54,11 @@ export interface IERC20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -88,255 +73,190 @@ export interface IERC20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IERC20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC20; + waitForDeployment(): Promise; interface: IERC20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/ERC721.ts b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/ERC721.ts index e5ef96ea..2369a8ab 100644 --- a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/ERC721.ts +++ b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/ERC721.ts @@ -3,53 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface ERC721Interface extends utils.Interface { - functions: { - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "baseURI()": FunctionFragment; - "getApproved(uint256)": FunctionFragment; - "isApprovedForAll(address,address)": FunctionFragment; - "name()": FunctionFragment; - "ownerOf(uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256,bytes)": FunctionFragment; - "setApprovalForAll(address,bool)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "symbol()": FunctionFragment; - "tokenByIndex(uint256)": FunctionFragment; - "tokenOfOwnerByIndex(address,uint256)": FunctionFragment; - "tokenURI(uint256)": FunctionFragment; - "totalSupply()": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface ERC721Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "approve" | "balanceOf" | "baseURI" @@ -69,65 +45,60 @@ export interface ERC721Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "baseURI", values?: undefined): string; encodeFunctionData( functionFragment: "getApproved", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "isApprovedForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "ownerOf", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "setApprovalForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "supportsInterface", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( functionFragment: "tokenByIndex", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "tokenOfOwnerByIndex", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "tokenURI", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "totalSupply", @@ -135,11 +106,7 @@ export interface ERC721Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; @@ -189,540 +156,323 @@ export interface ERC721Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "ApprovalForAll(address,address,bool)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - approved: string; - tokenId: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + approved: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject { + owner: string; + approved: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; -export interface ApprovalForAllEventObject { - owner: string; - operator: string; - approved: boolean; +export namespace ApprovalForAllEvent { + export type InputTuple = [ + owner: AddressLike, + operator: AddressLike, + approved: boolean + ]; + export type OutputTuple = [ + owner: string, + operator: string, + approved: boolean + ]; + export interface OutputObject { + owner: string; + operator: string; + approved: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalForAllEvent = TypedEvent< - [string, string, boolean], - ApprovalForAllEventObject ->; -export type ApprovalForAllEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - tokenId: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject { + from: string; + to: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface ERC721 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): ERC721; + waitForDeployment(): Promise; interface: ERC721Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - baseURI(overrides?: CallOverrides): Promise<[string]>; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + ): 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; + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + baseURI: TypedContractMethod<[], [string], "view">; + + getApproved: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + + name: TypedContractMethod<[], [string], "view">; + + ownerOf: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + "safeTransferFrom(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + _data: BytesLike + ], + [void], + "nonpayable" + >; + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean], + [void], + "nonpayable" + >; + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + tokenByIndex: TypedContractMethod<[index: BigNumberish], [bigint], "view">; + + tokenOfOwnerByIndex: TypedContractMethod< + [owner: AddressLike, index: BigNumberish], + [bigint], + "view" + >; + + tokenURI: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "baseURI" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getApproved" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "isApprovedForAll" + ): TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "ownerOf" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256)" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256,bytes)" + ): TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + _data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setApprovalForAll" + ): TypedContractMethod< + [operator: AddressLike, approved: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "tokenByIndex" + ): TypedContractMethod<[index: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "tokenOfOwnerByIndex" + ): TypedContractMethod< + [owner: AddressLike, index: BigNumberish], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "tokenURI" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "ApprovalForAll" + ): TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - - "ApprovalForAll(address,address,bool)"( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - ApprovalForAll( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - }; - - estimateGas: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "ApprovalForAll(address,address,bool)": TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + ApprovalForAll: TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721.ts b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721.ts index 62aed194..7f47c599 100644 --- a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721.ts +++ b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721.ts @@ -3,46 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IERC721Interface extends utils.Interface { - functions: { - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "getApproved(uint256)": FunctionFragment; - "isApprovedForAll(address,address)": FunctionFragment; - "ownerOf(uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256,bytes)": FunctionFragment; - "setApprovalForAll(address,bool)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IERC721Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "approve" | "balanceOf" | "getApproved" @@ -55,58 +38,49 @@ export interface IERC721Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getApproved", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "isApprovedForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "ownerOf", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "setApprovalForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "supportsInterface", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; @@ -140,420 +114,280 @@ export interface IERC721Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "ApprovalForAll(address,address,bool)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - approved: string; - tokenId: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + approved: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject { + owner: string; + approved: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; -export interface ApprovalForAllEventObject { - owner: string; - operator: string; - approved: boolean; +export namespace ApprovalForAllEvent { + export type InputTuple = [ + owner: AddressLike, + operator: AddressLike, + approved: boolean + ]; + export type OutputTuple = [ + owner: string, + operator: string, + approved: boolean + ]; + export interface OutputObject { + owner: string; + operator: string; + approved: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalForAllEvent = TypedEvent< - [string, string, boolean], - ApprovalForAllEventObject ->; -export type ApprovalForAllEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - tokenId: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject { + from: string; + to: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IERC721 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC721; + waitForDeployment(): Promise; interface: IERC721Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { balance: BigNumber }>; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { operator: string }>; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { owner: string }>; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + getApproved: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + + ownerOf: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + "safeTransferFrom(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, _approved: boolean], + [void], + "nonpayable" + >; + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getApproved" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "isApprovedForAll" + ): TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "ownerOf" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256)" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256,bytes)" + ): TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setApprovalForAll" + ): TypedContractMethod< + [operator: AddressLike, _approved: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "ApprovalForAll" + ): TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - - "ApprovalForAll(address,address,bool)"( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - ApprovalForAll( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - }; - - estimateGas: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "ApprovalForAll(address,address,bool)": TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + ApprovalForAll: TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Enumerable.ts b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Enumerable.ts index efd86cb5..41d93d8e 100644 --- a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Enumerable.ts +++ b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Enumerable.ts @@ -3,49 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IERC721EnumerableInterface extends utils.Interface { - functions: { - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "getApproved(uint256)": FunctionFragment; - "isApprovedForAll(address,address)": FunctionFragment; - "ownerOf(uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256,bytes)": FunctionFragment; - "setApprovalForAll(address,bool)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "tokenByIndex(uint256)": FunctionFragment; - "tokenOfOwnerByIndex(address,uint256)": FunctionFragment; - "totalSupply()": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IERC721EnumerableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "approve" | "balanceOf" | "getApproved" @@ -61,58 +41,53 @@ export interface IERC721EnumerableInterface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getApproved", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "isApprovedForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "ownerOf", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "setApprovalForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "supportsInterface", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData( functionFragment: "tokenByIndex", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "tokenOfOwnerByIndex", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "totalSupply", @@ -120,11 +95,7 @@ export interface IERC721EnumerableInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; @@ -170,485 +141,303 @@ export interface IERC721EnumerableInterface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "ApprovalForAll(address,address,bool)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - approved: string; - tokenId: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + approved: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject { + owner: string; + approved: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface ApprovalForAllEventObject { - owner: string; - operator: string; - approved: boolean; +export namespace ApprovalForAllEvent { + export type InputTuple = [ + owner: AddressLike, + operator: AddressLike, + approved: boolean + ]; + export type OutputTuple = [ + owner: string, + operator: string, + approved: boolean + ]; + export interface OutputObject { + owner: string; + operator: string; + approved: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalForAllEvent = TypedEvent< - [string, string, boolean], - ApprovalForAllEventObject ->; - -export type ApprovalForAllEventFilter = TypedEventFilter; -export interface TransferEventObject { - from: string; - to: string; - tokenId: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject { + from: string; + to: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IERC721Enumerable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC721Enumerable; + waitForDeployment(): Promise; interface: IERC721EnumerableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { balance: BigNumber }>; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { operator: string }>; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { owner: string }>; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { tokenId: BigNumber }>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + ): 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; + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + getApproved: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + + ownerOf: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + "safeTransferFrom(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, _approved: boolean], + [void], + "nonpayable" + >; + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; + + tokenByIndex: TypedContractMethod<[index: BigNumberish], [bigint], "view">; + + tokenOfOwnerByIndex: TypedContractMethod< + [owner: AddressLike, index: BigNumberish], + [bigint], + "view" + >; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getApproved" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "isApprovedForAll" + ): TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "ownerOf" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256)" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256,bytes)" + ): TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setApprovalForAll" + ): TypedContractMethod< + [operator: AddressLike, _approved: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "tokenByIndex" + ): TypedContractMethod<[index: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "tokenOfOwnerByIndex" + ): TypedContractMethod< + [owner: AddressLike, index: BigNumberish], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "ApprovalForAll" + ): TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - - "ApprovalForAll(address,address,bool)"( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - ApprovalForAll( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - }; - - estimateGas: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "ApprovalForAll(address,address,bool)": TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + ApprovalForAll: TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Metadata.ts b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Metadata.ts index c2d6f7b8..f37028fe 100644 --- a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Metadata.ts +++ b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Metadata.ts @@ -3,49 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IERC721MetadataInterface extends utils.Interface { - functions: { - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "getApproved(uint256)": FunctionFragment; - "isApprovedForAll(address,address)": FunctionFragment; - "name()": FunctionFragment; - "ownerOf(uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256,bytes)": FunctionFragment; - "setApprovalForAll(address,bool)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "symbol()": FunctionFragment; - "tokenURI(uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IERC721MetadataInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "approve" | "balanceOf" | "getApproved" @@ -61,64 +41,55 @@ export interface IERC721MetadataInterface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getApproved", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "isApprovedForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "ownerOf", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "setApprovalForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "supportsInterface", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( functionFragment: "tokenURI", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; @@ -155,465 +126,295 @@ export interface IERC721MetadataInterface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "ApprovalForAll(address,address,bool)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - approved: string; - tokenId: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + approved: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject { + owner: string; + approved: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface ApprovalForAllEventObject { - owner: string; - operator: string; - approved: boolean; +export namespace ApprovalForAllEvent { + export type InputTuple = [ + owner: AddressLike, + operator: AddressLike, + approved: boolean + ]; + export type OutputTuple = [ + owner: string, + operator: string, + approved: boolean + ]; + export interface OutputObject { + owner: string; + operator: string; + approved: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalForAllEvent = TypedEvent< - [string, string, boolean], - ApprovalForAllEventObject ->; - -export type ApprovalForAllEventFilter = TypedEventFilter; -export interface TransferEventObject { - from: string; - to: string; - tokenId: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject { + from: string; + to: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IERC721Metadata extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC721Metadata; + waitForDeployment(): Promise; interface: IERC721MetadataInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { balance: BigNumber }>; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { operator: string }>; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { owner: string }>; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + ): 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; + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + getApproved: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + + name: TypedContractMethod<[], [string], "view">; + + ownerOf: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + "safeTransferFrom(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, _approved: boolean], + [void], + "nonpayable" + >; + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + tokenURI: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getApproved" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "isApprovedForAll" + ): TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "ownerOf" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256)" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256,bytes)" + ): TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setApprovalForAll" + ): TypedContractMethod< + [operator: AddressLike, _approved: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "tokenURI" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "ApprovalForAll" + ): TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - - "ApprovalForAll(address,address,bool)"( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - ApprovalForAll( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - }; - - estimateGas: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "ApprovalForAll(address,address,bool)": TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + ApprovalForAll: TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Receiver.ts b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Receiver.ts index 29adc897..286101a7 100644 --- a/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Receiver.ts +++ b/packages/flash-swap/src/types/@openzeppelin/contracts/token/ERC721/IERC721Receiver.ts @@ -3,124 +3,108 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IERC721ReceiverInterface extends utils.Interface { - functions: { - "onERC721Received(address,address,uint256,bytes)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "onERC721Received"): FunctionFragment; +export interface IERC721ReceiverInterface extends Interface { + getFunction(nameOrSignature: "onERC721Received"): FunctionFragment; encodeFunctionData( functionFragment: "onERC721Received", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BytesLike] ): string; decodeFunctionResult( functionFragment: "onERC721Received", data: BytesLike ): Result; - - events: {}; } export interface IERC721Receiver extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC721Receiver; + waitForDeployment(): Promise; interface: IERC721ReceiverInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - onERC721Received( - operator: PromiseOrValue, - from: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - onERC721Received( - operator: PromiseOrValue, - from: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - onERC721Received( - operator: PromiseOrValue, - from: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + onERC721Received: TypedContractMethod< + [ + operator: AddressLike, + from: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [string], + "nonpayable" + >; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - onERC721Received( - operator: PromiseOrValue, - from: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getFunction( + nameOrSignature: "onERC721Received" + ): TypedContractMethod< + [ + operator: AddressLike, + from: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [string], + "nonpayable" + >; - populateTransaction: { - onERC721Received( - operator: PromiseOrValue, - from: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@prb/contracts/access/IOwnable.ts b/packages/flash-swap/src/types/@prb/contracts/access/IOwnable.ts index 249b973a..9991d058 100644 --- a/packages/flash-swap/src/types/@prb/contracts/access/IOwnable.ts +++ b/packages/flash-swap/src/types/@prb/contracts/access/IOwnable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IOwnableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IOwnableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface IOwnableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IOwnable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IOwnable; + waitForDeployment(): Promise; interface: IOwnableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@prb/contracts/access/Ownable.ts b/packages/flash-swap/src/types/@prb/contracts/access/Ownable.ts index 3957bdb5..85ddc922 100644 --- a/packages/flash-swap/src/types/@prb/contracts/access/Ownable.ts +++ b/packages/flash-swap/src/types/@prb/contracts/access/Ownable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface OwnableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface OwnableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface OwnableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface Ownable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Ownable; + waitForDeployment(): Promise; interface: OwnableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20.ts b/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20.ts index 5b82f637..848dc820 100644 --- a/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20.ts +++ b/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20.ts @@ -3,47 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface Erc20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface Erc20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -57,26 +39,28 @@ export interface Erc20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -86,15 +70,11 @@ export interface Erc20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -120,345 +100,231 @@ export interface Erc20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface Erc20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Erc20; + waitForDeployment(): Promise; interface: Erc20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20Permit.ts b/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20Permit.ts index b2db9bf4..ec167ebb 100644 --- a/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20Permit.ts +++ b/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20Permit.ts @@ -3,52 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface Erc20PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface Erc20PermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -67,6 +44,8 @@ export interface Erc20PermitInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -77,40 +56,37 @@ export interface Erc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -120,15 +96,11 @@ export interface Erc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "version", values?: undefined): string; @@ -166,455 +138,280 @@ export interface Erc20PermitInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface Erc20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Erc20Permit; + waitForDeployment(): Promise; interface: Erc20PermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[string]>; - }; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + version: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20Recover.ts b/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20Recover.ts index 447e7490..af0b02fa 100644 --- a/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20Recover.ts +++ b/packages/flash-swap/src/types/@prb/contracts/token/erc20/Erc20Recover.ts @@ -3,42 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface Erc20RecoverInterface extends utils.Interface { - functions: { - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface Erc20RecoverInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_recover" | "_renounceOwnership" | "_setNonRecoverableTokens" @@ -47,9 +34,16 @@ export interface Erc20RecoverInterface extends utils.Interface { | "owner" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Recover" + | "SetNonRecoverableTokens" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -57,15 +51,15 @@ export interface Erc20RecoverInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -87,249 +81,211 @@ export interface Erc20RecoverInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "Recover(address,address,uint256)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface Erc20Recover extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Erc20Recover; + waitForDeployment(): Promise; interface: Erc20RecoverInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + nonRecoverableTokens: TypedContractMethod< + [arg0: BigNumberish], + [string], + "view" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - owner(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20.ts b/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20.ts index 6e2011b4..bd2fe3fa 100644 --- a/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20.ts +++ b/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20.ts @@ -3,47 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IErc20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -57,26 +39,28 @@ export interface IErc20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -86,15 +70,11 @@ export interface IErc20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -120,345 +100,231 @@ export interface IErc20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IErc20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20; + waitForDeployment(): Promise; interface: IErc20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20Permit.ts b/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20Permit.ts index 8c497255..7a9333d8 100644 --- a/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20Permit.ts +++ b/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20Permit.ts @@ -3,52 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IErc20PermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -67,6 +44,8 @@ export interface IErc20PermitInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -77,40 +56,37 @@ export interface IErc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -120,15 +96,11 @@ export interface IErc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "version", values?: undefined): string; @@ -166,455 +138,280 @@ export interface IErc20PermitInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IErc20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20Permit; + waitForDeployment(): Promise; interface: IErc20PermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[string]>; - }; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + version: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20Recover.ts b/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20Recover.ts index db433f4a..f259b269 100644 --- a/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20Recover.ts +++ b/packages/flash-swap/src/types/@prb/contracts/token/erc20/IErc20Recover.ts @@ -3,42 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20RecoverInterface extends utils.Interface { - functions: { - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IErc20RecoverInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_recover" | "_renounceOwnership" | "_setNonRecoverableTokens" @@ -47,9 +34,16 @@ export interface IErc20RecoverInterface extends utils.Interface { | "owner" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Recover" + | "SetNonRecoverableTokens" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -57,15 +51,15 @@ export interface IErc20RecoverInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -87,249 +81,211 @@ export interface IErc20RecoverInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "Recover(address,address,uint256)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IErc20Recover extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20Recover; + waitForDeployment(): Promise; interface: IErc20RecoverInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + nonRecoverableTokens: TypedContractMethod< + [index: BigNumberish], + [string], + "view" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - owner(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[index: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@uniswap/v2-core/contracts/UniswapV2ERC20.ts b/packages/flash-swap/src/types/@uniswap/v2-core/contracts/UniswapV2ERC20.ts index f9a3f26f..0b95ec20 100644 --- a/packages/flash-swap/src/types/@uniswap/v2-core/contracts/UniswapV2ERC20.ts +++ b/packages/flash-swap/src/types/@uniswap/v2-core/contracts/UniswapV2ERC20.ts @@ -3,49 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface UniswapV2ERC20Interface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface UniswapV2ERC20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -61,6 +41,8 @@ export interface UniswapV2ERC20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -71,32 +53,29 @@ export interface UniswapV2ERC20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -106,15 +85,11 @@ export interface UniswapV2ERC20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -142,385 +117,249 @@ export interface UniswapV2ERC20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface UniswapV2ERC20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): UniswapV2ERC20; + waitForDeployment(): Promise; interface: UniswapV2ERC20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.ts b/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.ts index d03d3bc1..79c1d18e 100644 --- a/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.ts +++ b/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.ts @@ -3,124 +3,108 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IUniswapV2CalleeInterface extends utils.Interface { - functions: { - "uniswapV2Call(address,uint256,uint256,bytes)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "uniswapV2Call"): FunctionFragment; +export interface IUniswapV2CalleeInterface extends Interface { + getFunction(nameOrSignature: "uniswapV2Call"): FunctionFragment; encodeFunctionData( functionFragment: "uniswapV2Call", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; decodeFunctionResult( functionFragment: "uniswapV2Call", data: BytesLike ): Result; - - events: {}; } export interface IUniswapV2Callee extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV2Callee; + waitForDeployment(): Promise; interface: IUniswapV2CalleeInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + uniswapV2Call: TypedContractMethod< + [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getFunction( + nameOrSignature: "uniswapV2Call" + ): TypedContractMethod< + [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; - populateTransaction: { - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2ERC20.ts b/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2ERC20.ts index fe35a75f..5ba7f82c 100644 --- a/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2ERC20.ts +++ b/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2ERC20.ts @@ -3,49 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IUniswapV2ERC20Interface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IUniswapV2ERC20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -61,6 +41,8 @@ export interface IUniswapV2ERC20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -71,32 +53,29 @@ export interface IUniswapV2ERC20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -106,15 +85,11 @@ export interface IUniswapV2ERC20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -142,385 +117,249 @@ export interface IUniswapV2ERC20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IUniswapV2ERC20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV2ERC20; + waitForDeployment(): Promise; interface: IUniswapV2ERC20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts b/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts index 65cf201c..1738b032 100644 --- a/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts +++ b/packages/flash-swap/src/types/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.ts @@ -3,44 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IUniswapV2FactoryInterface extends utils.Interface { - functions: { - "allPairs(uint256)": FunctionFragment; - "allPairsLength()": FunctionFragment; - "createPair(address,address)": FunctionFragment; - "feeTo()": FunctionFragment; - "feeToSetter()": FunctionFragment; - "getPair(address,address)": FunctionFragment; - "setFeeTo(address)": FunctionFragment; - "setFeeToSetter(address)": FunctionFragment; - }; - +export interface IUniswapV2FactoryInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allPairs" | "allPairsLength" | "createPair" @@ -51,9 +36,11 @@ export interface IUniswapV2FactoryInterface extends utils.Interface { | "setFeeToSetter" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "PairCreated"): EventFragment; + encodeFunctionData( functionFragment: "allPairs", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "allPairsLength", @@ -61,7 +48,7 @@ export interface IUniswapV2FactoryInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "createPair", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData(functionFragment: "feeTo", values?: undefined): string; encodeFunctionData( @@ -70,15 +57,15 @@ export interface IUniswapV2FactoryInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getPair", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "setFeeTo", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "setFeeToSetter", - values: [PromiseOrValue] + values: [AddressLike] ): string; decodeFunctionResult(functionFragment: "allPairs", data: BytesLike): Result; @@ -98,238 +85,159 @@ export interface IUniswapV2FactoryInterface extends utils.Interface { functionFragment: "setFeeToSetter", data: BytesLike ): Result; - - events: { - "PairCreated(address,address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "PairCreated"): EventFragment; } -export interface PairCreatedEventObject { - token0: string; - token1: string; - pair: string; - arg3: BigNumber; +export namespace PairCreatedEvent { + export type InputTuple = [ + token0: AddressLike, + token1: AddressLike, + pair: AddressLike, + arg3: BigNumberish + ]; + export type OutputTuple = [ + token0: string, + token1: string, + pair: string, + arg3: bigint + ]; + export interface OutputObject { + token0: string; + token1: string; + pair: string; + arg3: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type PairCreatedEvent = TypedEvent< - [string, string, string, BigNumber], - PairCreatedEventObject ->; - -export type PairCreatedEventFilter = TypedEventFilter; export interface IUniswapV2Factory extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV2Factory; + waitForDeployment(): Promise; interface: IUniswapV2FactoryInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allPairs( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { pair: string }>; - - allPairsLength(overrides?: CallOverrides): Promise<[BigNumber]>; - - createPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise<[string]>; - - feeToSetter(overrides?: CallOverrides): Promise<[string]>; - - getPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { pair: string }>; - - setFeeTo( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeToSetter( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allPairs( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFeeTo( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeToSetter( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allPairs( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allPairs: TypedContractMethod<[arg0: BigNumberish], [string], "view">; + + allPairsLength: TypedContractMethod<[], [bigint], "view">; + + createPair: TypedContractMethod< + [tokenA: AddressLike, tokenB: AddressLike], + [string], + "nonpayable" + >; + + feeTo: TypedContractMethod<[], [string], "view">; + + feeToSetter: TypedContractMethod<[], [string], "view">; + + getPair: TypedContractMethod< + [tokenA: AddressLike, tokenB: AddressLike], + [string], + "view" + >; + + setFeeTo: TypedContractMethod<[arg0: AddressLike], [void], "nonpayable">; + + setFeeToSetter: TypedContractMethod< + [arg0: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - setFeeTo( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "allPairs" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "allPairsLength" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "createPair" + ): TypedContractMethod< + [tokenA: AddressLike, tokenB: AddressLike], + [string], + "nonpayable" + >; + getFunction( + nameOrSignature: "feeTo" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "feeToSetter" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getPair" + ): TypedContractMethod< + [tokenA: AddressLike, tokenB: AddressLike], + [string], + "view" + >; + getFunction( + nameOrSignature: "setFeeTo" + ): TypedContractMethod<[arg0: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setFeeToSetter" + ): TypedContractMethod<[arg0: AddressLike], [void], "nonpayable">; - setFeeToSetter( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "PairCreated" + ): TypedContractEvent< + PairCreatedEvent.InputTuple, + PairCreatedEvent.OutputTuple, + PairCreatedEvent.OutputObject + >; filters: { - "PairCreated(address,address,address,uint256)"( - token0?: PromiseOrValue | null, - token1?: PromiseOrValue | null, - pair?: null, - arg3?: null - ): PairCreatedEventFilter; - PairCreated( - token0?: PromiseOrValue | null, - token1?: PromiseOrValue | null, - pair?: null, - arg3?: null - ): PairCreatedEventFilter; - }; - - estimateGas: { - allPairs( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFeeTo( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeToSetter( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allPairs( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFeeTo( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeToSetter( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "PairCreated(address,address,address,uint256)": TypedContractEvent< + PairCreatedEvent.InputTuple, + PairCreatedEvent.OutputTuple, + PairCreatedEvent.OutputObject + >; + PairCreated: TypedContractEvent< + PairCreatedEvent.InputTuple, + PairCreatedEvent.OutputTuple, + PairCreatedEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IERC20Minimal.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IERC20Minimal.ts index d57b12c1..244867e2 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IERC20Minimal.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IERC20Minimal.ts @@ -3,41 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IERC20MinimalInterface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IERC20MinimalInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -45,29 +33,27 @@ export interface IERC20MinimalInterface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -78,245 +64,185 @@ export interface IERC20MinimalInterface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IERC20Minimal extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC20Minimal; + waitForDeployment(): Promise; interface: IERC20MinimalInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.ts index ca8f8c17..e2b5a514 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.ts @@ -3,42 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IUniswapV3FactoryInterface extends utils.Interface { - functions: { - "createPool(address,address,uint24)": FunctionFragment; - "enableFeeAmount(uint24,int24)": FunctionFragment; - "feeAmountTickSpacing(uint24)": FunctionFragment; - "getPool(address,address,uint24)": FunctionFragment; - "owner()": FunctionFragment; - "setOwner(address)": FunctionFragment; - }; - +export interface IUniswapV3FactoryInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "createPool" | "enableFeeAmount" | "feeAmountTickSpacing" @@ -47,34 +34,30 @@ export interface IUniswapV3FactoryInterface extends utils.Interface { | "setOwner" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "FeeAmountEnabled" | "OwnerChanged" | "PoolCreated" + ): EventFragment; + encodeFunctionData( functionFragment: "createPool", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "enableFeeAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "feeAmountTickSpacing", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getPool", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "setOwner", - values: [PromiseOrValue] + values: [AddressLike] ): string; decodeFunctionResult(functionFragment: "createPool", data: BytesLike): Result; @@ -89,281 +72,222 @@ export interface IUniswapV3FactoryInterface extends utils.Interface { decodeFunctionResult(functionFragment: "getPool", data: BytesLike): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setOwner", data: BytesLike): Result; - - events: { - "FeeAmountEnabled(uint24,int24)": EventFragment; - "OwnerChanged(address,address)": EventFragment; - "PoolCreated(address,address,uint24,int24,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "FeeAmountEnabled"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnerChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "PoolCreated"): EventFragment; } -export interface FeeAmountEnabledEventObject { - fee: number; - tickSpacing: number; +export namespace FeeAmountEnabledEvent { + export type InputTuple = [fee: BigNumberish, tickSpacing: BigNumberish]; + export type OutputTuple = [fee: bigint, tickSpacing: bigint]; + export interface OutputObject { + fee: bigint; + tickSpacing: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type FeeAmountEnabledEvent = TypedEvent< - [number, number], - FeeAmountEnabledEventObject ->; -export type FeeAmountEnabledEventFilter = - TypedEventFilter; - -export interface OwnerChangedEventObject { - oldOwner: string; - newOwner: string; +export namespace OwnerChangedEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type OwnerChangedEvent = TypedEvent< - [string, string], - OwnerChangedEventObject ->; - -export type OwnerChangedEventFilter = TypedEventFilter; -export interface PoolCreatedEventObject { - token0: string; - token1: string; - fee: number; - tickSpacing: number; - pool: string; +export namespace PoolCreatedEvent { + export type InputTuple = [ + token0: AddressLike, + token1: AddressLike, + fee: BigNumberish, + tickSpacing: BigNumberish, + pool: AddressLike + ]; + export type OutputTuple = [ + token0: string, + token1: string, + fee: bigint, + tickSpacing: bigint, + pool: string + ]; + export interface OutputObject { + token0: string; + token1: string; + fee: bigint; + tickSpacing: bigint; + pool: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type PoolCreatedEvent = TypedEvent< - [string, string, number, number, string], - PoolCreatedEventObject ->; - -export type PoolCreatedEventFilter = TypedEventFilter; export interface IUniswapV3Factory extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3Factory; + waitForDeployment(): Promise; interface: IUniswapV3FactoryInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - createPool( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - fee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableFeeAmount( - fee: PromiseOrValue, - tickSpacing: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeAmountTickSpacing( - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[number]>; - - getPool( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { pool: string }>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - setOwner( - _owner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - createPool( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - fee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableFeeAmount( - fee: PromiseOrValue, - tickSpacing: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeAmountTickSpacing( - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPool( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - setOwner( - _owner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - createPool( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - enableFeeAmount( - fee: PromiseOrValue, - tickSpacing: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - feeAmountTickSpacing( - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPool( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; + ): 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; + + createPool: TypedContractMethod< + [tokenA: AddressLike, tokenB: AddressLike, fee: BigNumberish], + [string], + "nonpayable" + >; + + enableFeeAmount: TypedContractMethod< + [fee: BigNumberish, tickSpacing: BigNumberish], + [void], + "nonpayable" + >; + + feeAmountTickSpacing: TypedContractMethod< + [fee: BigNumberish], + [bigint], + "view" + >; + + getPool: TypedContractMethod< + [tokenA: AddressLike, tokenB: AddressLike, fee: BigNumberish], + [string], + "view" + >; + + owner: TypedContractMethod<[], [string], "view">; + + setOwner: TypedContractMethod<[_owner: AddressLike], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; - setOwner( - _owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "createPool" + ): TypedContractMethod< + [tokenA: AddressLike, tokenB: AddressLike, fee: BigNumberish], + [string], + "nonpayable" + >; + getFunction( + nameOrSignature: "enableFeeAmount" + ): TypedContractMethod< + [fee: BigNumberish, tickSpacing: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "feeAmountTickSpacing" + ): TypedContractMethod<[fee: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getPool" + ): TypedContractMethod< + [tokenA: AddressLike, tokenB: AddressLike, fee: BigNumberish], + [string], + "view" + >; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setOwner" + ): TypedContractMethod<[_owner: AddressLike], [void], "nonpayable">; + + getEvent( + key: "FeeAmountEnabled" + ): TypedContractEvent< + FeeAmountEnabledEvent.InputTuple, + FeeAmountEnabledEvent.OutputTuple, + FeeAmountEnabledEvent.OutputObject + >; + getEvent( + key: "OwnerChanged" + ): TypedContractEvent< + OwnerChangedEvent.InputTuple, + OwnerChangedEvent.OutputTuple, + OwnerChangedEvent.OutputObject + >; + getEvent( + key: "PoolCreated" + ): TypedContractEvent< + PoolCreatedEvent.InputTuple, + PoolCreatedEvent.OutputTuple, + PoolCreatedEvent.OutputObject + >; filters: { - "FeeAmountEnabled(uint24,int24)"( - fee?: PromiseOrValue | null, - tickSpacing?: PromiseOrValue | null - ): FeeAmountEnabledEventFilter; - FeeAmountEnabled( - fee?: PromiseOrValue | null, - tickSpacing?: PromiseOrValue | null - ): FeeAmountEnabledEventFilter; - - "OwnerChanged(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnerChangedEventFilter; - OwnerChanged( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnerChangedEventFilter; - - "PoolCreated(address,address,uint24,int24,address)"( - token0?: PromiseOrValue | null, - token1?: PromiseOrValue | null, - fee?: PromiseOrValue | null, - tickSpacing?: null, - pool?: null - ): PoolCreatedEventFilter; - PoolCreated( - token0?: PromiseOrValue | null, - token1?: PromiseOrValue | null, - fee?: PromiseOrValue | null, - tickSpacing?: null, - pool?: null - ): PoolCreatedEventFilter; - }; - - estimateGas: { - createPool( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - fee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableFeeAmount( - fee: PromiseOrValue, - tickSpacing: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeAmountTickSpacing( - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPool( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - setOwner( - _owner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - createPool( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - fee: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableFeeAmount( - fee: PromiseOrValue, - tickSpacing: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeAmountTickSpacing( - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPool( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - fee: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - setOwner( - _owner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "FeeAmountEnabled(uint24,int24)": TypedContractEvent< + FeeAmountEnabledEvent.InputTuple, + FeeAmountEnabledEvent.OutputTuple, + FeeAmountEnabledEvent.OutputObject + >; + FeeAmountEnabled: TypedContractEvent< + FeeAmountEnabledEvent.InputTuple, + FeeAmountEnabledEvent.OutputTuple, + FeeAmountEnabledEvent.OutputObject + >; + + "OwnerChanged(address,address)": TypedContractEvent< + OwnerChangedEvent.InputTuple, + OwnerChangedEvent.OutputTuple, + OwnerChangedEvent.OutputObject + >; + OwnerChanged: TypedContractEvent< + OwnerChangedEvent.InputTuple, + OwnerChangedEvent.OutputTuple, + OwnerChangedEvent.OutputObject + >; + + "PoolCreated(address,address,uint24,int24,address)": TypedContractEvent< + PoolCreatedEvent.InputTuple, + PoolCreatedEvent.OutputTuple, + PoolCreatedEvent.OutputObject + >; + PoolCreated: TypedContractEvent< + PoolCreatedEvent.InputTuple, + PoolCreatedEvent.OutputTuple, + PoolCreatedEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.ts index c2e8107e..85027dde 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.ts @@ -3,62 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IUniswapV3PoolInterface extends utils.Interface { - functions: { - "burn(int24,int24,uint128)": FunctionFragment; - "collect(address,int24,int24,uint128,uint128)": FunctionFragment; - "collectProtocol(address,uint128,uint128)": FunctionFragment; - "factory()": FunctionFragment; - "fee()": FunctionFragment; - "feeGrowthGlobal0X128()": FunctionFragment; - "feeGrowthGlobal1X128()": FunctionFragment; - "flash(address,uint256,uint256,bytes)": FunctionFragment; - "increaseObservationCardinalityNext(uint16)": FunctionFragment; - "initialize(uint160)": FunctionFragment; - "liquidity()": FunctionFragment; - "maxLiquidityPerTick()": FunctionFragment; - "mint(address,int24,int24,uint128,bytes)": FunctionFragment; - "observations(uint256)": FunctionFragment; - "observe(uint32[])": FunctionFragment; - "positions(bytes32)": FunctionFragment; - "protocolFees()": FunctionFragment; - "setFeeProtocol(uint8,uint8)": FunctionFragment; - "slot0()": FunctionFragment; - "snapshotCumulativesInside(int24,int24)": FunctionFragment; - "swap(address,bool,int256,uint160,bytes)": FunctionFragment; - "tickBitmap(int16)": FunctionFragment; - "tickSpacing()": FunctionFragment; - "ticks(int24)": FunctionFragment; - "token0()": FunctionFragment; - "token1()": FunctionFragment; - }; - +export interface IUniswapV3PoolInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "burn" | "collect" | "collectProtocol" @@ -87,31 +54,36 @@ export interface IUniswapV3PoolInterface extends utils.Interface { | "token1" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Burn" + | "Collect" + | "CollectProtocol" + | "Flash" + | "IncreaseObservationCardinalityNext" + | "Initialize" + | "Mint" + | "SetFeeProtocol" + | "Swap" + ): EventFragment; + encodeFunctionData( functionFragment: "burn", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "collect", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish ] ): string; encodeFunctionData( functionFragment: "collectProtocol", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData(functionFragment: "factory", values?: undefined): string; encodeFunctionData(functionFragment: "fee", values?: undefined): string; @@ -125,20 +97,15 @@ export interface IUniswapV3PoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "flash", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "increaseObservationCardinalityNext", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "initialize", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "liquidity", values?: undefined): string; encodeFunctionData( @@ -147,25 +114,19 @@ export interface IUniswapV3PoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "mint", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "observations", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "observe", - values: [PromiseOrValue[]] + values: [BigNumberish[]] ): string; encodeFunctionData( functionFragment: "positions", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData( functionFragment: "protocolFees", @@ -173,35 +134,26 @@ export interface IUniswapV3PoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setFeeProtocol", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, BigNumberish] ): string; encodeFunctionData(functionFragment: "slot0", values?: undefined): string; encodeFunctionData( functionFragment: "snapshotCumulativesInside", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "swap", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, boolean, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "tickBitmap", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "tickSpacing", values?: undefined ): string; - encodeFunctionData( - functionFragment: "ticks", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "ticks", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "token0", values?: undefined): string; encodeFunctionData(functionFragment: "token1", values?: undefined): string; @@ -261,1111 +213,867 @@ export interface IUniswapV3PoolInterface extends utils.Interface { decodeFunctionResult(functionFragment: "ticks", data: BytesLike): Result; decodeFunctionResult(functionFragment: "token0", data: BytesLike): Result; decodeFunctionResult(functionFragment: "token1", data: BytesLike): Result; - - events: { - "Burn(address,int24,int24,uint128,uint256,uint256)": EventFragment; - "Collect(address,address,int24,int24,uint128,uint128)": EventFragment; - "CollectProtocol(address,address,uint128,uint128)": EventFragment; - "Flash(address,address,uint256,uint256,uint256,uint256)": EventFragment; - "IncreaseObservationCardinalityNext(uint16,uint16)": EventFragment; - "Initialize(uint160,int24)": EventFragment; - "Mint(address,address,int24,int24,uint128,uint256,uint256)": EventFragment; - "SetFeeProtocol(uint8,uint8,uint8,uint8)": EventFragment; - "Swap(address,address,int256,int256,uint160,uint128,int24)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Collect"): EventFragment; - getEvent(nameOrSignatureOrTopic: "CollectProtocol"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Flash"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "IncreaseObservationCardinalityNext" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "Initialize"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetFeeProtocol"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; } -export interface BurnEventObject { - owner: string; - tickLower: number; - tickUpper: number; - amount: BigNumber; - amount0: BigNumber; - amount1: BigNumber; +export namespace BurnEvent { + export type InputTuple = [ + owner: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + tickLower: bigint, + tickUpper: bigint, + amount: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + owner: string; + tickLower: bigint; + tickUpper: bigint; + amount: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent< - [string, number, number, BigNumber, BigNumber, BigNumber], - BurnEventObject ->; - -export type BurnEventFilter = TypedEventFilter; -export interface CollectEventObject { - owner: string; - recipient: string; - tickLower: number; - tickUpper: number; - amount0: BigNumber; - amount1: BigNumber; +export namespace CollectEvent { + export type InputTuple = [ + owner: AddressLike, + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + recipient: string, + tickLower: bigint, + tickUpper: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + owner: string; + recipient: string; + tickLower: bigint; + tickUpper: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type CollectEvent = TypedEvent< - [string, string, number, number, BigNumber, BigNumber], - CollectEventObject ->; -export type CollectEventFilter = TypedEventFilter; - -export interface CollectProtocolEventObject { - sender: string; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; +export namespace CollectProtocolEvent { + export type InputTuple = [ + sender: AddressLike, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + recipient: string, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + sender: string; + recipient: string; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type CollectProtocolEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - CollectProtocolEventObject ->; - -export type CollectProtocolEventFilter = TypedEventFilter; -export interface FlashEventObject { - sender: string; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; - paid0: BigNumber; - paid1: BigNumber; +export namespace FlashEvent { + export type InputTuple = [ + sender: AddressLike, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + paid0: BigNumberish, + paid1: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + recipient: string, + amount0: bigint, + amount1: bigint, + paid0: bigint, + paid1: bigint + ]; + export interface OutputObject { + sender: string; + recipient: string; + amount0: bigint; + amount1: bigint; + paid0: bigint; + paid1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type FlashEvent = TypedEvent< - [string, string, BigNumber, BigNumber, BigNumber, BigNumber], - FlashEventObject ->; -export type FlashEventFilter = TypedEventFilter; - -export interface IncreaseObservationCardinalityNextEventObject { - observationCardinalityNextOld: number; - observationCardinalityNextNew: number; +export namespace IncreaseObservationCardinalityNextEvent { + export type InputTuple = [ + observationCardinalityNextOld: BigNumberish, + observationCardinalityNextNew: BigNumberish + ]; + export type OutputTuple = [ + observationCardinalityNextOld: bigint, + observationCardinalityNextNew: bigint + ]; + export interface OutputObject { + observationCardinalityNextOld: bigint; + observationCardinalityNextNew: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type IncreaseObservationCardinalityNextEvent = TypedEvent< - [number, number], - IncreaseObservationCardinalityNextEventObject ->; - -export type IncreaseObservationCardinalityNextEventFilter = - TypedEventFilter; -export interface InitializeEventObject { - sqrtPriceX96: BigNumber; - tick: number; +export namespace InitializeEvent { + export type InputTuple = [sqrtPriceX96: BigNumberish, tick: BigNumberish]; + export type OutputTuple = [sqrtPriceX96: bigint, tick: bigint]; + export interface OutputObject { + sqrtPriceX96: bigint; + tick: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type InitializeEvent = TypedEvent< - [BigNumber, number], - InitializeEventObject ->; -export type InitializeEventFilter = TypedEventFilter; - -export interface MintEventObject { - sender: string; - owner: string; - tickLower: number; - tickUpper: number; - amount: BigNumber; - amount0: BigNumber; - amount1: BigNumber; +export namespace MintEvent { + export type InputTuple = [ + sender: AddressLike, + owner: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + owner: string, + tickLower: bigint, + tickUpper: bigint, + amount: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + sender: string; + owner: string; + tickLower: bigint; + tickUpper: bigint; + amount: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent< - [string, string, number, number, BigNumber, BigNumber, BigNumber], - MintEventObject ->; - -export type MintEventFilter = TypedEventFilter; -export interface SetFeeProtocolEventObject { - feeProtocol0Old: number; - feeProtocol1Old: number; - feeProtocol0New: number; - feeProtocol1New: number; +export namespace SetFeeProtocolEvent { + export type InputTuple = [ + feeProtocol0Old: BigNumberish, + feeProtocol1Old: BigNumberish, + feeProtocol0New: BigNumberish, + feeProtocol1New: BigNumberish + ]; + export type OutputTuple = [ + feeProtocol0Old: bigint, + feeProtocol1Old: bigint, + feeProtocol0New: bigint, + feeProtocol1New: bigint + ]; + export interface OutputObject { + feeProtocol0Old: bigint; + feeProtocol1Old: bigint; + feeProtocol0New: bigint; + feeProtocol1New: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFeeProtocolEvent = TypedEvent< - [number, number, number, number], - SetFeeProtocolEventObject ->; -export type SetFeeProtocolEventFilter = TypedEventFilter; - -export interface SwapEventObject { - sender: string; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; - sqrtPriceX96: BigNumber; - liquidity: BigNumber; - tick: number; +export namespace SwapEvent { + export type InputTuple = [ + sender: AddressLike, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + sqrtPriceX96: BigNumberish, + liquidity: BigNumberish, + tick: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + recipient: string, + amount0: bigint, + amount1: bigint, + sqrtPriceX96: bigint, + liquidity: bigint, + tick: bigint + ]; + export interface OutputObject { + sender: string; + recipient: string; + amount0: bigint; + amount1: bigint; + sqrtPriceX96: bigint; + liquidity: bigint; + tick: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SwapEvent = TypedEvent< - [string, string, BigNumber, BigNumber, BigNumber, BigNumber, number], - SwapEventObject ->; - -export type SwapEventFilter = TypedEventFilter; export interface IUniswapV3Pool extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3Pool; + waitForDeployment(): Promise; interface: IUniswapV3PoolInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + burn: TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish, amount: BigNumberish], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + collect: TypedContractMethod< + [ + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + collectProtocol: TypedContractMethod< + [ + recipient: AddressLike, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - factory(overrides?: CallOverrides): Promise<[string]>; + factory: TypedContractMethod<[], [string], "view">; - fee(overrides?: CallOverrides): Promise<[number]>; + fee: TypedContractMethod<[], [bigint], "view">; - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise<[BigNumber]>; + feeGrowthGlobal0X128: TypedContractMethod<[], [bigint], "view">; - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise<[BigNumber]>; + feeGrowthGlobal1X128: TypedContractMethod<[], [bigint], "view">; - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + flash: TypedContractMethod< + [ + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + increaseObservationCardinalityNext: TypedContractMethod< + [observationCardinalityNext: BigNumberish], + [void], + "nonpayable" + >; - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + initialize: TypedContractMethod< + [sqrtPriceX96: BigNumberish], + [void], + "nonpayable" + >; - liquidity(overrides?: CallOverrides): Promise<[BigNumber]>; + liquidity: TypedContractMethod<[], [bigint], "view">; - maxLiquidityPerTick(overrides?: CallOverrides): Promise<[BigNumber]>; + maxLiquidityPerTick: TypedContractMethod<[], [bigint], "view">; - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + mint: TypedContractMethod< + [ + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; + observations: TypedContractMethod< + [index: BigNumberish], + [ + [bigint, bigint, bigint, boolean] & { + blockTimestamp: bigint; + tickCumulative: bigint; + secondsPerLiquidityCumulativeX128: bigint; initialized: boolean; } - >; + ], + "view" + >; - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; + observe: TypedContractMethod< + [secondsAgos: BigNumberish[]], + [ + [bigint[], bigint[]] & { + tickCumulatives: bigint[]; + secondsPerLiquidityCumulativeX128s: bigint[]; } - >; + ], + "view" + >; - positions( - key: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - _liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; + positions: TypedContractMethod< + [key: BytesLike], + [ + [bigint, bigint, bigint, bigint, bigint] & { + _liquidity: bigint; + feeGrowthInside0LastX128: bigint; + feeGrowthInside1LastX128: bigint; + tokensOwed0: bigint; + tokensOwed1: bigint; } - >; + ], + "view" + >; - protocolFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { token0: BigNumber; token1: BigNumber } - >; + protocolFees: TypedContractMethod< + [], + [[bigint, bigint] & { token0: bigint; token1: bigint }], + "view" + >; - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + setFeeProtocol: TypedContractMethod< + [feeProtocol0: BigNumberish, feeProtocol1: BigNumberish], + [void], + "nonpayable" + >; - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; + slot0: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + sqrtPriceX96: bigint; + tick: bigint; + observationIndex: bigint; + observationCardinality: bigint; + observationCardinalityNext: bigint; + feeProtocol: bigint; unlocked: boolean; } - >; + ], + "view" + >; - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - tickCumulativeInside: BigNumber; - secondsPerLiquidityInsideX128: BigNumber; - secondsInside: number; + snapshotCumulativesInside: TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish], + [ + [bigint, bigint, bigint] & { + tickCumulativeInside: bigint; + secondsPerLiquidityInsideX128: bigint; + secondsInside: bigint; } - >; + ], + "view" + >; - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + swap: TypedContractMethod< + [ + recipient: AddressLike, + zeroForOne: boolean, + amountSpecified: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - tickBitmap( - wordPosition: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; + tickBitmap: TypedContractMethod< + [wordPosition: BigNumberish], + [bigint], + "view" + >; - tickSpacing(overrides?: CallOverrides): Promise<[number]>; + tickSpacing: TypedContractMethod<[], [bigint], "view">; - ticks( - tick: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - number, - boolean - ] & { - liquidityGross: BigNumber; - liquidityNet: BigNumber; - feeGrowthOutside0X128: BigNumber; - feeGrowthOutside1X128: BigNumber; - tickCumulativeOutside: BigNumber; - secondsPerLiquidityOutsideX128: BigNumber; - secondsOutside: number; + ticks: TypedContractMethod< + [tick: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + liquidityGross: bigint; + liquidityNet: bigint; + feeGrowthOutside0X128: bigint; + feeGrowthOutside1X128: bigint; + tickCumulativeOutside: bigint; + secondsPerLiquidityOutsideX128: bigint; + secondsOutside: bigint; initialized: boolean; } - >; - - token0(overrides?: CallOverrides): Promise<[string]>; - - token1(overrides?: CallOverrides): Promise<[string]>; - }; - - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise; - - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ], + "view" + >; - liquidity(overrides?: CallOverrides): Promise; + token0: TypedContractMethod<[], [string], "view">; - maxLiquidityPerTick(overrides?: CallOverrides): Promise; + token1: TypedContractMethod<[], [string], "view">; - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; - initialized: boolean; - } + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish, amount: BigNumberish], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" >; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; - } + getFunction( + nameOrSignature: "collect" + ): TypedContractMethod< + [ + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" >; - - positions( - key: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - _liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; - } + getFunction( + nameOrSignature: "collectProtocol" + ): TypedContractMethod< + [ + recipient: AddressLike, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" >; - - protocolFees( - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { token0: BigNumber; token1: BigNumber }>; - - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; - unlocked: boolean; - } + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "fee" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "feeGrowthGlobal0X128" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "feeGrowthGlobal1X128" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "flash" + ): TypedContractMethod< + [ + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" >; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - tickCumulativeInside: BigNumber; - secondsPerLiquidityInsideX128: BigNumber; - secondsInside: number; - } + getFunction( + nameOrSignature: "increaseObservationCardinalityNext" + ): TypedContractMethod< + [observationCardinalityNext: BigNumberish], + [void], + "nonpayable" >; - - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - tickBitmap( - wordPosition: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - ticks( - tick: PromiseOrValue, - overrides?: CallOverrides - ): Promise< + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod<[sqrtPriceX96: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "liquidity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxLiquidityPerTick" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - number, - boolean - ] & { - liquidityGross: BigNumber; - liquidityNet: BigNumber; - feeGrowthOutside0X128: BigNumber; - feeGrowthOutside1X128: BigNumber; - tickCumulativeOutside: BigNumber; - secondsPerLiquidityOutsideX128: BigNumber; - secondsOutside: number; - initialized: boolean; - } + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" >; + getFunction( + nameOrSignature: "observations" + ): TypedContractMethod< + [index: BigNumberish], + [ + [bigint, bigint, bigint, boolean] & { + blockTimestamp: bigint; + tickCumulative: bigint; + secondsPerLiquidityCumulativeX128: bigint; + initialized: boolean; + } + ], + "view" + >; + getFunction( + nameOrSignature: "observe" + ): TypedContractMethod< + [secondsAgos: BigNumberish[]], + [ + [bigint[], bigint[]] & { + tickCumulatives: bigint[]; + secondsPerLiquidityCumulativeX128s: bigint[]; + } + ], + "view" + >; + getFunction( + nameOrSignature: "positions" + ): TypedContractMethod< + [key: BytesLike], + [ + [bigint, bigint, bigint, bigint, bigint] & { + _liquidity: bigint; + feeGrowthInside0LastX128: bigint; + feeGrowthInside1LastX128: bigint; + tokensOwed0: bigint; + tokensOwed1: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "protocolFees" + ): TypedContractMethod< + [], + [[bigint, bigint] & { token0: bigint; token1: bigint }], + "view" + >; + getFunction( + nameOrSignature: "setFeeProtocol" + ): TypedContractMethod< + [feeProtocol0: BigNumberish, feeProtocol1: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "slot0" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + sqrtPriceX96: bigint; + tick: bigint; + observationIndex: bigint; + observationCardinality: bigint; + observationCardinalityNext: bigint; + feeProtocol: bigint; + unlocked: boolean; + } + ], + "view" + >; + getFunction( + nameOrSignature: "snapshotCumulativesInside" + ): TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish], + [ + [bigint, bigint, bigint] & { + tickCumulativeInside: bigint; + secondsPerLiquidityInsideX128: bigint; + secondsInside: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "swap" + ): TypedContractMethod< + [ + recipient: AddressLike, + zeroForOne: boolean, + amountSpecified: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "tickBitmap" + ): TypedContractMethod<[wordPosition: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "tickSpacing" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "ticks" + ): TypedContractMethod< + [tick: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + liquidityGross: bigint; + liquidityNet: bigint; + feeGrowthOutside0X128: bigint; + feeGrowthOutside1X128: bigint; + tickCumulativeOutside: bigint; + secondsPerLiquidityOutsideX128: bigint; + secondsOutside: bigint; + initialized: boolean; + } + ], + "view" + >; + getFunction( + nameOrSignature: "token0" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "token1" + ): TypedContractMethod<[], [string], "view">; - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "Collect" + ): TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + getEvent( + key: "CollectProtocol" + ): TypedContractEvent< + CollectProtocolEvent.InputTuple, + CollectProtocolEvent.OutputTuple, + CollectProtocolEvent.OutputObject + >; + getEvent( + key: "Flash" + ): TypedContractEvent< + FlashEvent.InputTuple, + FlashEvent.OutputTuple, + FlashEvent.OutputObject + >; + getEvent( + key: "IncreaseObservationCardinalityNext" + ): TypedContractEvent< + IncreaseObservationCardinalityNextEvent.InputTuple, + IncreaseObservationCardinalityNextEvent.OutputTuple, + IncreaseObservationCardinalityNextEvent.OutputObject + >; + getEvent( + key: "Initialize" + ): TypedContractEvent< + InitializeEvent.InputTuple, + InitializeEvent.OutputTuple, + InitializeEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "SetFeeProtocol" + ): TypedContractEvent< + SetFeeProtocolEvent.InputTuple, + SetFeeProtocolEvent.OutputTuple, + SetFeeProtocolEvent.OutputObject + >; + getEvent( + key: "Swap" + ): TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; - callStatic: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + filters: { + "Burn(address,int24,int24,uint128,uint256,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject >; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject >; - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + "Collect(address,address,int24,int24,uint128,uint128)": TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject >; - - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise; - - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidity(overrides?: CallOverrides): Promise; - - maxLiquidityPerTick(overrides?: CallOverrides): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + Collect: TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject >; - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; - initialized: boolean; - } + "CollectProtocol(address,address,uint128,uint128)": TypedContractEvent< + CollectProtocolEvent.InputTuple, + CollectProtocolEvent.OutputTuple, + CollectProtocolEvent.OutputObject >; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; - } + CollectProtocol: TypedContractEvent< + CollectProtocolEvent.InputTuple, + CollectProtocolEvent.OutputTuple, + CollectProtocolEvent.OutputObject >; - positions( - key: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - _liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; - } + "Flash(address,address,uint256,uint256,uint256,uint256)": TypedContractEvent< + FlashEvent.InputTuple, + FlashEvent.OutputTuple, + FlashEvent.OutputObject >; - - protocolFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { token0: BigNumber; token1: BigNumber } + Flash: TypedContractEvent< + FlashEvent.InputTuple, + FlashEvent.OutputTuple, + FlashEvent.OutputObject >; - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; - unlocked: boolean; - } + "IncreaseObservationCardinalityNext(uint16,uint16)": TypedContractEvent< + IncreaseObservationCardinalityNextEvent.InputTuple, + IncreaseObservationCardinalityNextEvent.OutputTuple, + IncreaseObservationCardinalityNextEvent.OutputObject >; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - tickCumulativeInside: BigNumber; - secondsPerLiquidityInsideX128: BigNumber; - secondsInside: number; - } + IncreaseObservationCardinalityNext: TypedContractEvent< + IncreaseObservationCardinalityNextEvent.InputTuple, + IncreaseObservationCardinalityNextEvent.OutputTuple, + IncreaseObservationCardinalityNextEvent.OutputObject >; - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + "Initialize(uint160,int24)": TypedContractEvent< + InitializeEvent.InputTuple, + InitializeEvent.OutputTuple, + InitializeEvent.OutputObject >; - - tickBitmap( - wordPosition: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - ticks( - tick: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - number, - boolean - ] & { - liquidityGross: BigNumber; - liquidityNet: BigNumber; - feeGrowthOutside0X128: BigNumber; - feeGrowthOutside1X128: BigNumber; - tickCumulativeOutside: BigNumber; - secondsPerLiquidityOutsideX128: BigNumber; - secondsOutside: number; - initialized: boolean; - } + Initialize: TypedContractEvent< + InitializeEvent.InputTuple, + InitializeEvent.OutputTuple, + InitializeEvent.OutputObject >; - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - }; - - filters: { - "Burn(address,int24,int24,uint128,uint256,uint256)"( - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): BurnEventFilter; - Burn( - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): BurnEventFilter; - - "Collect(address,address,int24,int24,uint128,uint128)"( - owner?: PromiseOrValue | null, - recipient?: null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - Collect( - owner?: PromiseOrValue | null, - recipient?: null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - - "CollectProtocol(address,address,uint128,uint128)"( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectProtocolEventFilter; - CollectProtocol( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectProtocolEventFilter; - - "Flash(address,address,uint256,uint256,uint256,uint256)"( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - paid0?: null, - paid1?: null - ): FlashEventFilter; - Flash( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - paid0?: null, - paid1?: null - ): FlashEventFilter; - - "IncreaseObservationCardinalityNext(uint16,uint16)"( - observationCardinalityNextOld?: null, - observationCardinalityNextNew?: null - ): IncreaseObservationCardinalityNextEventFilter; - IncreaseObservationCardinalityNext( - observationCardinalityNextOld?: null, - observationCardinalityNextNew?: null - ): IncreaseObservationCardinalityNextEventFilter; - - "Initialize(uint160,int24)"( - sqrtPriceX96?: null, - tick?: null - ): InitializeEventFilter; - Initialize(sqrtPriceX96?: null, tick?: null): InitializeEventFilter; - - "Mint(address,address,int24,int24,uint128,uint256,uint256)"( - sender?: null, - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): MintEventFilter; - Mint( - sender?: null, - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): MintEventFilter; - - "SetFeeProtocol(uint8,uint8,uint8,uint8)"( - feeProtocol0Old?: null, - feeProtocol1Old?: null, - feeProtocol0New?: null, - feeProtocol1New?: null - ): SetFeeProtocolEventFilter; - SetFeeProtocol( - feeProtocol0Old?: null, - feeProtocol1Old?: null, - feeProtocol0New?: null, - feeProtocol1New?: null - ): SetFeeProtocolEventFilter; - - "Swap(address,address,int256,int256,uint160,uint128,int24)"( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - sqrtPriceX96?: null, - liquidity?: null, - tick?: null - ): SwapEventFilter; - Swap( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - sqrtPriceX96?: null, - liquidity?: null, - tick?: null - ): SwapEventFilter; - }; - - estimateGas: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise; - - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidity(overrides?: CallOverrides): Promise; - - maxLiquidityPerTick(overrides?: CallOverrides): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - positions( - key: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - protocolFees(overrides?: CallOverrides): Promise; - - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - slot0(overrides?: CallOverrides): Promise; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - tickBitmap( - wordPosition: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - ticks( - tick: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - feeGrowthGlobal0X128( - overrides?: CallOverrides - ): Promise; - - feeGrowthGlobal1X128( - overrides?: CallOverrides - ): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidity(overrides?: CallOverrides): Promise; - - maxLiquidityPerTick( - overrides?: CallOverrides - ): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - positions( - key: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - protocolFees(overrides?: CallOverrides): Promise; - - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - slot0(overrides?: CallOverrides): Promise; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - tickBitmap( - wordPosition: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - ticks( - tick: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + "Mint(address,address,int24,int24,uint128,uint256,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; - token0(overrides?: CallOverrides): Promise; + "SetFeeProtocol(uint8,uint8,uint8,uint8)": TypedContractEvent< + SetFeeProtocolEvent.InputTuple, + SetFeeProtocolEvent.OutputTuple, + SetFeeProtocolEvent.OutputObject + >; + SetFeeProtocol: TypedContractEvent< + SetFeeProtocolEvent.InputTuple, + SetFeeProtocolEvent.OutputTuple, + SetFeeProtocolEvent.OutputObject + >; - token1(overrides?: CallOverrides): Promise; + "Swap(address,address,int256,int256,uint160,uint128,int24)": TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; + Swap: TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3PoolDeployer.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3PoolDeployer.ts index c009abc4..b6562d75 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3PoolDeployer.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/IUniswapV3PoolDeployer.ts @@ -3,28 +3,24 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, + TypedContractMethod, } from "../../../../common"; -export interface IUniswapV3PoolDeployerInterface extends utils.Interface { - functions: { - "parameters()": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "parameters"): FunctionFragment; +export interface IUniswapV3PoolDeployerInterface extends Interface { + getFunction(nameOrSignature: "parameters"): FunctionFragment; encodeFunctionData( functionFragment: "parameters", @@ -32,83 +28,84 @@ export interface IUniswapV3PoolDeployerInterface extends utils.Interface { ): string; decodeFunctionResult(functionFragment: "parameters", data: BytesLike): Result; - - events: {}; } export interface IUniswapV3PoolDeployer extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3PoolDeployer; + waitForDeployment(): Promise; interface: IUniswapV3PoolDeployerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): 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( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - functions: { - parameters( - overrides?: CallOverrides - ): Promise< - [string, string, string, number, number] & { + parameters: TypedContractMethod< + [], + [ + [string, string, string, bigint, bigint] & { factory: string; token0: string; token1: string; - fee: number; - tickSpacing: number; + fee: bigint; + tickSpacing: bigint; } - >; - }; - - parameters( - overrides?: CallOverrides - ): Promise< - [string, string, string, number, number] & { - factory: string; - token0: string; - token1: string; - fee: number; - tickSpacing: number; - } + ], + "view" >; - callStatic: { - parameters( - overrides?: CallOverrides - ): Promise< - [string, string, string, number, number] & { + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "parameters" + ): TypedContractMethod< + [], + [ + [string, string, string, bigint, bigint] & { factory: string; token0: string; token1: string; - fee: number; - tickSpacing: number; + fee: bigint; + tickSpacing: bigint; } - >; - }; + ], + "view" + >; filters: {}; - - estimateGas: { - parameters(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - parameters(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3FlashCallback.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3FlashCallback.ts index 8dd3b449..0e7cf2a6 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3FlashCallback.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3FlashCallback.ts @@ -3,120 +3,97 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IUniswapV3FlashCallbackInterface extends utils.Interface { - functions: { - "uniswapV3FlashCallback(uint256,uint256,bytes)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "uniswapV3FlashCallback" - ): FunctionFragment; +export interface IUniswapV3FlashCallbackInterface extends Interface { + getFunction(nameOrSignature: "uniswapV3FlashCallback"): FunctionFragment; encodeFunctionData( functionFragment: "uniswapV3FlashCallback", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BytesLike] ): string; decodeFunctionResult( functionFragment: "uniswapV3FlashCallback", data: BytesLike ): Result; - - events: {}; } export interface IUniswapV3FlashCallback extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3FlashCallback; + waitForDeployment(): Promise; interface: IUniswapV3FlashCallbackInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - uniswapV3FlashCallback( - fee0: PromiseOrValue, - fee1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - uniswapV3FlashCallback( - fee0: PromiseOrValue, - fee1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - uniswapV3FlashCallback( - fee0: PromiseOrValue, - fee1: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + uniswapV3FlashCallback: TypedContractMethod< + [fee0: BigNumberish, fee1: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - uniswapV3FlashCallback( - fee0: PromiseOrValue, - fee1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getFunction( + nameOrSignature: "uniswapV3FlashCallback" + ): TypedContractMethod< + [fee0: BigNumberish, fee1: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; - populateTransaction: { - uniswapV3FlashCallback( - fee0: PromiseOrValue, - fee1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.ts index ad9a5247..cacc152e 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.ts @@ -3,120 +3,97 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IUniswapV3MintCallbackInterface extends utils.Interface { - functions: { - "uniswapV3MintCallback(uint256,uint256,bytes)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "uniswapV3MintCallback" - ): FunctionFragment; +export interface IUniswapV3MintCallbackInterface extends Interface { + getFunction(nameOrSignature: "uniswapV3MintCallback"): FunctionFragment; encodeFunctionData( functionFragment: "uniswapV3MintCallback", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BytesLike] ): string; decodeFunctionResult( functionFragment: "uniswapV3MintCallback", data: BytesLike ): Result; - - events: {}; } export interface IUniswapV3MintCallback extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3MintCallback; + waitForDeployment(): Promise; interface: IUniswapV3MintCallbackInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + uniswapV3MintCallback: TypedContractMethod< + [amount0Owed: BigNumberish, amount1Owed: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getFunction( + nameOrSignature: "uniswapV3MintCallback" + ): TypedContractMethod< + [amount0Owed: BigNumberish, amount1Owed: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; - populateTransaction: { - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts index 3d98d31a..7ad62fc2 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.ts @@ -3,120 +3,97 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IUniswapV3SwapCallbackInterface extends utils.Interface { - functions: { - "uniswapV3SwapCallback(int256,int256,bytes)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "uniswapV3SwapCallback" - ): FunctionFragment; +export interface IUniswapV3SwapCallbackInterface extends Interface { + getFunction(nameOrSignature: "uniswapV3SwapCallback"): FunctionFragment; encodeFunctionData( functionFragment: "uniswapV3SwapCallback", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BytesLike] ): string; decodeFunctionResult( functionFragment: "uniswapV3SwapCallback", data: BytesLike ): Result; - - events: {}; } export interface IUniswapV3SwapCallback extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3SwapCallback; + waitForDeployment(): Promise; interface: IUniswapV3SwapCallbackInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + uniswapV3SwapCallback: TypedContractMethod< + [amount0Delta: BigNumberish, amount1Delta: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getFunction( + nameOrSignature: "uniswapV3SwapCallback" + ): TypedContractMethod< + [amount0Delta: BigNumberish, amount1Delta: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; - populateTransaction: { - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.ts index 766a57b8..2b0768ab 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.ts @@ -3,39 +3,27 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IUniswapV3PoolActionsInterface extends utils.Interface { - functions: { - "burn(int24,int24,uint128)": FunctionFragment; - "collect(address,int24,int24,uint128,uint128)": FunctionFragment; - "flash(address,uint256,uint256,bytes)": FunctionFragment; - "increaseObservationCardinalityNext(uint16)": FunctionFragment; - "initialize(uint160)": FunctionFragment; - "mint(address,int24,int24,uint128,bytes)": FunctionFragment; - "swap(address,bool,int256,uint160,bytes)": FunctionFragment; - }; - +export interface IUniswapV3PoolActionsInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "burn" | "collect" | "flash" @@ -47,58 +35,37 @@ export interface IUniswapV3PoolActionsInterface extends utils.Interface { encodeFunctionData( functionFragment: "burn", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "collect", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish ] ): string; encodeFunctionData( functionFragment: "flash", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "increaseObservationCardinalityNext", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "initialize", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "mint", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "swap", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, boolean, BigNumberish, BigNumberish, BytesLike] ): string; decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; @@ -111,311 +78,188 @@ export interface IUniswapV3PoolActionsInterface extends utils.Interface { decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; - - events: {}; } export interface IUniswapV3PoolActions extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3PoolActions; + waitForDeployment(): Promise; interface: IUniswapV3PoolActionsInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; + ): 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; + + burn: TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish, amount: BigNumberish], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + + collect: TypedContractMethod< + [ + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + + flash: TypedContractMethod< + [ + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + + increaseObservationCardinalityNext: TypedContractMethod< + [observationCardinalityNext: BigNumberish], + [void], + "nonpayable" + >; + + initialize: TypedContractMethod< + [sqrtPriceX96: BigNumberish], + [void], + "nonpayable" + >; + + mint: TypedContractMethod< + [ + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + + swap: TypedContractMethod< + [ + recipient: AddressLike, + zeroForOne: boolean, + amountSpecified: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; - }; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish, amount: BigNumberish], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "collect" + ): TypedContractMethod< + [ + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "flash" + ): TypedContractMethod< + [ + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseObservationCardinalityNext" + ): TypedContractMethod< + [observationCardinalityNext: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod<[sqrtPriceX96: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [ + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "swap" + ): TypedContractMethod< + [ + recipient: AddressLike, + zeroForOne: boolean, + amountSpecified: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; filters: {}; - - estimateGas: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.ts index 654cea43..002b6150 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.ts @@ -3,41 +3,35 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IUniswapV3PoolDerivedStateInterface extends utils.Interface { - functions: { - "observe(uint32[])": FunctionFragment; - "snapshotCumulativesInside(int24,int24)": FunctionFragment; - }; - +export interface IUniswapV3PoolDerivedStateInterface extends Interface { getFunction( - nameOrSignatureOrTopic: "observe" | "snapshotCumulativesInside" + nameOrSignature: "observe" | "snapshotCumulativesInside" ): FunctionFragment; encodeFunctionData( functionFragment: "observe", - values: [PromiseOrValue[]] + values: [BigNumberish[]] ): string; encodeFunctionData( functionFragment: "snapshotCumulativesInside", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, BigNumberish] ): string; decodeFunctionResult(functionFragment: "observe", data: BytesLike): Result; @@ -45,131 +39,103 @@ export interface IUniswapV3PoolDerivedStateInterface extends utils.Interface { functionFragment: "snapshotCumulativesInside", data: BytesLike ): Result; - - events: {}; } export interface IUniswapV3PoolDerivedState extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3PoolDerivedState; + waitForDeployment(): Promise; interface: IUniswapV3PoolDerivedStateInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; + ): 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; + + observe: TypedContractMethod< + [secondsAgos: BigNumberish[]], + [ + [bigint[], bigint[]] & { + tickCumulatives: bigint[]; + secondsPerLiquidityCumulativeX128s: bigint[]; } - >; + ], + "view" + >; - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - tickCumulativeInside: BigNumber; - secondsPerLiquidityInsideX128: BigNumber; - secondsInside: number; + snapshotCumulativesInside: TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish], + [ + [bigint, bigint, bigint] & { + tickCumulativeInside: bigint; + secondsPerLiquidityInsideX128: bigint; + secondsInside: bigint; } - >; - }; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; - } + ], + "view" >; - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - tickCumulativeInside: BigNumber; - secondsPerLiquidityInsideX128: BigNumber; - secondsInside: number; - } - >; + getFunction( + key: string | FunctionFragment + ): T; - callStatic: { - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; + getFunction( + nameOrSignature: "observe" + ): TypedContractMethod< + [secondsAgos: BigNumberish[]], + [ + [bigint[], bigint[]] & { + tickCumulatives: bigint[]; + secondsPerLiquidityCumulativeX128s: bigint[]; } - >; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - tickCumulativeInside: BigNumber; - secondsPerLiquidityInsideX128: BigNumber; - secondsInside: number; + ], + "view" + >; + getFunction( + nameOrSignature: "snapshotCumulativesInside" + ): TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish], + [ + [bigint, bigint, bigint] & { + tickCumulativeInside: bigint; + secondsPerLiquidityInsideX128: bigint; + secondsInside: bigint; } - >; - }; + ], + "view" + >; filters: {}; - - estimateGas: { - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.ts index 65eff863..4f246a5b 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.ts @@ -3,338 +3,490 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, - Signer, - utils, + FunctionFragment, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { EventFragment } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, } from "../../../../../common"; -export interface IUniswapV3PoolEventsInterface extends utils.Interface { - functions: {}; - - events: { - "Burn(address,int24,int24,uint128,uint256,uint256)": EventFragment; - "Collect(address,address,int24,int24,uint128,uint128)": EventFragment; - "CollectProtocol(address,address,uint128,uint128)": EventFragment; - "Flash(address,address,uint256,uint256,uint256,uint256)": EventFragment; - "IncreaseObservationCardinalityNext(uint16,uint16)": EventFragment; - "Initialize(uint160,int24)": EventFragment; - "Mint(address,address,int24,int24,uint128,uint256,uint256)": EventFragment; - "SetFeeProtocol(uint8,uint8,uint8,uint8)": EventFragment; - "Swap(address,address,int256,int256,uint160,uint128,int24)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Collect"): EventFragment; - getEvent(nameOrSignatureOrTopic: "CollectProtocol"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Flash"): EventFragment; +export interface IUniswapV3PoolEventsInterface extends Interface { getEvent( - nameOrSignatureOrTopic: "IncreaseObservationCardinalityNext" + nameOrSignatureOrTopic: + | "Burn" + | "Collect" + | "CollectProtocol" + | "Flash" + | "IncreaseObservationCardinalityNext" + | "Initialize" + | "Mint" + | "SetFeeProtocol" + | "Swap" ): EventFragment; - getEvent(nameOrSignatureOrTopic: "Initialize"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetFeeProtocol"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; } -export interface BurnEventObject { - owner: string; - tickLower: number; - tickUpper: number; - amount: BigNumber; - amount0: BigNumber; - amount1: BigNumber; +export namespace BurnEvent { + export type InputTuple = [ + owner: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + tickLower: bigint, + tickUpper: bigint, + amount: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + owner: string; + tickLower: bigint; + tickUpper: bigint; + amount: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent< - [string, number, number, BigNumber, BigNumber, BigNumber], - BurnEventObject ->; -export type BurnEventFilter = TypedEventFilter; - -export interface CollectEventObject { - owner: string; - recipient: string; - tickLower: number; - tickUpper: number; - amount0: BigNumber; - amount1: BigNumber; +export namespace CollectEvent { + export type InputTuple = [ + owner: AddressLike, + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + recipient: string, + tickLower: bigint, + tickUpper: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + owner: string; + recipient: string; + tickLower: bigint; + tickUpper: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type CollectEvent = TypedEvent< - [string, string, number, number, BigNumber, BigNumber], - CollectEventObject ->; - -export type CollectEventFilter = TypedEventFilter; -export interface CollectProtocolEventObject { - sender: string; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; +export namespace CollectProtocolEvent { + export type InputTuple = [ + sender: AddressLike, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + recipient: string, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + sender: string; + recipient: string; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type CollectProtocolEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - CollectProtocolEventObject ->; -export type CollectProtocolEventFilter = TypedEventFilter; - -export interface FlashEventObject { - sender: string; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; - paid0: BigNumber; - paid1: BigNumber; +export namespace FlashEvent { + export type InputTuple = [ + sender: AddressLike, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + paid0: BigNumberish, + paid1: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + recipient: string, + amount0: bigint, + amount1: bigint, + paid0: bigint, + paid1: bigint + ]; + export interface OutputObject { + sender: string; + recipient: string; + amount0: bigint; + amount1: bigint; + paid0: bigint; + paid1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type FlashEvent = TypedEvent< - [string, string, BigNumber, BigNumber, BigNumber, BigNumber], - FlashEventObject ->; - -export type FlashEventFilter = TypedEventFilter; -export interface IncreaseObservationCardinalityNextEventObject { - observationCardinalityNextOld: number; - observationCardinalityNextNew: number; +export namespace IncreaseObservationCardinalityNextEvent { + export type InputTuple = [ + observationCardinalityNextOld: BigNumberish, + observationCardinalityNextNew: BigNumberish + ]; + export type OutputTuple = [ + observationCardinalityNextOld: bigint, + observationCardinalityNextNew: bigint + ]; + export interface OutputObject { + observationCardinalityNextOld: bigint; + observationCardinalityNextNew: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type IncreaseObservationCardinalityNextEvent = TypedEvent< - [number, number], - IncreaseObservationCardinalityNextEventObject ->; -export type IncreaseObservationCardinalityNextEventFilter = - TypedEventFilter; - -export interface InitializeEventObject { - sqrtPriceX96: BigNumber; - tick: number; +export namespace InitializeEvent { + export type InputTuple = [sqrtPriceX96: BigNumberish, tick: BigNumberish]; + export type OutputTuple = [sqrtPriceX96: bigint, tick: bigint]; + export interface OutputObject { + sqrtPriceX96: bigint; + tick: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type InitializeEvent = TypedEvent< - [BigNumber, number], - InitializeEventObject ->; - -export type InitializeEventFilter = TypedEventFilter; -export interface MintEventObject { - sender: string; - owner: string; - tickLower: number; - tickUpper: number; - amount: BigNumber; - amount0: BigNumber; - amount1: BigNumber; +export namespace MintEvent { + export type InputTuple = [ + sender: AddressLike, + owner: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + owner: string, + tickLower: bigint, + tickUpper: bigint, + amount: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + sender: string; + owner: string; + tickLower: bigint; + tickUpper: bigint; + amount: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent< - [string, string, number, number, BigNumber, BigNumber, BigNumber], - MintEventObject ->; -export type MintEventFilter = TypedEventFilter; - -export interface SetFeeProtocolEventObject { - feeProtocol0Old: number; - feeProtocol1Old: number; - feeProtocol0New: number; - feeProtocol1New: number; +export namespace SetFeeProtocolEvent { + export type InputTuple = [ + feeProtocol0Old: BigNumberish, + feeProtocol1Old: BigNumberish, + feeProtocol0New: BigNumberish, + feeProtocol1New: BigNumberish + ]; + export type OutputTuple = [ + feeProtocol0Old: bigint, + feeProtocol1Old: bigint, + feeProtocol0New: bigint, + feeProtocol1New: bigint + ]; + export interface OutputObject { + feeProtocol0Old: bigint; + feeProtocol1Old: bigint; + feeProtocol0New: bigint; + feeProtocol1New: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFeeProtocolEvent = TypedEvent< - [number, number, number, number], - SetFeeProtocolEventObject ->; - -export type SetFeeProtocolEventFilter = TypedEventFilter; -export interface SwapEventObject { - sender: string; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; - sqrtPriceX96: BigNumber; - liquidity: BigNumber; - tick: number; +export namespace SwapEvent { + export type InputTuple = [ + sender: AddressLike, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + sqrtPriceX96: BigNumberish, + liquidity: BigNumberish, + tick: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + recipient: string, + amount0: bigint, + amount1: bigint, + sqrtPriceX96: bigint, + liquidity: bigint, + tick: bigint + ]; + export interface OutputObject { + sender: string; + recipient: string; + amount0: bigint; + amount1: bigint; + sqrtPriceX96: bigint; + liquidity: bigint; + tick: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SwapEvent = TypedEvent< - [string, string, BigNumber, BigNumber, BigNumber, BigNumber, number], - SwapEventObject ->; - -export type SwapEventFilter = TypedEventFilter; export interface IUniswapV3PoolEvents extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3PoolEvents; + waitForDeployment(): Promise; interface: IUniswapV3PoolEventsInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: {}; + ): 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; + + getFunction( + key: string | FunctionFragment + ): T; - callStatic: {}; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "Collect" + ): TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + getEvent( + key: "CollectProtocol" + ): TypedContractEvent< + CollectProtocolEvent.InputTuple, + CollectProtocolEvent.OutputTuple, + CollectProtocolEvent.OutputObject + >; + getEvent( + key: "Flash" + ): TypedContractEvent< + FlashEvent.InputTuple, + FlashEvent.OutputTuple, + FlashEvent.OutputObject + >; + getEvent( + key: "IncreaseObservationCardinalityNext" + ): TypedContractEvent< + IncreaseObservationCardinalityNextEvent.InputTuple, + IncreaseObservationCardinalityNextEvent.OutputTuple, + IncreaseObservationCardinalityNextEvent.OutputObject + >; + getEvent( + key: "Initialize" + ): TypedContractEvent< + InitializeEvent.InputTuple, + InitializeEvent.OutputTuple, + InitializeEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "SetFeeProtocol" + ): TypedContractEvent< + SetFeeProtocolEvent.InputTuple, + SetFeeProtocolEvent.OutputTuple, + SetFeeProtocolEvent.OutputObject + >; + getEvent( + key: "Swap" + ): TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; filters: { - "Burn(address,int24,int24,uint128,uint256,uint256)"( - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): BurnEventFilter; - Burn( - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): BurnEventFilter; - - "Collect(address,address,int24,int24,uint128,uint128)"( - owner?: PromiseOrValue | null, - recipient?: null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - Collect( - owner?: PromiseOrValue | null, - recipient?: null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - - "CollectProtocol(address,address,uint128,uint128)"( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectProtocolEventFilter; - CollectProtocol( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectProtocolEventFilter; - - "Flash(address,address,uint256,uint256,uint256,uint256)"( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - paid0?: null, - paid1?: null - ): FlashEventFilter; - Flash( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - paid0?: null, - paid1?: null - ): FlashEventFilter; - - "IncreaseObservationCardinalityNext(uint16,uint16)"( - observationCardinalityNextOld?: null, - observationCardinalityNextNew?: null - ): IncreaseObservationCardinalityNextEventFilter; - IncreaseObservationCardinalityNext( - observationCardinalityNextOld?: null, - observationCardinalityNextNew?: null - ): IncreaseObservationCardinalityNextEventFilter; - - "Initialize(uint160,int24)"( - sqrtPriceX96?: null, - tick?: null - ): InitializeEventFilter; - Initialize(sqrtPriceX96?: null, tick?: null): InitializeEventFilter; - - "Mint(address,address,int24,int24,uint128,uint256,uint256)"( - sender?: null, - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): MintEventFilter; - Mint( - sender?: null, - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): MintEventFilter; - - "SetFeeProtocol(uint8,uint8,uint8,uint8)"( - feeProtocol0Old?: null, - feeProtocol1Old?: null, - feeProtocol0New?: null, - feeProtocol1New?: null - ): SetFeeProtocolEventFilter; - SetFeeProtocol( - feeProtocol0Old?: null, - feeProtocol1Old?: null, - feeProtocol0New?: null, - feeProtocol1New?: null - ): SetFeeProtocolEventFilter; - - "Swap(address,address,int256,int256,uint160,uint128,int24)"( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - sqrtPriceX96?: null, - liquidity?: null, - tick?: null - ): SwapEventFilter; - Swap( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - sqrtPriceX96?: null, - liquidity?: null, - tick?: null - ): SwapEventFilter; + "Burn(address,int24,int24,uint128,uint256,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "Collect(address,address,int24,int24,uint128,uint128)": TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + Collect: TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + + "CollectProtocol(address,address,uint128,uint128)": TypedContractEvent< + CollectProtocolEvent.InputTuple, + CollectProtocolEvent.OutputTuple, + CollectProtocolEvent.OutputObject + >; + CollectProtocol: TypedContractEvent< + CollectProtocolEvent.InputTuple, + CollectProtocolEvent.OutputTuple, + CollectProtocolEvent.OutputObject + >; + + "Flash(address,address,uint256,uint256,uint256,uint256)": TypedContractEvent< + FlashEvent.InputTuple, + FlashEvent.OutputTuple, + FlashEvent.OutputObject + >; + Flash: TypedContractEvent< + FlashEvent.InputTuple, + FlashEvent.OutputTuple, + FlashEvent.OutputObject + >; + + "IncreaseObservationCardinalityNext(uint16,uint16)": TypedContractEvent< + IncreaseObservationCardinalityNextEvent.InputTuple, + IncreaseObservationCardinalityNextEvent.OutputTuple, + IncreaseObservationCardinalityNextEvent.OutputObject + >; + IncreaseObservationCardinalityNext: TypedContractEvent< + IncreaseObservationCardinalityNextEvent.InputTuple, + IncreaseObservationCardinalityNextEvent.OutputTuple, + IncreaseObservationCardinalityNextEvent.OutputObject + >; + + "Initialize(uint160,int24)": TypedContractEvent< + InitializeEvent.InputTuple, + InitializeEvent.OutputTuple, + InitializeEvent.OutputObject + >; + Initialize: TypedContractEvent< + InitializeEvent.InputTuple, + InitializeEvent.OutputTuple, + InitializeEvent.OutputObject + >; + + "Mint(address,address,int24,int24,uint128,uint256,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "SetFeeProtocol(uint8,uint8,uint8,uint8)": TypedContractEvent< + SetFeeProtocolEvent.InputTuple, + SetFeeProtocolEvent.OutputTuple, + SetFeeProtocolEvent.OutputObject + >; + SetFeeProtocol: TypedContractEvent< + SetFeeProtocolEvent.InputTuple, + SetFeeProtocolEvent.OutputTuple, + SetFeeProtocolEvent.OutputObject + >; + + "Swap(address,address,int256,int256,uint160,uint128,int24)": TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; + Swap: TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; }; - - estimateGas: {}; - - populateTransaction: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.ts index 577225c4..ab56892a 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.ts @@ -3,34 +3,25 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, + TypedContractMethod, } from "../../../../../common"; -export interface IUniswapV3PoolImmutablesInterface extends utils.Interface { - functions: { - "factory()": FunctionFragment; - "fee()": FunctionFragment; - "maxLiquidityPerTick()": FunctionFragment; - "tickSpacing()": FunctionFragment; - "token0()": FunctionFragment; - "token1()": FunctionFragment; - }; - +export interface IUniswapV3PoolImmutablesInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "factory" | "fee" | "maxLiquidityPerTick" @@ -64,105 +55,85 @@ export interface IUniswapV3PoolImmutablesInterface extends utils.Interface { ): Result; decodeFunctionResult(functionFragment: "token0", data: BytesLike): Result; decodeFunctionResult(functionFragment: "token1", data: BytesLike): Result; - - events: {}; } export interface IUniswapV3PoolImmutables extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3PoolImmutables; + waitForDeployment(): Promise; interface: IUniswapV3PoolImmutablesInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - factory(overrides?: CallOverrides): Promise<[string]>; - - fee(overrides?: CallOverrides): Promise<[number]>; - - maxLiquidityPerTick(overrides?: CallOverrides): Promise<[BigNumber]>; - - tickSpacing(overrides?: CallOverrides): Promise<[number]>; - - token0(overrides?: CallOverrides): Promise<[string]>; - - token1(overrides?: CallOverrides): Promise<[string]>; - }; - - factory(overrides?: CallOverrides): Promise; + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; - fee(overrides?: CallOverrides): Promise; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - maxLiquidityPerTick(overrides?: CallOverrides): Promise; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - tickSpacing(overrides?: CallOverrides): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - token0(overrides?: CallOverrides): Promise; + factory: TypedContractMethod<[], [string], "view">; - token1(overrides?: CallOverrides): Promise; + fee: TypedContractMethod<[], [bigint], "view">; - callStatic: { - factory(overrides?: CallOverrides): Promise; + maxLiquidityPerTick: TypedContractMethod<[], [bigint], "view">; - fee(overrides?: CallOverrides): Promise; + tickSpacing: TypedContractMethod<[], [bigint], "view">; - maxLiquidityPerTick(overrides?: CallOverrides): Promise; + token0: TypedContractMethod<[], [string], "view">; - tickSpacing(overrides?: CallOverrides): Promise; + token1: TypedContractMethod<[], [string], "view">; - token0(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - token1(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "fee" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxLiquidityPerTick" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "tickSpacing" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "token0" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "token1" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - maxLiquidityPerTick(overrides?: CallOverrides): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - maxLiquidityPerTick( - overrides?: CallOverrides - ): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.ts index 3e96185e..5db2d965 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.ts @@ -3,47 +3,36 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IUniswapV3PoolOwnerActionsInterface extends utils.Interface { - functions: { - "collectProtocol(address,uint128,uint128)": FunctionFragment; - "setFeeProtocol(uint8,uint8)": FunctionFragment; - }; - +export interface IUniswapV3PoolOwnerActionsInterface extends Interface { getFunction( - nameOrSignatureOrTopic: "collectProtocol" | "setFeeProtocol" + nameOrSignature: "collectProtocol" | "setFeeProtocol" ): FunctionFragment; encodeFunctionData( functionFragment: "collectProtocol", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "setFeeProtocol", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, BigNumberish] ): string; decodeFunctionResult( @@ -54,110 +43,89 @@ export interface IUniswapV3PoolOwnerActionsInterface extends utils.Interface { functionFragment: "setFeeProtocol", data: BytesLike ): Result; - - events: {}; } export interface IUniswapV3PoolOwnerActions extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3PoolOwnerActions; + waitForDeployment(): Promise; interface: IUniswapV3PoolOwnerActionsInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; + ): 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; + + collectProtocol: TypedContractMethod< + [ + recipient: AddressLike, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + + setFeeProtocol: TypedContractMethod< + [feeProtocol0: BigNumberish, feeProtocol1: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "collectProtocol" + ): TypedContractMethod< + [ + recipient: AddressLike, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFeeProtocol" + ): TypedContractMethod< + [feeProtocol0: BigNumberish, feeProtocol1: BigNumberish], + [void], + "nonpayable" + >; filters: {}; - - estimateGas: { - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.ts b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.ts index 9796869c..33ac4c9a 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.ts @@ -3,39 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IUniswapV3PoolStateInterface extends utils.Interface { - functions: { - "feeGrowthGlobal0X128()": FunctionFragment; - "feeGrowthGlobal1X128()": FunctionFragment; - "liquidity()": FunctionFragment; - "observations(uint256)": FunctionFragment; - "positions(bytes32)": FunctionFragment; - "protocolFees()": FunctionFragment; - "slot0()": FunctionFragment; - "tickBitmap(int16)": FunctionFragment; - "ticks(int24)": FunctionFragment; - }; - +export interface IUniswapV3PoolStateInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "feeGrowthGlobal0X128" | "feeGrowthGlobal1X128" | "liquidity" @@ -58,11 +45,11 @@ export interface IUniswapV3PoolStateInterface extends utils.Interface { encodeFunctionData(functionFragment: "liquidity", values?: undefined): string; encodeFunctionData( functionFragment: "observations", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "positions", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData( functionFragment: "protocolFees", @@ -71,12 +58,9 @@ export interface IUniswapV3PoolStateInterface extends utils.Interface { encodeFunctionData(functionFragment: "slot0", values?: undefined): string; encodeFunctionData( functionFragment: "tickBitmap", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "ticks", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "ticks", values: [BigNumberish]): string; decodeFunctionResult( functionFragment: "feeGrowthGlobal0X128", @@ -99,348 +83,216 @@ export interface IUniswapV3PoolStateInterface extends utils.Interface { decodeFunctionResult(functionFragment: "slot0", data: BytesLike): Result; decodeFunctionResult(functionFragment: "tickBitmap", data: BytesLike): Result; decodeFunctionResult(functionFragment: "ticks", data: BytesLike): Result; - - events: {}; } export interface IUniswapV3PoolState extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3PoolState; + waitForDeployment(): Promise; interface: IUniswapV3PoolStateInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise<[BigNumber]>; - - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise<[BigNumber]>; - - liquidity(overrides?: CallOverrides): Promise<[BigNumber]>; - - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; + ): 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; + + feeGrowthGlobal0X128: TypedContractMethod<[], [bigint], "view">; + + feeGrowthGlobal1X128: TypedContractMethod<[], [bigint], "view">; + + liquidity: TypedContractMethod<[], [bigint], "view">; + + observations: TypedContractMethod< + [index: BigNumberish], + [ + [bigint, bigint, bigint, boolean] & { + blockTimestamp: bigint; + tickCumulative: bigint; + secondsPerLiquidityCumulativeX128: bigint; initialized: boolean; } - >; + ], + "view" + >; - positions( - key: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - _liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; + positions: TypedContractMethod< + [key: BytesLike], + [ + [bigint, bigint, bigint, bigint, bigint] & { + _liquidity: bigint; + feeGrowthInside0LastX128: bigint; + feeGrowthInside1LastX128: bigint; + tokensOwed0: bigint; + tokensOwed1: bigint; } - >; + ], + "view" + >; - protocolFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { token0: BigNumber; token1: BigNumber } - >; + protocolFees: TypedContractMethod< + [], + [[bigint, bigint] & { token0: bigint; token1: bigint }], + "view" + >; - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; + slot0: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + sqrtPriceX96: bigint; + tick: bigint; + observationIndex: bigint; + observationCardinality: bigint; + observationCardinalityNext: bigint; + feeProtocol: bigint; unlocked: boolean; } - >; - - tickBitmap( - wordPosition: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - ticks( - tick: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - number, - boolean - ] & { - liquidityGross: BigNumber; - liquidityNet: BigNumber; - feeGrowthOutside0X128: BigNumber; - feeGrowthOutside1X128: BigNumber; - tickCumulativeOutside: BigNumber; - secondsPerLiquidityOutsideX128: BigNumber; - secondsOutside: number; - initialized: boolean; - } - >; - }; - - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise; - - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise; - - liquidity(overrides?: CallOverrides): Promise; - - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; - initialized: boolean; - } - >; - - positions( - key: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - _liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; - } + ], + "view" >; - protocolFees( - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { token0: BigNumber; token1: BigNumber }>; - - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; - unlocked: boolean; - } + tickBitmap: TypedContractMethod< + [wordPosition: BigNumberish], + [bigint], + "view" >; - tickBitmap( - wordPosition: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ticks( - tick: PromiseOrValue, - overrides?: CallOverrides - ): Promise< + ticks: TypedContractMethod< + [tick: BigNumberish], [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - number, - boolean - ] & { - liquidityGross: BigNumber; - liquidityNet: BigNumber; - feeGrowthOutside0X128: BigNumber; - feeGrowthOutside1X128: BigNumber; - tickCumulativeOutside: BigNumber; - secondsPerLiquidityOutsideX128: BigNumber; - secondsOutside: number; - initialized: boolean; - } + [bigint, bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + liquidityGross: bigint; + liquidityNet: bigint; + feeGrowthOutside0X128: bigint; + feeGrowthOutside1X128: bigint; + tickCumulativeOutside: bigint; + secondsPerLiquidityOutsideX128: bigint; + secondsOutside: bigint; + initialized: boolean; + } + ], + "view" >; - callStatic: { - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise; - - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise; - - liquidity(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; + getFunction( + nameOrSignature: "feeGrowthGlobal0X128" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "feeGrowthGlobal1X128" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "liquidity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "observations" + ): TypedContractMethod< + [index: BigNumberish], + [ + [bigint, bigint, bigint, boolean] & { + blockTimestamp: bigint; + tickCumulative: bigint; + secondsPerLiquidityCumulativeX128: bigint; initialized: boolean; } - >; - - positions( - key: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - _liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "positions" + ): TypedContractMethod< + [key: BytesLike], + [ + [bigint, bigint, bigint, bigint, bigint] & { + _liquidity: bigint; + feeGrowthInside0LastX128: bigint; + feeGrowthInside1LastX128: bigint; + tokensOwed0: bigint; + tokensOwed1: bigint; } - >; - - protocolFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { token0: BigNumber; token1: BigNumber } - >; - - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; + ], + "view" + >; + getFunction( + nameOrSignature: "protocolFees" + ): TypedContractMethod< + [], + [[bigint, bigint] & { token0: bigint; token1: bigint }], + "view" + >; + getFunction( + nameOrSignature: "slot0" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + sqrtPriceX96: bigint; + tick: bigint; + observationIndex: bigint; + observationCardinality: bigint; + observationCardinalityNext: bigint; + feeProtocol: bigint; unlocked: boolean; } - >; - - tickBitmap( - wordPosition: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ticks( - tick: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - number, - boolean - ] & { - liquidityGross: BigNumber; - liquidityNet: BigNumber; - feeGrowthOutside0X128: BigNumber; - feeGrowthOutside1X128: BigNumber; - tickCumulativeOutside: BigNumber; - secondsPerLiquidityOutsideX128: BigNumber; - secondsOutside: number; + ], + "view" + >; + getFunction( + nameOrSignature: "tickBitmap" + ): TypedContractMethod<[wordPosition: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "ticks" + ): TypedContractMethod< + [tick: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + liquidityGross: bigint; + liquidityNet: bigint; + feeGrowthOutside0X128: bigint; + feeGrowthOutside1X128: bigint; + tickCumulativeOutside: bigint; + secondsPerLiquidityOutsideX128: bigint; + secondsOutside: bigint; initialized: boolean; } - >; - }; + ], + "view" + >; filters: {}; - - estimateGas: { - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise; - - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise; - - liquidity(overrides?: CallOverrides): Promise; - - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - positions( - key: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - protocolFees(overrides?: CallOverrides): Promise; - - slot0(overrides?: CallOverrides): Promise; - - tickBitmap( - wordPosition: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ticks( - tick: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - feeGrowthGlobal0X128( - overrides?: CallOverrides - ): Promise; - - feeGrowthGlobal1X128( - overrides?: CallOverrides - ): Promise; - - liquidity(overrides?: CallOverrides): Promise; - - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - positions( - key: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - protocolFees(overrides?: CallOverrides): Promise; - - slot0(overrides?: CallOverrides): Promise; - - tickBitmap( - wordPosition: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ticks( - tick: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/ERC721Permit.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/ERC721Permit.ts index ed074a77..261bbbdc 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/ERC721Permit.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/ERC721Permit.ts @@ -3,57 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface ERC721PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "baseURI()": FunctionFragment; - "getApproved(uint256)": FunctionFragment; - "isApprovedForAll(address,address)": FunctionFragment; - "name()": FunctionFragment; - "ownerOf(uint256)": FunctionFragment; - "permit(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "safeTransferFrom(address,address,uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256,bytes)": FunctionFragment; - "setApprovalForAll(address,bool)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "symbol()": FunctionFragment; - "tokenByIndex(uint256)": FunctionFragment; - "tokenOfOwnerByIndex(address,uint256)": FunctionFragment; - "tokenURI(uint256)": FunctionFragment; - "totalSupply()": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface ERC721PermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "approve" @@ -76,6 +48,10 @@ export interface ERC721PermitInterface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -86,74 +62,65 @@ export interface ERC721PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "baseURI", values?: undefined): string; encodeFunctionData( functionFragment: "getApproved", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "isApprovedForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "ownerOf", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "setApprovalForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "supportsInterface", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( functionFragment: "tokenByIndex", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "tokenOfOwnerByIndex", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "tokenURI", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "totalSupply", @@ -161,11 +128,7 @@ export interface ERC721PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -224,610 +187,360 @@ export interface ERC721PermitInterface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "ApprovalForAll(address,address,bool)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - approved: string; - tokenId: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + approved: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject { + owner: string; + approved: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface ApprovalForAllEventObject { - owner: string; - operator: string; - approved: boolean; +export namespace ApprovalForAllEvent { + export type InputTuple = [ + owner: AddressLike, + operator: AddressLike, + approved: boolean + ]; + export type OutputTuple = [ + owner: string, + operator: string, + approved: boolean + ]; + export interface OutputObject { + owner: string; + operator: string; + approved: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalForAllEvent = TypedEvent< - [string, string, boolean], - ApprovalForAllEventObject ->; - -export type ApprovalForAllEventFilter = TypedEventFilter; -export interface TransferEventObject { - from: string; - to: string; - tokenId: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject { + from: string; + to: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface ERC721Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): ERC721Permit; + waitForDeployment(): Promise; interface: ERC721PermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - baseURI(overrides?: CallOverrides): Promise<[string]>; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + baseURI: TypedContractMethod<[], [string], "view">; + + getApproved: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + + name: TypedContractMethod<[], [string], "view">; + + ownerOf: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + permit: TypedContractMethod< + [ + spender: AddressLike, + tokenId: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + "safeTransferFrom(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + _data: BytesLike + ], + [void], + "nonpayable" + >; + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean], + [void], + "nonpayable" + >; + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + tokenByIndex: TypedContractMethod<[index: BigNumberish], [bigint], "view">; + + tokenOfOwnerByIndex: TypedContractMethod< + [owner: AddressLike, index: BigNumberish], + [bigint], + "view" + >; + + tokenURI: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "baseURI" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getApproved" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "isApprovedForAll" + ): TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "ownerOf" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + spender: AddressLike, + tokenId: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256)" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256,bytes)" + ): TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + _data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setApprovalForAll" + ): TypedContractMethod< + [operator: AddressLike, approved: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "tokenByIndex" + ): TypedContractMethod<[index: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "tokenOfOwnerByIndex" + ): TypedContractMethod< + [owner: AddressLike, index: BigNumberish], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "tokenURI" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "ApprovalForAll" + ): TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - - "ApprovalForAll(address,address,bool)"( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - ApprovalForAll( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "ApprovalForAll(address,address,bool)": TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + ApprovalForAll: TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/LiquidityManagement.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/LiquidityManagement.ts index d5b419df..1a38f08d 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/LiquidityManagement.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/LiquidityManagement.ts @@ -3,39 +3,27 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface LiquidityManagementInterface extends utils.Interface { - functions: { - "WETH9()": FunctionFragment; - "factory()": FunctionFragment; - "refundETH()": FunctionFragment; - "sweepToken(address,uint256,address)": FunctionFragment; - "uniswapV3MintCallback(uint256,uint256,bytes)": FunctionFragment; - "unwrapWETH9(uint256,address)": FunctionFragment; - }; - +export interface LiquidityManagementInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "WETH9" | "factory" | "refundETH" @@ -49,23 +37,15 @@ export interface LiquidityManagementInterface extends utils.Interface { encodeFunctionData(functionFragment: "refundETH", values?: undefined): string; encodeFunctionData( functionFragment: "sweepToken", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "uniswapV3MintCallback", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "unwrapWETH9", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, AddressLike] ): string; decodeFunctionResult(functionFragment: "WETH9", data: BytesLike): Result; @@ -80,181 +60,109 @@ export interface LiquidityManagementInterface extends utils.Interface { functionFragment: "unwrapWETH9", data: BytesLike ): Result; - - events: {}; } export interface LiquidityManagement extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): LiquidityManagement; + waitForDeployment(): Promise; interface: LiquidityManagementInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - WETH9(overrides?: CallOverrides): Promise<[string]>; - - factory(overrides?: CallOverrides): Promise<[string]>; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - refundETH(overrides?: CallOverrides): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + WETH9: TypedContractMethod<[], [string], "view">; + + factory: TypedContractMethod<[], [string], "view">; + + refundETH: TypedContractMethod<[], [void], "payable">; + + sweepToken: TypedContractMethod< + [token: AddressLike, amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + + uniswapV3MintCallback: TypedContractMethod< + [amount0Owed: BigNumberish, amount1Owed: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; + + unwrapWETH9: TypedContractMethod< + [amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "WETH9" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "refundETH" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "sweepToken" + ): TypedContractMethod< + [token: AddressLike, amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + getFunction( + nameOrSignature: "uniswapV3MintCallback" + ): TypedContractMethod< + [amount0Owed: BigNumberish, amount1Owed: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "unwrapWETH9" + ): TypedContractMethod< + [amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; filters: {}; - - estimateGas: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/Multicall.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/Multicall.ts index 3dd1008e..98c2b8a4 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/Multicall.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/Multicall.ts @@ -3,100 +3,85 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface MulticallInterface extends utils.Interface { - functions: { - "multicall(bytes[])": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "multicall"): FunctionFragment; +export interface MulticallInterface extends Interface { + getFunction(nameOrSignature: "multicall"): FunctionFragment; encodeFunctionData( functionFragment: "multicall", - values: [PromiseOrValue[]] + values: [BytesLike[]] ): string; decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - - events: {}; } export interface Multicall extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Multicall; + waitForDeployment(): Promise; interface: MulticallInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - multicall( - data: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - }; + multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + getFunction( + nameOrSignature: "multicall" + ): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - populateTransaction: { - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PeripheryImmutableState.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PeripheryImmutableState.ts index 0216d6cf..1b040969 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PeripheryImmutableState.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PeripheryImmutableState.ts @@ -3,92 +3,89 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, + TypedContractMethod, } from "../../../../common"; -export interface PeripheryImmutableStateInterface extends utils.Interface { - functions: { - "WETH9()": FunctionFragment; - "factory()": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "WETH9" | "factory"): FunctionFragment; +export interface PeripheryImmutableStateInterface extends Interface { + getFunction(nameOrSignature: "WETH9" | "factory"): FunctionFragment; encodeFunctionData(functionFragment: "WETH9", values?: undefined): string; encodeFunctionData(functionFragment: "factory", values?: undefined): string; decodeFunctionResult(functionFragment: "WETH9", data: BytesLike): Result; decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; - - events: {}; } export interface PeripheryImmutableState extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): PeripheryImmutableState; + waitForDeployment(): Promise; interface: PeripheryImmutableStateInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - WETH9(overrides?: CallOverrides): Promise<[string]>; - - factory(overrides?: CallOverrides): Promise<[string]>; - }; - - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - callStatic: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - }; + ): 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; + + WETH9: TypedContractMethod<[], [string], "view">; + + factory: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "WETH9" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PeripheryPayments.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PeripheryPayments.ts index 25e19288..e807aa83 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PeripheryPayments.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PeripheryPayments.ts @@ -3,37 +3,27 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface PeripheryPaymentsInterface extends utils.Interface { - functions: { - "WETH9()": FunctionFragment; - "factory()": FunctionFragment; - "refundETH()": FunctionFragment; - "sweepToken(address,uint256,address)": FunctionFragment; - "unwrapWETH9(uint256,address)": FunctionFragment; - }; - +export interface PeripheryPaymentsInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "WETH9" | "factory" | "refundETH" @@ -46,15 +36,11 @@ export interface PeripheryPaymentsInterface extends utils.Interface { encodeFunctionData(functionFragment: "refundETH", values?: undefined): string; encodeFunctionData( functionFragment: "sweepToken", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "unwrapWETH9", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, AddressLike] ): string; decodeFunctionResult(functionFragment: "WETH9", data: BytesLike): Result; @@ -65,146 +51,96 @@ export interface PeripheryPaymentsInterface extends utils.Interface { functionFragment: "unwrapWETH9", data: BytesLike ): Result; - - events: {}; } export interface PeripheryPayments extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): PeripheryPayments; + waitForDeployment(): Promise; interface: PeripheryPaymentsInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - WETH9(overrides?: CallOverrides): Promise<[string]>; - - factory(overrides?: CallOverrides): Promise<[string]>; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - refundETH(overrides?: CallOverrides): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + ): 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; + + WETH9: TypedContractMethod<[], [string], "view">; + + factory: TypedContractMethod<[], [string], "view">; + + refundETH: TypedContractMethod<[], [void], "payable">; + + sweepToken: TypedContractMethod< + [token: AddressLike, amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + + unwrapWETH9: TypedContractMethod< + [amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - filters: {}; + getFunction( + nameOrSignature: "WETH9" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "refundETH" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "sweepToken" + ): TypedContractMethod< + [token: AddressLike, amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + getFunction( + nameOrSignature: "unwrapWETH9" + ): TypedContractMethod< + [amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; - estimateGas: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PoolInitializer.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PoolInitializer.ts index 0cac624e..9f6bb730 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PoolInitializer.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/PoolInitializer.ts @@ -3,49 +3,33 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface PoolInitializerInterface extends utils.Interface { - functions: { - "WETH9()": FunctionFragment; - "createAndInitializePoolIfNecessary(address,address,uint24,uint160)": FunctionFragment; - "factory()": FunctionFragment; - }; - +export interface PoolInitializerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "WETH9" - | "createAndInitializePoolIfNecessary" - | "factory" + nameOrSignature: "WETH9" | "createAndInitializePoolIfNecessary" | "factory" ): FunctionFragment; encodeFunctionData(functionFragment: "WETH9", values?: undefined): string; encodeFunctionData( functionFragment: "createAndInitializePoolIfNecessary", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData(functionFragment: "factory", values?: undefined): string; @@ -55,103 +39,88 @@ export interface PoolInitializerInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; - - events: {}; } export interface PoolInitializer extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): PoolInitializer; + waitForDeployment(): Promise; interface: PoolInitializerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - WETH9(overrides?: CallOverrides): Promise<[string]>; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise<[string]>; - }; - - WETH9(overrides?: CallOverrides): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - callStatic: { - WETH9(overrides?: CallOverrides): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + WETH9: TypedContractMethod<[], [string], "view">; + + createAndInitializePoolIfNecessary: TypedContractMethod< + [ + token0: AddressLike, + token1: AddressLike, + fee: BigNumberish, + sqrtPriceX96: BigNumberish + ], + [string], + "payable" + >; + + factory: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - factory(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "WETH9" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "createAndInitializePoolIfNecessary" + ): TypedContractMethod< + [ + token0: AddressLike, + token1: AddressLike, + fee: BigNumberish, + sqrtPriceX96: BigNumberish + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - WETH9(overrides?: CallOverrides): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - WETH9(overrides?: CallOverrides): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/SelfPermit.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/SelfPermit.ts index 9b366f9c..578bfb0d 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/SelfPermit.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/base/SelfPermit.ts @@ -3,36 +3,27 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface SelfPermitInterface extends utils.Interface { - functions: { - "selfPermit(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "selfPermitAllowed(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "selfPermitAllowedIfNecessary(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "selfPermitIfNecessary(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - }; - +export interface SelfPermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "selfPermit" | "selfPermitAllowed" | "selfPermitAllowedIfNecessary" @@ -42,45 +33,45 @@ export interface SelfPermitInterface extends utils.Interface { encodeFunctionData( functionFragment: "selfPermit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "selfPermitAllowed", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "selfPermitAllowedIfNecessary", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "selfPermitIfNecessary", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; @@ -97,243 +88,163 @@ export interface SelfPermitInterface extends utils.Interface { functionFragment: "selfPermitIfNecessary", data: BytesLike ): Result; - - events: {}; } export interface SelfPermit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): SelfPermit; + waitForDeployment(): Promise; interface: SelfPermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + selfPermit: TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + selfPermitAllowed: TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + selfPermitAllowedIfNecessary: TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + selfPermitIfNecessary: TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "selfPermit" + ): TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "selfPermitAllowed" + ): TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "selfPermitAllowedIfNecessary" + ): TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "selfPermitIfNecessary" + ): TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; filters: {}; - - estimateGas: { - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IERC721Permit.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IERC721Permit.ts index 7998e9ec..d4c17b74 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IERC721Permit.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IERC721Permit.ts @@ -3,50 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IERC721PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "getApproved(uint256)": FunctionFragment; - "isApprovedForAll(address,address)": FunctionFragment; - "ownerOf(uint256)": FunctionFragment; - "permit(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "safeTransferFrom(address,address,uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256,bytes)": FunctionFragment; - "setApprovalForAll(address,bool)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IERC721PermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "approve" @@ -62,6 +41,10 @@ export interface IERC721PermitInterface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -72,67 +55,54 @@ export interface IERC721PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getApproved", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "isApprovedForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "ownerOf", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "setApprovalForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "supportsInterface", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -175,490 +145,317 @@ export interface IERC721PermitInterface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "ApprovalForAll(address,address,bool)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - approved: string; - tokenId: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + approved: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject { + owner: string; + approved: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface ApprovalForAllEventObject { - owner: string; - operator: string; - approved: boolean; +export namespace ApprovalForAllEvent { + export type InputTuple = [ + owner: AddressLike, + operator: AddressLike, + approved: boolean + ]; + export type OutputTuple = [ + owner: string, + operator: string, + approved: boolean + ]; + export interface OutputObject { + owner: string; + operator: string; + approved: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalForAllEvent = TypedEvent< - [string, string, boolean], - ApprovalForAllEventObject ->; - -export type ApprovalForAllEventFilter = TypedEventFilter; -export interface TransferEventObject { - from: string; - to: string; - tokenId: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject { + from: string; + to: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IERC721Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC721Permit; + waitForDeployment(): Promise; interface: IERC721PermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { balance: BigNumber }>; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { operator: string }>; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { owner: string }>; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + getApproved: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + + ownerOf: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + permit: TypedContractMethod< + [ + spender: AddressLike, + tokenId: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + "safeTransferFrom(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, _approved: boolean], + [void], + "nonpayable" + >; + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getApproved" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "isApprovedForAll" + ): TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "ownerOf" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + spender: AddressLike, + tokenId: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256)" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256,bytes)" + ): TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setApprovalForAll" + ): TypedContractMethod< + [operator: AddressLike, _approved: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "ApprovalForAll" + ): TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - - "ApprovalForAll(address,address,bool)"( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - ApprovalForAll( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "ApprovalForAll(address,address,bool)": TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + ApprovalForAll: TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IMulticall.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IMulticall.ts index d9e189c4..49d08100 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IMulticall.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IMulticall.ts @@ -3,100 +3,85 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IMulticallInterface extends utils.Interface { - functions: { - "multicall(bytes[])": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "multicall"): FunctionFragment; +export interface IMulticallInterface extends Interface { + getFunction(nameOrSignature: "multicall"): FunctionFragment; encodeFunctionData( functionFragment: "multicall", - values: [PromiseOrValue[]] + values: [BytesLike[]] ): string; decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; - - events: {}; } export interface IMulticall extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IMulticall; + waitForDeployment(): Promise; interface: IMulticallInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - multicall( - data: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - }; + multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + getFunction( + nameOrSignature: "multicall" + ): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; - populateTransaction: { - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.ts index 2b04b80b..2f17bf04 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.ts @@ -3,176 +3,137 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; export declare namespace INonfungiblePositionManager { export type CollectParamsStruct = { - tokenId: PromiseOrValue; - recipient: PromiseOrValue; - amount0Max: PromiseOrValue; - amount1Max: PromiseOrValue; + tokenId: BigNumberish; + recipient: AddressLike; + amount0Max: BigNumberish; + amount1Max: BigNumberish; }; export type CollectParamsStructOutput = [ - BigNumber, - string, - BigNumber, - BigNumber + tokenId: bigint, + recipient: string, + amount0Max: bigint, + amount1Max: bigint ] & { - tokenId: BigNumber; + tokenId: bigint; recipient: string; - amount0Max: BigNumber; - amount1Max: BigNumber; + amount0Max: bigint; + amount1Max: bigint; }; export type DecreaseLiquidityParamsStruct = { - tokenId: PromiseOrValue; - liquidity: PromiseOrValue; - amount0Min: PromiseOrValue; - amount1Min: PromiseOrValue; - deadline: PromiseOrValue; + tokenId: BigNumberish; + liquidity: BigNumberish; + amount0Min: BigNumberish; + amount1Min: BigNumberish; + deadline: BigNumberish; }; export type DecreaseLiquidityParamsStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber + tokenId: bigint, + liquidity: bigint, + amount0Min: bigint, + amount1Min: bigint, + deadline: bigint ] & { - tokenId: BigNumber; - liquidity: BigNumber; - amount0Min: BigNumber; - amount1Min: BigNumber; - deadline: BigNumber; + tokenId: bigint; + liquidity: bigint; + amount0Min: bigint; + amount1Min: bigint; + deadline: bigint; }; export type IncreaseLiquidityParamsStruct = { - tokenId: PromiseOrValue; - amount0Desired: PromiseOrValue; - amount1Desired: PromiseOrValue; - amount0Min: PromiseOrValue; - amount1Min: PromiseOrValue; - deadline: PromiseOrValue; + tokenId: BigNumberish; + amount0Desired: BigNumberish; + amount1Desired: BigNumberish; + amount0Min: BigNumberish; + amount1Min: BigNumberish; + deadline: BigNumberish; }; export type IncreaseLiquidityParamsStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber + tokenId: bigint, + amount0Desired: bigint, + amount1Desired: bigint, + amount0Min: bigint, + amount1Min: bigint, + deadline: bigint ] & { - tokenId: BigNumber; - amount0Desired: BigNumber; - amount1Desired: BigNumber; - amount0Min: BigNumber; - amount1Min: BigNumber; - deadline: BigNumber; + tokenId: bigint; + amount0Desired: bigint; + amount1Desired: bigint; + amount0Min: bigint; + amount1Min: bigint; + deadline: bigint; }; export type MintParamsStruct = { - token0: PromiseOrValue; - token1: PromiseOrValue; - fee: PromiseOrValue; - tickLower: PromiseOrValue; - tickUpper: PromiseOrValue; - amount0Desired: PromiseOrValue; - amount1Desired: PromiseOrValue; - amount0Min: PromiseOrValue; - amount1Min: PromiseOrValue; - recipient: PromiseOrValue; - deadline: PromiseOrValue; + token0: AddressLike; + token1: AddressLike; + fee: BigNumberish; + tickLower: BigNumberish; + tickUpper: BigNumberish; + amount0Desired: BigNumberish; + amount1Desired: BigNumberish; + amount0Min: BigNumberish; + amount1Min: BigNumberish; + recipient: AddressLike; + deadline: BigNumberish; }; export type MintParamsStructOutput = [ - string, - string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - string, - BigNumber + token0: string, + token1: string, + fee: bigint, + tickLower: bigint, + tickUpper: bigint, + amount0Desired: bigint, + amount1Desired: bigint, + amount0Min: bigint, + amount1Min: bigint, + recipient: string, + deadline: bigint ] & { token0: string; token1: string; - fee: number; - tickLower: number; - tickUpper: number; - amount0Desired: BigNumber; - amount1Desired: BigNumber; - amount0Min: BigNumber; - amount1Min: BigNumber; + fee: bigint; + tickLower: bigint; + tickUpper: bigint; + amount0Desired: bigint; + amount1Desired: bigint; + amount0Min: bigint; + amount1Min: bigint; recipient: string; - deadline: BigNumber; + deadline: bigint; }; } -export interface INonfungiblePositionManagerInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "WETH9()": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(uint256)": FunctionFragment; - "collect((uint256,address,uint128,uint128))": FunctionFragment; - "createAndInitializePoolIfNecessary(address,address,uint24,uint160)": FunctionFragment; - "decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))": FunctionFragment; - "factory()": FunctionFragment; - "getApproved(uint256)": FunctionFragment; - "increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))": FunctionFragment; - "isApprovedForAll(address,address)": FunctionFragment; - "mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))": FunctionFragment; - "name()": FunctionFragment; - "ownerOf(uint256)": FunctionFragment; - "permit(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "positions(uint256)": FunctionFragment; - "refundETH()": FunctionFragment; - "safeTransferFrom(address,address,uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256,bytes)": FunctionFragment; - "setApprovalForAll(address,bool)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "sweepToken(address,uint256,address)": FunctionFragment; - "symbol()": FunctionFragment; - "tokenByIndex(uint256)": FunctionFragment; - "tokenOfOwnerByIndex(address,uint256)": FunctionFragment; - "tokenURI(uint256)": FunctionFragment; - "totalSupply()": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "unwrapWETH9(uint256,address)": FunctionFragment; - }; - +export interface INonfungiblePositionManagerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "WETH9" @@ -206,6 +167,16 @@ export interface INonfungiblePositionManagerInterface extends utils.Interface { | "unwrapWETH9" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "ApprovalForAll" + | "Collect" + | "DecreaseLiquidity" + | "IncreaseLiquidity" + | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -217,28 +188,20 @@ export interface INonfungiblePositionManagerInterface extends utils.Interface { encodeFunctionData(functionFragment: "WETH9", values?: undefined): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue] + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; encodeFunctionData( functionFragment: "collect", values: [INonfungiblePositionManager.CollectParamsStruct] ): string; encodeFunctionData( functionFragment: "createAndInitializePoolIfNecessary", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "decreaseLiquidity", @@ -247,7 +210,7 @@ export interface INonfungiblePositionManagerInterface extends utils.Interface { encodeFunctionData(functionFragment: "factory", values?: undefined): string; encodeFunctionData( functionFragment: "getApproved", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseLiquidity", @@ -255,7 +218,7 @@ export interface INonfungiblePositionManagerInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "isApprovedForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "mint", @@ -264,69 +227,56 @@ export interface INonfungiblePositionManagerInterface extends utils.Interface { encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "ownerOf", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "positions", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "refundETH", values?: undefined): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "setApprovalForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "supportsInterface", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData( functionFragment: "sweepToken", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( functionFragment: "tokenByIndex", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "tokenOfOwnerByIndex", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "tokenURI", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "totalSupply", @@ -334,15 +284,11 @@ export interface INonfungiblePositionManagerInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "unwrapWETH9", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, AddressLike] ): string; decodeFunctionResult( @@ -424,1080 +370,700 @@ export interface INonfungiblePositionManagerInterface extends utils.Interface { functionFragment: "unwrapWETH9", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "ApprovalForAll(address,address,bool)": EventFragment; - "Collect(uint256,address,uint256,uint256)": EventFragment; - "DecreaseLiquidity(uint256,uint128,uint256,uint256)": EventFragment; - "IncreaseLiquidity(uint256,uint128,uint256,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Collect"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DecreaseLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IncreaseLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - approved: string; - tokenId: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + approved: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject { + owner: string; + approved: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; -export interface ApprovalForAllEventObject { - owner: string; - operator: string; - approved: boolean; +export namespace ApprovalForAllEvent { + export type InputTuple = [ + owner: AddressLike, + operator: AddressLike, + approved: boolean + ]; + export type OutputTuple = [ + owner: string, + operator: string, + approved: boolean + ]; + export interface OutputObject { + owner: string; + operator: string; + approved: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalForAllEvent = TypedEvent< - [string, string, boolean], - ApprovalForAllEventObject ->; - -export type ApprovalForAllEventFilter = TypedEventFilter; - -export interface CollectEventObject { - tokenId: BigNumber; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; -} -export type CollectEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber], - CollectEventObject ->; - -export type CollectEventFilter = TypedEventFilter; - -export interface DecreaseLiquidityEventObject { - tokenId: BigNumber; - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; + +export namespace CollectEvent { + export type InputTuple = [ + tokenId: BigNumberish, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + tokenId: bigint, + recipient: string, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + tokenId: bigint; + recipient: string; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DecreaseLiquidityEvent = TypedEvent< - [BigNumber, BigNumber, BigNumber, BigNumber], - DecreaseLiquidityEventObject ->; - -export type DecreaseLiquidityEventFilter = - TypedEventFilter; - -export interface IncreaseLiquidityEventObject { - tokenId: BigNumber; - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; + +export namespace DecreaseLiquidityEvent { + export type InputTuple = [ + tokenId: BigNumberish, + liquidity: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + tokenId: bigint, + liquidity: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + tokenId: bigint; + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type IncreaseLiquidityEvent = TypedEvent< - [BigNumber, BigNumber, BigNumber, BigNumber], - IncreaseLiquidityEventObject ->; - -export type IncreaseLiquidityEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - tokenId: BigNumber; + +export namespace IncreaseLiquidityEvent { + export type InputTuple = [ + tokenId: BigNumberish, + liquidity: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + tokenId: bigint, + liquidity: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + tokenId: bigint; + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject { + from: string; + to: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface INonfungiblePositionManager extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): INonfungiblePositionManager; + waitForDeployment(): Promise; interface: INonfungiblePositionManagerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - WETH9(overrides?: CallOverrides): Promise<[string]>; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { balance: BigNumber }>; - - burn( - tokenId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise<[string]>; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { operator: string }>; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { owner: string }>; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - positions( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + WETH9: TypedContractMethod<[], [string], "view">; + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + burn: TypedContractMethod<[tokenId: BigNumberish], [void], "payable">; + + collect: TypedContractMethod< + [params: INonfungiblePositionManager.CollectParamsStruct], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "payable" + >; + + createAndInitializePoolIfNecessary: TypedContractMethod< + [ + token0: AddressLike, + token1: AddressLike, + fee: BigNumberish, + sqrtPriceX96: BigNumberish + ], + [string], + "payable" + >; + + decreaseLiquidity: TypedContractMethod< + [params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "payable" + >; + + factory: TypedContractMethod<[], [string], "view">; + + getApproved: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + increaseLiquidity: TypedContractMethod< + [params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct], + [ + [bigint, bigint, bigint] & { + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + ], + "payable" + >; + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + + mint: TypedContractMethod< + [params: INonfungiblePositionManager.MintParamsStruct], + [ + [bigint, bigint, bigint, bigint] & { + tokenId: bigint; + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + ], + "payable" + >; + + name: TypedContractMethod<[], [string], "view">; + + ownerOf: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + permit: TypedContractMethod< + [ + spender: AddressLike, + tokenId: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + positions: TypedContractMethod< + [tokenId: BigNumberish], + [ [ - BigNumber, + bigint, string, string, string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber + bigint, + bigint, + bigint, + bigint, + bigint, + bigint, + bigint, + bigint ] & { - nonce: BigNumber; + nonce: bigint; operator: string; token0: string; token1: string; - fee: number; - tickLower: number; - tickUpper: number; - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; + fee: bigint; + tickLower: bigint; + tickUpper: bigint; + liquidity: bigint; + feeGrowthInside0LastX128: bigint; + feeGrowthInside1LastX128: bigint; + tokensOwed0: bigint; + tokensOwed1: bigint; } - >; + ], + "view" + >; - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { tokenId: BigNumber }>; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + refundETH: TypedContractMethod<[], [void], "payable">; + + "safeTransferFrom(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - WETH9(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - tokenId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - positions( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< + "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< [ - BigNumber, - string, - string, - string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ] & { - nonce: BigNumber; - operator: string; - token0: string; - token1: string; - fee: number; - tickLower: number; - tickUpper: number; - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; - } + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" >; - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - WETH9(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, _approved: boolean], + [void], + "nonpayable" + >; - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; - factory(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; - } - >; + sweepToken: TypedContractMethod< + [token: AddressLike, amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber] & { - tokenId: BigNumber; - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; - } - >; + symbol: TypedContractMethod<[], [string], "view">; + + tokenByIndex: TypedContractMethod<[index: BigNumberish], [bigint], "view">; + + tokenOfOwnerByIndex: TypedContractMethod< + [owner: AddressLike, index: BigNumberish], + [bigint], + "view" + >; - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - positions( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< + tokenURI: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + unwrapWETH9: TypedContractMethod< + [amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "WETH9" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod<[tokenId: BigNumberish], [void], "payable">; + getFunction( + nameOrSignature: "collect" + ): TypedContractMethod< + [params: INonfungiblePositionManager.CollectParamsStruct], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "payable" + >; + getFunction( + nameOrSignature: "createAndInitializePoolIfNecessary" + ): TypedContractMethod< + [ + token0: AddressLike, + token1: AddressLike, + fee: BigNumberish, + sqrtPriceX96: BigNumberish + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "decreaseLiquidity" + ): TypedContractMethod< + [params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "payable" + >; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getApproved" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "increaseLiquidity" + ): TypedContractMethod< + [params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct], + [ + [bigint, bigint, bigint] & { + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + ], + "payable" + >; + getFunction( + nameOrSignature: "isApprovedForAll" + ): TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [params: INonfungiblePositionManager.MintParamsStruct], + [ + [bigint, bigint, bigint, bigint] & { + tokenId: bigint; + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + ], + "payable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "ownerOf" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + spender: AddressLike, + tokenId: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "positions" + ): TypedContractMethod< + [tokenId: BigNumberish], + [ [ - BigNumber, + bigint, string, string, string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber + bigint, + bigint, + bigint, + bigint, + bigint, + bigint, + bigint, + bigint ] & { - nonce: BigNumber; + nonce: bigint; operator: string; token0: string; token1: string; - fee: number; - tickLower: number; - tickUpper: number; - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; + fee: bigint; + tickLower: bigint; + tickUpper: bigint; + liquidity: bigint; + feeGrowthInside0LastX128: bigint; + feeGrowthInside1LastX128: bigint; + tokensOwed0: bigint; + tokensOwed1: bigint; } - >; + ], + "view" + >; + getFunction( + nameOrSignature: "refundETH" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256)" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256,bytes)" + ): TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setApprovalForAll" + ): TypedContractMethod< + [operator: AddressLike, _approved: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "sweepToken" + ): TypedContractMethod< + [token: AddressLike, amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "tokenByIndex" + ): TypedContractMethod<[index: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "tokenOfOwnerByIndex" + ): TypedContractMethod< + [owner: AddressLike, index: BigNumberish], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "tokenURI" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "unwrapWETH9" + ): TypedContractMethod< + [amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; - refundETH(overrides?: CallOverrides): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "ApprovalForAll" + ): TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + getEvent( + key: "Collect" + ): TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + getEvent( + key: "DecreaseLiquidity" + ): TypedContractEvent< + DecreaseLiquidityEvent.InputTuple, + DecreaseLiquidityEvent.OutputTuple, + DecreaseLiquidityEvent.OutputObject + >; + getEvent( + key: "IncreaseLiquidity" + ): TypedContractEvent< + IncreaseLiquidityEvent.InputTuple, + IncreaseLiquidityEvent.OutputTuple, + IncreaseLiquidityEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - - "ApprovalForAll(address,address,bool)"( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - ApprovalForAll( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - - "Collect(uint256,address,uint256,uint256)"( - tokenId?: PromiseOrValue | null, - recipient?: null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - Collect( - tokenId?: PromiseOrValue | null, - recipient?: null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - - "DecreaseLiquidity(uint256,uint128,uint256,uint256)"( - tokenId?: PromiseOrValue | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): DecreaseLiquidityEventFilter; - DecreaseLiquidity( - tokenId?: PromiseOrValue | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): DecreaseLiquidityEventFilter; - - "IncreaseLiquidity(uint256,uint128,uint256,uint256)"( - tokenId?: PromiseOrValue | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): IncreaseLiquidityEventFilter; - IncreaseLiquidity( - tokenId?: PromiseOrValue | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): IncreaseLiquidityEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - }; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - WETH9(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - tokenId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - positions( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + "ApprovalForAll(address,address,bool)": TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + ApprovalForAll: TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + + "Collect(uint256,address,uint256,uint256)": TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + Collect: TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + + "DecreaseLiquidity(uint256,uint128,uint256,uint256)": TypedContractEvent< + DecreaseLiquidityEvent.InputTuple, + DecreaseLiquidityEvent.OutputTuple, + DecreaseLiquidityEvent.OutputObject + >; + DecreaseLiquidity: TypedContractEvent< + DecreaseLiquidityEvent.InputTuple, + DecreaseLiquidityEvent.OutputTuple, + DecreaseLiquidityEvent.OutputObject + >; - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - WETH9(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - tokenId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - positions( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - _approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + "IncreaseLiquidity(uint256,uint128,uint256,uint256)": TypedContractEvent< + IncreaseLiquidityEvent.InputTuple, + IncreaseLiquidityEvent.OutputTuple, + IncreaseLiquidityEvent.OutputObject + >; + IncreaseLiquidity: TypedContractEvent< + IncreaseLiquidityEvent.InputTuple, + IncreaseLiquidityEvent.OutputTuple, + IncreaseLiquidityEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.ts index 59bf865d..19c6ee74 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.ts @@ -3,92 +3,89 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, + TypedContractMethod, } from "../../../../common"; -export interface IPeripheryImmutableStateInterface extends utils.Interface { - functions: { - "WETH9()": FunctionFragment; - "factory()": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "WETH9" | "factory"): FunctionFragment; +export interface IPeripheryImmutableStateInterface extends Interface { + getFunction(nameOrSignature: "WETH9" | "factory"): FunctionFragment; encodeFunctionData(functionFragment: "WETH9", values?: undefined): string; encodeFunctionData(functionFragment: "factory", values?: undefined): string; decodeFunctionResult(functionFragment: "WETH9", data: BytesLike): Result; decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; - - events: {}; } export interface IPeripheryImmutableState extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IPeripheryImmutableState; + waitForDeployment(): Promise; interface: IPeripheryImmutableStateInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - WETH9(overrides?: CallOverrides): Promise<[string]>; - - factory(overrides?: CallOverrides): Promise<[string]>; - }; - - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - callStatic: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - }; + ): 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; + + WETH9: TypedContractMethod<[], [string], "view">; + + factory: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "WETH9" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - WETH9(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments.ts index 36a175ec..b98f2da0 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments.ts @@ -3,49 +3,37 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IPeripheryPaymentsInterface extends utils.Interface { - functions: { - "refundETH()": FunctionFragment; - "sweepToken(address,uint256,address)": FunctionFragment; - "unwrapWETH9(uint256,address)": FunctionFragment; - }; - +export interface IPeripheryPaymentsInterface extends Interface { getFunction( - nameOrSignatureOrTopic: "refundETH" | "sweepToken" | "unwrapWETH9" + nameOrSignature: "refundETH" | "sweepToken" | "unwrapWETH9" ): FunctionFragment; encodeFunctionData(functionFragment: "refundETH", values?: undefined): string; encodeFunctionData( functionFragment: "sweepToken", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "unwrapWETH9", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, AddressLike] ): string; decodeFunctionResult(functionFragment: "refundETH", data: BytesLike): Result; @@ -54,126 +42,86 @@ export interface IPeripheryPaymentsInterface extends utils.Interface { functionFragment: "unwrapWETH9", data: BytesLike ): Result; - - events: {}; } export interface IPeripheryPayments extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IPeripheryPayments; + waitForDeployment(): Promise; interface: IPeripheryPaymentsInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - refundETH(overrides?: CallOverrides): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + refundETH: TypedContractMethod<[], [void], "payable">; + + sweepToken: TypedContractMethod< + [token: AddressLike, amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + + unwrapWETH9: TypedContractMethod< + [amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "refundETH" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "sweepToken" + ): TypedContractMethod< + [token: AddressLike, amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + getFunction( + nameOrSignature: "unwrapWETH9" + ): TypedContractMethod< + [amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; filters: {}; - - estimateGas: { - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.ts index 01334420..6a335a38 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.ts @@ -3,126 +3,110 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IPoolInitializerInterface extends utils.Interface { - functions: { - "createAndInitializePoolIfNecessary(address,address,uint24,uint160)": FunctionFragment; - }; - +export interface IPoolInitializerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: "createAndInitializePoolIfNecessary" + nameOrSignature: "createAndInitializePoolIfNecessary" ): FunctionFragment; encodeFunctionData( functionFragment: "createAndInitializePoolIfNecessary", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish] ): string; decodeFunctionResult( functionFragment: "createAndInitializePoolIfNecessary", data: BytesLike ): Result; - - events: {}; } export interface IPoolInitializer extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IPoolInitializer; + waitForDeployment(): Promise; interface: IPoolInitializerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + createAndInitializePoolIfNecessary: TypedContractMethod< + [ + token0: AddressLike, + token1: AddressLike, + fee: BigNumberish, + sqrtPriceX96: BigNumberish + ], + [string], + "payable" + >; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + getFunction( + nameOrSignature: "createAndInitializePoolIfNecessary" + ): TypedContractMethod< + [ + token0: AddressLike, + token1: AddressLike, + fee: BigNumberish, + sqrtPriceX96: BigNumberish + ], + [string], + "payable" + >; - populateTransaction: { - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/ISelfPermit.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/ISelfPermit.ts index deb68987..f4758c1b 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/ISelfPermit.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/ISelfPermit.ts @@ -3,36 +3,27 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface ISelfPermitInterface extends utils.Interface { - functions: { - "selfPermit(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "selfPermitAllowed(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "selfPermitAllowedIfNecessary(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "selfPermitIfNecessary(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - }; - +export interface ISelfPermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "selfPermit" | "selfPermitAllowed" | "selfPermitAllowedIfNecessary" @@ -42,45 +33,45 @@ export interface ISelfPermitInterface extends utils.Interface { encodeFunctionData( functionFragment: "selfPermit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "selfPermitAllowed", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "selfPermitAllowedIfNecessary", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "selfPermitIfNecessary", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; @@ -97,243 +88,163 @@ export interface ISelfPermitInterface extends utils.Interface { functionFragment: "selfPermitIfNecessary", data: BytesLike ): Result; - - events: {}; } export interface ISelfPermit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): ISelfPermit; + waitForDeployment(): Promise; interface: ISelfPermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + selfPermit: TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + selfPermitAllowed: TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + selfPermitAllowedIfNecessary: TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + selfPermitIfNecessary: TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "selfPermit" + ): TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "selfPermitAllowed" + ): TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "selfPermitAllowedIfNecessary" + ): TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "selfPermitIfNecessary" + ): TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; filters: {}; - - estimateGas: { - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IERC1271.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IERC1271.ts index fd669679..1405adc4 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IERC1271.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IERC1271.ts @@ -3,106 +3,96 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IERC1271Interface extends utils.Interface { - functions: { - "isValidSignature(bytes32,bytes)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "isValidSignature"): FunctionFragment; +export interface IERC1271Interface extends Interface { + getFunction(nameOrSignature: "isValidSignature"): FunctionFragment; encodeFunctionData( functionFragment: "isValidSignature", - values: [PromiseOrValue, PromiseOrValue] + values: [BytesLike, BytesLike] ): string; decodeFunctionResult( functionFragment: "isValidSignature", data: BytesLike ): Result; - - events: {}; } export interface IERC1271 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC1271; + waitForDeployment(): Promise; interface: IERC1271Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - isValidSignature( - hash: PromiseOrValue, - signature: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string] & { magicValue: string }>; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - isValidSignature( - hash: PromiseOrValue, - signature: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - isValidSignature( - hash: PromiseOrValue, - signature: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + isValidSignature: TypedContractMethod< + [hash: BytesLike, signature: BytesLike], + [string], + "view" + >; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - isValidSignature( - hash: PromiseOrValue, - signature: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "isValidSignature" + ): TypedContractMethod< + [hash: BytesLike, signature: BytesLike], + [string], + "view" + >; - populateTransaction: { - isValidSignature( - hash: PromiseOrValue, - signature: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IERC20PermitAllowed.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IERC20PermitAllowed.ts index a0d979c0..70283636 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IERC20PermitAllowed.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IERC20PermitAllowed.ts @@ -3,145 +3,122 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IERC20PermitAllowedInterface extends utils.Interface { - functions: { - "permit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "permit"): FunctionFragment; +export interface IERC20PermitAllowedInterface extends Interface { + getFunction(nameOrSignature: "permit"): FunctionFragment; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike ] ): string; decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - - events: {}; } export interface IERC20PermitAllowed extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IERC20PermitAllowed; + waitForDeployment(): Promise; interface: IERC20PermitAllowedInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; + ): Promise>>; - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - functions: { - permit( - holder: PromiseOrValue, - spender: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - allowed: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - permit( - holder: PromiseOrValue, - spender: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - allowed: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - callStatic: { - permit( - holder: PromiseOrValue, - spender: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - allowed: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + permit: TypedContractMethod< + [ + holder: AddressLike, + spender: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + allowed: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; - filters: {}; + getFunction( + key: string | FunctionFragment + ): T; - estimateGas: { - permit( - holder: PromiseOrValue, - spender: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - allowed: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + holder: AddressLike, + spender: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + allowed: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; - populateTransaction: { - permit( - holder: PromiseOrValue, - spender: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - allowed: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + filters: {}; } diff --git a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IWETH9.ts b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IWETH9.ts index e3f13e10..43adc6ac 100644 --- a/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IWETH9.ts +++ b/packages/flash-swap/src/types/@uniswap/v3-periphery/contracts/interfaces/external/IWETH9.ts @@ -3,45 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IWETH9Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "deposit()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "withdraw(uint256)": FunctionFragment; - }; - +export interface IWETH9Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -52,17 +36,19 @@ export interface IWETH9Interface extends utils.Interface { | "withdraw" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "deposit", values?: undefined): string; encodeFunctionData( @@ -71,19 +57,15 @@ export interface IWETH9Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "withdraw", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -100,298 +82,200 @@ export interface IWETH9Interface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IWETH9 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IWETH9; + waitForDeployment(): Promise; interface: IWETH9Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - deposit( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - deposit( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - deposit(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + deposit: TypedContractMethod<[], [void], "payable">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + withdraw: TypedContractMethod<[arg0: BigNumberish], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; - withdraw( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "deposit" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "withdraw" + ): TypedContractMethod<[arg0: BigNumberish], [void], "nonpayable">; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - deposit( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - deposit( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/common.ts b/packages/flash-swap/src/types/common.ts index 4c90b08b..56b5f21e 100644 --- a/packages/flash-swap/src/types/common.ts +++ b/packages/flash-swap/src/types/common.ts @@ -1,33 +1,66 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import type { Listener } from "@ethersproject/providers"; -import type { Event, EventFilter } from "ethers"; - -export interface TypedEvent< - TArgsArray extends Array = any, - TArgsObject = any -> extends Event { - args: TArgsArray & TArgsObject; -} +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from "ethers"; -export interface TypedEventFilter<_TEvent extends TypedEvent> - extends EventFilter {} +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> + extends DeferredTopicFilter {} -export interface TypedListener { - (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any +> { + (...args: Partial): TypedDeferredTopicFilter< + TypedContractEvent + >; + name: string; + fragment: EventFragment; + getFragment(...args: Partial): EventFragment; } -type __TypechainArgsArray = T extends TypedEvent ? U : never; +type __TypechainAOutputTuple = T extends TypedContractEvent< + infer _U, + infer W +> + ? W + : never; +type __TypechainOutputObject = T extends TypedContractEvent< + infer _U, + infer _W, + infer V +> + ? V + : never; -export interface OnEvent { - ( - eventFilter: TypedEventFilter, - listener: TypedListener - ): TRes; - (eventName: string, listener: Listener): TRes; +export interface TypedEventLog + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; } +export interface TypedLogDescription + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export type TypedListener = ( + ...listenerArg: [ + ...__TypechainAOutputTuple, + TypedEventLog, + ...undefined[] + ] +) => void; + export type MinEthersFactory = { deploy(...a: ARGS[]): Promise; }; @@ -38,9 +71,61 @@ export type GetContractTypeFromFactory = F extends MinEthersFactory< > ? C : never; - export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; -export type PromiseOrValue = T | Promise; +export type StateMutability = "nonpayable" | "payable" | "view"; + +export type BaseOverrides = Omit; +export type NonPayableOverrides = Omit< + BaseOverrides, + "value" | "blockTag" | "enableCcipRead" +>; +export type PayableOverrides = Omit< + BaseOverrides, + "blockTag" | "enableCcipRead" +>; +export type ViewOverrides = Omit; +export type Overrides = S extends "nonpayable" + ? NonPayableOverrides + : S extends "payable" + ? PayableOverrides + : ViewOverrides; + +export type PostfixOverrides, S extends StateMutability> = + | A + | [...A, Overrides]; +export type ContractMethodArgs< + A extends Array, + S extends StateMutability +> = PostfixOverrides<{ [I in keyof A]-?: A[I] | Typed }, S>; + +export type DefaultReturnType = R extends Array ? R[0] : R; + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod< + A extends Array = Array, + R = any, + S extends StateMutability = "payable" +> { + (...args: ContractMethodArgs): S extends "view" + ? Promise> + : Promise; + + name: string; + + fragment: FunctionFragment; + + getFragment(...args: ContractMethodArgs): FunctionFragment; + + populateTransaction( + ...args: ContractMethodArgs + ): Promise; + staticCall( + ...args: ContractMethodArgs + ): Promise>; + send(...args: ContractMethodArgs): Promise; + estimateGas(...args: ContractMethodArgs): Promise; + staticCallResult(...args: ContractMethodArgs): Promise; +} diff --git a/packages/flash-swap/src/types/contracts/test/GodModeErc20.ts b/packages/flash-swap/src/types/contracts/test/GodModeErc20.ts index d23af43b..871da39f 100644 --- a/packages/flash-swap/src/types/contracts/test/GodModeErc20.ts +++ b/packages/flash-swap/src/types/contracts/test/GodModeErc20.ts @@ -3,50 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeErc20Interface extends utils.Interface { - functions: { - "__godMode_approve(address,address,uint256)": FunctionFragment; - "__godMode_burn(address,uint256)": FunctionFragment; - "__godMode_mint(address,uint256)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface GodModeErc20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "__godMode_approve" | "__godMode_burn" | "__godMode_mint" @@ -63,42 +42,42 @@ export interface GodModeErc20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "Approval" | "Burn" | "Mint" | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "__godMode_approve", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -108,15 +87,11 @@ export interface GodModeErc20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -154,478 +129,332 @@ export interface GodModeErc20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; - -export type MintEventFilter = TypedEventFilter; -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface GodModeErc20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeErc20; + waitForDeployment(): Promise; interface: GodModeErc20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - __godMode_approve( - holder: PromiseOrValue, - spender: PromiseOrValue, - approveAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + ): 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; + + __godMode_approve: TypedContractMethod< + [holder: AddressLike, spender: AddressLike, approveAmount: BigNumberish], + [void], + "nonpayable" + >; + + __godMode_burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + __godMode_mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - __godMode_approve( - holder: PromiseOrValue, - spender: PromiseOrValue, - approveAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - __godMode_approve( - holder: PromiseOrValue, - spender: PromiseOrValue, - approveAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "__godMode_approve" + ): TypedContractMethod< + [holder: AddressLike, spender: AddressLike, approveAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - __godMode_approve( - holder: PromiseOrValue, - spender: PromiseOrValue, - approveAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - __godMode_approve( - holder: PromiseOrValue, - spender: PromiseOrValue, - approveAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/test/GodModeHToken.ts b/packages/flash-swap/src/types/contracts/test/GodModeHToken.ts index 1409348b..87575f61 100644 --- a/packages/flash-swap/src/types/contracts/test/GodModeHToken.ts +++ b/packages/flash-swap/src/types/contracts/test/GodModeHToken.ts @@ -3,74 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeHTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "__godMode_setMaturity(uint256)": FunctionFragment; - "__godMode_setUnderlying(address)": FunctionFragment; - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setBalanceSheet(address)": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "balanceSheet()": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "depositUnderlying(uint256)": FunctionFragment; - "fintroller()": FunctionFragment; - "getDepositorBalance(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "isMatured()": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "nonces(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "redeem(uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "totalUnderlyingReserve()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - "withdrawUnderlying(uint256)": FunctionFragment; - }; - +export interface GodModeHTokenInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "__godMode_setMaturity" @@ -111,6 +66,21 @@ export interface GodModeHTokenInterface extends utils.Interface { | "withdrawUnderlying" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "DepositUnderlying" + | "Mint" + | "Recover" + | "Redeem" + | "SetBalanceSheet" + | "SetNonRecoverableTokens" + | "Transfer" + | "TransferOwnership" + | "WithdrawUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -121,15 +91,15 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "__godMode_setMaturity", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_setUnderlying", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -137,27 +107,27 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setBalanceSheet", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "balanceSheet", @@ -165,16 +135,16 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -182,43 +152,40 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getDepositorBalance", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "isMatured", values?: undefined): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; encodeFunctionData( functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "redeem", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -231,15 +198,11 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -252,7 +215,7 @@ export interface GodModeHTokenInterface extends utils.Interface { encodeFunctionData(functionFragment: "version", values?: undefined): string; encodeFunctionData( functionFragment: "withdrawUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -350,1108 +313,793 @@ export interface GodModeHTokenInterface extends utils.Interface { functionFragment: "withdrawUnderlying", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "DepositUnderlying(address,uint256,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Recover(address,address,uint256)": EventFragment; - "Redeem(address,uint256,uint256)": EventFragment; - "SetBalanceSheet(address,address,address)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "WithdrawUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DepositUnderlying"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBalanceSheet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawUnderlying"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; -export type BurnEventFilter = TypedEventFilter; - -export interface DepositUnderlyingEventObject { - depositor: string; - depositUnderlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace DepositUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + depositUnderlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + depositUnderlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + depositUnderlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - DepositUnderlyingEventObject ->; - -export type DepositUnderlyingEventFilter = - TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; - -export type MintEventFilter = TypedEventFilter; -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; -export type RecoverEventFilter = TypedEventFilter; - -export interface RedeemEventObject { - account: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace RedeemEvent { + export type InputTuple = [ + account: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + account: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RedeemEvent = TypedEvent< - [string, BigNumber, BigNumber], - RedeemEventObject ->; - -export type RedeemEventFilter = TypedEventFilter; -export interface SetBalanceSheetEventObject { - owner: string; - oldBalanceSheet: string; - newBalanceSheet: string; +export namespace SetBalanceSheetEvent { + export type InputTuple = [ + owner: AddressLike, + oldBalanceSheet: AddressLike, + newBalanceSheet: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldBalanceSheet: string, + newBalanceSheet: string + ]; + export interface OutputObject { + owner: string; + oldBalanceSheet: string; + newBalanceSheet: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetBalanceSheetEvent = TypedEvent< - [string, string, string], - SetBalanceSheetEventObject ->; -export type SetBalanceSheetEventFilter = TypedEventFilter; - -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; -} -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; - -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawUnderlyingEventObject { - depositor: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; + +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - WithdrawUnderlyingEventObject ->; -export type WithdrawUnderlyingEventFilter = - TypedEventFilter; +export namespace WithdrawUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface GodModeHToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeHToken; + waitForDeployment(): Promise; interface: GodModeHTokenInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlying( - newUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amount: BigNumber }>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise<[boolean]>; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlying( - newUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + __godMode_setMaturity: TypedContractMethod< + [newMaturity: BigNumberish], + [void], + "nonpayable" + >; + + __godMode_setUnderlying: TypedContractMethod< + [newUnderlying: AddressLike], + [void], + "nonpayable" + >; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setBalanceSheet: TypedContractMethod< + [newBalanceSheet: AddressLike], + [void], + "nonpayable" + >; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + depositUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + fintroller: TypedContractMethod<[], [string], "view">; + + getDepositorBalance: TypedContractMethod< + [depositor: AddressLike], + [bigint], + "view" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + isMatured: TypedContractMethod<[], [boolean], "view">; + + maturity: TypedContractMethod<[], [bigint], "view">; + + mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonRecoverableTokens: TypedContractMethod< + [arg0: BigNumberish], + [string], + "view" + >; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + totalUnderlyingReserve: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - __godMode_setUnderlying( - newUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlying: TypedContractMethod<[], [string], "view">; - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [string], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + withdrawUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "__godMode_setMaturity" + ): TypedContractMethod<[newMaturity: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "__godMode_setUnderlying" + ): TypedContractMethod<[newUnderlying: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setBalanceSheet" + ): TypedContractMethod<[newBalanceSheet: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getDepositorBalance" + ): TypedContractMethod<[depositor: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "isMatured" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "totalUnderlyingReserve" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "withdrawUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "DepositUnderlying" + ): TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "Redeem" + ): TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + getEvent( + key: "SetBalanceSheet" + ): TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawUnderlying" + ): TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "DepositUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - DepositUnderlying( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "Redeem(address,uint256,uint256)"( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - Redeem( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - - "SetBalanceSheet(address,address,address)"( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - SetBalanceSheet( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - WithdrawUnderlying( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlying( - newUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlying( - newUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve( - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "DepositUnderlying(address,uint256,uint256)": TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + DepositUnderlying: TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "Redeem(address,uint256,uint256)": TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + Redeem: TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + + "SetBalanceSheet(address,address,address)": TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + SetBalanceSheet: TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "WithdrawUnderlying(address,uint256,uint256)": TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; + WithdrawUnderlying: TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/test/SimplePriceFeed.ts b/packages/flash-swap/src/types/contracts/test/SimplePriceFeed.ts index 31e31683..5f77033a 100644 --- a/packages/flash-swap/src/types/contracts/test/SimplePriceFeed.ts +++ b/packages/flash-swap/src/types/contracts/test/SimplePriceFeed.ts @@ -3,38 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface SimplePriceFeedInterface extends utils.Interface { - functions: { - "decimals()": FunctionFragment; - "description()": FunctionFragment; - "getRoundData(uint80)": FunctionFragment; - "latestRoundData()": FunctionFragment; - "setPrice(int256)": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface SimplePriceFeedInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "decimals" | "description" | "getRoundData" @@ -50,7 +38,7 @@ export interface SimplePriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getRoundData", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "latestRoundData", @@ -58,7 +46,7 @@ export interface SimplePriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setPrice", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "version", values?: undefined): string; @@ -77,187 +65,133 @@ export interface SimplePriceFeedInterface extends utils.Interface { ): Result; decodeFunctionResult(functionFragment: "setPrice", data: BytesLike): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: {}; } export interface SimplePriceFeed extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): SimplePriceFeed; + waitForDeployment(): Promise; interface: SimplePriceFeedInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - decimals(overrides?: CallOverrides): Promise<[number]>; - - description(overrides?: CallOverrides): Promise<[string]>; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ): 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; + + decimals: TypedContractMethod<[], [bigint], "view">; + + description: TypedContractMethod<[], [string], "view">; + + getRoundData: TypedContractMethod< + [roundId_: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - setPrice( - newPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + ], + "view" >; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; + } + ], + "view" >; - setPrice( - newPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; + setPrice: TypedContractMethod<[newPrice: BigNumberish], [void], "nonpayable">; - callStatic: { - decimals(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRoundData" + ): TypedContractMethod< + [roundId_: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - setPrice( - newPrice: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "setPrice" + ): TypedContractMethod<[newPrice: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; filters: {}; - - estimateGas: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - setPrice( - newPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - setPrice( - newPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v2/FlashUniswapV2.ts b/packages/flash-swap/src/types/contracts/uniswap-v2/FlashUniswapV2.ts index 97f64de5..85768553 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v2/FlashUniswapV2.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v2/FlashUniswapV2.ts @@ -3,41 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface FlashUniswapV2Interface extends utils.Interface { - functions: { - "balanceSheet()": FunctionFragment; - "getRepayAmount(address,address,uint256)": FunctionFragment; - "uniV2Factory()": FunctionFragment; - "uniV2PairInitCodeHash()": FunctionFragment; - "uniswapV2Call(address,uint256,uint256,bytes)": FunctionFragment; - }; - +export interface FlashUniswapV2Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "balanceSheet" | "getRepayAmount" | "uniV2Factory" @@ -45,17 +33,17 @@ export interface FlashUniswapV2Interface extends utils.Interface { | "uniswapV2Call" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "FlashSwapAndLiquidateBorrow" + ): EventFragment; + encodeFunctionData( functionFragment: "balanceSheet", values?: undefined ): string; encodeFunctionData( functionFragment: "getRepayAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "uniV2Factory", @@ -67,12 +55,7 @@ export interface FlashUniswapV2Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "uniswapV2Call", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; decodeFunctionResult( @@ -95,204 +78,170 @@ export interface FlashUniswapV2Interface extends utils.Interface { functionFragment: "uniswapV2Call", data: BytesLike ): Result; - - events: { - "FlashSwapAndLiquidateBorrow(address,address,address,uint256,uint256,uint256,uint256,uint256)": EventFragment; - }; - - getEvent( - nameOrSignatureOrTopic: "FlashSwapAndLiquidateBorrow" - ): EventFragment; } -export interface FlashSwapAndLiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - underlyingAmount: BigNumber; - seizeAmount: BigNumber; - repayAmount: BigNumber; - subsidyAmount: BigNumber; - profitAmount: BigNumber; +export namespace FlashSwapAndLiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + underlyingAmount: BigNumberish, + seizeAmount: BigNumberish, + repayAmount: BigNumberish, + subsidyAmount: BigNumberish, + profitAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + underlyingAmount: bigint, + seizeAmount: bigint, + repayAmount: bigint, + subsidyAmount: bigint, + profitAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + underlyingAmount: bigint; + seizeAmount: bigint; + repayAmount: bigint; + subsidyAmount: bigint; + profitAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type FlashSwapAndLiquidateBorrowEvent = TypedEvent< - [ - string, - string, - string, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ], - FlashSwapAndLiquidateBorrowEventObject ->; - -export type FlashSwapAndLiquidateBorrowEventFilter = - TypedEventFilter; export interface FlashUniswapV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): FlashUniswapV2; + waitForDeployment(): Promise; interface: FlashUniswapV2Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - getRepayAmount( - pair: PromiseOrValue, - underlying: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { repayAmount: BigNumber }>; - - uniV2Factory(overrides?: CallOverrides): Promise<[string]>; - - uniV2PairInitCodeHash(overrides?: CallOverrides): Promise<[string]>; - - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - balanceSheet(overrides?: CallOverrides): Promise; - - getRepayAmount( - pair: PromiseOrValue, - underlying: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uniV2Factory(overrides?: CallOverrides): Promise; - - uniV2PairInitCodeHash(overrides?: CallOverrides): Promise; - - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - balanceSheet(overrides?: CallOverrides): Promise; - - getRepayAmount( - pair: PromiseOrValue, - underlying: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uniV2Factory(overrides?: CallOverrides): Promise; + ): 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; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + getRepayAmount: TypedContractMethod< + [ + pair: AddressLike, + underlying: AddressLike, + underlyingAmount: BigNumberish + ], + [bigint], + "view" + >; + + uniV2Factory: TypedContractMethod<[], [string], "view">; + + uniV2PairInitCodeHash: TypedContractMethod<[], [string], "view">; + + uniswapV2Call: TypedContractMethod< + [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - uniV2PairInitCodeHash(overrides?: CallOverrides): Promise; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRepayAmount" + ): TypedContractMethod< + [ + pair: AddressLike, + underlying: AddressLike, + underlyingAmount: BigNumberish + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "uniV2Factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "uniV2PairInitCodeHash" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "uniswapV2Call" + ): TypedContractMethod< + [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "FlashSwapAndLiquidateBorrow" + ): TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; filters: { - "FlashSwapAndLiquidateBorrow(address,address,address,uint256,uint256,uint256,uint256,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - underlyingAmount?: null, - seizeAmount?: null, - repayAmount?: null, - subsidyAmount?: null, - profitAmount?: null - ): FlashSwapAndLiquidateBorrowEventFilter; - FlashSwapAndLiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - underlyingAmount?: null, - seizeAmount?: null, - repayAmount?: null, - subsidyAmount?: null, - profitAmount?: null - ): FlashSwapAndLiquidateBorrowEventFilter; - }; - - estimateGas: { - balanceSheet(overrides?: CallOverrides): Promise; - - getRepayAmount( - pair: PromiseOrValue, - underlying: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uniV2Factory(overrides?: CallOverrides): Promise; - - uniV2PairInitCodeHash(overrides?: CallOverrides): Promise; - - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - balanceSheet(overrides?: CallOverrides): Promise; - - getRepayAmount( - pair: PromiseOrValue, - underlying: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uniV2Factory(overrides?: CallOverrides): Promise; - - uniV2PairInitCodeHash( - overrides?: CallOverrides - ): Promise; - - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "FlashSwapAndLiquidateBorrow(address,address,address,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; + FlashSwapAndLiquidateBorrow: TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v2/IFlashUniswapV2.ts b/packages/flash-swap/src/types/contracts/uniswap-v2/IFlashUniswapV2.ts index 590591ca..9f1a4fb9 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v2/IFlashUniswapV2.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v2/IFlashUniswapV2.ts @@ -3,41 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface IFlashUniswapV2Interface extends utils.Interface { - functions: { - "balanceSheet()": FunctionFragment; - "getRepayAmount(address,address,uint256)": FunctionFragment; - "uniV2Factory()": FunctionFragment; - "uniV2PairInitCodeHash()": FunctionFragment; - "uniswapV2Call(address,uint256,uint256,bytes)": FunctionFragment; - }; - +export interface IFlashUniswapV2Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "balanceSheet" | "getRepayAmount" | "uniV2Factory" @@ -45,17 +33,17 @@ export interface IFlashUniswapV2Interface extends utils.Interface { | "uniswapV2Call" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "FlashSwapAndLiquidateBorrow" + ): EventFragment; + encodeFunctionData( functionFragment: "balanceSheet", values?: undefined ): string; encodeFunctionData( functionFragment: "getRepayAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "uniV2Factory", @@ -67,12 +55,7 @@ export interface IFlashUniswapV2Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "uniswapV2Call", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; decodeFunctionResult( @@ -95,204 +78,170 @@ export interface IFlashUniswapV2Interface extends utils.Interface { functionFragment: "uniswapV2Call", data: BytesLike ): Result; - - events: { - "FlashSwapAndLiquidateBorrow(address,address,address,uint256,uint256,uint256,uint256,uint256)": EventFragment; - }; - - getEvent( - nameOrSignatureOrTopic: "FlashSwapAndLiquidateBorrow" - ): EventFragment; } -export interface FlashSwapAndLiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - underlyingAmount: BigNumber; - seizeAmount: BigNumber; - repayAmount: BigNumber; - subsidyAmount: BigNumber; - profitAmount: BigNumber; +export namespace FlashSwapAndLiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + underlyingAmount: BigNumberish, + seizeAmount: BigNumberish, + repayAmount: BigNumberish, + subsidyAmount: BigNumberish, + profitAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + underlyingAmount: bigint, + seizeAmount: bigint, + repayAmount: bigint, + subsidyAmount: bigint, + profitAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + underlyingAmount: bigint; + seizeAmount: bigint; + repayAmount: bigint; + subsidyAmount: bigint; + profitAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type FlashSwapAndLiquidateBorrowEvent = TypedEvent< - [ - string, - string, - string, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ], - FlashSwapAndLiquidateBorrowEventObject ->; - -export type FlashSwapAndLiquidateBorrowEventFilter = - TypedEventFilter; export interface IFlashUniswapV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IFlashUniswapV2; + waitForDeployment(): Promise; interface: IFlashUniswapV2Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - getRepayAmount( - pair: PromiseOrValue, - underlying: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { repayAmount: BigNumber }>; - - uniV2Factory(overrides?: CallOverrides): Promise<[string]>; - - uniV2PairInitCodeHash(overrides?: CallOverrides): Promise<[string]>; - - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - balanceSheet(overrides?: CallOverrides): Promise; - - getRepayAmount( - pair: PromiseOrValue, - underlying: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uniV2Factory(overrides?: CallOverrides): Promise; - - uniV2PairInitCodeHash(overrides?: CallOverrides): Promise; - - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - balanceSheet(overrides?: CallOverrides): Promise; - - getRepayAmount( - pair: PromiseOrValue, - underlying: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uniV2Factory(overrides?: CallOverrides): Promise; + ): 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; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + getRepayAmount: TypedContractMethod< + [ + pair: AddressLike, + underlying: AddressLike, + underlyingAmount: BigNumberish + ], + [bigint], + "view" + >; + + uniV2Factory: TypedContractMethod<[], [string], "view">; + + uniV2PairInitCodeHash: TypedContractMethod<[], [string], "view">; + + uniswapV2Call: TypedContractMethod< + [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - uniV2PairInitCodeHash(overrides?: CallOverrides): Promise; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRepayAmount" + ): TypedContractMethod< + [ + pair: AddressLike, + underlying: AddressLike, + underlyingAmount: BigNumberish + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "uniV2Factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "uniV2PairInitCodeHash" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "uniswapV2Call" + ): TypedContractMethod< + [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "FlashSwapAndLiquidateBorrow" + ): TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; filters: { - "FlashSwapAndLiquidateBorrow(address,address,address,uint256,uint256,uint256,uint256,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - underlyingAmount?: null, - seizeAmount?: null, - repayAmount?: null, - subsidyAmount?: null, - profitAmount?: null - ): FlashSwapAndLiquidateBorrowEventFilter; - FlashSwapAndLiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - underlyingAmount?: null, - seizeAmount?: null, - repayAmount?: null, - subsidyAmount?: null, - profitAmount?: null - ): FlashSwapAndLiquidateBorrowEventFilter; - }; - - estimateGas: { - balanceSheet(overrides?: CallOverrides): Promise; - - getRepayAmount( - pair: PromiseOrValue, - underlying: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uniV2Factory(overrides?: CallOverrides): Promise; - - uniV2PairInitCodeHash(overrides?: CallOverrides): Promise; - - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - balanceSheet(overrides?: CallOverrides): Promise; - - getRepayAmount( - pair: PromiseOrValue, - underlying: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uniV2Factory(overrides?: CallOverrides): Promise; - - uniV2PairInitCodeHash( - overrides?: CallOverrides - ): Promise; - - uniswapV2Call( - sender: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "FlashSwapAndLiquidateBorrow(address,address,address,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; + FlashSwapAndLiquidateBorrow: TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v2/IUniswapV2Pair.ts b/packages/flash-swap/src/types/contracts/uniswap-v2/IUniswapV2Pair.ts index 91ee0140..063e7742 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v2/IUniswapV2Pair.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v2/IUniswapV2Pair.ts @@ -3,63 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface IUniswapV2PairInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "MINIMUM_LIQUIDITY()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(address)": FunctionFragment; - "decimals()": FunctionFragment; - "factory()": FunctionFragment; - "getReserves()": FunctionFragment; - "initialize(address,address)": FunctionFragment; - "kLast()": FunctionFragment; - "mint(address)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "price0CumulativeLast()": FunctionFragment; - "price1CumulativeLast()": FunctionFragment; - "skim(address)": FunctionFragment; - "swap(uint256,uint256,address,bytes)": FunctionFragment; - "symbol()": FunctionFragment; - "sync()": FunctionFragment; - "token0()": FunctionFragment; - "token1()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IUniswapV2PairInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "MINIMUM_LIQUIDITY" | "PERMIT_TYPEHASH" @@ -89,6 +55,16 @@ export interface IUniswapV2PairInterface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "Mint" + | "Swap" + | "Sync" + | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -103,20 +79,17 @@ export interface IUniswapV2PairInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue] + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "burn", values: [AddressLike]): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData(functionFragment: "factory", values?: undefined): string; encodeFunctionData( @@ -125,28 +98,22 @@ export interface IUniswapV2PairInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "initialize", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData(functionFragment: "kLast", values?: undefined): string; - encodeFunctionData( - functionFragment: "mint", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "mint", values: [AddressLike]): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( @@ -157,18 +124,10 @@ export interface IUniswapV2PairInterface extends utils.Interface { functionFragment: "price1CumulativeLast", values?: undefined ): string; - encodeFunctionData( - functionFragment: "skim", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "skim", values: [AddressLike]): string; encodeFunctionData( functionFragment: "swap", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, AddressLike, BytesLike] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData(functionFragment: "sync", values?: undefined): string; @@ -180,15 +139,11 @@ export interface IUniswapV2PairInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -242,755 +197,532 @@ export interface IUniswapV2PairInterface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256,uint256,address)": EventFragment; - "Mint(address,uint256,uint256)": EventFragment; - "Swap(address,uint256,uint256,uint256,uint256,address)": EventFragment; - "Sync(uint112,uint112)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Sync"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - sender: string; - amount0: BigNumber; - amount1: BigNumber; - to: string; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent< - [string, BigNumber, BigNumber, string], - BurnEventObject ->; -export type BurnEventFilter = TypedEventFilter; - -export interface MintEventObject { - sender: string; - amount0: BigNumber; - amount1: BigNumber; -} -export type MintEvent = TypedEvent< - [string, BigNumber, BigNumber], - MintEventObject ->; - -export type MintEventFilter = TypedEventFilter; - -export interface SwapEventObject { - sender: string; - amount0In: BigNumber; - amount1In: BigNumber; - amount0Out: BigNumber; - amount1Out: BigNumber; - to: string; +export namespace BurnEvent { + export type InputTuple = [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + to: AddressLike + ]; + export type OutputTuple = [ + sender: string, + amount0: bigint, + amount1: bigint, + to: string + ]; + export interface OutputObject { + sender: string; + amount0: bigint; + amount1: bigint; + to: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SwapEvent = TypedEvent< - [string, BigNumber, BigNumber, BigNumber, BigNumber, string], - SwapEventObject ->; -export type SwapEventFilter = TypedEventFilter; - -export interface SyncEventObject { - reserve0: BigNumber; - reserve1: BigNumber; +export namespace MintEvent { + export type InputTuple = [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [sender: string, amount0: bigint, amount1: bigint]; + export interface OutputObject { + sender: string; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SyncEvent = TypedEvent<[BigNumber, BigNumber], SyncEventObject>; -export type SyncEventFilter = TypedEventFilter; +export namespace SwapEvent { + export type InputTuple = [ + sender: AddressLike, + amount0In: BigNumberish, + amount1In: BigNumberish, + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: AddressLike + ]; + export type OutputTuple = [ + sender: string, + amount0In: bigint, + amount1In: bigint, + amount0Out: bigint, + amount1Out: bigint, + to: string + ]; + export interface OutputObject { + sender: string; + amount0In: bigint; + amount1In: bigint; + amount0Out: bigint; + amount1Out: bigint; + to: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; +export namespace SyncEvent { + export type InputTuple = [reserve0: BigNumberish, reserve1: BigNumberish]; + export type OutputTuple = [reserve0: bigint, reserve1: bigint]; + export interface OutputObject { + reserve0: bigint; + reserve1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface IUniswapV2Pair extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV2Pair; + waitForDeployment(): Promise; interface: IUniswapV2PairInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise<[BigNumber]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - factory(overrides?: CallOverrides): Promise<[string]>; - - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - reserve0: BigNumber; - reserve1: BigNumber; - blockTimestampLast: number; - } - >; - - initialize( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - kLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - price1CumulativeLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise<[string]>; - - token1(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + MINIMUM_LIQUIDITY: TypedContractMethod<[], [bigint], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; - decimals(overrides?: CallOverrides): Promise; + approve: TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - factory(overrides?: CallOverrides): Promise; + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - reserve0: BigNumber; - reserve1: BigNumber; - blockTimestampLast: number; - } + burn: TypedContractMethod< + [to: AddressLike], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" >; - initialize( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise; - - price1CumulativeLast(overrides?: CallOverrides): Promise; - - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; - - decimals(overrides?: CallOverrides): Promise; + decimals: TypedContractMethod<[], [bigint], "view">; - factory(overrides?: CallOverrides): Promise; + factory: TypedContractMethod<[], [string], "view">; - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - reserve0: BigNumber; - reserve1: BigNumber; - blockTimestampLast: number; + getReserves: TypedContractMethod< + [], + [ + [bigint, bigint, bigint] & { + reserve0: bigint; + reserve1: bigint; + blockTimestampLast: bigint; } - >; - - initialize( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise; - - price1CumulativeLast(overrides?: CallOverrides): Promise; - - skim(to: PromiseOrValue, overrides?: CallOverrides): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync(overrides?: CallOverrides): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Burn(address,uint256,uint256,address)"( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - to?: PromiseOrValue | null - ): BurnEventFilter; - Burn( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - to?: PromiseOrValue | null - ): BurnEventFilter; - - "Mint(address,uint256,uint256)"( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): MintEventFilter; - Mint( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): MintEventFilter; - - "Swap(address,uint256,uint256,uint256,uint256,address)"( - sender?: PromiseOrValue | null, - amount0In?: null, - amount1In?: null, - amount0Out?: null, - amount1Out?: null, - to?: PromiseOrValue | null - ): SwapEventFilter; - Swap( - sender?: PromiseOrValue | null, - amount0In?: null, - amount1In?: null, - amount0Out?: null, - amount1Out?: null, - to?: PromiseOrValue | null - ): SwapEventFilter; - - "Sync(uint112,uint112)"(reserve0?: null, reserve1?: null): SyncEventFilter; - Sync(reserve0?: null, reserve1?: null): SyncEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ], + "view" + >; - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + initialize: TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [void], + "nonpayable" + >; - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + kLast: TypedContractMethod<[], [bigint], "view">; - decimals(overrides?: CallOverrides): Promise; + mint: TypedContractMethod<[to: AddressLike], [bigint], "nonpayable">; - factory(overrides?: CallOverrides): Promise; + name: TypedContractMethod<[], [string], "view">; - getReserves(overrides?: CallOverrides): Promise; + nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; - initialize( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; - kLast(overrides?: CallOverrides): Promise; + price0CumulativeLast: TypedContractMethod<[], [bigint], "view">; - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + price1CumulativeLast: TypedContractMethod<[], [bigint], "view">; - name(overrides?: CallOverrides): Promise; + skim: TypedContractMethod<[to: AddressLike], [void], "nonpayable">; - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + swap: TypedContractMethod< + [ + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: AddressLike, + data: BytesLike + ], + [void], + "nonpayable" + >; - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + symbol: TypedContractMethod<[], [string], "view">; - price0CumulativeLast(overrides?: CallOverrides): Promise; + sync: TypedContractMethod<[], [void], "nonpayable">; - price1CumulativeLast(overrides?: CallOverrides): Promise; + token0: TypedContractMethod<[], [string], "view">; - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + token1: TypedContractMethod<[], [string], "view">; - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + totalSupply: TypedContractMethod<[], [bigint], "view">; - symbol(overrides?: CallOverrides): Promise; + transfer: TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - token0(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - token1(overrides?: CallOverrides): Promise; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "MINIMUM_LIQUIDITY" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [to: AddressLike], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getReserves" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint] & { + reserve0: bigint; + reserve1: bigint; + blockTimestampLast: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "kLast" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod<[to: AddressLike], [bigint], "nonpayable">; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "price0CumulativeLast" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "price1CumulativeLast" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "skim" + ): TypedContractMethod<[to: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "swap" + ): TypedContractMethod< + [ + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: AddressLike, + data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "sync" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "token0" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "token1" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - totalSupply(overrides?: CallOverrides): Promise; + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Swap" + ): TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; + getEvent( + key: "Sync" + ): TypedContractEvent< + SyncEvent.InputTuple, + SyncEvent.OutputTuple, + SyncEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + "Burn(address,uint256,uint256,address)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + "Mint(address,uint256,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; + "Swap(address,uint256,uint256,uint256,uint256,address)": TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; + Swap: TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + "Sync(uint112,uint112)": TypedContractEvent< + SyncEvent.InputTuple, + SyncEvent.OutputTuple, + SyncEvent.OutputObject + >; + Sync: TypedContractEvent< + SyncEvent.InputTuple, + SyncEvent.OutputTuple, + SyncEvent.OutputObject + >; - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - getReserves(overrides?: CallOverrides): Promise; - - initialize( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - price0CumulativeLast( - overrides?: CallOverrides - ): Promise; - - price1CumulativeLast( - overrides?: CallOverrides - ): Promise; - - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v2/UniswapV2Pair.sol/Erc20Interface.ts b/packages/flash-swap/src/types/contracts/uniswap-v2/UniswapV2Pair.sol/Erc20Interface.ts index c9e0d94c..8b14b0a7 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v2/UniswapV2Pair.sol/Erc20Interface.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v2/UniswapV2Pair.sol/Erc20Interface.ts @@ -3,45 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface Erc20InterfaceInterface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface Erc20InterfaceInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -53,17 +37,19 @@ export interface Erc20InterfaceInterface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; @@ -74,15 +60,11 @@ export interface Erc20InterfaceInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -100,285 +82,205 @@ export interface Erc20InterfaceInterface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface Erc20Interface extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Erc20Interface; + waitForDeployment(): Promise; interface: Erc20InterfaceInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v2/UniswapV2Pair.sol/UniswapV2Pair.ts b/packages/flash-swap/src/types/contracts/uniswap-v2/UniswapV2Pair.sol/UniswapV2Pair.ts index 1f055a91..692de8bc 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v2/UniswapV2Pair.sol/UniswapV2Pair.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v2/UniswapV2Pair.sol/UniswapV2Pair.ts @@ -3,63 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface UniswapV2PairInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "MINIMUM_LIQUIDITY()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(address)": FunctionFragment; - "decimals()": FunctionFragment; - "factory()": FunctionFragment; - "getReserves()": FunctionFragment; - "initialize(address,address)": FunctionFragment; - "kLast()": FunctionFragment; - "mint(address)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "price0CumulativeLast()": FunctionFragment; - "price1CumulativeLast()": FunctionFragment; - "skim(address)": FunctionFragment; - "swap(uint256,uint256,address,bytes)": FunctionFragment; - "symbol()": FunctionFragment; - "sync()": FunctionFragment; - "token0()": FunctionFragment; - "token1()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface UniswapV2PairInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "MINIMUM_LIQUIDITY" | "PERMIT_TYPEHASH" @@ -89,6 +55,16 @@ export interface UniswapV2PairInterface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "Mint" + | "Swap" + | "Sync" + | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -103,20 +79,17 @@ export interface UniswapV2PairInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue] + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "burn", values: [AddressLike]): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData(functionFragment: "factory", values?: undefined): string; encodeFunctionData( @@ -125,28 +98,22 @@ export interface UniswapV2PairInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "initialize", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData(functionFragment: "kLast", values?: undefined): string; - encodeFunctionData( - functionFragment: "mint", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "mint", values: [AddressLike]): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( @@ -157,18 +124,10 @@ export interface UniswapV2PairInterface extends utils.Interface { functionFragment: "price1CumulativeLast", values?: undefined ): string; - encodeFunctionData( - functionFragment: "skim", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "skim", values: [AddressLike]): string; encodeFunctionData( functionFragment: "swap", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, AddressLike, BytesLike] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData(functionFragment: "sync", values?: undefined): string; @@ -180,15 +139,11 @@ export interface UniswapV2PairInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -242,755 +197,532 @@ export interface UniswapV2PairInterface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256,uint256,address)": EventFragment; - "Mint(address,uint256,uint256)": EventFragment; - "Swap(address,uint256,uint256,uint256,uint256,address)": EventFragment; - "Sync(uint112,uint112)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Sync"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - sender: string; - amount0: BigNumber; - amount1: BigNumber; - to: string; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent< - [string, BigNumber, BigNumber, string], - BurnEventObject ->; -export type BurnEventFilter = TypedEventFilter; - -export interface MintEventObject { - sender: string; - amount0: BigNumber; - amount1: BigNumber; -} -export type MintEvent = TypedEvent< - [string, BigNumber, BigNumber], - MintEventObject ->; - -export type MintEventFilter = TypedEventFilter; - -export interface SwapEventObject { - sender: string; - amount0In: BigNumber; - amount1In: BigNumber; - amount0Out: BigNumber; - amount1Out: BigNumber; - to: string; +export namespace BurnEvent { + export type InputTuple = [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + to: AddressLike + ]; + export type OutputTuple = [ + sender: string, + amount0: bigint, + amount1: bigint, + to: string + ]; + export interface OutputObject { + sender: string; + amount0: bigint; + amount1: bigint; + to: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SwapEvent = TypedEvent< - [string, BigNumber, BigNumber, BigNumber, BigNumber, string], - SwapEventObject ->; -export type SwapEventFilter = TypedEventFilter; - -export interface SyncEventObject { - reserve0: BigNumber; - reserve1: BigNumber; +export namespace MintEvent { + export type InputTuple = [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [sender: string, amount0: bigint, amount1: bigint]; + export interface OutputObject { + sender: string; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SyncEvent = TypedEvent<[BigNumber, BigNumber], SyncEventObject>; -export type SyncEventFilter = TypedEventFilter; +export namespace SwapEvent { + export type InputTuple = [ + sender: AddressLike, + amount0In: BigNumberish, + amount1In: BigNumberish, + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: AddressLike + ]; + export type OutputTuple = [ + sender: string, + amount0In: bigint, + amount1In: bigint, + amount0Out: bigint, + amount1Out: bigint, + to: string + ]; + export interface OutputObject { + sender: string; + amount0In: bigint; + amount1In: bigint; + amount0Out: bigint; + amount1Out: bigint; + to: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; +export namespace SyncEvent { + export type InputTuple = [reserve0: BigNumberish, reserve1: BigNumberish]; + export type OutputTuple = [reserve0: bigint, reserve1: bigint]; + export interface OutputObject { + reserve0: bigint; + reserve1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface UniswapV2Pair extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): UniswapV2Pair; + waitForDeployment(): Promise; interface: UniswapV2PairInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise<[BigNumber]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - factory(overrides?: CallOverrides): Promise<[string]>; - - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - _reserve0: BigNumber; - _reserve1: BigNumber; - _blockTimestampLast: number; - } - >; - - initialize( - _token0: PromiseOrValue, - _token1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - kLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - price1CumulativeLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise<[string]>; - - token1(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + MINIMUM_LIQUIDITY: TypedContractMethod<[], [bigint], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [bigint], + "view" + >; - decimals(overrides?: CallOverrides): Promise; + approve: TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - factory(overrides?: CallOverrides): Promise; + balanceOf: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - _reserve0: BigNumber; - _reserve1: BigNumber; - _blockTimestampLast: number; - } + burn: TypedContractMethod< + [to: AddressLike], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" >; - initialize( - _token0: PromiseOrValue, - _token1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise; - - price1CumulativeLast(overrides?: CallOverrides): Promise; - - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; - - decimals(overrides?: CallOverrides): Promise; + decimals: TypedContractMethod<[], [bigint], "view">; - factory(overrides?: CallOverrides): Promise; + factory: TypedContractMethod<[], [string], "view">; - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - _reserve0: BigNumber; - _reserve1: BigNumber; - _blockTimestampLast: number; + getReserves: TypedContractMethod< + [], + [ + [bigint, bigint, bigint] & { + _reserve0: bigint; + _reserve1: bigint; + _blockTimestampLast: bigint; } - >; - - initialize( - _token0: PromiseOrValue, - _token1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise; - - price1CumulativeLast(overrides?: CallOverrides): Promise; - - skim(to: PromiseOrValue, overrides?: CallOverrides): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync(overrides?: CallOverrides): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Burn(address,uint256,uint256,address)"( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - to?: PromiseOrValue | null - ): BurnEventFilter; - Burn( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - to?: PromiseOrValue | null - ): BurnEventFilter; - - "Mint(address,uint256,uint256)"( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): MintEventFilter; - Mint( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): MintEventFilter; - - "Swap(address,uint256,uint256,uint256,uint256,address)"( - sender?: PromiseOrValue | null, - amount0In?: null, - amount1In?: null, - amount0Out?: null, - amount1Out?: null, - to?: PromiseOrValue | null - ): SwapEventFilter; - Swap( - sender?: PromiseOrValue | null, - amount0In?: null, - amount1In?: null, - amount0Out?: null, - amount1Out?: null, - to?: PromiseOrValue | null - ): SwapEventFilter; - - "Sync(uint112,uint112)"(reserve0?: null, reserve1?: null): SyncEventFilter; - Sync(reserve0?: null, reserve1?: null): SyncEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ], + "view" + >; - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + initialize: TypedContractMethod< + [_token0: AddressLike, _token1: AddressLike], + [void], + "nonpayable" + >; - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + kLast: TypedContractMethod<[], [bigint], "view">; - decimals(overrides?: CallOverrides): Promise; + mint: TypedContractMethod<[to: AddressLike], [bigint], "nonpayable">; - factory(overrides?: CallOverrides): Promise; + name: TypedContractMethod<[], [string], "view">; - getReserves(overrides?: CallOverrides): Promise; + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - initialize( - _token0: PromiseOrValue, - _token1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; - kLast(overrides?: CallOverrides): Promise; + price0CumulativeLast: TypedContractMethod<[], [bigint], "view">; - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + price1CumulativeLast: TypedContractMethod<[], [bigint], "view">; - name(overrides?: CallOverrides): Promise; + skim: TypedContractMethod<[to: AddressLike], [void], "nonpayable">; - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + swap: TypedContractMethod< + [ + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: AddressLike, + data: BytesLike + ], + [void], + "nonpayable" + >; - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + symbol: TypedContractMethod<[], [string], "view">; - price0CumulativeLast(overrides?: CallOverrides): Promise; + sync: TypedContractMethod<[], [void], "nonpayable">; - price1CumulativeLast(overrides?: CallOverrides): Promise; + token0: TypedContractMethod<[], [string], "view">; - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + token1: TypedContractMethod<[], [string], "view">; - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + totalSupply: TypedContractMethod<[], [bigint], "view">; - symbol(overrides?: CallOverrides): Promise; + transfer: TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - token0(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - token1(overrides?: CallOverrides): Promise; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "MINIMUM_LIQUIDITY" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [to: AddressLike], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getReserves" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint] & { + _reserve0: bigint; + _reserve1: bigint; + _blockTimestampLast: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod< + [_token0: AddressLike, _token1: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "kLast" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod<[to: AddressLike], [bigint], "nonpayable">; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "price0CumulativeLast" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "price1CumulativeLast" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "skim" + ): TypedContractMethod<[to: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "swap" + ): TypedContractMethod< + [ + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: AddressLike, + data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "sync" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "token0" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "token1" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - totalSupply(overrides?: CallOverrides): Promise; + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Swap" + ): TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; + getEvent( + key: "Sync" + ): TypedContractEvent< + SyncEvent.InputTuple, + SyncEvent.OutputTuple, + SyncEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + "Burn(address,uint256,uint256,address)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + "Mint(address,uint256,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; + "Swap(address,uint256,uint256,uint256,uint256,address)": TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; + Swap: TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + "Sync(uint112,uint112)": TypedContractEvent< + SyncEvent.InputTuple, + SyncEvent.OutputTuple, + SyncEvent.OutputObject + >; + Sync: TypedContractEvent< + SyncEvent.InputTuple, + SyncEvent.OutputTuple, + SyncEvent.OutputObject + >; - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - getReserves(overrides?: CallOverrides): Promise; - - initialize( - _token0: PromiseOrValue, - _token1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - price0CumulativeLast( - overrides?: CallOverrides - ): Promise; - - price1CumulativeLast( - overrides?: CallOverrides - ): Promise; - - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v2/test/GodModeUniswapV2Factory.ts b/packages/flash-swap/src/types/contracts/uniswap-v2/test/GodModeUniswapV2Factory.ts index a615ac15..f1940cb8 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v2/test/GodModeUniswapV2Factory.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v2/test/GodModeUniswapV2Factory.ts @@ -3,44 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface GodModeUniswapV2FactoryInterface extends utils.Interface { - functions: { - "allPairs(uint256)": FunctionFragment; - "allPairsLength()": FunctionFragment; - "createPair(address,address)": FunctionFragment; - "feeTo()": FunctionFragment; - "feeToSetter()": FunctionFragment; - "getPair(address,address)": FunctionFragment; - "setFeeTo(address)": FunctionFragment; - "setFeeToSetter(address)": FunctionFragment; - }; - +export interface GodModeUniswapV2FactoryInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allPairs" | "allPairsLength" | "createPair" @@ -51,9 +36,11 @@ export interface GodModeUniswapV2FactoryInterface extends utils.Interface { | "setFeeToSetter" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "PairCreated"): EventFragment; + encodeFunctionData( functionFragment: "allPairs", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "allPairsLength", @@ -61,7 +48,7 @@ export interface GodModeUniswapV2FactoryInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "createPair", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData(functionFragment: "feeTo", values?: undefined): string; encodeFunctionData( @@ -70,15 +57,15 @@ export interface GodModeUniswapV2FactoryInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getPair", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "setFeeTo", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "setFeeToSetter", - values: [PromiseOrValue] + values: [AddressLike] ): string; decodeFunctionResult(functionFragment: "allPairs", data: BytesLike): Result; @@ -98,238 +85,159 @@ export interface GodModeUniswapV2FactoryInterface extends utils.Interface { functionFragment: "setFeeToSetter", data: BytesLike ): Result; - - events: { - "PairCreated(address,address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "PairCreated"): EventFragment; } -export interface PairCreatedEventObject { - token0: string; - token1: string; - pair: string; - arg3: BigNumber; +export namespace PairCreatedEvent { + export type InputTuple = [ + token0: AddressLike, + token1: AddressLike, + pair: AddressLike, + arg3: BigNumberish + ]; + export type OutputTuple = [ + token0: string, + token1: string, + pair: string, + arg3: bigint + ]; + export interface OutputObject { + token0: string; + token1: string; + pair: string; + arg3: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type PairCreatedEvent = TypedEvent< - [string, string, string, BigNumber], - PairCreatedEventObject ->; - -export type PairCreatedEventFilter = TypedEventFilter; export interface GodModeUniswapV2Factory extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeUniswapV2Factory; + waitForDeployment(): Promise; interface: GodModeUniswapV2FactoryInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allPairs( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - allPairsLength(overrides?: CallOverrides): Promise<[BigNumber]>; - - createPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise<[string]>; - - feeToSetter(overrides?: CallOverrides): Promise<[string]>; - - getPair( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - setFeeTo( - _feeTo: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeToSetter( - _feeToSetter: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allPairs( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFeeTo( - _feeTo: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeToSetter( - _feeToSetter: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allPairs( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allPairs: TypedContractMethod<[arg0: BigNumberish], [string], "view">; + + allPairsLength: TypedContractMethod<[], [bigint], "view">; + + createPair: TypedContractMethod< + [tokenA: AddressLike, tokenB: AddressLike], + [string], + "nonpayable" + >; + + feeTo: TypedContractMethod<[], [string], "view">; + + feeToSetter: TypedContractMethod<[], [string], "view">; + + getPair: TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [string], + "view" + >; + + setFeeTo: TypedContractMethod<[_feeTo: AddressLike], [void], "nonpayable">; + + setFeeToSetter: TypedContractMethod< + [_feeToSetter: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - setFeeTo( - _feeTo: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "allPairs" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "allPairsLength" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "createPair" + ): TypedContractMethod< + [tokenA: AddressLike, tokenB: AddressLike], + [string], + "nonpayable" + >; + getFunction( + nameOrSignature: "feeTo" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "feeToSetter" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getPair" + ): TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [string], + "view" + >; + getFunction( + nameOrSignature: "setFeeTo" + ): TypedContractMethod<[_feeTo: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setFeeToSetter" + ): TypedContractMethod<[_feeToSetter: AddressLike], [void], "nonpayable">; - setFeeToSetter( - _feeToSetter: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "PairCreated" + ): TypedContractEvent< + PairCreatedEvent.InputTuple, + PairCreatedEvent.OutputTuple, + PairCreatedEvent.OutputObject + >; filters: { - "PairCreated(address,address,address,uint256)"( - token0?: PromiseOrValue | null, - token1?: PromiseOrValue | null, - pair?: null, - arg3?: null - ): PairCreatedEventFilter; - PairCreated( - token0?: PromiseOrValue | null, - token1?: PromiseOrValue | null, - pair?: null, - arg3?: null - ): PairCreatedEventFilter; - }; - - estimateGas: { - allPairs( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFeeTo( - _feeTo: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeToSetter( - _feeToSetter: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allPairs( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allPairsLength(overrides?: CallOverrides): Promise; - - createPair( - tokenA: PromiseOrValue, - tokenB: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - feeTo(overrides?: CallOverrides): Promise; - - feeToSetter(overrides?: CallOverrides): Promise; - - getPair( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFeeTo( - _feeTo: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFeeToSetter( - _feeToSetter: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "PairCreated(address,address,address,uint256)": TypedContractEvent< + PairCreatedEvent.InputTuple, + PairCreatedEvent.OutputTuple, + PairCreatedEvent.OutputObject + >; + PairCreated: TypedContractEvent< + PairCreatedEvent.InputTuple, + PairCreatedEvent.OutputTuple, + PairCreatedEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v2/test/GodModeUniswapV2Pair.ts b/packages/flash-swap/src/types/contracts/uniswap-v2/test/GodModeUniswapV2Pair.ts index fa8f6568..78e83475 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v2/test/GodModeUniswapV2Pair.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v2/test/GodModeUniswapV2Pair.ts @@ -3,65 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface GodModeUniswapV2PairInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "MINIMUM_LIQUIDITY()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "__godMode_setToken0(address)": FunctionFragment; - "__godMode_setToken1(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(address)": FunctionFragment; - "decimals()": FunctionFragment; - "factory()": FunctionFragment; - "getReserves()": FunctionFragment; - "initialize(address,address)": FunctionFragment; - "kLast()": FunctionFragment; - "mint(address)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "price0CumulativeLast()": FunctionFragment; - "price1CumulativeLast()": FunctionFragment; - "skim(address)": FunctionFragment; - "swap(uint256,uint256,address,bytes)": FunctionFragment; - "symbol()": FunctionFragment; - "sync()": FunctionFragment; - "token0()": FunctionFragment; - "token1()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface GodModeUniswapV2PairInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "MINIMUM_LIQUIDITY" | "PERMIT_TYPEHASH" @@ -93,6 +57,16 @@ export interface GodModeUniswapV2PairInterface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "Mint" + | "Swap" + | "Sync" + | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -107,28 +81,25 @@ export interface GodModeUniswapV2PairInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "__godMode_setToken0", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "__godMode_setToken1", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue] + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "burn", values: [AddressLike]): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData(functionFragment: "factory", values?: undefined): string; encodeFunctionData( @@ -137,28 +108,22 @@ export interface GodModeUniswapV2PairInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "initialize", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData(functionFragment: "kLast", values?: undefined): string; - encodeFunctionData( - functionFragment: "mint", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "mint", values: [AddressLike]): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( @@ -169,18 +134,10 @@ export interface GodModeUniswapV2PairInterface extends utils.Interface { functionFragment: "price1CumulativeLast", values?: undefined ): string; - encodeFunctionData( - functionFragment: "skim", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "skim", values: [AddressLike]): string; encodeFunctionData( functionFragment: "swap", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, AddressLike, BytesLike] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData(functionFragment: "sync", values?: undefined): string; @@ -192,15 +149,11 @@ export interface GodModeUniswapV2PairInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -262,805 +215,550 @@ export interface GodModeUniswapV2PairInterface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256,uint256,address)": EventFragment; - "Mint(address,uint256,uint256)": EventFragment; - "Swap(address,uint256,uint256,uint256,uint256,address)": EventFragment; - "Sync(uint112,uint112)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Sync"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - value: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - sender: string; - amount0: BigNumber; - amount1: BigNumber; - to: string; +export namespace BurnEvent { + export type InputTuple = [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + to: AddressLike + ]; + export type OutputTuple = [ + sender: string, + amount0: bigint, + amount1: bigint, + to: string + ]; + export interface OutputObject { + sender: string; + amount0: bigint; + amount1: bigint; + to: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent< - [string, BigNumber, BigNumber, string], - BurnEventObject ->; - -export type BurnEventFilter = TypedEventFilter; -export interface MintEventObject { - sender: string; - amount0: BigNumber; - amount1: BigNumber; +export namespace MintEvent { + export type InputTuple = [ + sender: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [sender: string, amount0: bigint, amount1: bigint]; + export interface OutputObject { + sender: string; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent< - [string, BigNumber, BigNumber], - MintEventObject ->; -export type MintEventFilter = TypedEventFilter; - -export interface SwapEventObject { - sender: string; - amount0In: BigNumber; - amount1In: BigNumber; - amount0Out: BigNumber; - amount1Out: BigNumber; - to: string; +export namespace SwapEvent { + export type InputTuple = [ + sender: AddressLike, + amount0In: BigNumberish, + amount1In: BigNumberish, + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: AddressLike + ]; + export type OutputTuple = [ + sender: string, + amount0In: bigint, + amount1In: bigint, + amount0Out: bigint, + amount1Out: bigint, + to: string + ]; + export interface OutputObject { + sender: string; + amount0In: bigint; + amount1In: bigint; + amount0Out: bigint; + amount1Out: bigint; + to: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SwapEvent = TypedEvent< - [string, BigNumber, BigNumber, BigNumber, BigNumber, string], - SwapEventObject ->; - -export type SwapEventFilter = TypedEventFilter; -export interface SyncEventObject { - reserve0: BigNumber; - reserve1: BigNumber; +export namespace SyncEvent { + export type InputTuple = [reserve0: BigNumberish, reserve1: BigNumberish]; + export type OutputTuple = [reserve0: bigint, reserve1: bigint]; + export interface OutputObject { + reserve0: bigint; + reserve1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SyncEvent = TypedEvent<[BigNumber, BigNumber], SyncEventObject>; - -export type SyncEventFilter = TypedEventFilter; -export interface TransferEventObject { - from: string; - to: string; - value: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface GodModeUniswapV2Pair extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeUniswapV2Pair; + waitForDeployment(): Promise; interface: GodModeUniswapV2PairInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise<[BigNumber]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - __godMode_setToken0( - newToken0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + MINIMUM_LIQUIDITY: TypedContractMethod<[], [bigint], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + __godMode_setToken0: TypedContractMethod< + [newToken0: AddressLike], + [void], + "nonpayable" + >; - __godMode_setToken1( - newToken1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + __godMode_setToken1: TypedContractMethod< + [newToken1: AddressLike], + [void], + "nonpayable" + >; - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; + allowance: TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [bigint], + "view" + >; - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + approve: TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; + balanceOf: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + burn: TypedContractMethod< + [to: AddressLike], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - decimals(overrides?: CallOverrides): Promise<[number]>; + decimals: TypedContractMethod<[], [bigint], "view">; - factory(overrides?: CallOverrides): Promise<[string]>; + factory: TypedContractMethod<[], [string], "view">; - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - _reserve0: BigNumber; - _reserve1: BigNumber; - _blockTimestampLast: number; + getReserves: TypedContractMethod< + [], + [ + [bigint, bigint, bigint] & { + _reserve0: bigint; + _reserve1: bigint; + _blockTimestampLast: bigint; } - >; - - initialize( - _token0: PromiseOrValue, - _token1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - kLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - price1CumulativeLast(overrides?: CallOverrides): Promise<[BigNumber]>; - - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise<[string]>; - - token1(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_setToken0( - newToken0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setToken1( - newToken1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - _reserve0: BigNumber; - _reserve1: BigNumber; - _blockTimestampLast: number; - } + ], + "view" >; - initialize( - _token0: PromiseOrValue, - _token1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise; - - price1CumulativeLast(overrides?: CallOverrides): Promise; - - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; + initialize: TypedContractMethod< + [_token0: AddressLike, _token1: AddressLike], + [void], + "nonpayable" + >; - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + kLast: TypedContractMethod<[], [bigint], "view">; - token0(overrides?: CallOverrides): Promise; + mint: TypedContractMethod<[to: AddressLike], [bigint], "nonpayable">; - token1(overrides?: CallOverrides): Promise; + name: TypedContractMethod<[], [string], "view">; - totalSupply(overrides?: CallOverrides): Promise; + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + price0CumulativeLast: TypedContractMethod<[], [bigint], "view">; - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + price1CumulativeLast: TypedContractMethod<[], [bigint], "view">; - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; + skim: TypedContractMethod<[to: AddressLike], [void], "nonpayable">; - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + swap: TypedContractMethod< + [ + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: AddressLike, + data: BytesLike + ], + [void], + "nonpayable" + >; - __godMode_setToken0( - newToken0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + symbol: TypedContractMethod<[], [string], "view">; - __godMode_setToken1( - newToken1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + sync: TypedContractMethod<[], [void], "nonpayable">; - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + token0: TypedContractMethod<[], [string], "view">; - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + token1: TypedContractMethod<[], [string], "view">; - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + totalSupply: TypedContractMethod<[], [bigint], "view">; - burn( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; + transfer: TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - decimals(overrides?: CallOverrides): Promise; + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - factory(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getReserves( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - _reserve0: BigNumber; - _reserve1: BigNumber; - _blockTimestampLast: number; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "MINIMUM_LIQUIDITY" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "__godMode_setToken0" + ): TypedContractMethod<[newToken0: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "__godMode_setToken1" + ): TypedContractMethod<[newToken1: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [to: AddressLike], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getReserves" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint] & { + _reserve0: bigint; + _reserve1: bigint; + _blockTimestampLast: bigint; } - >; - - initialize( - _token0: PromiseOrValue, - _token1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise; - - price1CumulativeLast(overrides?: CallOverrides): Promise; - - skim(to: PromiseOrValue, overrides?: CallOverrides): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync(overrides?: CallOverrides): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ], + "view" + >; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod< + [_token0: AddressLike, _token1: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "kLast" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod<[to: AddressLike], [bigint], "nonpayable">; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "price0CumulativeLast" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "price1CumulativeLast" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "skim" + ): TypedContractMethod<[to: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "swap" + ): TypedContractMethod< + [ + amount0Out: BigNumberish, + amount1Out: BigNumberish, + to: AddressLike, + data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "sync" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "token0" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "token1" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Swap" + ): TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; + getEvent( + key: "Sync" + ): TypedContractEvent< + SyncEvent.InputTuple, + SyncEvent.OutputTuple, + SyncEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - value?: null - ): ApprovalEventFilter; - - "Burn(address,uint256,uint256,address)"( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - to?: PromiseOrValue | null - ): BurnEventFilter; - Burn( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - to?: PromiseOrValue | null - ): BurnEventFilter; - - "Mint(address,uint256,uint256)"( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): MintEventFilter; - Mint( - sender?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): MintEventFilter; - - "Swap(address,uint256,uint256,uint256,uint256,address)"( - sender?: PromiseOrValue | null, - amount0In?: null, - amount1In?: null, - amount0Out?: null, - amount1Out?: null, - to?: PromiseOrValue | null - ): SwapEventFilter; - Swap( - sender?: PromiseOrValue | null, - amount0In?: null, - amount1In?: null, - amount0Out?: null, - amount1Out?: null, - to?: PromiseOrValue | null - ): SwapEventFilter; - - "Sync(uint112,uint112)"(reserve0?: null, reserve1?: null): SyncEventFilter; - Sync(reserve0?: null, reserve1?: null): SyncEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - value?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_setToken0( - newToken0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setToken1( - newToken1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - getReserves(overrides?: CallOverrides): Promise; - - initialize( - _token0: PromiseOrValue, - _token1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - price0CumulativeLast(overrides?: CallOverrides): Promise; - - price1CumulativeLast(overrides?: CallOverrides): Promise; - - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_LIQUIDITY(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_setToken0( - newToken0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setToken1( - newToken1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - factory(overrides?: CallOverrides): Promise; - - getReserves(overrides?: CallOverrides): Promise; - - initialize( - _token0: PromiseOrValue, - _token1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - kLast(overrides?: CallOverrides): Promise; - - mint( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - price0CumulativeLast( - overrides?: CallOverrides - ): Promise; - - price1CumulativeLast( - overrides?: CallOverrides - ): Promise; - - skim( - to: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swap( - amount0Out: PromiseOrValue, - amount1Out: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - sync( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; - token0(overrides?: CallOverrides): Promise; + "Burn(address,uint256,uint256,address)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; - token1(overrides?: CallOverrides): Promise; + "Mint(address,uint256,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; - totalSupply(overrides?: CallOverrides): Promise; + "Swap(address,uint256,uint256,uint256,uint256,address)": TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; + Swap: TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; - transfer( - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Sync(uint112,uint112)": TypedContractEvent< + SyncEvent.InputTuple, + SyncEvent.OutputTuple, + SyncEvent.OutputObject + >; + Sync: TypedContractEvent< + SyncEvent.InputTuple, + SyncEvent.OutputTuple, + SyncEvent.OutputObject + >; - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - value: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v2/test/MaliciousPair.ts b/packages/flash-swap/src/types/contracts/uniswap-v2/test/MaliciousPair.ts index c98ac5c6..1c6160c8 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v2/test/MaliciousPair.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v2/test/MaliciousPair.ts @@ -3,42 +3,27 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface MaliciousPairInterface extends utils.Interface { - functions: { - "collateral()": FunctionFragment; - "swap(uint256,uint256,address,bytes)": FunctionFragment; - "token0()": FunctionFragment; - "token1()": FunctionFragment; - "underlying()": FunctionFragment; - }; - +export interface MaliciousPairInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "collateral" - | "swap" - | "token0" - | "token1" - | "underlying" + nameOrSignature: "collateral" | "swap" | "token0" | "token1" | "underlying" ): FunctionFragment; encodeFunctionData( @@ -47,12 +32,7 @@ export interface MaliciousPairInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "swap", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, AddressLike, BytesLike] ): string; encodeFunctionData(functionFragment: "token0", values?: undefined): string; encodeFunctionData(functionFragment: "token1", values?: undefined): string; @@ -66,123 +46,98 @@ export interface MaliciousPairInterface extends utils.Interface { decodeFunctionResult(functionFragment: "token0", data: BytesLike): Result; decodeFunctionResult(functionFragment: "token1", data: BytesLike): Result; decodeFunctionResult(functionFragment: "underlying", data: BytesLike): Result; - - events: {}; } export interface MaliciousPair extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): MaliciousPair; + waitForDeployment(): Promise; interface: MaliciousPairInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - collateral(overrides?: CallOverrides): Promise<[string]>; - - swap( - amount0: PromiseOrValue, - amount1: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise<[string]>; - - token1(overrides?: CallOverrides): Promise<[string]>; - - underlying(overrides?: CallOverrides): Promise<[string]>; - }; - - collateral(overrides?: CallOverrides): Promise; - - swap( - amount0: PromiseOrValue, - amount1: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - underlying(overrides?: CallOverrides): Promise; - - callStatic: { - collateral(overrides?: CallOverrides): Promise; - - swap( - amount0: PromiseOrValue, - amount1: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; + ): 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; + + collateral: TypedContractMethod<[], [string], "view">; + + swap: TypedContractMethod< + [ + amount0: BigNumberish, + amount1: BigNumberish, + to: AddressLike, + data: BytesLike + ], + [void], + "nonpayable" + >; + + token0: TypedContractMethod<[], [string], "view">; + + token1: TypedContractMethod<[], [string], "view">; + + underlying: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - underlying(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "collateral" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "swap" + ): TypedContractMethod< + [ + amount0: BigNumberish, + amount1: BigNumberish, + to: AddressLike, + data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "token0" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "token1" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - collateral(overrides?: CallOverrides): Promise; - - swap( - amount0: PromiseOrValue, - amount1: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - underlying(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - collateral(overrides?: CallOverrides): Promise; - - swap( - amount0: PromiseOrValue, - amount1: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - - underlying(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v3/FlashUniswapV3.ts b/packages/flash-swap/src/types/contracts/uniswap-v3/FlashUniswapV3.ts index 02c91f1f..a9dba648 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v3/FlashUniswapV3.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v3/FlashUniswapV3.ts @@ -3,73 +3,66 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; export declare namespace IFlashUniswapV3 { export type FlashLiquidateParamsStruct = { - borrower: PromiseOrValue; - bond: PromiseOrValue; - collateral: PromiseOrValue; - poolFee: PromiseOrValue; - turnout: PromiseOrValue; - underlyingAmount: PromiseOrValue; + borrower: AddressLike; + bond: AddressLike; + collateral: AddressLike; + poolFee: BigNumberish; + turnout: BigNumberish; + underlyingAmount: BigNumberish; }; export type FlashLiquidateParamsStructOutput = [ - string, - string, - string, - number, - BigNumber, - BigNumber + borrower: string, + bond: string, + collateral: string, + poolFee: bigint, + turnout: bigint, + underlyingAmount: bigint ] & { borrower: string; bond: string; collateral: string; - poolFee: number; - turnout: BigNumber; - underlyingAmount: BigNumber; + poolFee: bigint; + turnout: bigint; + underlyingAmount: bigint; }; } -export interface FlashUniswapV3Interface extends utils.Interface { - functions: { - "balanceSheet()": FunctionFragment; - "flashLiquidate((address,address,address,uint24,int256,uint256))": FunctionFragment; - "uniV3Factory()": FunctionFragment; - "uniswapV3SwapCallback(int256,int256,bytes)": FunctionFragment; - }; - +export interface FlashUniswapV3Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "balanceSheet" | "flashLiquidate" | "uniV3Factory" | "uniswapV3SwapCallback" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "FlashSwapAndLiquidateBorrow" + ): EventFragment; + encodeFunctionData( functionFragment: "balanceSheet", values?: undefined @@ -84,11 +77,7 @@ export interface FlashUniswapV3Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "uniswapV3SwapCallback", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BytesLike] ): string; decodeFunctionResult( @@ -107,181 +96,150 @@ export interface FlashUniswapV3Interface extends utils.Interface { functionFragment: "uniswapV3SwapCallback", data: BytesLike ): Result; - - events: { - "FlashSwapAndLiquidateBorrow(address,address,address,address,uint256,uint256,uint256,uint256,uint256)": EventFragment; - }; - - getEvent( - nameOrSignatureOrTopic: "FlashSwapAndLiquidateBorrow" - ): EventFragment; } -export interface FlashSwapAndLiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - collateral: string; - underlyingAmount: BigNumber; - seizeAmount: BigNumber; - repayAmount: BigNumber; - subsidyAmount: BigNumber; - profitAmount: BigNumber; +export namespace FlashSwapAndLiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + collateral: AddressLike, + underlyingAmount: BigNumberish, + seizeAmount: BigNumberish, + repayAmount: BigNumberish, + subsidyAmount: BigNumberish, + profitAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + collateral: string, + underlyingAmount: bigint, + seizeAmount: bigint, + repayAmount: bigint, + subsidyAmount: bigint, + profitAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + collateral: string; + underlyingAmount: bigint; + seizeAmount: bigint; + repayAmount: bigint; + subsidyAmount: bigint; + profitAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type FlashSwapAndLiquidateBorrowEvent = TypedEvent< - [ - string, - string, - string, - string, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ], - FlashSwapAndLiquidateBorrowEventObject ->; - -export type FlashSwapAndLiquidateBorrowEventFilter = - TypedEventFilter; export interface FlashUniswapV3 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): FlashUniswapV3; + waitForDeployment(): Promise; interface: FlashUniswapV3Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - flashLiquidate( - params: IFlashUniswapV3.FlashLiquidateParamsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniV3Factory(overrides?: CallOverrides): Promise<[string]>; - - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - balanceSheet(overrides?: CallOverrides): Promise; - - flashLiquidate( - params: IFlashUniswapV3.FlashLiquidateParamsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniV3Factory(overrides?: CallOverrides): Promise; - - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - balanceSheet(overrides?: CallOverrides): Promise; - - flashLiquidate( - params: IFlashUniswapV3.FlashLiquidateParamsStruct, - overrides?: CallOverrides - ): Promise; + ): 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; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + flashLiquidate: TypedContractMethod< + [params: IFlashUniswapV3.FlashLiquidateParamsStruct], + [void], + "nonpayable" + >; + + uniV3Factory: TypedContractMethod<[], [string], "view">; + + uniswapV3SwapCallback: TypedContractMethod< + [amount0Delta: BigNumberish, amount1Delta: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - uniV3Factory(overrides?: CallOverrides): Promise; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "flashLiquidate" + ): TypedContractMethod< + [params: IFlashUniswapV3.FlashLiquidateParamsStruct], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "uniV3Factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "uniswapV3SwapCallback" + ): TypedContractMethod< + [amount0Delta: BigNumberish, amount1Delta: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "FlashSwapAndLiquidateBorrow" + ): TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; filters: { - "FlashSwapAndLiquidateBorrow(address,address,address,address,uint256,uint256,uint256,uint256,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - collateral?: null, - underlyingAmount?: null, - seizeAmount?: null, - repayAmount?: null, - subsidyAmount?: null, - profitAmount?: null - ): FlashSwapAndLiquidateBorrowEventFilter; - FlashSwapAndLiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - collateral?: null, - underlyingAmount?: null, - seizeAmount?: null, - repayAmount?: null, - subsidyAmount?: null, - profitAmount?: null - ): FlashSwapAndLiquidateBorrowEventFilter; - }; - - estimateGas: { - balanceSheet(overrides?: CallOverrides): Promise; - - flashLiquidate( - params: IFlashUniswapV3.FlashLiquidateParamsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniV3Factory(overrides?: CallOverrides): Promise; - - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - balanceSheet(overrides?: CallOverrides): Promise; - - flashLiquidate( - params: IFlashUniswapV3.FlashLiquidateParamsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniV3Factory(overrides?: CallOverrides): Promise; - - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "FlashSwapAndLiquidateBorrow(address,address,address,address,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; + FlashSwapAndLiquidateBorrow: TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v3/IFlashUniswapV3.ts b/packages/flash-swap/src/types/contracts/uniswap-v3/IFlashUniswapV3.ts index 39ecc880..effab336 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v3/IFlashUniswapV3.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v3/IFlashUniswapV3.ts @@ -3,73 +3,66 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; export declare namespace IFlashUniswapV3 { export type FlashLiquidateParamsStruct = { - borrower: PromiseOrValue; - bond: PromiseOrValue; - collateral: PromiseOrValue; - poolFee: PromiseOrValue; - turnout: PromiseOrValue; - underlyingAmount: PromiseOrValue; + borrower: AddressLike; + bond: AddressLike; + collateral: AddressLike; + poolFee: BigNumberish; + turnout: BigNumberish; + underlyingAmount: BigNumberish; }; export type FlashLiquidateParamsStructOutput = [ - string, - string, - string, - number, - BigNumber, - BigNumber + borrower: string, + bond: string, + collateral: string, + poolFee: bigint, + turnout: bigint, + underlyingAmount: bigint ] & { borrower: string; bond: string; collateral: string; - poolFee: number; - turnout: BigNumber; - underlyingAmount: BigNumber; + poolFee: bigint; + turnout: bigint; + underlyingAmount: bigint; }; } -export interface IFlashUniswapV3Interface extends utils.Interface { - functions: { - "balanceSheet()": FunctionFragment; - "flashLiquidate((address,address,address,uint24,int256,uint256))": FunctionFragment; - "uniV3Factory()": FunctionFragment; - "uniswapV3SwapCallback(int256,int256,bytes)": FunctionFragment; - }; - +export interface IFlashUniswapV3Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "balanceSheet" | "flashLiquidate" | "uniV3Factory" | "uniswapV3SwapCallback" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "FlashSwapAndLiquidateBorrow" + ): EventFragment; + encodeFunctionData( functionFragment: "balanceSheet", values?: undefined @@ -84,11 +77,7 @@ export interface IFlashUniswapV3Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "uniswapV3SwapCallback", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BytesLike] ): string; decodeFunctionResult( @@ -107,181 +96,150 @@ export interface IFlashUniswapV3Interface extends utils.Interface { functionFragment: "uniswapV3SwapCallback", data: BytesLike ): Result; - - events: { - "FlashSwapAndLiquidateBorrow(address,address,address,address,uint256,uint256,uint256,uint256,uint256)": EventFragment; - }; - - getEvent( - nameOrSignatureOrTopic: "FlashSwapAndLiquidateBorrow" - ): EventFragment; } -export interface FlashSwapAndLiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - collateral: string; - underlyingAmount: BigNumber; - seizeAmount: BigNumber; - repayAmount: BigNumber; - subsidyAmount: BigNumber; - profitAmount: BigNumber; +export namespace FlashSwapAndLiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + collateral: AddressLike, + underlyingAmount: BigNumberish, + seizeAmount: BigNumberish, + repayAmount: BigNumberish, + subsidyAmount: BigNumberish, + profitAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + collateral: string, + underlyingAmount: bigint, + seizeAmount: bigint, + repayAmount: bigint, + subsidyAmount: bigint, + profitAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + collateral: string; + underlyingAmount: bigint; + seizeAmount: bigint; + repayAmount: bigint; + subsidyAmount: bigint; + profitAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type FlashSwapAndLiquidateBorrowEvent = TypedEvent< - [ - string, - string, - string, - string, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ], - FlashSwapAndLiquidateBorrowEventObject ->; - -export type FlashSwapAndLiquidateBorrowEventFilter = - TypedEventFilter; export interface IFlashUniswapV3 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IFlashUniswapV3; + waitForDeployment(): Promise; interface: IFlashUniswapV3Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - flashLiquidate( - params: IFlashUniswapV3.FlashLiquidateParamsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniV3Factory(overrides?: CallOverrides): Promise<[string]>; - - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - balanceSheet(overrides?: CallOverrides): Promise; - - flashLiquidate( - params: IFlashUniswapV3.FlashLiquidateParamsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniV3Factory(overrides?: CallOverrides): Promise; - - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - balanceSheet(overrides?: CallOverrides): Promise; - - flashLiquidate( - params: IFlashUniswapV3.FlashLiquidateParamsStruct, - overrides?: CallOverrides - ): Promise; + ): 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; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + flashLiquidate: TypedContractMethod< + [params: IFlashUniswapV3.FlashLiquidateParamsStruct], + [void], + "nonpayable" + >; + + uniV3Factory: TypedContractMethod<[], [string], "view">; + + uniswapV3SwapCallback: TypedContractMethod< + [amount0Delta: BigNumberish, amount1Delta: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - uniV3Factory(overrides?: CallOverrides): Promise; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "flashLiquidate" + ): TypedContractMethod< + [params: IFlashUniswapV3.FlashLiquidateParamsStruct], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "uniV3Factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "uniswapV3SwapCallback" + ): TypedContractMethod< + [amount0Delta: BigNumberish, amount1Delta: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "FlashSwapAndLiquidateBorrow" + ): TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; filters: { - "FlashSwapAndLiquidateBorrow(address,address,address,address,uint256,uint256,uint256,uint256,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - collateral?: null, - underlyingAmount?: null, - seizeAmount?: null, - repayAmount?: null, - subsidyAmount?: null, - profitAmount?: null - ): FlashSwapAndLiquidateBorrowEventFilter; - FlashSwapAndLiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - collateral?: null, - underlyingAmount?: null, - seizeAmount?: null, - repayAmount?: null, - subsidyAmount?: null, - profitAmount?: null - ): FlashSwapAndLiquidateBorrowEventFilter; - }; - - estimateGas: { - balanceSheet(overrides?: CallOverrides): Promise; - - flashLiquidate( - params: IFlashUniswapV3.FlashLiquidateParamsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniV3Factory(overrides?: CallOverrides): Promise; - - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - balanceSheet(overrides?: CallOverrides): Promise; - - flashLiquidate( - params: IFlashUniswapV3.FlashLiquidateParamsStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniV3Factory(overrides?: CallOverrides): Promise; - - uniswapV3SwapCallback( - amount0Delta: PromiseOrValue, - amount1Delta: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "FlashSwapAndLiquidateBorrow(address,address,address,address,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; + FlashSwapAndLiquidateBorrow: TypedContractEvent< + FlashSwapAndLiquidateBorrowEvent.InputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputTuple, + FlashSwapAndLiquidateBorrowEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v3/UniswapV3Pool.ts b/packages/flash-swap/src/types/contracts/uniswap-v3/UniswapV3Pool.ts index 5a948854..69bcdab5 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v3/UniswapV3Pool.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v3/UniswapV3Pool.ts @@ -3,62 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface UniswapV3PoolInterface extends utils.Interface { - functions: { - "burn(int24,int24,uint128)": FunctionFragment; - "collect(address,int24,int24,uint128,uint128)": FunctionFragment; - "collectProtocol(address,uint128,uint128)": FunctionFragment; - "factory()": FunctionFragment; - "fee()": FunctionFragment; - "feeGrowthGlobal0X128()": FunctionFragment; - "feeGrowthGlobal1X128()": FunctionFragment; - "flash(address,uint256,uint256,bytes)": FunctionFragment; - "increaseObservationCardinalityNext(uint16)": FunctionFragment; - "initialize(uint160)": FunctionFragment; - "liquidity()": FunctionFragment; - "maxLiquidityPerTick()": FunctionFragment; - "mint(address,int24,int24,uint128,bytes)": FunctionFragment; - "observations(uint256)": FunctionFragment; - "observe(uint32[])": FunctionFragment; - "positions(bytes32)": FunctionFragment; - "protocolFees()": FunctionFragment; - "setFeeProtocol(uint8,uint8)": FunctionFragment; - "slot0()": FunctionFragment; - "snapshotCumulativesInside(int24,int24)": FunctionFragment; - "swap(address,bool,int256,uint160,bytes)": FunctionFragment; - "tickBitmap(int16)": FunctionFragment; - "tickSpacing()": FunctionFragment; - "ticks(int24)": FunctionFragment; - "token0()": FunctionFragment; - "token1()": FunctionFragment; - }; - +export interface UniswapV3PoolInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "burn" | "collect" | "collectProtocol" @@ -87,31 +54,36 @@ export interface UniswapV3PoolInterface extends utils.Interface { | "token1" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Burn" + | "Collect" + | "CollectProtocol" + | "Flash" + | "IncreaseObservationCardinalityNext" + | "Initialize" + | "Mint" + | "SetFeeProtocol" + | "Swap" + ): EventFragment; + encodeFunctionData( functionFragment: "burn", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "collect", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish ] ): string; encodeFunctionData( functionFragment: "collectProtocol", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData(functionFragment: "factory", values?: undefined): string; encodeFunctionData(functionFragment: "fee", values?: undefined): string; @@ -125,20 +97,15 @@ export interface UniswapV3PoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "flash", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "increaseObservationCardinalityNext", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "initialize", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "liquidity", values?: undefined): string; encodeFunctionData( @@ -147,25 +114,19 @@ export interface UniswapV3PoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "mint", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "observations", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "observe", - values: [PromiseOrValue[]] + values: [BigNumberish[]] ): string; encodeFunctionData( functionFragment: "positions", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData( functionFragment: "protocolFees", @@ -173,35 +134,26 @@ export interface UniswapV3PoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setFeeProtocol", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, BigNumberish] ): string; encodeFunctionData(functionFragment: "slot0", values?: undefined): string; encodeFunctionData( functionFragment: "snapshotCumulativesInside", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "swap", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, boolean, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "tickBitmap", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "tickSpacing", values?: undefined ): string; - encodeFunctionData( - functionFragment: "ticks", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "ticks", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "token0", values?: undefined): string; encodeFunctionData(functionFragment: "token1", values?: undefined): string; @@ -261,1111 +213,863 @@ export interface UniswapV3PoolInterface extends utils.Interface { decodeFunctionResult(functionFragment: "ticks", data: BytesLike): Result; decodeFunctionResult(functionFragment: "token0", data: BytesLike): Result; decodeFunctionResult(functionFragment: "token1", data: BytesLike): Result; - - events: { - "Burn(address,int24,int24,uint128,uint256,uint256)": EventFragment; - "Collect(address,address,int24,int24,uint128,uint128)": EventFragment; - "CollectProtocol(address,address,uint128,uint128)": EventFragment; - "Flash(address,address,uint256,uint256,uint256,uint256)": EventFragment; - "IncreaseObservationCardinalityNext(uint16,uint16)": EventFragment; - "Initialize(uint160,int24)": EventFragment; - "Mint(address,address,int24,int24,uint128,uint256,uint256)": EventFragment; - "SetFeeProtocol(uint8,uint8,uint8,uint8)": EventFragment; - "Swap(address,address,int256,int256,uint160,uint128,int24)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Collect"): EventFragment; - getEvent(nameOrSignatureOrTopic: "CollectProtocol"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Flash"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "IncreaseObservationCardinalityNext" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "Initialize"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetFeeProtocol"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; } -export interface BurnEventObject { - owner: string; - tickLower: number; - tickUpper: number; - amount: BigNumber; - amount0: BigNumber; - amount1: BigNumber; +export namespace BurnEvent { + export type InputTuple = [ + owner: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + tickLower: bigint, + tickUpper: bigint, + amount: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + owner: string; + tickLower: bigint; + tickUpper: bigint; + amount: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent< - [string, number, number, BigNumber, BigNumber, BigNumber], - BurnEventObject ->; - -export type BurnEventFilter = TypedEventFilter; -export interface CollectEventObject { - owner: string; - recipient: string; - tickLower: number; - tickUpper: number; - amount0: BigNumber; - amount1: BigNumber; +export namespace CollectEvent { + export type InputTuple = [ + owner: AddressLike, + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + recipient: string, + tickLower: bigint, + tickUpper: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + owner: string; + recipient: string; + tickLower: bigint; + tickUpper: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type CollectEvent = TypedEvent< - [string, string, number, number, BigNumber, BigNumber], - CollectEventObject ->; -export type CollectEventFilter = TypedEventFilter; - -export interface CollectProtocolEventObject { - sender: string; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; +export namespace CollectProtocolEvent { + export type InputTuple = [ + sender: AddressLike, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + recipient: string, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + sender: string; + recipient: string; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type CollectProtocolEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - CollectProtocolEventObject ->; - -export type CollectProtocolEventFilter = TypedEventFilter; -export interface FlashEventObject { - sender: string; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; - paid0: BigNumber; - paid1: BigNumber; +export namespace FlashEvent { + export type InputTuple = [ + sender: AddressLike, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + paid0: BigNumberish, + paid1: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + recipient: string, + amount0: bigint, + amount1: bigint, + paid0: bigint, + paid1: bigint + ]; + export interface OutputObject { + sender: string; + recipient: string; + amount0: bigint; + amount1: bigint; + paid0: bigint; + paid1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type FlashEvent = TypedEvent< - [string, string, BigNumber, BigNumber, BigNumber, BigNumber], - FlashEventObject ->; -export type FlashEventFilter = TypedEventFilter; - -export interface IncreaseObservationCardinalityNextEventObject { - observationCardinalityNextOld: number; - observationCardinalityNextNew: number; +export namespace IncreaseObservationCardinalityNextEvent { + export type InputTuple = [ + observationCardinalityNextOld: BigNumberish, + observationCardinalityNextNew: BigNumberish + ]; + export type OutputTuple = [ + observationCardinalityNextOld: bigint, + observationCardinalityNextNew: bigint + ]; + export interface OutputObject { + observationCardinalityNextOld: bigint; + observationCardinalityNextNew: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type IncreaseObservationCardinalityNextEvent = TypedEvent< - [number, number], - IncreaseObservationCardinalityNextEventObject ->; - -export type IncreaseObservationCardinalityNextEventFilter = - TypedEventFilter; -export interface InitializeEventObject { - sqrtPriceX96: BigNumber; - tick: number; +export namespace InitializeEvent { + export type InputTuple = [sqrtPriceX96: BigNumberish, tick: BigNumberish]; + export type OutputTuple = [sqrtPriceX96: bigint, tick: bigint]; + export interface OutputObject { + sqrtPriceX96: bigint; + tick: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type InitializeEvent = TypedEvent< - [BigNumber, number], - InitializeEventObject ->; -export type InitializeEventFilter = TypedEventFilter; - -export interface MintEventObject { - sender: string; - owner: string; - tickLower: number; - tickUpper: number; - amount: BigNumber; - amount0: BigNumber; - amount1: BigNumber; +export namespace MintEvent { + export type InputTuple = [ + sender: AddressLike, + owner: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + owner: string, + tickLower: bigint, + tickUpper: bigint, + amount: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + sender: string; + owner: string; + tickLower: bigint; + tickUpper: bigint; + amount: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent< - [string, string, number, number, BigNumber, BigNumber, BigNumber], - MintEventObject ->; - -export type MintEventFilter = TypedEventFilter; -export interface SetFeeProtocolEventObject { - feeProtocol0Old: number; - feeProtocol1Old: number; - feeProtocol0New: number; - feeProtocol1New: number; +export namespace SetFeeProtocolEvent { + export type InputTuple = [ + feeProtocol0Old: BigNumberish, + feeProtocol1Old: BigNumberish, + feeProtocol0New: BigNumberish, + feeProtocol1New: BigNumberish + ]; + export type OutputTuple = [ + feeProtocol0Old: bigint, + feeProtocol1Old: bigint, + feeProtocol0New: bigint, + feeProtocol1New: bigint + ]; + export interface OutputObject { + feeProtocol0Old: bigint; + feeProtocol1Old: bigint; + feeProtocol0New: bigint; + feeProtocol1New: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFeeProtocolEvent = TypedEvent< - [number, number, number, number], - SetFeeProtocolEventObject ->; -export type SetFeeProtocolEventFilter = TypedEventFilter; - -export interface SwapEventObject { - sender: string; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; - sqrtPriceX96: BigNumber; - liquidity: BigNumber; - tick: number; +export namespace SwapEvent { + export type InputTuple = [ + sender: AddressLike, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + sqrtPriceX96: BigNumberish, + liquidity: BigNumberish, + tick: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + recipient: string, + amount0: bigint, + amount1: bigint, + sqrtPriceX96: bigint, + liquidity: bigint, + tick: bigint + ]; + export interface OutputObject { + sender: string; + recipient: string; + amount0: bigint; + amount1: bigint; + sqrtPriceX96: bigint; + liquidity: bigint; + tick: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SwapEvent = TypedEvent< - [string, string, BigNumber, BigNumber, BigNumber, BigNumber, number], - SwapEventObject ->; - -export type SwapEventFilter = TypedEventFilter; export interface UniswapV3Pool extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): UniswapV3Pool; + waitForDeployment(): Promise; interface: UniswapV3PoolInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + burn: TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish, amount: BigNumberish], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + collect: TypedContractMethod< + [ + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + collectProtocol: TypedContractMethod< + [ + recipient: AddressLike, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - factory(overrides?: CallOverrides): Promise<[string]>; + factory: TypedContractMethod<[], [string], "view">; - fee(overrides?: CallOverrides): Promise<[number]>; + fee: TypedContractMethod<[], [bigint], "view">; - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise<[BigNumber]>; + feeGrowthGlobal0X128: TypedContractMethod<[], [bigint], "view">; - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise<[BigNumber]>; + feeGrowthGlobal1X128: TypedContractMethod<[], [bigint], "view">; - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + flash: TypedContractMethod< + [ + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" + >; - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + increaseObservationCardinalityNext: TypedContractMethod< + [observationCardinalityNext: BigNumberish], + [void], + "nonpayable" + >; - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + initialize: TypedContractMethod< + [sqrtPriceX96: BigNumberish], + [void], + "nonpayable" + >; - liquidity(overrides?: CallOverrides): Promise<[BigNumber]>; + liquidity: TypedContractMethod<[], [bigint], "view">; - maxLiquidityPerTick(overrides?: CallOverrides): Promise<[BigNumber]>; + maxLiquidityPerTick: TypedContractMethod<[], [bigint], "view">; - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + mint: TypedContractMethod< + [ + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - observations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; + observations: TypedContractMethod< + [arg0: BigNumberish], + [ + [bigint, bigint, bigint, boolean] & { + blockTimestamp: bigint; + tickCumulative: bigint; + secondsPerLiquidityCumulativeX128: bigint; initialized: boolean; } - >; + ], + "view" + >; - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; + observe: TypedContractMethod< + [secondsAgos: BigNumberish[]], + [ + [bigint[], bigint[]] & { + tickCumulatives: bigint[]; + secondsPerLiquidityCumulativeX128s: bigint[]; } - >; + ], + "view" + >; - positions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; + positions: TypedContractMethod< + [arg0: BytesLike], + [ + [bigint, bigint, bigint, bigint, bigint] & { + liquidity: bigint; + feeGrowthInside0LastX128: bigint; + feeGrowthInside1LastX128: bigint; + tokensOwed0: bigint; + tokensOwed1: bigint; } - >; + ], + "view" + >; - protocolFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { token0: BigNumber; token1: BigNumber } - >; + protocolFees: TypedContractMethod< + [], + [[bigint, bigint] & { token0: bigint; token1: bigint }], + "view" + >; - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + setFeeProtocol: TypedContractMethod< + [feeProtocol0: BigNumberish, feeProtocol1: BigNumberish], + [void], + "nonpayable" + >; - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; + slot0: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + sqrtPriceX96: bigint; + tick: bigint; + observationIndex: bigint; + observationCardinality: bigint; + observationCardinalityNext: bigint; + feeProtocol: bigint; unlocked: boolean; } - >; + ], + "view" + >; - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - tickCumulativeInside: BigNumber; - secondsPerLiquidityInsideX128: BigNumber; - secondsInside: number; + snapshotCumulativesInside: TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish], + [ + [bigint, bigint, bigint] & { + tickCumulativeInside: bigint; + secondsPerLiquidityInsideX128: bigint; + secondsInside: bigint; } - >; + ], + "view" + >; - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + swap: TypedContractMethod< + [ + recipient: AddressLike, + zeroForOne: boolean, + amountSpecified: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; - tickBitmap( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; + tickBitmap: TypedContractMethod<[arg0: BigNumberish], [bigint], "view">; - tickSpacing(overrides?: CallOverrides): Promise<[number]>; + tickSpacing: TypedContractMethod<[], [bigint], "view">; - ticks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - number, - boolean - ] & { - liquidityGross: BigNumber; - liquidityNet: BigNumber; - feeGrowthOutside0X128: BigNumber; - feeGrowthOutside1X128: BigNumber; - tickCumulativeOutside: BigNumber; - secondsPerLiquidityOutsideX128: BigNumber; - secondsOutside: number; + ticks: TypedContractMethod< + [arg0: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + liquidityGross: bigint; + liquidityNet: bigint; + feeGrowthOutside0X128: bigint; + feeGrowthOutside1X128: bigint; + tickCumulativeOutside: bigint; + secondsPerLiquidityOutsideX128: bigint; + secondsOutside: bigint; initialized: boolean; } - >; - - token0(overrides?: CallOverrides): Promise<[string]>; - - token1(overrides?: CallOverrides): Promise<[string]>; - }; - - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise; - - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ], + "view" + >; - liquidity(overrides?: CallOverrides): Promise; + token0: TypedContractMethod<[], [string], "view">; - maxLiquidityPerTick(overrides?: CallOverrides): Promise; + token1: TypedContractMethod<[], [string], "view">; - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - observations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; - initialized: boolean; - } + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish, amount: BigNumberish], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" >; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; - } + getFunction( + nameOrSignature: "collect" + ): TypedContractMethod< + [ + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" >; - - positions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; - } + getFunction( + nameOrSignature: "collectProtocol" + ): TypedContractMethod< + [ + recipient: AddressLike, + amount0Requested: BigNumberish, + amount1Requested: BigNumberish + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" >; - - protocolFees( - overrides?: CallOverrides - ): Promise<[BigNumber, BigNumber] & { token0: BigNumber; token1: BigNumber }>; - - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; - unlocked: boolean; - } + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "fee" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "feeGrowthGlobal0X128" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "feeGrowthGlobal1X128" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "flash" + ): TypedContractMethod< + [ + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish, + data: BytesLike + ], + [void], + "nonpayable" >; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - tickCumulativeInside: BigNumber; - secondsPerLiquidityInsideX128: BigNumber; - secondsInside: number; - } + getFunction( + nameOrSignature: "increaseObservationCardinalityNext" + ): TypedContractMethod< + [observationCardinalityNext: BigNumberish], + [void], + "nonpayable" >; - - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - tickBitmap( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - ticks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod<[sqrtPriceX96: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "liquidity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxLiquidityPerTick" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - number, - boolean - ] & { - liquidityGross: BigNumber; - liquidityNet: BigNumber; - feeGrowthOutside0X128: BigNumber; - feeGrowthOutside1X128: BigNumber; - tickCumulativeOutside: BigNumber; - secondsPerLiquidityOutsideX128: BigNumber; - secondsOutside: number; - initialized: boolean; - } + recipient: AddressLike, + tickLower: BigNumberish, + tickUpper: BigNumberish, + amount: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" >; + getFunction( + nameOrSignature: "observations" + ): TypedContractMethod< + [arg0: BigNumberish], + [ + [bigint, bigint, bigint, boolean] & { + blockTimestamp: bigint; + tickCumulative: bigint; + secondsPerLiquidityCumulativeX128: bigint; + initialized: boolean; + } + ], + "view" + >; + getFunction( + nameOrSignature: "observe" + ): TypedContractMethod< + [secondsAgos: BigNumberish[]], + [ + [bigint[], bigint[]] & { + tickCumulatives: bigint[]; + secondsPerLiquidityCumulativeX128s: bigint[]; + } + ], + "view" + >; + getFunction( + nameOrSignature: "positions" + ): TypedContractMethod< + [arg0: BytesLike], + [ + [bigint, bigint, bigint, bigint, bigint] & { + liquidity: bigint; + feeGrowthInside0LastX128: bigint; + feeGrowthInside1LastX128: bigint; + tokensOwed0: bigint; + tokensOwed1: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "protocolFees" + ): TypedContractMethod< + [], + [[bigint, bigint] & { token0: bigint; token1: bigint }], + "view" + >; + getFunction( + nameOrSignature: "setFeeProtocol" + ): TypedContractMethod< + [feeProtocol0: BigNumberish, feeProtocol1: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "slot0" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + sqrtPriceX96: bigint; + tick: bigint; + observationIndex: bigint; + observationCardinality: bigint; + observationCardinalityNext: bigint; + feeProtocol: bigint; + unlocked: boolean; + } + ], + "view" + >; + getFunction( + nameOrSignature: "snapshotCumulativesInside" + ): TypedContractMethod< + [tickLower: BigNumberish, tickUpper: BigNumberish], + [ + [bigint, bigint, bigint] & { + tickCumulativeInside: bigint; + secondsPerLiquidityInsideX128: bigint; + secondsInside: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "swap" + ): TypedContractMethod< + [ + recipient: AddressLike, + zeroForOne: boolean, + amountSpecified: BigNumberish, + sqrtPriceLimitX96: BigNumberish, + data: BytesLike + ], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "tickBitmap" + ): TypedContractMethod<[arg0: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "tickSpacing" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "ticks" + ): TypedContractMethod< + [arg0: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + liquidityGross: bigint; + liquidityNet: bigint; + feeGrowthOutside0X128: bigint; + feeGrowthOutside1X128: bigint; + tickCumulativeOutside: bigint; + secondsPerLiquidityOutsideX128: bigint; + secondsOutside: bigint; + initialized: boolean; + } + ], + "view" + >; + getFunction( + nameOrSignature: "token0" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "token1" + ): TypedContractMethod<[], [string], "view">; - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "Collect" + ): TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + getEvent( + key: "CollectProtocol" + ): TypedContractEvent< + CollectProtocolEvent.InputTuple, + CollectProtocolEvent.OutputTuple, + CollectProtocolEvent.OutputObject + >; + getEvent( + key: "Flash" + ): TypedContractEvent< + FlashEvent.InputTuple, + FlashEvent.OutputTuple, + FlashEvent.OutputObject + >; + getEvent( + key: "IncreaseObservationCardinalityNext" + ): TypedContractEvent< + IncreaseObservationCardinalityNextEvent.InputTuple, + IncreaseObservationCardinalityNextEvent.OutputTuple, + IncreaseObservationCardinalityNextEvent.OutputObject + >; + getEvent( + key: "Initialize" + ): TypedContractEvent< + InitializeEvent.InputTuple, + InitializeEvent.OutputTuple, + InitializeEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "SetFeeProtocol" + ): TypedContractEvent< + SetFeeProtocolEvent.InputTuple, + SetFeeProtocolEvent.OutputTuple, + SetFeeProtocolEvent.OutputObject + >; + getEvent( + key: "Swap" + ): TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; - callStatic: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + filters: { + "Burn(address,int24,int24,uint128,uint256,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject >; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject >; - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + "Collect(address,address,int24,int24,uint128,uint128)": TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject >; - - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise; - - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidity(overrides?: CallOverrides): Promise; - - maxLiquidityPerTick(overrides?: CallOverrides): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + Collect: TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject >; - observations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; - initialized: boolean; - } + "CollectProtocol(address,address,uint128,uint128)": TypedContractEvent< + CollectProtocolEvent.InputTuple, + CollectProtocolEvent.OutputTuple, + CollectProtocolEvent.OutputObject >; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; - } + CollectProtocol: TypedContractEvent< + CollectProtocolEvent.InputTuple, + CollectProtocolEvent.OutputTuple, + CollectProtocolEvent.OutputObject >; - positions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; - } + "Flash(address,address,uint256,uint256,uint256,uint256)": TypedContractEvent< + FlashEvent.InputTuple, + FlashEvent.OutputTuple, + FlashEvent.OutputObject >; - - protocolFees( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { token0: BigNumber; token1: BigNumber } + Flash: TypedContractEvent< + FlashEvent.InputTuple, + FlashEvent.OutputTuple, + FlashEvent.OutputObject >; - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; - unlocked: boolean; - } + "IncreaseObservationCardinalityNext(uint16,uint16)": TypedContractEvent< + IncreaseObservationCardinalityNextEvent.InputTuple, + IncreaseObservationCardinalityNextEvent.OutputTuple, + IncreaseObservationCardinalityNextEvent.OutputObject >; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, number] & { - tickCumulativeInside: BigNumber; - secondsPerLiquidityInsideX128: BigNumber; - secondsInside: number; - } + IncreaseObservationCardinalityNext: TypedContractEvent< + IncreaseObservationCardinalityNextEvent.InputTuple, + IncreaseObservationCardinalityNextEvent.OutputTuple, + IncreaseObservationCardinalityNextEvent.OutputObject >; - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + "Initialize(uint160,int24)": TypedContractEvent< + InitializeEvent.InputTuple, + InitializeEvent.OutputTuple, + InitializeEvent.OutputObject >; - - tickBitmap( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - ticks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - number, - boolean - ] & { - liquidityGross: BigNumber; - liquidityNet: BigNumber; - feeGrowthOutside0X128: BigNumber; - feeGrowthOutside1X128: BigNumber; - tickCumulativeOutside: BigNumber; - secondsPerLiquidityOutsideX128: BigNumber; - secondsOutside: number; - initialized: boolean; - } + Initialize: TypedContractEvent< + InitializeEvent.InputTuple, + InitializeEvent.OutputTuple, + InitializeEvent.OutputObject >; - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - }; - - filters: { - "Burn(address,int24,int24,uint128,uint256,uint256)"( - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): BurnEventFilter; - Burn( - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): BurnEventFilter; - - "Collect(address,address,int24,int24,uint128,uint128)"( - owner?: PromiseOrValue | null, - recipient?: null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - Collect( - owner?: PromiseOrValue | null, - recipient?: null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - - "CollectProtocol(address,address,uint128,uint128)"( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectProtocolEventFilter; - CollectProtocol( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null - ): CollectProtocolEventFilter; - - "Flash(address,address,uint256,uint256,uint256,uint256)"( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - paid0?: null, - paid1?: null - ): FlashEventFilter; - Flash( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - paid0?: null, - paid1?: null - ): FlashEventFilter; - - "IncreaseObservationCardinalityNext(uint16,uint16)"( - observationCardinalityNextOld?: null, - observationCardinalityNextNew?: null - ): IncreaseObservationCardinalityNextEventFilter; - IncreaseObservationCardinalityNext( - observationCardinalityNextOld?: null, - observationCardinalityNextNew?: null - ): IncreaseObservationCardinalityNextEventFilter; - - "Initialize(uint160,int24)"( - sqrtPriceX96?: null, - tick?: null - ): InitializeEventFilter; - Initialize(sqrtPriceX96?: null, tick?: null): InitializeEventFilter; - - "Mint(address,address,int24,int24,uint128,uint256,uint256)"( - sender?: null, - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): MintEventFilter; - Mint( - sender?: null, - owner?: PromiseOrValue | null, - tickLower?: PromiseOrValue | null, - tickUpper?: PromiseOrValue | null, - amount?: null, - amount0?: null, - amount1?: null - ): MintEventFilter; - - "SetFeeProtocol(uint8,uint8,uint8,uint8)"( - feeProtocol0Old?: null, - feeProtocol1Old?: null, - feeProtocol0New?: null, - feeProtocol1New?: null - ): SetFeeProtocolEventFilter; - SetFeeProtocol( - feeProtocol0Old?: null, - feeProtocol1Old?: null, - feeProtocol0New?: null, - feeProtocol1New?: null - ): SetFeeProtocolEventFilter; - - "Swap(address,address,int256,int256,uint160,uint128,int24)"( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - sqrtPriceX96?: null, - liquidity?: null, - tick?: null - ): SwapEventFilter; - Swap( - sender?: PromiseOrValue | null, - recipient?: PromiseOrValue | null, - amount0?: null, - amount1?: null, - sqrtPriceX96?: null, - liquidity?: null, - tick?: null - ): SwapEventFilter; - }; - - estimateGas: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - feeGrowthGlobal0X128(overrides?: CallOverrides): Promise; - - feeGrowthGlobal1X128(overrides?: CallOverrides): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidity(overrides?: CallOverrides): Promise; - - maxLiquidityPerTick(overrides?: CallOverrides): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - observations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - positions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - protocolFees(overrides?: CallOverrides): Promise; - - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - slot0(overrides?: CallOverrides): Promise; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - tickBitmap( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - ticks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - burn( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collect( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - collectProtocol( - recipient: PromiseOrValue, - amount0Requested: PromiseOrValue, - amount1Requested: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - feeGrowthGlobal0X128( - overrides?: CallOverrides - ): Promise; - - feeGrowthGlobal1X128( - overrides?: CallOverrides - ): Promise; - - flash( - recipient: PromiseOrValue, - amount0: PromiseOrValue, - amount1: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseObservationCardinalityNext( - observationCardinalityNext: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidity(overrides?: CallOverrides): Promise; - - maxLiquidityPerTick( - overrides?: CallOverrides - ): Promise; - - mint( - recipient: PromiseOrValue, - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - amount: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - observations( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - positions( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - protocolFees(overrides?: CallOverrides): Promise; - - setFeeProtocol( - feeProtocol0: PromiseOrValue, - feeProtocol1: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - slot0(overrides?: CallOverrides): Promise; - - snapshotCumulativesInside( - tickLower: PromiseOrValue, - tickUpper: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - swap( - recipient: PromiseOrValue, - zeroForOne: PromiseOrValue, - amountSpecified: PromiseOrValue, - sqrtPriceLimitX96: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - tickBitmap( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - ticks( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + "Mint(address,address,int24,int24,uint128,uint256,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; - token0(overrides?: CallOverrides): Promise; + "SetFeeProtocol(uint8,uint8,uint8,uint8)": TypedContractEvent< + SetFeeProtocolEvent.InputTuple, + SetFeeProtocolEvent.OutputTuple, + SetFeeProtocolEvent.OutputObject + >; + SetFeeProtocol: TypedContractEvent< + SetFeeProtocolEvent.InputTuple, + SetFeeProtocolEvent.OutputTuple, + SetFeeProtocolEvent.OutputObject + >; - token1(overrides?: CallOverrides): Promise; + "Swap(address,address,int256,int256,uint160,uint128,int24)": TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; + Swap: TypedContractEvent< + SwapEvent.InputTuple, + SwapEvent.OutputTuple, + SwapEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/contracts/uniswap-v3/test/GodModeNonfungiblePositionManager.ts b/packages/flash-swap/src/types/contracts/uniswap-v3/test/GodModeNonfungiblePositionManager.ts index 2e17c247..8dce3124 100644 --- a/packages/flash-swap/src/types/contracts/uniswap-v3/test/GodModeNonfungiblePositionManager.ts +++ b/packages/flash-swap/src/types/contracts/uniswap-v3/test/GodModeNonfungiblePositionManager.ts @@ -3,184 +3,137 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; export declare namespace INonfungiblePositionManager { export type CollectParamsStruct = { - tokenId: PromiseOrValue; - recipient: PromiseOrValue; - amount0Max: PromiseOrValue; - amount1Max: PromiseOrValue; + tokenId: BigNumberish; + recipient: AddressLike; + amount0Max: BigNumberish; + amount1Max: BigNumberish; }; export type CollectParamsStructOutput = [ - BigNumber, - string, - BigNumber, - BigNumber + tokenId: bigint, + recipient: string, + amount0Max: bigint, + amount1Max: bigint ] & { - tokenId: BigNumber; + tokenId: bigint; recipient: string; - amount0Max: BigNumber; - amount1Max: BigNumber; + amount0Max: bigint; + amount1Max: bigint; }; export type DecreaseLiquidityParamsStruct = { - tokenId: PromiseOrValue; - liquidity: PromiseOrValue; - amount0Min: PromiseOrValue; - amount1Min: PromiseOrValue; - deadline: PromiseOrValue; + tokenId: BigNumberish; + liquidity: BigNumberish; + amount0Min: BigNumberish; + amount1Min: BigNumberish; + deadline: BigNumberish; }; export type DecreaseLiquidityParamsStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber + tokenId: bigint, + liquidity: bigint, + amount0Min: bigint, + amount1Min: bigint, + deadline: bigint ] & { - tokenId: BigNumber; - liquidity: BigNumber; - amount0Min: BigNumber; - amount1Min: BigNumber; - deadline: BigNumber; + tokenId: bigint; + liquidity: bigint; + amount0Min: bigint; + amount1Min: bigint; + deadline: bigint; }; export type IncreaseLiquidityParamsStruct = { - tokenId: PromiseOrValue; - amount0Desired: PromiseOrValue; - amount1Desired: PromiseOrValue; - amount0Min: PromiseOrValue; - amount1Min: PromiseOrValue; - deadline: PromiseOrValue; + tokenId: BigNumberish; + amount0Desired: BigNumberish; + amount1Desired: BigNumberish; + amount0Min: BigNumberish; + amount1Min: BigNumberish; + deadline: BigNumberish; }; export type IncreaseLiquidityParamsStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber + tokenId: bigint, + amount0Desired: bigint, + amount1Desired: bigint, + amount0Min: bigint, + amount1Min: bigint, + deadline: bigint ] & { - tokenId: BigNumber; - amount0Desired: BigNumber; - amount1Desired: BigNumber; - amount0Min: BigNumber; - amount1Min: BigNumber; - deadline: BigNumber; + tokenId: bigint; + amount0Desired: bigint; + amount1Desired: bigint; + amount0Min: bigint; + amount1Min: bigint; + deadline: bigint; }; export type MintParamsStruct = { - token0: PromiseOrValue; - token1: PromiseOrValue; - fee: PromiseOrValue; - tickLower: PromiseOrValue; - tickUpper: PromiseOrValue; - amount0Desired: PromiseOrValue; - amount1Desired: PromiseOrValue; - amount0Min: PromiseOrValue; - amount1Min: PromiseOrValue; - recipient: PromiseOrValue; - deadline: PromiseOrValue; + token0: AddressLike; + token1: AddressLike; + fee: BigNumberish; + tickLower: BigNumberish; + tickUpper: BigNumberish; + amount0Desired: BigNumberish; + amount1Desired: BigNumberish; + amount0Min: BigNumberish; + amount1Min: BigNumberish; + recipient: AddressLike; + deadline: BigNumberish; }; export type MintParamsStructOutput = [ - string, - string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - string, - BigNumber + token0: string, + token1: string, + fee: bigint, + tickLower: bigint, + tickUpper: bigint, + amount0Desired: bigint, + amount1Desired: bigint, + amount0Min: bigint, + amount1Min: bigint, + recipient: string, + deadline: bigint ] & { token0: string; token1: string; - fee: number; - tickLower: number; - tickUpper: number; - amount0Desired: BigNumber; - amount1Desired: BigNumber; - amount0Min: BigNumber; - amount1Min: BigNumber; + fee: bigint; + tickLower: bigint; + tickUpper: bigint; + amount0Desired: bigint; + amount1Desired: bigint; + amount0Min: bigint; + amount1Min: bigint; recipient: string; - deadline: BigNumber; + deadline: bigint; }; } -export interface GodModeNonfungiblePositionManagerInterface - extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "WETH9()": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "baseURI()": FunctionFragment; - "burn(uint256)": FunctionFragment; - "collect((uint256,address,uint128,uint128))": FunctionFragment; - "createAndInitializePoolIfNecessary(address,address,uint24,uint160)": FunctionFragment; - "decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))": FunctionFragment; - "factory()": FunctionFragment; - "getApproved(uint256)": FunctionFragment; - "increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))": FunctionFragment; - "isApprovedForAll(address,address)": FunctionFragment; - "mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))": FunctionFragment; - "multicall(bytes[])": FunctionFragment; - "name()": FunctionFragment; - "ownerOf(uint256)": FunctionFragment; - "permit(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "positions(uint256)": FunctionFragment; - "refundETH()": FunctionFragment; - "safeTransferFrom(address,address,uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256,bytes)": FunctionFragment; - "selfPermit(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "selfPermitAllowed(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "selfPermitAllowedIfNecessary(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "selfPermitIfNecessary(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "setApprovalForAll(address,bool)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "sweepToken(address,uint256,address)": FunctionFragment; - "symbol()": FunctionFragment; - "tokenByIndex(uint256)": FunctionFragment; - "tokenOfOwnerByIndex(address,uint256)": FunctionFragment; - "tokenURI(uint256)": FunctionFragment; - "totalSupply()": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "uniswapV3MintCallback(uint256,uint256,bytes)": FunctionFragment; - "unwrapWETH9(uint256,address)": FunctionFragment; - }; - +export interface GodModeNonfungiblePositionManagerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "WETH9" @@ -221,6 +174,16 @@ export interface GodModeNonfungiblePositionManagerInterface | "unwrapWETH9" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "ApprovalForAll" + | "Collect" + | "DecreaseLiquidity" + | "IncreaseLiquidity" + | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -232,29 +195,21 @@ export interface GodModeNonfungiblePositionManagerInterface encodeFunctionData(functionFragment: "WETH9", values?: undefined): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "baseURI", values?: undefined): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; encodeFunctionData( functionFragment: "collect", values: [INonfungiblePositionManager.CollectParamsStruct] ): string; encodeFunctionData( functionFragment: "createAndInitializePoolIfNecessary", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "decreaseLiquidity", @@ -263,7 +218,7 @@ export interface GodModeNonfungiblePositionManagerInterface encodeFunctionData(functionFragment: "factory", values?: undefined): string; encodeFunctionData( functionFragment: "getApproved", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseLiquidity", @@ -271,7 +226,7 @@ export interface GodModeNonfungiblePositionManagerInterface ): string; encodeFunctionData( functionFragment: "isApprovedForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "mint", @@ -279,118 +234,105 @@ export interface GodModeNonfungiblePositionManagerInterface ): string; encodeFunctionData( functionFragment: "multicall", - values: [PromiseOrValue[]] + values: [BytesLike[]] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "ownerOf", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "positions", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "refundETH", values?: undefined): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "selfPermit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "selfPermitAllowed", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "selfPermitAllowedIfNecessary", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "selfPermitIfNecessary", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "setApprovalForAll", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "supportsInterface", - values: [PromiseOrValue] + values: [BytesLike] ): string; encodeFunctionData( functionFragment: "sweepToken", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( functionFragment: "tokenByIndex", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "tokenOfOwnerByIndex", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "tokenURI", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "totalSupply", @@ -398,23 +340,15 @@ export interface GodModeNonfungiblePositionManagerInterface ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "uniswapV3MintCallback", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "unwrapWETH9", - values: [PromiseOrValue, PromiseOrValue] + values: [BigNumberish, AddressLike] ): string; decodeFunctionResult( @@ -515,1350 +449,831 @@ export interface GodModeNonfungiblePositionManagerInterface functionFragment: "unwrapWETH9", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "ApprovalForAll(address,address,bool)": EventFragment; - "Collect(uint256,address,uint256,uint256)": EventFragment; - "DecreaseLiquidity(uint256,uint128,uint256,uint256)": EventFragment; - "IncreaseLiquidity(uint256,uint128,uint256,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Collect"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DecreaseLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IncreaseLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - approved: string; - tokenId: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + approved: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject { + owner: string; + approved: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface ApprovalForAllEventObject { - owner: string; - operator: string; - approved: boolean; -} -export type ApprovalForAllEvent = TypedEvent< - [string, string, boolean], - ApprovalForAllEventObject ->; - -export type ApprovalForAllEventFilter = TypedEventFilter; - -export interface CollectEventObject { - tokenId: BigNumber; - recipient: string; - amount0: BigNumber; - amount1: BigNumber; +export namespace ApprovalForAllEvent { + export type InputTuple = [ + owner: AddressLike, + operator: AddressLike, + approved: boolean + ]; + export type OutputTuple = [ + owner: string, + operator: string, + approved: boolean + ]; + export interface OutputObject { + owner: string; + operator: string; + approved: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type CollectEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber], - CollectEventObject ->; - -export type CollectEventFilter = TypedEventFilter; - -export interface DecreaseLiquidityEventObject { - tokenId: BigNumber; - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; + +export namespace CollectEvent { + export type InputTuple = [ + tokenId: BigNumberish, + recipient: AddressLike, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + tokenId: bigint, + recipient: string, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + tokenId: bigint; + recipient: string; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DecreaseLiquidityEvent = TypedEvent< - [BigNumber, BigNumber, BigNumber, BigNumber], - DecreaseLiquidityEventObject ->; - -export type DecreaseLiquidityEventFilter = - TypedEventFilter; - -export interface IncreaseLiquidityEventObject { - tokenId: BigNumber; - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; + +export namespace DecreaseLiquidityEvent { + export type InputTuple = [ + tokenId: BigNumberish, + liquidity: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + tokenId: bigint, + liquidity: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + tokenId: bigint; + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type IncreaseLiquidityEvent = TypedEvent< - [BigNumber, BigNumber, BigNumber, BigNumber], - IncreaseLiquidityEventObject ->; - -export type IncreaseLiquidityEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - tokenId: BigNumber; + +export namespace IncreaseLiquidityEvent { + export type InputTuple = [ + tokenId: BigNumberish, + liquidity: BigNumberish, + amount0: BigNumberish, + amount1: BigNumberish + ]; + export type OutputTuple = [ + tokenId: bigint, + liquidity: bigint, + amount0: bigint, + amount1: bigint + ]; + export interface OutputObject { + tokenId: bigint; + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject { + from: string; + to: string; + tokenId: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface GodModeNonfungiblePositionManager extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeNonfungiblePositionManager; + waitForDeployment(): Promise; interface: GodModeNonfungiblePositionManagerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - WETH9(overrides?: CallOverrides): Promise<[string]>; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - baseURI(overrides?: CallOverrides): Promise<[string]>; - - burn( - tokenId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise<[string]>; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - positions( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + WETH9: TypedContractMethod<[], [string], "view">; + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + baseURI: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod<[tokenId: BigNumberish], [void], "payable">; + + collect: TypedContractMethod< + [params: INonfungiblePositionManager.CollectParamsStruct], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "payable" + >; + + createAndInitializePoolIfNecessary: TypedContractMethod< + [ + token0: AddressLike, + token1: AddressLike, + fee: BigNumberish, + sqrtPriceX96: BigNumberish + ], + [string], + "payable" + >; + + decreaseLiquidity: TypedContractMethod< + [params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "payable" + >; + + factory: TypedContractMethod<[], [string], "view">; + + getApproved: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + increaseLiquidity: TypedContractMethod< + [params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct], + [ + [bigint, bigint, bigint] & { + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + ], + "payable" + >; + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + + mint: TypedContractMethod< + [params: INonfungiblePositionManager.MintParamsStruct], + [ + [bigint, bigint, bigint, bigint] & { + tokenId: bigint; + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + ], + "payable" + >; + + multicall: TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; + + name: TypedContractMethod<[], [string], "view">; + + ownerOf: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + permit: TypedContractMethod< + [ + spender: AddressLike, + tokenId: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + positions: TypedContractMethod< + [tokenId: BigNumberish], + [ [ - BigNumber, + bigint, string, string, string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber + bigint, + bigint, + bigint, + bigint, + bigint, + bigint, + bigint, + bigint ] & { - nonce: BigNumber; + nonce: bigint; operator: string; token0: string; token1: string; - fee: number; - tickLower: number; - tickUpper: number; - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; + fee: bigint; + tickLower: bigint; + tickUpper: bigint; + liquidity: bigint; + feeGrowthInside0LastX128: bigint; + feeGrowthInside1LastX128: bigint; + tokensOwed0: bigint; + tokensOwed1: bigint; } - >; + ], + "view" + >; - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + refundETH: TypedContractMethod<[], [void], "payable">; + + "safeTransferFrom(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - WETH9(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - burn( - tokenId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - positions( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< + "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< [ - BigNumber, - string, - string, - string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber - ] & { - nonce: BigNumber; - operator: string; - token0: string; - token1: string; - fee: number; - tickLower: number; - tickUpper: number; - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; - } + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + _data: BytesLike + ], + [void], + "nonpayable" >; - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - WETH9(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - burn( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; + selfPermit: TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } - >; + selfPermitAllowed: TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; - factory(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber] & { - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; - } - >; + selfPermitAllowedIfNecessary: TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber] & { - tokenId: BigNumber; - liquidity: BigNumber; - amount0: BigNumber; - amount1: BigNumber; - } - >; + selfPermitIfNecessary: TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean], + [void], + "nonpayable" + >; + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; + + sweepToken: TypedContractMethod< + [token: AddressLike, amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + tokenByIndex: TypedContractMethod<[index: BigNumberish], [bigint], "view">; + + tokenOfOwnerByIndex: TypedContractMethod< + [owner: AddressLike, index: BigNumberish], + [bigint], + "view" + >; + + tokenURI: TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + + uniswapV3MintCallback: TypedContractMethod< + [amount0Owed: BigNumberish, amount1Owed: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; - multicall( - data: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - positions( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< + unwrapWETH9: TypedContractMethod< + [amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "WETH9" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "baseURI" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod<[tokenId: BigNumberish], [void], "payable">; + getFunction( + nameOrSignature: "collect" + ): TypedContractMethod< + [params: INonfungiblePositionManager.CollectParamsStruct], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "payable" + >; + getFunction( + nameOrSignature: "createAndInitializePoolIfNecessary" + ): TypedContractMethod< + [ + token0: AddressLike, + token1: AddressLike, + fee: BigNumberish, + sqrtPriceX96: BigNumberish + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "decreaseLiquidity" + ): TypedContractMethod< + [params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct], + [[bigint, bigint] & { amount0: bigint; amount1: bigint }], + "payable" + >; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getApproved" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "increaseLiquidity" + ): TypedContractMethod< + [params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct], + [ + [bigint, bigint, bigint] & { + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + ], + "payable" + >; + getFunction( + nameOrSignature: "isApprovedForAll" + ): TypedContractMethod< + [owner: AddressLike, operator: AddressLike], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [params: INonfungiblePositionManager.MintParamsStruct], + [ + [bigint, bigint, bigint, bigint] & { + tokenId: bigint; + liquidity: bigint; + amount0: bigint; + amount1: bigint; + } + ], + "payable" + >; + getFunction( + nameOrSignature: "multicall" + ): TypedContractMethod<[data: BytesLike[]], [string[]], "payable">; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "ownerOf" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + spender: AddressLike, + tokenId: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "positions" + ): TypedContractMethod< + [tokenId: BigNumberish], + [ [ - BigNumber, + bigint, string, string, string, - number, - number, - number, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber + bigint, + bigint, + bigint, + bigint, + bigint, + bigint, + bigint, + bigint ] & { - nonce: BigNumber; + nonce: bigint; operator: string; token0: string; token1: string; - fee: number; - tickLower: number; - tickUpper: number; - liquidity: BigNumber; - feeGrowthInside0LastX128: BigNumber; - feeGrowthInside1LastX128: BigNumber; - tokensOwed0: BigNumber; - tokensOwed1: BigNumber; + fee: bigint; + tickLower: bigint; + tickUpper: bigint; + liquidity: bigint; + feeGrowthInside0LastX128: bigint; + feeGrowthInside1LastX128: bigint; + tokensOwed0: bigint; + tokensOwed1: bigint; } - >; + ], + "view" + >; + getFunction( + nameOrSignature: "refundETH" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256)" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "safeTransferFrom(address,address,uint256,bytes)" + ): TypedContractMethod< + [ + from: AddressLike, + to: AddressLike, + tokenId: BigNumberish, + _data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "selfPermit" + ): TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "selfPermitAllowed" + ): TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "selfPermitAllowedIfNecessary" + ): TypedContractMethod< + [ + token: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "selfPermitIfNecessary" + ): TypedContractMethod< + [ + token: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "setApprovalForAll" + ): TypedContractMethod< + [operator: AddressLike, approved: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "sweepToken" + ): TypedContractMethod< + [token: AddressLike, amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "tokenByIndex" + ): TypedContractMethod<[index: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "tokenOfOwnerByIndex" + ): TypedContractMethod< + [owner: AddressLike, index: BigNumberish], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "tokenURI" + ): TypedContractMethod<[tokenId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "uniswapV3MintCallback" + ): TypedContractMethod< + [amount0Owed: BigNumberish, amount1Owed: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "unwrapWETH9" + ): TypedContractMethod< + [amountMinimum: BigNumberish, recipient: AddressLike], + [void], + "payable" + >; - refundETH(overrides?: CallOverrides): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "ApprovalForAll" + ): TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + getEvent( + key: "Collect" + ): TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + getEvent( + key: "DecreaseLiquidity" + ): TypedContractEvent< + DecreaseLiquidityEvent.InputTuple, + DecreaseLiquidityEvent.OutputTuple, + DecreaseLiquidityEvent.OutputObject + >; + getEvent( + key: "IncreaseLiquidity" + ): TypedContractEvent< + IncreaseLiquidityEvent.InputTuple, + IncreaseLiquidityEvent.OutputTuple, + IncreaseLiquidityEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - - "ApprovalForAll(address,address,bool)"( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - ApprovalForAll( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - - "Collect(uint256,address,uint256,uint256)"( - tokenId?: PromiseOrValue | null, - recipient?: null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - Collect( - tokenId?: PromiseOrValue | null, - recipient?: null, - amount0?: null, - amount1?: null - ): CollectEventFilter; - - "DecreaseLiquidity(uint256,uint128,uint256,uint256)"( - tokenId?: PromiseOrValue | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): DecreaseLiquidityEventFilter; - DecreaseLiquidity( - tokenId?: PromiseOrValue | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): DecreaseLiquidityEventFilter; - - "IncreaseLiquidity(uint256,uint128,uint256,uint256)"( - tokenId?: PromiseOrValue | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): IncreaseLiquidityEventFilter; - IncreaseLiquidity( - tokenId?: PromiseOrValue | null, - liquidity?: null, - amount0?: null, - amount1?: null - ): IncreaseLiquidityEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - }; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - WETH9(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - burn( - tokenId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - positions( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; + "ApprovalForAll(address,address,bool)": TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + ApprovalForAll: TypedContractEvent< + ApprovalForAllEvent.InputTuple, + ApprovalForAllEvent.OutputTuple, + ApprovalForAllEvent.OutputObject + >; + + "Collect(uint256,address,uint256,uint256)": TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + Collect: TypedContractEvent< + CollectEvent.InputTuple, + CollectEvent.OutputTuple, + CollectEvent.OutputObject + >; + + "DecreaseLiquidity(uint256,uint128,uint256,uint256)": TypedContractEvent< + DecreaseLiquidityEvent.InputTuple, + DecreaseLiquidityEvent.OutputTuple, + DecreaseLiquidityEvent.OutputObject + >; + DecreaseLiquidity: TypedContractEvent< + DecreaseLiquidityEvent.InputTuple, + DecreaseLiquidityEvent.OutputTuple, + DecreaseLiquidityEvent.OutputObject + >; + + "IncreaseLiquidity(uint256,uint128,uint256,uint256)": TypedContractEvent< + IncreaseLiquidityEvent.InputTuple, + IncreaseLiquidityEvent.OutputTuple, + IncreaseLiquidityEvent.OutputObject + >; + IncreaseLiquidity: TypedContractEvent< + IncreaseLiquidityEvent.InputTuple, + IncreaseLiquidityEvent.OutputTuple, + IncreaseLiquidityEvent.OutputObject + >; - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - WETH9(overrides?: CallOverrides): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - burn( - tokenId: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - collect( - params: INonfungiblePositionManager.CollectParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - createAndInitializePoolIfNecessary( - token0: PromiseOrValue, - token1: PromiseOrValue, - fee: PromiseOrValue, - sqrtPriceX96: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - decreaseLiquidity( - params: INonfungiblePositionManager.DecreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - factory(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseLiquidity( - params: INonfungiblePositionManager.IncreaseLiquidityParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - mint( - params: INonfungiblePositionManager.MintParamsStruct, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - multicall( - data: PromiseOrValue[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - spender: PromiseOrValue, - tokenId: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - positions( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - refundETH( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - selfPermit( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowed( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitAllowedIfNecessary( - token: PromiseOrValue, - nonce: PromiseOrValue, - expiry: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - selfPermitIfNecessary( - token: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - operator: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sweepToken( - token: PromiseOrValue, - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uniswapV3MintCallback( - amount0Owed: PromiseOrValue, - amount1Owed: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unwrapWETH9( - amountMinimum: PromiseOrValue, - recipient: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts index 1fc574b9..b2ac7751 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IOwnableUpgradeable, IOwnableUpgradeableInterface, @@ -88,12 +87,16 @@ const _abi = [ export class IOwnableUpgradeable__factory { static readonly abi = _abi; static createInterface(): IOwnableUpgradeableInterface { - return new utils.Interface(_abi) as IOwnableUpgradeableInterface; + return new Interface(_abi) as IOwnableUpgradeableInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IOwnableUpgradeable { - return new Contract(address, _abi, signerOrProvider) as IOwnableUpgradeable; + return new Contract( + address, + _abi, + runner + ) as unknown as IOwnableUpgradeable; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/access/OwnableUpgradeable__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/access/OwnableUpgradeable__factory.ts index 4c972237..fcc85c58 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/access/OwnableUpgradeable__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/access/OwnableUpgradeable__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../../common"; import type { OwnableUpgradeable, OwnableUpgradeableInterface, @@ -105,32 +110,31 @@ export class OwnableUpgradeable__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): OwnableUpgradeable { - return super.attach(address) as OwnableUpgradeable; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + OwnableUpgradeable & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): OwnableUpgradeable__factory { - return super.connect(signer) as OwnableUpgradeable__factory; + override connect(runner: ContractRunner | null): OwnableUpgradeable__factory { + return super.connect(runner) as OwnableUpgradeable__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): OwnableUpgradeableInterface { - return new utils.Interface(_abi) as OwnableUpgradeableInterface; + return new Interface(_abi) as OwnableUpgradeableInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): OwnableUpgradeable { - return new Contract(address, _abi, signerOrProvider) as OwnableUpgradeable; + return new Contract(address, _abi, runner) as unknown as OwnableUpgradeable; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/BalanceSheetV2__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/BalanceSheetV2__factory.ts index df33638f..fbaa8cf6 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/BalanceSheetV2__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/BalanceSheetV2__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../../../common"; import type { BalanceSheetV2, BalanceSheetV2Interface, @@ -1039,32 +1044,31 @@ export class BalanceSheetV2__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): BalanceSheetV2 { - return super.attach(address) as BalanceSheetV2; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + BalanceSheetV2 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): BalanceSheetV2__factory { - return super.connect(signer) as BalanceSheetV2__factory; + override connect(runner: ContractRunner | null): BalanceSheetV2__factory { + return super.connect(runner) as BalanceSheetV2__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): BalanceSheetV2Interface { - return new utils.Interface(_abi) as BalanceSheetV2Interface; + return new Interface(_abi) as BalanceSheetV2Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): BalanceSheetV2 { - return new Contract(address, _abi, signerOrProvider) as BalanceSheetV2; + return new Contract(address, _abi, runner) as unknown as BalanceSheetV2; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts index a0acdb8b..40898d6e 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IBalanceSheetV2, IBalanceSheetV2Interface, @@ -935,12 +934,12 @@ const _abi = [ export class IBalanceSheetV2__factory { static readonly abi = _abi; static createInterface(): IBalanceSheetV2Interface { - return new utils.Interface(_abi) as IBalanceSheetV2Interface; + return new Interface(_abi) as IBalanceSheetV2Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IBalanceSheetV2 { - return new Contract(address, _abi, signerOrProvider) as IBalanceSheetV2; + return new Contract(address, _abi, runner) as unknown as IBalanceSheetV2; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV1__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV1__factory.ts index 7982d050..6fe619a4 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV1__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV1__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { SBalanceSheetV1, SBalanceSheetV1Interface, @@ -41,12 +40,12 @@ const _abi = [ export class SBalanceSheetV1__factory { static readonly abi = _abi; static createInterface(): SBalanceSheetV1Interface { - return new utils.Interface(_abi) as SBalanceSheetV1Interface; + return new Interface(_abi) as SBalanceSheetV1Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): SBalanceSheetV1 { - return new Contract(address, _abi, signerOrProvider) as SBalanceSheetV1; + return new Contract(address, _abi, runner) as unknown as SBalanceSheetV1; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV2__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV2__factory.ts index a43f0c53..c5810ec4 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV2__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/SBalanceSheetV2__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { SBalanceSheetV2, SBalanceSheetV2Interface, @@ -41,12 +40,12 @@ const _abi = [ export class SBalanceSheetV2__factory { static readonly abi = _abi; static createInterface(): SBalanceSheetV2Interface { - return new utils.Interface(_abi) as SBalanceSheetV2Interface; + return new Interface(_abi) as SBalanceSheetV2Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): SBalanceSheetV2 { - return new Contract(address, _abi, signerOrProvider) as SBalanceSheetV2; + return new Contract(address, _abi, runner) as unknown as SBalanceSheetV2; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/fintroller/Fintroller__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/fintroller/Fintroller__factory.ts index 129ce7b0..dcd3b5e7 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/fintroller/Fintroller__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/fintroller/Fintroller__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../../../common"; import type { Fintroller, FintrollerInterface, @@ -1133,32 +1138,28 @@ export class Fintroller__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): Fintroller { - return super.attach(address) as Fintroller; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + Fintroller & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Fintroller__factory { - return super.connect(signer) as Fintroller__factory; + override connect(runner: ContractRunner | null): Fintroller__factory { + return super.connect(runner) as Fintroller__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): FintrollerInterface { - return new utils.Interface(_abi) as FintrollerInterface; + return new Interface(_abi) as FintrollerInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Fintroller { - return new Contract(address, _abi, signerOrProvider) as Fintroller; + static connect(address: string, runner?: ContractRunner | null): Fintroller { + return new Contract(address, _abi, runner) as unknown as Fintroller; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts index f2ac1393..c705c131 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IFintroller, IFintrollerInterface, @@ -1090,12 +1089,9 @@ const _abi = [ export class IFintroller__factory { static readonly abi = _abi; static createInterface(): IFintrollerInterface { - return new utils.Interface(_abi) as IFintrollerInterface; + return new Interface(_abi) as IFintrollerInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IFintroller { - return new Contract(address, _abi, signerOrProvider) as IFintroller; + static connect(address: string, runner?: ContractRunner | null): IFintroller { + return new Contract(address, _abi, runner) as unknown as IFintroller; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/h-token/HToken__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/h-token/HToken__factory.ts index de7c806f..1ac6ec77 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/h-token/HToken__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/h-token/HToken__factory.ts @@ -2,15 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + AddressLike, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../../common"; +import type { NonPayableOverrides } from "../../../../../../common"; import type { HToken, HTokenInterface, @@ -1243,16 +1247,16 @@ export class HToken__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - balanceSheet_: PromiseOrValue, - fintroller_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( + override getDeployTransaction( + name_: string, + symbol_: string, + maturity_: BigNumberish, + balanceSheet_: AddressLike, + fintroller_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( name_, symbol_, maturity_, @@ -1260,18 +1264,18 @@ export class HToken__factory extends ContractFactory { fintroller_, underlying_, overrides || {} - ) as Promise; + ); } - override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - balanceSheet_: PromiseOrValue, - fintroller_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction( + override deploy( + name_: string, + symbol_: string, + maturity_: BigNumberish, + balanceSheet_: AddressLike, + fintroller_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( name_, symbol_, maturity_, @@ -1279,21 +1283,22 @@ export class HToken__factory extends ContractFactory { fintroller_, underlying_, overrides || {} - ); - } - override attach(address: string): HToken { - return super.attach(address) as HToken; + ) as Promise< + HToken & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): HToken__factory { - return super.connect(signer) as HToken__factory; + override connect(runner: ContractRunner | null): HToken__factory { + return super.connect(runner) as HToken__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): HTokenInterface { - return new utils.Interface(_abi) as HTokenInterface; + return new Interface(_abi) as HTokenInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): HToken { - return new Contract(address, _abi, signerOrProvider) as HToken; + static connect(address: string, runner?: ContractRunner | null): HToken { + return new Contract(address, _abi, runner) as unknown as HToken; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts index eddefb97..347415b4 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IHToken, IHTokenInterface, @@ -1011,12 +1010,9 @@ const _abi = [ export class IHToken__factory { static readonly abi = _abi; static createInterface(): IHTokenInterface { - return new utils.Interface(_abi) as IHTokenInterface; + return new Interface(_abi) as IHTokenInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IHToken { - return new Contract(address, _abi, signerOrProvider) as IHToken; + static connect(address: string, runner?: ContractRunner | null): IHToken { + return new Contract(address, _abi, runner) as unknown as IHToken; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts index e1523a24..f5accd9e 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IAggregatorV3, IAggregatorV3Interface, @@ -126,12 +125,12 @@ const _abi = [ export class IAggregatorV3__factory { static readonly abi = _abi; static createInterface(): IAggregatorV3Interface { - return new utils.Interface(_abi) as IAggregatorV3Interface; + return new Interface(_abi) as IAggregatorV3Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IAggregatorV3 { - return new Contract(address, _abi, signerOrProvider) as IAggregatorV3; + return new Contract(address, _abi, runner) as unknown as IAggregatorV3; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/oracles/ChainlinkOperator__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/oracles/ChainlinkOperator__factory.ts index 58f2b83f..3e81f81d 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/oracles/ChainlinkOperator__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/oracles/ChainlinkOperator__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../../common"; import type { ChainlinkOperator, ChainlinkOperatorInterface, @@ -366,32 +371,31 @@ export class ChainlinkOperator__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): ChainlinkOperator { - return super.attach(address) as ChainlinkOperator; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + ChainlinkOperator & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): ChainlinkOperator__factory { - return super.connect(signer) as ChainlinkOperator__factory; + override connect(runner: ContractRunner | null): ChainlinkOperator__factory { + return super.connect(runner) as ChainlinkOperator__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): ChainlinkOperatorInterface { - return new utils.Interface(_abi) as ChainlinkOperatorInterface; + return new Interface(_abi) as ChainlinkOperatorInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): ChainlinkOperator { - return new Contract(address, _abi, signerOrProvider) as ChainlinkOperator; + return new Contract(address, _abi, runner) as unknown as ChainlinkOperator; } } diff --git a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts index 401ad9fb..66e49da1 100644 --- a/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts +++ b/packages/flash-swap/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IChainlinkOperator, IChainlinkOperatorInterface, @@ -271,12 +270,12 @@ const _abi = [ export class IChainlinkOperator__factory { static readonly abi = _abi; static createInterface(): IChainlinkOperatorInterface { - return new utils.Interface(_abi) as IChainlinkOperatorInterface; + return new Interface(_abi) as IChainlinkOperatorInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IChainlinkOperator { - return new Contract(address, _abi, signerOrProvider) as IChainlinkOperator; + return new Contract(address, _abi, runner) as unknown as IChainlinkOperator; } } diff --git a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/drafts/IERC20Permit__factory.ts b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/drafts/IERC20Permit__factory.ts index a8b3621c..c6c29d8e 100644 --- a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/drafts/IERC20Permit__factory.ts +++ b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/drafts/IERC20Permit__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC20Permit, IERC20PermitInterface, @@ -90,12 +89,12 @@ const _abi = [ export class IERC20Permit__factory { static readonly abi = _abi; static createInterface(): IERC20PermitInterface { - return new utils.Interface(_abi) as IERC20PermitInterface; + return new Interface(_abi) as IERC20PermitInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IERC20Permit { - return new Contract(address, _abi, signerOrProvider) as IERC20Permit; + return new Contract(address, _abi, runner) as unknown as IERC20Permit; } } diff --git a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/introspection/ERC165__factory.ts b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/introspection/ERC165__factory.ts index f61ace15..d221b0d7 100644 --- a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/introspection/ERC165__factory.ts +++ b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/introspection/ERC165__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { ERC165, ERC165Interface, @@ -34,9 +33,9 @@ const _abi = [ export class ERC165__factory { static readonly abi = _abi; static createInterface(): ERC165Interface { - return new utils.Interface(_abi) as ERC165Interface; + return new Interface(_abi) as ERC165Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): ERC165 { - return new Contract(address, _abi, signerOrProvider) as ERC165; + static connect(address: string, runner?: ContractRunner | null): ERC165 { + return new Contract(address, _abi, runner) as unknown as ERC165; } } diff --git a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/introspection/IERC165__factory.ts b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/introspection/IERC165__factory.ts index ebb1963e..b8459353 100644 --- a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/introspection/IERC165__factory.ts +++ b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/introspection/IERC165__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC165, IERC165Interface, @@ -34,12 +33,9 @@ const _abi = [ export class IERC165__factory { static readonly abi = _abi; static createInterface(): IERC165Interface { - return new utils.Interface(_abi) as IERC165Interface; + return new Interface(_abi) as IERC165Interface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC165 { - return new Contract(address, _abi, signerOrProvider) as IERC165; + static connect(address: string, runner?: ContractRunner | null): IERC165 { + return new Contract(address, _abi, runner) as unknown as IERC165; } } diff --git a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts index 888cd590..f0a574c9 100644 --- a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts +++ b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC20, IERC20Interface, @@ -198,9 +197,9 @@ const _abi = [ export class IERC20__factory { static readonly abi = _abi; static createInterface(): IERC20Interface { - return new utils.Interface(_abi) as IERC20Interface; + return new Interface(_abi) as IERC20Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): IERC20 { - return new Contract(address, _abi, signerOrProvider) as IERC20; + static connect(address: string, runner?: ContractRunner | null): IERC20 { + return new Contract(address, _abi, runner) as unknown as IERC20; } } diff --git a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/ERC721__factory.ts b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/ERC721__factory.ts index 84d32584..f68dc5a7 100644 --- a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/ERC721__factory.ts +++ b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/ERC721__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../../common"; import type { ERC721, ERC721Interface, @@ -447,33 +452,34 @@ export class ERC721__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(name_, symbol_, overrides || {}) as Promise; - } override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + name_: string, + symbol_: string, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(name_, symbol_, overrides || {}); } - override attach(address: string): ERC721 { - return super.attach(address) as ERC721; + override deploy( + name_: string, + symbol_: string, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(name_, symbol_, overrides || {}) as Promise< + ERC721 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): ERC721__factory { - return super.connect(signer) as ERC721__factory; + override connect(runner: ContractRunner | null): ERC721__factory { + return super.connect(runner) as ERC721__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): ERC721Interface { - return new utils.Interface(_abi) as ERC721Interface; + return new Interface(_abi) as ERC721Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): ERC721 { - return new Contract(address, _abi, signerOrProvider) as ERC721; + static connect(address: string, runner?: ContractRunner | null): ERC721 { + return new Contract(address, _abi, runner) as unknown as ERC721; } } diff --git a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Enumerable__factory.ts b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Enumerable__factory.ts index fb40d7fe..ecc45881 100644 --- a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Enumerable__factory.ts +++ b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Enumerable__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC721Enumerable, IERC721EnumerableInterface, @@ -356,12 +355,12 @@ const _abi = [ export class IERC721Enumerable__factory { static readonly abi = _abi; static createInterface(): IERC721EnumerableInterface { - return new utils.Interface(_abi) as IERC721EnumerableInterface; + return new Interface(_abi) as IERC721EnumerableInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IERC721Enumerable { - return new Contract(address, _abi, signerOrProvider) as IERC721Enumerable; + return new Contract(address, _abi, runner) as unknown as IERC721Enumerable; } } diff --git a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Metadata__factory.ts b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Metadata__factory.ts index 1719f0b5..aaf3b3b3 100644 --- a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Metadata__factory.ts +++ b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Metadata__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC721Metadata, IERC721MetadataInterface, @@ -345,12 +344,12 @@ const _abi = [ export class IERC721Metadata__factory { static readonly abi = _abi; static createInterface(): IERC721MetadataInterface { - return new utils.Interface(_abi) as IERC721MetadataInterface; + return new Interface(_abi) as IERC721MetadataInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IERC721Metadata { - return new Contract(address, _abi, signerOrProvider) as IERC721Metadata; + return new Contract(address, _abi, runner) as unknown as IERC721Metadata; } } diff --git a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory.ts b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory.ts index 52ca02fd..b65d280d 100644 --- a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory.ts +++ b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC721Receiver, IERC721ReceiverInterface, @@ -49,12 +48,12 @@ const _abi = [ export class IERC721Receiver__factory { static readonly abi = _abi; static createInterface(): IERC721ReceiverInterface { - return new utils.Interface(_abi) as IERC721ReceiverInterface; + return new Interface(_abi) as IERC721ReceiverInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IERC721Receiver { - return new Contract(address, _abi, signerOrProvider) as IERC721Receiver; + return new Contract(address, _abi, runner) as unknown as IERC721Receiver; } } diff --git a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.ts b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.ts index 48c95ed7..a8b295a5 100644 --- a/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.ts +++ b/packages/flash-swap/src/types/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC721, IERC721Interface, @@ -300,12 +299,9 @@ const _abi = [ export class IERC721__factory { static readonly abi = _abi; static createInterface(): IERC721Interface { - return new utils.Interface(_abi) as IERC721Interface; + return new Interface(_abi) as IERC721Interface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC721 { - return new Contract(address, _abi, signerOrProvider) as IERC721; + static connect(address: string, runner?: ContractRunner | null): IERC721 { + return new Contract(address, _abi, runner) as unknown as IERC721; } } diff --git a/packages/flash-swap/src/types/factories/@prb/contracts/access/IOwnable__factory.ts b/packages/flash-swap/src/types/factories/@prb/contracts/access/IOwnable__factory.ts index 19e3f14c..0c4b5713 100644 --- a/packages/flash-swap/src/types/factories/@prb/contracts/access/IOwnable__factory.ts +++ b/packages/flash-swap/src/types/factories/@prb/contracts/access/IOwnable__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IOwnable, IOwnableInterface, @@ -67,12 +66,9 @@ const _abi = [ export class IOwnable__factory { static readonly abi = _abi; static createInterface(): IOwnableInterface { - return new utils.Interface(_abi) as IOwnableInterface; + return new Interface(_abi) as IOwnableInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IOwnable { - return new Contract(address, _abi, signerOrProvider) as IOwnable; + static connect(address: string, runner?: ContractRunner | null): IOwnable { + return new Contract(address, _abi, runner) as unknown as IOwnable; } } diff --git a/packages/flash-swap/src/types/factories/@prb/contracts/access/Ownable__factory.ts b/packages/flash-swap/src/types/factories/@prb/contracts/access/Ownable__factory.ts index 44e96ef3..5535b2da 100644 --- a/packages/flash-swap/src/types/factories/@prb/contracts/access/Ownable__factory.ts +++ b/packages/flash-swap/src/types/factories/@prb/contracts/access/Ownable__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { Ownable, OwnableInterface, @@ -110,32 +115,28 @@ export class Ownable__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): Ownable { - return super.attach(address) as Ownable; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + Ownable & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Ownable__factory { - return super.connect(signer) as Ownable__factory; + override connect(runner: ContractRunner | null): Ownable__factory { + return super.connect(runner) as Ownable__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): OwnableInterface { - return new utils.Interface(_abi) as OwnableInterface; + return new Interface(_abi) as OwnableInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Ownable { - return new Contract(address, _abi, signerOrProvider) as Ownable; + static connect(address: string, runner?: ContractRunner | null): Ownable { + return new Contract(address, _abi, runner) as unknown as Ownable; } } diff --git a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts index 8f5dd542..6e3417a4 100644 --- a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts +++ b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts @@ -2,15 +2,18 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; +import type { NonPayableOverrides } from "../../../../../common"; import type { Erc20Permit, Erc20PermitInterface, @@ -530,25 +533,12 @@ export class Erc20Permit__factory extends ContractFactory { } } - override deploy( - _name: PromiseOrValue, - _symbol: PromiseOrValue, - _decimals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - _name, - _symbol, - _decimals, - overrides || {} - ) as Promise; - } override getDeployTransaction( - _name: PromiseOrValue, - _symbol: PromiseOrValue, - _decimals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + _name: string, + _symbol: string, + _decimals: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( _name, _symbol, @@ -556,22 +546,28 @@ export class Erc20Permit__factory extends ContractFactory { overrides || {} ); } - override attach(address: string): Erc20Permit { - return super.attach(address) as Erc20Permit; + override deploy( + _name: string, + _symbol: string, + _decimals: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(_name, _symbol, _decimals, overrides || {}) as Promise< + Erc20Permit & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Erc20Permit__factory { - return super.connect(signer) as Erc20Permit__factory; + override connect(runner: ContractRunner | null): Erc20Permit__factory { + return super.connect(runner) as Erc20Permit__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): Erc20PermitInterface { - return new utils.Interface(_abi) as Erc20PermitInterface; + return new Interface(_abi) as Erc20PermitInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Erc20Permit { - return new Contract(address, _abi, signerOrProvider) as Erc20Permit; + static connect(address: string, runner?: ContractRunner | null): Erc20Permit { + return new Contract(address, _abi, runner) as unknown as Erc20Permit; } } diff --git a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts index a565fae0..f505e93f 100644 --- a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts +++ b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { Erc20Recover, Erc20RecoverInterface, @@ -224,12 +223,12 @@ const _abi = [ export class Erc20Recover__factory { static readonly abi = _abi; static createInterface(): Erc20RecoverInterface { - return new utils.Interface(_abi) as Erc20RecoverInterface; + return new Interface(_abi) as Erc20RecoverInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): Erc20Recover { - return new Contract(address, _abi, signerOrProvider) as Erc20Recover; + return new Contract(address, _abi, runner) as unknown as Erc20Recover; } } diff --git a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts index f8ccda02..6e258a19 100644 --- a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts +++ b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts @@ -2,15 +2,18 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; +import type { NonPayableOverrides } from "../../../../../common"; import type { Erc20, Erc20Interface, @@ -382,25 +385,12 @@ export class Erc20__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - name_, - symbol_, - decimals_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( name_, symbol_, @@ -408,19 +398,28 @@ export class Erc20__factory extends ContractFactory { overrides || {} ); } - override attach(address: string): Erc20 { - return super.attach(address) as Erc20; + override deploy( + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(name_, symbol_, decimals_, overrides || {}) as Promise< + Erc20 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Erc20__factory { - return super.connect(signer) as Erc20__factory; + override connect(runner: ContractRunner | null): Erc20__factory { + return super.connect(runner) as Erc20__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): Erc20Interface { - return new utils.Interface(_abi) as Erc20Interface; + return new Interface(_abi) as Erc20Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): Erc20 { - return new Contract(address, _abi, signerOrProvider) as Erc20; + static connect(address: string, runner?: ContractRunner | null): Erc20 { + return new Contract(address, _abi, runner) as unknown as Erc20; } } diff --git a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts index 05eb441a..9b6c0a46 100644 --- a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts +++ b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20Permit, IErc20PermitInterface, @@ -386,12 +385,12 @@ const _abi = [ export class IErc20Permit__factory { static readonly abi = _abi; static createInterface(): IErc20PermitInterface { - return new utils.Interface(_abi) as IErc20PermitInterface; + return new Interface(_abi) as IErc20PermitInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IErc20Permit { - return new Contract(address, _abi, signerOrProvider) as IErc20Permit; + return new Contract(address, _abi, runner) as unknown as IErc20Permit; } } diff --git a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts index b9104d39..56d4c9ce 100644 --- a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts +++ b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20Recover, IErc20RecoverInterface, @@ -161,12 +160,12 @@ const _abi = [ export class IErc20Recover__factory { static readonly abi = _abi; static createInterface(): IErc20RecoverInterface { - return new utils.Interface(_abi) as IErc20RecoverInterface; + return new Interface(_abi) as IErc20RecoverInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IErc20Recover { - return new Contract(address, _abi, signerOrProvider) as IErc20Recover; + return new Contract(address, _abi, runner) as unknown as IErc20Recover; } } diff --git a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts index 9661f226..573bf6fe 100644 --- a/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts +++ b/packages/flash-swap/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20, IErc20Interface, @@ -285,9 +284,9 @@ const _abi = [ export class IErc20__factory { static readonly abi = _abi; static createInterface(): IErc20Interface { - return new utils.Interface(_abi) as IErc20Interface; + return new Interface(_abi) as IErc20Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): IErc20 { - return new Contract(address, _abi, signerOrProvider) as IErc20; + static connect(address: string, runner?: ContractRunner | null): IErc20 { + return new Contract(address, _abi, runner) as unknown as IErc20; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/UniswapV2ERC20__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/UniswapV2ERC20__factory.ts index 838f559a..9bcd9489 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/UniswapV2ERC20__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/UniswapV2ERC20__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { UniswapV2ERC20, UniswapV2ERC20Interface, @@ -374,32 +379,31 @@ export class UniswapV2ERC20__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): UniswapV2ERC20 { - return super.attach(address) as UniswapV2ERC20; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + UniswapV2ERC20 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): UniswapV2ERC20__factory { - return super.connect(signer) as UniswapV2ERC20__factory; + override connect(runner: ContractRunner | null): UniswapV2ERC20__factory { + return super.connect(runner) as UniswapV2ERC20__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): UniswapV2ERC20Interface { - return new utils.Interface(_abi) as UniswapV2ERC20Interface; + return new Interface(_abi) as UniswapV2ERC20Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): UniswapV2ERC20 { - return new Contract(address, _abi, signerOrProvider) as UniswapV2ERC20; + return new Contract(address, _abi, runner) as unknown as UniswapV2ERC20; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee__factory.ts index 7a522990..ce1b23de 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV2Callee, IUniswapV2CalleeInterface, @@ -43,12 +42,12 @@ const _abi = [ export class IUniswapV2Callee__factory { static readonly abi = _abi; static createInterface(): IUniswapV2CalleeInterface { - return new utils.Interface(_abi) as IUniswapV2CalleeInterface; + return new Interface(_abi) as IUniswapV2CalleeInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV2Callee { - return new Contract(address, _abi, signerOrProvider) as IUniswapV2Callee; + return new Contract(address, _abi, runner) as unknown as IUniswapV2Callee; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2ERC20__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2ERC20__factory.ts index d0a8d148..93a16b95 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2ERC20__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2ERC20__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV2ERC20, IUniswapV2ERC20Interface, @@ -325,12 +324,12 @@ const _abi = [ export class IUniswapV2ERC20__factory { static readonly abi = _abi; static createInterface(): IUniswapV2ERC20Interface { - return new utils.Interface(_abi) as IUniswapV2ERC20Interface; + return new Interface(_abi) as IUniswapV2ERC20Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV2ERC20 { - return new Contract(address, _abi, signerOrProvider) as IUniswapV2ERC20; + return new Contract(address, _abi, runner) as unknown as IUniswapV2ERC20; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts index bd816e28..89a77ec9 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV2Factory, IUniswapV2FactoryInterface, @@ -178,12 +177,12 @@ const _abi = [ export class IUniswapV2Factory__factory { static readonly abi = _abi; static createInterface(): IUniswapV2FactoryInterface { - return new utils.Interface(_abi) as IUniswapV2FactoryInterface; + return new Interface(_abi) as IUniswapV2FactoryInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV2Factory { - return new Contract(address, _abi, signerOrProvider) as IUniswapV2Factory; + return new Contract(address, _abi, runner) as unknown as IUniswapV2Factory; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IERC20Minimal__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IERC20Minimal__factory.ts index 6517a38f..70d82d52 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IERC20Minimal__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IERC20Minimal__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC20Minimal, IERC20MinimalInterface, @@ -185,12 +184,12 @@ const _abi = [ export class IERC20Minimal__factory { static readonly abi = _abi; static createInterface(): IERC20MinimalInterface { - return new utils.Interface(_abi) as IERC20MinimalInterface; + return new Interface(_abi) as IERC20MinimalInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IERC20Minimal { - return new Contract(address, _abi, signerOrProvider) as IERC20Minimal; + return new Contract(address, _abi, runner) as unknown as IERC20Minimal; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory__factory.ts index 149e034b..fef764b0 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3Factory, IUniswapV3FactoryInterface, @@ -211,12 +210,12 @@ const _abi = [ export class IUniswapV3Factory__factory { static readonly abi = _abi; static createInterface(): IUniswapV3FactoryInterface { - return new utils.Interface(_abi) as IUniswapV3FactoryInterface; + return new Interface(_abi) as IUniswapV3FactoryInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3Factory { - return new Contract(address, _abi, signerOrProvider) as IUniswapV3Factory; + return new Contract(address, _abi, runner) as unknown as IUniswapV3Factory; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3PoolDeployer__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3PoolDeployer__factory.ts index 367c6223..029b3f2d 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3PoolDeployer__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3PoolDeployer__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3PoolDeployer, IUniswapV3PoolDeployerInterface, @@ -48,16 +47,16 @@ const _abi = [ export class IUniswapV3PoolDeployer__factory { static readonly abi = _abi; static createInterface(): IUniswapV3PoolDeployerInterface { - return new utils.Interface(_abi) as IUniswapV3PoolDeployerInterface; + return new Interface(_abi) as IUniswapV3PoolDeployerInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3PoolDeployer { return new Contract( address, _abi, - signerOrProvider - ) as IUniswapV3PoolDeployer; + runner + ) as unknown as IUniswapV3PoolDeployer; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool__factory.ts index 71683bb2..7101846a 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3Pool, IUniswapV3PoolInterface, @@ -996,12 +995,12 @@ const _abi = [ export class IUniswapV3Pool__factory { static readonly abi = _abi; static createInterface(): IUniswapV3PoolInterface { - return new utils.Interface(_abi) as IUniswapV3PoolInterface; + return new Interface(_abi) as IUniswapV3PoolInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3Pool { - return new Contract(address, _abi, signerOrProvider) as IUniswapV3Pool; + return new Contract(address, _abi, runner) as unknown as IUniswapV3Pool; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3FlashCallback__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3FlashCallback__factory.ts index 6676b9a6..74d4bbf7 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3FlashCallback__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3FlashCallback__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3FlashCallback, IUniswapV3FlashCallbackInterface, @@ -38,16 +37,16 @@ const _abi = [ export class IUniswapV3FlashCallback__factory { static readonly abi = _abi; static createInterface(): IUniswapV3FlashCallbackInterface { - return new utils.Interface(_abi) as IUniswapV3FlashCallbackInterface; + return new Interface(_abi) as IUniswapV3FlashCallbackInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3FlashCallback { return new Contract( address, _abi, - signerOrProvider - ) as IUniswapV3FlashCallback; + runner + ) as unknown as IUniswapV3FlashCallback; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback__factory.ts index 0eb34878..1b84f298 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3MintCallback, IUniswapV3MintCallbackInterface, @@ -38,16 +37,16 @@ const _abi = [ export class IUniswapV3MintCallback__factory { static readonly abi = _abi; static createInterface(): IUniswapV3MintCallbackInterface { - return new utils.Interface(_abi) as IUniswapV3MintCallbackInterface; + return new Interface(_abi) as IUniswapV3MintCallbackInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3MintCallback { return new Contract( address, _abi, - signerOrProvider - ) as IUniswapV3MintCallback; + runner + ) as unknown as IUniswapV3MintCallback; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts index a9788811..2213b0bc 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3SwapCallback, IUniswapV3SwapCallbackInterface, @@ -38,16 +37,16 @@ const _abi = [ export class IUniswapV3SwapCallback__factory { static readonly abi = _abi; static createInterface(): IUniswapV3SwapCallbackInterface { - return new utils.Interface(_abi) as IUniswapV3SwapCallbackInterface; + return new Interface(_abi) as IUniswapV3SwapCallbackInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3SwapCallback { return new Contract( address, _abi, - signerOrProvider - ) as IUniswapV3SwapCallback; + runner + ) as unknown as IUniswapV3SwapCallback; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions__factory.ts index 678e131f..80def3cf 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3PoolActions, IUniswapV3PoolActionsInterface, @@ -235,16 +234,16 @@ const _abi = [ export class IUniswapV3PoolActions__factory { static readonly abi = _abi; static createInterface(): IUniswapV3PoolActionsInterface { - return new utils.Interface(_abi) as IUniswapV3PoolActionsInterface; + return new Interface(_abi) as IUniswapV3PoolActionsInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3PoolActions { return new Contract( address, _abi, - signerOrProvider - ) as IUniswapV3PoolActions; + runner + ) as unknown as IUniswapV3PoolActions; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState__factory.ts index 5676cd32..640fe942 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3PoolDerivedState, IUniswapV3PoolDerivedStateInterface, @@ -73,16 +72,16 @@ const _abi = [ export class IUniswapV3PoolDerivedState__factory { static readonly abi = _abi; static createInterface(): IUniswapV3PoolDerivedStateInterface { - return new utils.Interface(_abi) as IUniswapV3PoolDerivedStateInterface; + return new Interface(_abi) as IUniswapV3PoolDerivedStateInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3PoolDerivedState { return new Contract( address, _abi, - signerOrProvider - ) as IUniswapV3PoolDerivedState; + runner + ) as unknown as IUniswapV3PoolDerivedState; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents__factory.ts index 47438de5..f8fae4a3 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3PoolEvents, IUniswapV3PoolEventsInterface, @@ -342,16 +341,16 @@ const _abi = [ export class IUniswapV3PoolEvents__factory { static readonly abi = _abi; static createInterface(): IUniswapV3PoolEventsInterface { - return new utils.Interface(_abi) as IUniswapV3PoolEventsInterface; + return new Interface(_abi) as IUniswapV3PoolEventsInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3PoolEvents { return new Contract( address, _abi, - signerOrProvider - ) as IUniswapV3PoolEvents; + runner + ) as unknown as IUniswapV3PoolEvents; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables__factory.ts index aa602597..5e2e49df 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3PoolImmutables, IUniswapV3PoolImmutablesInterface, @@ -93,16 +92,16 @@ const _abi = [ export class IUniswapV3PoolImmutables__factory { static readonly abi = _abi; static createInterface(): IUniswapV3PoolImmutablesInterface { - return new utils.Interface(_abi) as IUniswapV3PoolImmutablesInterface; + return new Interface(_abi) as IUniswapV3PoolImmutablesInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3PoolImmutables { return new Contract( address, _abi, - signerOrProvider - ) as IUniswapV3PoolImmutables; + runner + ) as unknown as IUniswapV3PoolImmutables; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions__factory.ts index 3da8923a..95edf9f4 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3PoolOwnerActions, IUniswapV3PoolOwnerActionsInterface, @@ -67,16 +66,16 @@ const _abi = [ export class IUniswapV3PoolOwnerActions__factory { static readonly abi = _abi; static createInterface(): IUniswapV3PoolOwnerActionsInterface { - return new utils.Interface(_abi) as IUniswapV3PoolOwnerActionsInterface; + return new Interface(_abi) as IUniswapV3PoolOwnerActionsInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3PoolOwnerActions { return new Contract( address, _abi, - signerOrProvider - ) as IUniswapV3PoolOwnerActions; + runner + ) as unknown as IUniswapV3PoolOwnerActions; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState__factory.ts index 8d4cc25f..8d93a937 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3PoolState, IUniswapV3PoolStateInterface, @@ -261,12 +260,16 @@ const _abi = [ export class IUniswapV3PoolState__factory { static readonly abi = _abi; static createInterface(): IUniswapV3PoolStateInterface { - return new utils.Interface(_abi) as IUniswapV3PoolStateInterface; + return new Interface(_abi) as IUniswapV3PoolStateInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3PoolState { - return new Contract(address, _abi, signerOrProvider) as IUniswapV3PoolState; + return new Contract( + address, + _abi, + runner + ) as unknown as IUniswapV3PoolState; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/ERC721Permit__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/ERC721Permit__factory.ts index dabbc97a..d16ecd16 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/ERC721Permit__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/ERC721Permit__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { ERC721Permit, ERC721PermitInterface, @@ -478,12 +477,12 @@ const _abi = [ export class ERC721Permit__factory { static readonly abi = _abi; static createInterface(): ERC721PermitInterface { - return new utils.Interface(_abi) as ERC721PermitInterface; + return new Interface(_abi) as ERC721PermitInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): ERC721Permit { - return new Contract(address, _abi, signerOrProvider) as ERC721Permit; + return new Contract(address, _abi, runner) as unknown as ERC721Permit; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/LiquidityManagement__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/LiquidityManagement__factory.ts index 563112d1..22c14b72 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/LiquidityManagement__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/LiquidityManagement__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { LiquidityManagement, LiquidityManagementInterface, @@ -116,12 +115,16 @@ const _abi = [ export class LiquidityManagement__factory { static readonly abi = _abi; static createInterface(): LiquidityManagementInterface { - return new utils.Interface(_abi) as LiquidityManagementInterface; + return new Interface(_abi) as LiquidityManagementInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): LiquidityManagement { - return new Contract(address, _abi, signerOrProvider) as LiquidityManagement; + return new Contract( + address, + _abi, + runner + ) as unknown as LiquidityManagement; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/Multicall__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/Multicall__factory.ts index 1da311a0..2e26a1bd 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/Multicall__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/Multicall__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { Multicall, MulticallInterface, @@ -34,12 +33,9 @@ const _abi = [ export class Multicall__factory { static readonly abi = _abi; static createInterface(): MulticallInterface { - return new utils.Interface(_abi) as MulticallInterface; + return new Interface(_abi) as MulticallInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Multicall { - return new Contract(address, _abi, signerOrProvider) as Multicall; + static connect(address: string, runner?: ContractRunner | null): Multicall { + return new Contract(address, _abi, runner) as unknown as Multicall; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PeripheryImmutableState__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PeripheryImmutableState__factory.ts index 05fd71b5..455b5533 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PeripheryImmutableState__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PeripheryImmutableState__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { PeripheryImmutableState, PeripheryImmutableStateInterface, @@ -41,16 +40,16 @@ const _abi = [ export class PeripheryImmutableState__factory { static readonly abi = _abi; static createInterface(): PeripheryImmutableStateInterface { - return new utils.Interface(_abi) as PeripheryImmutableStateInterface; + return new Interface(_abi) as PeripheryImmutableStateInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): PeripheryImmutableState { return new Contract( address, _abi, - signerOrProvider - ) as PeripheryImmutableState; + runner + ) as unknown as PeripheryImmutableState; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PeripheryPayments__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PeripheryPayments__factory.ts index 6ced911b..22e7ab39 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PeripheryPayments__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PeripheryPayments__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { PeripheryPayments, PeripheryPaymentsInterface, @@ -93,12 +92,12 @@ const _abi = [ export class PeripheryPayments__factory { static readonly abi = _abi; static createInterface(): PeripheryPaymentsInterface { - return new utils.Interface(_abi) as PeripheryPaymentsInterface; + return new Interface(_abi) as PeripheryPaymentsInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): PeripheryPayments { - return new Contract(address, _abi, signerOrProvider) as PeripheryPayments; + return new Contract(address, _abi, runner) as unknown as PeripheryPayments; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PoolInitializer__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PoolInitializer__factory.ts index 1058c6b5..4a37bf2d 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PoolInitializer__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/PoolInitializer__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { PoolInitializer, PoolInitializerInterface, @@ -75,12 +74,12 @@ const _abi = [ export class PoolInitializer__factory { static readonly abi = _abi; static createInterface(): PoolInitializerInterface { - return new utils.Interface(_abi) as PoolInitializerInterface; + return new Interface(_abi) as PoolInitializerInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): PoolInitializer { - return new Contract(address, _abi, signerOrProvider) as PoolInitializer; + return new Contract(address, _abi, runner) as unknown as PoolInitializer; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/SelfPermit__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/SelfPermit__factory.ts index d1fe2648..7aa92f95 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/SelfPermit__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/base/SelfPermit__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { SelfPermit, SelfPermitInterface, @@ -167,12 +166,9 @@ const _abi = [ export class SelfPermit__factory { static readonly abi = _abi; static createInterface(): SelfPermitInterface { - return new utils.Interface(_abi) as SelfPermitInterface; + return new Interface(_abi) as SelfPermitInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): SelfPermit { - return new Contract(address, _abi, signerOrProvider) as SelfPermit; + static connect(address: string, runner?: ContractRunner | null): SelfPermit { + return new Contract(address, _abi, runner) as unknown as SelfPermit; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IERC721Permit__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IERC721Permit__factory.ts index 1768475d..5d44f4a1 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IERC721Permit__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IERC721Permit__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC721Permit, IERC721PermitInterface, @@ -364,12 +363,12 @@ const _abi = [ export class IERC721Permit__factory { static readonly abi = _abi; static createInterface(): IERC721PermitInterface { - return new utils.Interface(_abi) as IERC721PermitInterface; + return new Interface(_abi) as IERC721PermitInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IERC721Permit { - return new Contract(address, _abi, signerOrProvider) as IERC721Permit; + return new Contract(address, _abi, runner) as unknown as IERC721Permit; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IMulticall__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IMulticall__factory.ts index b4e1ea55..70134865 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IMulticall__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IMulticall__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IMulticall, IMulticallInterface, @@ -34,12 +33,9 @@ const _abi = [ export class IMulticall__factory { static readonly abi = _abi; static createInterface(): IMulticallInterface { - return new utils.Interface(_abi) as IMulticallInterface; + return new Interface(_abi) as IMulticallInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IMulticall { - return new Contract(address, _abi, signerOrProvider) as IMulticall; + static connect(address: string, runner?: ContractRunner | null): IMulticall { + return new Contract(address, _abi, runner) as unknown as IMulticall; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager__factory.ts index 99c6c2e0..b04844ea 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { INonfungiblePositionManager, INonfungiblePositionManagerInterface, @@ -1004,16 +1003,16 @@ const _abi = [ export class INonfungiblePositionManager__factory { static readonly abi = _abi; static createInterface(): INonfungiblePositionManagerInterface { - return new utils.Interface(_abi) as INonfungiblePositionManagerInterface; + return new Interface(_abi) as INonfungiblePositionManagerInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): INonfungiblePositionManager { return new Contract( address, _abi, - signerOrProvider - ) as INonfungiblePositionManager; + runner + ) as unknown as INonfungiblePositionManager; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState__factory.ts index c5c54989..f8f21ca8 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IPeripheryImmutableState, IPeripheryImmutableStateInterface, @@ -41,16 +40,16 @@ const _abi = [ export class IPeripheryImmutableState__factory { static readonly abi = _abi; static createInterface(): IPeripheryImmutableStateInterface { - return new utils.Interface(_abi) as IPeripheryImmutableStateInterface; + return new Interface(_abi) as IPeripheryImmutableStateInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IPeripheryImmutableState { return new Contract( address, _abi, - signerOrProvider - ) as IPeripheryImmutableState; + runner + ) as unknown as IPeripheryImmutableState; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments__factory.ts index 659c0acd..b5616f54 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IPeripheryPayments, IPeripheryPaymentsInterface, @@ -63,12 +62,12 @@ const _abi = [ export class IPeripheryPayments__factory { static readonly abi = _abi; static createInterface(): IPeripheryPaymentsInterface { - return new utils.Interface(_abi) as IPeripheryPaymentsInterface; + return new Interface(_abi) as IPeripheryPaymentsInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IPeripheryPayments { - return new Contract(address, _abi, signerOrProvider) as IPeripheryPayments; + return new Contract(address, _abi, runner) as unknown as IPeripheryPayments; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer__factory.ts index f05a8383..1eaa536e 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IPoolInitializer, IPoolInitializerInterface, @@ -49,12 +48,12 @@ const _abi = [ export class IPoolInitializer__factory { static readonly abi = _abi; static createInterface(): IPoolInitializerInterface { - return new utils.Interface(_abi) as IPoolInitializerInterface; + return new Interface(_abi) as IPoolInitializerInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IPoolInitializer { - return new Contract(address, _abi, signerOrProvider) as IPoolInitializer; + return new Contract(address, _abi, runner) as unknown as IPoolInitializer; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/ISelfPermit__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/ISelfPermit__factory.ts index cb683c64..046ab64d 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/ISelfPermit__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/ISelfPermit__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { ISelfPermit, ISelfPermitInterface, @@ -167,12 +166,9 @@ const _abi = [ export class ISelfPermit__factory { static readonly abi = _abi; static createInterface(): ISelfPermitInterface { - return new utils.Interface(_abi) as ISelfPermitInterface; + return new Interface(_abi) as ISelfPermitInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ISelfPermit { - return new Contract(address, _abi, signerOrProvider) as ISelfPermit; + static connect(address: string, runner?: ContractRunner | null): ISelfPermit { + return new Contract(address, _abi, runner) as unknown as ISelfPermit; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IERC1271__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IERC1271__factory.ts index 61aca30c..d2753ebf 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IERC1271__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IERC1271__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC1271, IERC1271Interface, @@ -39,12 +38,9 @@ const _abi = [ export class IERC1271__factory { static readonly abi = _abi; static createInterface(): IERC1271Interface { - return new utils.Interface(_abi) as IERC1271Interface; + return new Interface(_abi) as IERC1271Interface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC1271 { - return new Contract(address, _abi, signerOrProvider) as IERC1271; + static connect(address: string, runner?: ContractRunner | null): IERC1271 { + return new Contract(address, _abi, runner) as unknown as IERC1271; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IERC20PermitAllowed__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IERC20PermitAllowed__factory.ts index 6de2718d..688920b3 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IERC20PermitAllowed__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IERC20PermitAllowed__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IERC20PermitAllowed, IERC20PermitAllowedInterface, @@ -63,12 +62,16 @@ const _abi = [ export class IERC20PermitAllowed__factory { static readonly abi = _abi; static createInterface(): IERC20PermitAllowedInterface { - return new utils.Interface(_abi) as IERC20PermitAllowedInterface; + return new Interface(_abi) as IERC20PermitAllowedInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IERC20PermitAllowed { - return new Contract(address, _abi, signerOrProvider) as IERC20PermitAllowed; + return new Contract( + address, + _abi, + runner + ) as unknown as IERC20PermitAllowed; } } diff --git a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IWETH9__factory.ts b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IWETH9__factory.ts index 9a42c282..a538f972 100644 --- a/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IWETH9__factory.ts +++ b/packages/flash-swap/src/types/factories/@uniswap/v3-periphery/contracts/interfaces/external/IWETH9__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IWETH9, IWETH9Interface, @@ -218,9 +217,9 @@ const _abi = [ export class IWETH9__factory { static readonly abi = _abi; static createInterface(): IWETH9Interface { - return new utils.Interface(_abi) as IWETH9Interface; + return new Interface(_abi) as IWETH9Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): IWETH9 { - return new Contract(address, _abi, signerOrProvider) as IWETH9; + static connect(address: string, runner?: ContractRunner | null): IWETH9 { + return new Contract(address, _abi, runner) as unknown as IWETH9; } } diff --git a/packages/flash-swap/src/types/factories/contracts/test/GodModeErc20__factory.ts b/packages/flash-swap/src/types/factories/contracts/test/GodModeErc20__factory.ts index 3934f300..0337c1e5 100644 --- a/packages/flash-swap/src/types/factories/contracts/test/GodModeErc20__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/test/GodModeErc20__factory.ts @@ -2,15 +2,18 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeErc20, GodModeErc20Interface, @@ -489,25 +492,12 @@ export class GodModeErc20__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - name_, - symbol_, - decimals_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( name_, symbol_, @@ -515,22 +505,31 @@ export class GodModeErc20__factory extends ContractFactory { overrides || {} ); } - override attach(address: string): GodModeErc20 { - return super.attach(address) as GodModeErc20; + override deploy( + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(name_, symbol_, decimals_, overrides || {}) as Promise< + GodModeErc20 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeErc20__factory { - return super.connect(signer) as GodModeErc20__factory; + override connect(runner: ContractRunner | null): GodModeErc20__factory { + return super.connect(runner) as GodModeErc20__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeErc20Interface { - return new utils.Interface(_abi) as GodModeErc20Interface; + return new Interface(_abi) as GodModeErc20Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeErc20 { - return new Contract(address, _abi, signerOrProvider) as GodModeErc20; + return new Contract(address, _abi, runner) as unknown as GodModeErc20; } } diff --git a/packages/flash-swap/src/types/factories/contracts/test/GodModeHToken__factory.ts b/packages/flash-swap/src/types/factories/contracts/test/GodModeHToken__factory.ts index 4bd38748..9c97db08 100644 --- a/packages/flash-swap/src/types/factories/contracts/test/GodModeHToken__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/test/GodModeHToken__factory.ts @@ -2,15 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + AddressLike, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeHToken, GodModeHTokenInterface, @@ -1269,16 +1273,16 @@ export class GodModeHToken__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - balanceSheet_: PromiseOrValue, - fintroller_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( + override getDeployTransaction( + name_: string, + symbol_: string, + maturity_: BigNumberish, + balanceSheet_: AddressLike, + fintroller_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( name_, symbol_, maturity_, @@ -1286,18 +1290,18 @@ export class GodModeHToken__factory extends ContractFactory { fintroller_, underlying_, overrides || {} - ) as Promise; + ); } - override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - balanceSheet_: PromiseOrValue, - fintroller_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction( + override deploy( + name_: string, + symbol_: string, + maturity_: BigNumberish, + balanceSheet_: AddressLike, + fintroller_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( name_, symbol_, maturity_, @@ -1305,24 +1309,25 @@ export class GodModeHToken__factory extends ContractFactory { fintroller_, underlying_, overrides || {} - ); - } - override attach(address: string): GodModeHToken { - return super.attach(address) as GodModeHToken; + ) as Promise< + GodModeHToken & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeHToken__factory { - return super.connect(signer) as GodModeHToken__factory; + override connect(runner: ContractRunner | null): GodModeHToken__factory { + return super.connect(runner) as GodModeHToken__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeHTokenInterface { - return new utils.Interface(_abi) as GodModeHTokenInterface; + return new Interface(_abi) as GodModeHTokenInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeHToken { - return new Contract(address, _abi, signerOrProvider) as GodModeHToken; + return new Contract(address, _abi, runner) as unknown as GodModeHToken; } } diff --git a/packages/flash-swap/src/types/factories/contracts/test/SimplePriceFeed__factory.ts b/packages/flash-swap/src/types/factories/contracts/test/SimplePriceFeed__factory.ts index 71f677ab..bd4341e2 100644 --- a/packages/flash-swap/src/types/factories/contracts/test/SimplePriceFeed__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/test/SimplePriceFeed__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { SimplePriceFeed, SimplePriceFeedInterface, @@ -167,37 +172,35 @@ export class SimplePriceFeed__factory extends ContractFactory { } } - override deploy( - description_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - description_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - description_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + description_: string, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(description_, overrides || {}); } - override attach(address: string): SimplePriceFeed { - return super.attach(address) as SimplePriceFeed; + override deploy( + description_: string, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(description_, overrides || {}) as Promise< + SimplePriceFeed & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): SimplePriceFeed__factory { - return super.connect(signer) as SimplePriceFeed__factory; + override connect(runner: ContractRunner | null): SimplePriceFeed__factory { + return super.connect(runner) as SimplePriceFeed__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): SimplePriceFeedInterface { - return new utils.Interface(_abi) as SimplePriceFeedInterface; + return new Interface(_abi) as SimplePriceFeedInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): SimplePriceFeed { - return new Contract(address, _abi, signerOrProvider) as SimplePriceFeed; + return new Contract(address, _abi, runner) as unknown as SimplePriceFeed; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/FlashUniswapV2__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/FlashUniswapV2__factory.ts index 46ab5306..aeada99c 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/FlashUniswapV2__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/FlashUniswapV2__factory.ts @@ -2,15 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BytesLike, - Overrides, + AddressLike, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import type { NonPayableOverrides } from "../../../common"; import type { FlashUniswapV2, FlashUniswapV2Interface, @@ -317,48 +321,49 @@ export class FlashUniswapV2__factory extends ContractFactory { } } - override deploy( - balanceSheet_: PromiseOrValue, - uniV2Factory_: PromiseOrValue, - uniV2PairInitCodeHash_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( + override getDeployTransaction( + balanceSheet_: AddressLike, + uniV2Factory_: AddressLike, + uniV2PairInitCodeHash_: BytesLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( balanceSheet_, uniV2Factory_, uniV2PairInitCodeHash_, overrides || {} - ) as Promise; + ); } - override getDeployTransaction( - balanceSheet_: PromiseOrValue, - uniV2Factory_: PromiseOrValue, - uniV2PairInitCodeHash_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction( + override deploy( + balanceSheet_: AddressLike, + uniV2Factory_: AddressLike, + uniV2PairInitCodeHash_: BytesLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( balanceSheet_, uniV2Factory_, uniV2PairInitCodeHash_, overrides || {} - ); - } - override attach(address: string): FlashUniswapV2 { - return super.attach(address) as FlashUniswapV2; + ) as Promise< + FlashUniswapV2 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): FlashUniswapV2__factory { - return super.connect(signer) as FlashUniswapV2__factory; + override connect(runner: ContractRunner | null): FlashUniswapV2__factory { + return super.connect(runner) as FlashUniswapV2__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): FlashUniswapV2Interface { - return new utils.Interface(_abi) as FlashUniswapV2Interface; + return new Interface(_abi) as FlashUniswapV2Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): FlashUniswapV2 { - return new Contract(address, _abi, signerOrProvider) as FlashUniswapV2; + return new Contract(address, _abi, runner) as unknown as FlashUniswapV2; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/IFlashUniswapV2__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/IFlashUniswapV2__factory.ts index 214cac7a..770f87c5 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/IFlashUniswapV2__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/IFlashUniswapV2__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IFlashUniswapV2, IFlashUniswapV2Interface, @@ -256,12 +255,12 @@ const _abi = [ export class IFlashUniswapV2__factory { static readonly abi = _abi; static createInterface(): IFlashUniswapV2Interface { - return new utils.Interface(_abi) as IFlashUniswapV2Interface; + return new Interface(_abi) as IFlashUniswapV2Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IFlashUniswapV2 { - return new Contract(address, _abi, signerOrProvider) as IFlashUniswapV2; + return new Contract(address, _abi, runner) as unknown as IFlashUniswapV2; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/IUniswapV2Pair__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/IUniswapV2Pair__factory.ts index aa786fbc..64553bea 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/IUniswapV2Pair__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/IUniswapV2Pair__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV2Pair, IUniswapV2PairInterface, @@ -666,12 +665,12 @@ const _abi = [ export class IUniswapV2Pair__factory { static readonly abi = _abi; static createInterface(): IUniswapV2PairInterface { - return new utils.Interface(_abi) as IUniswapV2PairInterface; + return new Interface(_abi) as IUniswapV2PairInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV2Pair { - return new Contract(address, _abi, signerOrProvider) as IUniswapV2Pair; + return new Contract(address, _abi, runner) as unknown as IUniswapV2Pair; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/UniswapV2Pair.sol/Erc20Interface__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/UniswapV2Pair.sol/Erc20Interface__factory.ts index 9bc0ec58..5c90536a 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/UniswapV2Pair.sol/Erc20Interface__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/UniswapV2Pair.sol/Erc20Interface__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { Erc20Interface, Erc20InterfaceInterface, @@ -255,12 +254,12 @@ const _abi = [ export class Erc20Interface__factory { static readonly abi = _abi; static createInterface(): Erc20InterfaceInterface { - return new utils.Interface(_abi) as Erc20InterfaceInterface; + return new Interface(_abi) as Erc20InterfaceInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): Erc20Interface { - return new Contract(address, _abi, signerOrProvider) as Erc20Interface; + return new Contract(address, _abi, runner) as unknown as Erc20Interface; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/UniswapV2Pair.sol/UniswapV2Pair__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/UniswapV2Pair.sol/UniswapV2Pair__factory.ts index f7eb3ee3..1db03a41 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/UniswapV2Pair.sol/UniswapV2Pair__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/UniswapV2Pair.sol/UniswapV2Pair__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { UniswapV2Pair, UniswapV2PairInterface, @@ -743,32 +748,31 @@ export class UniswapV2Pair__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): UniswapV2Pair { - return super.attach(address) as UniswapV2Pair; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + UniswapV2Pair & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): UniswapV2Pair__factory { - return super.connect(signer) as UniswapV2Pair__factory; + override connect(runner: ContractRunner | null): UniswapV2Pair__factory { + return super.connect(runner) as UniswapV2Pair__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): UniswapV2PairInterface { - return new utils.Interface(_abi) as UniswapV2PairInterface; + return new Interface(_abi) as UniswapV2PairInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): UniswapV2Pair { - return new Contract(address, _abi, signerOrProvider) as UniswapV2Pair; + return new Contract(address, _abi, runner) as unknown as UniswapV2Pair; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/GodModeUniswapV2Factory__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/GodModeUniswapV2Factory__factory.ts index 743de66f..3427c38e 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/GodModeUniswapV2Factory__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/GodModeUniswapV2Factory__factory.ts @@ -1,9 +1,19 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { GodModeUniswapV2Factory, GodModeUniswapV2FactoryInterface, @@ -223,41 +233,41 @@ export class GodModeUniswapV2Factory__factory extends ContractFactory { } } - override deploy( - _feeToSetter: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - _feeToSetter, - overrides || {} - ) as Promise; - } override getDeployTransaction( - _feeToSetter: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + _feeToSetter: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(_feeToSetter, overrides || {}); } - override attach(address: string): GodModeUniswapV2Factory { - return super.attach(address) as GodModeUniswapV2Factory; + override deploy( + _feeToSetter: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(_feeToSetter, overrides || {}) as Promise< + GodModeUniswapV2Factory & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeUniswapV2Factory__factory { - return super.connect(signer) as GodModeUniswapV2Factory__factory; + override connect( + runner: ContractRunner | null + ): GodModeUniswapV2Factory__factory { + return super.connect(runner) as GodModeUniswapV2Factory__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeUniswapV2FactoryInterface { - return new utils.Interface(_abi) as GodModeUniswapV2FactoryInterface; + return new Interface(_abi) as GodModeUniswapV2FactoryInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeUniswapV2Factory { return new Contract( address, _abi, - signerOrProvider - ) as GodModeUniswapV2Factory; + runner + ) as unknown as GodModeUniswapV2Factory; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/GodModeUniswapV2Pair__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/GodModeUniswapV2Pair__factory.ts index 0c355477..9186a0b9 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/GodModeUniswapV2Pair__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/GodModeUniswapV2Pair__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { GodModeUniswapV2Pair, GodModeUniswapV2PairInterface, @@ -767,36 +772,37 @@ export class GodModeUniswapV2Pair__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): GodModeUniswapV2Pair { - return super.attach(address) as GodModeUniswapV2Pair; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + GodModeUniswapV2Pair & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeUniswapV2Pair__factory { - return super.connect(signer) as GodModeUniswapV2Pair__factory; + override connect( + runner: ContractRunner | null + ): GodModeUniswapV2Pair__factory { + return super.connect(runner) as GodModeUniswapV2Pair__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeUniswapV2PairInterface { - return new utils.Interface(_abi) as GodModeUniswapV2PairInterface; + return new Interface(_abi) as GodModeUniswapV2PairInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeUniswapV2Pair { return new Contract( address, _abi, - signerOrProvider - ) as GodModeUniswapV2Pair; + runner + ) as unknown as GodModeUniswapV2Pair; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/MaliciousPair__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/MaliciousPair__factory.ts index 363b0402..666b8940 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/MaliciousPair__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v2/test/MaliciousPair__factory.ts @@ -1,9 +1,19 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { MaliciousPair, MaliciousPairInterface, @@ -128,44 +138,41 @@ export class MaliciousPair__factory extends ContractFactory { } } - override deploy( - collateral_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - collateral_, - underlying_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - collateral_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + collateral_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( collateral_, underlying_, overrides || {} ); } - override attach(address: string): MaliciousPair { - return super.attach(address) as MaliciousPair; + override deploy( + collateral_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(collateral_, underlying_, overrides || {}) as Promise< + MaliciousPair & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): MaliciousPair__factory { - return super.connect(signer) as MaliciousPair__factory; + override connect(runner: ContractRunner | null): MaliciousPair__factory { + return super.connect(runner) as MaliciousPair__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): MaliciousPairInterface { - return new utils.Interface(_abi) as MaliciousPairInterface; + return new Interface(_abi) as MaliciousPairInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): MaliciousPair { - return new Contract(address, _abi, signerOrProvider) as MaliciousPair; + return new Contract(address, _abi, runner) as unknown as MaliciousPair; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v3/FlashUniswapV3__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v3/FlashUniswapV3__factory.ts index 86d61ca2..2203aec2 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v3/FlashUniswapV3__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v3/FlashUniswapV3__factory.ts @@ -1,9 +1,19 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { FlashUniswapV3, FlashUniswapV3Interface, @@ -267,44 +277,45 @@ export class FlashUniswapV3__factory extends ContractFactory { } } - override deploy( - balanceSheet_: PromiseOrValue, - uniV3Factory_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - balanceSheet_, - uniV3Factory_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - balanceSheet_: PromiseOrValue, - uniV3Factory_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + balanceSheet_: AddressLike, + uniV3Factory_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( balanceSheet_, uniV3Factory_, overrides || {} ); } - override attach(address: string): FlashUniswapV3 { - return super.attach(address) as FlashUniswapV3; + override deploy( + balanceSheet_: AddressLike, + uniV3Factory_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( + balanceSheet_, + uniV3Factory_, + overrides || {} + ) as Promise< + FlashUniswapV3 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): FlashUniswapV3__factory { - return super.connect(signer) as FlashUniswapV3__factory; + override connect(runner: ContractRunner | null): FlashUniswapV3__factory { + return super.connect(runner) as FlashUniswapV3__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): FlashUniswapV3Interface { - return new utils.Interface(_abi) as FlashUniswapV3Interface; + return new Interface(_abi) as FlashUniswapV3Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): FlashUniswapV3 { - return new Contract(address, _abi, signerOrProvider) as FlashUniswapV3; + return new Contract(address, _abi, runner) as unknown as FlashUniswapV3; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v3/IFlashUniswapV3__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v3/IFlashUniswapV3__factory.ts index 43e66467..8af81e8a 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v3/IFlashUniswapV3__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v3/IFlashUniswapV3__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IFlashUniswapV3, IFlashUniswapV3Interface, @@ -218,12 +217,12 @@ const _abi = [ export class IFlashUniswapV3__factory { static readonly abi = _abi; static createInterface(): IFlashUniswapV3Interface { - return new utils.Interface(_abi) as IFlashUniswapV3Interface; + return new Interface(_abi) as IFlashUniswapV3Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IFlashUniswapV3 { - return new Contract(address, _abi, signerOrProvider) as IFlashUniswapV3; + return new Contract(address, _abi, runner) as unknown as IFlashUniswapV3; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v3/UniswapV3Pool__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v3/UniswapV3Pool__factory.ts index f6aefbc3..1797ab52 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v3/UniswapV3Pool__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v3/UniswapV3Pool__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { UniswapV3Pool, UniswapV3PoolInterface, @@ -1018,32 +1023,31 @@ export class UniswapV3Pool__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): UniswapV3Pool { - return super.attach(address) as UniswapV3Pool; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + UniswapV3Pool & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): UniswapV3Pool__factory { - return super.connect(signer) as UniswapV3Pool__factory; + override connect(runner: ContractRunner | null): UniswapV3Pool__factory { + return super.connect(runner) as UniswapV3Pool__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): UniswapV3PoolInterface { - return new utils.Interface(_abi) as UniswapV3PoolInterface; + return new Interface(_abi) as UniswapV3PoolInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): UniswapV3Pool { - return new Contract(address, _abi, signerOrProvider) as UniswapV3Pool; + return new Contract(address, _abi, runner) as unknown as UniswapV3Pool; } } diff --git a/packages/flash-swap/src/types/factories/contracts/uniswap-v3/test/GodModeNonfungiblePositionManager__factory.ts b/packages/flash-swap/src/types/factories/contracts/uniswap-v3/test/GodModeNonfungiblePositionManager__factory.ts index fdbb408e..82c05323 100644 --- a/packages/flash-swap/src/types/factories/contracts/uniswap-v3/test/GodModeNonfungiblePositionManager__factory.ts +++ b/packages/flash-swap/src/types/factories/contracts/uniswap-v3/test/GodModeNonfungiblePositionManager__factory.ts @@ -1,9 +1,19 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { GodModeNonfungiblePositionManager, GodModeNonfungiblePositionManagerInterface, @@ -1248,46 +1258,43 @@ export class GodModeNonfungiblePositionManager__factory extends ContractFactory } } - override deploy( - _factory: PromiseOrValue, - _WETH9: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - _factory, - _WETH9, - overrides || {} - ) as Promise; - } override getDeployTransaction( - _factory: PromiseOrValue, - _WETH9: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + _factory: AddressLike, + _WETH9: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(_factory, _WETH9, overrides || {}); } - override attach(address: string): GodModeNonfungiblePositionManager { - return super.attach(address) as GodModeNonfungiblePositionManager; + override deploy( + _factory: AddressLike, + _WETH9: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(_factory, _WETH9, overrides || {}) as Promise< + GodModeNonfungiblePositionManager & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeNonfungiblePositionManager__factory { - return super.connect(signer) as GodModeNonfungiblePositionManager__factory; + override connect( + runner: ContractRunner | null + ): GodModeNonfungiblePositionManager__factory { + return super.connect(runner) as GodModeNonfungiblePositionManager__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeNonfungiblePositionManagerInterface { - return new utils.Interface( - _abi - ) as GodModeNonfungiblePositionManagerInterface; + return new Interface(_abi) as GodModeNonfungiblePositionManagerInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeNonfungiblePositionManager { return new Contract( address, _abi, - signerOrProvider - ) as GodModeNonfungiblePositionManager; + runner + ) as unknown as GodModeNonfungiblePositionManager; } } diff --git a/packages/flash-swap/src/types/hardhat.d.ts b/packages/flash-swap/src/types/hardhat.d.ts index 20d902f2..fcab54a2 100644 --- a/packages/flash-swap/src/types/hardhat.d.ts +++ b/packages/flash-swap/src/types/hardhat.d.ts @@ -4,9 +4,10 @@ import { ethers } from "ethers"; import { + DeployContractOptions, FactoryOptions, HardhatEthersHelpers as HardhatEthersHelpersBase, -} from "@nomiclabs/hardhat-ethers/types"; +} from "@nomicfoundation/hardhat-ethers/types"; import * as Contracts from "."; @@ -331,400 +332,1113 @@ declare module "hardhat/types/runtime" { getContractAt( name: "IOwnableUpgradeable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "OwnableUpgradeable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "BalanceSheetV2", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IBalanceSheetV2", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "SBalanceSheetV1", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "SBalanceSheetV2", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Fintroller", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IFintroller", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "HToken", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IHToken", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IAggregatorV3", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "ChainlinkOperator", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IChainlinkOperator", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC20Permit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "ERC165", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC165", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "ERC721", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC721", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC721Enumerable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC721Metadata", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC721Receiver", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IOwnable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Ownable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Erc20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Erc20Permit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Erc20Recover", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20Permit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20Recover", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV2Callee", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV2ERC20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV2Factory", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "UniswapV2ERC20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3FlashCallback", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3MintCallback", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3SwapCallback", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC20Minimal", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3Factory", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3Pool", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3PoolDeployer", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3PoolActions", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3PoolDerivedState", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3PoolEvents", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3PoolImmutables", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3PoolOwnerActions", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3PoolState", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "ERC721Permit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "LiquidityManagement", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Multicall", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "PeripheryImmutableState", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "PeripheryPayments", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "PoolInitializer", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "SelfPermit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC1271", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC20PermitAllowed", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IWETH9", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IERC721Permit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IMulticall", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "INonfungiblePositionManager", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IPeripheryImmutableState", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IPeripheryPayments", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IPoolInitializer", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "ISelfPermit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeErc20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeHToken", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "SimplePriceFeed", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "FlashUniswapV2", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IFlashUniswapV2", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV2Pair", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeUniswapV2Factory", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeUniswapV2Pair", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "MaliciousPair", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Erc20Interface", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "UniswapV2Pair", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "FlashUniswapV3", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IFlashUniswapV3", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeNonfungiblePositionManager", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "UniswapV3Pool", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; + deployContract( + name: "IOwnableUpgradeable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "OwnableUpgradeable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "BalanceSheetV2", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IBalanceSheetV2", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SBalanceSheetV1", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SBalanceSheetV2", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Fintroller", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFintroller", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HToken", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHToken", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IAggregatorV3", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ChainlinkOperator", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IChainlinkOperator", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC20Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ERC165", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC165", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ERC721", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Enumerable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Metadata", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Receiver", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IOwnable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Ownable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Recover", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Recover", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV2Callee", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV2ERC20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV2Factory", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "UniswapV2ERC20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3FlashCallback", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3MintCallback", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3SwapCallback", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC20Minimal", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3Factory", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3Pool", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolDeployer", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolActions", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolDerivedState", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolEvents", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolImmutables", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolOwnerActions", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolState", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ERC721Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "LiquidityManagement", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Multicall", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "PeripheryImmutableState", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "PeripheryPayments", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "PoolInitializer", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SelfPermit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC1271", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC20PermitAllowed", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IWETH9", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IMulticall", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "INonfungiblePositionManager", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IPeripheryImmutableState", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IPeripheryPayments", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IPoolInitializer", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ISelfPermit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeErc20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeHToken", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SimplePriceFeed", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "FlashUniswapV2", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFlashUniswapV2", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV2Pair", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeUniswapV2Factory", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeUniswapV2Pair", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "MaliciousPair", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Interface", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "UniswapV2Pair", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "FlashUniswapV3", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFlashUniswapV3", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeNonfungiblePositionManager", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "UniswapV3Pool", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + + deployContract( + name: "IOwnableUpgradeable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "OwnableUpgradeable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "BalanceSheetV2", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IBalanceSheetV2", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SBalanceSheetV1", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SBalanceSheetV2", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Fintroller", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFintroller", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HToken", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHToken", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IAggregatorV3", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ChainlinkOperator", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IChainlinkOperator", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC20Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ERC165", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC165", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ERC721", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Enumerable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Metadata", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Receiver", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IOwnable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Ownable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Recover", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Recover", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV2Callee", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV2ERC20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV2Factory", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "UniswapV2ERC20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3FlashCallback", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3MintCallback", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3SwapCallback", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC20Minimal", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3Factory", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3Pool", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolDeployer", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolActions", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolDerivedState", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolEvents", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolImmutables", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolOwnerActions", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PoolState", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ERC721Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "LiquidityManagement", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Multicall", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "PeripheryImmutableState", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "PeripheryPayments", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "PoolInitializer", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SelfPermit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC1271", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC20PermitAllowed", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IWETH9", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IMulticall", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "INonfungiblePositionManager", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IPeripheryImmutableState", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IPeripheryPayments", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IPoolInitializer", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ISelfPermit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeErc20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeHToken", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SimplePriceFeed", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "FlashUniswapV2", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFlashUniswapV2", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV2Pair", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeUniswapV2Factory", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeUniswapV2Pair", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "MaliciousPair", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Interface", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "UniswapV2Pair", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "FlashUniswapV3", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFlashUniswapV3", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeNonfungiblePositionManager", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "UniswapV3Pool", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + // default types getContractFactory( name: string, @@ -732,13 +1446,22 @@ declare module "hardhat/types/runtime" { ): Promise; getContractFactory( abi: any[], - bytecode: ethers.utils.BytesLike, + bytecode: ethers.BytesLike, signer?: ethers.Signer ): Promise; getContractAt( nameOrAbi: string | any[], - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; + deployContract( + name: string, + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: string, + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; } } diff --git a/packages/protocol/hardhat.config.ts b/packages/protocol/hardhat.config.ts index 4d169d5b..32085ebe 100644 --- a/packages/protocol/hardhat.config.ts +++ b/packages/protocol/hardhat.config.ts @@ -125,7 +125,6 @@ const config: HardhatUserConfig = { }, typechain: { outDir: "src/types", - target: "ethers-v5", }, }; diff --git a/packages/protocol/package.json b/packages/protocol/package.json index 5ac78404..e4415ce1 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -17,7 +17,7 @@ "@openzeppelin/contracts-upgradeable": "4.5.2", "@prb/contracts": "3.8.1", "@prb/math": "2.5.0", - "ethers": "^5.7.2" + "ethers": "^6.8.1" }, "devDependencies": { "@ethersproject/abstract-signer": "^5.7.0", @@ -30,7 +30,7 @@ "@nomiclabs/hardhat-etherscan": "^3.1.7", "@nomiclabs/hardhat-waffle": "^2.0.6", "@openzeppelin/hardhat-upgrades": "^1.16.1", - "@typechain/ethers-v5": "^10.2.1", + "@typechain/ethers-v6": "^0.5.1", "@typechain/hardhat": "^9.1.0", "@types/chai": "^4.3.10", "@types/mocha": "^10.0.4", @@ -45,7 +45,7 @@ "eslint": "^8.53.0", "eslint-config-prettier": "^8.10.0", "ethereum-waffle": "^4.0.10", - "ethers": "^5.7.2", + "ethers": "^6.8.1", "evm-bn": "^1.1.2", "hardhat": "^2.19.0", "hardhat-gas-reporter": "^1.0.9", diff --git a/packages/protocol/src/types/@prb/contracts/access/IOwnable.ts b/packages/protocol/src/types/@prb/contracts/access/IOwnable.ts index 249b973a..9991d058 100644 --- a/packages/protocol/src/types/@prb/contracts/access/IOwnable.ts +++ b/packages/protocol/src/types/@prb/contracts/access/IOwnable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IOwnableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IOwnableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface IOwnableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IOwnable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IOwnable; + waitForDeployment(): Promise; interface: IOwnableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/@prb/contracts/access/Ownable.ts b/packages/protocol/src/types/@prb/contracts/access/Ownable.ts index 3957bdb5..85ddc922 100644 --- a/packages/protocol/src/types/@prb/contracts/access/Ownable.ts +++ b/packages/protocol/src/types/@prb/contracts/access/Ownable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface OwnableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface OwnableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface OwnableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface Ownable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Ownable; + waitForDeployment(): Promise; interface: OwnableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20.ts b/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20.ts index 5b82f637..848dc820 100644 --- a/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20.ts +++ b/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20.ts @@ -3,47 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface Erc20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface Erc20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -57,26 +39,28 @@ export interface Erc20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -86,15 +70,11 @@ export interface Erc20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -120,345 +100,231 @@ export interface Erc20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface Erc20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Erc20; + waitForDeployment(): Promise; interface: Erc20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20Permit.ts b/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20Permit.ts index b2db9bf4..ec167ebb 100644 --- a/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20Permit.ts +++ b/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20Permit.ts @@ -3,52 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface Erc20PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface Erc20PermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -67,6 +44,8 @@ export interface Erc20PermitInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -77,40 +56,37 @@ export interface Erc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -120,15 +96,11 @@ export interface Erc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "version", values?: undefined): string; @@ -166,455 +138,280 @@ export interface Erc20PermitInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface Erc20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Erc20Permit; + waitForDeployment(): Promise; interface: Erc20PermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[string]>; - }; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + version: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20Recover.ts b/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20Recover.ts index 447e7490..af0b02fa 100644 --- a/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20Recover.ts +++ b/packages/protocol/src/types/@prb/contracts/token/erc20/Erc20Recover.ts @@ -3,42 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface Erc20RecoverInterface extends utils.Interface { - functions: { - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface Erc20RecoverInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_recover" | "_renounceOwnership" | "_setNonRecoverableTokens" @@ -47,9 +34,16 @@ export interface Erc20RecoverInterface extends utils.Interface { | "owner" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Recover" + | "SetNonRecoverableTokens" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -57,15 +51,15 @@ export interface Erc20RecoverInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -87,249 +81,211 @@ export interface Erc20RecoverInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "Recover(address,address,uint256)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface Erc20Recover extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Erc20Recover; + waitForDeployment(): Promise; interface: Erc20RecoverInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + nonRecoverableTokens: TypedContractMethod< + [arg0: BigNumberish], + [string], + "view" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - owner(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20.ts b/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20.ts index 6e2011b4..bd2fe3fa 100644 --- a/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20.ts +++ b/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20.ts @@ -3,47 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IErc20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -57,26 +39,28 @@ export interface IErc20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -86,15 +70,11 @@ export interface IErc20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -120,345 +100,231 @@ export interface IErc20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IErc20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20; + waitForDeployment(): Promise; interface: IErc20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20Permit.ts b/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20Permit.ts index 8c497255..7a9333d8 100644 --- a/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20Permit.ts +++ b/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20Permit.ts @@ -3,52 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IErc20PermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -67,6 +44,8 @@ export interface IErc20PermitInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -77,40 +56,37 @@ export interface IErc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -120,15 +96,11 @@ export interface IErc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "version", values?: undefined): string; @@ -166,455 +138,280 @@ export interface IErc20PermitInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IErc20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20Permit; + waitForDeployment(): Promise; interface: IErc20PermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[string]>; - }; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + version: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20Recover.ts b/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20Recover.ts index db433f4a..f259b269 100644 --- a/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20Recover.ts +++ b/packages/protocol/src/types/@prb/contracts/token/erc20/IErc20Recover.ts @@ -3,42 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20RecoverInterface extends utils.Interface { - functions: { - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IErc20RecoverInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_recover" | "_renounceOwnership" | "_setNonRecoverableTokens" @@ -47,9 +34,16 @@ export interface IErc20RecoverInterface extends utils.Interface { | "owner" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Recover" + | "SetNonRecoverableTokens" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -57,15 +51,15 @@ export interface IErc20RecoverInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -87,249 +81,211 @@ export interface IErc20RecoverInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "Recover(address,address,uint256)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IErc20Recover extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20Recover; + waitForDeployment(): Promise; interface: IErc20RecoverInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + nonRecoverableTokens: TypedContractMethod< + [index: BigNumberish], + [string], + "view" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - owner(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[index: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/common.ts b/packages/protocol/src/types/common.ts index 4c90b08b..56b5f21e 100644 --- a/packages/protocol/src/types/common.ts +++ b/packages/protocol/src/types/common.ts @@ -1,33 +1,66 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import type { Listener } from "@ethersproject/providers"; -import type { Event, EventFilter } from "ethers"; - -export interface TypedEvent< - TArgsArray extends Array = any, - TArgsObject = any -> extends Event { - args: TArgsArray & TArgsObject; -} +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from "ethers"; -export interface TypedEventFilter<_TEvent extends TypedEvent> - extends EventFilter {} +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> + extends DeferredTopicFilter {} -export interface TypedListener { - (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any +> { + (...args: Partial): TypedDeferredTopicFilter< + TypedContractEvent + >; + name: string; + fragment: EventFragment; + getFragment(...args: Partial): EventFragment; } -type __TypechainArgsArray = T extends TypedEvent ? U : never; +type __TypechainAOutputTuple = T extends TypedContractEvent< + infer _U, + infer W +> + ? W + : never; +type __TypechainOutputObject = T extends TypedContractEvent< + infer _U, + infer _W, + infer V +> + ? V + : never; -export interface OnEvent { - ( - eventFilter: TypedEventFilter, - listener: TypedListener - ): TRes; - (eventName: string, listener: Listener): TRes; +export interface TypedEventLog + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; } +export interface TypedLogDescription + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export type TypedListener = ( + ...listenerArg: [ + ...__TypechainAOutputTuple, + TypedEventLog, + ...undefined[] + ] +) => void; + export type MinEthersFactory = { deploy(...a: ARGS[]): Promise; }; @@ -38,9 +71,61 @@ export type GetContractTypeFromFactory = F extends MinEthersFactory< > ? C : never; - export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; -export type PromiseOrValue = T | Promise; +export type StateMutability = "nonpayable" | "payable" | "view"; + +export type BaseOverrides = Omit; +export type NonPayableOverrides = Omit< + BaseOverrides, + "value" | "blockTag" | "enableCcipRead" +>; +export type PayableOverrides = Omit< + BaseOverrides, + "blockTag" | "enableCcipRead" +>; +export type ViewOverrides = Omit; +export type Overrides = S extends "nonpayable" + ? NonPayableOverrides + : S extends "payable" + ? PayableOverrides + : ViewOverrides; + +export type PostfixOverrides, S extends StateMutability> = + | A + | [...A, Overrides]; +export type ContractMethodArgs< + A extends Array, + S extends StateMutability +> = PostfixOverrides<{ [I in keyof A]-?: A[I] | Typed }, S>; + +export type DefaultReturnType = R extends Array ? R[0] : R; + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod< + A extends Array = Array, + R = any, + S extends StateMutability = "payable" +> { + (...args: ContractMethodArgs): S extends "view" + ? Promise> + : Promise; + + name: string; + + fragment: FunctionFragment; + + getFragment(...args: ContractMethodArgs): FunctionFragment; + + populateTransaction( + ...args: ContractMethodArgs + ): Promise; + staticCall( + ...args: ContractMethodArgs + ): Promise>; + send(...args: ContractMethodArgs): Promise; + estimateGas(...args: ContractMethodArgs): Promise; + staticCallResult(...args: ContractMethodArgs): Promise; +} diff --git a/packages/protocol/src/types/contracts/access/IOwnableUpgradeable.ts b/packages/protocol/src/types/contracts/access/IOwnableUpgradeable.ts index 378f606e..c948a365 100644 --- a/packages/protocol/src/types/contracts/access/IOwnableUpgradeable.ts +++ b/packages/protocol/src/types/contracts/access/IOwnableUpgradeable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface IOwnableUpgradeableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IOwnableUpgradeableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface IOwnableUpgradeableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IOwnableUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IOwnableUpgradeable; + waitForDeployment(): Promise; interface: IOwnableUpgradeableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/access/OwnableUpgradeable.ts b/packages/protocol/src/types/contracts/access/OwnableUpgradeable.ts index ff468b63..a2aea459 100644 --- a/packages/protocol/src/types/contracts/access/OwnableUpgradeable.ts +++ b/packages/protocol/src/types/contracts/access/OwnableUpgradeable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface OwnableUpgradeableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface OwnableUpgradeableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface OwnableUpgradeableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface OwnableUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): OwnableUpgradeable; + waitForDeployment(): Promise; interface: OwnableUpgradeableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/core/balance-sheet/BalanceSheetV2.ts b/packages/protocol/src/types/contracts/core/balance-sheet/BalanceSheetV2.ts index 77295324..a38b68a3 100644 --- a/packages/protocol/src/types/contracts/core/balance-sheet/BalanceSheetV2.ts +++ b/packages/protocol/src/types/contracts/core/balance-sheet/BalanceSheetV2.ts @@ -3,58 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface BalanceSheetV2Interface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "borrow(address,uint256)": FunctionFragment; - "depositCollateral(address,uint256)": FunctionFragment; - "fintroller()": 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; - "getRepayAmount(address,uint256,address)": FunctionFragment; - "getSeizableCollateralAmount(address,uint256,address)": FunctionFragment; - "initialize(address,address)": FunctionFragment; - "liquidateBorrow(address,address,uint256,address)": FunctionFragment; - "oracle()": FunctionFragment; - "owner()": FunctionFragment; - "repayBorrow(address,uint256)": FunctionFragment; - "repayBorrowBehalf(address,address,uint256)": FunctionFragment; - "setFintroller(address)": FunctionFragment; - "setOracle(address)": FunctionFragment; - "withdrawCollateral(address,uint256)": FunctionFragment; - }; - +export interface BalanceSheetV2Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "borrow" @@ -79,21 +50,33 @@ export interface BalanceSheetV2Interface extends utils.Interface { | "withdrawCollateral" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Borrow" + | "DepositCollateral" + | "LiquidateBorrow" + | "RepayBorrow" + | "SetFintroller" + | "SetOracle" + | "TransferOwnership" + | "WithdrawCollateral" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "borrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -101,88 +84,65 @@ export interface BalanceSheetV2Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getBondList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCurrentAccountLiquidity", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getHypotheticalAccountLiquidity", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getRepayAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "getSeizableCollateralAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "initialize", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "liquidateBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData(functionFragment: "oracle", values?: undefined): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "repayBorrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "repayBorrowBehalf", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setFintroller", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "setOracle", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "withdrawCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -255,888 +215,650 @@ export interface BalanceSheetV2Interface extends utils.Interface { 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; - "SetFintroller(address,address,address)": 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: "SetFintroller"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetOracle"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawCollateral"): EventFragment; } -export interface BorrowEventObject { - account: string; - bond: string; - borrowAmount: BigNumber; +export namespace BorrowEvent { + export type InputTuple = [ + account: AddressLike, + bond: AddressLike, + borrowAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + bond: string, + borrowAmount: bigint + ]; + export interface OutputObject { + account: string; + bond: string; + borrowAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BorrowEvent = TypedEvent< - [string, string, BigNumber], - BorrowEventObject ->; - -export type BorrowEventFilter = TypedEventFilter; -export interface DepositCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace DepositCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositCollateralEvent = TypedEvent< - [string, string, BigNumber], - DepositCollateralEventObject ->; -export type DepositCollateralEventFilter = - TypedEventFilter; - -export interface LiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - collateral: string; - seizedCollateralAmount: BigNumber; +export namespace LiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike, + seizedCollateralAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + repayAmount: bigint, + collateral: string, + seizedCollateralAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + repayAmount: bigint; + collateral: string; + seizedCollateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type LiquidateBorrowEvent = TypedEvent< - [string, string, string, BigNumber, string, BigNumber], - LiquidateBorrowEventObject ->; - -export type LiquidateBorrowEventFilter = TypedEventFilter; -export interface RepayBorrowEventObject { - payer: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - newDebtAmount: BigNumber; +export namespace RepayBorrowEvent { + export type InputTuple = [ + payer: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + newDebtAmount: BigNumberish + ]; + export type OutputTuple = [ + payer: string, + borrower: string, + bond: string, + repayAmount: bigint, + newDebtAmount: bigint + ]; + export interface OutputObject { + payer: string; + borrower: string; + bond: string; + repayAmount: bigint; + newDebtAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RepayBorrowEvent = TypedEvent< - [string, string, string, BigNumber, BigNumber], - RepayBorrowEventObject ->; - -export type RepayBorrowEventFilter = TypedEventFilter; -export interface SetFintrollerEventObject { - owner: string; - oldFintroller: string; - newFintroller: string; +export namespace SetFintrollerEvent { + export type InputTuple = [ + owner: AddressLike, + oldFintroller: AddressLike, + newFintroller: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldFintroller: string, + newFintroller: string + ]; + export interface OutputObject { + owner: string; + oldFintroller: string; + newFintroller: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFintrollerEvent = TypedEvent< - [string, string, string], - SetFintrollerEventObject ->; -export type SetFintrollerEventFilter = TypedEventFilter; - -export interface SetOracleEventObject { - owner: string; - oldOracle: string; - newOracle: string; +export namespace SetOracleEvent { + export type InputTuple = [ + owner: AddressLike, + oldOracle: AddressLike, + newOracle: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldOracle: string, + newOracle: string + ]; + export interface OutputObject { + owner: string; + oldOracle: string; + newOracle: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetOracleEvent = TypedEvent< - [string, string, string], - SetOracleEventObject ->; - -export type SetOracleEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; -export interface WithdrawCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace WithdrawCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawCollateralEvent = TypedEvent< - [string, string, BigNumber], - WithdrawCollateralEventObject ->; - -export type WithdrawCollateralEventFilter = - TypedEventFilter; export interface BalanceSheetV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): BalanceSheetV2; + waitForDeployment(): Promise; interface: BalanceSheetV2Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { collateralAmount: BigNumber }>; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { debtAmount: BigNumber }>; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { repayAmount: BigNumber }>; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { seizableCollateralAmount: BigNumber }>; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - oracle(overrides?: CallOverrides): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; - fintroller(overrides?: CallOverrides): Promise; + borrow: TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + depositCollateral: TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" + >; - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + fintroller: TypedContractMethod<[], [string], "view">; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getBondList: TypedContractMethod<[account: AddressLike], [string[]], "view">; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + getCollateralAmount: TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" >; - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + getCollateralList: TypedContractMethod< + [account: AddressLike], + [string[]], + "view" >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getCurrentAccountLiquidity: TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getDebtAmount: TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; - oracle(overrides?: CallOverrides): Promise; + getHypotheticalAccountLiquidity: TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - owner(overrides?: CallOverrides): Promise; + getRepayAmount: TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getSeizableCollateralAmount: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + initialize: TypedContractMethod< + [fintroller_: AddressLike, oracle_: AddressLike], + [void], + "nonpayable" + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + liquidateBorrow: TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + oracle: TypedContractMethod<[], [string], "view">; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + owner: TypedContractMethod<[], [string], "view">; - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + repayBorrow: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + repayBorrowBehalf: TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setFintroller: TypedContractMethod< + [newFintroller: AddressLike], + [void], + "nonpayable" + >; - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setOracle: TypedContractMethod< + [newOracle: AddressLike], + [void], + "nonpayable" + >; - fintroller(overrides?: CallOverrides): Promise; + withdrawCollateral: TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "borrow" + ): TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateral" + ): TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getBondList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCollateralAmount" + ): TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getCollateralList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCurrentAccountLiquidity" + ): TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getDebtAmount" + ): TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getHypotheticalAccountLiquidity" + ): TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getRepayAmount" + ): TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getSeizableCollateralAmount" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod< + [fintroller_: AddressLike, oracle_: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "liquidateBorrow" + ): TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "oracle" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "repayBorrow" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "repayBorrowBehalf" + ): TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFintroller" + ): TypedContractMethod<[newFintroller: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setOracle" + ): TypedContractMethod<[newOracle: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getEvent( + key: "Borrow" + ): TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject + >; + getEvent( + key: "DepositCollateral" + ): TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + getEvent( + key: "LiquidateBorrow" + ): TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + getEvent( + key: "RepayBorrow" + ): TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + getEvent( + key: "SetFintroller" + ): TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + getEvent( + key: "SetOracle" + ): TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawCollateral" + ): TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + filters: { + "Borrow(address,address,uint256)": TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + Borrow: TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - oracle(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Borrow(address,address,uint256)"( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - Borrow( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - - "DepositCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - DepositCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - - "LiquidateBorrow(address,address,address,uint256,address,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - LiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - - "RepayBorrow(address,address,address,uint256,uint256)"( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - RepayBorrow( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - - "SetFintroller(address,address,address)"( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - SetFintroller( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - - "SetOracle(address,address,address)"( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - SetOracle( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - WithdrawCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - oracle(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - oracle(overrides?: CallOverrides): Promise; + "DepositCollateral(address,address,uint256)": TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + DepositCollateral: TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; - owner(overrides?: CallOverrides): Promise; + "LiquidateBorrow(address,address,address,uint256,address,uint256)": TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + LiquidateBorrow: TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "RepayBorrow(address,address,address,uint256,uint256)": TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + RepayBorrow: TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetFintroller(address,address,address)": TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + SetFintroller: TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetOracle(address,address,address)": TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + SetOracle: TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "WithdrawCollateral(address,address,uint256)": TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + WithdrawCollateral: TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/core/balance-sheet/IBalanceSheetV2.ts b/packages/protocol/src/types/contracts/core/balance-sheet/IBalanceSheetV2.ts index 5d41f4d6..321b81e7 100644 --- a/packages/protocol/src/types/contracts/core/balance-sheet/IBalanceSheetV2.ts +++ b/packages/protocol/src/types/contracts/core/balance-sheet/IBalanceSheetV2.ts @@ -3,55 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IBalanceSheetV2Interface extends 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; - "getRepayAmount(address,uint256,address)": FunctionFragment; - "getSeizableCollateralAmount(address,uint256,address)": FunctionFragment; - "liquidateBorrow(address,address,uint256,address)": FunctionFragment; - "owner()": FunctionFragment; - "repayBorrow(address,uint256)": FunctionFragment; - "repayBorrowBehalf(address,address,uint256)": FunctionFragment; - "setFintroller(address)": FunctionFragment; - "setOracle(address)": FunctionFragment; - "withdrawCollateral(address,uint256)": FunctionFragment; - }; - +export interface IBalanceSheetV2Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "borrow" @@ -73,101 +47,90 @@ export interface IBalanceSheetV2Interface extends utils.Interface { | "withdrawCollateral" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Borrow" + | "DepositCollateral" + | "LiquidateBorrow" + | "RepayBorrow" + | "SetFintroller" + | "SetOracle" + | "TransferOwnership" + | "WithdrawCollateral" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "borrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getBondList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCurrentAccountLiquidity", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getHypotheticalAccountLiquidity", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getRepayAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "getSeizableCollateralAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "liquidateBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "repayBorrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "repayBorrowBehalf", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setFintroller", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "setOracle", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "withdrawCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -237,838 +200,627 @@ export interface IBalanceSheetV2Interface extends utils.Interface { 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; - "SetFintroller(address,address,address)": 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: "SetFintroller"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetOracle"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawCollateral"): EventFragment; } -export interface BorrowEventObject { - account: string; - bond: string; - borrowAmount: BigNumber; +export namespace BorrowEvent { + export type InputTuple = [ + account: AddressLike, + bond: AddressLike, + borrowAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + bond: string, + borrowAmount: bigint + ]; + export interface OutputObject { + account: string; + bond: string; + borrowAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BorrowEvent = TypedEvent< - [string, string, BigNumber], - BorrowEventObject ->; -export type BorrowEventFilter = TypedEventFilter; - -export interface DepositCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace DepositCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositCollateralEvent = TypedEvent< - [string, string, BigNumber], - DepositCollateralEventObject ->; - -export type DepositCollateralEventFilter = - TypedEventFilter; -export interface LiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - collateral: string; - seizedCollateralAmount: BigNumber; +export namespace LiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike, + seizedCollateralAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + repayAmount: bigint, + collateral: string, + seizedCollateralAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + repayAmount: bigint; + collateral: string; + seizedCollateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type LiquidateBorrowEvent = TypedEvent< - [string, string, string, BigNumber, string, BigNumber], - LiquidateBorrowEventObject ->; - -export type LiquidateBorrowEventFilter = TypedEventFilter; -export interface RepayBorrowEventObject { - payer: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - newDebtAmount: BigNumber; +export namespace RepayBorrowEvent { + export type InputTuple = [ + payer: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + newDebtAmount: BigNumberish + ]; + export type OutputTuple = [ + payer: string, + borrower: string, + bond: string, + repayAmount: bigint, + newDebtAmount: bigint + ]; + export interface OutputObject { + payer: string; + borrower: string; + bond: string; + repayAmount: bigint; + newDebtAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RepayBorrowEvent = TypedEvent< - [string, string, string, BigNumber, BigNumber], - RepayBorrowEventObject ->; -export type RepayBorrowEventFilter = TypedEventFilter; - -export interface SetFintrollerEventObject { - owner: string; - oldFintroller: string; - newFintroller: string; +export namespace SetFintrollerEvent { + export type InputTuple = [ + owner: AddressLike, + oldFintroller: AddressLike, + newFintroller: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldFintroller: string, + newFintroller: string + ]; + export interface OutputObject { + owner: string; + oldFintroller: string; + newFintroller: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFintrollerEvent = TypedEvent< - [string, string, string], - SetFintrollerEventObject ->; - -export type SetFintrollerEventFilter = TypedEventFilter; -export interface SetOracleEventObject { - owner: string; - oldOracle: string; - newOracle: string; +export namespace SetOracleEvent { + export type InputTuple = [ + owner: AddressLike, + oldOracle: AddressLike, + newOracle: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldOracle: string, + newOracle: string + ]; + export interface OutputObject { + owner: string; + oldOracle: string; + newOracle: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetOracleEvent = TypedEvent< - [string, string, string], - SetOracleEventObject ->; - -export type SetOracleEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace WithdrawCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawCollateralEvent = TypedEvent< - [string, string, BigNumber], - WithdrawCollateralEventObject ->; - -export type WithdrawCollateralEventFilter = - TypedEventFilter; export interface IBalanceSheetV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IBalanceSheetV2; + waitForDeployment(): Promise; interface: IBalanceSheetV2Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { collateralAmount: BigNumber }>; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { debtAmount: BigNumber }>; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { repayAmount: BigNumber }>; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { seizableCollateralAmount: BigNumber }>; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + borrow: TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + depositCollateral: TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" >; - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getBondList: TypedContractMethod<[account: AddressLike], [string[]], "view">; - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + getCollateralAmount: TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getCollateralList: TypedContractMethod< + [account: AddressLike], + [string[]], + "view" + >; - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getCurrentAccountLiquidity: TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getDebtAmount: TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; - owner(overrides?: CallOverrides): Promise; + getHypotheticalAccountLiquidity: TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getRepayAmount: TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getSeizableCollateralAmount: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + liquidateBorrow: TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + owner: TypedContractMethod<[], [string], "view">; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + repayBorrow: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + repayBorrowBehalf: TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setFintroller: TypedContractMethod< + [newFintroller: AddressLike], + [void], + "nonpayable" + >; - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setOracle: TypedContractMethod< + [newOracle: AddressLike], + [void], + "nonpayable" + >; - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + withdrawCollateral: TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "borrow" + ): TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateral" + ): TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "getBondList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCollateralAmount" + ): TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getCollateralList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCurrentAccountLiquidity" + ): TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getDebtAmount" + ): TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getHypotheticalAccountLiquidity" + ): TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getRepayAmount" + ): TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getSeizableCollateralAmount" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "liquidateBorrow" + ): TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "repayBorrow" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "repayBorrowBehalf" + ): TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFintroller" + ): TypedContractMethod<[newFintroller: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setOracle" + ): TypedContractMethod<[newOracle: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getEvent( + key: "Borrow" + ): TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject + >; + getEvent( + key: "DepositCollateral" + ): TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + getEvent( + key: "LiquidateBorrow" + ): TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + getEvent( + key: "RepayBorrow" + ): TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + getEvent( + key: "SetFintroller" + ): TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + getEvent( + key: "SetOracle" + ): TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawCollateral" + ): TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + filters: { + "Borrow(address,address,uint256)": TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + Borrow: TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Borrow(address,address,uint256)"( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - Borrow( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - - "DepositCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - DepositCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - - "LiquidateBorrow(address,address,address,uint256,address,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - LiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - - "RepayBorrow(address,address,address,uint256,uint256)"( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - RepayBorrow( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - - "SetFintroller(address,address,address)"( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - SetFintroller( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - - "SetOracle(address,address,address)"( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - SetOracle( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - WithdrawCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "DepositCollateral(address,address,uint256)": TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + DepositCollateral: TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; - owner(overrides?: CallOverrides): Promise; + "LiquidateBorrow(address,address,address,uint256,address,uint256)": TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + LiquidateBorrow: TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "RepayBorrow(address,address,address,uint256,uint256)": TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + RepayBorrow: TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetFintroller(address,address,address)": TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + SetFintroller: TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetOracle(address,address,address)": TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + SetOracle: TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "WithdrawCollateral(address,address,uint256)": TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + WithdrawCollateral: TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/core/balance-sheet/SBalanceSheetV1.ts b/packages/protocol/src/types/contracts/core/balance-sheet/SBalanceSheetV1.ts index 77f2b7ac..71146b9a 100644 --- a/packages/protocol/src/types/contracts/core/balance-sheet/SBalanceSheetV1.ts +++ b/packages/protocol/src/types/contracts/core/balance-sheet/SBalanceSheetV1.ts @@ -3,31 +3,24 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, + TypedContractMethod, } from "../../../common"; -export interface SBalanceSheetV1Interface extends utils.Interface { - functions: { - "fintroller()": FunctionFragment; - "oracle()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "fintroller" | "oracle" - ): FunctionFragment; +export interface SBalanceSheetV1Interface extends Interface { + getFunction(nameOrSignature: "fintroller" | "oracle"): FunctionFragment; encodeFunctionData( functionFragment: "fintroller", @@ -37,63 +30,65 @@ export interface SBalanceSheetV1Interface extends utils.Interface { decodeFunctionResult(functionFragment: "fintroller", data: BytesLike): Result; decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - - events: {}; } export interface SBalanceSheetV1 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): SBalanceSheetV1; + waitForDeployment(): Promise; interface: SBalanceSheetV1Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - fintroller(overrides?: CallOverrides): Promise<[string]>; - - oracle(overrides?: CallOverrides): Promise<[string]>; - }; - - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - - callStatic: { - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + fintroller: TypedContractMethod<[], [string], "view">; + + oracle: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - oracle(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "oracle" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/protocol/src/types/contracts/core/balance-sheet/SBalanceSheetV2.ts b/packages/protocol/src/types/contracts/core/balance-sheet/SBalanceSheetV2.ts index e6184c81..ea87234f 100644 --- a/packages/protocol/src/types/contracts/core/balance-sheet/SBalanceSheetV2.ts +++ b/packages/protocol/src/types/contracts/core/balance-sheet/SBalanceSheetV2.ts @@ -3,31 +3,24 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, + TypedContractMethod, } from "../../../common"; -export interface SBalanceSheetV2Interface extends utils.Interface { - functions: { - "fintroller()": FunctionFragment; - "oracle()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "fintroller" | "oracle" - ): FunctionFragment; +export interface SBalanceSheetV2Interface extends Interface { + getFunction(nameOrSignature: "fintroller" | "oracle"): FunctionFragment; encodeFunctionData( functionFragment: "fintroller", @@ -37,63 +30,65 @@ export interface SBalanceSheetV2Interface extends utils.Interface { decodeFunctionResult(functionFragment: "fintroller", data: BytesLike): Result; decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - - events: {}; } export interface SBalanceSheetV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): SBalanceSheetV2; + waitForDeployment(): Promise; interface: SBalanceSheetV2Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - fintroller(overrides?: CallOverrides): Promise<[string]>; - - oracle(overrides?: CallOverrides): Promise<[string]>; - }; - - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - - callStatic: { - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + fintroller: TypedContractMethod<[], [string], "view">; + + oracle: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - oracle(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "oracle" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - fintroller(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/protocol/src/types/contracts/core/fintroller/Fintroller.ts b/packages/protocol/src/types/contracts/core/fintroller/Fintroller.ts index 10a432f5..7977ed1e 100644 --- a/packages/protocol/src/types/contracts/core/fintroller/Fintroller.ts +++ b/packages/protocol/src/types/contracts/core/fintroller/Fintroller.ts @@ -3,49 +3,45 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; export declare namespace IFintroller { export type BondStruct = { - debtCeiling: PromiseOrValue; - isBorrowAllowed: PromiseOrValue; - isDepositUnderlyingAllowed: PromiseOrValue; - isLiquidateBorrowAllowed: PromiseOrValue; - isListed: PromiseOrValue; - isRepayBorrowAllowed: PromiseOrValue; + debtCeiling: BigNumberish; + isBorrowAllowed: boolean; + isDepositUnderlyingAllowed: boolean; + isLiquidateBorrowAllowed: boolean; + isListed: boolean; + isRepayBorrowAllowed: boolean; }; export type BondStructOutput = [ - BigNumber, - boolean, - boolean, - boolean, - boolean, - boolean + debtCeiling: bigint, + isBorrowAllowed: boolean, + isDepositUnderlyingAllowed: boolean, + isLiquidateBorrowAllowed: boolean, + isListed: boolean, + isRepayBorrowAllowed: boolean ] & { - debtCeiling: BigNumber; + debtCeiling: bigint; isBorrowAllowed: boolean; isDepositUnderlyingAllowed: boolean; isLiquidateBorrowAllowed: boolean; @@ -54,65 +50,31 @@ export declare namespace IFintroller { }; export type CollateralStruct = { - ceiling: PromiseOrValue; - ratio: PromiseOrValue; - liquidationIncentive: PromiseOrValue; - isDepositCollateralAllowed: PromiseOrValue; - isListed: PromiseOrValue; + ceiling: BigNumberish; + ratio: BigNumberish; + liquidationIncentive: BigNumberish; + isDepositCollateralAllowed: boolean; + isListed: boolean; }; export type CollateralStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - boolean, - boolean + ceiling: bigint, + ratio: bigint, + liquidationIncentive: bigint, + isDepositCollateralAllowed: boolean, + isListed: boolean ] & { - ceiling: BigNumber; - ratio: BigNumber; - liquidationIncentive: BigNumber; + ceiling: bigint; + ratio: bigint; + liquidationIncentive: bigint; isDepositCollateralAllowed: boolean; isListed: boolean; }; } -export interface FintrollerInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "getBond(address)": FunctionFragment; - "getBorrowAllowed(address)": FunctionFragment; - "getCollateral(address)": FunctionFragment; - "getCollateralCeiling(address)": FunctionFragment; - "getCollateralRatio(address)": FunctionFragment; - "getDebtCeiling(address)": FunctionFragment; - "getDepositCollateralAllowed(address)": FunctionFragment; - "getDepositUnderlyingAllowed(address)": FunctionFragment; - "getLiquidateBorrowAllowed(address)": FunctionFragment; - "getLiquidationIncentive(address)": FunctionFragment; - "getRepayBorrowAllowed(address)": FunctionFragment; - "isBondListed(address)": FunctionFragment; - "isCollateralListed(address)": FunctionFragment; - "listBond(address)": FunctionFragment; - "listCollateral(address)": FunctionFragment; - "maxBonds()": FunctionFragment; - "maxCollaterals()": FunctionFragment; - "owner()": FunctionFragment; - "setBorrowAllowed(address,bool)": FunctionFragment; - "setCollateralCeiling(address,uint256)": FunctionFragment; - "setCollateralRatio(address,uint256)": FunctionFragment; - "setDebtCeiling(address,uint256)": FunctionFragment; - "setDepositCollateralAllowed(address,bool)": FunctionFragment; - "setDepositUnderlyingAllowed(address,bool)": FunctionFragment; - "setLiquidateBorrowAllowed(address,bool)": FunctionFragment; - "setLiquidationIncentive(address,uint256)": FunctionFragment; - "setMaxBonds(uint256)": FunctionFragment; - "setMaxCollaterals(uint256)": FunctionFragment; - "setRepayBorrowAllowed(address,bool)": FunctionFragment; - }; - +export interface FintrollerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "getBond" @@ -146,73 +108,91 @@ export interface FintrollerInterface extends utils.Interface { | "setRepayBorrowAllowed" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "ListBond" + | "ListCollateral" + | "SetBorrowAllowed" + | "SetCollateralCeiling" + | "SetCollateralRatio" + | "SetDebtCeiling" + | "SetDepositCollateralAllowed" + | "SetDepositUnderlyingAllowed" + | "SetLiquidateBorrowAllowed" + | "SetLiquidationIncentive" + | "SetMaxBonds" + | "SetMaxCollaterals" + | "SetRepayBorrowAllowed" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralRatio", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositCollateralAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositUnderlyingAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidateBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidationIncentive", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getRepayBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isBondListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isCollateralListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "maxBonds", values?: undefined): string; encodeFunctionData( @@ -222,47 +202,47 @@ export interface FintrollerInterface extends utils.Interface { encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "setBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setCollateralCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setCollateralRatio", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDebtCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDepositCollateralAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setDepositUnderlyingAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidateBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidationIncentive", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxBonds", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxCollaterals", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setRepayBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; decodeFunctionResult( @@ -377,1177 +357,876 @@ export interface FintrollerInterface extends utils.Interface { functionFragment: "setRepayBorrowAllowed", data: BytesLike ): Result; - - events: { - "ListBond(address,address)": EventFragment; - "ListCollateral(address,address)": EventFragment; - "SetBorrowAllowed(address,address,bool)": EventFragment; - "SetCollateralCeiling(address,address,uint256,uint256)": EventFragment; - "SetCollateralRatio(address,address,uint256,uint256)": EventFragment; - "SetDebtCeiling(address,address,uint256,uint256)": EventFragment; - "SetDepositCollateralAllowed(address,address,bool)": EventFragment; - "SetDepositUnderlyingAllowed(address,address,bool)": EventFragment; - "SetLiquidateBorrowAllowed(address,address,bool)": EventFragment; - "SetLiquidationIncentive(address,address,uint256,uint256)": EventFragment; - "SetMaxBonds(address,uint256,uint256)": EventFragment; - "SetMaxCollaterals(address,uint256,uint256)": EventFragment; - "SetRepayBorrowAllowed(address,address,bool)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ListBond"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ListCollateral"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralCeiling"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralRatio"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetDebtCeiling"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositCollateralAllowed" - ): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositUnderlyingAllowed" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidateBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidationIncentive"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxBonds"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxCollaterals"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetRepayBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface ListBondEventObject { - owner: string; - bond: string; +export namespace ListBondEvent { + export type InputTuple = [owner: AddressLike, bond: AddressLike]; + export type OutputTuple = [owner: string, bond: string]; + export interface OutputObject { + owner: string; + bond: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListBondEvent = TypedEvent<[string, string], ListBondEventObject>; - -export type ListBondEventFilter = TypedEventFilter; -export interface ListCollateralEventObject { - owner: string; - collateral: string; +export namespace ListCollateralEvent { + export type InputTuple = [owner: AddressLike, collateral: AddressLike]; + export type OutputTuple = [owner: string, collateral: string]; + export interface OutputObject { + owner: string; + collateral: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListCollateralEvent = TypedEvent< - [string, string], - ListCollateralEventObject ->; - -export type ListCollateralEventFilter = TypedEventFilter; -export interface SetBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; -} -export type SetBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetBorrowAllowedEventObject ->; - -export type SetBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetCollateralCeilingEventObject { - owner: string; - collateral: string; - oldCollateralCeiling: BigNumber; - newCollateralCeiling: BigNumber; -} -export type SetCollateralCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralCeilingEventObject ->; - -export type SetCollateralCeilingEventFilter = - TypedEventFilter; - -export interface SetCollateralRatioEventObject { - owner: string; - collateral: string; - oldCollateralRatio: BigNumber; - newCollateralRatio: BigNumber; -} -export type SetCollateralRatioEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralRatioEventObject ->; - -export type SetCollateralRatioEventFilter = - TypedEventFilter; - -export interface SetDebtCeilingEventObject { - owner: string; - bond: string; - oldDebtCeiling: BigNumber; - newDebtCeiling: BigNumber; +export namespace SetBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDebtCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetDebtCeilingEventObject ->; -export type SetDebtCeilingEventFilter = TypedEventFilter; - -export interface SetDepositCollateralAllowedEventObject { - owner: string; - collateral: string; - state: boolean; +export namespace SetCollateralCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralCeiling: BigNumberish, + newCollateralCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralCeiling: bigint, + newCollateralCeiling: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralCeiling: bigint; + newCollateralCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositCollateralAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositCollateralAllowedEventObject ->; - -export type SetDepositCollateralAllowedEventFilter = - TypedEventFilter; - -export interface SetDepositUnderlyingAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetCollateralRatioEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralRatio: BigNumberish, + newCollateralRatio: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralRatio: bigint, + newCollateralRatio: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralRatio: bigint; + newCollateralRatio: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositUnderlyingAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositUnderlyingAllowedEventObject ->; - -export type SetDepositUnderlyingAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidateBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetDebtCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + oldDebtCeiling: BigNumberish, + newDebtCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + bond: string, + oldDebtCeiling: bigint, + newDebtCeiling: bigint + ]; + export interface OutputObject { + owner: string; + bond: string; + oldDebtCeiling: bigint; + newDebtCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidateBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetLiquidateBorrowAllowedEventObject ->; - -export type SetLiquidateBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidationIncentiveEventObject { - owner: string; - collateral: string; - oldLiquidationIncentive: BigNumber; - newLiquidationIncentive: BigNumber; + +export namespace SetDepositCollateralAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, collateral: string, state: boolean]; + export interface OutputObject { + owner: string; + collateral: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidationIncentiveEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetLiquidationIncentiveEventObject ->; - -export type SetLiquidationIncentiveEventFilter = - TypedEventFilter; - -export interface SetMaxBondsEventObject { - owner: string; - oldMaxBonds: BigNumber; - newMaxBonds: BigNumber; + +export namespace SetDepositUnderlyingAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxBondsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxBondsEventObject ->; -export type SetMaxBondsEventFilter = TypedEventFilter; +export namespace SetLiquidateBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface SetMaxCollateralsEventObject { - owner: string; - oldMaxCollaterals: BigNumber; - newMaxCollaterals: BigNumber; +export namespace SetLiquidationIncentiveEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldLiquidationIncentive: BigNumberish, + newLiquidationIncentive: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldLiquidationIncentive: bigint, + newLiquidationIncentive: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldLiquidationIncentive: bigint; + newLiquidationIncentive: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxCollateralsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxCollateralsEventObject ->; - -export type SetMaxCollateralsEventFilter = - TypedEventFilter; - -export interface SetRepayBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetMaxBondsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxBonds: BigNumberish, + newMaxBonds: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxBonds: bigint, + newMaxBonds: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxBonds: bigint; + newMaxBonds: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetRepayBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetRepayBorrowAllowedEventObject ->; -export type SetRepayBorrowAllowedEventFilter = - TypedEventFilter; +export namespace SetMaxCollateralsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxCollaterals: BigNumberish, + newMaxCollaterals: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxCollaterals: bigint, + newMaxCollaterals: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxCollaterals: bigint; + newMaxCollaterals: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace SetRepayBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface Fintroller extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): Fintroller; + waitForDeployment(): Promise; interface: FintrollerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.BondStructOutput]>; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.CollateralStructOutput]>; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise<[BigNumber]>; - - maxCollaterals(overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + getBond: TypedContractMethod< + [hToken: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + + getBorrowAllowed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + getCollateral: TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + + getCollateralCeiling: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getCollateralRatio: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getDebtCeiling: TypedContractMethod<[bond: AddressLike], [bigint], "view">; + + getDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + getDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + isBondListed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + isCollateralListed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + listBond: TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + + listCollateral: TypedContractMethod< + [collateral: AddressLike], + [void], + "nonpayable" + >; + + maxBonds: TypedContractMethod<[], [bigint], "view">; + + maxCollaterals: TypedContractMethod<[], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + setBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setCollateralCeiling: TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setCollateralRatio: TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + + setDebtCeiling: TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + + setMaxBonds: TypedContractMethod< + [newMaxBonds: BigNumberish], + [void], + "nonpayable" + >; + + setMaxCollaterals: TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + + setRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - filters: { - "ListBond(address,address)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - ListBond( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - - "ListCollateral(address,address)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - ListCollateral( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - - "SetBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - SetBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - - "SetCollateralCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - SetCollateralCeiling( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - - "SetCollateralRatio(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - SetCollateralRatio( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - - "SetDebtCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - SetDebtCeiling( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - - "SetDepositCollateralAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - SetDepositCollateralAllowed( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - - "SetDepositUnderlyingAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - SetDepositUnderlyingAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - - "SetLiquidateBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - SetLiquidateBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - - "SetLiquidationIncentive(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - SetLiquidationIncentive( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - - "SetMaxBonds(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - SetMaxBonds( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - - "SetMaxCollaterals(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - SetMaxCollaterals( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - - "SetRepayBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - SetRepayBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "getBond" + ): TypedContractMethod< + [hToken: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getCollateral" + ): TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getCollateralCeiling" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getCollateralRatio" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDebtCeiling" + ): TypedContractMethod<[bond: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDepositCollateralAllowed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getDepositUnderlyingAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidateBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidationIncentive" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getRepayBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isBondListed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isCollateralListed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "listBond" + ): TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "listCollateral" + ): TypedContractMethod<[collateral: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "maxBonds" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxCollaterals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralCeiling" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralRatio" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDebtCeiling" + ): TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositCollateralAllowed" + ): TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositUnderlyingAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidateBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidationIncentive" + ): TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxBonds" + ): TypedContractMethod<[newMaxBonds: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setMaxCollaterals" + ): TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setRepayBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getEvent( + key: "ListBond" + ): TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + getEvent( + key: "ListCollateral" + ): TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + getEvent( + key: "SetBorrowAllowed" + ): TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetCollateralCeiling" + ): TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + getEvent( + key: "SetCollateralRatio" + ): TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + getEvent( + key: "SetDebtCeiling" + ): TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + getEvent( + key: "SetDepositCollateralAllowed" + ): TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + getEvent( + key: "SetDepositUnderlyingAllowed" + ): TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidateBorrowAllowed" + ): TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidationIncentive" + ): TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + getEvent( + key: "SetMaxBonds" + ): TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + getEvent( + key: "SetMaxCollaterals" + ): TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + getEvent( + key: "SetRepayBorrowAllowed" + ): TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + filters: { + "ListBond(address,address)": TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + ListBond: TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + + "ListCollateral(address,address)": TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + ListCollateral: TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + + "SetBorrowAllowed(address,address,bool)": TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + SetBorrowAllowed: TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + + "SetCollateralCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + SetCollateralCeiling: TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + + "SetCollateralRatio(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + SetCollateralRatio: TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + + "SetDebtCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + SetDebtCeiling: TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + + "SetDepositCollateralAllowed(address,address,bool)": TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + SetDepositCollateralAllowed: TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + + "SetDepositUnderlyingAllowed(address,address,bool)": TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + SetDepositUnderlyingAllowed: TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + + "SetLiquidateBorrowAllowed(address,address,bool)": TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + SetLiquidateBorrowAllowed: TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + + "SetLiquidationIncentive(address,address,uint256,uint256)": TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + SetLiquidationIncentive: TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + + "SetMaxBonds(address,uint256,uint256)": TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + SetMaxBonds: TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + + "SetMaxCollaterals(address,uint256,uint256)": TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + SetMaxCollaterals: TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + + "SetRepayBorrowAllowed(address,address,bool)": TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + SetRepayBorrowAllowed: TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/core/fintroller/IFintroller.ts b/packages/protocol/src/types/contracts/core/fintroller/IFintroller.ts index 759dbfd5..f89f50e0 100644 --- a/packages/protocol/src/types/contracts/core/fintroller/IFintroller.ts +++ b/packages/protocol/src/types/contracts/core/fintroller/IFintroller.ts @@ -3,49 +3,45 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; export declare namespace IFintroller { export type BondStruct = { - debtCeiling: PromiseOrValue; - isBorrowAllowed: PromiseOrValue; - isDepositUnderlyingAllowed: PromiseOrValue; - isLiquidateBorrowAllowed: PromiseOrValue; - isListed: PromiseOrValue; - isRepayBorrowAllowed: PromiseOrValue; + debtCeiling: BigNumberish; + isBorrowAllowed: boolean; + isDepositUnderlyingAllowed: boolean; + isLiquidateBorrowAllowed: boolean; + isListed: boolean; + isRepayBorrowAllowed: boolean; }; export type BondStructOutput = [ - BigNumber, - boolean, - boolean, - boolean, - boolean, - boolean + debtCeiling: bigint, + isBorrowAllowed: boolean, + isDepositUnderlyingAllowed: boolean, + isLiquidateBorrowAllowed: boolean, + isListed: boolean, + isRepayBorrowAllowed: boolean ] & { - debtCeiling: BigNumber; + debtCeiling: bigint; isBorrowAllowed: boolean; isDepositUnderlyingAllowed: boolean; isLiquidateBorrowAllowed: boolean; @@ -54,65 +50,31 @@ export declare namespace IFintroller { }; export type CollateralStruct = { - ceiling: PromiseOrValue; - ratio: PromiseOrValue; - liquidationIncentive: PromiseOrValue; - isDepositCollateralAllowed: PromiseOrValue; - isListed: PromiseOrValue; + ceiling: BigNumberish; + ratio: BigNumberish; + liquidationIncentive: BigNumberish; + isDepositCollateralAllowed: boolean; + isListed: boolean; }; export type CollateralStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - boolean, - boolean + ceiling: bigint, + ratio: bigint, + liquidationIncentive: bigint, + isDepositCollateralAllowed: boolean, + isListed: boolean ] & { - ceiling: BigNumber; - ratio: BigNumber; - liquidationIncentive: BigNumber; + ceiling: bigint; + ratio: bigint; + liquidationIncentive: bigint; isDepositCollateralAllowed: boolean; isListed: boolean; }; } -export interface IFintrollerInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "getBond(address)": FunctionFragment; - "getBorrowAllowed(address)": FunctionFragment; - "getCollateral(address)": FunctionFragment; - "getCollateralCeiling(address)": FunctionFragment; - "getCollateralRatio(address)": FunctionFragment; - "getDebtCeiling(address)": FunctionFragment; - "getDepositCollateralAllowed(address)": FunctionFragment; - "getDepositUnderlyingAllowed(address)": FunctionFragment; - "getLiquidateBorrowAllowed(address)": FunctionFragment; - "getLiquidationIncentive(address)": FunctionFragment; - "getRepayBorrowAllowed(address)": FunctionFragment; - "isBondListed(address)": FunctionFragment; - "isCollateralListed(address)": FunctionFragment; - "listBond(address)": FunctionFragment; - "listCollateral(address)": FunctionFragment; - "maxBonds()": FunctionFragment; - "maxCollaterals()": FunctionFragment; - "owner()": FunctionFragment; - "setBorrowAllowed(address,bool)": FunctionFragment; - "setCollateralCeiling(address,uint256)": FunctionFragment; - "setCollateralRatio(address,uint256)": FunctionFragment; - "setDebtCeiling(address,uint256)": FunctionFragment; - "setDepositCollateralAllowed(address,bool)": FunctionFragment; - "setDepositUnderlyingAllowed(address,bool)": FunctionFragment; - "setLiquidateBorrowAllowed(address,bool)": FunctionFragment; - "setLiquidationIncentive(address,uint256)": FunctionFragment; - "setMaxBonds(uint256)": FunctionFragment; - "setMaxCollaterals(uint256)": FunctionFragment; - "setRepayBorrowAllowed(address,bool)": FunctionFragment; - }; - +export interface IFintrollerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "getBond" @@ -146,73 +108,91 @@ export interface IFintrollerInterface extends utils.Interface { | "setRepayBorrowAllowed" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "ListBond" + | "ListCollateral" + | "SetBorrowAllowed" + | "SetCollateralCeiling" + | "SetCollateralRatio" + | "SetDebtCeiling" + | "SetDepositCollateralAllowed" + | "SetDepositUnderlyingAllowed" + | "SetLiquidateBorrowAllowed" + | "SetLiquidationIncentive" + | "SetMaxBonds" + | "SetMaxCollaterals" + | "SetRepayBorrowAllowed" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralRatio", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositCollateralAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositUnderlyingAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidateBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidationIncentive", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getRepayBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isBondListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isCollateralListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "maxBonds", values?: undefined): string; encodeFunctionData( @@ -222,47 +202,47 @@ export interface IFintrollerInterface extends utils.Interface { encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "setBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setCollateralCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setCollateralRatio", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDebtCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDepositCollateralAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setDepositUnderlyingAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidateBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidationIncentive", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxBonds", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxCollaterals", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setRepayBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; decodeFunctionResult( @@ -377,1177 +357,876 @@ export interface IFintrollerInterface extends utils.Interface { functionFragment: "setRepayBorrowAllowed", data: BytesLike ): Result; - - events: { - "ListBond(address,address)": EventFragment; - "ListCollateral(address,address)": EventFragment; - "SetBorrowAllowed(address,address,bool)": EventFragment; - "SetCollateralCeiling(address,address,uint256,uint256)": EventFragment; - "SetCollateralRatio(address,address,uint256,uint256)": EventFragment; - "SetDebtCeiling(address,address,uint256,uint256)": EventFragment; - "SetDepositCollateralAllowed(address,address,bool)": EventFragment; - "SetDepositUnderlyingAllowed(address,address,bool)": EventFragment; - "SetLiquidateBorrowAllowed(address,address,bool)": EventFragment; - "SetLiquidationIncentive(address,address,uint256,uint256)": EventFragment; - "SetMaxBonds(address,uint256,uint256)": EventFragment; - "SetMaxCollaterals(address,uint256,uint256)": EventFragment; - "SetRepayBorrowAllowed(address,address,bool)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ListBond"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ListCollateral"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralCeiling"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralRatio"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetDebtCeiling"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositCollateralAllowed" - ): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositUnderlyingAllowed" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidateBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidationIncentive"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxBonds"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxCollaterals"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetRepayBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface ListBondEventObject { - owner: string; - bond: string; +export namespace ListBondEvent { + export type InputTuple = [owner: AddressLike, bond: AddressLike]; + export type OutputTuple = [owner: string, bond: string]; + export interface OutputObject { + owner: string; + bond: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListBondEvent = TypedEvent<[string, string], ListBondEventObject>; - -export type ListBondEventFilter = TypedEventFilter; -export interface ListCollateralEventObject { - owner: string; - collateral: string; +export namespace ListCollateralEvent { + export type InputTuple = [owner: AddressLike, collateral: AddressLike]; + export type OutputTuple = [owner: string, collateral: string]; + export interface OutputObject { + owner: string; + collateral: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListCollateralEvent = TypedEvent< - [string, string], - ListCollateralEventObject ->; - -export type ListCollateralEventFilter = TypedEventFilter; -export interface SetBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; -} -export type SetBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetBorrowAllowedEventObject ->; - -export type SetBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetCollateralCeilingEventObject { - owner: string; - collateral: string; - oldCollateralCeiling: BigNumber; - newCollateralCeiling: BigNumber; -} -export type SetCollateralCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralCeilingEventObject ->; - -export type SetCollateralCeilingEventFilter = - TypedEventFilter; - -export interface SetCollateralRatioEventObject { - owner: string; - collateral: string; - oldCollateralRatio: BigNumber; - newCollateralRatio: BigNumber; -} -export type SetCollateralRatioEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralRatioEventObject ->; - -export type SetCollateralRatioEventFilter = - TypedEventFilter; - -export interface SetDebtCeilingEventObject { - owner: string; - bond: string; - oldDebtCeiling: BigNumber; - newDebtCeiling: BigNumber; +export namespace SetBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDebtCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetDebtCeilingEventObject ->; -export type SetDebtCeilingEventFilter = TypedEventFilter; - -export interface SetDepositCollateralAllowedEventObject { - owner: string; - collateral: string; - state: boolean; +export namespace SetCollateralCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralCeiling: BigNumberish, + newCollateralCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralCeiling: bigint, + newCollateralCeiling: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralCeiling: bigint; + newCollateralCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositCollateralAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositCollateralAllowedEventObject ->; - -export type SetDepositCollateralAllowedEventFilter = - TypedEventFilter; - -export interface SetDepositUnderlyingAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetCollateralRatioEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralRatio: BigNumberish, + newCollateralRatio: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralRatio: bigint, + newCollateralRatio: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralRatio: bigint; + newCollateralRatio: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositUnderlyingAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositUnderlyingAllowedEventObject ->; - -export type SetDepositUnderlyingAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidateBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetDebtCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + oldDebtCeiling: BigNumberish, + newDebtCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + bond: string, + oldDebtCeiling: bigint, + newDebtCeiling: bigint + ]; + export interface OutputObject { + owner: string; + bond: string; + oldDebtCeiling: bigint; + newDebtCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidateBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetLiquidateBorrowAllowedEventObject ->; - -export type SetLiquidateBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidationIncentiveEventObject { - owner: string; - collateral: string; - oldLiquidationIncentive: BigNumber; - newLiquidationIncentive: BigNumber; + +export namespace SetDepositCollateralAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, collateral: string, state: boolean]; + export interface OutputObject { + owner: string; + collateral: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidationIncentiveEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetLiquidationIncentiveEventObject ->; - -export type SetLiquidationIncentiveEventFilter = - TypedEventFilter; - -export interface SetMaxBondsEventObject { - owner: string; - oldMaxBonds: BigNumber; - newMaxBonds: BigNumber; + +export namespace SetDepositUnderlyingAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxBondsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxBondsEventObject ->; -export type SetMaxBondsEventFilter = TypedEventFilter; +export namespace SetLiquidateBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface SetMaxCollateralsEventObject { - owner: string; - oldMaxCollaterals: BigNumber; - newMaxCollaterals: BigNumber; +export namespace SetLiquidationIncentiveEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldLiquidationIncentive: BigNumberish, + newLiquidationIncentive: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldLiquidationIncentive: bigint, + newLiquidationIncentive: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldLiquidationIncentive: bigint; + newLiquidationIncentive: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxCollateralsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxCollateralsEventObject ->; - -export type SetMaxCollateralsEventFilter = - TypedEventFilter; - -export interface SetRepayBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetMaxBondsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxBonds: BigNumberish, + newMaxBonds: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxBonds: bigint, + newMaxBonds: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxBonds: bigint; + newMaxBonds: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetRepayBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetRepayBorrowAllowedEventObject ->; -export type SetRepayBorrowAllowedEventFilter = - TypedEventFilter; +export namespace SetMaxCollateralsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxCollaterals: BigNumberish, + newMaxCollaterals: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxCollaterals: bigint, + newMaxCollaterals: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxCollaterals: bigint; + newMaxCollaterals: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace SetRepayBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface IFintroller extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IFintroller; + waitForDeployment(): Promise; interface: IFintrollerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.BondStructOutput]>; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.CollateralStructOutput]>; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise<[BigNumber]>; - - maxCollaterals(overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + getBond: TypedContractMethod< + [bond: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + + getBorrowAllowed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + getCollateral: TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + + getCollateralCeiling: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getCollateralRatio: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getDebtCeiling: TypedContractMethod<[bond: AddressLike], [bigint], "view">; + + getDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + getDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + isBondListed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + isCollateralListed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + listBond: TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + + listCollateral: TypedContractMethod< + [collateral: AddressLike], + [void], + "nonpayable" + >; + + maxBonds: TypedContractMethod<[], [bigint], "view">; + + maxCollaterals: TypedContractMethod<[], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + setBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setCollateralCeiling: TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setCollateralRatio: TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + + setDebtCeiling: TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + + setMaxBonds: TypedContractMethod< + [newMaxBonds: BigNumberish], + [void], + "nonpayable" + >; + + setMaxCollaterals: TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + + setRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - filters: { - "ListBond(address,address)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - ListBond( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - - "ListCollateral(address,address)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - ListCollateral( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - - "SetBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - SetBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - - "SetCollateralCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - SetCollateralCeiling( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - - "SetCollateralRatio(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - SetCollateralRatio( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - - "SetDebtCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - SetDebtCeiling( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - - "SetDepositCollateralAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - SetDepositCollateralAllowed( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - - "SetDepositUnderlyingAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - SetDepositUnderlyingAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - - "SetLiquidateBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - SetLiquidateBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - - "SetLiquidationIncentive(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - SetLiquidationIncentive( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - - "SetMaxBonds(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - SetMaxBonds( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - - "SetMaxCollaterals(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - SetMaxCollaterals( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - - "SetRepayBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - SetRepayBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "getBond" + ): TypedContractMethod< + [bond: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getCollateral" + ): TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getCollateralCeiling" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getCollateralRatio" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDebtCeiling" + ): TypedContractMethod<[bond: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDepositCollateralAllowed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getDepositUnderlyingAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidateBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidationIncentive" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getRepayBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isBondListed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isCollateralListed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "listBond" + ): TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "listCollateral" + ): TypedContractMethod<[collateral: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "maxBonds" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxCollaterals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralCeiling" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralRatio" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDebtCeiling" + ): TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositCollateralAllowed" + ): TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositUnderlyingAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidateBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidationIncentive" + ): TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxBonds" + ): TypedContractMethod<[newMaxBonds: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setMaxCollaterals" + ): TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setRepayBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getEvent( + key: "ListBond" + ): TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + getEvent( + key: "ListCollateral" + ): TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + getEvent( + key: "SetBorrowAllowed" + ): TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetCollateralCeiling" + ): TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + getEvent( + key: "SetCollateralRatio" + ): TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + getEvent( + key: "SetDebtCeiling" + ): TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + getEvent( + key: "SetDepositCollateralAllowed" + ): TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + getEvent( + key: "SetDepositUnderlyingAllowed" + ): TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidateBorrowAllowed" + ): TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidationIncentive" + ): TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + getEvent( + key: "SetMaxBonds" + ): TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + getEvent( + key: "SetMaxCollaterals" + ): TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + getEvent( + key: "SetRepayBorrowAllowed" + ): TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + filters: { + "ListBond(address,address)": TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + ListBond: TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + + "ListCollateral(address,address)": TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + ListCollateral: TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + + "SetBorrowAllowed(address,address,bool)": TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + SetBorrowAllowed: TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + + "SetCollateralCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + SetCollateralCeiling: TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + + "SetCollateralRatio(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + SetCollateralRatio: TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + + "SetDebtCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + SetDebtCeiling: TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + + "SetDepositCollateralAllowed(address,address,bool)": TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + SetDepositCollateralAllowed: TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + + "SetDepositUnderlyingAllowed(address,address,bool)": TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + SetDepositUnderlyingAllowed: TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + + "SetLiquidateBorrowAllowed(address,address,bool)": TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + SetLiquidateBorrowAllowed: TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + + "SetLiquidationIncentive(address,address,uint256,uint256)": TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + SetLiquidationIncentive: TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + + "SetMaxBonds(address,uint256,uint256)": TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + SetMaxBonds: TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + + "SetMaxCollaterals(address,uint256,uint256)": TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + SetMaxCollaterals: TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + + "SetRepayBorrowAllowed(address,address,bool)": TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + SetRepayBorrowAllowed: TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/core/h-token/HToken.ts b/packages/protocol/src/types/contracts/core/h-token/HToken.ts index 317a0b8a..af737dcf 100644 --- a/packages/protocol/src/types/contracts/core/h-token/HToken.ts +++ b/packages/protocol/src/types/contracts/core/h-token/HToken.ts @@ -3,72 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface HTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setBalanceSheet(address)": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "balanceSheet()": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "depositUnderlying(uint256)": FunctionFragment; - "fintroller()": FunctionFragment; - "getDepositorBalance(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "isMatured()": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "nonces(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "redeem(uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "totalUnderlyingReserve()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - "withdrawUnderlying(uint256)": FunctionFragment; - }; - +export interface HTokenInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "_recover" @@ -107,6 +64,21 @@ export interface HTokenInterface extends utils.Interface { | "withdrawUnderlying" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "DepositUnderlying" + | "Mint" + | "Recover" + | "Redeem" + | "SetBalanceSheet" + | "SetNonRecoverableTokens" + | "Transfer" + | "TransferOwnership" + | "WithdrawUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -117,7 +89,7 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -125,27 +97,27 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setBalanceSheet", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "balanceSheet", @@ -153,16 +125,16 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -170,43 +142,40 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getDepositorBalance", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "isMatured", values?: undefined): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; encodeFunctionData( functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "redeem", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -219,15 +188,11 @@ export interface HTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -240,7 +205,7 @@ export interface HTokenInterface extends utils.Interface { encodeFunctionData(functionFragment: "version", values?: undefined): string; encodeFunctionData( functionFragment: "withdrawUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -330,1058 +295,775 @@ export interface HTokenInterface extends utils.Interface { functionFragment: "withdrawUnderlying", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "DepositUnderlying(address,uint256,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Recover(address,address,uint256)": EventFragment; - "Redeem(address,uint256,uint256)": EventFragment; - "SetBalanceSheet(address,address,address)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "WithdrawUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DepositUnderlying"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBalanceSheet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawUnderlying"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface DepositUnderlyingEventObject { - depositor: string; - depositUnderlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace DepositUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + depositUnderlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + depositUnderlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + depositUnderlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - DepositUnderlyingEventObject ->; - -export type DepositUnderlyingEventFilter = - TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; -export type MintEventFilter = TypedEventFilter; - -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface RedeemEventObject { - account: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace RedeemEvent { + export type InputTuple = [ + account: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + account: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RedeemEvent = TypedEvent< - [string, BigNumber, BigNumber], - RedeemEventObject ->; - -export type RedeemEventFilter = TypedEventFilter; -export interface SetBalanceSheetEventObject { - owner: string; - oldBalanceSheet: string; - newBalanceSheet: string; +export namespace SetBalanceSheetEvent { + export type InputTuple = [ + owner: AddressLike, + oldBalanceSheet: AddressLike, + newBalanceSheet: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldBalanceSheet: string, + newBalanceSheet: string + ]; + export interface OutputObject { + owner: string; + oldBalanceSheet: string; + newBalanceSheet: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetBalanceSheetEvent = TypedEvent< - [string, string, string], - SetBalanceSheetEventObject ->; -export type SetBalanceSheetEventFilter = TypedEventFilter; - -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; -} -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; - -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawUnderlyingEventObject { - depositor: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; + +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - WithdrawUnderlyingEventObject ->; -export type WithdrawUnderlyingEventFilter = - TypedEventFilter; +export namespace WithdrawUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface HToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): HToken; + waitForDeployment(): Promise; interface: HTokenInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amount: BigNumber }>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise<[boolean]>; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setBalanceSheet: TypedContractMethod< + [newBalanceSheet: AddressLike], + [void], + "nonpayable" + >; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + depositUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + fintroller: TypedContractMethod<[], [string], "view">; + + getDepositorBalance: TypedContractMethod< + [depositor: AddressLike], + [bigint], + "view" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + isMatured: TypedContractMethod<[], [boolean], "view">; + + maturity: TypedContractMethod<[], [bigint], "view">; + + mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonRecoverableTokens: TypedContractMethod< + [arg0: BigNumberish], + [string], + "view" + >; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + totalUnderlyingReserve: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - name(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [string], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + withdrawUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setBalanceSheet" + ): TypedContractMethod<[newBalanceSheet: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getDepositorBalance" + ): TypedContractMethod<[depositor: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "isMatured" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "totalUnderlyingReserve" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "withdrawUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "DepositUnderlying" + ): TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "Redeem" + ): TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + getEvent( + key: "SetBalanceSheet" + ): TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawUnderlying" + ): TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "DepositUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - DepositUnderlying( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "Redeem(address,uint256,uint256)"( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - Redeem( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - - "SetBalanceSheet(address,address,address)"( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - SetBalanceSheet( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - WithdrawUnderlying( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve( - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "DepositUnderlying(address,uint256,uint256)": TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + DepositUnderlying: TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "Redeem(address,uint256,uint256)": TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + Redeem: TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + + "SetBalanceSheet(address,address,address)": TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + SetBalanceSheet: TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "WithdrawUnderlying(address,uint256,uint256)": TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; + WithdrawUnderlying: TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/core/h-token/IHToken.ts b/packages/protocol/src/types/contracts/core/h-token/IHToken.ts index 8d5df535..4b82b4b3 100644 --- a/packages/protocol/src/types/contracts/core/h-token/IHToken.ts +++ b/packages/protocol/src/types/contracts/core/h-token/IHToken.ts @@ -3,72 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IHTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setBalanceSheet(address)": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "balanceSheet()": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "depositUnderlying(uint256)": FunctionFragment; - "fintroller()": FunctionFragment; - "getDepositorBalance(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "isMatured()": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "nonces(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "redeem(uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "totalUnderlyingReserve()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - "withdrawUnderlying(uint256)": FunctionFragment; - }; - +export interface IHTokenInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "_recover" @@ -107,6 +64,21 @@ export interface IHTokenInterface extends utils.Interface { | "withdrawUnderlying" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "DepositUnderlying" + | "Mint" + | "Recover" + | "Redeem" + | "SetBalanceSheet" + | "SetNonRecoverableTokens" + | "Transfer" + | "TransferOwnership" + | "WithdrawUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -117,7 +89,7 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -125,27 +97,27 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setBalanceSheet", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "balanceSheet", @@ -153,16 +125,16 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -170,43 +142,40 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getDepositorBalance", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "isMatured", values?: undefined): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; encodeFunctionData( functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "redeem", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -219,15 +188,11 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -240,7 +205,7 @@ export interface IHTokenInterface extends utils.Interface { encodeFunctionData(functionFragment: "version", values?: undefined): string; encodeFunctionData( functionFragment: "withdrawUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -330,1058 +295,775 @@ export interface IHTokenInterface extends utils.Interface { functionFragment: "withdrawUnderlying", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "DepositUnderlying(address,uint256,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Recover(address,address,uint256)": EventFragment; - "Redeem(address,uint256,uint256)": EventFragment; - "SetBalanceSheet(address,address,address)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "WithdrawUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DepositUnderlying"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBalanceSheet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawUnderlying"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface DepositUnderlyingEventObject { - depositor: string; - depositUnderlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace DepositUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + depositUnderlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + depositUnderlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + depositUnderlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - DepositUnderlyingEventObject ->; - -export type DepositUnderlyingEventFilter = - TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; -export type MintEventFilter = TypedEventFilter; - -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface RedeemEventObject { - account: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace RedeemEvent { + export type InputTuple = [ + account: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + account: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RedeemEvent = TypedEvent< - [string, BigNumber, BigNumber], - RedeemEventObject ->; - -export type RedeemEventFilter = TypedEventFilter; -export interface SetBalanceSheetEventObject { - owner: string; - oldBalanceSheet: string; - newBalanceSheet: string; +export namespace SetBalanceSheetEvent { + export type InputTuple = [ + owner: AddressLike, + oldBalanceSheet: AddressLike, + newBalanceSheet: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldBalanceSheet: string, + newBalanceSheet: string + ]; + export interface OutputObject { + owner: string; + oldBalanceSheet: string; + newBalanceSheet: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetBalanceSheetEvent = TypedEvent< - [string, string, string], - SetBalanceSheetEventObject ->; -export type SetBalanceSheetEventFilter = TypedEventFilter; - -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; -} -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; - -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawUnderlyingEventObject { - depositor: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; + +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - WithdrawUnderlyingEventObject ->; -export type WithdrawUnderlyingEventFilter = - TypedEventFilter; +export namespace WithdrawUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface IHToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IHToken; + waitForDeployment(): Promise; interface: IHTokenInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amount: BigNumber }>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise<[boolean]>; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setBalanceSheet: TypedContractMethod< + [newBalanceSheet: AddressLike], + [void], + "nonpayable" + >; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + depositUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + fintroller: TypedContractMethod<[], [string], "view">; + + getDepositorBalance: TypedContractMethod< + [depositor: AddressLike], + [bigint], + "view" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + isMatured: TypedContractMethod<[], [boolean], "view">; + + maturity: TypedContractMethod<[], [bigint], "view">; + + mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonRecoverableTokens: TypedContractMethod< + [index: BigNumberish], + [string], + "view" + >; + + nonces: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + totalUnderlyingReserve: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - name(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [string], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + withdrawUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setBalanceSheet" + ): TypedContractMethod<[newBalanceSheet: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getDepositorBalance" + ): TypedContractMethod<[depositor: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "isMatured" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[index: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "totalUnderlyingReserve" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "withdrawUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "DepositUnderlying" + ): TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "Redeem" + ): TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + getEvent( + key: "SetBalanceSheet" + ): TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawUnderlying" + ): TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "DepositUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - DepositUnderlying( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "Redeem(address,uint256,uint256)"( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - Redeem( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - - "SetBalanceSheet(address,address,address)"( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - SetBalanceSheet( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - WithdrawUnderlying( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve( - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "DepositUnderlying(address,uint256,uint256)": TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + DepositUnderlying: TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "Redeem(address,uint256,uint256)": TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + Redeem: TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + + "SetBalanceSheet(address,address,address)": TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + SetBalanceSheet: TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "WithdrawUnderlying(address,uint256,uint256)": TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; + WithdrawUnderlying: TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/external/chainlink/IAggregatorV3.ts b/packages/protocol/src/types/contracts/external/chainlink/IAggregatorV3.ts index d8c68b25..44f4aaf4 100644 --- a/packages/protocol/src/types/contracts/external/chainlink/IAggregatorV3.ts +++ b/packages/protocol/src/types/contracts/external/chainlink/IAggregatorV3.ts @@ -3,35 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IAggregatorV3Interface extends utils.Interface { - functions: { - "decimals()": FunctionFragment; - "description()": FunctionFragment; - "getRoundData(uint80)": FunctionFragment; - "latestRoundData()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IAggregatorV3Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "decimals" | "description" | "getRoundData" @@ -46,7 +37,7 @@ export interface IAggregatorV3Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getRoundData", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "latestRoundData", @@ -68,162 +59,128 @@ export interface IAggregatorV3Interface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: {}; } export interface IAggregatorV3 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IAggregatorV3; + waitForDeployment(): Promise; interface: IAggregatorV3Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - decimals(overrides?: CallOverrides): Promise<[number]>; - - description(overrides?: CallOverrides): Promise<[string]>; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ): 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; + + decimals: TypedContractMethod<[], [bigint], "view">; + + description: TypedContractMethod<[], [string], "view">; + + getRoundData: TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - version(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + ], + "view" >; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; + } + ], + "view" >; - version(overrides?: CallOverrides): Promise; - - callStatic: { - decimals(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRoundData" + ): TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - version(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; filters: {}; - - estimateGas: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/protocol/src/types/contracts/external/uniswap/interfaces/IUniswapV3Pool.ts b/packages/protocol/src/types/contracts/external/uniswap/interfaces/IUniswapV3Pool.ts index a2c43893..2278f4c4 100644 --- a/packages/protocol/src/types/contracts/external/uniswap/interfaces/IUniswapV3Pool.ts +++ b/packages/protocol/src/types/contracts/external/uniswap/interfaces/IUniswapV3Pool.ts @@ -3,42 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IUniswapV3PoolInterface extends utils.Interface { - functions: { - "factory()": FunctionFragment; - "fee()": FunctionFragment; - "initialize(uint160)": FunctionFragment; - "maxLiquidityPerTick()": FunctionFragment; - "observations(uint256)": FunctionFragment; - "observe(uint32[])": FunctionFragment; - "slot0()": FunctionFragment; - "tickSpacing()": FunctionFragment; - "token0()": FunctionFragment; - "token1()": FunctionFragment; - }; - +export interface IUniswapV3PoolInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "factory" | "fee" | "initialize" @@ -55,7 +39,7 @@ export interface IUniswapV3PoolInterface extends utils.Interface { encodeFunctionData(functionFragment: "fee", values?: undefined): string; encodeFunctionData( functionFragment: "initialize", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "maxLiquidityPerTick", @@ -63,11 +47,11 @@ export interface IUniswapV3PoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "observations", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "observe", - values: [PromiseOrValue[]] + values: [BigNumberish[]] ): string; encodeFunctionData(functionFragment: "slot0", values?: undefined): string; encodeFunctionData( @@ -96,262 +80,177 @@ export interface IUniswapV3PoolInterface extends utils.Interface { ): Result; decodeFunctionResult(functionFragment: "token0", data: BytesLike): Result; decodeFunctionResult(functionFragment: "token1", data: BytesLike): Result; - - events: {}; } export interface IUniswapV3Pool extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3Pool; + waitForDeployment(): Promise; interface: IUniswapV3PoolInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - factory(overrides?: CallOverrides): Promise<[string]>; - - fee(overrides?: CallOverrides): Promise<[number]>; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + factory: TypedContractMethod<[], [string], "view">; + + fee: TypedContractMethod<[], [bigint], "view">; + + initialize: TypedContractMethod< + [sqrtPriceX96: BigNumberish], + [void], + "nonpayable" + >; - maxLiquidityPerTick(overrides?: CallOverrides): Promise<[BigNumber]>; + maxLiquidityPerTick: TypedContractMethod<[], [bigint], "view">; - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; + observations: TypedContractMethod< + [index: BigNumberish], + [ + [bigint, bigint, bigint, boolean] & { + blockTimestamp: bigint; + tickCumulative: bigint; + secondsPerLiquidityCumulativeX128: bigint; initialized: boolean; } - >; + ], + "view" + >; - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; + observe: TypedContractMethod< + [secondsAgos: BigNumberish[]], + [ + [bigint[], bigint[]] & { + tickCumulatives: bigint[]; + secondsPerLiquidityCumulativeX128s: bigint[]; } - >; + ], + "view" + >; - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; + slot0: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + sqrtPriceX96: bigint; + tick: bigint; + observationIndex: bigint; + observationCardinality: bigint; + observationCardinalityNext: bigint; + feeProtocol: bigint; unlocked: boolean; } - >; - - tickSpacing(overrides?: CallOverrides): Promise<[number]>; - - token0(overrides?: CallOverrides): Promise<[string]>; - - token1(overrides?: CallOverrides): Promise<[string]>; - }; - - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxLiquidityPerTick(overrides?: CallOverrides): Promise; - - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; - initialized: boolean; - } - >; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; - } - >; - - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; - unlocked: boolean; - } + ], + "view" >; - tickSpacing(overrides?: CallOverrides): Promise; - - token0(overrides?: CallOverrides): Promise; + tickSpacing: TypedContractMethod<[], [bigint], "view">; - token1(overrides?: CallOverrides): Promise; + token0: TypedContractMethod<[], [string], "view">; - callStatic: { - factory(overrides?: CallOverrides): Promise; + token1: TypedContractMethod<[], [string], "view">; - fee(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maxLiquidityPerTick(overrides?: CallOverrides): Promise; - - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [number, BigNumber, BigNumber, boolean] & { - blockTimestamp: number; - tickCumulative: BigNumber; - secondsPerLiquidityCumulativeX128: BigNumber; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "fee" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod<[sqrtPriceX96: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "maxLiquidityPerTick" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "observations" + ): TypedContractMethod< + [index: BigNumberish], + [ + [bigint, bigint, bigint, boolean] & { + blockTimestamp: bigint; + tickCumulative: bigint; + secondsPerLiquidityCumulativeX128: bigint; initialized: boolean; } - >; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise< - [BigNumber[], BigNumber[]] & { - tickCumulatives: BigNumber[]; - secondsPerLiquidityCumulativeX128s: BigNumber[]; + ], + "view" + >; + getFunction( + nameOrSignature: "observe" + ): TypedContractMethod< + [secondsAgos: BigNumberish[]], + [ + [bigint[], bigint[]] & { + tickCumulatives: bigint[]; + secondsPerLiquidityCumulativeX128s: bigint[]; } - >; - - slot0( - overrides?: CallOverrides - ): Promise< - [BigNumber, number, number, number, number, number, boolean] & { - sqrtPriceX96: BigNumber; - tick: number; - observationIndex: number; - observationCardinality: number; - observationCardinalityNext: number; - feeProtocol: number; + ], + "view" + >; + getFunction( + nameOrSignature: "slot0" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, boolean] & { + sqrtPriceX96: bigint; + tick: bigint; + observationIndex: bigint; + observationCardinality: bigint; + observationCardinalityNext: bigint; + feeProtocol: bigint; unlocked: boolean; } - >; - - tickSpacing(overrides?: CallOverrides): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "tickSpacing" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "token0" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "token1" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxLiquidityPerTick(overrides?: CallOverrides): Promise; - - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - slot0(overrides?: CallOverrides): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - factory(overrides?: CallOverrides): Promise; - - fee(overrides?: CallOverrides): Promise; - - initialize( - sqrtPriceX96: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxLiquidityPerTick( - overrides?: CallOverrides - ): Promise; - - observations( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - observe( - secondsAgos: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - slot0(overrides?: CallOverrides): Promise; - - tickSpacing(overrides?: CallOverrides): Promise; - - token0(overrides?: CallOverrides): Promise; - - token1(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/protocol/src/types/contracts/oracles/ChainlinkOperator.ts b/packages/protocol/src/types/contracts/oracles/ChainlinkOperator.ts index 8fa3e665..2c7f5dc0 100644 --- a/packages/protocol/src/types/contracts/oracles/ChainlinkOperator.ts +++ b/packages/protocol/src/types/contracts/oracles/ChainlinkOperator.ts @@ -3,48 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface ChainlinkOperatorInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "deleteFeed(string)": FunctionFragment; - "getFeed(string)": FunctionFragment; - "getNormalizedPrice(string)": FunctionFragment; - "getPrice(string)": FunctionFragment; - "owner()": FunctionFragment; - "pricePrecision()": FunctionFragment; - "pricePrecisionScalar()": FunctionFragment; - "priceStalenessThreshold()": FunctionFragment; - "setFeed(address,address)": FunctionFragment; - "setPriceStalenessThreshold(uint256)": FunctionFragment; - }; - +export interface ChainlinkOperatorInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "deleteFeed" @@ -59,30 +40,29 @@ export interface ChainlinkOperatorInterface extends utils.Interface { | "setPriceStalenessThreshold" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "DeleteFeed" + | "SetFeed" + | "SetPriceStalenessThreshold" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "deleteFeed", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getFeed", - values: [PromiseOrValue] + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "deleteFeed", values: [string]): string; + encodeFunctionData(functionFragment: "getFeed", values: [string]): string; encodeFunctionData( functionFragment: "getNormalizedPrice", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getPrice", - values: [PromiseOrValue] + values: [string] ): string; + encodeFunctionData(functionFragment: "getPrice", values: [string]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "pricePrecision", @@ -98,11 +78,11 @@ export interface ChainlinkOperatorInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setFeed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "setPriceStalenessThreshold", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -138,374 +118,270 @@ export interface ChainlinkOperatorInterface extends utils.Interface { functionFragment: "setPriceStalenessThreshold", data: BytesLike ): Result; - - events: { - "DeleteFeed(address,address)": EventFragment; - "SetFeed(address,address)": EventFragment; - "SetPriceStalenessThreshold(uint256,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DeleteFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetPriceStalenessThreshold"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface DeleteFeedEventObject { - asset: string; - feed: string; +export namespace DeleteFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DeleteFeedEvent = TypedEvent< - [string, string], - DeleteFeedEventObject ->; -export type DeleteFeedEventFilter = TypedEventFilter; - -export interface SetFeedEventObject { - asset: string; - feed: string; +export namespace SetFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFeedEvent = TypedEvent<[string, string], SetFeedEventObject>; - -export type SetFeedEventFilter = TypedEventFilter; -export interface SetPriceStalenessThresholdEventObject { - oldPriceStalenessThreshold: BigNumber; - newPriceStalenessThreshold: BigNumber; +export namespace SetPriceStalenessThresholdEvent { + export type InputTuple = [ + oldPriceStalenessThreshold: BigNumberish, + newPriceStalenessThreshold: BigNumberish + ]; + export type OutputTuple = [ + oldPriceStalenessThreshold: bigint, + newPriceStalenessThreshold: bigint + ]; + export interface OutputObject { + oldPriceStalenessThreshold: bigint; + newPriceStalenessThreshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetPriceStalenessThresholdEvent = TypedEvent< - [BigNumber, BigNumber], - SetPriceStalenessThresholdEventObject ->; -export type SetPriceStalenessThresholdEventFilter = - TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface ChainlinkOperator extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): ChainlinkOperator; + waitForDeployment(): Promise; interface: ChainlinkOperatorInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - pricePrecision(overrides?: CallOverrides): Promise<[BigNumber]>; - - pricePrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - priceStalenessThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + deleteFeed: TypedContractMethod<[symbol: string], [void], "nonpayable">; + + getFeed: TypedContractMethod< + [symbol: string], + [[string, string, boolean]], + "view" + >; + + getNormalizedPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + getPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + pricePrecision: TypedContractMethod<[], [bigint], "view">; + + pricePrecisionScalar: TypedContractMethod<[], [bigint], "view">; + + priceStalenessThreshold: TypedContractMethod<[], [bigint], "view">; + + setFeed: TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + + setPriceStalenessThreshold: TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "deleteFeed" + ): TypedContractMethod<[symbol: string], [void], "nonpayable">; + getFunction( + nameOrSignature: "getFeed" + ): TypedContractMethod<[symbol: string], [[string, string, boolean]], "view">; + getFunction( + nameOrSignature: "getNormalizedPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "getPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "pricePrecision" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "pricePrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "priceStalenessThreshold" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "setFeed" + ): TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setPriceStalenessThreshold" + ): TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "DeleteFeed" + ): TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + getEvent( + key: "SetFeed" + ): TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + getEvent( + key: "SetPriceStalenessThreshold" + ): TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "DeleteFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - DeleteFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - - "SetFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - SetFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - - "SetPriceStalenessThreshold(uint256,uint256)"( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - SetPriceStalenessThreshold( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar( - overrides?: CallOverrides - ): Promise; - - priceStalenessThreshold( - overrides?: CallOverrides - ): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "DeleteFeed(address,address)": TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + DeleteFeed: TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + + "SetFeed(address,address)": TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + SetFeed: TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + + "SetPriceStalenessThreshold(uint256,uint256)": TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; + SetPriceStalenessThreshold: TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/oracles/IChainlinkOperator.ts b/packages/protocol/src/types/contracts/oracles/IChainlinkOperator.ts index 5f338ba1..45381fdc 100644 --- a/packages/protocol/src/types/contracts/oracles/IChainlinkOperator.ts +++ b/packages/protocol/src/types/contracts/oracles/IChainlinkOperator.ts @@ -3,45 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface IChainlinkOperatorInterface extends utils.Interface { - functions: { - "deleteFeed(string)": FunctionFragment; - "getFeed(string)": FunctionFragment; - "getNormalizedPrice(string)": FunctionFragment; - "getPrice(string)": FunctionFragment; - "pricePrecision()": FunctionFragment; - "pricePrecisionScalar()": FunctionFragment; - "priceStalenessThreshold()": FunctionFragment; - "setFeed(address,address)": FunctionFragment; - "setPriceStalenessThreshold(uint256)": FunctionFragment; - }; - +export interface IChainlinkOperatorInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "deleteFeed" | "getFeed" | "getNormalizedPrice" @@ -53,22 +37,20 @@ export interface IChainlinkOperatorInterface extends utils.Interface { | "setPriceStalenessThreshold" ): FunctionFragment; - encodeFunctionData( - functionFragment: "deleteFeed", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getFeed", - values: [PromiseOrValue] - ): string; + getEvent( + nameOrSignatureOrTopic: + | "DeleteFeed" + | "SetFeed" + | "SetPriceStalenessThreshold" + ): EventFragment; + + encodeFunctionData(functionFragment: "deleteFeed", values: [string]): string; + encodeFunctionData(functionFragment: "getFeed", values: [string]): string; encodeFunctionData( functionFragment: "getNormalizedPrice", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getPrice", - values: [PromiseOrValue] + values: [string] ): string; + encodeFunctionData(functionFragment: "getPrice", values: [string]): string; encodeFunctionData( functionFragment: "pricePrecision", values?: undefined @@ -83,11 +65,11 @@ export interface IChainlinkOperatorInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setFeed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "setPriceStalenessThreshold", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult(functionFragment: "deleteFeed", data: BytesLike): Result; @@ -114,298 +96,220 @@ export interface IChainlinkOperatorInterface extends utils.Interface { functionFragment: "setPriceStalenessThreshold", data: BytesLike ): Result; - - events: { - "DeleteFeed(address,address)": EventFragment; - "SetFeed(address,address)": EventFragment; - "SetPriceStalenessThreshold(uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DeleteFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetPriceStalenessThreshold"): EventFragment; } -export interface DeleteFeedEventObject { - asset: string; - feed: string; +export namespace DeleteFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DeleteFeedEvent = TypedEvent< - [string, string], - DeleteFeedEventObject ->; - -export type DeleteFeedEventFilter = TypedEventFilter; -export interface SetFeedEventObject { - asset: string; - feed: string; +export namespace SetFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFeedEvent = TypedEvent<[string, string], SetFeedEventObject>; - -export type SetFeedEventFilter = TypedEventFilter; -export interface SetPriceStalenessThresholdEventObject { - oldPriceStalenessThreshold: BigNumber; - newPriceStalenessThreshold: BigNumber; +export namespace SetPriceStalenessThresholdEvent { + export type InputTuple = [ + oldPriceStalenessThreshold: BigNumberish, + newPriceStalenessThreshold: BigNumberish + ]; + export type OutputTuple = [ + oldPriceStalenessThreshold: bigint, + newPriceStalenessThreshold: bigint + ]; + export interface OutputObject { + oldPriceStalenessThreshold: bigint; + newPriceStalenessThreshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetPriceStalenessThresholdEvent = TypedEvent< - [BigNumber, BigNumber], - SetPriceStalenessThresholdEventObject ->; - -export type SetPriceStalenessThresholdEventFilter = - TypedEventFilter; export interface IChainlinkOperator extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IChainlinkOperator; + waitForDeployment(): Promise; interface: IChainlinkOperatorInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - pricePrecision(overrides?: CallOverrides): Promise<[BigNumber]>; - - pricePrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - priceStalenessThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + deleteFeed: TypedContractMethod<[symbol: string], [void], "nonpayable">; + + getFeed: TypedContractMethod< + [symbol: string], + [[string, string, boolean]], + "view" + >; + + getNormalizedPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + getPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + pricePrecision: TypedContractMethod<[], [bigint], "view">; + + pricePrecisionScalar: TypedContractMethod<[], [bigint], "view">; + + priceStalenessThreshold: TypedContractMethod<[], [bigint], "view">; + + setFeed: TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + + setPriceStalenessThreshold: TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "deleteFeed" + ): TypedContractMethod<[symbol: string], [void], "nonpayable">; + getFunction( + nameOrSignature: "getFeed" + ): TypedContractMethod<[symbol: string], [[string, string, boolean]], "view">; + getFunction( + nameOrSignature: "getNormalizedPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "getPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "pricePrecision" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "pricePrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "priceStalenessThreshold" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "setFeed" + ): TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setPriceStalenessThreshold" + ): TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "DeleteFeed" + ): TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + getEvent( + key: "SetFeed" + ): TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + getEvent( + key: "SetPriceStalenessThreshold" + ): TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; filters: { - "DeleteFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - DeleteFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - - "SetFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - SetFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - - "SetPriceStalenessThreshold(uint256,uint256)"( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - SetPriceStalenessThreshold( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - }; - - estimateGas: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar( - overrides?: CallOverrides - ): Promise; - - priceStalenessThreshold( - overrides?: CallOverrides - ): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "DeleteFeed(address,address)": TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + DeleteFeed: TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + + "SetFeed(address,address)": TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + SetFeed: TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + + "SetPriceStalenessThreshold(uint256,uint256)": TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; + SetPriceStalenessThreshold: TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/oracles/IUniswapV3PriceFeed.ts b/packages/protocol/src/types/contracts/oracles/IUniswapV3PriceFeed.ts index ea338cad..ef249147 100644 --- a/packages/protocol/src/types/contracts/oracles/IUniswapV3PriceFeed.ts +++ b/packages/protocol/src/types/contracts/oracles/IUniswapV3PriceFeed.ts @@ -3,43 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface IUniswapV3PriceFeedInterface extends utils.Interface { - functions: { - "baseAsset()": FunctionFragment; - "decimals()": FunctionFragment; - "description()": FunctionFragment; - "getRoundData(uint80)": FunctionFragment; - "latestRoundData()": FunctionFragment; - "maxPrice()": FunctionFragment; - "pool()": FunctionFragment; - "quoteAsset()": FunctionFragment; - "setMaxPrice(int256)": FunctionFragment; - "twapInterval()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IUniswapV3PriceFeedInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "baseAsset" | "decimals" | "description" @@ -61,7 +44,7 @@ export interface IUniswapV3PriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getRoundData", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "latestRoundData", @@ -75,7 +58,7 @@ export interface IUniswapV3PriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setMaxPrice", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "twapInterval", @@ -109,237 +92,162 @@ export interface IUniswapV3PriceFeedInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: {}; } export interface IUniswapV3PriceFeed extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IUniswapV3PriceFeed; + waitForDeployment(): Promise; interface: IUniswapV3PriceFeedInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - baseAsset(overrides?: CallOverrides): Promise<[string]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - description(overrides?: CallOverrides): Promise<[string]>; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ): 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; + + baseAsset: TypedContractMethod<[], [string], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + description: TypedContractMethod<[], [string], "view">; + + getRoundData: TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - maxPrice(overrides?: CallOverrides): Promise<[BigNumber]>; - - pool(overrides?: CallOverrides): Promise<[string]>; - - quoteAsset(overrides?: CallOverrides): Promise<[string]>; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise<[number]>; - - version(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - baseAsset(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + ], + "view" >; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; + } + ], + "view" >; - maxPrice(overrides?: CallOverrides): Promise; + maxPrice: TypedContractMethod<[], [bigint], "view">; - pool(overrides?: CallOverrides): Promise; + pool: TypedContractMethod<[], [string], "view">; - quoteAsset(overrides?: CallOverrides): Promise; + quoteAsset: TypedContractMethod<[], [string], "view">; - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; + setMaxPrice: TypedContractMethod< + [maxPrice_: BigNumberish], + [void], + "nonpayable" + >; - callStatic: { - baseAsset(overrides?: CallOverrides): Promise; + twapInterval: TypedContractMethod<[], [bigint], "view">; - decimals(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getFunction( + nameOrSignature: "baseAsset" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRoundData" + ): TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - maxPrice(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; - - quoteAsset(overrides?: CallOverrides): Promise; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "maxPrice" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "pool" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "quoteAsset" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setMaxPrice" + ): TypedContractMethod<[maxPrice_: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "twapInterval" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; filters: {}; - - estimateGas: { - baseAsset(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - maxPrice(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; - - quoteAsset(overrides?: CallOverrides): Promise; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - baseAsset(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - maxPrice(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; - - quoteAsset(overrides?: CallOverrides): Promise; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/protocol/src/types/contracts/oracles/SimplePriceFeed.ts b/packages/protocol/src/types/contracts/oracles/SimplePriceFeed.ts index 31e31683..5f77033a 100644 --- a/packages/protocol/src/types/contracts/oracles/SimplePriceFeed.ts +++ b/packages/protocol/src/types/contracts/oracles/SimplePriceFeed.ts @@ -3,38 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface SimplePriceFeedInterface extends utils.Interface { - functions: { - "decimals()": FunctionFragment; - "description()": FunctionFragment; - "getRoundData(uint80)": FunctionFragment; - "latestRoundData()": FunctionFragment; - "setPrice(int256)": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface SimplePriceFeedInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "decimals" | "description" | "getRoundData" @@ -50,7 +38,7 @@ export interface SimplePriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getRoundData", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "latestRoundData", @@ -58,7 +46,7 @@ export interface SimplePriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setPrice", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "version", values?: undefined): string; @@ -77,187 +65,133 @@ export interface SimplePriceFeedInterface extends utils.Interface { ): Result; decodeFunctionResult(functionFragment: "setPrice", data: BytesLike): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: {}; } export interface SimplePriceFeed extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): SimplePriceFeed; + waitForDeployment(): Promise; interface: SimplePriceFeedInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - decimals(overrides?: CallOverrides): Promise<[number]>; - - description(overrides?: CallOverrides): Promise<[string]>; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ): 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; + + decimals: TypedContractMethod<[], [bigint], "view">; + + description: TypedContractMethod<[], [string], "view">; + + getRoundData: TypedContractMethod< + [roundId_: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - setPrice( - newPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + ], + "view" >; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; + } + ], + "view" >; - setPrice( - newPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; + setPrice: TypedContractMethod<[newPrice: BigNumberish], [void], "nonpayable">; - callStatic: { - decimals(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRoundData" + ): TypedContractMethod< + [roundId_: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - setPrice( - newPrice: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "setPrice" + ): TypedContractMethod<[newPrice: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; filters: {}; - - estimateGas: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - setPrice( - newPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - setPrice( - newPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/protocol/src/types/contracts/oracles/StablecoinPriceFeed.ts b/packages/protocol/src/types/contracts/oracles/StablecoinPriceFeed.ts index 1fc8a646..85ad0942 100644 --- a/packages/protocol/src/types/contracts/oracles/StablecoinPriceFeed.ts +++ b/packages/protocol/src/types/contracts/oracles/StablecoinPriceFeed.ts @@ -3,35 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface StablecoinPriceFeedInterface extends utils.Interface { - functions: { - "decimals()": FunctionFragment; - "description()": FunctionFragment; - "getRoundData(uint80)": FunctionFragment; - "latestRoundData()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface StablecoinPriceFeedInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "decimals" | "description" | "getRoundData" @@ -46,7 +37,7 @@ export interface StablecoinPriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getRoundData", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "latestRoundData", @@ -68,162 +59,128 @@ export interface StablecoinPriceFeedInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: {}; } export interface StablecoinPriceFeed extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): StablecoinPriceFeed; + waitForDeployment(): Promise; interface: StablecoinPriceFeedInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - decimals(overrides?: CallOverrides): Promise<[number]>; - - description(overrides?: CallOverrides): Promise<[string]>; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ): 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; + + decimals: TypedContractMethod<[], [bigint], "view">; + + description: TypedContractMethod<[], [string], "view">; + + getRoundData: TypedContractMethod< + [roundId_: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - version(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + ], + "view" >; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; + } + ], + "view" >; - version(overrides?: CallOverrides): Promise; - - callStatic: { - decimals(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRoundData" + ): TypedContractMethod< + [roundId_: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - version(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; filters: {}; - - estimateGas: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/protocol/src/types/contracts/oracles/UniswapV3PriceFeed.ts b/packages/protocol/src/types/contracts/oracles/UniswapV3PriceFeed.ts index 42d00dcc..480f8bb2 100644 --- a/packages/protocol/src/types/contracts/oracles/UniswapV3PriceFeed.ts +++ b/packages/protocol/src/types/contracts/oracles/UniswapV3PriceFeed.ts @@ -3,50 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface UniswapV3PriceFeedInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "baseAsset()": FunctionFragment; - "decimals()": FunctionFragment; - "description()": FunctionFragment; - "getRoundData(uint80)": FunctionFragment; - "latestRoundData()": FunctionFragment; - "maxPrice()": FunctionFragment; - "owner()": FunctionFragment; - "pool()": FunctionFragment; - "quoteAsset()": FunctionFragment; - "setMaxPrice(int256)": FunctionFragment; - "twapInterval()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface UniswapV3PriceFeedInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "baseAsset" @@ -63,13 +42,15 @@ export interface UniswapV3PriceFeedInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "baseAsset", values?: undefined): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; @@ -79,7 +60,7 @@ export interface UniswapV3PriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getRoundData", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "latestRoundData", @@ -94,7 +75,7 @@ export interface UniswapV3PriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setMaxPrice", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "twapInterval", @@ -137,315 +118,213 @@ export interface UniswapV3PriceFeedInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface UniswapV3PriceFeed extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): UniswapV3PriceFeed; + waitForDeployment(): Promise; interface: UniswapV3PriceFeedInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; - baseAsset(overrides?: CallOverrides): Promise<[string]>; + baseAsset: TypedContractMethod<[], [string], "view">; - decimals(overrides?: CallOverrides): Promise<[number]>; + decimals: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise<[string]>; + description: TypedContractMethod<[], [string], "view">; - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getRoundData: TypedContractMethod< + [roundId_: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } - >; - - maxPrice(overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - pool(overrides?: CallOverrides): Promise<[string]>; - - quoteAsset(overrides?: CallOverrides): Promise<[string]>; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise<[number]>; - - version(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - baseAsset(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + ], + "view" >; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; + } + ], + "view" >; - maxPrice(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; + maxPrice: TypedContractMethod<[], [bigint], "view">; - quoteAsset(overrides?: CallOverrides): Promise; + owner: TypedContractMethod<[], [string], "view">; - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + pool: TypedContractMethod<[], [string], "view">; - twapInterval(overrides?: CallOverrides): Promise; + quoteAsset: TypedContractMethod<[], [string], "view">; - version(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setMaxPrice: TypedContractMethod< + [maxPrice_: BigNumberish], + [void], + "nonpayable" + >; - baseAsset(overrides?: CallOverrides): Promise; + twapInterval: TypedContractMethod<[], [bigint], "view">; - decimals(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "baseAsset" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRoundData" + ): TypedContractMethod< + [roundId_: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - maxPrice(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; - - quoteAsset(overrides?: CallOverrides): Promise; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "maxPrice" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "pool" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "quoteAsset" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setMaxPrice" + ): TypedContractMethod<[maxPrice_: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "twapInterval" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - baseAsset(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - maxPrice(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; - - quoteAsset(overrides?: CallOverrides): Promise; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - baseAsset(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - roundId_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - maxPrice(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; - - quoteAsset(overrides?: CallOverrides): Promise; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/BalanceSheetUpgraded.ts b/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/BalanceSheetUpgraded.ts index 2a94eb22..11c85286 100644 --- a/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/BalanceSheetUpgraded.ts +++ b/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/BalanceSheetUpgraded.ts @@ -3,43 +3,28 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface BalanceSheetUpgradedInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "fintroller()": FunctionFragment; - "getLastBlockNumber()": FunctionFragment; - "lastBlockNumber()": FunctionFragment; - "oracle()": FunctionFragment; - "owner()": FunctionFragment; - "setLastBlockNumber()": FunctionFragment; - }; - +export interface BalanceSheetUpgradedInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "fintroller" @@ -50,13 +35,15 @@ export interface BalanceSheetUpgradedInterface extends utils.Interface { | "setLastBlockNumber" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -100,181 +87,131 @@ export interface BalanceSheetUpgradedInterface extends utils.Interface { functionFragment: "setLastBlockNumber", data: BytesLike ): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface BalanceSheetUpgraded extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): BalanceSheetUpgraded; + waitForDeployment(): Promise; interface: BalanceSheetUpgradedInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getLastBlockNumber(overrides?: CallOverrides): Promise<[BigNumber]>; - - lastBlockNumber(overrides?: CallOverrides): Promise<[BigNumber]>; - - oracle(overrides?: CallOverrides): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - setLastBlockNumber( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; - fintroller(overrides?: CallOverrides): Promise; + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - getLastBlockNumber(overrides?: CallOverrides): Promise; + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; - lastBlockNumber(overrides?: CallOverrides): Promise; + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; - oracle(overrides?: CallOverrides): Promise; + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; - owner(overrides?: CallOverrides): Promise; + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; - setLastBlockNumber( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + fintroller: TypedContractMethod<[], [string], "view">; - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + getLastBlockNumber: TypedContractMethod<[], [bigint], "view">; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + lastBlockNumber: TypedContractMethod<[], [bigint], "view">; - fintroller(overrides?: CallOverrides): Promise; + oracle: TypedContractMethod<[], [string], "view">; - getLastBlockNumber(overrides?: CallOverrides): Promise; + owner: TypedContractMethod<[], [string], "view">; - lastBlockNumber(overrides?: CallOverrides): Promise; + setLastBlockNumber: TypedContractMethod<[], [void], "nonpayable">; - oracle(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - owner(overrides?: CallOverrides): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getLastBlockNumber" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "lastBlockNumber" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "oracle" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setLastBlockNumber" + ): TypedContractMethod<[], [void], "nonpayable">; - setLastBlockNumber(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getLastBlockNumber(overrides?: CallOverrides): Promise; - - lastBlockNumber(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setLastBlockNumber( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getLastBlockNumber( - overrides?: CallOverrides - ): Promise; - - lastBlockNumber(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setLastBlockNumber( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/IBalanceSheetUpgraded.ts b/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/IBalanceSheetUpgraded.ts index c3a7e218..b0b0244b 100644 --- a/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/IBalanceSheetUpgraded.ts +++ b/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/IBalanceSheetUpgraded.ts @@ -3,33 +3,25 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IBalanceSheetUpgradedInterface extends utils.Interface { - functions: { - "getLastBlockNumber()": FunctionFragment; - "setLastBlockNumber()": FunctionFragment; - }; - +export interface IBalanceSheetUpgradedInterface extends Interface { getFunction( - nameOrSignatureOrTopic: "getLastBlockNumber" | "setLastBlockNumber" + nameOrSignature: "getLastBlockNumber" | "setLastBlockNumber" ): FunctionFragment; encodeFunctionData( @@ -49,73 +41,65 @@ export interface IBalanceSheetUpgradedInterface extends utils.Interface { functionFragment: "setLastBlockNumber", data: BytesLike ): Result; - - events: {}; } export interface IBalanceSheetUpgraded extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IBalanceSheetUpgraded; + waitForDeployment(): Promise; interface: IBalanceSheetUpgradedInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - getLastBlockNumber(overrides?: CallOverrides): Promise<[BigNumber]>; - - setLastBlockNumber( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - getLastBlockNumber(overrides?: CallOverrides): Promise; - - setLastBlockNumber( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - getLastBlockNumber(overrides?: CallOverrides): Promise; + ): 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; + + getLastBlockNumber: TypedContractMethod<[], [bigint], "view">; + + setLastBlockNumber: TypedContractMethod<[], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; - setLastBlockNumber(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "getLastBlockNumber" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "setLastBlockNumber" + ): TypedContractMethod<[], [void], "nonpayable">; filters: {}; - - estimateGas: { - getLastBlockNumber(overrides?: CallOverrides): Promise; - - setLastBlockNumber( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - getLastBlockNumber( - overrides?: CallOverrides - ): Promise; - - setLastBlockNumber( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; } diff --git a/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/SBalanceSheetUpgraded.ts b/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/SBalanceSheetUpgraded.ts index f08972b8..a6fe2122 100644 --- a/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/SBalanceSheetUpgraded.ts +++ b/packages/protocol/src/types/contracts/test/BalanceSheetUpgraded.sol/SBalanceSheetUpgraded.ts @@ -3,31 +3,25 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, + TypedContractMethod, } from "../../../common"; -export interface SBalanceSheetUpgradedInterface extends utils.Interface { - functions: { - "fintroller()": FunctionFragment; - "lastBlockNumber()": FunctionFragment; - "oracle()": FunctionFragment; - }; - +export interface SBalanceSheetUpgradedInterface extends Interface { getFunction( - nameOrSignatureOrTopic: "fintroller" | "lastBlockNumber" | "oracle" + nameOrSignature: "fintroller" | "lastBlockNumber" | "oracle" ): FunctionFragment; encodeFunctionData( @@ -46,73 +40,70 @@ export interface SBalanceSheetUpgradedInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result; - - events: {}; } export interface SBalanceSheetUpgraded extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): SBalanceSheetUpgraded; + waitForDeployment(): Promise; interface: SBalanceSheetUpgradedInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - fintroller(overrides?: CallOverrides): Promise<[string]>; - - lastBlockNumber(overrides?: CallOverrides): Promise<[BigNumber]>; - - oracle(overrides?: CallOverrides): Promise<[string]>; - }; - - fintroller(overrides?: CallOverrides): Promise; - - lastBlockNumber(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - - callStatic: { - fintroller(overrides?: CallOverrides): Promise; - - lastBlockNumber(overrides?: CallOverrides): Promise; + ): 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; + + fintroller: TypedContractMethod<[], [string], "view">; + + lastBlockNumber: TypedContractMethod<[], [bigint], "view">; + + oracle: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - oracle(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "lastBlockNumber" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "oracle" + ): TypedContractMethod<[], [string], "view">; filters: {}; - - estimateGas: { - fintroller(overrides?: CallOverrides): Promise; - - lastBlockNumber(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - fintroller(overrides?: CallOverrides): Promise; - - lastBlockNumber(overrides?: CallOverrides): Promise; - - oracle(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/protocol/src/types/contracts/test/GodModeBalanceSheet.ts b/packages/protocol/src/types/contracts/test/GodModeBalanceSheet.ts index a1c9ab36..dfbb67b4 100644 --- a/packages/protocol/src/types/contracts/test/GodModeBalanceSheet.ts +++ b/packages/protocol/src/types/contracts/test/GodModeBalanceSheet.ts @@ -3,62 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeBalanceSheetInterface extends utils.Interface { - functions: { - "__godMode_setBondList(address,address[])": FunctionFragment; - "__godMode_setCollateralAmount(address,address,uint256)": FunctionFragment; - "__godMode_setCollateralList(address,address[])": FunctionFragment; - "__godMode_setDebtAmount(address,address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "borrow(address,uint256)": FunctionFragment; - "depositCollateral(address,uint256)": FunctionFragment; - "fintroller()": 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; - "getRepayAmount(address,uint256,address)": FunctionFragment; - "getSeizableCollateralAmount(address,uint256,address)": FunctionFragment; - "initialize(address,address)": FunctionFragment; - "liquidateBorrow(address,address,uint256,address)": FunctionFragment; - "oracle()": FunctionFragment; - "owner()": FunctionFragment; - "repayBorrow(address,uint256)": FunctionFragment; - "repayBorrowBehalf(address,address,uint256)": FunctionFragment; - "setFintroller(address)": FunctionFragment; - "setOracle(address)": FunctionFragment; - "withdrawCollateral(address,uint256)": FunctionFragment; - }; - +export interface GodModeBalanceSheetInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "__godMode_setBondList" | "__godMode_setCollateralAmount" | "__godMode_setCollateralList" @@ -87,29 +54,33 @@ export interface GodModeBalanceSheetInterface extends utils.Interface { | "withdrawCollateral" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Borrow" + | "DepositCollateral" + | "LiquidateBorrow" + | "RepayBorrow" + | "SetFintroller" + | "SetOracle" + | "TransferOwnership" + | "WithdrawCollateral" + ): EventFragment; + encodeFunctionData( functionFragment: "__godMode_setBondList", - values: [PromiseOrValue, PromiseOrValue[]] + values: [AddressLike, AddressLike[]] ): string; encodeFunctionData( functionFragment: "__godMode_setCollateralAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_setCollateralList", - values: [PromiseOrValue, PromiseOrValue[]] + values: [AddressLike, AddressLike[]] ): string; encodeFunctionData( functionFragment: "__godMode_setDebtAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -117,15 +88,15 @@ export interface GodModeBalanceSheetInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "borrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -133,88 +104,65 @@ export interface GodModeBalanceSheetInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getBondList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCurrentAccountLiquidity", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getHypotheticalAccountLiquidity", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getRepayAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "getSeizableCollateralAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "initialize", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "liquidateBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData(functionFragment: "oracle", values?: undefined): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "repayBorrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "repayBorrowBehalf", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setFintroller", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "setOracle", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "withdrawCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -303,1018 +251,710 @@ export interface GodModeBalanceSheetInterface extends utils.Interface { 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; - "SetFintroller(address,address,address)": 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: "SetFintroller"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetOracle"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawCollateral"): EventFragment; } -export interface BorrowEventObject { - account: string; - bond: string; - borrowAmount: BigNumber; +export namespace BorrowEvent { + export type InputTuple = [ + account: AddressLike, + bond: AddressLike, + borrowAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + bond: string, + borrowAmount: bigint + ]; + export interface OutputObject { + account: string; + bond: string; + borrowAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BorrowEvent = TypedEvent< - [string, string, BigNumber], - BorrowEventObject ->; -export type BorrowEventFilter = TypedEventFilter; - -export interface DepositCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace DepositCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositCollateralEvent = TypedEvent< - [string, string, BigNumber], - DepositCollateralEventObject ->; - -export type DepositCollateralEventFilter = - TypedEventFilter; -export interface LiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - collateral: string; - seizedCollateralAmount: BigNumber; +export namespace LiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike, + seizedCollateralAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + repayAmount: bigint, + collateral: string, + seizedCollateralAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + repayAmount: bigint; + collateral: string; + seizedCollateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type LiquidateBorrowEvent = TypedEvent< - [string, string, string, BigNumber, string, BigNumber], - LiquidateBorrowEventObject ->; - -export type LiquidateBorrowEventFilter = TypedEventFilter; -export interface RepayBorrowEventObject { - payer: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - newDebtAmount: BigNumber; +export namespace RepayBorrowEvent { + export type InputTuple = [ + payer: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + newDebtAmount: BigNumberish + ]; + export type OutputTuple = [ + payer: string, + borrower: string, + bond: string, + repayAmount: bigint, + newDebtAmount: bigint + ]; + export interface OutputObject { + payer: string; + borrower: string; + bond: string; + repayAmount: bigint; + newDebtAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RepayBorrowEvent = TypedEvent< - [string, string, string, BigNumber, BigNumber], - RepayBorrowEventObject ->; -export type RepayBorrowEventFilter = TypedEventFilter; - -export interface SetFintrollerEventObject { - owner: string; - oldFintroller: string; - newFintroller: string; +export namespace SetFintrollerEvent { + export type InputTuple = [ + owner: AddressLike, + oldFintroller: AddressLike, + newFintroller: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldFintroller: string, + newFintroller: string + ]; + export interface OutputObject { + owner: string; + oldFintroller: string; + newFintroller: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFintrollerEvent = TypedEvent< - [string, string, string], - SetFintrollerEventObject ->; - -export type SetFintrollerEventFilter = TypedEventFilter; -export interface SetOracleEventObject { - owner: string; - oldOracle: string; - newOracle: string; +export namespace SetOracleEvent { + export type InputTuple = [ + owner: AddressLike, + oldOracle: AddressLike, + newOracle: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldOracle: string, + newOracle: string + ]; + export interface OutputObject { + owner: string; + oldOracle: string; + newOracle: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetOracleEvent = TypedEvent< - [string, string, string], - SetOracleEventObject ->; -export type SetOracleEventFilter = TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; -export interface WithdrawCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace WithdrawCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawCollateralEvent = TypedEvent< - [string, string, BigNumber], - WithdrawCollateralEventObject ->; - -export type WithdrawCollateralEventFilter = - TypedEventFilter; export interface GodModeBalanceSheet extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeBalanceSheet; + waitForDeployment(): Promise; interface: GodModeBalanceSheetInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - __godMode_setBondList( - account: PromiseOrValue, - bondList: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - newCollateralAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setCollateralList( - account: PromiseOrValue, - collateralList: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - newDebtAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { collateralAmount: BigNumber }>; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { debtAmount: BigNumber }>; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { repayAmount: BigNumber }>; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { seizableCollateralAmount: BigNumber }>; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - oracle(overrides?: CallOverrides): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - __godMode_setBondList( - account: PromiseOrValue, - bondList: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - newCollateralAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setCollateralList( - account: PromiseOrValue, - collateralList: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - newDebtAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + __godMode_setBondList: TypedContractMethod< + [account: AddressLike, bondList: AddressLike[]], + [void], + "nonpayable" + >; - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + __godMode_setCollateralAmount: TypedContractMethod< + [ + account: AddressLike, + collateral: AddressLike, + newCollateralAmount: BigNumberish + ], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + __godMode_setCollateralList: TypedContractMethod< + [account: AddressLike, collateralList: AddressLike[]], + [void], + "nonpayable" + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + __godMode_setDebtAmount: TypedContractMethod< + [account: AddressLike, bond: AddressLike, newDebtAmount: BigNumberish], + [void], + "nonpayable" >; - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + borrow: TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + depositCollateral: TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" + >; - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + fintroller: TypedContractMethod<[], [string], "view">; - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getBondList: TypedContractMethod<[account: AddressLike], [string[]], "view">; - oracle(overrides?: CallOverrides): Promise; + getCollateralAmount: TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" + >; - owner(overrides?: CallOverrides): Promise; + getCollateralList: TypedContractMethod< + [account: AddressLike], + [string[]], + "view" + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getCurrentAccountLiquidity: TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getDebtAmount: TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getHypotheticalAccountLiquidity: TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getRepayAmount: TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getSeizableCollateralAmount: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; - callStatic: { - __godMode_setBondList( - account: PromiseOrValue, - bondList: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; + initialize: TypedContractMethod< + [fintroller_: AddressLike, oracle_: AddressLike], + [void], + "nonpayable" + >; - __godMode_setCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - newCollateralAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + liquidateBorrow: TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; - __godMode_setCollateralList( - account: PromiseOrValue, - collateralList: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; + oracle: TypedContractMethod<[], [string], "view">; - __godMode_setDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - newDebtAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + owner: TypedContractMethod<[], [string], "view">; - _renounceOwnership(overrides?: CallOverrides): Promise; + repayBorrow: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + repayBorrowBehalf: TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setFintroller: TypedContractMethod< + [newFintroller: AddressLike], + [void], + "nonpayable" + >; - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setOracle: TypedContractMethod< + [newOracle: AddressLike], + [void], + "nonpayable" + >; - fintroller(overrides?: CallOverrides): Promise; + withdrawCollateral: TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "__godMode_setBondList" + ): TypedContractMethod< + [account: AddressLike, bondList: AddressLike[]], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_setCollateralAmount" + ): TypedContractMethod< + [ + account: AddressLike, + collateral: AddressLike, + newCollateralAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_setCollateralList" + ): TypedContractMethod< + [account: AddressLike, collateralList: AddressLike[]], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_setDebtAmount" + ): TypedContractMethod< + [account: AddressLike, bond: AddressLike, newDebtAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "borrow" + ): TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateral" + ): TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getBondList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCollateralAmount" + ): TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getCollateralList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCurrentAccountLiquidity" + ): TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getDebtAmount" + ): TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getHypotheticalAccountLiquidity" + ): TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getRepayAmount" + ): TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getSeizableCollateralAmount" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod< + [fintroller_: AddressLike, oracle_: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "liquidateBorrow" + ): TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "oracle" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "repayBorrow" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "repayBorrowBehalf" + ): TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFintroller" + ): TypedContractMethod<[newFintroller: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setOracle" + ): TypedContractMethod<[newOracle: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getEvent( + key: "Borrow" + ): TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject + >; + getEvent( + key: "DepositCollateral" + ): TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + getEvent( + key: "LiquidateBorrow" + ): TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + getEvent( + key: "RepayBorrow" + ): TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + getEvent( + key: "SetFintroller" + ): TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + getEvent( + key: "SetOracle" + ): TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawCollateral" + ): TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + filters: { + "Borrow(address,address,uint256)": TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + Borrow: TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - oracle(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Borrow(address,address,uint256)"( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - Borrow( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - - "DepositCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - DepositCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - - "LiquidateBorrow(address,address,address,uint256,address,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - LiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - - "RepayBorrow(address,address,address,uint256,uint256)"( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - RepayBorrow( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - - "SetFintroller(address,address,address)"( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - SetFintroller( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - - "SetOracle(address,address,address)"( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - SetOracle( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - WithdrawCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - }; - - estimateGas: { - __godMode_setBondList( - account: PromiseOrValue, - bondList: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - newCollateralAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setCollateralList( - account: PromiseOrValue, - collateralList: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - newDebtAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - oracle(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - __godMode_setBondList( - account: PromiseOrValue, - bondList: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - newCollateralAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setCollateralList( - account: PromiseOrValue, - collateralList: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - newDebtAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - initialize( - fintroller_: PromiseOrValue, - oracle_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - oracle(overrides?: CallOverrides): Promise; + "DepositCollateral(address,address,uint256)": TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + DepositCollateral: TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; - owner(overrides?: CallOverrides): Promise; + "LiquidateBorrow(address,address,address,uint256,address,uint256)": TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + LiquidateBorrow: TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "RepayBorrow(address,address,address,uint256,uint256)": TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + RepayBorrow: TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetFintroller(address,address,address)": TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + SetFintroller: TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetOracle(address,address,address)": TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + SetOracle: TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "WithdrawCollateral(address,address,uint256)": TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + WithdrawCollateral: TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/test/GodModeErc20.ts b/packages/protocol/src/types/contracts/test/GodModeErc20.ts index 34319c72..fd2bf037 100644 --- a/packages/protocol/src/types/contracts/test/GodModeErc20.ts +++ b/packages/protocol/src/types/contracts/test/GodModeErc20.ts @@ -3,49 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeErc20Interface extends utils.Interface { - functions: { - "__godMode_burn(address,uint256)": FunctionFragment; - "__godMode_mint(address,uint256)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface GodModeErc20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "__godMode_burn" | "__godMode_mint" | "allowance" @@ -61,34 +41,38 @@ export interface GodModeErc20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "Approval" | "Burn" | "Mint" | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "__godMode_burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -98,15 +82,11 @@ export interface GodModeErc20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -140,443 +120,319 @@ export interface GodModeErc20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; -export type MintEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface GodModeErc20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeErc20; + waitForDeployment(): Promise; interface: GodModeErc20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + ): 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; + + __godMode_burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + __godMode_mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "__godMode_burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - __godMode_burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/test/GodModeFintroller.ts b/packages/protocol/src/types/contracts/test/GodModeFintroller.ts index a7ab3cd2..5282766a 100644 --- a/packages/protocol/src/types/contracts/test/GodModeFintroller.ts +++ b/packages/protocol/src/types/contracts/test/GodModeFintroller.ts @@ -3,49 +3,45 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; export declare namespace IFintroller { export type BondStruct = { - debtCeiling: PromiseOrValue; - isBorrowAllowed: PromiseOrValue; - isDepositUnderlyingAllowed: PromiseOrValue; - isLiquidateBorrowAllowed: PromiseOrValue; - isListed: PromiseOrValue; - isRepayBorrowAllowed: PromiseOrValue; + debtCeiling: BigNumberish; + isBorrowAllowed: boolean; + isDepositUnderlyingAllowed: boolean; + isLiquidateBorrowAllowed: boolean; + isListed: boolean; + isRepayBorrowAllowed: boolean; }; export type BondStructOutput = [ - BigNumber, - boolean, - boolean, - boolean, - boolean, - boolean + debtCeiling: bigint, + isBorrowAllowed: boolean, + isDepositUnderlyingAllowed: boolean, + isLiquidateBorrowAllowed: boolean, + isListed: boolean, + isRepayBorrowAllowed: boolean ] & { - debtCeiling: BigNumber; + debtCeiling: bigint; isBorrowAllowed: boolean; isDepositUnderlyingAllowed: boolean; isLiquidateBorrowAllowed: boolean; @@ -54,68 +50,31 @@ export declare namespace IFintroller { }; export type CollateralStruct = { - ceiling: PromiseOrValue; - ratio: PromiseOrValue; - liquidationIncentive: PromiseOrValue; - isDepositCollateralAllowed: PromiseOrValue; - isListed: PromiseOrValue; + ceiling: BigNumberish; + ratio: BigNumberish; + liquidationIncentive: BigNumberish; + isDepositCollateralAllowed: boolean; + isListed: boolean; }; export type CollateralStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - boolean, - boolean + ceiling: bigint, + ratio: bigint, + liquidationIncentive: bigint, + isDepositCollateralAllowed: boolean, + isListed: boolean ] & { - ceiling: BigNumber; - ratio: BigNumber; - liquidationIncentive: BigNumber; + ceiling: bigint; + ratio: bigint; + liquidationIncentive: bigint; isDepositCollateralAllowed: boolean; isListed: boolean; }; } -export interface GodModeFintrollerInterface extends utils.Interface { - functions: { - "__godMode_setBorrowAllowed(address,bool)": FunctionFragment; - "__godMode_setLiquidateBorrowAllowed(address,bool)": FunctionFragment; - "__godMode_setRepayBorrowAllowed(address,bool)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "getBond(address)": FunctionFragment; - "getBorrowAllowed(address)": FunctionFragment; - "getCollateral(address)": FunctionFragment; - "getCollateralCeiling(address)": FunctionFragment; - "getCollateralRatio(address)": FunctionFragment; - "getDebtCeiling(address)": FunctionFragment; - "getDepositCollateralAllowed(address)": FunctionFragment; - "getDepositUnderlyingAllowed(address)": FunctionFragment; - "getLiquidateBorrowAllowed(address)": FunctionFragment; - "getLiquidationIncentive(address)": FunctionFragment; - "getRepayBorrowAllowed(address)": FunctionFragment; - "isBondListed(address)": FunctionFragment; - "isCollateralListed(address)": FunctionFragment; - "listBond(address)": FunctionFragment; - "listCollateral(address)": FunctionFragment; - "maxBonds()": FunctionFragment; - "maxCollaterals()": FunctionFragment; - "owner()": FunctionFragment; - "setBorrowAllowed(address,bool)": FunctionFragment; - "setCollateralCeiling(address,uint256)": FunctionFragment; - "setCollateralRatio(address,uint256)": FunctionFragment; - "setDebtCeiling(address,uint256)": FunctionFragment; - "setDepositCollateralAllowed(address,bool)": FunctionFragment; - "setDepositUnderlyingAllowed(address,bool)": FunctionFragment; - "setLiquidateBorrowAllowed(address,bool)": FunctionFragment; - "setLiquidationIncentive(address,uint256)": FunctionFragment; - "setMaxBonds(uint256)": FunctionFragment; - "setMaxCollaterals(uint256)": FunctionFragment; - "setRepayBorrowAllowed(address,bool)": FunctionFragment; - }; - +export interface GodModeFintrollerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "__godMode_setBorrowAllowed" | "__godMode_setLiquidateBorrowAllowed" | "__godMode_setRepayBorrowAllowed" @@ -152,17 +111,35 @@ export interface GodModeFintrollerInterface extends utils.Interface { | "setRepayBorrowAllowed" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "ListBond" + | "ListCollateral" + | "SetBorrowAllowed" + | "SetCollateralCeiling" + | "SetCollateralRatio" + | "SetDebtCeiling" + | "SetDepositCollateralAllowed" + | "SetDepositUnderlyingAllowed" + | "SetLiquidateBorrowAllowed" + | "SetLiquidationIncentive" + | "SetMaxBonds" + | "SetMaxCollaterals" + | "SetRepayBorrowAllowed" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "__godMode_setBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "__godMode_setLiquidateBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "__godMode_setRepayBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -170,67 +147,67 @@ export interface GodModeFintrollerInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralRatio", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositCollateralAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositUnderlyingAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidateBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidationIncentive", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getRepayBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isBondListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isCollateralListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "maxBonds", values?: undefined): string; encodeFunctionData( @@ -240,47 +217,47 @@ export interface GodModeFintrollerInterface extends utils.Interface { encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "setBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setCollateralCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setCollateralRatio", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDebtCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDepositCollateralAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setDepositUnderlyingAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidateBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidationIncentive", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxBonds", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxCollaterals", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setRepayBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; decodeFunctionResult( @@ -407,1267 +384,915 @@ export interface GodModeFintrollerInterface extends utils.Interface { functionFragment: "setRepayBorrowAllowed", data: BytesLike ): Result; - - events: { - "ListBond(address,address)": EventFragment; - "ListCollateral(address,address)": EventFragment; - "SetBorrowAllowed(address,address,bool)": EventFragment; - "SetCollateralCeiling(address,address,uint256,uint256)": EventFragment; - "SetCollateralRatio(address,address,uint256,uint256)": EventFragment; - "SetDebtCeiling(address,address,uint256,uint256)": EventFragment; - "SetDepositCollateralAllowed(address,address,bool)": EventFragment; - "SetDepositUnderlyingAllowed(address,address,bool)": EventFragment; - "SetLiquidateBorrowAllowed(address,address,bool)": EventFragment; - "SetLiquidationIncentive(address,address,uint256,uint256)": EventFragment; - "SetMaxBonds(address,uint256,uint256)": EventFragment; - "SetMaxCollaterals(address,uint256,uint256)": EventFragment; - "SetRepayBorrowAllowed(address,address,bool)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ListBond"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ListCollateral"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralCeiling"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralRatio"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetDebtCeiling"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositCollateralAllowed" - ): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositUnderlyingAllowed" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidateBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidationIncentive"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxBonds"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxCollaterals"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetRepayBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface ListBondEventObject { - owner: string; - bond: string; +export namespace ListBondEvent { + export type InputTuple = [owner: AddressLike, bond: AddressLike]; + export type OutputTuple = [owner: string, bond: string]; + export interface OutputObject { + owner: string; + bond: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListBondEvent = TypedEvent<[string, string], ListBondEventObject>; -export type ListBondEventFilter = TypedEventFilter; - -export interface ListCollateralEventObject { - owner: string; - collateral: string; +export namespace ListCollateralEvent { + export type InputTuple = [owner: AddressLike, collateral: AddressLike]; + export type OutputTuple = [owner: string, collateral: string]; + export interface OutputObject { + owner: string; + collateral: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListCollateralEvent = TypedEvent< - [string, string], - ListCollateralEventObject ->; - -export type ListCollateralEventFilter = TypedEventFilter; -export interface SetBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; -} -export type SetBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetBorrowAllowedEventObject ->; - -export type SetBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetCollateralCeilingEventObject { - owner: string; - collateral: string; - oldCollateralCeiling: BigNumber; - newCollateralCeiling: BigNumber; +export namespace SetBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetCollateralCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralCeilingEventObject ->; - -export type SetCollateralCeilingEventFilter = - TypedEventFilter; - -export interface SetCollateralRatioEventObject { - owner: string; - collateral: string; - oldCollateralRatio: BigNumber; - newCollateralRatio: BigNumber; -} -export type SetCollateralRatioEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralRatioEventObject ->; - -export type SetCollateralRatioEventFilter = - TypedEventFilter; - -export interface SetDebtCeilingEventObject { - owner: string; - bond: string; - oldDebtCeiling: BigNumber; - newDebtCeiling: BigNumber; -} -export type SetDebtCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetDebtCeilingEventObject ->; - -export type SetDebtCeilingEventFilter = TypedEventFilter; -export interface SetDepositCollateralAllowedEventObject { - owner: string; - collateral: string; - state: boolean; +export namespace SetCollateralCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralCeiling: BigNumberish, + newCollateralCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralCeiling: bigint, + newCollateralCeiling: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralCeiling: bigint; + newCollateralCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositCollateralAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositCollateralAllowedEventObject ->; - -export type SetDepositCollateralAllowedEventFilter = - TypedEventFilter; - -export interface SetDepositUnderlyingAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetCollateralRatioEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralRatio: BigNumberish, + newCollateralRatio: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralRatio: bigint, + newCollateralRatio: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralRatio: bigint; + newCollateralRatio: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositUnderlyingAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositUnderlyingAllowedEventObject ->; - -export type SetDepositUnderlyingAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidateBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetDebtCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + oldDebtCeiling: BigNumberish, + newDebtCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + bond: string, + oldDebtCeiling: bigint, + newDebtCeiling: bigint + ]; + export interface OutputObject { + owner: string; + bond: string; + oldDebtCeiling: bigint; + newDebtCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidateBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetLiquidateBorrowAllowedEventObject ->; - -export type SetLiquidateBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidationIncentiveEventObject { - owner: string; - collateral: string; - oldLiquidationIncentive: BigNumber; - newLiquidationIncentive: BigNumber; + +export namespace SetDepositCollateralAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, collateral: string, state: boolean]; + export interface OutputObject { + owner: string; + collateral: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidationIncentiveEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetLiquidationIncentiveEventObject ->; - -export type SetLiquidationIncentiveEventFilter = - TypedEventFilter; - -export interface SetMaxBondsEventObject { - owner: string; - oldMaxBonds: BigNumber; - newMaxBonds: BigNumber; + +export namespace SetDepositUnderlyingAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxBondsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxBondsEventObject ->; -export type SetMaxBondsEventFilter = TypedEventFilter; +export namespace SetLiquidateBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface SetMaxCollateralsEventObject { - owner: string; - oldMaxCollaterals: BigNumber; - newMaxCollaterals: BigNumber; +export namespace SetLiquidationIncentiveEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldLiquidationIncentive: BigNumberish, + newLiquidationIncentive: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldLiquidationIncentive: bigint, + newLiquidationIncentive: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldLiquidationIncentive: bigint; + newLiquidationIncentive: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxCollateralsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxCollateralsEventObject ->; - -export type SetMaxCollateralsEventFilter = - TypedEventFilter; - -export interface SetRepayBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetMaxBondsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxBonds: BigNumberish, + newMaxBonds: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxBonds: bigint, + newMaxBonds: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxBonds: bigint; + newMaxBonds: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetRepayBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetRepayBorrowAllowedEventObject ->; -export type SetRepayBorrowAllowedEventFilter = - TypedEventFilter; +export namespace SetMaxCollateralsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxCollaterals: BigNumberish, + newMaxCollaterals: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxCollaterals: bigint, + newMaxCollaterals: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxCollaterals: bigint; + newMaxCollaterals: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace SetRepayBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface GodModeFintroller extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeFintroller; + waitForDeployment(): Promise; interface: GodModeFintrollerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - __godMode_setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.BondStructOutput]>; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.CollateralStructOutput]>; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise<[BigNumber]>; - - maxCollaterals(overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - __godMode_setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - __godMode_setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - __godMode_setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - __godMode_setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + ): 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; + + __godMode_setBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + __godMode_setLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + __godMode_setRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + getBond: TypedContractMethod< + [hToken: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + + getBorrowAllowed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + getCollateral: TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + + getCollateralCeiling: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getCollateralRatio: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getDebtCeiling: TypedContractMethod<[bond: AddressLike], [bigint], "view">; + + getDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + getDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + isBondListed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + isCollateralListed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + listBond: TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + + listCollateral: TypedContractMethod< + [collateral: AddressLike], + [void], + "nonpayable" + >; + + maxBonds: TypedContractMethod<[], [bigint], "view">; + + maxCollaterals: TypedContractMethod<[], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + setBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setCollateralCeiling: TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setCollateralRatio: TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + + setDebtCeiling: TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + + setMaxBonds: TypedContractMethod< + [newMaxBonds: BigNumberish], + [void], + "nonpayable" + >; + + setMaxCollaterals: TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + + setRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - filters: { - "ListBond(address,address)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - ListBond( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - - "ListCollateral(address,address)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - ListCollateral( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - - "SetBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - SetBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - - "SetCollateralCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - SetCollateralCeiling( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - - "SetCollateralRatio(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - SetCollateralRatio( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - - "SetDebtCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - SetDebtCeiling( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - - "SetDepositCollateralAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - SetDepositCollateralAllowed( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - - "SetDepositUnderlyingAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - SetDepositUnderlyingAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - - "SetLiquidateBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - SetLiquidateBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - - "SetLiquidationIncentive(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - SetLiquidationIncentive( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - - "SetMaxBonds(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - SetMaxBonds( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - - "SetMaxCollaterals(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - SetMaxCollaterals( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - - "SetRepayBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - SetRepayBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; + getFunction( + nameOrSignature: "__godMode_setBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_setLiquidateBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_setRepayBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "getBond" + ): TypedContractMethod< + [hToken: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getCollateral" + ): TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getCollateralCeiling" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getCollateralRatio" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDebtCeiling" + ): TypedContractMethod<[bond: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDepositCollateralAllowed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getDepositUnderlyingAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidateBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidationIncentive" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getRepayBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isBondListed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isCollateralListed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "listBond" + ): TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "listCollateral" + ): TypedContractMethod<[collateral: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "maxBonds" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxCollaterals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralCeiling" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralRatio" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDebtCeiling" + ): TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositCollateralAllowed" + ): TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositUnderlyingAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidateBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidationIncentive" + ): TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxBonds" + ): TypedContractMethod<[newMaxBonds: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setMaxCollaterals" + ): TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setRepayBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; - estimateGas: { - __godMode_setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getEvent( + key: "ListBond" + ): TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + getEvent( + key: "ListCollateral" + ): TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + getEvent( + key: "SetBorrowAllowed" + ): TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetCollateralCeiling" + ): TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + getEvent( + key: "SetCollateralRatio" + ): TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + getEvent( + key: "SetDebtCeiling" + ): TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + getEvent( + key: "SetDepositCollateralAllowed" + ): TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + getEvent( + key: "SetDepositUnderlyingAllowed" + ): TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidateBorrowAllowed" + ): TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidationIncentive" + ): TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + getEvent( + key: "SetMaxBonds" + ): TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + getEvent( + key: "SetMaxCollaterals" + ): TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + getEvent( + key: "SetRepayBorrowAllowed" + ): TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - populateTransaction: { - __godMode_setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - hToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + filters: { + "ListBond(address,address)": TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + ListBond: TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + + "ListCollateral(address,address)": TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + ListCollateral: TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + + "SetBorrowAllowed(address,address,bool)": TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + SetBorrowAllowed: TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + + "SetCollateralCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + SetCollateralCeiling: TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + + "SetCollateralRatio(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + SetCollateralRatio: TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + + "SetDebtCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + SetDebtCeiling: TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + + "SetDepositCollateralAllowed(address,address,bool)": TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + SetDepositCollateralAllowed: TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + + "SetDepositUnderlyingAllowed(address,address,bool)": TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + SetDepositUnderlyingAllowed: TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + + "SetLiquidateBorrowAllowed(address,address,bool)": TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + SetLiquidateBorrowAllowed: TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + + "SetLiquidationIncentive(address,address,uint256,uint256)": TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + SetLiquidationIncentive: TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + + "SetMaxBonds(address,uint256,uint256)": TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + SetMaxBonds: TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + + "SetMaxCollaterals(address,uint256,uint256)": TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + SetMaxCollaterals: TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + + "SetRepayBorrowAllowed(address,address,bool)": TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + SetRepayBorrowAllowed: TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/test/GodModeHToken.ts b/packages/protocol/src/types/contracts/test/GodModeHToken.ts index b1b49a06..9e6fd28a 100644 --- a/packages/protocol/src/types/contracts/test/GodModeHToken.ts +++ b/packages/protocol/src/types/contracts/test/GodModeHToken.ts @@ -3,76 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeHTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "__godMode_mint(address,uint256)": FunctionFragment; - "__godMode_setMaturity(uint256)": FunctionFragment; - "__godMode_setTotalUnderlyingReserve(uint256)": FunctionFragment; - "__godMode_setUnderlyingPrecisionScalar(uint256)": FunctionFragment; - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setBalanceSheet(address)": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "balanceSheet()": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "depositUnderlying(uint256)": FunctionFragment; - "fintroller()": FunctionFragment; - "getDepositorBalance(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "isMatured()": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "nonces(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "redeem(uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "totalUnderlyingReserve()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - "withdrawUnderlying(uint256)": FunctionFragment; - }; - +export interface GodModeHTokenInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "__godMode_mint" @@ -115,6 +68,21 @@ export interface GodModeHTokenInterface extends utils.Interface { | "withdrawUnderlying" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "DepositUnderlying" + | "Mint" + | "Recover" + | "Redeem" + | "SetBalanceSheet" + | "SetNonRecoverableTokens" + | "Transfer" + | "TransferOwnership" + | "WithdrawUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -125,23 +93,23 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "__godMode_mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_setMaturity", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_setTotalUnderlyingReserve", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_setUnderlyingPrecisionScalar", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -149,27 +117,27 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setBalanceSheet", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "balanceSheet", @@ -177,16 +145,16 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -194,43 +162,40 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getDepositorBalance", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "isMatured", values?: undefined): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; encodeFunctionData( functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "redeem", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -243,15 +208,11 @@ export interface GodModeHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -264,7 +225,7 @@ export interface GodModeHTokenInterface extends utils.Interface { encodeFunctionData(functionFragment: "version", values?: undefined): string; encodeFunctionData( functionFragment: "withdrawUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -370,1163 +331,823 @@ export interface GodModeHTokenInterface extends utils.Interface { functionFragment: "withdrawUnderlying", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "DepositUnderlying(address,uint256,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Recover(address,address,uint256)": EventFragment; - "Redeem(address,uint256,uint256)": EventFragment; - "SetBalanceSheet(address,address,address)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "WithdrawUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DepositUnderlying"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBalanceSheet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawUnderlying"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface DepositUnderlyingEventObject { - depositor: string; - depositUnderlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace DepositUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + depositUnderlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + depositUnderlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + depositUnderlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - DepositUnderlyingEventObject ->; - -export type DepositUnderlyingEventFilter = - TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; -export type MintEventFilter = TypedEventFilter; - -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface RedeemEventObject { - account: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace RedeemEvent { + export type InputTuple = [ + account: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + account: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RedeemEvent = TypedEvent< - [string, BigNumber, BigNumber], - RedeemEventObject ->; -export type RedeemEventFilter = TypedEventFilter; - -export interface SetBalanceSheetEventObject { - owner: string; - oldBalanceSheet: string; - newBalanceSheet: string; +export namespace SetBalanceSheetEvent { + export type InputTuple = [ + owner: AddressLike, + oldBalanceSheet: AddressLike, + newBalanceSheet: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldBalanceSheet: string, + newBalanceSheet: string + ]; + export interface OutputObject { + owner: string; + oldBalanceSheet: string; + newBalanceSheet: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetBalanceSheetEvent = TypedEvent< - [string, string, string], - SetBalanceSheetEventObject ->; - -export type SetBalanceSheetEventFilter = TypedEventFilter; -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; -} -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; - -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawUnderlyingEventObject { - depositor: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; + +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - WithdrawUnderlyingEventObject ->; -export type WithdrawUnderlyingEventFilter = - TypedEventFilter; +export namespace WithdrawUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface GodModeHToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeHToken; + waitForDeployment(): Promise; interface: GodModeHTokenInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTotalUnderlyingReserve( - newTotalUnderlyingReserve: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlyingPrecisionScalar( - newUnderlyingPrecisionScalar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amount: BigNumber }>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise<[boolean]>; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + __godMode_mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + __godMode_setMaturity: TypedContractMethod< + [newMaturity: BigNumberish], + [void], + "nonpayable" + >; + + __godMode_setTotalUnderlyingReserve: TypedContractMethod< + [newTotalUnderlyingReserve: BigNumberish], + [void], + "nonpayable" + >; + + __godMode_setUnderlyingPrecisionScalar: TypedContractMethod< + [newUnderlyingPrecisionScalar: BigNumberish], + [void], + "nonpayable" + >; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setBalanceSheet: TypedContractMethod< + [newBalanceSheet: AddressLike], + [void], + "nonpayable" + >; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + depositUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + fintroller: TypedContractMethod<[], [string], "view">; + + getDepositorBalance: TypedContractMethod< + [depositor: AddressLike], + [bigint], + "view" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + isMatured: TypedContractMethod<[], [boolean], "view">; + + maturity: TypedContractMethod<[], [bigint], "view">; + + mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonRecoverableTokens: TypedContractMethod< + [arg0: BigNumberish], + [string], + "view" + >; + + nonces: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + totalUnderlyingReserve: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise<[string]>; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + underlying: TypedContractMethod<[], [string], "view">; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTotalUnderlyingReserve( - newTotalUnderlyingReserve: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlyingPrecisionScalar( - newUnderlyingPrecisionScalar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - __godMode_setTotalUnderlyingReserve( - newTotalUnderlyingReserve: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - __godMode_setUnderlyingPrecisionScalar( - newUnderlyingPrecisionScalar: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [string], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + withdrawUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "__godMode_mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_setMaturity" + ): TypedContractMethod<[newMaturity: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "__godMode_setTotalUnderlyingReserve" + ): TypedContractMethod< + [newTotalUnderlyingReserve: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "__godMode_setUnderlyingPrecisionScalar" + ): TypedContractMethod< + [newUnderlyingPrecisionScalar: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setBalanceSheet" + ): TypedContractMethod<[newBalanceSheet: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getDepositorBalance" + ): TypedContractMethod<[depositor: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "isMatured" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[arg0: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "totalUnderlyingReserve" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "withdrawUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "DepositUnderlying" + ): TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "Redeem" + ): TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + getEvent( + key: "SetBalanceSheet" + ): TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawUnderlying" + ): TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "DepositUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - DepositUnderlying( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "Redeem(address,uint256,uint256)"( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - Redeem( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - - "SetBalanceSheet(address,address,address)"( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - SetBalanceSheet( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - WithdrawUnderlying( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTotalUnderlyingReserve( - newTotalUnderlyingReserve: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlyingPrecisionScalar( - newUnderlyingPrecisionScalar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - __godMode_mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setMaturity( - newMaturity: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTotalUnderlyingReserve( - newTotalUnderlyingReserve: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setUnderlyingPrecisionScalar( - newUnderlyingPrecisionScalar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve( - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "DepositUnderlying(address,uint256,uint256)": TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + DepositUnderlying: TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "Redeem(address,uint256,uint256)": TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + Redeem: TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + + "SetBalanceSheet(address,address,address)": TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + SetBalanceSheet: TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "WithdrawUnderlying(address,uint256,uint256)": TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; + WithdrawUnderlying: TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/test/GodModeOwnableUpgradeable.ts b/packages/protocol/src/types/contracts/test/GodModeOwnableUpgradeable.ts index b7823945..b2599338 100644 --- a/packages/protocol/src/types/contracts/test/GodModeOwnableUpgradeable.ts +++ b/packages/protocol/src/types/contracts/test/GodModeOwnableUpgradeable.ts @@ -3,45 +3,36 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeOwnableUpgradeableInterface extends utils.Interface { - functions: { - "__godMode_Ownable_init()": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface GodModeOwnableUpgradeableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "__godMode_Ownable_init" | "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "__godMode_Ownable_init", values?: undefined @@ -52,7 +43,7 @@ export interface GodModeOwnableUpgradeableInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -69,139 +60,111 @@ export interface GodModeOwnableUpgradeableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface GodModeOwnableUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeOwnableUpgradeable; + waitForDeployment(): Promise; interface: GodModeOwnableUpgradeableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - __godMode_Ownable_init( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - __godMode_Ownable_init( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - __godMode_Ownable_init(overrides?: CallOverrides): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + __godMode_Ownable_init: TypedContractMethod<[], [void], "nonpayable">; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "__godMode_Ownable_init" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - __godMode_Ownable_init( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - __godMode_Ownable_init( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/protocol/src/types/contracts/test/GodModeUniswapV3PriceFeed.ts b/packages/protocol/src/types/contracts/test/GodModeUniswapV3PriceFeed.ts index 9e7aae48..b490f68e 100644 --- a/packages/protocol/src/types/contracts/test/GodModeUniswapV3PriceFeed.ts +++ b/packages/protocol/src/types/contracts/test/GodModeUniswapV3PriceFeed.ts @@ -3,47 +3,27 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface GodModeUniswapV3PriceFeedInterface extends utils.Interface { - functions: { - "__godMode_setMaxPrice(int256)": FunctionFragment; - "__godMode_setPool(address)": FunctionFragment; - "__godMode_setQuoteAsset(address)": FunctionFragment; - "__godMode_setTwapInterval(uint32)": FunctionFragment; - "baseAsset()": FunctionFragment; - "decimals()": FunctionFragment; - "description()": FunctionFragment; - "getRoundData(uint80)": FunctionFragment; - "latestRoundData()": FunctionFragment; - "maxPrice()": FunctionFragment; - "pool()": FunctionFragment; - "quoteAsset()": FunctionFragment; - "setMaxPrice(int256)": FunctionFragment; - "twapInterval()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface GodModeUniswapV3PriceFeedInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "__godMode_setMaxPrice" | "__godMode_setPool" | "__godMode_setQuoteAsset" @@ -63,19 +43,19 @@ export interface GodModeUniswapV3PriceFeedInterface extends utils.Interface { encodeFunctionData( functionFragment: "__godMode_setMaxPrice", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "__godMode_setPool", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "__godMode_setQuoteAsset", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "__godMode_setTwapInterval", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "baseAsset", values?: undefined): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; @@ -85,7 +65,7 @@ export interface GodModeUniswapV3PriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getRoundData", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "latestRoundData", @@ -99,7 +79,7 @@ export interface GodModeUniswapV3PriceFeedInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setMaxPrice", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "twapInterval", @@ -149,337 +129,198 @@ export interface GodModeUniswapV3PriceFeedInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: {}; } export interface GodModeUniswapV3PriceFeed extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): GodModeUniswapV3PriceFeed; + waitForDeployment(): Promise; interface: GodModeUniswapV3PriceFeedInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - __godMode_setMaxPrice( - newMaxPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setPool( - newPool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + __godMode_setMaxPrice: TypedContractMethod< + [newMaxPrice: BigNumberish], + [void], + "nonpayable" + >; - __godMode_setQuoteAsset( - newQuoteAsset: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + __godMode_setPool: TypedContractMethod< + [newPool: AddressLike], + [void], + "nonpayable" + >; - __godMode_setTwapInterval( - newTwapInterval: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + __godMode_setQuoteAsset: TypedContractMethod< + [newQuoteAsset: AddressLike], + [void], + "nonpayable" + >; - baseAsset(overrides?: CallOverrides): Promise<[string]>; + __godMode_setTwapInterval: TypedContractMethod< + [newTwapInterval: BigNumberish], + [void], + "nonpayable" + >; - decimals(overrides?: CallOverrides): Promise<[number]>; + baseAsset: TypedContractMethod<[], [string], "view">; - description(overrides?: CallOverrides): Promise<[string]>; + decimals: TypedContractMethod<[], [bigint], "view">; - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } - >; + description: TypedContractMethod<[], [string], "view">; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getRoundData: TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - maxPrice(overrides?: CallOverrides): Promise<[BigNumber]>; - - pool(overrides?: CallOverrides): Promise<[string]>; - - quoteAsset(overrides?: CallOverrides): Promise<[string]>; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise<[number]>; - - version(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - __godMode_setMaxPrice( - newMaxPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setPool( - newPool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setQuoteAsset( - newQuoteAsset: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTwapInterval( - newTwapInterval: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - baseAsset(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + ], + "view" >; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; + } + ], + "view" >; - maxPrice(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; - - quoteAsset(overrides?: CallOverrides): Promise; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - __godMode_setMaxPrice( - newMaxPrice: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + maxPrice: TypedContractMethod<[], [bigint], "view">; - __godMode_setPool( - newPool: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + pool: TypedContractMethod<[], [string], "view">; - __godMode_setQuoteAsset( - newQuoteAsset: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + quoteAsset: TypedContractMethod<[], [string], "view">; - __godMode_setTwapInterval( - newTwapInterval: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setMaxPrice: TypedContractMethod< + [maxPrice_: BigNumberish], + [void], + "nonpayable" + >; - baseAsset(overrides?: CallOverrides): Promise; + twapInterval: TypedContractMethod<[], [bigint], "view">; - decimals(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getFunction( + nameOrSignature: "__godMode_setMaxPrice" + ): TypedContractMethod<[newMaxPrice: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "__godMode_setPool" + ): TypedContractMethod<[newPool: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "__godMode_setQuoteAsset" + ): TypedContractMethod<[newQuoteAsset: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "__godMode_setTwapInterval" + ): TypedContractMethod<[newTwapInterval: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "baseAsset" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRoundData" + ): TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - maxPrice(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; - - quoteAsset(overrides?: CallOverrides): Promise; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "maxPrice" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "pool" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "quoteAsset" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setMaxPrice" + ): TypedContractMethod<[maxPrice_: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "twapInterval" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; filters: {}; - - estimateGas: { - __godMode_setMaxPrice( - newMaxPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setPool( - newPool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setQuoteAsset( - newQuoteAsset: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTwapInterval( - newTwapInterval: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - baseAsset(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - maxPrice(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; - - quoteAsset(overrides?: CallOverrides): Promise; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - __godMode_setMaxPrice( - newMaxPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setPool( - newPool: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setQuoteAsset( - newQuoteAsset: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - __godMode_setTwapInterval( - newTwapInterval: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - baseAsset(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - maxPrice(overrides?: CallOverrides): Promise; - - pool(overrides?: CallOverrides): Promise; - - quoteAsset(overrides?: CallOverrides): Promise; - - setMaxPrice( - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - twapInterval(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/protocol/src/types/factories/@prb/contracts/access/IOwnable__factory.ts b/packages/protocol/src/types/factories/@prb/contracts/access/IOwnable__factory.ts index 19e3f14c..0c4b5713 100644 --- a/packages/protocol/src/types/factories/@prb/contracts/access/IOwnable__factory.ts +++ b/packages/protocol/src/types/factories/@prb/contracts/access/IOwnable__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IOwnable, IOwnableInterface, @@ -67,12 +66,9 @@ const _abi = [ export class IOwnable__factory { static readonly abi = _abi; static createInterface(): IOwnableInterface { - return new utils.Interface(_abi) as IOwnableInterface; + return new Interface(_abi) as IOwnableInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IOwnable { - return new Contract(address, _abi, signerOrProvider) as IOwnable; + static connect(address: string, runner?: ContractRunner | null): IOwnable { + return new Contract(address, _abi, runner) as unknown as IOwnable; } } diff --git a/packages/protocol/src/types/factories/@prb/contracts/access/Ownable__factory.ts b/packages/protocol/src/types/factories/@prb/contracts/access/Ownable__factory.ts index 44e96ef3..5535b2da 100644 --- a/packages/protocol/src/types/factories/@prb/contracts/access/Ownable__factory.ts +++ b/packages/protocol/src/types/factories/@prb/contracts/access/Ownable__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { Ownable, OwnableInterface, @@ -110,32 +115,28 @@ export class Ownable__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): Ownable { - return super.attach(address) as Ownable; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + Ownable & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Ownable__factory { - return super.connect(signer) as Ownable__factory; + override connect(runner: ContractRunner | null): Ownable__factory { + return super.connect(runner) as Ownable__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): OwnableInterface { - return new utils.Interface(_abi) as OwnableInterface; + return new Interface(_abi) as OwnableInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Ownable { - return new Contract(address, _abi, signerOrProvider) as Ownable; + static connect(address: string, runner?: ContractRunner | null): Ownable { + return new Contract(address, _abi, runner) as unknown as Ownable; } } diff --git a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts index 8f5dd542..6e3417a4 100644 --- a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts +++ b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20Permit__factory.ts @@ -2,15 +2,18 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; +import type { NonPayableOverrides } from "../../../../../common"; import type { Erc20Permit, Erc20PermitInterface, @@ -530,25 +533,12 @@ export class Erc20Permit__factory extends ContractFactory { } } - override deploy( - _name: PromiseOrValue, - _symbol: PromiseOrValue, - _decimals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - _name, - _symbol, - _decimals, - overrides || {} - ) as Promise; - } override getDeployTransaction( - _name: PromiseOrValue, - _symbol: PromiseOrValue, - _decimals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + _name: string, + _symbol: string, + _decimals: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( _name, _symbol, @@ -556,22 +546,28 @@ export class Erc20Permit__factory extends ContractFactory { overrides || {} ); } - override attach(address: string): Erc20Permit { - return super.attach(address) as Erc20Permit; + override deploy( + _name: string, + _symbol: string, + _decimals: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(_name, _symbol, _decimals, overrides || {}) as Promise< + Erc20Permit & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Erc20Permit__factory { - return super.connect(signer) as Erc20Permit__factory; + override connect(runner: ContractRunner | null): Erc20Permit__factory { + return super.connect(runner) as Erc20Permit__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): Erc20PermitInterface { - return new utils.Interface(_abi) as Erc20PermitInterface; + return new Interface(_abi) as Erc20PermitInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Erc20Permit { - return new Contract(address, _abi, signerOrProvider) as Erc20Permit; + static connect(address: string, runner?: ContractRunner | null): Erc20Permit { + return new Contract(address, _abi, runner) as unknown as Erc20Permit; } } diff --git a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts index a565fae0..f505e93f 100644 --- a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts +++ b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20Recover__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { Erc20Recover, Erc20RecoverInterface, @@ -224,12 +223,12 @@ const _abi = [ export class Erc20Recover__factory { static readonly abi = _abi; static createInterface(): Erc20RecoverInterface { - return new utils.Interface(_abi) as Erc20RecoverInterface; + return new Interface(_abi) as Erc20RecoverInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): Erc20Recover { - return new Contract(address, _abi, signerOrProvider) as Erc20Recover; + return new Contract(address, _abi, runner) as unknown as Erc20Recover; } } diff --git a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts index f8ccda02..6e258a19 100644 --- a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts +++ b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/Erc20__factory.ts @@ -2,15 +2,18 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; +import type { NonPayableOverrides } from "../../../../../common"; import type { Erc20, Erc20Interface, @@ -382,25 +385,12 @@ export class Erc20__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - name_, - symbol_, - decimals_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( name_, symbol_, @@ -408,19 +398,28 @@ export class Erc20__factory extends ContractFactory { overrides || {} ); } - override attach(address: string): Erc20 { - return super.attach(address) as Erc20; + override deploy( + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(name_, symbol_, decimals_, overrides || {}) as Promise< + Erc20 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Erc20__factory { - return super.connect(signer) as Erc20__factory; + override connect(runner: ContractRunner | null): Erc20__factory { + return super.connect(runner) as Erc20__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): Erc20Interface { - return new utils.Interface(_abi) as Erc20Interface; + return new Interface(_abi) as Erc20Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): Erc20 { - return new Contract(address, _abi, signerOrProvider) as Erc20; + static connect(address: string, runner?: ContractRunner | null): Erc20 { + return new Contract(address, _abi, runner) as unknown as Erc20; } } diff --git a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts index 05eb441a..9b6c0a46 100644 --- a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts +++ b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20Permit, IErc20PermitInterface, @@ -386,12 +385,12 @@ const _abi = [ export class IErc20Permit__factory { static readonly abi = _abi; static createInterface(): IErc20PermitInterface { - return new utils.Interface(_abi) as IErc20PermitInterface; + return new Interface(_abi) as IErc20PermitInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IErc20Permit { - return new Contract(address, _abi, signerOrProvider) as IErc20Permit; + return new Contract(address, _abi, runner) as unknown as IErc20Permit; } } diff --git a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts index b9104d39..56d4c9ce 100644 --- a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts +++ b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20Recover, IErc20RecoverInterface, @@ -161,12 +160,12 @@ const _abi = [ export class IErc20Recover__factory { static readonly abi = _abi; static createInterface(): IErc20RecoverInterface { - return new utils.Interface(_abi) as IErc20RecoverInterface; + return new Interface(_abi) as IErc20RecoverInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IErc20Recover { - return new Contract(address, _abi, signerOrProvider) as IErc20Recover; + return new Contract(address, _abi, runner) as unknown as IErc20Recover; } } diff --git a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts index 9661f226..573bf6fe 100644 --- a/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts +++ b/packages/protocol/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20, IErc20Interface, @@ -285,9 +284,9 @@ const _abi = [ export class IErc20__factory { static readonly abi = _abi; static createInterface(): IErc20Interface { - return new utils.Interface(_abi) as IErc20Interface; + return new Interface(_abi) as IErc20Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): IErc20 { - return new Contract(address, _abi, signerOrProvider) as IErc20; + static connect(address: string, runner?: ContractRunner | null): IErc20 { + return new Contract(address, _abi, runner) as unknown as IErc20; } } diff --git a/packages/protocol/src/types/factories/contracts/access/IOwnableUpgradeable__factory.ts b/packages/protocol/src/types/factories/contracts/access/IOwnableUpgradeable__factory.ts index 27bb98ad..b0bc0b01 100644 --- a/packages/protocol/src/types/factories/contracts/access/IOwnableUpgradeable__factory.ts +++ b/packages/protocol/src/types/factories/contracts/access/IOwnableUpgradeable__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IOwnableUpgradeable, IOwnableUpgradeableInterface, @@ -88,12 +87,16 @@ const _abi = [ export class IOwnableUpgradeable__factory { static readonly abi = _abi; static createInterface(): IOwnableUpgradeableInterface { - return new utils.Interface(_abi) as IOwnableUpgradeableInterface; + return new Interface(_abi) as IOwnableUpgradeableInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IOwnableUpgradeable { - return new Contract(address, _abi, signerOrProvider) as IOwnableUpgradeable; + return new Contract( + address, + _abi, + runner + ) as unknown as IOwnableUpgradeable; } } diff --git a/packages/protocol/src/types/factories/contracts/access/OwnableUpgradeable__factory.ts b/packages/protocol/src/types/factories/contracts/access/OwnableUpgradeable__factory.ts index bb509de3..fb2a9542 100644 --- a/packages/protocol/src/types/factories/contracts/access/OwnableUpgradeable__factory.ts +++ b/packages/protocol/src/types/factories/contracts/access/OwnableUpgradeable__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { OwnableUpgradeable, OwnableUpgradeableInterface, @@ -105,32 +110,31 @@ export class OwnableUpgradeable__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): OwnableUpgradeable { - return super.attach(address) as OwnableUpgradeable; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + OwnableUpgradeable & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): OwnableUpgradeable__factory { - return super.connect(signer) as OwnableUpgradeable__factory; + override connect(runner: ContractRunner | null): OwnableUpgradeable__factory { + return super.connect(runner) as OwnableUpgradeable__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): OwnableUpgradeableInterface { - return new utils.Interface(_abi) as OwnableUpgradeableInterface; + return new Interface(_abi) as OwnableUpgradeableInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): OwnableUpgradeable { - return new Contract(address, _abi, signerOrProvider) as OwnableUpgradeable; + return new Contract(address, _abi, runner) as unknown as OwnableUpgradeable; } } diff --git a/packages/protocol/src/types/factories/contracts/core/balance-sheet/BalanceSheetV2__factory.ts b/packages/protocol/src/types/factories/contracts/core/balance-sheet/BalanceSheetV2__factory.ts index d3823931..cad87c7a 100644 --- a/packages/protocol/src/types/factories/contracts/core/balance-sheet/BalanceSheetV2__factory.ts +++ b/packages/protocol/src/types/factories/contracts/core/balance-sheet/BalanceSheetV2__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { BalanceSheetV2, BalanceSheetV2Interface, @@ -1039,32 +1044,31 @@ export class BalanceSheetV2__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): BalanceSheetV2 { - return super.attach(address) as BalanceSheetV2; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + BalanceSheetV2 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): BalanceSheetV2__factory { - return super.connect(signer) as BalanceSheetV2__factory; + override connect(runner: ContractRunner | null): BalanceSheetV2__factory { + return super.connect(runner) as BalanceSheetV2__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): BalanceSheetV2Interface { - return new utils.Interface(_abi) as BalanceSheetV2Interface; + return new Interface(_abi) as BalanceSheetV2Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): BalanceSheetV2 { - return new Contract(address, _abi, signerOrProvider) as BalanceSheetV2; + return new Contract(address, _abi, runner) as unknown as BalanceSheetV2; } } diff --git a/packages/protocol/src/types/factories/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts b/packages/protocol/src/types/factories/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts index 89bc8aad..69c0155c 100644 --- a/packages/protocol/src/types/factories/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts +++ b/packages/protocol/src/types/factories/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IBalanceSheetV2, IBalanceSheetV2Interface, @@ -935,12 +934,12 @@ const _abi = [ export class IBalanceSheetV2__factory { static readonly abi = _abi; static createInterface(): IBalanceSheetV2Interface { - return new utils.Interface(_abi) as IBalanceSheetV2Interface; + return new Interface(_abi) as IBalanceSheetV2Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IBalanceSheetV2 { - return new Contract(address, _abi, signerOrProvider) as IBalanceSheetV2; + return new Contract(address, _abi, runner) as unknown as IBalanceSheetV2; } } diff --git a/packages/protocol/src/types/factories/contracts/core/balance-sheet/SBalanceSheetV1__factory.ts b/packages/protocol/src/types/factories/contracts/core/balance-sheet/SBalanceSheetV1__factory.ts index 15fccc44..d19c05ce 100644 --- a/packages/protocol/src/types/factories/contracts/core/balance-sheet/SBalanceSheetV1__factory.ts +++ b/packages/protocol/src/types/factories/contracts/core/balance-sheet/SBalanceSheetV1__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { SBalanceSheetV1, SBalanceSheetV1Interface, @@ -41,12 +40,12 @@ const _abi = [ export class SBalanceSheetV1__factory { static readonly abi = _abi; static createInterface(): SBalanceSheetV1Interface { - return new utils.Interface(_abi) as SBalanceSheetV1Interface; + return new Interface(_abi) as SBalanceSheetV1Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): SBalanceSheetV1 { - return new Contract(address, _abi, signerOrProvider) as SBalanceSheetV1; + return new Contract(address, _abi, runner) as unknown as SBalanceSheetV1; } } diff --git a/packages/protocol/src/types/factories/contracts/core/balance-sheet/SBalanceSheetV2__factory.ts b/packages/protocol/src/types/factories/contracts/core/balance-sheet/SBalanceSheetV2__factory.ts index 3c32c581..cabfa5c8 100644 --- a/packages/protocol/src/types/factories/contracts/core/balance-sheet/SBalanceSheetV2__factory.ts +++ b/packages/protocol/src/types/factories/contracts/core/balance-sheet/SBalanceSheetV2__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { SBalanceSheetV2, SBalanceSheetV2Interface, @@ -41,12 +40,12 @@ const _abi = [ export class SBalanceSheetV2__factory { static readonly abi = _abi; static createInterface(): SBalanceSheetV2Interface { - return new utils.Interface(_abi) as SBalanceSheetV2Interface; + return new Interface(_abi) as SBalanceSheetV2Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): SBalanceSheetV2 { - return new Contract(address, _abi, signerOrProvider) as SBalanceSheetV2; + return new Contract(address, _abi, runner) as unknown as SBalanceSheetV2; } } diff --git a/packages/protocol/src/types/factories/contracts/core/fintroller/Fintroller__factory.ts b/packages/protocol/src/types/factories/contracts/core/fintroller/Fintroller__factory.ts index 3e721802..9e198e83 100644 --- a/packages/protocol/src/types/factories/contracts/core/fintroller/Fintroller__factory.ts +++ b/packages/protocol/src/types/factories/contracts/core/fintroller/Fintroller__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { Fintroller, FintrollerInterface, @@ -1133,32 +1138,28 @@ export class Fintroller__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): Fintroller { - return super.attach(address) as Fintroller; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + Fintroller & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): Fintroller__factory { - return super.connect(signer) as Fintroller__factory; + override connect(runner: ContractRunner | null): Fintroller__factory { + return super.connect(runner) as Fintroller__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): FintrollerInterface { - return new utils.Interface(_abi) as FintrollerInterface; + return new Interface(_abi) as FintrollerInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Fintroller { - return new Contract(address, _abi, signerOrProvider) as Fintroller; + static connect(address: string, runner?: ContractRunner | null): Fintroller { + return new Contract(address, _abi, runner) as unknown as Fintroller; } } diff --git a/packages/protocol/src/types/factories/contracts/core/fintroller/IFintroller__factory.ts b/packages/protocol/src/types/factories/contracts/core/fintroller/IFintroller__factory.ts index 3deb04d1..7d0b0b0f 100644 --- a/packages/protocol/src/types/factories/contracts/core/fintroller/IFintroller__factory.ts +++ b/packages/protocol/src/types/factories/contracts/core/fintroller/IFintroller__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IFintroller, IFintrollerInterface, @@ -1090,12 +1089,9 @@ const _abi = [ export class IFintroller__factory { static readonly abi = _abi; static createInterface(): IFintrollerInterface { - return new utils.Interface(_abi) as IFintrollerInterface; + return new Interface(_abi) as IFintrollerInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IFintroller { - return new Contract(address, _abi, signerOrProvider) as IFintroller; + static connect(address: string, runner?: ContractRunner | null): IFintroller { + return new Contract(address, _abi, runner) as unknown as IFintroller; } } diff --git a/packages/protocol/src/types/factories/contracts/core/h-token/HToken__factory.ts b/packages/protocol/src/types/factories/contracts/core/h-token/HToken__factory.ts index 7f7267eb..a2437e8a 100644 --- a/packages/protocol/src/types/factories/contracts/core/h-token/HToken__factory.ts +++ b/packages/protocol/src/types/factories/contracts/core/h-token/HToken__factory.ts @@ -2,15 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + AddressLike, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import type { NonPayableOverrides } from "../../../../common"; import type { HToken, HTokenInterface, @@ -1243,16 +1247,16 @@ export class HToken__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - balanceSheet_: PromiseOrValue, - fintroller_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( + override getDeployTransaction( + name_: string, + symbol_: string, + maturity_: BigNumberish, + balanceSheet_: AddressLike, + fintroller_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( name_, symbol_, maturity_, @@ -1260,18 +1264,18 @@ export class HToken__factory extends ContractFactory { fintroller_, underlying_, overrides || {} - ) as Promise; + ); } - override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - balanceSheet_: PromiseOrValue, - fintroller_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction( + override deploy( + name_: string, + symbol_: string, + maturity_: BigNumberish, + balanceSheet_: AddressLike, + fintroller_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( name_, symbol_, maturity_, @@ -1279,21 +1283,22 @@ export class HToken__factory extends ContractFactory { fintroller_, underlying_, overrides || {} - ); - } - override attach(address: string): HToken { - return super.attach(address) as HToken; + ) as Promise< + HToken & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): HToken__factory { - return super.connect(signer) as HToken__factory; + override connect(runner: ContractRunner | null): HToken__factory { + return super.connect(runner) as HToken__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): HTokenInterface { - return new utils.Interface(_abi) as HTokenInterface; + return new Interface(_abi) as HTokenInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): HToken { - return new Contract(address, _abi, signerOrProvider) as HToken; + static connect(address: string, runner?: ContractRunner | null): HToken { + return new Contract(address, _abi, runner) as unknown as HToken; } } diff --git a/packages/protocol/src/types/factories/contracts/core/h-token/IHToken__factory.ts b/packages/protocol/src/types/factories/contracts/core/h-token/IHToken__factory.ts index 16eaeb54..c6f917c2 100644 --- a/packages/protocol/src/types/factories/contracts/core/h-token/IHToken__factory.ts +++ b/packages/protocol/src/types/factories/contracts/core/h-token/IHToken__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IHToken, IHTokenInterface, @@ -1011,12 +1010,9 @@ const _abi = [ export class IHToken__factory { static readonly abi = _abi; static createInterface(): IHTokenInterface { - return new utils.Interface(_abi) as IHTokenInterface; + return new Interface(_abi) as IHTokenInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IHToken { - return new Contract(address, _abi, signerOrProvider) as IHToken; + static connect(address: string, runner?: ContractRunner | null): IHToken { + return new Contract(address, _abi, runner) as unknown as IHToken; } } diff --git a/packages/protocol/src/types/factories/contracts/external/chainlink/IAggregatorV3__factory.ts b/packages/protocol/src/types/factories/contracts/external/chainlink/IAggregatorV3__factory.ts index 901e68be..c1e737b7 100644 --- a/packages/protocol/src/types/factories/contracts/external/chainlink/IAggregatorV3__factory.ts +++ b/packages/protocol/src/types/factories/contracts/external/chainlink/IAggregatorV3__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IAggregatorV3, IAggregatorV3Interface, @@ -126,12 +125,12 @@ const _abi = [ export class IAggregatorV3__factory { static readonly abi = _abi; static createInterface(): IAggregatorV3Interface { - return new utils.Interface(_abi) as IAggregatorV3Interface; + return new Interface(_abi) as IAggregatorV3Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IAggregatorV3 { - return new Contract(address, _abi, signerOrProvider) as IAggregatorV3; + return new Contract(address, _abi, runner) as unknown as IAggregatorV3; } } diff --git a/packages/protocol/src/types/factories/contracts/external/uniswap/interfaces/IUniswapV3Pool__factory.ts b/packages/protocol/src/types/factories/contracts/external/uniswap/interfaces/IUniswapV3Pool__factory.ts index 7264f589..833d1362 100644 --- a/packages/protocol/src/types/factories/contracts/external/uniswap/interfaces/IUniswapV3Pool__factory.ts +++ b/packages/protocol/src/types/factories/contracts/external/uniswap/interfaces/IUniswapV3Pool__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3Pool, IUniswapV3PoolInterface, @@ -207,12 +206,12 @@ const _abi = [ export class IUniswapV3Pool__factory { static readonly abi = _abi; static createInterface(): IUniswapV3PoolInterface { - return new utils.Interface(_abi) as IUniswapV3PoolInterface; + return new Interface(_abi) as IUniswapV3PoolInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3Pool { - return new Contract(address, _abi, signerOrProvider) as IUniswapV3Pool; + return new Contract(address, _abi, runner) as unknown as IUniswapV3Pool; } } diff --git a/packages/protocol/src/types/factories/contracts/oracles/ChainlinkOperator__factory.ts b/packages/protocol/src/types/factories/contracts/oracles/ChainlinkOperator__factory.ts index 63aa7456..abd38f55 100644 --- a/packages/protocol/src/types/factories/contracts/oracles/ChainlinkOperator__factory.ts +++ b/packages/protocol/src/types/factories/contracts/oracles/ChainlinkOperator__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { ChainlinkOperator, ChainlinkOperatorInterface, @@ -366,32 +371,31 @@ export class ChainlinkOperator__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): ChainlinkOperator { - return super.attach(address) as ChainlinkOperator; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + ChainlinkOperator & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): ChainlinkOperator__factory { - return super.connect(signer) as ChainlinkOperator__factory; + override connect(runner: ContractRunner | null): ChainlinkOperator__factory { + return super.connect(runner) as ChainlinkOperator__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): ChainlinkOperatorInterface { - return new utils.Interface(_abi) as ChainlinkOperatorInterface; + return new Interface(_abi) as ChainlinkOperatorInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): ChainlinkOperator { - return new Contract(address, _abi, signerOrProvider) as ChainlinkOperator; + return new Contract(address, _abi, runner) as unknown as ChainlinkOperator; } } diff --git a/packages/protocol/src/types/factories/contracts/oracles/IChainlinkOperator__factory.ts b/packages/protocol/src/types/factories/contracts/oracles/IChainlinkOperator__factory.ts index c31a2891..ddb914dc 100644 --- a/packages/protocol/src/types/factories/contracts/oracles/IChainlinkOperator__factory.ts +++ b/packages/protocol/src/types/factories/contracts/oracles/IChainlinkOperator__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IChainlinkOperator, IChainlinkOperatorInterface, @@ -271,12 +270,12 @@ const _abi = [ export class IChainlinkOperator__factory { static readonly abi = _abi; static createInterface(): IChainlinkOperatorInterface { - return new utils.Interface(_abi) as IChainlinkOperatorInterface; + return new Interface(_abi) as IChainlinkOperatorInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IChainlinkOperator { - return new Contract(address, _abi, signerOrProvider) as IChainlinkOperator; + return new Contract(address, _abi, runner) as unknown as IChainlinkOperator; } } diff --git a/packages/protocol/src/types/factories/contracts/oracles/IUniswapV3PriceFeed__factory.ts b/packages/protocol/src/types/factories/contracts/oracles/IUniswapV3PriceFeed__factory.ts index 7977aaef..3a8adabf 100644 --- a/packages/protocol/src/types/factories/contracts/oracles/IUniswapV3PriceFeed__factory.ts +++ b/packages/protocol/src/types/factories/contracts/oracles/IUniswapV3PriceFeed__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IUniswapV3PriceFeed, IUniswapV3PriceFeedInterface, @@ -225,12 +224,16 @@ const _abi = [ export class IUniswapV3PriceFeed__factory { static readonly abi = _abi; static createInterface(): IUniswapV3PriceFeedInterface { - return new utils.Interface(_abi) as IUniswapV3PriceFeedInterface; + return new Interface(_abi) as IUniswapV3PriceFeedInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IUniswapV3PriceFeed { - return new Contract(address, _abi, signerOrProvider) as IUniswapV3PriceFeed; + return new Contract( + address, + _abi, + runner + ) as unknown as IUniswapV3PriceFeed; } } diff --git a/packages/protocol/src/types/factories/contracts/oracles/SimplePriceFeed__factory.ts b/packages/protocol/src/types/factories/contracts/oracles/SimplePriceFeed__factory.ts index 34b5a92d..f1c4c9d8 100644 --- a/packages/protocol/src/types/factories/contracts/oracles/SimplePriceFeed__factory.ts +++ b/packages/protocol/src/types/factories/contracts/oracles/SimplePriceFeed__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { SimplePriceFeed, SimplePriceFeedInterface, @@ -167,37 +172,35 @@ export class SimplePriceFeed__factory extends ContractFactory { } } - override deploy( - description_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - description_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - description_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + description_: string, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(description_, overrides || {}); } - override attach(address: string): SimplePriceFeed { - return super.attach(address) as SimplePriceFeed; + override deploy( + description_: string, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(description_, overrides || {}) as Promise< + SimplePriceFeed & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): SimplePriceFeed__factory { - return super.connect(signer) as SimplePriceFeed__factory; + override connect(runner: ContractRunner | null): SimplePriceFeed__factory { + return super.connect(runner) as SimplePriceFeed__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): SimplePriceFeedInterface { - return new utils.Interface(_abi) as SimplePriceFeedInterface; + return new Interface(_abi) as SimplePriceFeedInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): SimplePriceFeed { - return new Contract(address, _abi, signerOrProvider) as SimplePriceFeed; + return new Contract(address, _abi, runner) as unknown as SimplePriceFeed; } } diff --git a/packages/protocol/src/types/factories/contracts/oracles/StablecoinPriceFeed__factory.ts b/packages/protocol/src/types/factories/contracts/oracles/StablecoinPriceFeed__factory.ts index d51c35d7..40d5d17e 100644 --- a/packages/protocol/src/types/factories/contracts/oracles/StablecoinPriceFeed__factory.ts +++ b/packages/protocol/src/types/factories/contracts/oracles/StablecoinPriceFeed__factory.ts @@ -2,15 +2,18 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import type { NonPayableOverrides } from "../../../common"; import type { StablecoinPriceFeed, StablecoinPriceFeedInterface, @@ -166,40 +169,43 @@ export class StablecoinPriceFeed__factory extends ContractFactory { } } - override deploy( - price_: PromiseOrValue, - description_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - price_, - description_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - price_: PromiseOrValue, - description_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + price_: BigNumberish, + description_: string, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(price_, description_, overrides || {}); } - override attach(address: string): StablecoinPriceFeed { - return super.attach(address) as StablecoinPriceFeed; + override deploy( + price_: BigNumberish, + description_: string, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(price_, description_, overrides || {}) as Promise< + StablecoinPriceFeed & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): StablecoinPriceFeed__factory { - return super.connect(signer) as StablecoinPriceFeed__factory; + override connect( + runner: ContractRunner | null + ): StablecoinPriceFeed__factory { + return super.connect(runner) as StablecoinPriceFeed__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): StablecoinPriceFeedInterface { - return new utils.Interface(_abi) as StablecoinPriceFeedInterface; + return new Interface(_abi) as StablecoinPriceFeedInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): StablecoinPriceFeed { - return new Contract(address, _abi, signerOrProvider) as StablecoinPriceFeed; + return new Contract( + address, + _abi, + runner + ) as unknown as StablecoinPriceFeed; } } diff --git a/packages/protocol/src/types/factories/contracts/oracles/UniswapV3PriceFeed__factory.ts b/packages/protocol/src/types/factories/contracts/oracles/UniswapV3PriceFeed__factory.ts index f5fd2d9b..d55677be 100644 --- a/packages/protocol/src/types/factories/contracts/oracles/UniswapV3PriceFeed__factory.ts +++ b/packages/protocol/src/types/factories/contracts/oracles/UniswapV3PriceFeed__factory.ts @@ -2,15 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + AddressLike, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import type { NonPayableOverrides } from "../../../common"; import type { UniswapV3PriceFeed, UniswapV3PriceFeedInterface, @@ -348,52 +352,53 @@ export class UniswapV3PriceFeed__factory extends ContractFactory { } } - override deploy( - pool_: PromiseOrValue, - quoteAsset_: PromiseOrValue, - twapInterval_: PromiseOrValue, - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( + override getDeployTransaction( + pool_: AddressLike, + quoteAsset_: AddressLike, + twapInterval_: BigNumberish, + maxPrice_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( pool_, quoteAsset_, twapInterval_, maxPrice_, overrides || {} - ) as Promise; + ); } - override getDeployTransaction( - pool_: PromiseOrValue, - quoteAsset_: PromiseOrValue, - twapInterval_: PromiseOrValue, - maxPrice_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction( + override deploy( + pool_: AddressLike, + quoteAsset_: AddressLike, + twapInterval_: BigNumberish, + maxPrice_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( pool_, quoteAsset_, twapInterval_, maxPrice_, overrides || {} - ); - } - override attach(address: string): UniswapV3PriceFeed { - return super.attach(address) as UniswapV3PriceFeed; + ) as Promise< + UniswapV3PriceFeed & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): UniswapV3PriceFeed__factory { - return super.connect(signer) as UniswapV3PriceFeed__factory; + override connect(runner: ContractRunner | null): UniswapV3PriceFeed__factory { + return super.connect(runner) as UniswapV3PriceFeed__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): UniswapV3PriceFeedInterface { - return new utils.Interface(_abi) as UniswapV3PriceFeedInterface; + return new Interface(_abi) as UniswapV3PriceFeedInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): UniswapV3PriceFeed { - return new Contract(address, _abi, signerOrProvider) as UniswapV3PriceFeed; + return new Contract(address, _abi, runner) as unknown as UniswapV3PriceFeed; } } diff --git a/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/BalanceSheetUpgraded__factory.ts b/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/BalanceSheetUpgraded__factory.ts index fc43176c..7f9b3878 100644 --- a/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/BalanceSheetUpgraded__factory.ts +++ b/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/BalanceSheetUpgraded__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../../common"; import type { BalanceSheetUpgraded, BalanceSheetUpgradedInterface, @@ -164,36 +169,37 @@ export class BalanceSheetUpgraded__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): BalanceSheetUpgraded { - return super.attach(address) as BalanceSheetUpgraded; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + BalanceSheetUpgraded & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): BalanceSheetUpgraded__factory { - return super.connect(signer) as BalanceSheetUpgraded__factory; + override connect( + runner: ContractRunner | null + ): BalanceSheetUpgraded__factory { + return super.connect(runner) as BalanceSheetUpgraded__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): BalanceSheetUpgradedInterface { - return new utils.Interface(_abi) as BalanceSheetUpgradedInterface; + return new Interface(_abi) as BalanceSheetUpgradedInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): BalanceSheetUpgraded { return new Contract( address, _abi, - signerOrProvider - ) as BalanceSheetUpgraded; + runner + ) as unknown as BalanceSheetUpgraded; } } diff --git a/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/IBalanceSheetUpgraded__factory.ts b/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/IBalanceSheetUpgraded__factory.ts index ad6be7d8..a8be8aaf 100644 --- a/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/IBalanceSheetUpgraded__factory.ts +++ b/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/IBalanceSheetUpgraded__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IBalanceSheetUpgraded, IBalanceSheetUpgradedInterface, @@ -35,16 +34,16 @@ const _abi = [ export class IBalanceSheetUpgraded__factory { static readonly abi = _abi; static createInterface(): IBalanceSheetUpgradedInterface { - return new utils.Interface(_abi) as IBalanceSheetUpgradedInterface; + return new Interface(_abi) as IBalanceSheetUpgradedInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IBalanceSheetUpgraded { return new Contract( address, _abi, - signerOrProvider - ) as IBalanceSheetUpgraded; + runner + ) as unknown as IBalanceSheetUpgraded; } } diff --git a/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/SBalanceSheetUpgraded__factory.ts b/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/SBalanceSheetUpgraded__factory.ts index 44819520..2cd7d9eb 100644 --- a/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/SBalanceSheetUpgraded__factory.ts +++ b/packages/protocol/src/types/factories/contracts/test/BalanceSheetUpgraded.sol/SBalanceSheetUpgraded__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { SBalanceSheetUpgraded, SBalanceSheetUpgradedInterface, @@ -54,16 +53,16 @@ const _abi = [ export class SBalanceSheetUpgraded__factory { static readonly abi = _abi; static createInterface(): SBalanceSheetUpgradedInterface { - return new utils.Interface(_abi) as SBalanceSheetUpgradedInterface; + return new Interface(_abi) as SBalanceSheetUpgradedInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): SBalanceSheetUpgraded { return new Contract( address, _abi, - signerOrProvider - ) as SBalanceSheetUpgraded; + runner + ) as unknown as SBalanceSheetUpgraded; } } diff --git a/packages/protocol/src/types/factories/contracts/test/GodModeBalanceSheet__factory.ts b/packages/protocol/src/types/factories/contracts/test/GodModeBalanceSheet__factory.ts index 0dbaa54d..ee2ab126 100644 --- a/packages/protocol/src/types/factories/contracts/test/GodModeBalanceSheet__factory.ts +++ b/packages/protocol/src/types/factories/contracts/test/GodModeBalanceSheet__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeBalanceSheet, GodModeBalanceSheetInterface, @@ -1121,32 +1126,37 @@ export class GodModeBalanceSheet__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): GodModeBalanceSheet { - return super.attach(address) as GodModeBalanceSheet; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + GodModeBalanceSheet & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeBalanceSheet__factory { - return super.connect(signer) as GodModeBalanceSheet__factory; + override connect( + runner: ContractRunner | null + ): GodModeBalanceSheet__factory { + return super.connect(runner) as GodModeBalanceSheet__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeBalanceSheetInterface { - return new utils.Interface(_abi) as GodModeBalanceSheetInterface; + return new Interface(_abi) as GodModeBalanceSheetInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeBalanceSheet { - return new Contract(address, _abi, signerOrProvider) as GodModeBalanceSheet; + return new Contract( + address, + _abi, + runner + ) as unknown as GodModeBalanceSheet; } } diff --git a/packages/protocol/src/types/factories/contracts/test/GodModeErc20__factory.ts b/packages/protocol/src/types/factories/contracts/test/GodModeErc20__factory.ts index 0edf1047..323adc47 100644 --- a/packages/protocol/src/types/factories/contracts/test/GodModeErc20__factory.ts +++ b/packages/protocol/src/types/factories/contracts/test/GodModeErc20__factory.ts @@ -2,15 +2,18 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeErc20, GodModeErc20Interface, @@ -466,25 +469,12 @@ export class GodModeErc20__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - name_, - symbol_, - decimals_, - overrides || {} - ) as Promise; - } override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - decimals_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction( name_, symbol_, @@ -492,22 +482,31 @@ export class GodModeErc20__factory extends ContractFactory { overrides || {} ); } - override attach(address: string): GodModeErc20 { - return super.attach(address) as GodModeErc20; + override deploy( + name_: string, + symbol_: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(name_, symbol_, decimals_, overrides || {}) as Promise< + GodModeErc20 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeErc20__factory { - return super.connect(signer) as GodModeErc20__factory; + override connect(runner: ContractRunner | null): GodModeErc20__factory { + return super.connect(runner) as GodModeErc20__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeErc20Interface { - return new utils.Interface(_abi) as GodModeErc20Interface; + return new Interface(_abi) as GodModeErc20Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeErc20 { - return new Contract(address, _abi, signerOrProvider) as GodModeErc20; + return new Contract(address, _abi, runner) as unknown as GodModeErc20; } } diff --git a/packages/protocol/src/types/factories/contracts/test/GodModeFintroller__factory.ts b/packages/protocol/src/types/factories/contracts/test/GodModeFintroller__factory.ts index 703028a5..a8704b7d 100644 --- a/packages/protocol/src/types/factories/contracts/test/GodModeFintroller__factory.ts +++ b/packages/protocol/src/types/factories/contracts/test/GodModeFintroller__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeFintroller, GodModeFintrollerInterface, @@ -1182,32 +1187,31 @@ export class GodModeFintroller__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): GodModeFintroller { - return super.attach(address) as GodModeFintroller; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + GodModeFintroller & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeFintroller__factory { - return super.connect(signer) as GodModeFintroller__factory; + override connect(runner: ContractRunner | null): GodModeFintroller__factory { + return super.connect(runner) as GodModeFintroller__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeFintrollerInterface { - return new utils.Interface(_abi) as GodModeFintrollerInterface; + return new Interface(_abi) as GodModeFintrollerInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeFintroller { - return new Contract(address, _abi, signerOrProvider) as GodModeFintroller; + return new Contract(address, _abi, runner) as unknown as GodModeFintroller; } } diff --git a/packages/protocol/src/types/factories/contracts/test/GodModeHToken__factory.ts b/packages/protocol/src/types/factories/contracts/test/GodModeHToken__factory.ts index 8424c0d9..ab44eda1 100644 --- a/packages/protocol/src/types/factories/contracts/test/GodModeHToken__factory.ts +++ b/packages/protocol/src/types/factories/contracts/test/GodModeHToken__factory.ts @@ -2,15 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + AddressLike, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeHToken, GodModeHTokenInterface, @@ -1300,16 +1304,16 @@ export class GodModeHToken__factory extends ContractFactory { } } - override deploy( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - balanceSheet_: PromiseOrValue, - fintroller_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( + override getDeployTransaction( + name_: string, + symbol_: string, + maturity_: BigNumberish, + balanceSheet_: AddressLike, + fintroller_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( name_, symbol_, maturity_, @@ -1317,18 +1321,18 @@ export class GodModeHToken__factory extends ContractFactory { fintroller_, underlying_, overrides || {} - ) as Promise; + ); } - override getDeployTransaction( - name_: PromiseOrValue, - symbol_: PromiseOrValue, - maturity_: PromiseOrValue, - balanceSheet_: PromiseOrValue, - fintroller_: PromiseOrValue, - underlying_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction( + override deploy( + name_: string, + symbol_: string, + maturity_: BigNumberish, + balanceSheet_: AddressLike, + fintroller_: AddressLike, + underlying_: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( name_, symbol_, maturity_, @@ -1336,24 +1340,25 @@ export class GodModeHToken__factory extends ContractFactory { fintroller_, underlying_, overrides || {} - ); - } - override attach(address: string): GodModeHToken { - return super.attach(address) as GodModeHToken; + ) as Promise< + GodModeHToken & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeHToken__factory { - return super.connect(signer) as GodModeHToken__factory; + override connect(runner: ContractRunner | null): GodModeHToken__factory { + return super.connect(runner) as GodModeHToken__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeHTokenInterface { - return new utils.Interface(_abi) as GodModeHTokenInterface; + return new Interface(_abi) as GodModeHTokenInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeHToken { - return new Contract(address, _abi, signerOrProvider) as GodModeHToken; + return new Contract(address, _abi, runner) as unknown as GodModeHToken; } } diff --git a/packages/protocol/src/types/factories/contracts/test/GodModeOwnableUpgradeable__factory.ts b/packages/protocol/src/types/factories/contracts/test/GodModeOwnableUpgradeable__factory.ts index c2b8e676..21b60ccb 100644 --- a/packages/protocol/src/types/factories/contracts/test/GodModeOwnableUpgradeable__factory.ts +++ b/packages/protocol/src/types/factories/contracts/test/GodModeOwnableUpgradeable__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeOwnableUpgradeable, GodModeOwnableUpgradeableInterface, @@ -112,36 +117,37 @@ export class GodModeOwnableUpgradeable__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): GodModeOwnableUpgradeable { - return super.attach(address) as GodModeOwnableUpgradeable; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + GodModeOwnableUpgradeable & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeOwnableUpgradeable__factory { - return super.connect(signer) as GodModeOwnableUpgradeable__factory; + override connect( + runner: ContractRunner | null + ): GodModeOwnableUpgradeable__factory { + return super.connect(runner) as GodModeOwnableUpgradeable__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeOwnableUpgradeableInterface { - return new utils.Interface(_abi) as GodModeOwnableUpgradeableInterface; + return new Interface(_abi) as GodModeOwnableUpgradeableInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeOwnableUpgradeable { return new Contract( address, _abi, - signerOrProvider - ) as GodModeOwnableUpgradeable; + runner + ) as unknown as GodModeOwnableUpgradeable; } } diff --git a/packages/protocol/src/types/factories/contracts/test/GodModeUniswapV3PriceFeed__factory.ts b/packages/protocol/src/types/factories/contracts/test/GodModeUniswapV3PriceFeed__factory.ts index 7668fe3f..6f602736 100644 --- a/packages/protocol/src/types/factories/contracts/test/GodModeUniswapV3PriceFeed__factory.ts +++ b/packages/protocol/src/types/factories/contracts/test/GodModeUniswapV3PriceFeed__factory.ts @@ -2,15 +2,19 @@ /* tslint:disable */ /* eslint-disable */ import { - Signer, - utils, Contract, ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, BigNumberish, - Overrides, + AddressLike, + ContractDeployTransaction, + ContractRunner, } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../common"; +import type { NonPayableOverrides } from "../../../common"; import type { GodModeUniswapV3PriceFeed, GodModeUniswapV3PriceFeedInterface, @@ -330,52 +334,55 @@ export class GodModeUniswapV3PriceFeed__factory extends ContractFactory { } } - override deploy( - pool_: PromiseOrValue, - quoteAsset_: PromiseOrValue, - twapInterval_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( + override getDeployTransaction( + pool_: AddressLike, + quoteAsset_: AddressLike, + twapInterval_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( pool_, quoteAsset_, twapInterval_, overrides || {} - ) as Promise; + ); } - override getDeployTransaction( - pool_: PromiseOrValue, - quoteAsset_: PromiseOrValue, - twapInterval_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction( + override deploy( + pool_: AddressLike, + quoteAsset_: AddressLike, + twapInterval_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( pool_, quoteAsset_, twapInterval_, overrides || {} - ); - } - override attach(address: string): GodModeUniswapV3PriceFeed { - return super.attach(address) as GodModeUniswapV3PriceFeed; + ) as Promise< + GodModeUniswapV3PriceFeed & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): GodModeUniswapV3PriceFeed__factory { - return super.connect(signer) as GodModeUniswapV3PriceFeed__factory; + override connect( + runner: ContractRunner | null + ): GodModeUniswapV3PriceFeed__factory { + return super.connect(runner) as GodModeUniswapV3PriceFeed__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): GodModeUniswapV3PriceFeedInterface { - return new utils.Interface(_abi) as GodModeUniswapV3PriceFeedInterface; + return new Interface(_abi) as GodModeUniswapV3PriceFeedInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): GodModeUniswapV3PriceFeed { return new Contract( address, _abi, - signerOrProvider - ) as GodModeUniswapV3PriceFeed; + runner + ) as unknown as GodModeUniswapV3PriceFeed; } } diff --git a/packages/protocol/src/types/hardhat.d.ts b/packages/protocol/src/types/hardhat.d.ts index 29018068..78d2d282 100644 --- a/packages/protocol/src/types/hardhat.d.ts +++ b/packages/protocol/src/types/hardhat.d.ts @@ -4,9 +4,10 @@ import { ethers } from "ethers"; import { + DeployContractOptions, FactoryOptions, HardhatEthersHelpers as HardhatEthersHelpersBase, -} from "@nomiclabs/hardhat-ethers/types"; +} from "@nomicfoundation/hardhat-ethers/types"; import * as Contracts from "."; @@ -155,180 +156,497 @@ declare module "hardhat/types/runtime" { getContractAt( name: "IOwnable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Ownable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Erc20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Erc20Permit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Erc20Recover", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20Permit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20Recover", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IOwnableUpgradeable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "OwnableUpgradeable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "BalanceSheetV2", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IBalanceSheetV2", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "SBalanceSheetV1", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "SBalanceSheetV2", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "Fintroller", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IFintroller", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "HToken", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IHToken", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IAggregatorV3", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3Pool", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "ChainlinkOperator", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IChainlinkOperator", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IUniswapV3PriceFeed", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "SimplePriceFeed", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "StablecoinPriceFeed", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "UniswapV3PriceFeed", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "BalanceSheetUpgraded", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IBalanceSheetUpgraded", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "SBalanceSheetUpgraded", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeBalanceSheet", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeErc20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeFintroller", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeHToken", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeOwnableUpgradeable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "GodModeUniswapV3PriceFeed", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; + deployContract( + name: "IOwnable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Ownable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Recover", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Recover", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IOwnableUpgradeable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "OwnableUpgradeable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "BalanceSheetV2", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IBalanceSheetV2", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SBalanceSheetV1", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SBalanceSheetV2", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Fintroller", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFintroller", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HToken", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHToken", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IAggregatorV3", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3Pool", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ChainlinkOperator", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IChainlinkOperator", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PriceFeed", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SimplePriceFeed", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "StablecoinPriceFeed", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "UniswapV3PriceFeed", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "BalanceSheetUpgraded", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IBalanceSheetUpgraded", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SBalanceSheetUpgraded", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeBalanceSheet", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeErc20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeFintroller", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeHToken", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeOwnableUpgradeable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeUniswapV3PriceFeed", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + + deployContract( + name: "IOwnable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Ownable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Erc20Recover", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Recover", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IOwnableUpgradeable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "OwnableUpgradeable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "BalanceSheetV2", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IBalanceSheetV2", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SBalanceSheetV1", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SBalanceSheetV2", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Fintroller", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFintroller", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HToken", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHToken", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IAggregatorV3", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3Pool", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ChainlinkOperator", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IChainlinkOperator", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IUniswapV3PriceFeed", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SimplePriceFeed", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "StablecoinPriceFeed", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "UniswapV3PriceFeed", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "BalanceSheetUpgraded", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IBalanceSheetUpgraded", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SBalanceSheetUpgraded", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeBalanceSheet", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeErc20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeFintroller", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeHToken", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeOwnableUpgradeable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "GodModeUniswapV3PriceFeed", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + // default types getContractFactory( name: string, @@ -336,13 +654,22 @@ declare module "hardhat/types/runtime" { ): Promise; getContractFactory( abi: any[], - bytecode: ethers.utils.BytesLike, + bytecode: ethers.BytesLike, signer?: ethers.Signer ): Promise; getContractAt( nameOrAbi: string | any[], - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; + deployContract( + name: string, + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: string, + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; } } diff --git a/packages/proxy-target/hardhat.config.ts b/packages/proxy-target/hardhat.config.ts index 1dc05bfc..33451821 100644 --- a/packages/proxy-target/hardhat.config.ts +++ b/packages/proxy-target/hardhat.config.ts @@ -77,7 +77,6 @@ const config: HardhatUserConfig = { }, typechain: { outDir: "src/types", - target: "ethers-v5", }, }; diff --git a/packages/proxy-target/package.json b/packages/proxy-target/package.json index df0cd25d..fa5b9133 100644 --- a/packages/proxy-target/package.json +++ b/packages/proxy-target/package.json @@ -18,13 +18,13 @@ "@hifi/protocol": "1.11.0", "@openzeppelin/contracts-upgradeable": "4.5.2", "@prb/contracts": "3.8.1", - "ethers": "^5.7.2" + "ethers": "^6.8.1" }, "devDependencies": { "@hifi/helpers": "workspace:*", "@nomiclabs/hardhat-ethers": "^2.2.3", "@nomiclabs/hardhat-etherscan": "^3.1.7", - "@typechain/ethers-v5": "^10.2.1", + "@typechain/ethers-v6": "^0.5.1", "@typechain/hardhat": "^9.1.0", "@types/node": "^20.9.0", "@typescript-eslint/eslint-plugin": "^5.62.0", @@ -33,7 +33,7 @@ "dotenv": "^16.3.1", "eslint": "^8.53.0", "eslint-config-prettier": "^8.10.0", - "ethers": "^5.7.2", + "ethers": "^6.8.1", "hardhat": "^2.19.0", "hardhat-packager": "^1.4.2", "lodash": "^4.17.21", diff --git a/packages/proxy-target/src/types/@hifi/amm/contracts/IHifiPool.ts b/packages/proxy-target/src/types/@hifi/amm/contracts/IHifiPool.ts index 0ca687bb..5b26953f 100644 --- a/packages/proxy-target/src/types/@hifi/amm/contracts/IHifiPool.ts +++ b/packages/proxy-target/src/types/@hifi/amm/contracts/IHifiPool.ts @@ -3,70 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IHifiPoolInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(uint256)": FunctionFragment; - "buyHToken(address,uint256)": FunctionFragment; - "buyUnderlying(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "getBurnOutputs(uint256)": FunctionFragment; - "getMintInputs(uint256)": FunctionFragment; - "getNormalizedUnderlyingReserves()": FunctionFragment; - "getQuoteForBuyingHToken(uint256)": FunctionFragment; - "getQuoteForBuyingUnderlying(uint256)": FunctionFragment; - "getQuoteForSellingHToken(uint256)": FunctionFragment; - "getQuoteForSellingUnderlying(uint256)": FunctionFragment; - "getVirtualHTokenReserves()": FunctionFragment; - "hToken()": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "maturity()": FunctionFragment; - "mint(uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "sellHToken(address,uint256)": FunctionFragment; - "sellUnderlying(address,uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IHifiPoolInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -103,6 +62,15 @@ export interface IHifiPoolInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "AddLiquidity" + | "Approval" + | "RemoveLiquidity" + | "Trade" + | "Transfer" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -113,40 +81,37 @@ export interface IHifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "burn", - values: [PromiseOrValue] + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; encodeFunctionData( functionFragment: "buyHToken", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "buyUnderlying", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getBurnOutputs", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getMintInputs", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getNormalizedUnderlyingReserves", @@ -154,19 +119,19 @@ export interface IHifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getQuoteForBuyingHToken", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForBuyingUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForSellingHToken", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getQuoteForSellingUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "getVirtualHTokenReserves", @@ -175,37 +140,31 @@ export interface IHifiPoolInterface extends utils.Interface { encodeFunctionData(functionFragment: "hToken", values?: undefined): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; - encodeFunctionData( - functionFragment: "mint", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "mint", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "sellHToken", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "sellUnderlying", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -214,15 +173,11 @@ export interface IHifiPoolInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -319,979 +274,588 @@ export interface IHifiPoolInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "AddLiquidity(uint256,address,uint256,uint256,uint256)": EventFragment; - "Approval(address,address,uint256)": EventFragment; - "RemoveLiquidity(uint256,address,uint256,uint256,uint256)": EventFragment; - "Trade(uint256,address,address,int256,int256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AddLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RemoveLiquidity"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Trade"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface AddLiquidityEventObject { - maturity: BigNumber; - provider: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; - poolTokenAmount: BigNumber; +export namespace AddLiquidityEvent { + export type InputTuple = [ + maturity: BigNumberish, + provider: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish, + poolTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + provider: string, + underlyingAmount: bigint, + hTokenAmount: bigint, + poolTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + provider: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + poolTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type AddLiquidityEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber, BigNumber], - AddLiquidityEventObject ->; - -export type AddLiquidityEventFilter = TypedEventFilter; -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface RemoveLiquidityEventObject { - maturity: BigNumber; - provider: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; - poolTokenAmount: BigNumber; +export namespace RemoveLiquidityEvent { + export type InputTuple = [ + maturity: BigNumberish, + provider: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish, + poolTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + provider: string, + underlyingAmount: bigint, + hTokenAmount: bigint, + poolTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + provider: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + poolTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RemoveLiquidityEvent = TypedEvent< - [BigNumber, string, BigNumber, BigNumber, BigNumber], - RemoveLiquidityEventObject ->; - -export type RemoveLiquidityEventFilter = TypedEventFilter; -export interface TradeEventObject { - maturity: BigNumber; - from: string; - to: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace TradeEvent { + export type InputTuple = [ + maturity: BigNumberish, + from: AddressLike, + to: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + maturity: bigint, + from: string, + to: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + maturity: bigint; + from: string; + to: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TradeEvent = TypedEvent< - [BigNumber, string, string, BigNumber, BigNumber], - TradeEventObject ->; -export type TradeEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IHifiPool extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IHifiPool; + waitForDeployment(): Promise; interface: IHifiPoolInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } - >; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } - >; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise<[BigNumber] & { normalizedUnderlyingReserves: BigNumber }>; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { underlyingIn: BigNumber }>; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { hTokenIn: BigNumber }>; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { underlyingOut: BigNumber }>; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { hTokenOut: BigNumber }>; - - getVirtualHTokenReserves( - overrides?: CallOverrides - ): Promise<[BigNumber] & { virtualHTokenReserves: BigNumber }>; - - hToken(overrides?: CallOverrides): Promise<[string]>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; - decimals(overrides?: CallOverrides): Promise; + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + burn: TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "nonpayable" >; - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } + buyHToken: TypedContractMethod< + [to: AddressLike, hTokenOut: BigNumberish], + [bigint], + "nonpayable" >; - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; + buyUnderlying: TypedContractMethod< + [to: AddressLike, underlyingOut: BigNumberish], + [bigint], + "nonpayable" + >; - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + decimals: TypedContractMethod<[], [bigint], "view">; - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getBurnOutputs: TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "view" + >; - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getMintInputs: TypedContractMethod< + [underlyingOffered: BigNumberish], + [[bigint, bigint] & { hTokenRequired: bigint; poolTokensMinted: bigint }], + "view" + >; - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; + getNormalizedUnderlyingReserves: TypedContractMethod<[], [bigint], "view">; - hToken(overrides?: CallOverrides): Promise; + getQuoteForBuyingHToken: TypedContractMethod< + [hTokenOut: BigNumberish], + [bigint], + "view" + >; - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getQuoteForBuyingUnderlying: TypedContractMethod< + [underlyingOut: BigNumberish], + [bigint], + "view" + >; - maturity(overrides?: CallOverrides): Promise; + getQuoteForSellingHToken: TypedContractMethod< + [hTokenIn: BigNumberish], + [bigint], + "view" + >; - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getQuoteForSellingUnderlying: TypedContractMethod< + [underlyingIn: BigNumberish], + [bigint], + "view" + >; - name(overrides?: CallOverrides): Promise; + getVirtualHTokenReserves: TypedContractMethod<[], [bigint], "view">; - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + hToken: TypedContractMethod<[], [string], "view">; - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + maturity: TypedContractMethod<[], [bigint], "view">; - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + mint: TypedContractMethod< + [underlyingOffered: BigNumberish], + [bigint], + "nonpayable" + >; - symbol(overrides?: CallOverrides): Promise; + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; - totalSupply(overrides?: CallOverrides): Promise; + sellHToken: TypedContractMethod< + [to: AddressLike, hTokenIn: BigNumberish], + [bigint], + "nonpayable" + >; - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + sellUnderlying: TypedContractMethod< + [to: AddressLike, underlyingIn: BigNumberish], + [bigint], + "nonpayable" + >; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + symbol: TypedContractMethod<[], [string], "view">; - underlying(overrides?: CallOverrides): Promise; + totalSupply: TypedContractMethod<[], [bigint], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + version: TypedContractMethod<[], [string], "view">; - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyHToken" + ): TypedContractMethod< + [to: AddressLike, hTokenOut: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyUnderlying" + ): TypedContractMethod< + [to: AddressLike, underlyingOut: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "getBurnOutputs" + ): TypedContractMethod< + [poolTokensBurned: BigNumberish], + [[bigint, bigint] & { underlyingReturned: bigint; hTokenReturned: bigint }], + "view" + >; + getFunction( + nameOrSignature: "getMintInputs" + ): TypedContractMethod< + [underlyingOffered: BigNumberish], + [[bigint, bigint] & { hTokenRequired: bigint; poolTokensMinted: bigint }], + "view" + >; + getFunction( + nameOrSignature: "getNormalizedUnderlyingReserves" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForBuyingHToken" + ): TypedContractMethod<[hTokenOut: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForBuyingUnderlying" + ): TypedContractMethod<[underlyingOut: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForSellingHToken" + ): TypedContractMethod<[hTokenIn: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getQuoteForSellingUnderlying" + ): TypedContractMethod<[underlyingIn: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getVirtualHTokenReserves" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "hToken" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [underlyingOffered: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellHToken" + ): TypedContractMethod< + [to: AddressLike, hTokenIn: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlying" + ): TypedContractMethod< + [to: AddressLike, underlyingIn: BigNumberish], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "AddLiquidity" + ): TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject + >; + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "RemoveLiquidity" + ): TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; + getEvent( + key: "Trade" + ): TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; - burn( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + filters: { + "AddLiquidity(uint256,address,uint256,uint256,uint256)": TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject >; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - underlyingReturned: BigNumber; - hTokenReturned: BigNumber; - } + AddLiquidity: TypedContractEvent< + AddLiquidityEvent.InputTuple, + AddLiquidityEvent.OutputTuple, + AddLiquidityEvent.OutputObject >; - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - hTokenRequired: BigNumber; - poolTokensMinted: BigNumber; - } + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject >; - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - filters: { - "AddLiquidity(uint256,address,uint256,uint256,uint256)"( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): AddLiquidityEventFilter; - AddLiquidity( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): AddLiquidityEventFilter; - - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "RemoveLiquidity(uint256,address,uint256,uint256,uint256)"( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): RemoveLiquidityEventFilter; - RemoveLiquidity( - maturity?: null, - provider?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null, - poolTokenAmount?: null - ): RemoveLiquidityEventFilter; - - "Trade(uint256,address,address,int256,int256)"( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): TradeEventFilter; - Trade( - maturity?: null, - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): TradeEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves(overrides?: CallOverrides): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - burn( - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHToken( - to: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyUnderlying( - to: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBurnOutputs( - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getMintInputs( - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedUnderlyingReserves( - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingHToken( - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForBuyingUnderlying( - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingHToken( - hTokenIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getQuoteForSellingUnderlying( - underlyingIn: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getVirtualHTokenReserves( - overrides?: CallOverrides - ): Promise; - - hToken(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - to: PromiseOrValue, - hTokenIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - to: PromiseOrValue, - underlyingIn: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; + "RemoveLiquidity(uint256,address,uint256,uint256,uint256)": TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; + RemoveLiquidity: TypedContractEvent< + RemoveLiquidityEvent.InputTuple, + RemoveLiquidityEvent.OutputTuple, + RemoveLiquidityEvent.OutputObject + >; - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; + "Trade(uint256,address,address,int256,int256)": TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; + Trade: TypedContractEvent< + TradeEvent.InputTuple, + TradeEvent.OutputTuple, + TradeEvent.OutputObject + >; - version(overrides?: CallOverrides): Promise; + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts b/packages/proxy-target/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts index 464a6e30..9b46ca02 100644 --- a/packages/proxy-target/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts +++ b/packages/proxy-target/src/types/@hifi/protocol/contracts/access/IOwnableUpgradeable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IOwnableUpgradeableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IOwnableUpgradeableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface IOwnableUpgradeableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IOwnableUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IOwnableUpgradeable; + waitForDeployment(): Promise; interface: IOwnableUpgradeableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts b/packages/proxy-target/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts index a8f46fdb..fe8c21e5 100644 --- a/packages/proxy-target/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts +++ b/packages/proxy-target/src/types/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2.ts @@ -3,55 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IBalanceSheetV2Interface extends 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; - "getRepayAmount(address,uint256,address)": FunctionFragment; - "getSeizableCollateralAmount(address,uint256,address)": FunctionFragment; - "liquidateBorrow(address,address,uint256,address)": FunctionFragment; - "owner()": FunctionFragment; - "repayBorrow(address,uint256)": FunctionFragment; - "repayBorrowBehalf(address,address,uint256)": FunctionFragment; - "setFintroller(address)": FunctionFragment; - "setOracle(address)": FunctionFragment; - "withdrawCollateral(address,uint256)": FunctionFragment; - }; - +export interface IBalanceSheetV2Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "borrow" @@ -73,101 +47,90 @@ export interface IBalanceSheetV2Interface extends utils.Interface { | "withdrawCollateral" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Borrow" + | "DepositCollateral" + | "LiquidateBorrow" + | "RepayBorrow" + | "SetFintroller" + | "SetOracle" + | "TransferOwnership" + | "WithdrawCollateral" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "borrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getBondList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralList", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCurrentAccountLiquidity", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtAmount", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "getHypotheticalAccountLiquidity", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "getRepayAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "getSeizableCollateralAmount", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData( functionFragment: "liquidateBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "repayBorrow", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "repayBorrowBehalf", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setFintroller", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "setOracle", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "withdrawCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; decodeFunctionResult( @@ -237,838 +200,627 @@ export interface IBalanceSheetV2Interface extends utils.Interface { 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; - "SetFintroller(address,address,address)": 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: "SetFintroller"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetOracle"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawCollateral"): EventFragment; } -export interface BorrowEventObject { - account: string; - bond: string; - borrowAmount: BigNumber; +export namespace BorrowEvent { + export type InputTuple = [ + account: AddressLike, + bond: AddressLike, + borrowAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + bond: string, + borrowAmount: bigint + ]; + export interface OutputObject { + account: string; + bond: string; + borrowAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BorrowEvent = TypedEvent< - [string, string, BigNumber], - BorrowEventObject ->; -export type BorrowEventFilter = TypedEventFilter; - -export interface DepositCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace DepositCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositCollateralEvent = TypedEvent< - [string, string, BigNumber], - DepositCollateralEventObject ->; - -export type DepositCollateralEventFilter = - TypedEventFilter; -export interface LiquidateBorrowEventObject { - liquidator: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - collateral: string; - seizedCollateralAmount: BigNumber; +export namespace LiquidateBorrowEvent { + export type InputTuple = [ + liquidator: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike, + seizedCollateralAmount: BigNumberish + ]; + export type OutputTuple = [ + liquidator: string, + borrower: string, + bond: string, + repayAmount: bigint, + collateral: string, + seizedCollateralAmount: bigint + ]; + export interface OutputObject { + liquidator: string; + borrower: string; + bond: string; + repayAmount: bigint; + collateral: string; + seizedCollateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type LiquidateBorrowEvent = TypedEvent< - [string, string, string, BigNumber, string, BigNumber], - LiquidateBorrowEventObject ->; - -export type LiquidateBorrowEventFilter = TypedEventFilter; -export interface RepayBorrowEventObject { - payer: string; - borrower: string; - bond: string; - repayAmount: BigNumber; - newDebtAmount: BigNumber; +export namespace RepayBorrowEvent { + export type InputTuple = [ + payer: AddressLike, + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + newDebtAmount: BigNumberish + ]; + export type OutputTuple = [ + payer: string, + borrower: string, + bond: string, + repayAmount: bigint, + newDebtAmount: bigint + ]; + export interface OutputObject { + payer: string; + borrower: string; + bond: string; + repayAmount: bigint; + newDebtAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RepayBorrowEvent = TypedEvent< - [string, string, string, BigNumber, BigNumber], - RepayBorrowEventObject ->; -export type RepayBorrowEventFilter = TypedEventFilter; - -export interface SetFintrollerEventObject { - owner: string; - oldFintroller: string; - newFintroller: string; +export namespace SetFintrollerEvent { + export type InputTuple = [ + owner: AddressLike, + oldFintroller: AddressLike, + newFintroller: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldFintroller: string, + newFintroller: string + ]; + export interface OutputObject { + owner: string; + oldFintroller: string; + newFintroller: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFintrollerEvent = TypedEvent< - [string, string, string], - SetFintrollerEventObject ->; - -export type SetFintrollerEventFilter = TypedEventFilter; -export interface SetOracleEventObject { - owner: string; - oldOracle: string; - newOracle: string; +export namespace SetOracleEvent { + export type InputTuple = [ + owner: AddressLike, + oldOracle: AddressLike, + newOracle: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldOracle: string, + newOracle: string + ]; + export interface OutputObject { + owner: string; + oldOracle: string; + newOracle: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetOracleEvent = TypedEvent< - [string, string, string], - SetOracleEventObject ->; - -export type SetOracleEventFilter = TypedEventFilter; -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawCollateralEventObject { - account: string; - collateral: string; - collateralAmount: BigNumber; +export namespace WithdrawCollateralEvent { + export type InputTuple = [ + account: AddressLike, + collateral: AddressLike, + collateralAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + collateral: string, + collateralAmount: bigint + ]; + export interface OutputObject { + account: string; + collateral: string; + collateralAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawCollateralEvent = TypedEvent< - [string, string, BigNumber], - WithdrawCollateralEventObject ->; - -export type WithdrawCollateralEventFilter = - TypedEventFilter; export interface IBalanceSheetV2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IBalanceSheetV2; + waitForDeployment(): Promise; interface: IBalanceSheetV2Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { collateralAmount: BigNumber }>; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[]]>; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { debtAmount: BigNumber }>; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } - >; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { repayAmount: BigNumber }>; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { seizableCollateralAmount: BigNumber }>; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + borrow: TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + depositCollateral: TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" >; - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getBondList: TypedContractMethod<[account: AddressLike], [string[]], "view">; - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + getCollateralAmount: TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getCollateralList: TypedContractMethod< + [account: AddressLike], + [string[]], + "view" + >; - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getCurrentAccountLiquidity: TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getDebtAmount: TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; - owner(overrides?: CallOverrides): Promise; + getHypotheticalAccountLiquidity: TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getRepayAmount: TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + getSeizableCollateralAmount: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + liquidateBorrow: TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + owner: TypedContractMethod<[], [string], "view">; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + repayBorrow: TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + repayBorrowBehalf: TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setFintroller: TypedContractMethod< + [newFintroller: AddressLike], + [void], + "nonpayable" + >; - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + setOracle: TypedContractMethod< + [newOracle: AddressLike], + [void], + "nonpayable" + >; - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + withdrawCollateral: TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "borrow" + ): TypedContractMethod< + [bond: AddressLike, borrowAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateral" + ): TypedContractMethod< + [collateral: AddressLike, depositAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "getBondList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCollateralAmount" + ): TypedContractMethod< + [account: AddressLike, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getCollateralList" + ): TypedContractMethod<[account: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "getCurrentAccountLiquidity" + ): TypedContractMethod< + [account: AddressLike], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getDebtAmount" + ): TypedContractMethod< + [account: AddressLike, bond: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getHypotheticalAccountLiquidity" + ): TypedContractMethod< + [ + account: AddressLike, + collateralModify: AddressLike, + collateralAmountModify: BigNumberish, + bondModify: AddressLike, + debtAmountModify: BigNumberish + ], + [ + [bigint, bigint] & { excessLiquidity: bigint; shortfallLiquidity: bigint } + ], + "view" + >; + getFunction( + nameOrSignature: "getRepayAmount" + ): TypedContractMethod< + [ + collateral: AddressLike, + seizableCollateralAmount: BigNumberish, + bond: AddressLike + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getSeizableCollateralAmount" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish, collateral: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "liquidateBorrow" + ): TypedContractMethod< + [ + borrower: AddressLike, + bond: AddressLike, + repayAmount: BigNumberish, + collateral: AddressLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "repayBorrow" + ): TypedContractMethod< + [bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "repayBorrowBehalf" + ): TypedContractMethod< + [borrower: AddressLike, bond: AddressLike, repayAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFintroller" + ): TypedContractMethod<[newFintroller: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setOracle" + ): TypedContractMethod<[newOracle: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [collateral: AddressLike, withdrawAmount: BigNumberish], + [void], + "nonpayable" + >; - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getEvent( + key: "Borrow" + ): TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject + >; + getEvent( + key: "DepositCollateral" + ): TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + getEvent( + key: "LiquidateBorrow" + ): TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + getEvent( + key: "RepayBorrow" + ): TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + getEvent( + key: "SetFintroller" + ): TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + getEvent( + key: "SetOracle" + ): TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawCollateral" + ): TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + filters: { + "Borrow(address,address,uint256)": TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber] & { - excessLiquidity: BigNumber; - shortfallLiquidity: BigNumber; - } + Borrow: TypedContractEvent< + BorrowEvent.InputTuple, + BorrowEvent.OutputTuple, + BorrowEvent.OutputObject >; - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Borrow(address,address,uint256)"( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - Borrow( - account?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - borrowAmount?: null - ): BorrowEventFilter; - - "DepositCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - DepositCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): DepositCollateralEventFilter; - - "LiquidateBorrow(address,address,address,uint256,address,uint256)"( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - LiquidateBorrow( - liquidator?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - collateral?: null, - seizedCollateralAmount?: null - ): LiquidateBorrowEventFilter; - - "RepayBorrow(address,address,address,uint256,uint256)"( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - RepayBorrow( - payer?: PromiseOrValue | null, - borrower?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - repayAmount?: null, - newDebtAmount?: null - ): RepayBorrowEventFilter; - - "SetFintroller(address,address,address)"( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - SetFintroller( - owner?: PromiseOrValue | null, - oldFintroller?: null, - newFintroller?: null - ): SetFintrollerEventFilter; - - "SetOracle(address,address,address)"( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - SetOracle( - owner?: PromiseOrValue | null, - oldOracle?: null, - newOracle?: null - ): SetOracleEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawCollateral(address,address,uint256)"( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - WithdrawCollateral( - account?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - collateralAmount?: null - ): WithdrawCollateralEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - borrow( - bond: PromiseOrValue, - borrowAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBondList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralAmount( - account: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralList( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCurrentAccountLiquidity( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtAmount( - account: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getHypotheticalAccountLiquidity( - account: PromiseOrValue, - collateralModify: PromiseOrValue, - collateralAmountModify: PromiseOrValue, - bondModify: PromiseOrValue, - debtAmountModify: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayAmount( - collateral: PromiseOrValue, - seizableCollateralAmount: PromiseOrValue, - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSeizableCollateralAmount( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - liquidateBorrow( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "DepositCollateral(address,address,uint256)": TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; + DepositCollateral: TypedContractEvent< + DepositCollateralEvent.InputTuple, + DepositCollateralEvent.OutputTuple, + DepositCollateralEvent.OutputObject + >; - owner(overrides?: CallOverrides): Promise; + "LiquidateBorrow(address,address,address,uint256,address,uint256)": TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; + LiquidateBorrow: TypedContractEvent< + LiquidateBorrowEvent.InputTuple, + LiquidateBorrowEvent.OutputTuple, + LiquidateBorrowEvent.OutputObject + >; - repayBorrow( - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "RepayBorrow(address,address,address,uint256,uint256)": TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; + RepayBorrow: TypedContractEvent< + RepayBorrowEvent.InputTuple, + RepayBorrowEvent.OutputTuple, + RepayBorrowEvent.OutputObject + >; - repayBorrowBehalf( - borrower: PromiseOrValue, - bond: PromiseOrValue, - repayAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetFintroller(address,address,address)": TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; + SetFintroller: TypedContractEvent< + SetFintrollerEvent.InputTuple, + SetFintrollerEvent.OutputTuple, + SetFintrollerEvent.OutputObject + >; - setFintroller( - newFintroller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "SetOracle(address,address,address)": TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; + SetOracle: TypedContractEvent< + SetOracleEvent.InputTuple, + SetOracleEvent.OutputTuple, + SetOracleEvent.OutputObject + >; - setOracle( - newOracle: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - withdrawCollateral( - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "WithdrawCollateral(address,address,uint256)": TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + WithdrawCollateral: TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts b/packages/proxy-target/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts index c57af283..a24df57f 100644 --- a/packages/proxy-target/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts +++ b/packages/proxy-target/src/types/@hifi/protocol/contracts/core/fintroller/IFintroller.ts @@ -3,49 +3,45 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; export declare namespace IFintroller { export type BondStruct = { - debtCeiling: PromiseOrValue; - isBorrowAllowed: PromiseOrValue; - isDepositUnderlyingAllowed: PromiseOrValue; - isLiquidateBorrowAllowed: PromiseOrValue; - isListed: PromiseOrValue; - isRepayBorrowAllowed: PromiseOrValue; + debtCeiling: BigNumberish; + isBorrowAllowed: boolean; + isDepositUnderlyingAllowed: boolean; + isLiquidateBorrowAllowed: boolean; + isListed: boolean; + isRepayBorrowAllowed: boolean; }; export type BondStructOutput = [ - BigNumber, - boolean, - boolean, - boolean, - boolean, - boolean + debtCeiling: bigint, + isBorrowAllowed: boolean, + isDepositUnderlyingAllowed: boolean, + isLiquidateBorrowAllowed: boolean, + isListed: boolean, + isRepayBorrowAllowed: boolean ] & { - debtCeiling: BigNumber; + debtCeiling: bigint; isBorrowAllowed: boolean; isDepositUnderlyingAllowed: boolean; isLiquidateBorrowAllowed: boolean; @@ -54,65 +50,31 @@ export declare namespace IFintroller { }; export type CollateralStruct = { - ceiling: PromiseOrValue; - ratio: PromiseOrValue; - liquidationIncentive: PromiseOrValue; - isDepositCollateralAllowed: PromiseOrValue; - isListed: PromiseOrValue; + ceiling: BigNumberish; + ratio: BigNumberish; + liquidationIncentive: BigNumberish; + isDepositCollateralAllowed: boolean; + isListed: boolean; }; export type CollateralStructOutput = [ - BigNumber, - BigNumber, - BigNumber, - boolean, - boolean + ceiling: bigint, + ratio: bigint, + liquidationIncentive: bigint, + isDepositCollateralAllowed: boolean, + isListed: boolean ] & { - ceiling: BigNumber; - ratio: BigNumber; - liquidationIncentive: BigNumber; + ceiling: bigint; + ratio: bigint; + liquidationIncentive: bigint; isDepositCollateralAllowed: boolean; isListed: boolean; }; } -export interface IFintrollerInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "getBond(address)": FunctionFragment; - "getBorrowAllowed(address)": FunctionFragment; - "getCollateral(address)": FunctionFragment; - "getCollateralCeiling(address)": FunctionFragment; - "getCollateralRatio(address)": FunctionFragment; - "getDebtCeiling(address)": FunctionFragment; - "getDepositCollateralAllowed(address)": FunctionFragment; - "getDepositUnderlyingAllowed(address)": FunctionFragment; - "getLiquidateBorrowAllowed(address)": FunctionFragment; - "getLiquidationIncentive(address)": FunctionFragment; - "getRepayBorrowAllowed(address)": FunctionFragment; - "isBondListed(address)": FunctionFragment; - "isCollateralListed(address)": FunctionFragment; - "listBond(address)": FunctionFragment; - "listCollateral(address)": FunctionFragment; - "maxBonds()": FunctionFragment; - "maxCollaterals()": FunctionFragment; - "owner()": FunctionFragment; - "setBorrowAllowed(address,bool)": FunctionFragment; - "setCollateralCeiling(address,uint256)": FunctionFragment; - "setCollateralRatio(address,uint256)": FunctionFragment; - "setDebtCeiling(address,uint256)": FunctionFragment; - "setDepositCollateralAllowed(address,bool)": FunctionFragment; - "setDepositUnderlyingAllowed(address,bool)": FunctionFragment; - "setLiquidateBorrowAllowed(address,bool)": FunctionFragment; - "setLiquidationIncentive(address,uint256)": FunctionFragment; - "setMaxBonds(uint256)": FunctionFragment; - "setMaxCollaterals(uint256)": FunctionFragment; - "setRepayBorrowAllowed(address,bool)": FunctionFragment; - }; - +export interface IFintrollerInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_renounceOwnership" | "_transferOwnership" | "getBond" @@ -146,73 +108,91 @@ export interface IFintrollerInterface extends utils.Interface { | "setRepayBorrowAllowed" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "ListBond" + | "ListCollateral" + | "SetBorrowAllowed" + | "SetCollateralCeiling" + | "SetCollateralRatio" + | "SetDebtCeiling" + | "SetDepositCollateralAllowed" + | "SetDepositUnderlyingAllowed" + | "SetLiquidateBorrowAllowed" + | "SetLiquidationIncentive" + | "SetMaxBonds" + | "SetMaxCollaterals" + | "SetRepayBorrowAllowed" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getCollateralRatio", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDebtCeiling", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositCollateralAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getDepositUnderlyingAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidateBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getLiquidationIncentive", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "getRepayBorrowAllowed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isBondListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "isCollateralListed", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listBond", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "listCollateral", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "maxBonds", values?: undefined): string; encodeFunctionData( @@ -222,47 +202,47 @@ export interface IFintrollerInterface extends utils.Interface { encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "setBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setCollateralCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setCollateralRatio", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDebtCeiling", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setDepositCollateralAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setDepositUnderlyingAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidateBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; encodeFunctionData( functionFragment: "setLiquidationIncentive", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxBonds", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setMaxCollaterals", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "setRepayBorrowAllowed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, boolean] ): string; decodeFunctionResult( @@ -377,1177 +357,876 @@ export interface IFintrollerInterface extends utils.Interface { functionFragment: "setRepayBorrowAllowed", data: BytesLike ): Result; - - events: { - "ListBond(address,address)": EventFragment; - "ListCollateral(address,address)": EventFragment; - "SetBorrowAllowed(address,address,bool)": EventFragment; - "SetCollateralCeiling(address,address,uint256,uint256)": EventFragment; - "SetCollateralRatio(address,address,uint256,uint256)": EventFragment; - "SetDebtCeiling(address,address,uint256,uint256)": EventFragment; - "SetDepositCollateralAllowed(address,address,bool)": EventFragment; - "SetDepositUnderlyingAllowed(address,address,bool)": EventFragment; - "SetLiquidateBorrowAllowed(address,address,bool)": EventFragment; - "SetLiquidationIncentive(address,address,uint256,uint256)": EventFragment; - "SetMaxBonds(address,uint256,uint256)": EventFragment; - "SetMaxCollaterals(address,uint256,uint256)": EventFragment; - "SetRepayBorrowAllowed(address,address,bool)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ListBond"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ListCollateral"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralCeiling"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetCollateralRatio"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetDebtCeiling"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositCollateralAllowed" - ): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SetDepositUnderlyingAllowed" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidateBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetLiquidationIncentive"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxBonds"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetMaxCollaterals"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetRepayBorrowAllowed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface ListBondEventObject { - owner: string; - bond: string; +export namespace ListBondEvent { + export type InputTuple = [owner: AddressLike, bond: AddressLike]; + export type OutputTuple = [owner: string, bond: string]; + export interface OutputObject { + owner: string; + bond: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListBondEvent = TypedEvent<[string, string], ListBondEventObject>; - -export type ListBondEventFilter = TypedEventFilter; -export interface ListCollateralEventObject { - owner: string; - collateral: string; +export namespace ListCollateralEvent { + export type InputTuple = [owner: AddressLike, collateral: AddressLike]; + export type OutputTuple = [owner: string, collateral: string]; + export interface OutputObject { + owner: string; + collateral: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ListCollateralEvent = TypedEvent< - [string, string], - ListCollateralEventObject ->; - -export type ListCollateralEventFilter = TypedEventFilter; -export interface SetBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; -} -export type SetBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetBorrowAllowedEventObject ->; - -export type SetBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetCollateralCeilingEventObject { - owner: string; - collateral: string; - oldCollateralCeiling: BigNumber; - newCollateralCeiling: BigNumber; -} -export type SetCollateralCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralCeilingEventObject ->; - -export type SetCollateralCeilingEventFilter = - TypedEventFilter; - -export interface SetCollateralRatioEventObject { - owner: string; - collateral: string; - oldCollateralRatio: BigNumber; - newCollateralRatio: BigNumber; -} -export type SetCollateralRatioEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetCollateralRatioEventObject ->; - -export type SetCollateralRatioEventFilter = - TypedEventFilter; - -export interface SetDebtCeilingEventObject { - owner: string; - bond: string; - oldDebtCeiling: BigNumber; - newDebtCeiling: BigNumber; +export namespace SetBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDebtCeilingEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetDebtCeilingEventObject ->; -export type SetDebtCeilingEventFilter = TypedEventFilter; - -export interface SetDepositCollateralAllowedEventObject { - owner: string; - collateral: string; - state: boolean; +export namespace SetCollateralCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralCeiling: BigNumberish, + newCollateralCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralCeiling: bigint, + newCollateralCeiling: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralCeiling: bigint; + newCollateralCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositCollateralAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositCollateralAllowedEventObject ->; - -export type SetDepositCollateralAllowedEventFilter = - TypedEventFilter; - -export interface SetDepositUnderlyingAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetCollateralRatioEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldCollateralRatio: BigNumberish, + newCollateralRatio: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldCollateralRatio: bigint, + newCollateralRatio: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldCollateralRatio: bigint; + newCollateralRatio: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetDepositUnderlyingAllowedEvent = TypedEvent< - [string, string, boolean], - SetDepositUnderlyingAllowedEventObject ->; - -export type SetDepositUnderlyingAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidateBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetDebtCeilingEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + oldDebtCeiling: BigNumberish, + newDebtCeiling: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + bond: string, + oldDebtCeiling: bigint, + newDebtCeiling: bigint + ]; + export interface OutputObject { + owner: string; + bond: string; + oldDebtCeiling: bigint; + newDebtCeiling: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidateBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetLiquidateBorrowAllowedEventObject ->; - -export type SetLiquidateBorrowAllowedEventFilter = - TypedEventFilter; - -export interface SetLiquidationIncentiveEventObject { - owner: string; - collateral: string; - oldLiquidationIncentive: BigNumber; - newLiquidationIncentive: BigNumber; + +export namespace SetDepositCollateralAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, collateral: string, state: boolean]; + export interface OutputObject { + owner: string; + collateral: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetLiquidationIncentiveEvent = TypedEvent< - [string, string, BigNumber, BigNumber], - SetLiquidationIncentiveEventObject ->; - -export type SetLiquidationIncentiveEventFilter = - TypedEventFilter; - -export interface SetMaxBondsEventObject { - owner: string; - oldMaxBonds: BigNumber; - newMaxBonds: BigNumber; + +export namespace SetDepositUnderlyingAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxBondsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxBondsEventObject ->; -export type SetMaxBondsEventFilter = TypedEventFilter; +export namespace SetLiquidateBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface SetMaxCollateralsEventObject { - owner: string; - oldMaxCollaterals: BigNumber; - newMaxCollaterals: BigNumber; +export namespace SetLiquidationIncentiveEvent { + export type InputTuple = [ + owner: AddressLike, + collateral: AddressLike, + oldLiquidationIncentive: BigNumberish, + newLiquidationIncentive: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + collateral: string, + oldLiquidationIncentive: bigint, + newLiquidationIncentive: bigint + ]; + export interface OutputObject { + owner: string; + collateral: string; + oldLiquidationIncentive: bigint; + newLiquidationIncentive: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetMaxCollateralsEvent = TypedEvent< - [string, BigNumber, BigNumber], - SetMaxCollateralsEventObject ->; - -export type SetMaxCollateralsEventFilter = - TypedEventFilter; - -export interface SetRepayBorrowAllowedEventObject { - owner: string; - bond: string; - state: boolean; + +export namespace SetMaxBondsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxBonds: BigNumberish, + newMaxBonds: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxBonds: bigint, + newMaxBonds: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxBonds: bigint; + newMaxBonds: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetRepayBorrowAllowedEvent = TypedEvent< - [string, string, boolean], - SetRepayBorrowAllowedEventObject ->; -export type SetRepayBorrowAllowedEventFilter = - TypedEventFilter; +export namespace SetMaxCollateralsEvent { + export type InputTuple = [ + owner: AddressLike, + oldMaxCollaterals: BigNumberish, + newMaxCollaterals: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + oldMaxCollaterals: bigint, + newMaxCollaterals: bigint + ]; + export interface OutputObject { + owner: string; + oldMaxCollaterals: bigint; + newMaxCollaterals: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace SetRepayBorrowAllowedEvent { + export type InputTuple = [ + owner: AddressLike, + bond: AddressLike, + state: boolean + ]; + export type OutputTuple = [owner: string, bond: string, state: boolean]; + export interface OutputObject { + owner: string; + bond: string; + state: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; -export type TransferOwnershipEventFilter = - TypedEventFilter; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface IFintroller extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IFintroller; + waitForDeployment(): Promise; interface: IFintrollerInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.BondStructOutput]>; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[IFintroller.CollateralStructOutput]>; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise<[BigNumber]>; - - maxCollaterals(overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + getBond: TypedContractMethod< + [bond: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + + getBorrowAllowed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + getCollateral: TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + + getCollateralCeiling: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getCollateralRatio: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getDebtCeiling: TypedContractMethod<[bond: AddressLike], [bigint], "view">; + + getDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + getDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + getLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike], + [bigint], + "view" + >; + + getRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike], + [boolean], + "view" + >; + + isBondListed: TypedContractMethod<[bond: AddressLike], [boolean], "view">; + + isCollateralListed: TypedContractMethod< + [collateral: AddressLike], + [boolean], + "view" + >; + + listBond: TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + + listCollateral: TypedContractMethod< + [collateral: AddressLike], + [void], + "nonpayable" + >; + + maxBonds: TypedContractMethod<[], [bigint], "view">; + + maxCollaterals: TypedContractMethod<[], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + setBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setCollateralCeiling: TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setCollateralRatio: TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + + setDebtCeiling: TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + + setDepositCollateralAllowed: TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setDepositUnderlyingAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidateBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + setLiquidationIncentive: TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + + setMaxBonds: TypedContractMethod< + [newMaxBonds: BigNumberish], + [void], + "nonpayable" + >; + + setMaxCollaterals: TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + + setRepayBorrowAllowed: TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - filters: { - "ListBond(address,address)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - ListBond( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null - ): ListBondEventFilter; - - "ListCollateral(address,address)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - ListCollateral( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null - ): ListCollateralEventFilter; - - "SetBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - SetBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetBorrowAllowedEventFilter; - - "SetCollateralCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - SetCollateralCeiling( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralCeiling?: null, - newCollateralCeiling?: null - ): SetCollateralCeilingEventFilter; - - "SetCollateralRatio(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - SetCollateralRatio( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - oldCollateralRatio?: null, - newCollateralRatio?: null - ): SetCollateralRatioEventFilter; - - "SetDebtCeiling(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - SetDebtCeiling( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - oldDebtCeiling?: null, - newDebtCeiling?: null - ): SetDebtCeilingEventFilter; - - "SetDepositCollateralAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - SetDepositCollateralAllowed( - owner?: PromiseOrValue | null, - collateral?: PromiseOrValue | null, - state?: null - ): SetDepositCollateralAllowedEventFilter; - - "SetDepositUnderlyingAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - SetDepositUnderlyingAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetDepositUnderlyingAllowedEventFilter; - - "SetLiquidateBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - SetLiquidateBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetLiquidateBorrowAllowedEventFilter; - - "SetLiquidationIncentive(address,address,uint256,uint256)"( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - SetLiquidationIncentive( - owner?: PromiseOrValue | null, - collateral?: null, - oldLiquidationIncentive?: null, - newLiquidationIncentive?: null - ): SetLiquidationIncentiveEventFilter; - - "SetMaxBonds(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - SetMaxBonds( - owner?: PromiseOrValue | null, - oldMaxBonds?: null, - newMaxBonds?: null - ): SetMaxBondsEventFilter; - - "SetMaxCollaterals(address,uint256,uint256)"( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - SetMaxCollaterals( - owner?: PromiseOrValue | null, - oldMaxCollaterals?: null, - newMaxCollaterals?: null - ): SetMaxCollateralsEventFilter; - - "SetRepayBorrowAllowed(address,address,bool)"( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - SetRepayBorrowAllowed( - owner?: PromiseOrValue | null, - bond?: PromiseOrValue | null, - state?: null - ): SetRepayBorrowAllowedEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "getBond" + ): TypedContractMethod< + [bond: AddressLike], + [IFintroller.BondStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getCollateral" + ): TypedContractMethod< + [collateral: AddressLike], + [IFintroller.CollateralStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getCollateralCeiling" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getCollateralRatio" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDebtCeiling" + ): TypedContractMethod<[bond: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getDepositCollateralAllowed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getDepositUnderlyingAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidateBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "getLiquidationIncentive" + ): TypedContractMethod<[collateral: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getRepayBorrowAllowed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isBondListed" + ): TypedContractMethod<[bond: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isCollateralListed" + ): TypedContractMethod<[collateral: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "listBond" + ): TypedContractMethod<[bond: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "listCollateral" + ): TypedContractMethod<[collateral: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "maxBonds" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxCollaterals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralCeiling" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCollateralRatio" + ): TypedContractMethod< + [collateral: AddressLike, newCollateralRatio: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDebtCeiling" + ): TypedContractMethod< + [bond: AddressLike, newDebtCeiling: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositCollateralAllowed" + ): TypedContractMethod< + [collateral: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDepositUnderlyingAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidateBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidationIncentive" + ): TypedContractMethod< + [collateral: AddressLike, newLiquidationIncentive: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxBonds" + ): TypedContractMethod<[newMaxBonds: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setMaxCollaterals" + ): TypedContractMethod< + [newMaxCollaterals: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setRepayBorrowAllowed" + ): TypedContractMethod< + [bond: AddressLike, state: boolean], + [void], + "nonpayable" + >; - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; + getEvent( + key: "ListBond" + ): TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + getEvent( + key: "ListCollateral" + ): TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + getEvent( + key: "SetBorrowAllowed" + ): TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetCollateralCeiling" + ): TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + getEvent( + key: "SetCollateralRatio" + ): TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + getEvent( + key: "SetDebtCeiling" + ): TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + getEvent( + key: "SetDepositCollateralAllowed" + ): TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + getEvent( + key: "SetDepositUnderlyingAllowed" + ): TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidateBorrowAllowed" + ): TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "SetLiquidationIncentive" + ): TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + getEvent( + key: "SetMaxBonds" + ): TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + getEvent( + key: "SetMaxCollaterals" + ): TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + getEvent( + key: "SetRepayBorrowAllowed" + ): TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getBond( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateral( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralCeiling( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getCollateralRatio( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDebtCeiling( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositCollateralAllowed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositUnderlyingAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidateBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getLiquidationIncentive( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getRepayBorrowAllowed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isBondListed( - bond: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isCollateralListed( - collateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - listBond( - bond: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - listCollateral( - collateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - maxBonds(overrides?: CallOverrides): Promise; - - maxCollaterals(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - setBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralCeiling( - collateral: PromiseOrValue, - newCollateralCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setCollateralRatio( - collateral: PromiseOrValue, - newCollateralRatio: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDebtCeiling( - bond: PromiseOrValue, - newDebtCeiling: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositCollateralAllowed( - collateral: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setDepositUnderlyingAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidateBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setLiquidationIncentive( - collateral: PromiseOrValue, - newLiquidationIncentive: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxBonds( - newMaxBonds: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setMaxCollaterals( - newMaxCollaterals: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setRepayBorrowAllowed( - bond: PromiseOrValue, - state: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + filters: { + "ListBond(address,address)": TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + ListBond: TypedContractEvent< + ListBondEvent.InputTuple, + ListBondEvent.OutputTuple, + ListBondEvent.OutputObject + >; + + "ListCollateral(address,address)": TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + ListCollateral: TypedContractEvent< + ListCollateralEvent.InputTuple, + ListCollateralEvent.OutputTuple, + ListCollateralEvent.OutputObject + >; + + "SetBorrowAllowed(address,address,bool)": TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + SetBorrowAllowed: TypedContractEvent< + SetBorrowAllowedEvent.InputTuple, + SetBorrowAllowedEvent.OutputTuple, + SetBorrowAllowedEvent.OutputObject + >; + + "SetCollateralCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + SetCollateralCeiling: TypedContractEvent< + SetCollateralCeilingEvent.InputTuple, + SetCollateralCeilingEvent.OutputTuple, + SetCollateralCeilingEvent.OutputObject + >; + + "SetCollateralRatio(address,address,uint256,uint256)": TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + SetCollateralRatio: TypedContractEvent< + SetCollateralRatioEvent.InputTuple, + SetCollateralRatioEvent.OutputTuple, + SetCollateralRatioEvent.OutputObject + >; + + "SetDebtCeiling(address,address,uint256,uint256)": TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + SetDebtCeiling: TypedContractEvent< + SetDebtCeilingEvent.InputTuple, + SetDebtCeilingEvent.OutputTuple, + SetDebtCeilingEvent.OutputObject + >; + + "SetDepositCollateralAllowed(address,address,bool)": TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + SetDepositCollateralAllowed: TypedContractEvent< + SetDepositCollateralAllowedEvent.InputTuple, + SetDepositCollateralAllowedEvent.OutputTuple, + SetDepositCollateralAllowedEvent.OutputObject + >; + + "SetDepositUnderlyingAllowed(address,address,bool)": TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + SetDepositUnderlyingAllowed: TypedContractEvent< + SetDepositUnderlyingAllowedEvent.InputTuple, + SetDepositUnderlyingAllowedEvent.OutputTuple, + SetDepositUnderlyingAllowedEvent.OutputObject + >; + + "SetLiquidateBorrowAllowed(address,address,bool)": TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + SetLiquidateBorrowAllowed: TypedContractEvent< + SetLiquidateBorrowAllowedEvent.InputTuple, + SetLiquidateBorrowAllowedEvent.OutputTuple, + SetLiquidateBorrowAllowedEvent.OutputObject + >; + + "SetLiquidationIncentive(address,address,uint256,uint256)": TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + SetLiquidationIncentive: TypedContractEvent< + SetLiquidationIncentiveEvent.InputTuple, + SetLiquidationIncentiveEvent.OutputTuple, + SetLiquidationIncentiveEvent.OutputObject + >; + + "SetMaxBonds(address,uint256,uint256)": TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + SetMaxBonds: TypedContractEvent< + SetMaxBondsEvent.InputTuple, + SetMaxBondsEvent.OutputTuple, + SetMaxBondsEvent.OutputObject + >; + + "SetMaxCollaterals(address,uint256,uint256)": TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + SetMaxCollaterals: TypedContractEvent< + SetMaxCollateralsEvent.InputTuple, + SetMaxCollateralsEvent.OutputTuple, + SetMaxCollateralsEvent.OutputObject + >; + + "SetRepayBorrowAllowed(address,address,bool)": TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + SetRepayBorrowAllowed: TypedContractEvent< + SetRepayBorrowAllowedEvent.InputTuple, + SetRepayBorrowAllowedEvent.OutputTuple, + SetRepayBorrowAllowedEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts b/packages/proxy-target/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts index 96753024..724cb96f 100644 --- a/packages/proxy-target/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts +++ b/packages/proxy-target/src/types/@hifi/protocol/contracts/core/h-token/IHToken.ts @@ -3,72 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IHTokenInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setBalanceSheet(address)": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "balanceSheet()": FunctionFragment; - "burn(address,uint256)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "depositUnderlying(uint256)": FunctionFragment; - "fintroller()": FunctionFragment; - "getDepositorBalance(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "isMatured()": FunctionFragment; - "maturity()": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "nonces(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "redeem(uint256)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "totalUnderlyingReserve()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "underlying()": FunctionFragment; - "underlyingPrecisionScalar()": FunctionFragment; - "version()": FunctionFragment; - "withdrawUnderlying(uint256)": FunctionFragment; - }; - +export interface IHTokenInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "_recover" @@ -107,6 +64,21 @@ export interface IHTokenInterface extends utils.Interface { | "withdrawUnderlying" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Approval" + | "Burn" + | "DepositUnderlying" + | "Mint" + | "Recover" + | "Redeem" + | "SetBalanceSheet" + | "SetNonRecoverableTokens" + | "Transfer" + | "TransferOwnership" + | "WithdrawUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -117,7 +89,7 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -125,27 +97,27 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setBalanceSheet", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "balanceSheet", @@ -153,16 +125,16 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "burn", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "fintroller", @@ -170,43 +142,40 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getDepositorBalance", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "isMatured", values?: undefined): string; encodeFunctionData(functionFragment: "maturity", values?: undefined): string; encodeFunctionData( functionFragment: "mint", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] + values: [BigNumberish] ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData( functionFragment: "redeem", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -219,15 +188,11 @@ export interface IHTokenInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "underlying", @@ -240,7 +205,7 @@ export interface IHTokenInterface extends utils.Interface { encodeFunctionData(functionFragment: "version", values?: undefined): string; encodeFunctionData( functionFragment: "withdrawUnderlying", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult( @@ -330,1058 +295,775 @@ export interface IHTokenInterface extends utils.Interface { functionFragment: "withdrawUnderlying", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Burn(address,uint256)": EventFragment; - "DepositUnderlying(address,uint256,uint256)": EventFragment; - "Mint(address,uint256)": EventFragment; - "Recover(address,address,uint256)": EventFragment; - "Redeem(address,uint256,uint256)": EventFragment; - "SetBalanceSheet(address,address,address)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - "TransferOwnership(address,address)": EventFragment; - "WithdrawUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DepositUnderlying"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetBalanceSheet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawUnderlying"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface BurnEventObject { - holder: string; - burnAmount: BigNumber; +export namespace BurnEvent { + export type InputTuple = [holder: AddressLike, burnAmount: BigNumberish]; + export type OutputTuple = [holder: string, burnAmount: bigint]; + export interface OutputObject { + holder: string; + burnAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BurnEvent = TypedEvent<[string, BigNumber], BurnEventObject>; - -export type BurnEventFilter = TypedEventFilter; -export interface DepositUnderlyingEventObject { - depositor: string; - depositUnderlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace DepositUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + depositUnderlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + depositUnderlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + depositUnderlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DepositUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - DepositUnderlyingEventObject ->; - -export type DepositUnderlyingEventFilter = - TypedEventFilter; -export interface MintEventObject { - beneficiary: string; - mintAmount: BigNumber; +export namespace MintEvent { + export type InputTuple = [beneficiary: AddressLike, mintAmount: BigNumberish]; + export type OutputTuple = [beneficiary: string, mintAmount: bigint]; + export interface OutputObject { + beneficiary: string; + mintAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type MintEvent = TypedEvent<[string, BigNumber], MintEventObject>; -export type MintEventFilter = TypedEventFilter; - -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface RedeemEventObject { - account: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; +export namespace RedeemEvent { + export type InputTuple = [ + account: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + account: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + account: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RedeemEvent = TypedEvent< - [string, BigNumber, BigNumber], - RedeemEventObject ->; - -export type RedeemEventFilter = TypedEventFilter; -export interface SetBalanceSheetEventObject { - owner: string; - oldBalanceSheet: string; - newBalanceSheet: string; +export namespace SetBalanceSheetEvent { + export type InputTuple = [ + owner: AddressLike, + oldBalanceSheet: AddressLike, + newBalanceSheet: AddressLike + ]; + export type OutputTuple = [ + owner: string, + oldBalanceSheet: string, + newBalanceSheet: string + ]; + export interface OutputObject { + owner: string; + oldBalanceSheet: string; + newBalanceSheet: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetBalanceSheetEvent = TypedEvent< - [string, string, string], - SetBalanceSheetEventObject ->; -export type SetBalanceSheetEventFilter = TypedEventFilter; - -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; -} -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; - -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; -export type TransferEventFilter = TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; - -export interface WithdrawUnderlyingEventObject { - depositor: string; - underlyingAmount: BigNumber; - hTokenAmount: BigNumber; + +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type WithdrawUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - WithdrawUnderlyingEventObject ->; -export type WithdrawUnderlyingEventFilter = - TypedEventFilter; +export namespace WithdrawUnderlyingEvent { + export type InputTuple = [ + depositor: AddressLike, + underlyingAmount: BigNumberish, + hTokenAmount: BigNumberish + ]; + export type OutputTuple = [ + depositor: string, + underlyingAmount: bigint, + hTokenAmount: bigint + ]; + export interface OutputObject { + depositor: string; + underlyingAmount: bigint; + hTokenAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} export interface IHToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IHToken; + waitForDeployment(): Promise; interface: IHTokenInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - balanceSheet(overrides?: CallOverrides): Promise<[string]>; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise<[string]>; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber] & { amount: BigNumber }>; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise<[boolean]>; - - maturity(overrides?: CallOverrides): Promise<[BigNumber]>; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise<[string]>; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - version(overrides?: CallOverrides): Promise<[string]>; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setBalanceSheet: TypedContractMethod< + [newBalanceSheet: AddressLike], + [void], + "nonpayable" + >; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + balanceSheet: TypedContractMethod<[], [string], "view">; + + burn: TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + depositUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + fintroller: TypedContractMethod<[], [string], "view">; + + getDepositorBalance: TypedContractMethod< + [depositor: AddressLike], + [bigint], + "view" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + isMatured: TypedContractMethod<[], [boolean], "view">; + + maturity: TypedContractMethod<[], [bigint], "view">; + + mint: TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonRecoverableTokens: TypedContractMethod< + [index: BigNumberish], + [string], + "view" + >; + + nonces: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + totalUnderlyingReserve: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; - name(overrides?: CallOverrides): Promise; + underlying: TypedContractMethod<[], [string], "view">; - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + underlyingPrecisionScalar: TypedContractMethod<[], [bigint], "view">; - underlying(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [string], "view">; - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; + withdrawUnderlying: TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; - version(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setBalanceSheet" + ): TypedContractMethod<[newBalanceSheet: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "balanceSheet" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "burn" + ): TypedContractMethod< + [holder: AddressLike, burnAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "fintroller" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getDepositorBalance" + ): TypedContractMethod<[depositor: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "isMatured" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "maturity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [beneficiary: AddressLike, mintAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[index: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "totalUnderlyingReserve" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "underlyingPrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "withdrawUnderlying" + ): TypedContractMethod< + [underlyingAmount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Burn" + ): TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + getEvent( + key: "DepositUnderlying" + ): TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + getEvent( + key: "Mint" + ): TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "Redeem" + ): TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + getEvent( + key: "SetBalanceSheet" + ): TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + getEvent( + key: "WithdrawUnderlying" + ): TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Burn(address,uint256)"( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - Burn( - holder?: PromiseOrValue | null, - burnAmount?: null - ): BurnEventFilter; - - "DepositUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - DepositUnderlying( - depositor?: PromiseOrValue | null, - depositUnderlyingAmount?: null, - hTokenAmount?: null - ): DepositUnderlyingEventFilter; - - "Mint(address,uint256)"( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - Mint( - beneficiary?: PromiseOrValue | null, - mintAmount?: null - ): MintEventFilter; - - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "Redeem(address,uint256,uint256)"( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - Redeem( - account?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): RedeemEventFilter; - - "SetBalanceSheet(address,address,address)"( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - SetBalanceSheet( - owner?: PromiseOrValue | null, - oldBalanceSheet?: null, - newBalanceSheet?: null - ): SetBalanceSheetEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - - "WithdrawUnderlying(address,uint256,uint256)"( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - WithdrawUnderlying( - depositor?: PromiseOrValue | null, - underlyingAmount?: null, - hTokenAmount?: null - ): WithdrawUnderlyingEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setBalanceSheet( - newBalanceSheet: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceSheet(overrides?: CallOverrides): Promise; - - burn( - holder: PromiseOrValue, - burnAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - fintroller(overrides?: CallOverrides): Promise; - - getDepositorBalance( - depositor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - isMatured(overrides?: CallOverrides): Promise; - - maturity(overrides?: CallOverrides): Promise; - - mint( - beneficiary: PromiseOrValue, - mintAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - totalUnderlyingReserve( - overrides?: CallOverrides - ): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - underlying(overrides?: CallOverrides): Promise; - - underlyingPrecisionScalar( - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - - withdrawUnderlying( - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Burn(address,uint256)": TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + Burn: TypedContractEvent< + BurnEvent.InputTuple, + BurnEvent.OutputTuple, + BurnEvent.OutputObject + >; + + "DepositUnderlying(address,uint256,uint256)": TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + DepositUnderlying: TypedContractEvent< + DepositUnderlyingEvent.InputTuple, + DepositUnderlyingEvent.OutputTuple, + DepositUnderlyingEvent.OutputObject + >; + + "Mint(address,uint256)": TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + Mint: TypedContractEvent< + MintEvent.InputTuple, + MintEvent.OutputTuple, + MintEvent.OutputObject + >; + + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "Redeem(address,uint256,uint256)": TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + Redeem: TypedContractEvent< + RedeemEvent.InputTuple, + RedeemEvent.OutputTuple, + RedeemEvent.OutputObject + >; + + "SetBalanceSheet(address,address,address)": TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + SetBalanceSheet: TypedContractEvent< + SetBalanceSheetEvent.InputTuple, + SetBalanceSheetEvent.OutputTuple, + SetBalanceSheetEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + + "WithdrawUnderlying(address,uint256,uint256)": TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; + WithdrawUnderlying: TypedContractEvent< + WithdrawUnderlyingEvent.InputTuple, + WithdrawUnderlyingEvent.OutputTuple, + WithdrawUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts b/packages/proxy-target/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts index 0a5be3c3..803089bd 100644 --- a/packages/proxy-target/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts +++ b/packages/proxy-target/src/types/@hifi/protocol/contracts/external/chainlink/IAggregatorV3.ts @@ -3,35 +3,26 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../../common"; -export interface IAggregatorV3Interface extends utils.Interface { - functions: { - "decimals()": FunctionFragment; - "description()": FunctionFragment; - "getRoundData(uint80)": FunctionFragment; - "latestRoundData()": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IAggregatorV3Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "decimals" | "description" | "getRoundData" @@ -46,7 +37,7 @@ export interface IAggregatorV3Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getRoundData", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData( functionFragment: "latestRoundData", @@ -68,162 +59,128 @@ export interface IAggregatorV3Interface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: {}; } export interface IAggregatorV3 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IAggregatorV3; + waitForDeployment(): Promise; interface: IAggregatorV3Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - decimals(overrides?: CallOverrides): Promise<[number]>; - - description(overrides?: CallOverrides): Promise<[string]>; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ): 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; + + decimals: TypedContractMethod<[], [bigint], "view">; + + description: TypedContractMethod<[], [string], "view">; + + getRoundData: TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - version(overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + ], + "view" >; - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; - } + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; + } + ], + "view" >; - version(overrides?: CallOverrides): Promise; - - callStatic: { - decimals(overrides?: CallOverrides): Promise; + version: TypedContractMethod<[], [bigint], "view">; - description(overrides?: CallOverrides): Promise; + getFunction( + key: string | FunctionFragment + ): T; - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getRoundData" + ): TypedContractMethod< + [_roundId: BigNumberish], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - latestRoundData( - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { - roundId: BigNumber; - answer: BigNumber; - startedAt: BigNumber; - updatedAt: BigNumber; - answeredInRound: BigNumber; + ], + "view" + >; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + roundId: bigint; + answer: bigint; + startedAt: bigint; + updatedAt: bigint; + answeredInRound: bigint; } - >; - - version(overrides?: CallOverrides): Promise; - }; + ], + "view" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; filters: {}; - - estimateGas: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - decimals(overrides?: CallOverrides): Promise; - - description(overrides?: CallOverrides): Promise; - - getRoundData( - _roundId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - latestRoundData(overrides?: CallOverrides): Promise; - - version(overrides?: CallOverrides): Promise; - }; } diff --git a/packages/proxy-target/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts b/packages/proxy-target/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts index b7048921..01ff7e8f 100644 --- a/packages/proxy-target/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts +++ b/packages/proxy-target/src/types/@hifi/protocol/contracts/oracles/IChainlinkOperator.ts @@ -3,45 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IChainlinkOperatorInterface extends utils.Interface { - functions: { - "deleteFeed(string)": FunctionFragment; - "getFeed(string)": FunctionFragment; - "getNormalizedPrice(string)": FunctionFragment; - "getPrice(string)": FunctionFragment; - "pricePrecision()": FunctionFragment; - "pricePrecisionScalar()": FunctionFragment; - "priceStalenessThreshold()": FunctionFragment; - "setFeed(address,address)": FunctionFragment; - "setPriceStalenessThreshold(uint256)": FunctionFragment; - }; - +export interface IChainlinkOperatorInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "deleteFeed" | "getFeed" | "getNormalizedPrice" @@ -53,22 +37,20 @@ export interface IChainlinkOperatorInterface extends utils.Interface { | "setPriceStalenessThreshold" ): FunctionFragment; - encodeFunctionData( - functionFragment: "deleteFeed", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getFeed", - values: [PromiseOrValue] - ): string; + getEvent( + nameOrSignatureOrTopic: + | "DeleteFeed" + | "SetFeed" + | "SetPriceStalenessThreshold" + ): EventFragment; + + encodeFunctionData(functionFragment: "deleteFeed", values: [string]): string; + encodeFunctionData(functionFragment: "getFeed", values: [string]): string; encodeFunctionData( functionFragment: "getNormalizedPrice", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getPrice", - values: [PromiseOrValue] + values: [string] ): string; + encodeFunctionData(functionFragment: "getPrice", values: [string]): string; encodeFunctionData( functionFragment: "pricePrecision", values?: undefined @@ -83,11 +65,11 @@ export interface IChainlinkOperatorInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "setFeed", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "setPriceStalenessThreshold", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult(functionFragment: "deleteFeed", data: BytesLike): Result; @@ -114,298 +96,220 @@ export interface IChainlinkOperatorInterface extends utils.Interface { functionFragment: "setPriceStalenessThreshold", data: BytesLike ): Result; - - events: { - "DeleteFeed(address,address)": EventFragment; - "SetFeed(address,address)": EventFragment; - "SetPriceStalenessThreshold(uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DeleteFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetFeed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetPriceStalenessThreshold"): EventFragment; } -export interface DeleteFeedEventObject { - asset: string; - feed: string; +export namespace DeleteFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type DeleteFeedEvent = TypedEvent< - [string, string], - DeleteFeedEventObject ->; - -export type DeleteFeedEventFilter = TypedEventFilter; -export interface SetFeedEventObject { - asset: string; - feed: string; +export namespace SetFeedEvent { + export type InputTuple = [asset: AddressLike, feed: AddressLike]; + export type OutputTuple = [asset: string, feed: string]; + export interface OutputObject { + asset: string; + feed: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetFeedEvent = TypedEvent<[string, string], SetFeedEventObject>; - -export type SetFeedEventFilter = TypedEventFilter; -export interface SetPriceStalenessThresholdEventObject { - oldPriceStalenessThreshold: BigNumber; - newPriceStalenessThreshold: BigNumber; +export namespace SetPriceStalenessThresholdEvent { + export type InputTuple = [ + oldPriceStalenessThreshold: BigNumberish, + newPriceStalenessThreshold: BigNumberish + ]; + export type OutputTuple = [ + oldPriceStalenessThreshold: bigint, + newPriceStalenessThreshold: bigint + ]; + export interface OutputObject { + oldPriceStalenessThreshold: bigint; + newPriceStalenessThreshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetPriceStalenessThresholdEvent = TypedEvent< - [BigNumber, BigNumber], - SetPriceStalenessThresholdEventObject ->; - -export type SetPriceStalenessThresholdEventFilter = - TypedEventFilter; export interface IChainlinkOperator extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IChainlinkOperator; + waitForDeployment(): Promise; interface: IChainlinkOperatorInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - pricePrecision(overrides?: CallOverrides): Promise<[BigNumber]>; - - pricePrecisionScalar(overrides?: CallOverrides): Promise<[BigNumber]>; - - priceStalenessThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string, string, boolean]>; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + deleteFeed: TypedContractMethod<[symbol: string], [void], "nonpayable">; + + getFeed: TypedContractMethod< + [symbol: string], + [[string, string, boolean]], + "view" + >; + + getNormalizedPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + getPrice: TypedContractMethod<[symbol: string], [bigint], "view">; + + pricePrecision: TypedContractMethod<[], [bigint], "view">; + + pricePrecisionScalar: TypedContractMethod<[], [bigint], "view">; + + priceStalenessThreshold: TypedContractMethod<[], [bigint], "view">; + + setFeed: TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + + setPriceStalenessThreshold: TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "deleteFeed" + ): TypedContractMethod<[symbol: string], [void], "nonpayable">; + getFunction( + nameOrSignature: "getFeed" + ): TypedContractMethod<[symbol: string], [[string, string, boolean]], "view">; + getFunction( + nameOrSignature: "getNormalizedPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "getPrice" + ): TypedContractMethod<[symbol: string], [bigint], "view">; + getFunction( + nameOrSignature: "pricePrecision" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "pricePrecisionScalar" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "priceStalenessThreshold" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "setFeed" + ): TypedContractMethod< + [asset: AddressLike, feed: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setPriceStalenessThreshold" + ): TypedContractMethod< + [newPriceStalenessThreshold: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "DeleteFeed" + ): TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + getEvent( + key: "SetFeed" + ): TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + getEvent( + key: "SetPriceStalenessThreshold" + ): TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; filters: { - "DeleteFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - DeleteFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): DeleteFeedEventFilter; - - "SetFeed(address,address)"( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - SetFeed( - asset?: PromiseOrValue | null, - feed?: PromiseOrValue | null - ): SetFeedEventFilter; - - "SetPriceStalenessThreshold(uint256,uint256)"( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - SetPriceStalenessThreshold( - oldPriceStalenessThreshold?: null, - newPriceStalenessThreshold?: null - ): SetPriceStalenessThresholdEventFilter; - }; - - estimateGas: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar(overrides?: CallOverrides): Promise; - - priceStalenessThreshold(overrides?: CallOverrides): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - deleteFeed( - symbol: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getFeed( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getNormalizedPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getPrice( - symbol: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - pricePrecision(overrides?: CallOverrides): Promise; - - pricePrecisionScalar( - overrides?: CallOverrides - ): Promise; - - priceStalenessThreshold( - overrides?: CallOverrides - ): Promise; - - setFeed( - asset: PromiseOrValue, - feed: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setPriceStalenessThreshold( - newPriceStalenessThreshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "DeleteFeed(address,address)": TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + DeleteFeed: TypedContractEvent< + DeleteFeedEvent.InputTuple, + DeleteFeedEvent.OutputTuple, + DeleteFeedEvent.OutputObject + >; + + "SetFeed(address,address)": TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + SetFeed: TypedContractEvent< + SetFeedEvent.InputTuple, + SetFeedEvent.OutputTuple, + SetFeedEvent.OutputObject + >; + + "SetPriceStalenessThreshold(uint256,uint256)": TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; + SetPriceStalenessThreshold: TypedContractEvent< + SetPriceStalenessThresholdEvent.InputTuple, + SetPriceStalenessThresholdEvent.OutputTuple, + SetPriceStalenessThresholdEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/@prb/contracts/access/IOwnable.ts b/packages/proxy-target/src/types/@prb/contracts/access/IOwnable.ts index 249b973a..9991d058 100644 --- a/packages/proxy-target/src/types/@prb/contracts/access/IOwnable.ts +++ b/packages/proxy-target/src/types/@prb/contracts/access/IOwnable.ts @@ -3,50 +3,39 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../common"; -export interface IOwnableInterface extends utils.Interface { - functions: { - "_renounceOwnership()": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IOwnableInterface extends Interface { getFunction( - nameOrSignatureOrTopic: - | "_renounceOwnership" - | "_transferOwnership" - | "owner" + nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; + encodeFunctionData( functionFragment: "_renounceOwnership", values?: undefined ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -59,121 +48,106 @@ export interface IOwnableInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IOwnable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IOwnable; + waitForDeployment(): Promise; interface: IOwnableInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _renounceOwnership(overrides?: CallOverrides): Promise; + ): 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; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; - owner(overrides?: CallOverrides): Promise; - }; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20.ts b/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20.ts index 6e2011b4..bd2fe3fa 100644 --- a/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20.ts +++ b/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20.ts @@ -3,47 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20Interface extends utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - +export interface IErc20Interface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "allowance" | "approve" | "balanceOf" @@ -57,26 +39,28 @@ export interface IErc20Interface extends utils.Interface { | "transferFrom" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -86,15 +70,11 @@ export interface IErc20Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; @@ -120,345 +100,231 @@ export interface IErc20Interface extends utils.Interface { functionFragment: "transferFrom", data: BytesLike ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IErc20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20; + waitForDeployment(): Promise; interface: IErc20Interface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20Permit.ts b/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20Permit.ts index 8c497255..7a9333d8 100644 --- a/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20Permit.ts +++ b/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20Permit.ts @@ -3,52 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20PermitInterface extends utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "PERMIT_TYPEHASH()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "version()": FunctionFragment; - }; - +export interface IErc20PermitInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "DOMAIN_SEPARATOR" | "PERMIT_TYPEHASH" | "allowance" @@ -67,6 +44,8 @@ export interface IErc20PermitInterface extends utils.Interface { | "version" ): FunctionFragment; + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -77,40 +56,37 @@ export interface IErc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "allowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; encodeFunctionData( functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "balanceOf", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "decreaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "increaseAllowance", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "nonces", - values: [PromiseOrValue] - ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; encodeFunctionData( functionFragment: "permit", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike ] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; @@ -120,15 +96,11 @@ export interface IErc20PermitInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "transfer", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData(functionFragment: "version", values?: undefined): string; @@ -166,455 +138,280 @@ export interface IErc20PermitInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export interface ApprovalEventObject { - owner: string; - spender: string; - amount: BigNumber; +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; + export interface OutputObject { + owner: string; + spender: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; -export type ApprovalEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - amount: BigNumber; +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, amount: bigint]; + export interface OutputObject { + from: string; + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; export interface IErc20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20Permit; + waitForDeployment(): Promise; interface: IErc20PermitInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise<[string]>; - }; + ): 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; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + PERMIT_TYPEHASH: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + decreaseAllowance: TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + increaseAllowance: TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + version: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "PERMIT_TYPEHASH" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "decreaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, subtractedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "increaseAllowance" + ): TypedContractMethod< + [spender: AddressLike, addedAmount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nonces" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [sender: AddressLike, recipient: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - spender?: PromiseOrValue | null, - amount?: null - ): ApprovalEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - amount?: null - ): TransferEventFilter; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - - allowance( - owner: PromiseOrValue, - spender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - spender: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: PromiseOrValue, - subtractedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - increaseAllowance( - spender: PromiseOrValue, - addedAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - permit( - owner: PromiseOrValue, - spender: PromiseOrValue, - value: PromiseOrValue, - deadline: PromiseOrValue, - v: PromiseOrValue, - r: PromiseOrValue, - s: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - sender: PromiseOrValue, - recipient: PromiseOrValue, - amount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - version(overrides?: CallOverrides): Promise; + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20Recover.ts b/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20Recover.ts index db433f4a..f259b269 100644 --- a/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20Recover.ts +++ b/packages/proxy-target/src/types/@prb/contracts/token/erc20/IErc20Recover.ts @@ -3,42 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../../../common"; -export interface IErc20RecoverInterface extends utils.Interface { - functions: { - "_recover(address,uint256)": FunctionFragment; - "_renounceOwnership()": FunctionFragment; - "_setNonRecoverableTokens(address[])": FunctionFragment; - "_transferOwnership(address)": FunctionFragment; - "nonRecoverableTokens(uint256)": FunctionFragment; - "owner()": FunctionFragment; - }; - +export interface IErc20RecoverInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "_recover" | "_renounceOwnership" | "_setNonRecoverableTokens" @@ -47,9 +34,16 @@ export interface IErc20RecoverInterface extends utils.Interface { | "owner" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: + | "Recover" + | "SetNonRecoverableTokens" + | "TransferOwnership" + ): EventFragment; + encodeFunctionData( functionFragment: "_recover", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "_renounceOwnership", @@ -57,15 +51,15 @@ export interface IErc20RecoverInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "_setNonRecoverableTokens", - values: [PromiseOrValue[]] + values: [AddressLike[]] ): string; encodeFunctionData( functionFragment: "_transferOwnership", - values: [PromiseOrValue] + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "nonRecoverableTokens", - values: [PromiseOrValue] + values: [BigNumberish] ): string; encodeFunctionData(functionFragment: "owner", values?: undefined): string; @@ -87,249 +81,211 @@ export interface IErc20RecoverInterface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - - events: { - "Recover(address,address,uint256)": EventFragment; - "SetNonRecoverableTokens(address,address[])": EventFragment; - "TransferOwnership(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Recover"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SetNonRecoverableTokens"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment; } -export interface RecoverEventObject { - owner: string; - token: string; - recoverAmount: BigNumber; +export namespace RecoverEvent { + export type InputTuple = [ + owner: AddressLike, + token: AddressLike, + recoverAmount: BigNumberish + ]; + export type OutputTuple = [ + owner: string, + token: string, + recoverAmount: bigint + ]; + export interface OutputObject { + owner: string; + token: string; + recoverAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type RecoverEvent = TypedEvent< - [string, string, BigNumber], - RecoverEventObject ->; - -export type RecoverEventFilter = TypedEventFilter; -export interface SetNonRecoverableTokensEventObject { - owner: string; - nonRecoverableTokens: string[]; +export namespace SetNonRecoverableTokensEvent { + export type InputTuple = [ + owner: AddressLike, + nonRecoverableTokens: AddressLike[] + ]; + export type OutputTuple = [owner: string, nonRecoverableTokens: string[]]; + export interface OutputObject { + owner: string; + nonRecoverableTokens: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type SetNonRecoverableTokensEvent = TypedEvent< - [string, string[]], - SetNonRecoverableTokensEventObject ->; -export type SetNonRecoverableTokensEventFilter = - TypedEventFilter; - -export interface TransferOwnershipEventObject { - oldOwner: string; - newOwner: string; +export namespace TransferOwnershipEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type TransferOwnershipEvent = TypedEvent< - [string, string], - TransferOwnershipEventObject ->; - -export type TransferOwnershipEventFilter = - TypedEventFilter; export interface IErc20Recover extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IErc20Recover; + waitForDeployment(): Promise; interface: IErc20RecoverInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - }; - - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - callStatic: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - _renounceOwnership(overrides?: CallOverrides): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + _recover: TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + + _renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + _setNonRecoverableTokens: TypedContractMethod< + [tokens: AddressLike[]], + [void], + "nonpayable" + >; + + _transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + nonRecoverableTokens: TypedContractMethod< + [index: BigNumberish], + [string], + "view" + >; + + owner: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; - owner(overrides?: CallOverrides): Promise; - }; + getFunction( + nameOrSignature: "_recover" + ): TypedContractMethod< + [token: AddressLike, recoverAmount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "_renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "_setNonRecoverableTokens" + ): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">; + getFunction( + nameOrSignature: "_transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "nonRecoverableTokens" + ): TypedContractMethod<[index: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "Recover" + ): TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + getEvent( + key: "SetNonRecoverableTokens" + ): TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + getEvent( + key: "TransferOwnership" + ): TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; filters: { - "Recover(address,address,uint256)"( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - Recover( - owner?: PromiseOrValue | null, - token?: null, - recoverAmount?: null - ): RecoverEventFilter; - - "SetNonRecoverableTokens(address,address[])"( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - SetNonRecoverableTokens( - owner?: PromiseOrValue | null, - nonRecoverableTokens?: null - ): SetNonRecoverableTokensEventFilter; - - "TransferOwnership(address,address)"( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - TransferOwnership( - oldOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): TransferOwnershipEventFilter; - }; - - estimateGas: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - _recover( - token: PromiseOrValue, - recoverAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _setNonRecoverableTokens( - tokens: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - _transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - nonRecoverableTokens( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; + "Recover(address,address,uint256)": TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + Recover: TypedContractEvent< + RecoverEvent.InputTuple, + RecoverEvent.OutputTuple, + RecoverEvent.OutputObject + >; + + "SetNonRecoverableTokens(address,address[])": TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + SetNonRecoverableTokens: TypedContractEvent< + SetNonRecoverableTokensEvent.InputTuple, + SetNonRecoverableTokensEvent.OutputTuple, + SetNonRecoverableTokensEvent.OutputObject + >; + + "TransferOwnership(address,address)": TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; + TransferOwnership: TypedContractEvent< + TransferOwnershipEvent.InputTuple, + TransferOwnershipEvent.OutputTuple, + TransferOwnershipEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/common.ts b/packages/proxy-target/src/types/common.ts index 4c90b08b..56b5f21e 100644 --- a/packages/proxy-target/src/types/common.ts +++ b/packages/proxy-target/src/types/common.ts @@ -1,33 +1,66 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import type { Listener } from "@ethersproject/providers"; -import type { Event, EventFilter } from "ethers"; - -export interface TypedEvent< - TArgsArray extends Array = any, - TArgsObject = any -> extends Event { - args: TArgsArray & TArgsObject; -} +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from "ethers"; -export interface TypedEventFilter<_TEvent extends TypedEvent> - extends EventFilter {} +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> + extends DeferredTopicFilter {} -export interface TypedListener { - (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any +> { + (...args: Partial): TypedDeferredTopicFilter< + TypedContractEvent + >; + name: string; + fragment: EventFragment; + getFragment(...args: Partial): EventFragment; } -type __TypechainArgsArray = T extends TypedEvent ? U : never; +type __TypechainAOutputTuple = T extends TypedContractEvent< + infer _U, + infer W +> + ? W + : never; +type __TypechainOutputObject = T extends TypedContractEvent< + infer _U, + infer _W, + infer V +> + ? V + : never; -export interface OnEvent { - ( - eventFilter: TypedEventFilter, - listener: TypedListener - ): TRes; - (eventName: string, listener: Listener): TRes; +export interface TypedEventLog + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; } +export interface TypedLogDescription + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export type TypedListener = ( + ...listenerArg: [ + ...__TypechainAOutputTuple, + TypedEventLog, + ...undefined[] + ] +) => void; + export type MinEthersFactory = { deploy(...a: ARGS[]): Promise; }; @@ -38,9 +71,61 @@ export type GetContractTypeFromFactory = F extends MinEthersFactory< > ? C : never; - export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; -export type PromiseOrValue = T | Promise; +export type StateMutability = "nonpayable" | "payable" | "view"; + +export type BaseOverrides = Omit; +export type NonPayableOverrides = Omit< + BaseOverrides, + "value" | "blockTag" | "enableCcipRead" +>; +export type PayableOverrides = Omit< + BaseOverrides, + "blockTag" | "enableCcipRead" +>; +export type ViewOverrides = Omit; +export type Overrides = S extends "nonpayable" + ? NonPayableOverrides + : S extends "payable" + ? PayableOverrides + : ViewOverrides; + +export type PostfixOverrides, S extends StateMutability> = + | A + | [...A, Overrides]; +export type ContractMethodArgs< + A extends Array, + S extends StateMutability +> = PostfixOverrides<{ [I in keyof A]-?: A[I] | Typed }, S>; + +export type DefaultReturnType = R extends Array ? R[0] : R; + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod< + A extends Array = Array, + R = any, + S extends StateMutability = "payable" +> { + (...args: ContractMethodArgs): S extends "view" + ? Promise> + : Promise; + + name: string; + + fragment: FunctionFragment; + + getFragment(...args: ContractMethodArgs): FunctionFragment; + + populateTransaction( + ...args: ContractMethodArgs + ): Promise; + staticCall( + ...args: ContractMethodArgs + ): Promise>; + send(...args: ContractMethodArgs): Promise; + estimateGas(...args: ContractMethodArgs): Promise; + staticCallResult(...args: ContractMethodArgs): Promise; +} diff --git a/packages/proxy-target/src/types/contracts/HifiProxyTarget.ts b/packages/proxy-target/src/types/contracts/HifiProxyTarget.ts index 1aaf4b23..34cd024d 100644 --- a/packages/proxy-target/src/types/contracts/HifiProxyTarget.ts +++ b/packages/proxy-target/src/types/contracts/HifiProxyTarget.ts @@ -3,63 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../common"; -export interface HifiProxyTargetInterface extends utils.Interface { - functions: { - "borrowHTokenAndBuyUnderlying(address,address,uint256,uint256)": FunctionFragment; - "buyHTokenAndRepayBorrow(address,address,uint256,uint256)": FunctionFragment; - "buyHTokenAndRepayBorrowWithSignature(address,address,uint256,uint256,uint256,bytes)": FunctionFragment; - "depositCollateral(address,address,uint256)": FunctionFragment; - "depositCollateralWithSignature(address,address,uint256,uint256,bytes)": FunctionFragment; - "depositUnderlyingAndMintHTokenAndAddLiquidity(address,uint256,uint256)": FunctionFragment; - "depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature(address,uint256,uint256,uint256,bytes)": FunctionFragment; - "depositUnderlyingAndRepayBorrow(address,address,uint256)": FunctionFragment; - "depositUnderlyingAndRepayBorrowWithSignature(address,address,uint256,uint256,bytes)": FunctionFragment; - "redeem(address,uint256,uint256)": FunctionFragment; - "redeemWithSignature(address,uint256,uint256,uint256,bytes)": FunctionFragment; - "removeLiquidity(address,uint256)": FunctionFragment; - "removeLiquidityAndRedeem(address,uint256)": FunctionFragment; - "removeLiquidityAndRedeemWithSignature(address,uint256,uint256,bytes)": FunctionFragment; - "removeLiquidityAndWithdrawUnderlying(address,uint256,uint256)": FunctionFragment; - "removeLiquidityAndWithdrawUnderlyingWithSignature(address,uint256,uint256,uint256,bytes)": FunctionFragment; - "removeLiquidityWithSignature(address,uint256,uint256,bytes)": FunctionFragment; - "sellHToken(address,uint256,uint256)": FunctionFragment; - "sellHTokenWithSignature(address,uint256,uint256,uint256,bytes)": FunctionFragment; - "sellUnderlying(address,uint256,uint256)": FunctionFragment; - "sellUnderlyingAndRepayBorrow(address,address,uint256,uint256)": FunctionFragment; - "sellUnderlyingAndRepayBorrowWithSignature(address,address,uint256,uint256,uint256,bytes)": FunctionFragment; - "sellUnderlyingWithSignature(address,uint256,uint256,uint256,bytes)": FunctionFragment; - "withdrawCollateral(address,address,uint256)": FunctionFragment; - "withdrawCollateralAndUnwrapWeth(address,address,uint256)": FunctionFragment; - "wrapEthAndDepositCollateral(address,address)": FunctionFragment; - }; - +export interface HifiProxyTargetInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "borrowHTokenAndBuyUnderlying" | "buyHTokenAndRepayBorrow" | "buyHTokenAndRepayBorrowWithSignature" @@ -88,226 +54,127 @@ export interface HifiProxyTargetInterface extends utils.Interface { | "wrapEthAndDepositCollateral" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "BorrowHTokenAndBuyUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "borrowHTokenAndBuyUnderlying", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "buyHTokenAndRepayBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "buyHTokenAndRepayBorrowWithSignature", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike ] ): string; encodeFunctionData( functionFragment: "depositCollateral", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositCollateralWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "depositUnderlyingAndMintHTokenAndAddLiquidity", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "depositUnderlyingAndRepayBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlyingAndRepayBorrowWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "redeem", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "redeemWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "removeLiquidity", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "removeLiquidityAndRedeem", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "removeLiquidityAndRedeemWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "removeLiquidityAndWithdrawUnderlying", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "removeLiquidityAndWithdrawUnderlyingWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "removeLiquidityWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "sellHToken", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "sellHTokenWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "sellUnderlying", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "sellUnderlyingAndRepayBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "sellUnderlyingAndRepayBorrowWithSignature", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike ] ): string; encodeFunctionData( functionFragment: "sellUnderlyingWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "withdrawCollateral", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "withdrawCollateralAndUnwrapWeth", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "wrapEthAndDepositCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; decodeFunctionResult( @@ -408,1093 +275,668 @@ export interface HifiProxyTargetInterface extends utils.Interface { functionFragment: "wrapEthAndDepositCollateral", data: BytesLike ): Result; - - events: { - "BorrowHTokenAndBuyUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent( - nameOrSignatureOrTopic: "BorrowHTokenAndBuyUnderlying" - ): EventFragment; } -export interface BorrowHTokenAndBuyUnderlyingEventObject { - borrower: string; - borrowAmount: BigNumber; - underlyingAmount: BigNumber; +export namespace BorrowHTokenAndBuyUnderlyingEvent { + export type InputTuple = [ + borrower: AddressLike, + borrowAmount: BigNumberish, + underlyingAmount: BigNumberish + ]; + export type OutputTuple = [ + borrower: string, + borrowAmount: bigint, + underlyingAmount: bigint + ]; + export interface OutputObject { + borrower: string; + borrowAmount: bigint; + underlyingAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BorrowHTokenAndBuyUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - BorrowHTokenAndBuyUnderlyingEventObject ->; - -export type BorrowHTokenAndBuyUnderlyingEventFilter = - TypedEventFilter; export interface HifiProxyTarget extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): HifiProxyTarget; + waitForDeployment(): Promise; interface: HifiProxyTargetInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - borrowHTokenAndBuyUnderlying( - balanceSheet: PromiseOrValue, - hifiPool: PromiseOrValue, - maxBorrowAmount: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateralWithSignature( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureCollateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidity( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrow( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrowWithSignature( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeemWithSignature( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidity( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeem( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeemWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlying( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlyingWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHTokenWithSignature( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingWithSignature( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateralAndUnwrapWeth( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapEthAndDepositCollateral( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - borrowHTokenAndBuyUnderlying( - balanceSheet: PromiseOrValue, - hifiPool: PromiseOrValue, - maxBorrowAmount: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateralWithSignature( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureCollateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidity( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrow( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrowWithSignature( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeemWithSignature( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidity( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeem( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeemWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlying( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlyingWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHTokenWithSignature( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingWithSignature( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateralAndUnwrapWeth( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapEthAndDepositCollateral( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - borrowHTokenAndBuyUnderlying( - balanceSheet: PromiseOrValue, - hifiPool: PromiseOrValue, - maxBorrowAmount: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyHTokenAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyHTokenAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositCollateralWithSignature( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureCollateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidity( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlyingAndRepayBorrow( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlyingAndRepayBorrowWithSignature( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeemWithSignature( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidityAndRedeem( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidityAndRedeemWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidityAndWithdrawUnderlying( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidityAndWithdrawUnderlyingWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidityWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellHToken( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellHTokenWithSignature( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlying( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlyingAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlyingAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlyingWithSignature( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdrawCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + borrowHTokenAndBuyUnderlying: TypedContractMethod< + [ + balanceSheet: AddressLike, + hifiPool: AddressLike, + maxBorrowAmount: BigNumberish, + underlyingOut: BigNumberish + ], + [void], + "nonpayable" + >; + + buyHTokenAndRepayBorrow: TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + maxUnderlyingIn: BigNumberish, + hTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + + buyHTokenAndRepayBorrowWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + maxUnderlyingIn: BigNumberish, + hTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + + depositCollateral: TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + depositAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + depositCollateralWithSignature: TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + depositAmount: BigNumberish, + deadline: BigNumberish, + signatureCollateral: BytesLike + ], + [void], + "nonpayable" + >; + + depositUnderlyingAndMintHTokenAndAddLiquidity: TypedContractMethod< + [ + hifiPool: AddressLike, + depositAmount: BigNumberish, + underlyingOffered: BigNumberish + ], + [void], + "nonpayable" + >; + + depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + depositAmount: BigNumberish, + underlyingOffered: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + + depositUnderlyingAndRepayBorrow: TypedContractMethod< + [ + hToken: AddressLike, + balanceSheet: AddressLike, + underlyingAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + depositUnderlyingAndRepayBorrowWithSignature: TypedContractMethod< + [ + hToken: AddressLike, + balanceSheet: AddressLike, + underlyingAmount: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [ + hToken: AddressLike, + hTokenAmount: BigNumberish, + underlyingAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + redeemWithSignature: TypedContractMethod< + [ + hToken: AddressLike, + hTokenAmount: BigNumberish, + underlyingAmount: BigNumberish, + deadline: BigNumberish, + signatureHToken: BytesLike + ], + [void], + "nonpayable" + >; + + removeLiquidity: TypedContractMethod< + [hifiPool: AddressLike, poolTokensBurned: BigNumberish], + [void], + "nonpayable" + >; + + removeLiquidityAndRedeem: TypedContractMethod< + [hifiPool: AddressLike, poolTokensBurned: BigNumberish], + [void], + "nonpayable" + >; + + removeLiquidityAndRedeemWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + + removeLiquidityAndWithdrawUnderlying: TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + removeLiquidityAndWithdrawUnderlyingWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + withdrawAmount: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + + removeLiquidityWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + + sellHToken: TypedContractMethod< + [ + hifiPool: AddressLike, + hTokenIn: BigNumberish, + minUnderlyingOut: BigNumberish + ], + [void], + "nonpayable" + >; + + sellHTokenWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + hTokenIn: BigNumberish, + minUnderlyingOut: BigNumberish, + deadline: BigNumberish, + signatureHToken: BytesLike + ], + [void], + "nonpayable" + >; + + sellUnderlying: TypedContractMethod< + [ + hifiPool: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + + sellUnderlyingAndRepayBorrow: TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + + sellUnderlyingAndRepayBorrowWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + + sellUnderlyingWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + + withdrawCollateral: TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + withdrawCollateralAndUnwrapWeth: TypedContractMethod< + [ + weth: AddressLike, + balanceSheet: AddressLike, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + wrapEthAndDepositCollateral: TypedContractMethod< + [weth: AddressLike, balanceSheet: AddressLike], + [void], + "payable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - withdrawCollateralAndUnwrapWeth( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "borrowHTokenAndBuyUnderlying" + ): TypedContractMethod< + [ + balanceSheet: AddressLike, + hifiPool: AddressLike, + maxBorrowAmount: BigNumberish, + underlyingOut: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyHTokenAndRepayBorrow" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + maxUnderlyingIn: BigNumberish, + hTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyHTokenAndRepayBorrowWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + maxUnderlyingIn: BigNumberish, + hTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateral" + ): TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + depositAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateralWithSignature" + ): TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + depositAmount: BigNumberish, + deadline: BigNumberish, + signatureCollateral: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlyingAndMintHTokenAndAddLiquidity" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + depositAmount: BigNumberish, + underlyingOffered: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + depositAmount: BigNumberish, + underlyingOffered: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlyingAndRepayBorrow" + ): TypedContractMethod< + [ + hToken: AddressLike, + balanceSheet: AddressLike, + underlyingAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlyingAndRepayBorrowWithSignature" + ): TypedContractMethod< + [ + hToken: AddressLike, + balanceSheet: AddressLike, + underlyingAmount: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [ + hToken: AddressLike, + hTokenAmount: BigNumberish, + underlyingAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeemWithSignature" + ): TypedContractMethod< + [ + hToken: AddressLike, + hTokenAmount: BigNumberish, + underlyingAmount: BigNumberish, + deadline: BigNumberish, + signatureHToken: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidity" + ): TypedContractMethod< + [hifiPool: AddressLike, poolTokensBurned: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidityAndRedeem" + ): TypedContractMethod< + [hifiPool: AddressLike, poolTokensBurned: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidityAndRedeemWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidityAndWithdrawUnderlying" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidityAndWithdrawUnderlyingWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + withdrawAmount: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidityWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellHToken" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + hTokenIn: BigNumberish, + minUnderlyingOut: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellHTokenWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + hTokenIn: BigNumberish, + minUnderlyingOut: BigNumberish, + deadline: BigNumberish, + signatureHToken: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlying" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlyingAndRepayBorrow" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlyingAndRepayBorrowWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlyingWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "withdrawCollateralAndUnwrapWeth" + ): TypedContractMethod< + [ + weth: AddressLike, + balanceSheet: AddressLike, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "wrapEthAndDepositCollateral" + ): TypedContractMethod< + [weth: AddressLike, balanceSheet: AddressLike], + [void], + "payable" + >; - wrapEthAndDepositCollateral( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "BorrowHTokenAndBuyUnderlying" + ): TypedContractEvent< + BorrowHTokenAndBuyUnderlyingEvent.InputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputObject + >; filters: { - "BorrowHTokenAndBuyUnderlying(address,uint256,uint256)"( - borrower?: PromiseOrValue | null, - borrowAmount?: null, - underlyingAmount?: null - ): BorrowHTokenAndBuyUnderlyingEventFilter; - BorrowHTokenAndBuyUnderlying( - borrower?: PromiseOrValue | null, - borrowAmount?: null, - underlyingAmount?: null - ): BorrowHTokenAndBuyUnderlyingEventFilter; - }; - - estimateGas: { - borrowHTokenAndBuyUnderlying( - balanceSheet: PromiseOrValue, - hifiPool: PromiseOrValue, - maxBorrowAmount: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateralWithSignature( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureCollateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidity( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrow( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrowWithSignature( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeemWithSignature( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidity( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeem( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeemWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlying( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlyingWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHTokenWithSignature( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingWithSignature( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateralAndUnwrapWeth( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapEthAndDepositCollateral( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - borrowHTokenAndBuyUnderlying( - balanceSheet: PromiseOrValue, - hifiPool: PromiseOrValue, - maxBorrowAmount: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateralWithSignature( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureCollateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidity( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrow( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrowWithSignature( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeemWithSignature( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidity( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeem( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeemWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlying( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlyingWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHTokenWithSignature( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingWithSignature( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateralAndUnwrapWeth( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapEthAndDepositCollateral( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + "BorrowHTokenAndBuyUnderlying(address,uint256,uint256)": TypedContractEvent< + BorrowHTokenAndBuyUnderlyingEvent.InputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputObject + >; + BorrowHTokenAndBuyUnderlying: TypedContractEvent< + BorrowHTokenAndBuyUnderlyingEvent.InputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/contracts/IHifiProxyTarget.ts b/packages/proxy-target/src/types/contracts/IHifiProxyTarget.ts index aeaaacd8..80f66644 100644 --- a/packages/proxy-target/src/types/contracts/IHifiProxyTarget.ts +++ b/packages/proxy-target/src/types/contracts/IHifiProxyTarget.ts @@ -3,63 +3,29 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result, + Interface, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../common"; -export interface IHifiProxyTargetInterface extends utils.Interface { - functions: { - "borrowHTokenAndBuyUnderlying(address,address,uint256,uint256)": FunctionFragment; - "buyHTokenAndRepayBorrow(address,address,uint256,uint256)": FunctionFragment; - "buyHTokenAndRepayBorrowWithSignature(address,address,uint256,uint256,uint256,bytes)": FunctionFragment; - "depositCollateral(address,address,uint256)": FunctionFragment; - "depositCollateralWithSignature(address,address,uint256,uint256,bytes)": FunctionFragment; - "depositUnderlyingAndMintHTokenAndAddLiquidity(address,uint256,uint256)": FunctionFragment; - "depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature(address,uint256,uint256,uint256,bytes)": FunctionFragment; - "depositUnderlyingAndRepayBorrow(address,address,uint256)": FunctionFragment; - "depositUnderlyingAndRepayBorrowWithSignature(address,address,uint256,uint256,bytes)": FunctionFragment; - "redeem(address,uint256,uint256)": FunctionFragment; - "redeemWithSignature(address,uint256,uint256,uint256,bytes)": FunctionFragment; - "removeLiquidity(address,uint256)": FunctionFragment; - "removeLiquidityAndRedeem(address,uint256)": FunctionFragment; - "removeLiquidityAndRedeemWithSignature(address,uint256,uint256,bytes)": FunctionFragment; - "removeLiquidityAndWithdrawUnderlying(address,uint256,uint256)": FunctionFragment; - "removeLiquidityAndWithdrawUnderlyingWithSignature(address,uint256,uint256,uint256,bytes)": FunctionFragment; - "removeLiquidityWithSignature(address,uint256,uint256,bytes)": FunctionFragment; - "sellHToken(address,uint256,uint256)": FunctionFragment; - "sellHTokenWithSignature(address,uint256,uint256,uint256,bytes)": FunctionFragment; - "sellUnderlying(address,uint256,uint256)": FunctionFragment; - "sellUnderlyingAndRepayBorrow(address,address,uint256,uint256)": FunctionFragment; - "sellUnderlyingAndRepayBorrowWithSignature(address,address,uint256,uint256,uint256,bytes)": FunctionFragment; - "sellUnderlyingWithSignature(address,uint256,uint256,uint256,bytes)": FunctionFragment; - "withdrawCollateral(address,address,uint256)": FunctionFragment; - "withdrawCollateralAndUnwrapWeth(address,address,uint256)": FunctionFragment; - "wrapEthAndDepositCollateral(address,address)": FunctionFragment; - }; - +export interface IHifiProxyTargetInterface extends Interface { getFunction( - nameOrSignatureOrTopic: + nameOrSignature: | "borrowHTokenAndBuyUnderlying" | "buyHTokenAndRepayBorrow" | "buyHTokenAndRepayBorrowWithSignature" @@ -88,226 +54,127 @@ export interface IHifiProxyTargetInterface extends utils.Interface { | "wrapEthAndDepositCollateral" ): FunctionFragment; + getEvent( + nameOrSignatureOrTopic: "BorrowHTokenAndBuyUnderlying" + ): EventFragment; + encodeFunctionData( functionFragment: "borrowHTokenAndBuyUnderlying", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "buyHTokenAndRepayBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "buyHTokenAndRepayBorrowWithSignature", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike ] ): string; encodeFunctionData( functionFragment: "depositCollateral", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositCollateralWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "depositUnderlyingAndMintHTokenAndAddLiquidity", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "depositUnderlyingAndRepayBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "depositUnderlyingAndRepayBorrowWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "redeem", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "redeemWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "removeLiquidity", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "removeLiquidityAndRedeem", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "removeLiquidityAndRedeemWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "removeLiquidityAndWithdrawUnderlying", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "removeLiquidityAndWithdrawUnderlyingWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "removeLiquidityWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "sellHToken", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "sellHTokenWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "sellUnderlying", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "sellUnderlyingAndRepayBorrow", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( functionFragment: "sellUnderlyingAndRepayBorrowWithSignature", values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike ] ): string; encodeFunctionData( functionFragment: "sellUnderlyingWithSignature", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike] ): string; encodeFunctionData( functionFragment: "withdrawCollateral", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "withdrawCollateralAndUnwrapWeth", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( functionFragment: "wrapEthAndDepositCollateral", - values: [PromiseOrValue, PromiseOrValue] + values: [AddressLike, AddressLike] ): string; decodeFunctionResult( @@ -408,1093 +275,668 @@ export interface IHifiProxyTargetInterface extends utils.Interface { functionFragment: "wrapEthAndDepositCollateral", data: BytesLike ): Result; - - events: { - "BorrowHTokenAndBuyUnderlying(address,uint256,uint256)": EventFragment; - }; - - getEvent( - nameOrSignatureOrTopic: "BorrowHTokenAndBuyUnderlying" - ): EventFragment; } -export interface BorrowHTokenAndBuyUnderlyingEventObject { - borrower: string; - borrowAmount: BigNumber; - underlyingAmount: BigNumber; +export namespace BorrowHTokenAndBuyUnderlyingEvent { + export type InputTuple = [ + borrower: AddressLike, + borrowAmount: BigNumberish, + underlyingAmount: BigNumberish + ]; + export type OutputTuple = [ + borrower: string, + borrowAmount: bigint, + underlyingAmount: bigint + ]; + export interface OutputObject { + borrower: string; + borrowAmount: bigint; + underlyingAmount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } -export type BorrowHTokenAndBuyUnderlyingEvent = TypedEvent< - [string, BigNumber, BigNumber], - BorrowHTokenAndBuyUnderlyingEventObject ->; - -export type BorrowHTokenAndBuyUnderlyingEventFilter = - TypedEventFilter; export interface IHifiProxyTarget extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): IHifiProxyTarget; + waitForDeployment(): Promise; interface: IHifiProxyTargetInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - borrowHTokenAndBuyUnderlying( - balanceSheet: PromiseOrValue, - hifiPool: PromiseOrValue, - maxBorrowAmount: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateralWithSignature( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureCollateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidity( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrow( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrowWithSignature( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeemWithSignature( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidity( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeem( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeemWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlying( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlyingWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHTokenWithSignature( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingWithSignature( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateralAndUnwrapWeth( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapEthAndDepositCollateral( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - borrowHTokenAndBuyUnderlying( - balanceSheet: PromiseOrValue, - hifiPool: PromiseOrValue, - maxBorrowAmount: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateralWithSignature( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureCollateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidity( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrow( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrowWithSignature( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeemWithSignature( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidity( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeem( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeemWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlying( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlyingWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHTokenWithSignature( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingWithSignature( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateralAndUnwrapWeth( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapEthAndDepositCollateral( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - borrowHTokenAndBuyUnderlying( - balanceSheet: PromiseOrValue, - hifiPool: PromiseOrValue, - maxBorrowAmount: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyHTokenAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - buyHTokenAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositCollateralWithSignature( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureCollateral: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidity( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlyingAndRepayBorrow( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositUnderlyingAndRepayBorrowWithSignature( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeem( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - redeemWithSignature( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidity( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidityAndRedeem( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidityAndRedeemWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidityAndWithdrawUnderlying( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidityAndWithdrawUnderlyingWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeLiquidityWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellHToken( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellHTokenWithSignature( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlying( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlyingAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlyingAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - sellUnderlyingWithSignature( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdrawCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): 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; + + borrowHTokenAndBuyUnderlying: TypedContractMethod< + [ + balanceSheet: AddressLike, + hifiPool: AddressLike, + maxBorrowAmount: BigNumberish, + underlyingOut: BigNumberish + ], + [void], + "nonpayable" + >; + + buyHTokenAndRepayBorrow: TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + maxUnderlyingIn: BigNumberish, + hTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + + buyHTokenAndRepayBorrowWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + maxUnderlyingIn: BigNumberish, + hTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + + depositCollateral: TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + depositAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + depositCollateralWithSignature: TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + depositAmount: BigNumberish, + deadline: BigNumberish, + signatureCollateral: BytesLike + ], + [void], + "nonpayable" + >; + + depositUnderlyingAndMintHTokenAndAddLiquidity: TypedContractMethod< + [ + hifiPool: AddressLike, + depositAmount: BigNumberish, + underlyingOffered: BigNumberish + ], + [void], + "nonpayable" + >; + + depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + depositAmount: BigNumberish, + underlyingOffered: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + + depositUnderlyingAndRepayBorrow: TypedContractMethod< + [ + hToken: AddressLike, + balanceSheet: AddressLike, + underlyingAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + depositUnderlyingAndRepayBorrowWithSignature: TypedContractMethod< + [ + hToken: AddressLike, + balanceSheet: AddressLike, + underlyingAmount: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + + redeem: TypedContractMethod< + [ + hToken: AddressLike, + hTokenAmount: BigNumberish, + underlyingAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + redeemWithSignature: TypedContractMethod< + [ + hToken: AddressLike, + hTokenAmount: BigNumberish, + underlyingAmount: BigNumberish, + deadline: BigNumberish, + signatureHToken: BytesLike + ], + [void], + "nonpayable" + >; + + removeLiquidity: TypedContractMethod< + [hifiPool: AddressLike, poolTokensBurned: BigNumberish], + [void], + "nonpayable" + >; + + removeLiquidityAndRedeem: TypedContractMethod< + [hifiPool: AddressLike, poolTokensBurned: BigNumberish], + [void], + "nonpayable" + >; + + removeLiquidityAndRedeemWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + + removeLiquidityAndWithdrawUnderlying: TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + removeLiquidityAndWithdrawUnderlyingWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + withdrawAmount: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + + removeLiquidityWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + + sellHToken: TypedContractMethod< + [ + hifiPool: AddressLike, + hTokenIn: BigNumberish, + minUnderlyingOut: BigNumberish + ], + [void], + "nonpayable" + >; + + sellHTokenWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + hTokenIn: BigNumberish, + minUnderlyingOut: BigNumberish, + deadline: BigNumberish, + signatureHToken: BytesLike + ], + [void], + "nonpayable" + >; + + sellUnderlying: TypedContractMethod< + [ + hifiPool: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + + sellUnderlyingAndRepayBorrow: TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + + sellUnderlyingAndRepayBorrowWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + + sellUnderlyingWithSignature: TypedContractMethod< + [ + hifiPool: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + + withdrawCollateral: TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + withdrawCollateralAndUnwrapWeth: TypedContractMethod< + [ + weth: AddressLike, + balanceSheet: AddressLike, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + + wrapEthAndDepositCollateral: TypedContractMethod< + [weth: AddressLike, balanceSheet: AddressLike], + [void], + "payable" + >; + + getFunction( + key: string | FunctionFragment + ): T; - withdrawCollateralAndUnwrapWeth( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getFunction( + nameOrSignature: "borrowHTokenAndBuyUnderlying" + ): TypedContractMethod< + [ + balanceSheet: AddressLike, + hifiPool: AddressLike, + maxBorrowAmount: BigNumberish, + underlyingOut: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyHTokenAndRepayBorrow" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + maxUnderlyingIn: BigNumberish, + hTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "buyHTokenAndRepayBorrowWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + maxUnderlyingIn: BigNumberish, + hTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateral" + ): TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + depositAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositCollateralWithSignature" + ): TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + depositAmount: BigNumberish, + deadline: BigNumberish, + signatureCollateral: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlyingAndMintHTokenAndAddLiquidity" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + depositAmount: BigNumberish, + underlyingOffered: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + depositAmount: BigNumberish, + underlyingOffered: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlyingAndRepayBorrow" + ): TypedContractMethod< + [ + hToken: AddressLike, + balanceSheet: AddressLike, + underlyingAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositUnderlyingAndRepayBorrowWithSignature" + ): TypedContractMethod< + [ + hToken: AddressLike, + balanceSheet: AddressLike, + underlyingAmount: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeem" + ): TypedContractMethod< + [ + hToken: AddressLike, + hTokenAmount: BigNumberish, + underlyingAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "redeemWithSignature" + ): TypedContractMethod< + [ + hToken: AddressLike, + hTokenAmount: BigNumberish, + underlyingAmount: BigNumberish, + deadline: BigNumberish, + signatureHToken: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidity" + ): TypedContractMethod< + [hifiPool: AddressLike, poolTokensBurned: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidityAndRedeem" + ): TypedContractMethod< + [hifiPool: AddressLike, poolTokensBurned: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidityAndRedeemWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidityAndWithdrawUnderlying" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidityAndWithdrawUnderlyingWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + withdrawAmount: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeLiquidityWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + poolTokensBurned: BigNumberish, + deadline: BigNumberish, + signatureLPToken: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellHToken" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + hTokenIn: BigNumberish, + minUnderlyingOut: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellHTokenWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + hTokenIn: BigNumberish, + minUnderlyingOut: BigNumberish, + deadline: BigNumberish, + signatureHToken: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlying" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlyingAndRepayBorrow" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlyingAndRepayBorrowWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + balanceSheet: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "sellUnderlyingWithSignature" + ): TypedContractMethod< + [ + hifiPool: AddressLike, + underlyingIn: BigNumberish, + minHTokenOut: BigNumberish, + deadline: BigNumberish, + signatureUnderlying: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [ + balanceSheet: AddressLike, + collateral: AddressLike, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "withdrawCollateralAndUnwrapWeth" + ): TypedContractMethod< + [ + weth: AddressLike, + balanceSheet: AddressLike, + withdrawAmount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "wrapEthAndDepositCollateral" + ): TypedContractMethod< + [weth: AddressLike, balanceSheet: AddressLike], + [void], + "payable" + >; - wrapEthAndDepositCollateral( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + getEvent( + key: "BorrowHTokenAndBuyUnderlying" + ): TypedContractEvent< + BorrowHTokenAndBuyUnderlyingEvent.InputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputObject + >; filters: { - "BorrowHTokenAndBuyUnderlying(address,uint256,uint256)"( - borrower?: PromiseOrValue | null, - borrowAmount?: null, - underlyingAmount?: null - ): BorrowHTokenAndBuyUnderlyingEventFilter; - BorrowHTokenAndBuyUnderlying( - borrower?: PromiseOrValue | null, - borrowAmount?: null, - underlyingAmount?: null - ): BorrowHTokenAndBuyUnderlyingEventFilter; - }; - - estimateGas: { - borrowHTokenAndBuyUnderlying( - balanceSheet: PromiseOrValue, - hifiPool: PromiseOrValue, - maxBorrowAmount: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateralWithSignature( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureCollateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidity( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrow( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrowWithSignature( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeemWithSignature( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidity( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeem( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeemWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlying( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlyingWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHTokenWithSignature( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingWithSignature( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateralAndUnwrapWeth( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapEthAndDepositCollateral( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - borrowHTokenAndBuyUnderlying( - balanceSheet: PromiseOrValue, - hifiPool: PromiseOrValue, - maxBorrowAmount: PromiseOrValue, - underlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - buyHTokenAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - maxUnderlyingIn: PromiseOrValue, - hTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositCollateralWithSignature( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - depositAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureCollateral: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidity( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndMintHTokenAndAddLiquidityWithSignature( - hifiPool: PromiseOrValue, - depositAmount: PromiseOrValue, - underlyingOffered: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrow( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - depositUnderlyingAndRepayBorrowWithSignature( - hToken: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeem( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - redeemWithSignature( - hToken: PromiseOrValue, - hTokenAmount: PromiseOrValue, - underlyingAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidity( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeem( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndRedeemWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlying( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityAndWithdrawUnderlyingWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - withdrawAmount: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - removeLiquidityWithSignature( - hifiPool: PromiseOrValue, - poolTokensBurned: PromiseOrValue, - deadline: PromiseOrValue, - signatureLPToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHToken( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellHTokenWithSignature( - hifiPool: PromiseOrValue, - hTokenIn: PromiseOrValue, - minUnderlyingOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureHToken: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlying( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrow( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingAndRepayBorrowWithSignature( - hifiPool: PromiseOrValue, - balanceSheet: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - sellUnderlyingWithSignature( - hifiPool: PromiseOrValue, - underlyingIn: PromiseOrValue, - minHTokenOut: PromiseOrValue, - deadline: PromiseOrValue, - signatureUnderlying: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateral( - balanceSheet: PromiseOrValue, - collateral: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawCollateralAndUnwrapWeth( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - wrapEthAndDepositCollateral( - weth: PromiseOrValue, - balanceSheet: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + "BorrowHTokenAndBuyUnderlying(address,uint256,uint256)": TypedContractEvent< + BorrowHTokenAndBuyUnderlyingEvent.InputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputObject + >; + BorrowHTokenAndBuyUnderlying: TypedContractEvent< + BorrowHTokenAndBuyUnderlyingEvent.InputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputTuple, + BorrowHTokenAndBuyUnderlyingEvent.OutputObject + >; }; } diff --git a/packages/proxy-target/src/types/contracts/external/WethInterface.ts b/packages/proxy-target/src/types/contracts/external/WethInterface.ts index d01aaf6f..3f2eb1da 100644 --- a/packages/proxy-target/src/types/contracts/external/WethInterface.ts +++ b/packages/proxy-target/src/types/contracts/external/WethInterface.ts @@ -3,123 +3,93 @@ /* eslint-disable */ import type { BaseContract, - BigNumber, BigNumberish, BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; import type { - TypedEventFilter, - TypedEvent, + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, TypedListener, - OnEvent, - PromiseOrValue, + TypedContractMethod, } from "../../common"; -export interface WethInterfaceInterface extends utils.Interface { - functions: { - "deposit()": FunctionFragment; - "withdraw(uint256)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "deposit" | "withdraw"): FunctionFragment; +export interface WethInterfaceInterface extends Interface { + getFunction(nameOrSignature: "deposit" | "withdraw"): FunctionFragment; encodeFunctionData(functionFragment: "deposit", values?: undefined): string; encodeFunctionData( functionFragment: "withdraw", - values: [PromiseOrValue] + values: [BigNumberish] ): string; decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; - - events: {}; } export interface WethInterface extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; + connect(runner?: ContractRunner | null): WethInterface; + waitForDeployment(): Promise; interface: WethInterfaceInterface; - queryFilter( - event: TypedEventFilter, + queryFilter( + event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - deposit( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - deposit( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - deposit(overrides?: CallOverrides): Promise; - - withdraw( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; + ): 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; + + deposit: TypedContractMethod<[], [void], "payable">; + + withdraw: TypedContractMethod<[arg0: BigNumberish], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "deposit" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "withdraw" + ): TypedContractMethod<[arg0: BigNumberish], [void], "nonpayable">; filters: {}; - - estimateGas: { - deposit( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - deposit( - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - withdraw( - arg0: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; } diff --git a/packages/proxy-target/src/types/factories/@hifi/amm/contracts/IHifiPool__factory.ts b/packages/proxy-target/src/types/factories/@hifi/amm/contracts/IHifiPool__factory.ts index f868082d..72f8c562 100644 --- a/packages/proxy-target/src/types/factories/@hifi/amm/contracts/IHifiPool__factory.ts +++ b/packages/proxy-target/src/types/factories/@hifi/amm/contracts/IHifiPool__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IHifiPool, IHifiPoolInterface, @@ -936,12 +935,9 @@ const _abi = [ export class IHifiPool__factory { static readonly abi = _abi; static createInterface(): IHifiPoolInterface { - return new utils.Interface(_abi) as IHifiPoolInterface; + return new Interface(_abi) as IHifiPoolInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IHifiPool { - return new Contract(address, _abi, signerOrProvider) as IHifiPool; + static connect(address: string, runner?: ContractRunner | null): IHifiPool { + return new Contract(address, _abi, runner) as unknown as IHifiPool; } } diff --git a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts index 1fc574b9..b2ac7751 100644 --- a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts +++ b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/access/IOwnableUpgradeable__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IOwnableUpgradeable, IOwnableUpgradeableInterface, @@ -88,12 +87,16 @@ const _abi = [ export class IOwnableUpgradeable__factory { static readonly abi = _abi; static createInterface(): IOwnableUpgradeableInterface { - return new utils.Interface(_abi) as IOwnableUpgradeableInterface; + return new Interface(_abi) as IOwnableUpgradeableInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IOwnableUpgradeable { - return new Contract(address, _abi, signerOrProvider) as IOwnableUpgradeable; + return new Contract( + address, + _abi, + runner + ) as unknown as IOwnableUpgradeable; } } diff --git a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts index a0acdb8b..40898d6e 100644 --- a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts +++ b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/balance-sheet/IBalanceSheetV2__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IBalanceSheetV2, IBalanceSheetV2Interface, @@ -935,12 +934,12 @@ const _abi = [ export class IBalanceSheetV2__factory { static readonly abi = _abi; static createInterface(): IBalanceSheetV2Interface { - return new utils.Interface(_abi) as IBalanceSheetV2Interface; + return new Interface(_abi) as IBalanceSheetV2Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IBalanceSheetV2 { - return new Contract(address, _abi, signerOrProvider) as IBalanceSheetV2; + return new Contract(address, _abi, runner) as unknown as IBalanceSheetV2; } } diff --git a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts index f2ac1393..c705c131 100644 --- a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts +++ b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/fintroller/IFintroller__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IFintroller, IFintrollerInterface, @@ -1090,12 +1089,9 @@ const _abi = [ export class IFintroller__factory { static readonly abi = _abi; static createInterface(): IFintrollerInterface { - return new utils.Interface(_abi) as IFintrollerInterface; + return new Interface(_abi) as IFintrollerInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IFintroller { - return new Contract(address, _abi, signerOrProvider) as IFintroller; + static connect(address: string, runner?: ContractRunner | null): IFintroller { + return new Contract(address, _abi, runner) as unknown as IFintroller; } } diff --git a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts index eddefb97..347415b4 100644 --- a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts +++ b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/core/h-token/IHToken__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IHToken, IHTokenInterface, @@ -1011,12 +1010,9 @@ const _abi = [ export class IHToken__factory { static readonly abi = _abi; static createInterface(): IHTokenInterface { - return new utils.Interface(_abi) as IHTokenInterface; + return new Interface(_abi) as IHTokenInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IHToken { - return new Contract(address, _abi, signerOrProvider) as IHToken; + static connect(address: string, runner?: ContractRunner | null): IHToken { + return new Contract(address, _abi, runner) as unknown as IHToken; } } diff --git a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts index e1523a24..f5accd9e 100644 --- a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts +++ b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/external/chainlink/IAggregatorV3__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IAggregatorV3, IAggregatorV3Interface, @@ -126,12 +125,12 @@ const _abi = [ export class IAggregatorV3__factory { static readonly abi = _abi; static createInterface(): IAggregatorV3Interface { - return new utils.Interface(_abi) as IAggregatorV3Interface; + return new Interface(_abi) as IAggregatorV3Interface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IAggregatorV3 { - return new Contract(address, _abi, signerOrProvider) as IAggregatorV3; + return new Contract(address, _abi, runner) as unknown as IAggregatorV3; } } diff --git a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts index 401ad9fb..66e49da1 100644 --- a/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts +++ b/packages/proxy-target/src/types/factories/@hifi/protocol/contracts/oracles/IChainlinkOperator__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IChainlinkOperator, IChainlinkOperatorInterface, @@ -271,12 +270,12 @@ const _abi = [ export class IChainlinkOperator__factory { static readonly abi = _abi; static createInterface(): IChainlinkOperatorInterface { - return new utils.Interface(_abi) as IChainlinkOperatorInterface; + return new Interface(_abi) as IChainlinkOperatorInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IChainlinkOperator { - return new Contract(address, _abi, signerOrProvider) as IChainlinkOperator; + return new Contract(address, _abi, runner) as unknown as IChainlinkOperator; } } diff --git a/packages/proxy-target/src/types/factories/@prb/contracts/access/IOwnable__factory.ts b/packages/proxy-target/src/types/factories/@prb/contracts/access/IOwnable__factory.ts index 19e3f14c..0c4b5713 100644 --- a/packages/proxy-target/src/types/factories/@prb/contracts/access/IOwnable__factory.ts +++ b/packages/proxy-target/src/types/factories/@prb/contracts/access/IOwnable__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IOwnable, IOwnableInterface, @@ -67,12 +66,9 @@ const _abi = [ export class IOwnable__factory { static readonly abi = _abi; static createInterface(): IOwnableInterface { - return new utils.Interface(_abi) as IOwnableInterface; + return new Interface(_abi) as IOwnableInterface; } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IOwnable { - return new Contract(address, _abi, signerOrProvider) as IOwnable; + static connect(address: string, runner?: ContractRunner | null): IOwnable { + return new Contract(address, _abi, runner) as unknown as IOwnable; } } diff --git a/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts b/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts index 05eb441a..9b6c0a46 100644 --- a/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts +++ b/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20Permit__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20Permit, IErc20PermitInterface, @@ -386,12 +385,12 @@ const _abi = [ export class IErc20Permit__factory { static readonly abi = _abi; static createInterface(): IErc20PermitInterface { - return new utils.Interface(_abi) as IErc20PermitInterface; + return new Interface(_abi) as IErc20PermitInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IErc20Permit { - return new Contract(address, _abi, signerOrProvider) as IErc20Permit; + return new Contract(address, _abi, runner) as unknown as IErc20Permit; } } diff --git a/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts b/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts index b9104d39..56d4c9ce 100644 --- a/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts +++ b/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20Recover__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20Recover, IErc20RecoverInterface, @@ -161,12 +160,12 @@ const _abi = [ export class IErc20Recover__factory { static readonly abi = _abi; static createInterface(): IErc20RecoverInterface { - return new utils.Interface(_abi) as IErc20RecoverInterface; + return new Interface(_abi) as IErc20RecoverInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IErc20Recover { - return new Contract(address, _abi, signerOrProvider) as IErc20Recover; + return new Contract(address, _abi, runner) as unknown as IErc20Recover; } } diff --git a/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts b/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts index 9661f226..573bf6fe 100644 --- a/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts +++ b/packages/proxy-target/src/types/factories/@prb/contracts/token/erc20/IErc20__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IErc20, IErc20Interface, @@ -285,9 +284,9 @@ const _abi = [ export class IErc20__factory { static readonly abi = _abi; static createInterface(): IErc20Interface { - return new utils.Interface(_abi) as IErc20Interface; + return new Interface(_abi) as IErc20Interface; } - static connect(address: string, signerOrProvider: Signer | Provider): IErc20 { - return new Contract(address, _abi, signerOrProvider) as IErc20; + static connect(address: string, runner?: ContractRunner | null): IErc20 { + return new Contract(address, _abi, runner) as unknown as IErc20; } } diff --git a/packages/proxy-target/src/types/factories/contracts/HifiProxyTarget__factory.ts b/packages/proxy-target/src/types/factories/contracts/HifiProxyTarget__factory.ts index d0661168..42ac96b9 100644 --- a/packages/proxy-target/src/types/factories/contracts/HifiProxyTarget__factory.ts +++ b/packages/proxy-target/src/types/factories/contracts/HifiProxyTarget__factory.ts @@ -1,9 +1,14 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../common"; +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../common"; import type { HifiProxyTarget, HifiProxyTargetInterface, @@ -829,32 +834,31 @@ export class HifiProxyTarget__factory extends ContractFactory { } } - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { + overrides?: NonPayableOverrides & { from?: string } + ): Promise { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): HifiProxyTarget { - return super.attach(address) as HifiProxyTarget; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + HifiProxyTarget & { + deploymentTransaction(): ContractTransactionResponse; + } + >; } - override connect(signer: Signer): HifiProxyTarget__factory { - return super.connect(signer) as HifiProxyTarget__factory; + override connect(runner: ContractRunner | null): HifiProxyTarget__factory { + return super.connect(runner) as HifiProxyTarget__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): HifiProxyTargetInterface { - return new utils.Interface(_abi) as HifiProxyTargetInterface; + return new Interface(_abi) as HifiProxyTargetInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): HifiProxyTarget { - return new Contract(address, _abi, signerOrProvider) as HifiProxyTarget; + return new Contract(address, _abi, runner) as unknown as HifiProxyTarget; } } diff --git a/packages/proxy-target/src/types/factories/contracts/IHifiProxyTarget__factory.ts b/packages/proxy-target/src/types/factories/contracts/IHifiProxyTarget__factory.ts index 13767793..f2f5784f 100644 --- a/packages/proxy-target/src/types/factories/contracts/IHifiProxyTarget__factory.ts +++ b/packages/proxy-target/src/types/factories/contracts/IHifiProxyTarget__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { IHifiProxyTarget, IHifiProxyTargetInterface, @@ -796,12 +795,12 @@ const _abi = [ export class IHifiProxyTarget__factory { static readonly abi = _abi; static createInterface(): IHifiProxyTargetInterface { - return new utils.Interface(_abi) as IHifiProxyTargetInterface; + return new Interface(_abi) as IHifiProxyTargetInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): IHifiProxyTarget { - return new Contract(address, _abi, signerOrProvider) as IHifiProxyTarget; + return new Contract(address, _abi, runner) as unknown as IHifiProxyTarget; } } diff --git a/packages/proxy-target/src/types/factories/contracts/external/WethInterface__factory.ts b/packages/proxy-target/src/types/factories/contracts/external/WethInterface__factory.ts index 13e8e8a5..cdb20b68 100644 --- a/packages/proxy-target/src/types/factories/contracts/external/WethInterface__factory.ts +++ b/packages/proxy-target/src/types/factories/contracts/external/WethInterface__factory.ts @@ -2,8 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Interface, type ContractRunner } from "ethers"; import type { WethInterface, WethInterfaceInterface, @@ -35,12 +34,12 @@ const _abi = [ export class WethInterface__factory { static readonly abi = _abi; static createInterface(): WethInterfaceInterface { - return new utils.Interface(_abi) as WethInterfaceInterface; + return new Interface(_abi) as WethInterfaceInterface; } static connect( address: string, - signerOrProvider: Signer | Provider + runner?: ContractRunner | null ): WethInterface { - return new Contract(address, _abi, signerOrProvider) as WethInterface; + return new Contract(address, _abi, runner) as unknown as WethInterface; } } diff --git a/packages/proxy-target/src/types/hardhat.d.ts b/packages/proxy-target/src/types/hardhat.d.ts index 27fde9b4..5eb494d5 100644 --- a/packages/proxy-target/src/types/hardhat.d.ts +++ b/packages/proxy-target/src/types/hardhat.d.ts @@ -4,9 +4,10 @@ import { ethers } from "ethers"; import { + DeployContractOptions, FactoryOptions, HardhatEthersHelpers as HardhatEthersHelpersBase, -} from "@nomiclabs/hardhat-ethers/types"; +} from "@nomicfoundation/hardhat-ethers/types"; import * as Contracts from "."; @@ -71,75 +72,203 @@ declare module "hardhat/types/runtime" { getContractAt( name: "IHifiPool", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IOwnableUpgradeable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IBalanceSheetV2", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IFintroller", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IHToken", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IAggregatorV3", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IChainlinkOperator", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IOwnable", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20Permit", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IErc20Recover", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "WethInterface", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "HifiProxyTarget", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; getContractAt( name: "IHifiProxyTarget", - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; + deployContract( + name: "IHifiPool", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IOwnableUpgradeable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IBalanceSheetV2", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFintroller", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHToken", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IAggregatorV3", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IChainlinkOperator", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IOwnable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Recover", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "WethInterface", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HifiProxyTarget", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHifiProxyTarget", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + + deployContract( + name: "IHifiPool", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IOwnableUpgradeable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IBalanceSheetV2", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IFintroller", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHToken", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IAggregatorV3", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IChainlinkOperator", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IOwnable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IErc20Recover", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "WethInterface", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "HifiProxyTarget", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IHifiProxyTarget", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + // default types getContractFactory( name: string, @@ -147,13 +276,22 @@ declare module "hardhat/types/runtime" { ): Promise; getContractFactory( abi: any[], - bytecode: ethers.utils.BytesLike, + bytecode: ethers.BytesLike, signer?: ethers.Signer ): Promise; getContractAt( nameOrAbi: string | any[], - address: string, + address: string | ethers.Addressable, signer?: ethers.Signer ): Promise; + deployContract( + name: string, + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: string, + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; } } diff --git a/yarn.lock b/yarn.lock index ec4df3b1..8559d61f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,6 +32,13 @@ __metadata: languageName: node linkType: hard +"@adraffy/ens-normalize@npm:1.10.0": + version: 1.10.0 + resolution: "@adraffy/ens-normalize@npm:1.10.0" + checksum: af0540f963a2632da2bbc37e36ea6593dcfc607b937857133791781e246d47f870d5e3d21fa70d5cfe94e772c284588c81ea3f5b7f4ea8fbb824369444e4dbcb + languageName: node + linkType: hard + "@ampproject/remapping@npm:^2.1.0": version: 2.2.1 resolution: "@ampproject/remapping@npm:2.2.1" @@ -2403,7 +2410,7 @@ __metadata: "@openzeppelin/contracts-upgradeable": 4.5.2 "@prb/contracts": 3.8.1 "@prb/math": 2.5.0 - "@typechain/ethers-v5": ^10.2.1 + "@typechain/ethers-v6": ^0.5.1 "@typechain/hardhat": ^9.1.0 "@types/chai": ^4.3.10 "@types/mocha": ^10.0.4 @@ -2417,7 +2424,7 @@ __metadata: eslint: ^8.53.0 eslint-config-prettier: ^8.10.0 ethereum-waffle: ^4.0.10 - ethers: ^5.7.2 + ethers: ^6.8.1 evm-bn: ^1.1.2 hardhat: ^2.19.0 hardhat-packager: ^1.4.2 @@ -2496,7 +2503,7 @@ __metadata: "@nomiclabs/hardhat-waffle": ^2.0.6 "@openzeppelin/contracts-upgradeable": 4.5.2 "@prb/contracts": 3.8.1 - "@typechain/ethers-v5": ^10.2.1 + "@typechain/ethers-v6": ^0.5.1 "@typechain/hardhat": ^9.1.0 "@types/chai": ^4.3.10 "@types/mocha": ^10.0.4 @@ -2514,7 +2521,7 @@ __metadata: eslint: ^8.53.0 eslint-config-prettier: ^8.10.0 ethereum-waffle: ^4.0.10 - ethers: ^5.7.2 + ethers: ^6.8.1 evm-bn: ^1.1.2 from-exponential: ^1.1.1 hardhat: ^2.19.0 @@ -2599,7 +2606,7 @@ __metadata: "@openzeppelin/hardhat-upgrades": ^1.16.1 "@prb/contracts": 3.8.1 "@prb/math": 2.5.0 - "@typechain/ethers-v5": ^10.2.1 + "@typechain/ethers-v6": ^0.5.1 "@typechain/hardhat": ^9.1.0 "@types/chai": ^4.3.10 "@types/mocha": ^10.0.4 @@ -2614,7 +2621,7 @@ __metadata: eslint: ^8.53.0 eslint-config-prettier: ^8.10.0 ethereum-waffle: ^4.0.10 - ethers: ^5.7.2 + ethers: ^6.8.1 evm-bn: ^1.1.2 hardhat: ^2.19.0 hardhat-gas-reporter: ^1.0.9 @@ -2655,7 +2662,7 @@ __metadata: "@nomiclabs/hardhat-etherscan": ^3.1.7 "@openzeppelin/contracts-upgradeable": 4.5.2 "@prb/contracts": 3.8.1 - "@typechain/ethers-v5": ^10.2.1 + "@typechain/ethers-v6": ^0.5.1 "@typechain/hardhat": ^9.1.0 "@types/node": ^20.9.0 "@typescript-eslint/eslint-plugin": ^5.62.0 @@ -2664,7 +2671,7 @@ __metadata: dotenv: ^16.3.1 eslint: ^8.53.0 eslint-config-prettier: ^8.10.0 - ethers: ^5.7.2 + ethers: ^6.8.1 hardhat: ^2.19.0 hardhat-packager: ^1.4.2 lodash: ^4.17.21 @@ -2785,6 +2792,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.2.0": + version: 1.2.0 + resolution: "@noble/curves@npm:1.2.0" + dependencies: + "@noble/hashes": 1.3.2 + checksum: bb798d7a66d8e43789e93bc3c2ddff91a1e19fdb79a99b86cd98f1e5eff0ee2024a2672902c2576ef3577b6f282f3b5c778bebd55761ddbb30e36bf275e83dd0 + languageName: node + linkType: hard + "@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": version: 1.2.0 resolution: "@noble/hashes@npm:1.2.0" @@ -2799,7 +2815,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": +"@noble/hashes@npm:1.3.2, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": version: 1.3.2 resolution: "@noble/hashes@npm:1.3.2" checksum: fe23536b436539d13f90e4b9be843cc63b1b17666a07634a2b1259dded6f490be3d050249e6af98076ea8f2ea0d56f578773c2197f2aa0eeaa5fba5bc18ba474 @@ -3533,19 +3549,17 @@ __metadata: languageName: node linkType: hard -"@typechain/ethers-v5@npm:^10.2.1": - version: 10.2.1 - resolution: "@typechain/ethers-v5@npm:10.2.1" +"@typechain/ethers-v6@npm:^0.5.1": + version: 0.5.1 + resolution: "@typechain/ethers-v6@npm:0.5.1" dependencies: lodash: ^4.17.15 ts-essentials: ^7.0.1 peerDependencies: - "@ethersproject/abi": ^5.0.0 - "@ethersproject/providers": ^5.0.0 - ethers: ^5.1.3 - typechain: ^8.1.1 - typescript: ">=4.3.0" - checksum: 852da4b1ff368ef87251111a5d50077de3d0fc12c519529269a74223740f8bda89297e67a5eb6c1f5b04ee23119566d6cbccf58264d32a83132be0f328a58d22 + ethers: 6.x + typechain: ^8.3.2 + typescript: ">=4.7.0" + checksum: 44e7970ce95eeb1a02019f8a53bbe30dcb87664e1df15fe436ae48eea1bf91ca72b5b230eac1bdf9cbe9b55bc488b54c6273e6f77155eaeff885fb34cfcd1108 languageName: node linkType: hard @@ -3742,6 +3756,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:18.15.13": + version: 18.15.13 + resolution: "@types/node@npm:18.15.13" + checksum: 79cc5a2b5f98e8973061a4260a781425efd39161a0e117a69cd089603964816c1a14025e1387b4590c8e82d05133b7b4154fa53a7dffb3877890a66145e76515 + languageName: node + linkType: hard + "@types/node@npm:^10.0.3": version: 10.17.60 resolution: "@types/node@npm:10.17.60" @@ -4340,6 +4361,13 @@ __metadata: languageName: node linkType: hard +"aes-js@npm:4.0.0-beta.5": + version: 4.0.0-beta.5 + resolution: "aes-js@npm:4.0.0-beta.5" + checksum: cc2ea969d77df939c32057f7e361b6530aa6cb93cb10617a17a45cd164e6d761002f031ff6330af3e67e58b1f0a3a8fd0b63a720afd591a653b02f649470e15b + languageName: node + linkType: hard + "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -7067,6 +7095,21 @@ __metadata: languageName: node linkType: hard +"ethers@npm:^6.8.1": + version: 6.8.1 + resolution: "ethers@npm:6.8.1" + dependencies: + "@adraffy/ens-normalize": 1.10.0 + "@noble/curves": 1.2.0 + "@noble/hashes": 1.3.2 + "@types/node": 18.15.13 + aes-js: 4.0.0-beta.5 + tslib: 2.4.0 + ws: 8.5.0 + checksum: 78b48d2fd13cf77c7041379595a3155eaf6e4da423999b782e6ff14cc58e452ef8c52f3e2f6995fcd2b34dfdd55eaf5ece6067cd754fe0c72388b12e1768f1b3 + languageName: node + linkType: hard + "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -13043,6 +13086,13 @@ resolve@1.17.0: languageName: node linkType: hard +"tslib@npm:2.4.0": + version: 2.4.0 + resolution: "tslib@npm:2.4.0" + checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113 + languageName: node + linkType: hard + "tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -13744,6 +13794,21 @@ typescript@^4.3.4: languageName: node linkType: hard +"ws@npm:8.5.0": + version: 8.5.0 + resolution: "ws@npm:8.5.0" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 76f2f90e40344bf18fd544194e7067812fb1372b2a37865678d8f12afe4b478ff2ebc0c7c0aff82cd5e6b66fc43d889eec0f1865c2365d8f7a66d92da7744a77 + languageName: node + linkType: hard + "ws@npm:^7.4.6": version: 7.5.3 resolution: "ws@npm:7.5.3"