From 5c8255cf147e30cbcdd1298a2beda014a3d0c198 Mon Sep 17 00:00:00 2001 From: doomsower <12031673+doomsower@users.noreply.github.com> Date: Thu, 13 Jun 2024 13:05:39 -0400 Subject: [PATCH] fix: move typechain to types subpath --- package.json | 12 +- src/types/generated/AaveFLTaker.ts | 260 ++++ .../generated/Balances.sol/BalanceOps.ts | 69 + src/types/generated/Balances.sol/index.ts | 4 + src/types/generated/BatchLiquidator.ts | 225 +++ src/types/generated/IAavePoolFlashLoan.ts | 156 ++ .../generated/IBalancerV2VaultFlashLoan.ts | 107 ++ src/types/generated/IBatchLiquidator.ts | 218 +++ .../ICreditAccountBase.ts | 140 ++ .../ICreditAccountV3.sol/ICreditAccountV3.ts | 171 +++ .../generated/ICreditAccountV3.sol/index.ts | 5 + .../ICreditConfiguratorV3.ts | 1322 ++++++++++++++++ .../ICreditConfiguratorV3Events.ts | 766 ++++++++++ .../ICreditConfiguratorV3.sol/index.ts | 5 + .../ICreditFacadeV3.sol/ICreditFacadeV3.ts | 906 +++++++++++ .../ICreditFacadeV3Events.ts | 443 ++++++ .../generated/ICreditFacadeV3.sol/index.ts | 5 + .../generated/ICreditFacadeV3Multicall.ts | 370 +++++ .../ICreditManagerV3.sol/ICreditManagerV3.ts | 1305 ++++++++++++++++ .../ICreditManagerV3Events.ts | 105 ++ .../generated/ICreditManagerV3.sol/index.ts | 5 + src/types/generated/IDaiLikePermit.ts | 124 ++ src/types/generated/IERC20.ts | 262 ++++ src/types/generated/IERC20Metadata.ts | 286 ++++ src/types/generated/IERC20Permit.ts | 143 ++ src/types/generated/ILiquidator.ts | 366 +++++ .../generated/IPartialLiquidationBotV3.ts | 307 ++++ src/types/generated/IPermit2.ts | 200 +++ .../generated/IPriceFeed.sol/IPriceFeed.ts | 169 +++ .../IPriceFeed.sol/IUpdatablePriceFeed.ts | 191 +++ src/types/generated/IPriceFeed.sol/index.ts | 5 + src/types/generated/IPriceHelper.ts | 126 ++ src/types/generated/IPriceOracleBase.ts | 174 +++ .../IPriceOracleV3.sol/IPriceOracleV3.ts | 498 ++++++ .../IPriceOracleV3Events.ts | 201 +++ .../generated/IPriceOracleV3.sol/index.ts | 5 + src/types/generated/IRouterV3.ts | 209 +++ src/types/generated/IVersion.ts | 84 + src/types/generated/IWETH.ts | 345 +++++ src/types/generated/Liquidator.ts | 569 +++++++ src/types/generated/Ownable.ts | 153 ++ src/types/generated/PriceHelper.ts | 126 ++ src/types/generated/SafeERC20.ts | 69 + src/types/generated/common.ts | 131 ++ .../factories/AaveFLTaker__factory.ts | 230 +++ .../Balances.sol/BalanceOps__factory.ts | 75 + .../generated/factories/Balances.sol/index.ts | 4 + .../factories/BatchLiquidator__factory.ts | 294 ++++ .../factories/IAavePoolFlashLoan__factory.ts | 101 ++ .../IBalancerV2VaultFlashLoan__factory.ts | 57 + .../factories/IBatchLiquidator__factory.ts | 219 +++ .../ICreditAccountBase__factory.ts | 98 ++ .../ICreditAccountV3__factory.ts | 129 ++ .../factories/ICreditAccountV3.sol/index.ts | 5 + .../ICreditConfiguratorV3Events__factory.ts | 367 +++++ .../ICreditConfiguratorV3__factory.ts | 795 ++++++++++ .../ICreditConfiguratorV3.sol/index.ts | 5 + .../ICreditFacadeV3Events__factory.ts | 248 +++ .../ICreditFacadeV3__factory.ts | 721 +++++++++ .../factories/ICreditFacadeV3.sol/index.ts | 5 + .../ICreditFacadeV3Multicall__factory.ts | 281 ++++ .../ICreditManagerV3Events__factory.ts | 42 + .../ICreditManagerV3__factory.ts | 1347 +++++++++++++++++ .../factories/ICreditManagerV3.sol/index.ts | 5 + .../factories/IDaiLikePermit__factory.ts | 73 + .../factories/IERC20Metadata__factory.ts | 247 +++ .../factories/IERC20Permit__factory.ts | 97 ++ .../generated/factories/IERC20__factory.ts | 202 +++ .../factories/ILiquidator__factory.ts | 369 +++++ .../IPartialLiquidationBotV3__factory.ts | 297 ++++ .../generated/factories/IPermit2__factory.ts | 155 ++ .../IPriceFeed.sol/IPriceFeed__factory.ts | 120 ++ .../IUpdatablePriceFeed__factory.ts | 153 ++ .../factories/IPriceFeed.sol/index.ts | 5 + .../factories/IPriceHelper__factory.ts | 80 + .../factories/IPriceOracleBase__factory.ts | 153 ++ .../IPriceOracleV3Events__factory.ts | 116 ++ .../IPriceOracleV3__factory.ts | 439 ++++++ .../factories/IPriceOracleV3.sol/index.ts | 5 + .../generated/factories/IRouterV3__factory.ts | 216 +++ .../generated/factories/IVersion__factory.ts | 32 + .../generated/factories/IWETH__factory.ts | 260 ++++ .../factories/Liquidator__factory.ts | 617 ++++++++ .../generated/factories/Ownable__factory.ts | 71 + .../factories/PriceHelper__factory.ts | 124 ++ .../generated/factories/SafeERC20__factory.ts | 96 ++ src/types/generated/factories/index.ts | 32 + src/types/generated/index.ts | 88 ++ src/{ => types}/index.ts | 0 src/{ => types}/manual-reexport.ts | 0 tsup.config.ts | 2 +- 91 files changed, 20412 insertions(+), 7 deletions(-) create mode 100644 src/types/generated/AaveFLTaker.ts create mode 100644 src/types/generated/Balances.sol/BalanceOps.ts create mode 100644 src/types/generated/Balances.sol/index.ts create mode 100644 src/types/generated/BatchLiquidator.ts create mode 100644 src/types/generated/IAavePoolFlashLoan.ts create mode 100644 src/types/generated/IBalancerV2VaultFlashLoan.ts create mode 100644 src/types/generated/IBatchLiquidator.ts create mode 100644 src/types/generated/ICreditAccountV3.sol/ICreditAccountBase.ts create mode 100644 src/types/generated/ICreditAccountV3.sol/ICreditAccountV3.ts create mode 100644 src/types/generated/ICreditAccountV3.sol/index.ts create mode 100644 src/types/generated/ICreditConfiguratorV3.sol/ICreditConfiguratorV3.ts create mode 100644 src/types/generated/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events.ts create mode 100644 src/types/generated/ICreditConfiguratorV3.sol/index.ts create mode 100644 src/types/generated/ICreditFacadeV3.sol/ICreditFacadeV3.ts create mode 100644 src/types/generated/ICreditFacadeV3.sol/ICreditFacadeV3Events.ts create mode 100644 src/types/generated/ICreditFacadeV3.sol/index.ts create mode 100644 src/types/generated/ICreditFacadeV3Multicall.ts create mode 100644 src/types/generated/ICreditManagerV3.sol/ICreditManagerV3.ts create mode 100644 src/types/generated/ICreditManagerV3.sol/ICreditManagerV3Events.ts create mode 100644 src/types/generated/ICreditManagerV3.sol/index.ts create mode 100644 src/types/generated/IDaiLikePermit.ts create mode 100644 src/types/generated/IERC20.ts create mode 100644 src/types/generated/IERC20Metadata.ts create mode 100644 src/types/generated/IERC20Permit.ts create mode 100644 src/types/generated/ILiquidator.ts create mode 100644 src/types/generated/IPartialLiquidationBotV3.ts create mode 100644 src/types/generated/IPermit2.ts create mode 100644 src/types/generated/IPriceFeed.sol/IPriceFeed.ts create mode 100644 src/types/generated/IPriceFeed.sol/IUpdatablePriceFeed.ts create mode 100644 src/types/generated/IPriceFeed.sol/index.ts create mode 100644 src/types/generated/IPriceHelper.ts create mode 100644 src/types/generated/IPriceOracleBase.ts create mode 100644 src/types/generated/IPriceOracleV3.sol/IPriceOracleV3.ts create mode 100644 src/types/generated/IPriceOracleV3.sol/IPriceOracleV3Events.ts create mode 100644 src/types/generated/IPriceOracleV3.sol/index.ts create mode 100644 src/types/generated/IRouterV3.ts create mode 100644 src/types/generated/IVersion.ts create mode 100644 src/types/generated/IWETH.ts create mode 100644 src/types/generated/Liquidator.ts create mode 100644 src/types/generated/Ownable.ts create mode 100644 src/types/generated/PriceHelper.ts create mode 100644 src/types/generated/SafeERC20.ts create mode 100644 src/types/generated/common.ts create mode 100644 src/types/generated/factories/AaveFLTaker__factory.ts create mode 100644 src/types/generated/factories/Balances.sol/BalanceOps__factory.ts create mode 100644 src/types/generated/factories/Balances.sol/index.ts create mode 100644 src/types/generated/factories/BatchLiquidator__factory.ts create mode 100644 src/types/generated/factories/IAavePoolFlashLoan__factory.ts create mode 100644 src/types/generated/factories/IBalancerV2VaultFlashLoan__factory.ts create mode 100644 src/types/generated/factories/IBatchLiquidator__factory.ts create mode 100644 src/types/generated/factories/ICreditAccountV3.sol/ICreditAccountBase__factory.ts create mode 100644 src/types/generated/factories/ICreditAccountV3.sol/ICreditAccountV3__factory.ts create mode 100644 src/types/generated/factories/ICreditAccountV3.sol/index.ts create mode 100644 src/types/generated/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events__factory.ts create mode 100644 src/types/generated/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3__factory.ts create mode 100644 src/types/generated/factories/ICreditConfiguratorV3.sol/index.ts create mode 100644 src/types/generated/factories/ICreditFacadeV3.sol/ICreditFacadeV3Events__factory.ts create mode 100644 src/types/generated/factories/ICreditFacadeV3.sol/ICreditFacadeV3__factory.ts create mode 100644 src/types/generated/factories/ICreditFacadeV3.sol/index.ts create mode 100644 src/types/generated/factories/ICreditFacadeV3Multicall__factory.ts create mode 100644 src/types/generated/factories/ICreditManagerV3.sol/ICreditManagerV3Events__factory.ts create mode 100644 src/types/generated/factories/ICreditManagerV3.sol/ICreditManagerV3__factory.ts create mode 100644 src/types/generated/factories/ICreditManagerV3.sol/index.ts create mode 100644 src/types/generated/factories/IDaiLikePermit__factory.ts create mode 100644 src/types/generated/factories/IERC20Metadata__factory.ts create mode 100644 src/types/generated/factories/IERC20Permit__factory.ts create mode 100644 src/types/generated/factories/IERC20__factory.ts create mode 100644 src/types/generated/factories/ILiquidator__factory.ts create mode 100644 src/types/generated/factories/IPartialLiquidationBotV3__factory.ts create mode 100644 src/types/generated/factories/IPermit2__factory.ts create mode 100644 src/types/generated/factories/IPriceFeed.sol/IPriceFeed__factory.ts create mode 100644 src/types/generated/factories/IPriceFeed.sol/IUpdatablePriceFeed__factory.ts create mode 100644 src/types/generated/factories/IPriceFeed.sol/index.ts create mode 100644 src/types/generated/factories/IPriceHelper__factory.ts create mode 100644 src/types/generated/factories/IPriceOracleBase__factory.ts create mode 100644 src/types/generated/factories/IPriceOracleV3.sol/IPriceOracleV3Events__factory.ts create mode 100644 src/types/generated/factories/IPriceOracleV3.sol/IPriceOracleV3__factory.ts create mode 100644 src/types/generated/factories/IPriceOracleV3.sol/index.ts create mode 100644 src/types/generated/factories/IRouterV3__factory.ts create mode 100644 src/types/generated/factories/IVersion__factory.ts create mode 100644 src/types/generated/factories/IWETH__factory.ts create mode 100644 src/types/generated/factories/Liquidator__factory.ts create mode 100644 src/types/generated/factories/Ownable__factory.ts create mode 100644 src/types/generated/factories/PriceHelper__factory.ts create mode 100644 src/types/generated/factories/SafeERC20__factory.ts create mode 100644 src/types/generated/factories/index.ts create mode 100644 src/types/generated/index.ts rename src/{ => types}/index.ts (100%) rename src/{ => types}/manual-reexport.ts (100%) diff --git a/package.json b/package.json index f1351de..c6484ab 100644 --- a/package.json +++ b/package.json @@ -14,14 +14,14 @@ "sideEffects": false, "exports": { "./package.json": "./package.json", - ".": { + "./types": { "import": { - "types": "./dist/esm/index.d.mts", - "default": "./dist/esm/index.mjs" + "types": "./dist/esm/types/index.d.mts", + "default": "./dist/esm/types/index.mjs" }, "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.cjs" + "types": "./dist/cjs/types/index.d.ts", + "default": "./dist/cjs/types/index.cjs" } }, "./abi": { @@ -52,7 +52,7 @@ "scripts": { "clean": "forge clean && rm -rf types dist", "build": "forge build && yarn types && yarn abis && yarn bytecode && tsup", - "types": "typechain --target ethers-v6 --show-stack-traces --out-dir ./src/generated ./forge-out/*.sol/*.json", + "types": "typechain --target ethers-v6 --out-dir ./src/types/generated ./forge-out/*.sol/*.json", "forge-build": "forge clean && forge build", "abis": "wagmi generate", "bytecode": "node ./generate-bytecode.mjs", diff --git a/src/types/generated/AaveFLTaker.ts b/src/types/generated/AaveFLTaker.ts new file mode 100644 index 0000000..2cdf875 --- /dev/null +++ b/src/types/generated/AaveFLTaker.ts @@ -0,0 +1,260 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface AaveFLTakerInterface extends Interface { + getFunction( + nameOrSignature: + | "aavePool" + | "allowedFLReceiver" + | "owner" + | "renounceOwnership" + | "setAllowedFLReceiver" + | "takeFlashLoan" + | "transferOwnership" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: "OwnershipTransferred" | "SetAllowedFLReceiver" + ): EventFragment; + + encodeFunctionData(functionFragment: "aavePool", values?: undefined): string; + encodeFunctionData( + functionFragment: "allowedFLReceiver", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setAllowedFLReceiver", + values: [AddressLike, boolean] + ): string; + encodeFunctionData( + functionFragment: "takeFlashLoan", + values: [AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [AddressLike] + ): string; + + decodeFunctionResult(functionFragment: "aavePool", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "allowedFLReceiver", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setAllowedFLReceiver", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "takeFlashLoan", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; +} + +export namespace OwnershipTransferredEvent { + export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [previousOwner: string, newOwner: string]; + export interface OutputObject { + previousOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetAllowedFLReceiverEvent { + export type InputTuple = [consumer: AddressLike, status: boolean]; + export type OutputTuple = [consumer: string, status: boolean]; + export interface OutputObject { + consumer: string; + status: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface AaveFLTaker extends BaseContract { + connect(runner?: ContractRunner | null): AaveFLTaker; + waitForDeployment(): Promise; + + interface: AaveFLTakerInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + aavePool: TypedContractMethod<[], [string], "view">; + + allowedFLReceiver: TypedContractMethod< + [arg0: AddressLike], + [boolean], + "view" + >; + + owner: TypedContractMethod<[], [string], "view">; + + renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + setAllowedFLReceiver: TypedContractMethod< + [receiver: AddressLike, status: boolean], + [void], + "nonpayable" + >; + + takeFlashLoan: TypedContractMethod< + [asset: AddressLike, amount: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; + + transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "aavePool" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowedFLReceiver" + ): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "setAllowedFLReceiver" + ): TypedContractMethod< + [receiver: AddressLike, status: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "takeFlashLoan" + ): TypedContractMethod< + [asset: AddressLike, amount: BigNumberish, data: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + + getEvent( + key: "OwnershipTransferred" + ): TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + getEvent( + key: "SetAllowedFLReceiver" + ): TypedContractEvent< + SetAllowedFLReceiverEvent.InputTuple, + SetAllowedFLReceiverEvent.OutputTuple, + SetAllowedFLReceiverEvent.OutputObject + >; + + filters: { + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + + "SetAllowedFLReceiver(address,bool)": TypedContractEvent< + SetAllowedFLReceiverEvent.InputTuple, + SetAllowedFLReceiverEvent.OutputTuple, + SetAllowedFLReceiverEvent.OutputObject + >; + SetAllowedFLReceiver: TypedContractEvent< + SetAllowedFLReceiverEvent.InputTuple, + SetAllowedFLReceiverEvent.OutputTuple, + SetAllowedFLReceiverEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/Balances.sol/BalanceOps.ts b/src/types/generated/Balances.sol/BalanceOps.ts new file mode 100644 index 0000000..8232cd9 --- /dev/null +++ b/src/types/generated/Balances.sol/BalanceOps.ts @@ -0,0 +1,69 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + FunctionFragment, + Interface, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, +} from "../common"; + +export interface BalanceOpsInterface extends Interface {} + +export interface BalanceOps extends BaseContract { + connect(runner?: ContractRunner | null): BalanceOps; + waitForDeployment(): Promise; + + interface: BalanceOpsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + getFunction( + key: string | FunctionFragment + ): T; + + filters: {}; +} diff --git a/src/types/generated/Balances.sol/index.ts b/src/types/generated/Balances.sol/index.ts new file mode 100644 index 0000000..7d6ae87 --- /dev/null +++ b/src/types/generated/Balances.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { BalanceOps } from "./BalanceOps"; diff --git a/src/types/generated/BatchLiquidator.ts b/src/types/generated/BatchLiquidator.ts new file mode 100644 index 0000000..f680dd7 --- /dev/null +++ b/src/types/generated/BatchLiquidator.ts @@ -0,0 +1,225 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export type BalanceStruct = { token: AddressLike; balance: BigNumberish }; + +export type BalanceStructOutput = [token: string, balance: bigint] & { + token: string; + balance: bigint; +}; + +export type PathOptionStruct = { + target: AddressLike; + option: BigNumberish; + totalOptions: BigNumberish; +}; + +export type PathOptionStructOutput = [ + target: string, + option: bigint, + totalOptions: bigint +] & { target: string; option: bigint; totalOptions: bigint }; + +export type RouterLiqParamsStruct = { + creditAccount: AddressLike; + expectedBalances: BalanceStruct[]; + leftoverBalances: BalanceStruct[]; + connectors: AddressLike[]; + slippage: BigNumberish; + pathOptions: PathOptionStruct[]; + iterations: BigNumberish; + force: boolean; +}; + +export type RouterLiqParamsStructOutput = [ + creditAccount: string, + expectedBalances: BalanceStructOutput[], + leftoverBalances: BalanceStructOutput[], + connectors: string[], + slippage: bigint, + pathOptions: PathOptionStructOutput[], + iterations: bigint, + force: boolean +] & { + creditAccount: string; + expectedBalances: BalanceStructOutput[]; + leftoverBalances: BalanceStructOutput[]; + connectors: string[]; + slippage: bigint; + pathOptions: PathOptionStructOutput[]; + iterations: bigint; + force: boolean; +}; + +export type MultiCallStruct = { target: AddressLike; callData: BytesLike }; + +export type MultiCallStructOutput = [target: string, callData: string] & { + target: string; + callData: string; +}; + +export type LiquidationResultStruct = { + creditAccount: AddressLike; + pathFound: boolean; + executed: boolean; + profit: BigNumberish; + calls: MultiCallStruct[]; +}; + +export type LiquidationResultStructOutput = [ + creditAccount: string, + pathFound: boolean, + executed: boolean, + profit: bigint, + calls: MultiCallStructOutput[] +] & { + creditAccount: string; + pathFound: boolean; + executed: boolean; + profit: bigint; + calls: MultiCallStructOutput[]; +}; + +export type LiqParamsStruct = { + creditFacade: AddressLike; + creditAccount: AddressLike; + calls: MultiCallStruct[]; +}; + +export type LiqParamsStructOutput = [ + creditFacade: string, + creditAccount: string, + calls: MultiCallStructOutput[] +] & { + creditFacade: string; + creditAccount: string; + calls: MultiCallStructOutput[]; +}; + +export interface BatchLiquidatorInterface extends Interface { + getFunction( + nameOrSignature: "estimateBatch" | "liquidateBatch" | "router" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "estimateBatch", + values: [RouterLiqParamsStruct[]] + ): string; + encodeFunctionData( + functionFragment: "liquidateBatch", + values: [LiqParamsStruct[], AddressLike] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "estimateBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "liquidateBatch", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; +} + +export interface BatchLiquidator extends BaseContract { + connect(runner?: ContractRunner | null): BatchLiquidator; + waitForDeployment(): Promise; + + interface: BatchLiquidatorInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + estimateBatch: TypedContractMethod< + [params: RouterLiqParamsStruct[]], + [LiquidationResultStructOutput[]], + "nonpayable" + >; + + liquidateBatch: TypedContractMethod< + [params: LiqParamsStruct[], to: AddressLike], + [boolean[]], + "nonpayable" + >; + + router: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "estimateBatch" + ): TypedContractMethod< + [params: RouterLiqParamsStruct[]], + [LiquidationResultStructOutput[]], + "nonpayable" + >; + getFunction( + nameOrSignature: "liquidateBatch" + ): TypedContractMethod< + [params: LiqParamsStruct[], to: AddressLike], + [boolean[]], + "nonpayable" + >; + getFunction( + nameOrSignature: "router" + ): TypedContractMethod<[], [string], "view">; + + filters: {}; +} diff --git a/src/types/generated/IAavePoolFlashLoan.ts b/src/types/generated/IAavePoolFlashLoan.ts new file mode 100644 index 0000000..2659038 --- /dev/null +++ b/src/types/generated/IAavePoolFlashLoan.ts @@ -0,0 +1,156 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IAavePoolFlashLoanInterface extends Interface { + getFunction( + nameOrSignature: "flashLoan" | "flashLoanSimple" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "flashLoan", + values: [ + AddressLike, + AddressLike[], + BigNumberish[], + BigNumberish[], + AddressLike, + BytesLike, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "flashLoanSimple", + values: [AddressLike, AddressLike, BigNumberish, BytesLike, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "flashLoanSimple", + data: BytesLike + ): Result; +} + +export interface IAavePoolFlashLoan extends BaseContract { + connect(runner?: ContractRunner | null): IAavePoolFlashLoan; + waitForDeployment(): Promise; + + interface: IAavePoolFlashLoanInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + flashLoan: TypedContractMethod< + [ + receiverAddress: AddressLike, + assets: AddressLike[], + amounts: BigNumberish[], + interestRateModes: BigNumberish[], + onBehalfOf: AddressLike, + params: BytesLike, + referralCode: BigNumberish + ], + [void], + "nonpayable" + >; + + flashLoanSimple: TypedContractMethod< + [ + receiverAddress: AddressLike, + asset: AddressLike, + amount: BigNumberish, + params: BytesLike, + referralCode: BigNumberish + ], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "flashLoan" + ): TypedContractMethod< + [ + receiverAddress: AddressLike, + assets: AddressLike[], + amounts: BigNumberish[], + interestRateModes: BigNumberish[], + onBehalfOf: AddressLike, + params: BytesLike, + referralCode: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "flashLoanSimple" + ): TypedContractMethod< + [ + receiverAddress: AddressLike, + asset: AddressLike, + amount: BigNumberish, + params: BytesLike, + referralCode: BigNumberish + ], + [void], + "nonpayable" + >; + + filters: {}; +} diff --git a/src/types/generated/IBalancerV2VaultFlashLoan.ts b/src/types/generated/IBalancerV2VaultFlashLoan.ts new file mode 100644 index 0000000..204d34f --- /dev/null +++ b/src/types/generated/IBalancerV2VaultFlashLoan.ts @@ -0,0 +1,107 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IBalancerV2VaultFlashLoanInterface extends Interface { + getFunction(nameOrSignature: "flashLoan"): FunctionFragment; + + encodeFunctionData( + functionFragment: "flashLoan", + values: [AddressLike, AddressLike[], BigNumberish[], BytesLike] + ): string; + + decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result; +} + +export interface IBalancerV2VaultFlashLoan extends BaseContract { + connect(runner?: ContractRunner | null): IBalancerV2VaultFlashLoan; + waitForDeployment(): Promise; + + interface: IBalancerV2VaultFlashLoanInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + flashLoan: TypedContractMethod< + [ + recipient: AddressLike, + tokens: AddressLike[], + amounts: BigNumberish[], + userData: BytesLike + ], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "flashLoan" + ): TypedContractMethod< + [ + recipient: AddressLike, + tokens: AddressLike[], + amounts: BigNumberish[], + userData: BytesLike + ], + [void], + "nonpayable" + >; + + filters: {}; +} diff --git a/src/types/generated/IBatchLiquidator.ts b/src/types/generated/IBatchLiquidator.ts new file mode 100644 index 0000000..8568804 --- /dev/null +++ b/src/types/generated/IBatchLiquidator.ts @@ -0,0 +1,218 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export type BalanceStruct = { token: AddressLike; balance: BigNumberish }; + +export type BalanceStructOutput = [token: string, balance: bigint] & { + token: string; + balance: bigint; +}; + +export type PathOptionStruct = { + target: AddressLike; + option: BigNumberish; + totalOptions: BigNumberish; +}; + +export type PathOptionStructOutput = [ + target: string, + option: bigint, + totalOptions: bigint +] & { target: string; option: bigint; totalOptions: bigint }; + +export type RouterLiqParamsStruct = { + creditAccount: AddressLike; + expectedBalances: BalanceStruct[]; + leftoverBalances: BalanceStruct[]; + connectors: AddressLike[]; + slippage: BigNumberish; + pathOptions: PathOptionStruct[]; + iterations: BigNumberish; + force: boolean; +}; + +export type RouterLiqParamsStructOutput = [ + creditAccount: string, + expectedBalances: BalanceStructOutput[], + leftoverBalances: BalanceStructOutput[], + connectors: string[], + slippage: bigint, + pathOptions: PathOptionStructOutput[], + iterations: bigint, + force: boolean +] & { + creditAccount: string; + expectedBalances: BalanceStructOutput[]; + leftoverBalances: BalanceStructOutput[]; + connectors: string[]; + slippage: bigint; + pathOptions: PathOptionStructOutput[]; + iterations: bigint; + force: boolean; +}; + +export type MultiCallStruct = { target: AddressLike; callData: BytesLike }; + +export type MultiCallStructOutput = [target: string, callData: string] & { + target: string; + callData: string; +}; + +export type LiquidationResultStruct = { + creditAccount: AddressLike; + pathFound: boolean; + executed: boolean; + profit: BigNumberish; + calls: MultiCallStruct[]; +}; + +export type LiquidationResultStructOutput = [ + creditAccount: string, + pathFound: boolean, + executed: boolean, + profit: bigint, + calls: MultiCallStructOutput[] +] & { + creditAccount: string; + pathFound: boolean; + executed: boolean; + profit: bigint; + calls: MultiCallStructOutput[]; +}; + +export type LiqParamsStruct = { + creditFacade: AddressLike; + creditAccount: AddressLike; + calls: MultiCallStruct[]; +}; + +export type LiqParamsStructOutput = [ + creditFacade: string, + creditAccount: string, + calls: MultiCallStructOutput[] +] & { + creditFacade: string; + creditAccount: string; + calls: MultiCallStructOutput[]; +}; + +export interface IBatchLiquidatorInterface extends Interface { + getFunction( + nameOrSignature: "estimateBatch" | "liquidateBatch" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "estimateBatch", + values: [RouterLiqParamsStruct[]] + ): string; + encodeFunctionData( + functionFragment: "liquidateBatch", + values: [LiqParamsStruct[], AddressLike] + ): string; + + decodeFunctionResult( + functionFragment: "estimateBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "liquidateBatch", + data: BytesLike + ): Result; +} + +export interface IBatchLiquidator extends BaseContract { + connect(runner?: ContractRunner | null): IBatchLiquidator; + waitForDeployment(): Promise; + + interface: IBatchLiquidatorInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + estimateBatch: TypedContractMethod< + [params: RouterLiqParamsStruct[]], + [LiquidationResultStructOutput[]], + "nonpayable" + >; + + liquidateBatch: TypedContractMethod< + [params: LiqParamsStruct[], to: AddressLike], + [boolean[]], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "estimateBatch" + ): TypedContractMethod< + [params: RouterLiqParamsStruct[]], + [LiquidationResultStructOutput[]], + "nonpayable" + >; + getFunction( + nameOrSignature: "liquidateBatch" + ): TypedContractMethod< + [params: LiqParamsStruct[], to: AddressLike], + [boolean[]], + "nonpayable" + >; + + filters: {}; +} diff --git a/src/types/generated/ICreditAccountV3.sol/ICreditAccountBase.ts b/src/types/generated/ICreditAccountV3.sol/ICreditAccountBase.ts new file mode 100644 index 0000000..55d2f11 --- /dev/null +++ b/src/types/generated/ICreditAccountV3.sol/ICreditAccountBase.ts @@ -0,0 +1,140 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "../common"; + +export interface ICreditAccountBaseInterface extends Interface { + getFunction( + nameOrSignature: "creditManager" | "execute" | "safeTransfer" | "version" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "creditManager", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [AddressLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "safeTransfer", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "creditManager", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "safeTransfer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; +} + +export interface ICreditAccountBase extends BaseContract { + connect(runner?: ContractRunner | null): ICreditAccountBase; + waitForDeployment(): Promise; + + interface: ICreditAccountBaseInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + creditManager: TypedContractMethod<[], [string], "view">; + + execute: TypedContractMethod< + [target: AddressLike, data: BytesLike], + [string], + "nonpayable" + >; + + safeTransfer: TypedContractMethod< + [token: AddressLike, to: AddressLike, amount: BigNumberish], + [void], + "nonpayable" + >; + + version: TypedContractMethod<[], [bigint], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "creditManager" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "execute" + ): TypedContractMethod< + [target: AddressLike, data: BytesLike], + [string], + "nonpayable" + >; + getFunction( + nameOrSignature: "safeTransfer" + ): TypedContractMethod< + [token: AddressLike, to: AddressLike, amount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + + filters: {}; +} diff --git a/src/types/generated/ICreditAccountV3.sol/ICreditAccountV3.ts b/src/types/generated/ICreditAccountV3.sol/ICreditAccountV3.ts new file mode 100644 index 0000000..a9b9228 --- /dev/null +++ b/src/types/generated/ICreditAccountV3.sol/ICreditAccountV3.ts @@ -0,0 +1,171 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "../common"; + +export interface ICreditAccountV3Interface extends Interface { + getFunction( + nameOrSignature: + | "creditManager" + | "execute" + | "factory" + | "rescue" + | "safeTransfer" + | "version" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "creditManager", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [AddressLike, BytesLike] + ): string; + encodeFunctionData(functionFragment: "factory", values?: undefined): string; + encodeFunctionData( + functionFragment: "rescue", + values: [AddressLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "safeTransfer", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "creditManager", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "rescue", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "safeTransfer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; +} + +export interface ICreditAccountV3 extends BaseContract { + connect(runner?: ContractRunner | null): ICreditAccountV3; + waitForDeployment(): Promise; + + interface: ICreditAccountV3Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + creditManager: TypedContractMethod<[], [string], "view">; + + execute: TypedContractMethod< + [target: AddressLike, data: BytesLike], + [string], + "nonpayable" + >; + + factory: TypedContractMethod<[], [string], "view">; + + rescue: TypedContractMethod< + [target: AddressLike, data: BytesLike], + [void], + "nonpayable" + >; + + safeTransfer: TypedContractMethod< + [token: AddressLike, to: AddressLike, amount: BigNumberish], + [void], + "nonpayable" + >; + + version: TypedContractMethod<[], [bigint], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "creditManager" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "execute" + ): TypedContractMethod< + [target: AddressLike, data: BytesLike], + [string], + "nonpayable" + >; + getFunction( + nameOrSignature: "factory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "rescue" + ): TypedContractMethod< + [target: AddressLike, data: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "safeTransfer" + ): TypedContractMethod< + [token: AddressLike, to: AddressLike, amount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + + filters: {}; +} diff --git a/src/types/generated/ICreditAccountV3.sol/index.ts b/src/types/generated/ICreditAccountV3.sol/index.ts new file mode 100644 index 0000000..eb6b552 --- /dev/null +++ b/src/types/generated/ICreditAccountV3.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ICreditAccountBase } from "./ICreditAccountBase"; +export type { ICreditAccountV3 } from "./ICreditAccountV3"; diff --git a/src/types/generated/ICreditConfiguratorV3.sol/ICreditConfiguratorV3.ts b/src/types/generated/ICreditConfiguratorV3.sol/ICreditConfiguratorV3.ts new file mode 100644 index 0000000..2171202 --- /dev/null +++ b/src/types/generated/ICreditConfiguratorV3.sol/ICreditConfiguratorV3.ts @@ -0,0 +1,1322 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "../common"; + +export interface ICreditConfiguratorV3Interface extends Interface { + getFunction( + nameOrSignature: + | "addCollateralToken" + | "addEmergencyLiquidator" + | "addressProvider" + | "allowAdapter" + | "allowToken" + | "allowedAdapters" + | "creditFacade" + | "creditManager" + | "emergencyLiquidators" + | "forbidAdapter" + | "forbidBorrowing" + | "forbidToken" + | "makeTokenQuoted" + | "rampLiquidationThreshold" + | "removeEmergencyLiquidator" + | "resetCumulativeLoss" + | "setBotList" + | "setCreditFacade" + | "setExpirationDate" + | "setFees" + | "setLiquidationThreshold" + | "setMaxCumulativeLoss" + | "setMaxDebtLimit" + | "setMaxDebtPerBlockMultiplier" + | "setMaxEnabledTokens" + | "setMinDebtLimit" + | "setPriceOracle" + | "underlying" + | "upgradeCreditConfigurator" + | "version" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "AddCollateralToken" + | "AddEmergencyLiquidator" + | "AllowAdapter" + | "AllowToken" + | "CreditConfiguratorUpgraded" + | "ForbidAdapter" + | "ForbidToken" + | "QuoteToken" + | "RemoveEmergencyLiquidator" + | "ResetCumulativeLoss" + | "ScheduleTokenLiquidationThresholdRamp" + | "SetBorrowingLimits" + | "SetBotList" + | "SetCreditFacade" + | "SetExpirationDate" + | "SetMaxCumulativeLoss" + | "SetMaxDebtPerBlockMultiplier" + | "SetMaxEnabledTokens" + | "SetPriceOracle" + | "SetTokenLiquidationThreshold" + | "UpdateFees" + ): EventFragment; + + encodeFunctionData( + functionFragment: "addCollateralToken", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "addEmergencyLiquidator", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "addressProvider", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowAdapter", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "allowToken", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "allowedAdapters", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "creditFacade", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "creditManager", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "emergencyLiquidators", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "forbidAdapter", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "forbidBorrowing", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "forbidToken", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "makeTokenQuoted", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "rampLiquidationThreshold", + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "removeEmergencyLiquidator", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "resetCumulativeLoss", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setBotList", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setCreditFacade", + values: [AddressLike, boolean] + ): string; + encodeFunctionData( + functionFragment: "setExpirationDate", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setFees", + values: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "setLiquidationThreshold", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setMaxCumulativeLoss", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setMaxDebtLimit", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setMaxDebtPerBlockMultiplier", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setMaxEnabledTokens", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setMinDebtLimit", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPriceOracle", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "underlying", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "upgradeCreditConfigurator", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "addCollateralToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addEmergencyLiquidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addressProvider", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "allowAdapter", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowToken", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "allowedAdapters", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "creditFacade", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "creditManager", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "emergencyLiquidators", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "forbidAdapter", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "forbidBorrowing", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "forbidToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "makeTokenQuoted", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "rampLiquidationThreshold", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeEmergencyLiquidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "resetCumulativeLoss", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setBotList", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setCreditFacade", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setExpirationDate", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setFees", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setLiquidationThreshold", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setMaxCumulativeLoss", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setMaxDebtLimit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setMaxDebtPerBlockMultiplier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setMaxEnabledTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setMinDebtLimit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPriceOracle", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "underlying", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeCreditConfigurator", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; +} + +export namespace AddCollateralTokenEvent { + export type InputTuple = [token: AddressLike]; + export type OutputTuple = [token: string]; + export interface OutputObject { + token: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AddEmergencyLiquidatorEvent { + export type InputTuple = [liquidator: AddressLike]; + export type OutputTuple = [liquidator: string]; + export interface OutputObject { + liquidator: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AllowAdapterEvent { + export type InputTuple = [targetContract: AddressLike, adapter: AddressLike]; + export type OutputTuple = [targetContract: string, adapter: string]; + export interface OutputObject { + targetContract: string; + adapter: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AllowTokenEvent { + export type InputTuple = [token: AddressLike]; + export type OutputTuple = [token: string]; + export interface OutputObject { + token: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace CreditConfiguratorUpgradedEvent { + export type InputTuple = [creditConfigurator: AddressLike]; + export type OutputTuple = [creditConfigurator: string]; + export interface OutputObject { + creditConfigurator: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ForbidAdapterEvent { + export type InputTuple = [targetContract: AddressLike, adapter: AddressLike]; + export type OutputTuple = [targetContract: string, adapter: string]; + export interface OutputObject { + targetContract: string; + adapter: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ForbidTokenEvent { + export type InputTuple = [token: AddressLike]; + export type OutputTuple = [token: string]; + export interface OutputObject { + token: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace QuoteTokenEvent { + export type InputTuple = [token: AddressLike]; + export type OutputTuple = [token: string]; + export interface OutputObject { + token: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace RemoveEmergencyLiquidatorEvent { + export type InputTuple = [liquidator: AddressLike]; + export type OutputTuple = [liquidator: string]; + export interface OutputObject { + liquidator: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ResetCumulativeLossEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ScheduleTokenLiquidationThresholdRampEvent { + export type InputTuple = [ + token: AddressLike, + liquidationThresholdInitial: BigNumberish, + liquidationThresholdFinal: BigNumberish, + timestampRampStart: BigNumberish, + timestampRampEnd: BigNumberish + ]; + export type OutputTuple = [ + token: string, + liquidationThresholdInitial: bigint, + liquidationThresholdFinal: bigint, + timestampRampStart: bigint, + timestampRampEnd: bigint + ]; + export interface OutputObject { + token: string; + liquidationThresholdInitial: bigint; + liquidationThresholdFinal: bigint; + timestampRampStart: bigint; + timestampRampEnd: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetBorrowingLimitsEvent { + export type InputTuple = [minDebt: BigNumberish, maxDebt: BigNumberish]; + export type OutputTuple = [minDebt: bigint, maxDebt: bigint]; + export interface OutputObject { + minDebt: bigint; + maxDebt: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetBotListEvent { + export type InputTuple = [botList: AddressLike]; + export type OutputTuple = [botList: string]; + export interface OutputObject { + botList: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetCreditFacadeEvent { + export type InputTuple = [creditFacade: AddressLike]; + export type OutputTuple = [creditFacade: string]; + export interface OutputObject { + creditFacade: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetExpirationDateEvent { + export type InputTuple = [expirationDate: BigNumberish]; + export type OutputTuple = [expirationDate: bigint]; + export interface OutputObject { + expirationDate: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetMaxCumulativeLossEvent { + export type InputTuple = [maxCumulativeLoss: BigNumberish]; + export type OutputTuple = [maxCumulativeLoss: bigint]; + export interface OutputObject { + maxCumulativeLoss: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetMaxDebtPerBlockMultiplierEvent { + export type InputTuple = [maxDebtPerBlockMultiplier: BigNumberish]; + export type OutputTuple = [maxDebtPerBlockMultiplier: bigint]; + export interface OutputObject { + maxDebtPerBlockMultiplier: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetMaxEnabledTokensEvent { + export type InputTuple = [maxEnabledTokens: BigNumberish]; + export type OutputTuple = [maxEnabledTokens: bigint]; + export interface OutputObject { + maxEnabledTokens: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetPriceOracleEvent { + export type InputTuple = [priceOracle: AddressLike]; + export type OutputTuple = [priceOracle: string]; + export interface OutputObject { + priceOracle: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetTokenLiquidationThresholdEvent { + export type InputTuple = [ + token: AddressLike, + liquidationThreshold: BigNumberish + ]; + export type OutputTuple = [token: string, liquidationThreshold: bigint]; + export interface OutputObject { + token: string; + liquidationThreshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace UpdateFeesEvent { + export type InputTuple = [ + feeInterest: BigNumberish, + feeLiquidation: BigNumberish, + liquidationPremium: BigNumberish, + feeLiquidationExpired: BigNumberish, + liquidationPremiumExpired: BigNumberish + ]; + export type OutputTuple = [ + feeInterest: bigint, + feeLiquidation: bigint, + liquidationPremium: bigint, + feeLiquidationExpired: bigint, + liquidationPremiumExpired: bigint + ]; + export interface OutputObject { + feeInterest: bigint; + feeLiquidation: bigint; + liquidationPremium: bigint; + feeLiquidationExpired: bigint; + liquidationPremiumExpired: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface ICreditConfiguratorV3 extends BaseContract { + connect(runner?: ContractRunner | null): ICreditConfiguratorV3; + waitForDeployment(): Promise; + + interface: ICreditConfiguratorV3Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + addCollateralToken: TypedContractMethod< + [token: AddressLike, liquidationThreshold: BigNumberish], + [void], + "nonpayable" + >; + + addEmergencyLiquidator: TypedContractMethod< + [liquidator: AddressLike], + [void], + "nonpayable" + >; + + addressProvider: TypedContractMethod<[], [string], "view">; + + allowAdapter: TypedContractMethod< + [adapter: AddressLike], + [void], + "nonpayable" + >; + + allowToken: TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + + allowedAdapters: TypedContractMethod<[], [string[]], "view">; + + creditFacade: TypedContractMethod<[], [string], "view">; + + creditManager: TypedContractMethod<[], [string], "view">; + + emergencyLiquidators: TypedContractMethod<[], [string[]], "view">; + + forbidAdapter: TypedContractMethod< + [adapter: AddressLike], + [void], + "nonpayable" + >; + + forbidBorrowing: TypedContractMethod<[], [void], "nonpayable">; + + forbidToken: TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + + makeTokenQuoted: TypedContractMethod< + [token: AddressLike], + [void], + "nonpayable" + >; + + rampLiquidationThreshold: TypedContractMethod< + [ + token: AddressLike, + liquidationThresholdFinal: BigNumberish, + rampStart: BigNumberish, + rampDuration: BigNumberish + ], + [void], + "nonpayable" + >; + + removeEmergencyLiquidator: TypedContractMethod< + [liquidator: AddressLike], + [void], + "nonpayable" + >; + + resetCumulativeLoss: TypedContractMethod<[], [void], "nonpayable">; + + setBotList: TypedContractMethod< + [newVersion: BigNumberish], + [void], + "nonpayable" + >; + + setCreditFacade: TypedContractMethod< + [newCreditFacade: AddressLike, migrateParams: boolean], + [void], + "nonpayable" + >; + + setExpirationDate: TypedContractMethod< + [newExpirationDate: BigNumberish], + [void], + "nonpayable" + >; + + setFees: TypedContractMethod< + [ + feeInterest: BigNumberish, + feeLiquidation: BigNumberish, + liquidationPremium: BigNumberish, + feeLiquidationExpired: BigNumberish, + liquidationPremiumExpired: BigNumberish + ], + [void], + "nonpayable" + >; + + setLiquidationThreshold: TypedContractMethod< + [token: AddressLike, liquidationThreshold: BigNumberish], + [void], + "nonpayable" + >; + + setMaxCumulativeLoss: TypedContractMethod< + [newMaxCumulativeLoss: BigNumberish], + [void], + "nonpayable" + >; + + setMaxDebtLimit: TypedContractMethod< + [newMaxDebt: BigNumberish], + [void], + "nonpayable" + >; + + setMaxDebtPerBlockMultiplier: TypedContractMethod< + [newMaxDebtLimitPerBlockMultiplier: BigNumberish], + [void], + "nonpayable" + >; + + setMaxEnabledTokens: TypedContractMethod< + [newMaxEnabledTokens: BigNumberish], + [void], + "nonpayable" + >; + + setMinDebtLimit: TypedContractMethod< + [newMinDebt: BigNumberish], + [void], + "nonpayable" + >; + + setPriceOracle: TypedContractMethod< + [newVersion: BigNumberish], + [void], + "nonpayable" + >; + + underlying: TypedContractMethod<[], [string], "view">; + + upgradeCreditConfigurator: TypedContractMethod< + [newCreditConfigurator: AddressLike], + [void], + "nonpayable" + >; + + version: TypedContractMethod<[], [bigint], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "addCollateralToken" + ): TypedContractMethod< + [token: AddressLike, liquidationThreshold: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "addEmergencyLiquidator" + ): TypedContractMethod<[liquidator: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "addressProvider" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "allowAdapter" + ): TypedContractMethod<[adapter: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowToken" + ): TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "allowedAdapters" + ): TypedContractMethod<[], [string[]], "view">; + getFunction( + nameOrSignature: "creditFacade" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "creditManager" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "emergencyLiquidators" + ): TypedContractMethod<[], [string[]], "view">; + getFunction( + nameOrSignature: "forbidAdapter" + ): TypedContractMethod<[adapter: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "forbidBorrowing" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "forbidToken" + ): TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "makeTokenQuoted" + ): TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "rampLiquidationThreshold" + ): TypedContractMethod< + [ + token: AddressLike, + liquidationThresholdFinal: BigNumberish, + rampStart: BigNumberish, + rampDuration: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "removeEmergencyLiquidator" + ): TypedContractMethod<[liquidator: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "resetCumulativeLoss" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "setBotList" + ): TypedContractMethod<[newVersion: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setCreditFacade" + ): TypedContractMethod< + [newCreditFacade: AddressLike, migrateParams: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setExpirationDate" + ): TypedContractMethod< + [newExpirationDate: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFees" + ): TypedContractMethod< + [ + feeInterest: BigNumberish, + feeLiquidation: BigNumberish, + liquidationPremium: BigNumberish, + feeLiquidationExpired: BigNumberish, + liquidationPremiumExpired: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setLiquidationThreshold" + ): TypedContractMethod< + [token: AddressLike, liquidationThreshold: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxCumulativeLoss" + ): TypedContractMethod< + [newMaxCumulativeLoss: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxDebtLimit" + ): TypedContractMethod<[newMaxDebt: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setMaxDebtPerBlockMultiplier" + ): TypedContractMethod< + [newMaxDebtLimitPerBlockMultiplier: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxEnabledTokens" + ): TypedContractMethod< + [newMaxEnabledTokens: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMinDebtLimit" + ): TypedContractMethod<[newMinDebt: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setPriceOracle" + ): TypedContractMethod<[newVersion: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "upgradeCreditConfigurator" + ): TypedContractMethod< + [newCreditConfigurator: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + + getEvent( + key: "AddCollateralToken" + ): TypedContractEvent< + AddCollateralTokenEvent.InputTuple, + AddCollateralTokenEvent.OutputTuple, + AddCollateralTokenEvent.OutputObject + >; + getEvent( + key: "AddEmergencyLiquidator" + ): TypedContractEvent< + AddEmergencyLiquidatorEvent.InputTuple, + AddEmergencyLiquidatorEvent.OutputTuple, + AddEmergencyLiquidatorEvent.OutputObject + >; + getEvent( + key: "AllowAdapter" + ): TypedContractEvent< + AllowAdapterEvent.InputTuple, + AllowAdapterEvent.OutputTuple, + AllowAdapterEvent.OutputObject + >; + getEvent( + key: "AllowToken" + ): TypedContractEvent< + AllowTokenEvent.InputTuple, + AllowTokenEvent.OutputTuple, + AllowTokenEvent.OutputObject + >; + getEvent( + key: "CreditConfiguratorUpgraded" + ): TypedContractEvent< + CreditConfiguratorUpgradedEvent.InputTuple, + CreditConfiguratorUpgradedEvent.OutputTuple, + CreditConfiguratorUpgradedEvent.OutputObject + >; + getEvent( + key: "ForbidAdapter" + ): TypedContractEvent< + ForbidAdapterEvent.InputTuple, + ForbidAdapterEvent.OutputTuple, + ForbidAdapterEvent.OutputObject + >; + getEvent( + key: "ForbidToken" + ): TypedContractEvent< + ForbidTokenEvent.InputTuple, + ForbidTokenEvent.OutputTuple, + ForbidTokenEvent.OutputObject + >; + getEvent( + key: "QuoteToken" + ): TypedContractEvent< + QuoteTokenEvent.InputTuple, + QuoteTokenEvent.OutputTuple, + QuoteTokenEvent.OutputObject + >; + getEvent( + key: "RemoveEmergencyLiquidator" + ): TypedContractEvent< + RemoveEmergencyLiquidatorEvent.InputTuple, + RemoveEmergencyLiquidatorEvent.OutputTuple, + RemoveEmergencyLiquidatorEvent.OutputObject + >; + getEvent( + key: "ResetCumulativeLoss" + ): TypedContractEvent< + ResetCumulativeLossEvent.InputTuple, + ResetCumulativeLossEvent.OutputTuple, + ResetCumulativeLossEvent.OutputObject + >; + getEvent( + key: "ScheduleTokenLiquidationThresholdRamp" + ): TypedContractEvent< + ScheduleTokenLiquidationThresholdRampEvent.InputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputObject + >; + getEvent( + key: "SetBorrowingLimits" + ): TypedContractEvent< + SetBorrowingLimitsEvent.InputTuple, + SetBorrowingLimitsEvent.OutputTuple, + SetBorrowingLimitsEvent.OutputObject + >; + getEvent( + key: "SetBotList" + ): TypedContractEvent< + SetBotListEvent.InputTuple, + SetBotListEvent.OutputTuple, + SetBotListEvent.OutputObject + >; + getEvent( + key: "SetCreditFacade" + ): TypedContractEvent< + SetCreditFacadeEvent.InputTuple, + SetCreditFacadeEvent.OutputTuple, + SetCreditFacadeEvent.OutputObject + >; + getEvent( + key: "SetExpirationDate" + ): TypedContractEvent< + SetExpirationDateEvent.InputTuple, + SetExpirationDateEvent.OutputTuple, + SetExpirationDateEvent.OutputObject + >; + getEvent( + key: "SetMaxCumulativeLoss" + ): TypedContractEvent< + SetMaxCumulativeLossEvent.InputTuple, + SetMaxCumulativeLossEvent.OutputTuple, + SetMaxCumulativeLossEvent.OutputObject + >; + getEvent( + key: "SetMaxDebtPerBlockMultiplier" + ): TypedContractEvent< + SetMaxDebtPerBlockMultiplierEvent.InputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputObject + >; + getEvent( + key: "SetMaxEnabledTokens" + ): TypedContractEvent< + SetMaxEnabledTokensEvent.InputTuple, + SetMaxEnabledTokensEvent.OutputTuple, + SetMaxEnabledTokensEvent.OutputObject + >; + getEvent( + key: "SetPriceOracle" + ): TypedContractEvent< + SetPriceOracleEvent.InputTuple, + SetPriceOracleEvent.OutputTuple, + SetPriceOracleEvent.OutputObject + >; + getEvent( + key: "SetTokenLiquidationThreshold" + ): TypedContractEvent< + SetTokenLiquidationThresholdEvent.InputTuple, + SetTokenLiquidationThresholdEvent.OutputTuple, + SetTokenLiquidationThresholdEvent.OutputObject + >; + getEvent( + key: "UpdateFees" + ): TypedContractEvent< + UpdateFeesEvent.InputTuple, + UpdateFeesEvent.OutputTuple, + UpdateFeesEvent.OutputObject + >; + + filters: { + "AddCollateralToken(address)": TypedContractEvent< + AddCollateralTokenEvent.InputTuple, + AddCollateralTokenEvent.OutputTuple, + AddCollateralTokenEvent.OutputObject + >; + AddCollateralToken: TypedContractEvent< + AddCollateralTokenEvent.InputTuple, + AddCollateralTokenEvent.OutputTuple, + AddCollateralTokenEvent.OutputObject + >; + + "AddEmergencyLiquidator(address)": TypedContractEvent< + AddEmergencyLiquidatorEvent.InputTuple, + AddEmergencyLiquidatorEvent.OutputTuple, + AddEmergencyLiquidatorEvent.OutputObject + >; + AddEmergencyLiquidator: TypedContractEvent< + AddEmergencyLiquidatorEvent.InputTuple, + AddEmergencyLiquidatorEvent.OutputTuple, + AddEmergencyLiquidatorEvent.OutputObject + >; + + "AllowAdapter(address,address)": TypedContractEvent< + AllowAdapterEvent.InputTuple, + AllowAdapterEvent.OutputTuple, + AllowAdapterEvent.OutputObject + >; + AllowAdapter: TypedContractEvent< + AllowAdapterEvent.InputTuple, + AllowAdapterEvent.OutputTuple, + AllowAdapterEvent.OutputObject + >; + + "AllowToken(address)": TypedContractEvent< + AllowTokenEvent.InputTuple, + AllowTokenEvent.OutputTuple, + AllowTokenEvent.OutputObject + >; + AllowToken: TypedContractEvent< + AllowTokenEvent.InputTuple, + AllowTokenEvent.OutputTuple, + AllowTokenEvent.OutputObject + >; + + "CreditConfiguratorUpgraded(address)": TypedContractEvent< + CreditConfiguratorUpgradedEvent.InputTuple, + CreditConfiguratorUpgradedEvent.OutputTuple, + CreditConfiguratorUpgradedEvent.OutputObject + >; + CreditConfiguratorUpgraded: TypedContractEvent< + CreditConfiguratorUpgradedEvent.InputTuple, + CreditConfiguratorUpgradedEvent.OutputTuple, + CreditConfiguratorUpgradedEvent.OutputObject + >; + + "ForbidAdapter(address,address)": TypedContractEvent< + ForbidAdapterEvent.InputTuple, + ForbidAdapterEvent.OutputTuple, + ForbidAdapterEvent.OutputObject + >; + ForbidAdapter: TypedContractEvent< + ForbidAdapterEvent.InputTuple, + ForbidAdapterEvent.OutputTuple, + ForbidAdapterEvent.OutputObject + >; + + "ForbidToken(address)": TypedContractEvent< + ForbidTokenEvent.InputTuple, + ForbidTokenEvent.OutputTuple, + ForbidTokenEvent.OutputObject + >; + ForbidToken: TypedContractEvent< + ForbidTokenEvent.InputTuple, + ForbidTokenEvent.OutputTuple, + ForbidTokenEvent.OutputObject + >; + + "QuoteToken(address)": TypedContractEvent< + QuoteTokenEvent.InputTuple, + QuoteTokenEvent.OutputTuple, + QuoteTokenEvent.OutputObject + >; + QuoteToken: TypedContractEvent< + QuoteTokenEvent.InputTuple, + QuoteTokenEvent.OutputTuple, + QuoteTokenEvent.OutputObject + >; + + "RemoveEmergencyLiquidator(address)": TypedContractEvent< + RemoveEmergencyLiquidatorEvent.InputTuple, + RemoveEmergencyLiquidatorEvent.OutputTuple, + RemoveEmergencyLiquidatorEvent.OutputObject + >; + RemoveEmergencyLiquidator: TypedContractEvent< + RemoveEmergencyLiquidatorEvent.InputTuple, + RemoveEmergencyLiquidatorEvent.OutputTuple, + RemoveEmergencyLiquidatorEvent.OutputObject + >; + + "ResetCumulativeLoss()": TypedContractEvent< + ResetCumulativeLossEvent.InputTuple, + ResetCumulativeLossEvent.OutputTuple, + ResetCumulativeLossEvent.OutputObject + >; + ResetCumulativeLoss: TypedContractEvent< + ResetCumulativeLossEvent.InputTuple, + ResetCumulativeLossEvent.OutputTuple, + ResetCumulativeLossEvent.OutputObject + >; + + "ScheduleTokenLiquidationThresholdRamp(address,uint16,uint16,uint40,uint40)": TypedContractEvent< + ScheduleTokenLiquidationThresholdRampEvent.InputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputObject + >; + ScheduleTokenLiquidationThresholdRamp: TypedContractEvent< + ScheduleTokenLiquidationThresholdRampEvent.InputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputObject + >; + + "SetBorrowingLimits(uint256,uint256)": TypedContractEvent< + SetBorrowingLimitsEvent.InputTuple, + SetBorrowingLimitsEvent.OutputTuple, + SetBorrowingLimitsEvent.OutputObject + >; + SetBorrowingLimits: TypedContractEvent< + SetBorrowingLimitsEvent.InputTuple, + SetBorrowingLimitsEvent.OutputTuple, + SetBorrowingLimitsEvent.OutputObject + >; + + "SetBotList(address)": TypedContractEvent< + SetBotListEvent.InputTuple, + SetBotListEvent.OutputTuple, + SetBotListEvent.OutputObject + >; + SetBotList: TypedContractEvent< + SetBotListEvent.InputTuple, + SetBotListEvent.OutputTuple, + SetBotListEvent.OutputObject + >; + + "SetCreditFacade(address)": TypedContractEvent< + SetCreditFacadeEvent.InputTuple, + SetCreditFacadeEvent.OutputTuple, + SetCreditFacadeEvent.OutputObject + >; + SetCreditFacade: TypedContractEvent< + SetCreditFacadeEvent.InputTuple, + SetCreditFacadeEvent.OutputTuple, + SetCreditFacadeEvent.OutputObject + >; + + "SetExpirationDate(uint40)": TypedContractEvent< + SetExpirationDateEvent.InputTuple, + SetExpirationDateEvent.OutputTuple, + SetExpirationDateEvent.OutputObject + >; + SetExpirationDate: TypedContractEvent< + SetExpirationDateEvent.InputTuple, + SetExpirationDateEvent.OutputTuple, + SetExpirationDateEvent.OutputObject + >; + + "SetMaxCumulativeLoss(uint128)": TypedContractEvent< + SetMaxCumulativeLossEvent.InputTuple, + SetMaxCumulativeLossEvent.OutputTuple, + SetMaxCumulativeLossEvent.OutputObject + >; + SetMaxCumulativeLoss: TypedContractEvent< + SetMaxCumulativeLossEvent.InputTuple, + SetMaxCumulativeLossEvent.OutputTuple, + SetMaxCumulativeLossEvent.OutputObject + >; + + "SetMaxDebtPerBlockMultiplier(uint8)": TypedContractEvent< + SetMaxDebtPerBlockMultiplierEvent.InputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputObject + >; + SetMaxDebtPerBlockMultiplier: TypedContractEvent< + SetMaxDebtPerBlockMultiplierEvent.InputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputObject + >; + + "SetMaxEnabledTokens(uint8)": TypedContractEvent< + SetMaxEnabledTokensEvent.InputTuple, + SetMaxEnabledTokensEvent.OutputTuple, + SetMaxEnabledTokensEvent.OutputObject + >; + SetMaxEnabledTokens: TypedContractEvent< + SetMaxEnabledTokensEvent.InputTuple, + SetMaxEnabledTokensEvent.OutputTuple, + SetMaxEnabledTokensEvent.OutputObject + >; + + "SetPriceOracle(address)": TypedContractEvent< + SetPriceOracleEvent.InputTuple, + SetPriceOracleEvent.OutputTuple, + SetPriceOracleEvent.OutputObject + >; + SetPriceOracle: TypedContractEvent< + SetPriceOracleEvent.InputTuple, + SetPriceOracleEvent.OutputTuple, + SetPriceOracleEvent.OutputObject + >; + + "SetTokenLiquidationThreshold(address,uint16)": TypedContractEvent< + SetTokenLiquidationThresholdEvent.InputTuple, + SetTokenLiquidationThresholdEvent.OutputTuple, + SetTokenLiquidationThresholdEvent.OutputObject + >; + SetTokenLiquidationThreshold: TypedContractEvent< + SetTokenLiquidationThresholdEvent.InputTuple, + SetTokenLiquidationThresholdEvent.OutputTuple, + SetTokenLiquidationThresholdEvent.OutputObject + >; + + "UpdateFees(uint16,uint16,uint16,uint16,uint16)": TypedContractEvent< + UpdateFeesEvent.InputTuple, + UpdateFeesEvent.OutputTuple, + UpdateFeesEvent.OutputObject + >; + UpdateFees: TypedContractEvent< + UpdateFeesEvent.InputTuple, + UpdateFeesEvent.OutputTuple, + UpdateFeesEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events.ts b/src/types/generated/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events.ts new file mode 100644 index 0000000..0eabf0e --- /dev/null +++ b/src/types/generated/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events.ts @@ -0,0 +1,766 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + FunctionFragment, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, +} from "../common"; + +export interface ICreditConfiguratorV3EventsInterface extends Interface { + getEvent( + nameOrSignatureOrTopic: + | "AddCollateralToken" + | "AddEmergencyLiquidator" + | "AllowAdapter" + | "AllowToken" + | "CreditConfiguratorUpgraded" + | "ForbidAdapter" + | "ForbidToken" + | "QuoteToken" + | "RemoveEmergencyLiquidator" + | "ResetCumulativeLoss" + | "ScheduleTokenLiquidationThresholdRamp" + | "SetBorrowingLimits" + | "SetBotList" + | "SetCreditFacade" + | "SetExpirationDate" + | "SetMaxCumulativeLoss" + | "SetMaxDebtPerBlockMultiplier" + | "SetMaxEnabledTokens" + | "SetPriceOracle" + | "SetTokenLiquidationThreshold" + | "UpdateFees" + ): EventFragment; +} + +export namespace AddCollateralTokenEvent { + export type InputTuple = [token: AddressLike]; + export type OutputTuple = [token: string]; + export interface OutputObject { + token: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AddEmergencyLiquidatorEvent { + export type InputTuple = [liquidator: AddressLike]; + export type OutputTuple = [liquidator: string]; + export interface OutputObject { + liquidator: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AllowAdapterEvent { + export type InputTuple = [targetContract: AddressLike, adapter: AddressLike]; + export type OutputTuple = [targetContract: string, adapter: string]; + export interface OutputObject { + targetContract: string; + adapter: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AllowTokenEvent { + export type InputTuple = [token: AddressLike]; + export type OutputTuple = [token: string]; + export interface OutputObject { + token: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace CreditConfiguratorUpgradedEvent { + export type InputTuple = [creditConfigurator: AddressLike]; + export type OutputTuple = [creditConfigurator: string]; + export interface OutputObject { + creditConfigurator: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ForbidAdapterEvent { + export type InputTuple = [targetContract: AddressLike, adapter: AddressLike]; + export type OutputTuple = [targetContract: string, adapter: string]; + export interface OutputObject { + targetContract: string; + adapter: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ForbidTokenEvent { + export type InputTuple = [token: AddressLike]; + export type OutputTuple = [token: string]; + export interface OutputObject { + token: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace QuoteTokenEvent { + export type InputTuple = [token: AddressLike]; + export type OutputTuple = [token: string]; + export interface OutputObject { + token: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace RemoveEmergencyLiquidatorEvent { + export type InputTuple = [liquidator: AddressLike]; + export type OutputTuple = [liquidator: string]; + export interface OutputObject { + liquidator: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ResetCumulativeLossEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ScheduleTokenLiquidationThresholdRampEvent { + export type InputTuple = [ + token: AddressLike, + liquidationThresholdInitial: BigNumberish, + liquidationThresholdFinal: BigNumberish, + timestampRampStart: BigNumberish, + timestampRampEnd: BigNumberish + ]; + export type OutputTuple = [ + token: string, + liquidationThresholdInitial: bigint, + liquidationThresholdFinal: bigint, + timestampRampStart: bigint, + timestampRampEnd: bigint + ]; + export interface OutputObject { + token: string; + liquidationThresholdInitial: bigint; + liquidationThresholdFinal: bigint; + timestampRampStart: bigint; + timestampRampEnd: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetBorrowingLimitsEvent { + export type InputTuple = [minDebt: BigNumberish, maxDebt: BigNumberish]; + export type OutputTuple = [minDebt: bigint, maxDebt: bigint]; + export interface OutputObject { + minDebt: bigint; + maxDebt: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetBotListEvent { + export type InputTuple = [botList: AddressLike]; + export type OutputTuple = [botList: string]; + export interface OutputObject { + botList: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetCreditFacadeEvent { + export type InputTuple = [creditFacade: AddressLike]; + export type OutputTuple = [creditFacade: string]; + export interface OutputObject { + creditFacade: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetExpirationDateEvent { + export type InputTuple = [expirationDate: BigNumberish]; + export type OutputTuple = [expirationDate: bigint]; + export interface OutputObject { + expirationDate: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetMaxCumulativeLossEvent { + export type InputTuple = [maxCumulativeLoss: BigNumberish]; + export type OutputTuple = [maxCumulativeLoss: bigint]; + export interface OutputObject { + maxCumulativeLoss: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetMaxDebtPerBlockMultiplierEvent { + export type InputTuple = [maxDebtPerBlockMultiplier: BigNumberish]; + export type OutputTuple = [maxDebtPerBlockMultiplier: bigint]; + export interface OutputObject { + maxDebtPerBlockMultiplier: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetMaxEnabledTokensEvent { + export type InputTuple = [maxEnabledTokens: BigNumberish]; + export type OutputTuple = [maxEnabledTokens: bigint]; + export interface OutputObject { + maxEnabledTokens: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetPriceOracleEvent { + export type InputTuple = [priceOracle: AddressLike]; + export type OutputTuple = [priceOracle: string]; + export interface OutputObject { + priceOracle: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetTokenLiquidationThresholdEvent { + export type InputTuple = [ + token: AddressLike, + liquidationThreshold: BigNumberish + ]; + export type OutputTuple = [token: string, liquidationThreshold: bigint]; + export interface OutputObject { + token: string; + liquidationThreshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace UpdateFeesEvent { + export type InputTuple = [ + feeInterest: BigNumberish, + feeLiquidation: BigNumberish, + liquidationPremium: BigNumberish, + feeLiquidationExpired: BigNumberish, + liquidationPremiumExpired: BigNumberish + ]; + export type OutputTuple = [ + feeInterest: bigint, + feeLiquidation: bigint, + liquidationPremium: bigint, + feeLiquidationExpired: bigint, + liquidationPremiumExpired: bigint + ]; + export interface OutputObject { + feeInterest: bigint; + feeLiquidation: bigint; + liquidationPremium: bigint; + feeLiquidationExpired: bigint; + liquidationPremiumExpired: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface ICreditConfiguratorV3Events extends BaseContract { + connect(runner?: ContractRunner | null): ICreditConfiguratorV3Events; + waitForDeployment(): Promise; + + interface: ICreditConfiguratorV3EventsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + getFunction( + key: string | FunctionFragment + ): T; + + getEvent( + key: "AddCollateralToken" + ): TypedContractEvent< + AddCollateralTokenEvent.InputTuple, + AddCollateralTokenEvent.OutputTuple, + AddCollateralTokenEvent.OutputObject + >; + getEvent( + key: "AddEmergencyLiquidator" + ): TypedContractEvent< + AddEmergencyLiquidatorEvent.InputTuple, + AddEmergencyLiquidatorEvent.OutputTuple, + AddEmergencyLiquidatorEvent.OutputObject + >; + getEvent( + key: "AllowAdapter" + ): TypedContractEvent< + AllowAdapterEvent.InputTuple, + AllowAdapterEvent.OutputTuple, + AllowAdapterEvent.OutputObject + >; + getEvent( + key: "AllowToken" + ): TypedContractEvent< + AllowTokenEvent.InputTuple, + AllowTokenEvent.OutputTuple, + AllowTokenEvent.OutputObject + >; + getEvent( + key: "CreditConfiguratorUpgraded" + ): TypedContractEvent< + CreditConfiguratorUpgradedEvent.InputTuple, + CreditConfiguratorUpgradedEvent.OutputTuple, + CreditConfiguratorUpgradedEvent.OutputObject + >; + getEvent( + key: "ForbidAdapter" + ): TypedContractEvent< + ForbidAdapterEvent.InputTuple, + ForbidAdapterEvent.OutputTuple, + ForbidAdapterEvent.OutputObject + >; + getEvent( + key: "ForbidToken" + ): TypedContractEvent< + ForbidTokenEvent.InputTuple, + ForbidTokenEvent.OutputTuple, + ForbidTokenEvent.OutputObject + >; + getEvent( + key: "QuoteToken" + ): TypedContractEvent< + QuoteTokenEvent.InputTuple, + QuoteTokenEvent.OutputTuple, + QuoteTokenEvent.OutputObject + >; + getEvent( + key: "RemoveEmergencyLiquidator" + ): TypedContractEvent< + RemoveEmergencyLiquidatorEvent.InputTuple, + RemoveEmergencyLiquidatorEvent.OutputTuple, + RemoveEmergencyLiquidatorEvent.OutputObject + >; + getEvent( + key: "ResetCumulativeLoss" + ): TypedContractEvent< + ResetCumulativeLossEvent.InputTuple, + ResetCumulativeLossEvent.OutputTuple, + ResetCumulativeLossEvent.OutputObject + >; + getEvent( + key: "ScheduleTokenLiquidationThresholdRamp" + ): TypedContractEvent< + ScheduleTokenLiquidationThresholdRampEvent.InputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputObject + >; + getEvent( + key: "SetBorrowingLimits" + ): TypedContractEvent< + SetBorrowingLimitsEvent.InputTuple, + SetBorrowingLimitsEvent.OutputTuple, + SetBorrowingLimitsEvent.OutputObject + >; + getEvent( + key: "SetBotList" + ): TypedContractEvent< + SetBotListEvent.InputTuple, + SetBotListEvent.OutputTuple, + SetBotListEvent.OutputObject + >; + getEvent( + key: "SetCreditFacade" + ): TypedContractEvent< + SetCreditFacadeEvent.InputTuple, + SetCreditFacadeEvent.OutputTuple, + SetCreditFacadeEvent.OutputObject + >; + getEvent( + key: "SetExpirationDate" + ): TypedContractEvent< + SetExpirationDateEvent.InputTuple, + SetExpirationDateEvent.OutputTuple, + SetExpirationDateEvent.OutputObject + >; + getEvent( + key: "SetMaxCumulativeLoss" + ): TypedContractEvent< + SetMaxCumulativeLossEvent.InputTuple, + SetMaxCumulativeLossEvent.OutputTuple, + SetMaxCumulativeLossEvent.OutputObject + >; + getEvent( + key: "SetMaxDebtPerBlockMultiplier" + ): TypedContractEvent< + SetMaxDebtPerBlockMultiplierEvent.InputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputObject + >; + getEvent( + key: "SetMaxEnabledTokens" + ): TypedContractEvent< + SetMaxEnabledTokensEvent.InputTuple, + SetMaxEnabledTokensEvent.OutputTuple, + SetMaxEnabledTokensEvent.OutputObject + >; + getEvent( + key: "SetPriceOracle" + ): TypedContractEvent< + SetPriceOracleEvent.InputTuple, + SetPriceOracleEvent.OutputTuple, + SetPriceOracleEvent.OutputObject + >; + getEvent( + key: "SetTokenLiquidationThreshold" + ): TypedContractEvent< + SetTokenLiquidationThresholdEvent.InputTuple, + SetTokenLiquidationThresholdEvent.OutputTuple, + SetTokenLiquidationThresholdEvent.OutputObject + >; + getEvent( + key: "UpdateFees" + ): TypedContractEvent< + UpdateFeesEvent.InputTuple, + UpdateFeesEvent.OutputTuple, + UpdateFeesEvent.OutputObject + >; + + filters: { + "AddCollateralToken(address)": TypedContractEvent< + AddCollateralTokenEvent.InputTuple, + AddCollateralTokenEvent.OutputTuple, + AddCollateralTokenEvent.OutputObject + >; + AddCollateralToken: TypedContractEvent< + AddCollateralTokenEvent.InputTuple, + AddCollateralTokenEvent.OutputTuple, + AddCollateralTokenEvent.OutputObject + >; + + "AddEmergencyLiquidator(address)": TypedContractEvent< + AddEmergencyLiquidatorEvent.InputTuple, + AddEmergencyLiquidatorEvent.OutputTuple, + AddEmergencyLiquidatorEvent.OutputObject + >; + AddEmergencyLiquidator: TypedContractEvent< + AddEmergencyLiquidatorEvent.InputTuple, + AddEmergencyLiquidatorEvent.OutputTuple, + AddEmergencyLiquidatorEvent.OutputObject + >; + + "AllowAdapter(address,address)": TypedContractEvent< + AllowAdapterEvent.InputTuple, + AllowAdapterEvent.OutputTuple, + AllowAdapterEvent.OutputObject + >; + AllowAdapter: TypedContractEvent< + AllowAdapterEvent.InputTuple, + AllowAdapterEvent.OutputTuple, + AllowAdapterEvent.OutputObject + >; + + "AllowToken(address)": TypedContractEvent< + AllowTokenEvent.InputTuple, + AllowTokenEvent.OutputTuple, + AllowTokenEvent.OutputObject + >; + AllowToken: TypedContractEvent< + AllowTokenEvent.InputTuple, + AllowTokenEvent.OutputTuple, + AllowTokenEvent.OutputObject + >; + + "CreditConfiguratorUpgraded(address)": TypedContractEvent< + CreditConfiguratorUpgradedEvent.InputTuple, + CreditConfiguratorUpgradedEvent.OutputTuple, + CreditConfiguratorUpgradedEvent.OutputObject + >; + CreditConfiguratorUpgraded: TypedContractEvent< + CreditConfiguratorUpgradedEvent.InputTuple, + CreditConfiguratorUpgradedEvent.OutputTuple, + CreditConfiguratorUpgradedEvent.OutputObject + >; + + "ForbidAdapter(address,address)": TypedContractEvent< + ForbidAdapterEvent.InputTuple, + ForbidAdapterEvent.OutputTuple, + ForbidAdapterEvent.OutputObject + >; + ForbidAdapter: TypedContractEvent< + ForbidAdapterEvent.InputTuple, + ForbidAdapterEvent.OutputTuple, + ForbidAdapterEvent.OutputObject + >; + + "ForbidToken(address)": TypedContractEvent< + ForbidTokenEvent.InputTuple, + ForbidTokenEvent.OutputTuple, + ForbidTokenEvent.OutputObject + >; + ForbidToken: TypedContractEvent< + ForbidTokenEvent.InputTuple, + ForbidTokenEvent.OutputTuple, + ForbidTokenEvent.OutputObject + >; + + "QuoteToken(address)": TypedContractEvent< + QuoteTokenEvent.InputTuple, + QuoteTokenEvent.OutputTuple, + QuoteTokenEvent.OutputObject + >; + QuoteToken: TypedContractEvent< + QuoteTokenEvent.InputTuple, + QuoteTokenEvent.OutputTuple, + QuoteTokenEvent.OutputObject + >; + + "RemoveEmergencyLiquidator(address)": TypedContractEvent< + RemoveEmergencyLiquidatorEvent.InputTuple, + RemoveEmergencyLiquidatorEvent.OutputTuple, + RemoveEmergencyLiquidatorEvent.OutputObject + >; + RemoveEmergencyLiquidator: TypedContractEvent< + RemoveEmergencyLiquidatorEvent.InputTuple, + RemoveEmergencyLiquidatorEvent.OutputTuple, + RemoveEmergencyLiquidatorEvent.OutputObject + >; + + "ResetCumulativeLoss()": TypedContractEvent< + ResetCumulativeLossEvent.InputTuple, + ResetCumulativeLossEvent.OutputTuple, + ResetCumulativeLossEvent.OutputObject + >; + ResetCumulativeLoss: TypedContractEvent< + ResetCumulativeLossEvent.InputTuple, + ResetCumulativeLossEvent.OutputTuple, + ResetCumulativeLossEvent.OutputObject + >; + + "ScheduleTokenLiquidationThresholdRamp(address,uint16,uint16,uint40,uint40)": TypedContractEvent< + ScheduleTokenLiquidationThresholdRampEvent.InputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputObject + >; + ScheduleTokenLiquidationThresholdRamp: TypedContractEvent< + ScheduleTokenLiquidationThresholdRampEvent.InputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputTuple, + ScheduleTokenLiquidationThresholdRampEvent.OutputObject + >; + + "SetBorrowingLimits(uint256,uint256)": TypedContractEvent< + SetBorrowingLimitsEvent.InputTuple, + SetBorrowingLimitsEvent.OutputTuple, + SetBorrowingLimitsEvent.OutputObject + >; + SetBorrowingLimits: TypedContractEvent< + SetBorrowingLimitsEvent.InputTuple, + SetBorrowingLimitsEvent.OutputTuple, + SetBorrowingLimitsEvent.OutputObject + >; + + "SetBotList(address)": TypedContractEvent< + SetBotListEvent.InputTuple, + SetBotListEvent.OutputTuple, + SetBotListEvent.OutputObject + >; + SetBotList: TypedContractEvent< + SetBotListEvent.InputTuple, + SetBotListEvent.OutputTuple, + SetBotListEvent.OutputObject + >; + + "SetCreditFacade(address)": TypedContractEvent< + SetCreditFacadeEvent.InputTuple, + SetCreditFacadeEvent.OutputTuple, + SetCreditFacadeEvent.OutputObject + >; + SetCreditFacade: TypedContractEvent< + SetCreditFacadeEvent.InputTuple, + SetCreditFacadeEvent.OutputTuple, + SetCreditFacadeEvent.OutputObject + >; + + "SetExpirationDate(uint40)": TypedContractEvent< + SetExpirationDateEvent.InputTuple, + SetExpirationDateEvent.OutputTuple, + SetExpirationDateEvent.OutputObject + >; + SetExpirationDate: TypedContractEvent< + SetExpirationDateEvent.InputTuple, + SetExpirationDateEvent.OutputTuple, + SetExpirationDateEvent.OutputObject + >; + + "SetMaxCumulativeLoss(uint128)": TypedContractEvent< + SetMaxCumulativeLossEvent.InputTuple, + SetMaxCumulativeLossEvent.OutputTuple, + SetMaxCumulativeLossEvent.OutputObject + >; + SetMaxCumulativeLoss: TypedContractEvent< + SetMaxCumulativeLossEvent.InputTuple, + SetMaxCumulativeLossEvent.OutputTuple, + SetMaxCumulativeLossEvent.OutputObject + >; + + "SetMaxDebtPerBlockMultiplier(uint8)": TypedContractEvent< + SetMaxDebtPerBlockMultiplierEvent.InputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputObject + >; + SetMaxDebtPerBlockMultiplier: TypedContractEvent< + SetMaxDebtPerBlockMultiplierEvent.InputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputTuple, + SetMaxDebtPerBlockMultiplierEvent.OutputObject + >; + + "SetMaxEnabledTokens(uint8)": TypedContractEvent< + SetMaxEnabledTokensEvent.InputTuple, + SetMaxEnabledTokensEvent.OutputTuple, + SetMaxEnabledTokensEvent.OutputObject + >; + SetMaxEnabledTokens: TypedContractEvent< + SetMaxEnabledTokensEvent.InputTuple, + SetMaxEnabledTokensEvent.OutputTuple, + SetMaxEnabledTokensEvent.OutputObject + >; + + "SetPriceOracle(address)": TypedContractEvent< + SetPriceOracleEvent.InputTuple, + SetPriceOracleEvent.OutputTuple, + SetPriceOracleEvent.OutputObject + >; + SetPriceOracle: TypedContractEvent< + SetPriceOracleEvent.InputTuple, + SetPriceOracleEvent.OutputTuple, + SetPriceOracleEvent.OutputObject + >; + + "SetTokenLiquidationThreshold(address,uint16)": TypedContractEvent< + SetTokenLiquidationThresholdEvent.InputTuple, + SetTokenLiquidationThresholdEvent.OutputTuple, + SetTokenLiquidationThresholdEvent.OutputObject + >; + SetTokenLiquidationThreshold: TypedContractEvent< + SetTokenLiquidationThresholdEvent.InputTuple, + SetTokenLiquidationThresholdEvent.OutputTuple, + SetTokenLiquidationThresholdEvent.OutputObject + >; + + "UpdateFees(uint16,uint16,uint16,uint16,uint16)": TypedContractEvent< + UpdateFeesEvent.InputTuple, + UpdateFeesEvent.OutputTuple, + UpdateFeesEvent.OutputObject + >; + UpdateFees: TypedContractEvent< + UpdateFeesEvent.InputTuple, + UpdateFeesEvent.OutputTuple, + UpdateFeesEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/ICreditConfiguratorV3.sol/index.ts b/src/types/generated/ICreditConfiguratorV3.sol/index.ts new file mode 100644 index 0000000..6070f20 --- /dev/null +++ b/src/types/generated/ICreditConfiguratorV3.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ICreditConfiguratorV3 } from "./ICreditConfiguratorV3"; +export type { ICreditConfiguratorV3Events } from "./ICreditConfiguratorV3Events"; diff --git a/src/types/generated/ICreditFacadeV3.sol/ICreditFacadeV3.ts b/src/types/generated/ICreditFacadeV3.sol/ICreditFacadeV3.ts new file mode 100644 index 0000000..b88360b --- /dev/null +++ b/src/types/generated/ICreditFacadeV3.sol/ICreditFacadeV3.ts @@ -0,0 +1,906 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "../common"; + +export type MultiCallStruct = { target: AddressLike; callData: BytesLike }; + +export type MultiCallStructOutput = [target: string, callData: string] & { + target: string; + callData: string; +}; + +export interface ICreditFacadeV3Interface extends Interface { + getFunction( + nameOrSignature: + | "botList" + | "botMulticall" + | "canLiquidateWhilePaused" + | "closeCreditAccount" + | "creditManager" + | "debtLimits" + | "degenNFT" + | "expirable" + | "expirationDate" + | "forbiddenTokenMask" + | "liquidateCreditAccount" + | "lossParams" + | "maxDebtPerBlockMultiplier" + | "maxQuotaMultiplier" + | "multicall" + | "openCreditAccount" + | "setBotList" + | "setBotPermissions" + | "setCumulativeLossParams" + | "setDebtLimits" + | "setEmergencyLiquidator" + | "setExpirationDate" + | "setTokenAllowance" + | "version" + | "weth" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "AddCollateral" + | "CloseCreditAccount" + | "DecreaseDebt" + | "Execute" + | "FinishMultiCall" + | "IncreaseDebt" + | "LiquidateCreditAccount" + | "OpenCreditAccount" + | "StartMultiCall" + | "WithdrawCollateral" + ): EventFragment; + + encodeFunctionData(functionFragment: "botList", values?: undefined): string; + encodeFunctionData( + functionFragment: "botMulticall", + values: [AddressLike, MultiCallStruct[]] + ): string; + encodeFunctionData( + functionFragment: "canLiquidateWhilePaused", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "closeCreditAccount", + values: [AddressLike, MultiCallStruct[]] + ): string; + encodeFunctionData( + functionFragment: "creditManager", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "debtLimits", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "degenNFT", values?: undefined): string; + encodeFunctionData(functionFragment: "expirable", values?: undefined): string; + encodeFunctionData( + functionFragment: "expirationDate", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "forbiddenTokenMask", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "liquidateCreditAccount", + values: [AddressLike, AddressLike, MultiCallStruct[]] + ): string; + encodeFunctionData( + functionFragment: "lossParams", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "maxDebtPerBlockMultiplier", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "maxQuotaMultiplier", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "multicall", + values: [AddressLike, MultiCallStruct[]] + ): string; + encodeFunctionData( + functionFragment: "openCreditAccount", + values: [AddressLike, MultiCallStruct[], BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setBotList", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setBotPermissions", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setCumulativeLossParams", + values: [BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "setDebtLimits", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setEmergencyLiquidator", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setExpirationDate", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setTokenAllowance", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData(functionFragment: "weth", values?: undefined): string; + + decodeFunctionResult(functionFragment: "botList", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "botMulticall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "canLiquidateWhilePaused", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "closeCreditAccount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "creditManager", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "debtLimits", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "degenNFT", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "expirable", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "expirationDate", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "forbiddenTokenMask", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "liquidateCreditAccount", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "lossParams", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "maxDebtPerBlockMultiplier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "maxQuotaMultiplier", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "openCreditAccount", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setBotList", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setBotPermissions", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setCumulativeLossParams", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setDebtLimits", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setEmergencyLiquidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setExpirationDate", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setTokenAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "weth", data: BytesLike): Result; +} + +export namespace AddCollateralEvent { + export type InputTuple = [ + creditAccount: AddressLike, + token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + creditAccount: string, + token: string, + amount: bigint + ]; + export interface OutputObject { + creditAccount: string; + token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace CloseCreditAccountEvent { + export type InputTuple = [creditAccount: AddressLike, borrower: AddressLike]; + export type OutputTuple = [creditAccount: string, borrower: string]; + export interface OutputObject { + creditAccount: string; + borrower: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace DecreaseDebtEvent { + export type InputTuple = [creditAccount: AddressLike, amount: BigNumberish]; + export type OutputTuple = [creditAccount: string, amount: bigint]; + export interface OutputObject { + creditAccount: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ExecuteEvent { + export type InputTuple = [ + creditAccount: AddressLike, + targetContract: AddressLike + ]; + export type OutputTuple = [creditAccount: string, targetContract: string]; + export interface OutputObject { + creditAccount: string; + targetContract: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace FinishMultiCallEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace IncreaseDebtEvent { + export type InputTuple = [creditAccount: AddressLike, amount: BigNumberish]; + export type OutputTuple = [creditAccount: string, amount: bigint]; + export interface OutputObject { + creditAccount: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace LiquidateCreditAccountEvent { + export type InputTuple = [ + creditAccount: AddressLike, + liquidator: AddressLike, + to: AddressLike, + remainingFunds: BigNumberish + ]; + export type OutputTuple = [ + creditAccount: string, + liquidator: string, + to: string, + remainingFunds: bigint + ]; + export interface OutputObject { + creditAccount: string; + liquidator: string; + to: string; + remainingFunds: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OpenCreditAccountEvent { + export type InputTuple = [ + creditAccount: AddressLike, + onBehalfOf: AddressLike, + caller: AddressLike, + referralCode: BigNumberish + ]; + export type OutputTuple = [ + creditAccount: string, + onBehalfOf: string, + caller: string, + referralCode: bigint + ]; + export interface OutputObject { + creditAccount: string; + onBehalfOf: string; + caller: string; + referralCode: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace StartMultiCallEvent { + export type InputTuple = [creditAccount: AddressLike, caller: AddressLike]; + export type OutputTuple = [creditAccount: string, caller: string]; + export interface OutputObject { + creditAccount: string; + caller: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace WithdrawCollateralEvent { + export type InputTuple = [ + creditAccount: AddressLike, + token: AddressLike, + amount: BigNumberish, + to: AddressLike + ]; + export type OutputTuple = [ + creditAccount: string, + token: string, + amount: bigint, + to: string + ]; + export interface OutputObject { + creditAccount: string; + token: string; + amount: bigint; + to: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface ICreditFacadeV3 extends BaseContract { + connect(runner?: ContractRunner | null): ICreditFacadeV3; + waitForDeployment(): Promise; + + interface: ICreditFacadeV3Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + botList: TypedContractMethod<[], [string], "view">; + + botMulticall: TypedContractMethod< + [creditAccount: AddressLike, calls: MultiCallStruct[]], + [void], + "nonpayable" + >; + + canLiquidateWhilePaused: TypedContractMethod< + [arg0: AddressLike], + [boolean], + "view" + >; + + closeCreditAccount: TypedContractMethod< + [creditAccount: AddressLike, calls: MultiCallStruct[]], + [void], + "payable" + >; + + creditManager: TypedContractMethod<[], [string], "view">; + + debtLimits: TypedContractMethod< + [], + [[bigint, bigint] & { minDebt: bigint; maxDebt: bigint }], + "view" + >; + + degenNFT: TypedContractMethod<[], [string], "view">; + + expirable: TypedContractMethod<[], [boolean], "view">; + + expirationDate: TypedContractMethod<[], [bigint], "view">; + + forbiddenTokenMask: TypedContractMethod<[], [bigint], "view">; + + liquidateCreditAccount: TypedContractMethod< + [creditAccount: AddressLike, to: AddressLike, calls: MultiCallStruct[]], + [void], + "nonpayable" + >; + + lossParams: TypedContractMethod< + [], + [ + [bigint, bigint] & { + currentCumulativeLoss: bigint; + maxCumulativeLoss: bigint; + } + ], + "view" + >; + + maxDebtPerBlockMultiplier: TypedContractMethod<[], [bigint], "view">; + + maxQuotaMultiplier: TypedContractMethod<[], [bigint], "view">; + + multicall: TypedContractMethod< + [creditAccount: AddressLike, calls: MultiCallStruct[]], + [void], + "payable" + >; + + openCreditAccount: TypedContractMethod< + [ + onBehalfOf: AddressLike, + calls: MultiCallStruct[], + referralCode: BigNumberish + ], + [string], + "payable" + >; + + setBotList: TypedContractMethod< + [newBotList: AddressLike], + [void], + "nonpayable" + >; + + setBotPermissions: TypedContractMethod< + [creditAccount: AddressLike, bot: AddressLike, permissions: BigNumberish], + [void], + "nonpayable" + >; + + setCumulativeLossParams: TypedContractMethod< + [newMaxCumulativeLoss: BigNumberish, resetCumulativeLoss: boolean], + [void], + "nonpayable" + >; + + setDebtLimits: TypedContractMethod< + [ + newMinDebt: BigNumberish, + newMaxDebt: BigNumberish, + newMaxDebtPerBlockMultiplier: BigNumberish + ], + [void], + "nonpayable" + >; + + setEmergencyLiquidator: TypedContractMethod< + [liquidator: AddressLike, allowance: BigNumberish], + [void], + "nonpayable" + >; + + setExpirationDate: TypedContractMethod< + [newExpirationDate: BigNumberish], + [void], + "nonpayable" + >; + + setTokenAllowance: TypedContractMethod< + [token: AddressLike, allowance: BigNumberish], + [void], + "nonpayable" + >; + + version: TypedContractMethod<[], [bigint], "view">; + + weth: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "botList" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "botMulticall" + ): TypedContractMethod< + [creditAccount: AddressLike, calls: MultiCallStruct[]], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "canLiquidateWhilePaused" + ): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "closeCreditAccount" + ): TypedContractMethod< + [creditAccount: AddressLike, calls: MultiCallStruct[]], + [void], + "payable" + >; + getFunction( + nameOrSignature: "creditManager" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "debtLimits" + ): TypedContractMethod< + [], + [[bigint, bigint] & { minDebt: bigint; maxDebt: bigint }], + "view" + >; + getFunction( + nameOrSignature: "degenNFT" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "expirable" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "expirationDate" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "forbiddenTokenMask" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "liquidateCreditAccount" + ): TypedContractMethod< + [creditAccount: AddressLike, to: AddressLike, calls: MultiCallStruct[]], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "lossParams" + ): TypedContractMethod< + [], + [ + [bigint, bigint] & { + currentCumulativeLoss: bigint; + maxCumulativeLoss: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "maxDebtPerBlockMultiplier" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "maxQuotaMultiplier" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "multicall" + ): TypedContractMethod< + [creditAccount: AddressLike, calls: MultiCallStruct[]], + [void], + "payable" + >; + getFunction( + nameOrSignature: "openCreditAccount" + ): TypedContractMethod< + [ + onBehalfOf: AddressLike, + calls: MultiCallStruct[], + referralCode: BigNumberish + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "setBotList" + ): TypedContractMethod<[newBotList: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setBotPermissions" + ): TypedContractMethod< + [creditAccount: AddressLike, bot: AddressLike, permissions: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCumulativeLossParams" + ): TypedContractMethod< + [newMaxCumulativeLoss: BigNumberish, resetCumulativeLoss: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setDebtLimits" + ): TypedContractMethod< + [ + newMinDebt: BigNumberish, + newMaxDebt: BigNumberish, + newMaxDebtPerBlockMultiplier: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setEmergencyLiquidator" + ): TypedContractMethod< + [liquidator: AddressLike, allowance: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setExpirationDate" + ): TypedContractMethod< + [newExpirationDate: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setTokenAllowance" + ): TypedContractMethod< + [token: AddressLike, allowance: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "weth" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "AddCollateral" + ): TypedContractEvent< + AddCollateralEvent.InputTuple, + AddCollateralEvent.OutputTuple, + AddCollateralEvent.OutputObject + >; + getEvent( + key: "CloseCreditAccount" + ): TypedContractEvent< + CloseCreditAccountEvent.InputTuple, + CloseCreditAccountEvent.OutputTuple, + CloseCreditAccountEvent.OutputObject + >; + getEvent( + key: "DecreaseDebt" + ): TypedContractEvent< + DecreaseDebtEvent.InputTuple, + DecreaseDebtEvent.OutputTuple, + DecreaseDebtEvent.OutputObject + >; + getEvent( + key: "Execute" + ): TypedContractEvent< + ExecuteEvent.InputTuple, + ExecuteEvent.OutputTuple, + ExecuteEvent.OutputObject + >; + getEvent( + key: "FinishMultiCall" + ): TypedContractEvent< + FinishMultiCallEvent.InputTuple, + FinishMultiCallEvent.OutputTuple, + FinishMultiCallEvent.OutputObject + >; + getEvent( + key: "IncreaseDebt" + ): TypedContractEvent< + IncreaseDebtEvent.InputTuple, + IncreaseDebtEvent.OutputTuple, + IncreaseDebtEvent.OutputObject + >; + getEvent( + key: "LiquidateCreditAccount" + ): TypedContractEvent< + LiquidateCreditAccountEvent.InputTuple, + LiquidateCreditAccountEvent.OutputTuple, + LiquidateCreditAccountEvent.OutputObject + >; + getEvent( + key: "OpenCreditAccount" + ): TypedContractEvent< + OpenCreditAccountEvent.InputTuple, + OpenCreditAccountEvent.OutputTuple, + OpenCreditAccountEvent.OutputObject + >; + getEvent( + key: "StartMultiCall" + ): TypedContractEvent< + StartMultiCallEvent.InputTuple, + StartMultiCallEvent.OutputTuple, + StartMultiCallEvent.OutputObject + >; + getEvent( + key: "WithdrawCollateral" + ): TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + + filters: { + "AddCollateral(address,address,uint256)": TypedContractEvent< + AddCollateralEvent.InputTuple, + AddCollateralEvent.OutputTuple, + AddCollateralEvent.OutputObject + >; + AddCollateral: TypedContractEvent< + AddCollateralEvent.InputTuple, + AddCollateralEvent.OutputTuple, + AddCollateralEvent.OutputObject + >; + + "CloseCreditAccount(address,address)": TypedContractEvent< + CloseCreditAccountEvent.InputTuple, + CloseCreditAccountEvent.OutputTuple, + CloseCreditAccountEvent.OutputObject + >; + CloseCreditAccount: TypedContractEvent< + CloseCreditAccountEvent.InputTuple, + CloseCreditAccountEvent.OutputTuple, + CloseCreditAccountEvent.OutputObject + >; + + "DecreaseDebt(address,uint256)": TypedContractEvent< + DecreaseDebtEvent.InputTuple, + DecreaseDebtEvent.OutputTuple, + DecreaseDebtEvent.OutputObject + >; + DecreaseDebt: TypedContractEvent< + DecreaseDebtEvent.InputTuple, + DecreaseDebtEvent.OutputTuple, + DecreaseDebtEvent.OutputObject + >; + + "Execute(address,address)": TypedContractEvent< + ExecuteEvent.InputTuple, + ExecuteEvent.OutputTuple, + ExecuteEvent.OutputObject + >; + Execute: TypedContractEvent< + ExecuteEvent.InputTuple, + ExecuteEvent.OutputTuple, + ExecuteEvent.OutputObject + >; + + "FinishMultiCall()": TypedContractEvent< + FinishMultiCallEvent.InputTuple, + FinishMultiCallEvent.OutputTuple, + FinishMultiCallEvent.OutputObject + >; + FinishMultiCall: TypedContractEvent< + FinishMultiCallEvent.InputTuple, + FinishMultiCallEvent.OutputTuple, + FinishMultiCallEvent.OutputObject + >; + + "IncreaseDebt(address,uint256)": TypedContractEvent< + IncreaseDebtEvent.InputTuple, + IncreaseDebtEvent.OutputTuple, + IncreaseDebtEvent.OutputObject + >; + IncreaseDebt: TypedContractEvent< + IncreaseDebtEvent.InputTuple, + IncreaseDebtEvent.OutputTuple, + IncreaseDebtEvent.OutputObject + >; + + "LiquidateCreditAccount(address,address,address,uint256)": TypedContractEvent< + LiquidateCreditAccountEvent.InputTuple, + LiquidateCreditAccountEvent.OutputTuple, + LiquidateCreditAccountEvent.OutputObject + >; + LiquidateCreditAccount: TypedContractEvent< + LiquidateCreditAccountEvent.InputTuple, + LiquidateCreditAccountEvent.OutputTuple, + LiquidateCreditAccountEvent.OutputObject + >; + + "OpenCreditAccount(address,address,address,uint256)": TypedContractEvent< + OpenCreditAccountEvent.InputTuple, + OpenCreditAccountEvent.OutputTuple, + OpenCreditAccountEvent.OutputObject + >; + OpenCreditAccount: TypedContractEvent< + OpenCreditAccountEvent.InputTuple, + OpenCreditAccountEvent.OutputTuple, + OpenCreditAccountEvent.OutputObject + >; + + "StartMultiCall(address,address)": TypedContractEvent< + StartMultiCallEvent.InputTuple, + StartMultiCallEvent.OutputTuple, + StartMultiCallEvent.OutputObject + >; + StartMultiCall: TypedContractEvent< + StartMultiCallEvent.InputTuple, + StartMultiCallEvent.OutputTuple, + StartMultiCallEvent.OutputObject + >; + + "WithdrawCollateral(address,address,uint256,address)": TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + WithdrawCollateral: TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/ICreditFacadeV3.sol/ICreditFacadeV3Events.ts b/src/types/generated/ICreditFacadeV3.sol/ICreditFacadeV3Events.ts new file mode 100644 index 0000000..9ffff7f --- /dev/null +++ b/src/types/generated/ICreditFacadeV3.sol/ICreditFacadeV3Events.ts @@ -0,0 +1,443 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + FunctionFragment, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, +} from "../common"; + +export interface ICreditFacadeV3EventsInterface extends Interface { + getEvent( + nameOrSignatureOrTopic: + | "AddCollateral" + | "CloseCreditAccount" + | "DecreaseDebt" + | "Execute" + | "FinishMultiCall" + | "IncreaseDebt" + | "LiquidateCreditAccount" + | "OpenCreditAccount" + | "StartMultiCall" + | "WithdrawCollateral" + ): EventFragment; +} + +export namespace AddCollateralEvent { + export type InputTuple = [ + creditAccount: AddressLike, + token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + creditAccount: string, + token: string, + amount: bigint + ]; + export interface OutputObject { + creditAccount: string; + token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace CloseCreditAccountEvent { + export type InputTuple = [creditAccount: AddressLike, borrower: AddressLike]; + export type OutputTuple = [creditAccount: string, borrower: string]; + export interface OutputObject { + creditAccount: string; + borrower: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace DecreaseDebtEvent { + export type InputTuple = [creditAccount: AddressLike, amount: BigNumberish]; + export type OutputTuple = [creditAccount: string, amount: bigint]; + export interface OutputObject { + creditAccount: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ExecuteEvent { + export type InputTuple = [ + creditAccount: AddressLike, + targetContract: AddressLike + ]; + export type OutputTuple = [creditAccount: string, targetContract: string]; + export interface OutputObject { + creditAccount: string; + targetContract: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace FinishMultiCallEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace IncreaseDebtEvent { + export type InputTuple = [creditAccount: AddressLike, amount: BigNumberish]; + export type OutputTuple = [creditAccount: string, amount: bigint]; + export interface OutputObject { + creditAccount: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace LiquidateCreditAccountEvent { + export type InputTuple = [ + creditAccount: AddressLike, + liquidator: AddressLike, + to: AddressLike, + remainingFunds: BigNumberish + ]; + export type OutputTuple = [ + creditAccount: string, + liquidator: string, + to: string, + remainingFunds: bigint + ]; + export interface OutputObject { + creditAccount: string; + liquidator: string; + to: string; + remainingFunds: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OpenCreditAccountEvent { + export type InputTuple = [ + creditAccount: AddressLike, + onBehalfOf: AddressLike, + caller: AddressLike, + referralCode: BigNumberish + ]; + export type OutputTuple = [ + creditAccount: string, + onBehalfOf: string, + caller: string, + referralCode: bigint + ]; + export interface OutputObject { + creditAccount: string; + onBehalfOf: string; + caller: string; + referralCode: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace StartMultiCallEvent { + export type InputTuple = [creditAccount: AddressLike, caller: AddressLike]; + export type OutputTuple = [creditAccount: string, caller: string]; + export interface OutputObject { + creditAccount: string; + caller: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace WithdrawCollateralEvent { + export type InputTuple = [ + creditAccount: AddressLike, + token: AddressLike, + amount: BigNumberish, + to: AddressLike + ]; + export type OutputTuple = [ + creditAccount: string, + token: string, + amount: bigint, + to: string + ]; + export interface OutputObject { + creditAccount: string; + token: string; + amount: bigint; + to: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface ICreditFacadeV3Events extends BaseContract { + connect(runner?: ContractRunner | null): ICreditFacadeV3Events; + waitForDeployment(): Promise; + + interface: ICreditFacadeV3EventsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + getFunction( + key: string | FunctionFragment + ): T; + + getEvent( + key: "AddCollateral" + ): TypedContractEvent< + AddCollateralEvent.InputTuple, + AddCollateralEvent.OutputTuple, + AddCollateralEvent.OutputObject + >; + getEvent( + key: "CloseCreditAccount" + ): TypedContractEvent< + CloseCreditAccountEvent.InputTuple, + CloseCreditAccountEvent.OutputTuple, + CloseCreditAccountEvent.OutputObject + >; + getEvent( + key: "DecreaseDebt" + ): TypedContractEvent< + DecreaseDebtEvent.InputTuple, + DecreaseDebtEvent.OutputTuple, + DecreaseDebtEvent.OutputObject + >; + getEvent( + key: "Execute" + ): TypedContractEvent< + ExecuteEvent.InputTuple, + ExecuteEvent.OutputTuple, + ExecuteEvent.OutputObject + >; + getEvent( + key: "FinishMultiCall" + ): TypedContractEvent< + FinishMultiCallEvent.InputTuple, + FinishMultiCallEvent.OutputTuple, + FinishMultiCallEvent.OutputObject + >; + getEvent( + key: "IncreaseDebt" + ): TypedContractEvent< + IncreaseDebtEvent.InputTuple, + IncreaseDebtEvent.OutputTuple, + IncreaseDebtEvent.OutputObject + >; + getEvent( + key: "LiquidateCreditAccount" + ): TypedContractEvent< + LiquidateCreditAccountEvent.InputTuple, + LiquidateCreditAccountEvent.OutputTuple, + LiquidateCreditAccountEvent.OutputObject + >; + getEvent( + key: "OpenCreditAccount" + ): TypedContractEvent< + OpenCreditAccountEvent.InputTuple, + OpenCreditAccountEvent.OutputTuple, + OpenCreditAccountEvent.OutputObject + >; + getEvent( + key: "StartMultiCall" + ): TypedContractEvent< + StartMultiCallEvent.InputTuple, + StartMultiCallEvent.OutputTuple, + StartMultiCallEvent.OutputObject + >; + getEvent( + key: "WithdrawCollateral" + ): TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + + filters: { + "AddCollateral(address,address,uint256)": TypedContractEvent< + AddCollateralEvent.InputTuple, + AddCollateralEvent.OutputTuple, + AddCollateralEvent.OutputObject + >; + AddCollateral: TypedContractEvent< + AddCollateralEvent.InputTuple, + AddCollateralEvent.OutputTuple, + AddCollateralEvent.OutputObject + >; + + "CloseCreditAccount(address,address)": TypedContractEvent< + CloseCreditAccountEvent.InputTuple, + CloseCreditAccountEvent.OutputTuple, + CloseCreditAccountEvent.OutputObject + >; + CloseCreditAccount: TypedContractEvent< + CloseCreditAccountEvent.InputTuple, + CloseCreditAccountEvent.OutputTuple, + CloseCreditAccountEvent.OutputObject + >; + + "DecreaseDebt(address,uint256)": TypedContractEvent< + DecreaseDebtEvent.InputTuple, + DecreaseDebtEvent.OutputTuple, + DecreaseDebtEvent.OutputObject + >; + DecreaseDebt: TypedContractEvent< + DecreaseDebtEvent.InputTuple, + DecreaseDebtEvent.OutputTuple, + DecreaseDebtEvent.OutputObject + >; + + "Execute(address,address)": TypedContractEvent< + ExecuteEvent.InputTuple, + ExecuteEvent.OutputTuple, + ExecuteEvent.OutputObject + >; + Execute: TypedContractEvent< + ExecuteEvent.InputTuple, + ExecuteEvent.OutputTuple, + ExecuteEvent.OutputObject + >; + + "FinishMultiCall()": TypedContractEvent< + FinishMultiCallEvent.InputTuple, + FinishMultiCallEvent.OutputTuple, + FinishMultiCallEvent.OutputObject + >; + FinishMultiCall: TypedContractEvent< + FinishMultiCallEvent.InputTuple, + FinishMultiCallEvent.OutputTuple, + FinishMultiCallEvent.OutputObject + >; + + "IncreaseDebt(address,uint256)": TypedContractEvent< + IncreaseDebtEvent.InputTuple, + IncreaseDebtEvent.OutputTuple, + IncreaseDebtEvent.OutputObject + >; + IncreaseDebt: TypedContractEvent< + IncreaseDebtEvent.InputTuple, + IncreaseDebtEvent.OutputTuple, + IncreaseDebtEvent.OutputObject + >; + + "LiquidateCreditAccount(address,address,address,uint256)": TypedContractEvent< + LiquidateCreditAccountEvent.InputTuple, + LiquidateCreditAccountEvent.OutputTuple, + LiquidateCreditAccountEvent.OutputObject + >; + LiquidateCreditAccount: TypedContractEvent< + LiquidateCreditAccountEvent.InputTuple, + LiquidateCreditAccountEvent.OutputTuple, + LiquidateCreditAccountEvent.OutputObject + >; + + "OpenCreditAccount(address,address,address,uint256)": TypedContractEvent< + OpenCreditAccountEvent.InputTuple, + OpenCreditAccountEvent.OutputTuple, + OpenCreditAccountEvent.OutputObject + >; + OpenCreditAccount: TypedContractEvent< + OpenCreditAccountEvent.InputTuple, + OpenCreditAccountEvent.OutputTuple, + OpenCreditAccountEvent.OutputObject + >; + + "StartMultiCall(address,address)": TypedContractEvent< + StartMultiCallEvent.InputTuple, + StartMultiCallEvent.OutputTuple, + StartMultiCallEvent.OutputObject + >; + StartMultiCall: TypedContractEvent< + StartMultiCallEvent.InputTuple, + StartMultiCallEvent.OutputTuple, + StartMultiCallEvent.OutputObject + >; + + "WithdrawCollateral(address,address,uint256,address)": TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + WithdrawCollateral: TypedContractEvent< + WithdrawCollateralEvent.InputTuple, + WithdrawCollateralEvent.OutputTuple, + WithdrawCollateralEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/ICreditFacadeV3.sol/index.ts b/src/types/generated/ICreditFacadeV3.sol/index.ts new file mode 100644 index 0000000..fcc038a --- /dev/null +++ b/src/types/generated/ICreditFacadeV3.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ICreditFacadeV3 } from "./ICreditFacadeV3"; +export type { ICreditFacadeV3Events } from "./ICreditFacadeV3Events"; diff --git a/src/types/generated/ICreditFacadeV3Multicall.ts b/src/types/generated/ICreditFacadeV3Multicall.ts new file mode 100644 index 0000000..76fafeb --- /dev/null +++ b/src/types/generated/ICreditFacadeV3Multicall.ts @@ -0,0 +1,370 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export type RevocationPairStruct = { spender: AddressLike; token: AddressLike }; + +export type RevocationPairStructOutput = [spender: string, token: string] & { + spender: string; + token: string; +}; + +export type BalanceDeltaStruct = { token: AddressLike; amount: BigNumberish }; + +export type BalanceDeltaStructOutput = [token: string, amount: bigint] & { + token: string; + amount: bigint; +}; + +export interface ICreditFacadeV3MulticallInterface extends Interface { + getFunction( + nameOrSignature: + | "addCollateral" + | "addCollateralWithPermit" + | "compareBalances" + | "decreaseDebt" + | "disableToken" + | "enableToken" + | "increaseDebt" + | "onDemandPriceUpdate" + | "revokeAdapterAllowances" + | "setFullCheckParams" + | "storeExpectedBalances" + | "updateQuota" + | "withdrawCollateral" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addCollateral", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "addCollateralWithPermit", + values: [ + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "compareBalances", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "decreaseDebt", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "disableToken", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "enableToken", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "increaseDebt", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "onDemandPriceUpdate", + values: [AddressLike, boolean, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "revokeAdapterAllowances", + values: [RevocationPairStruct[]] + ): string; + encodeFunctionData( + functionFragment: "setFullCheckParams", + values: [BigNumberish[], BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "storeExpectedBalances", + values: [BalanceDeltaStruct[]] + ): string; + encodeFunctionData( + functionFragment: "updateQuota", + values: [AddressLike, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "withdrawCollateral", + values: [AddressLike, BigNumberish, AddressLike] + ): string; + + decodeFunctionResult( + functionFragment: "addCollateral", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addCollateralWithPermit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "compareBalances", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "decreaseDebt", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "disableToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "enableToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseDebt", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "onDemandPriceUpdate", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "revokeAdapterAllowances", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setFullCheckParams", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "storeExpectedBalances", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateQuota", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "withdrawCollateral", + data: BytesLike + ): Result; +} + +export interface ICreditFacadeV3Multicall extends BaseContract { + connect(runner?: ContractRunner | null): ICreditFacadeV3Multicall; + waitForDeployment(): Promise; + + interface: ICreditFacadeV3MulticallInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + addCollateral: TypedContractMethod< + [token: AddressLike, amount: BigNumberish], + [void], + "nonpayable" + >; + + addCollateralWithPermit: TypedContractMethod< + [ + token: AddressLike, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + compareBalances: TypedContractMethod<[], [void], "nonpayable">; + + decreaseDebt: TypedContractMethod< + [amount: BigNumberish], + [void], + "nonpayable" + >; + + disableToken: TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + + enableToken: TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + + increaseDebt: TypedContractMethod< + [amount: BigNumberish], + [void], + "nonpayable" + >; + + onDemandPriceUpdate: TypedContractMethod< + [token: AddressLike, reserve: boolean, data: BytesLike], + [void], + "nonpayable" + >; + + revokeAdapterAllowances: TypedContractMethod< + [revocations: RevocationPairStruct[]], + [void], + "nonpayable" + >; + + setFullCheckParams: TypedContractMethod< + [collateralHints: BigNumberish[], minHealthFactor: BigNumberish], + [void], + "nonpayable" + >; + + storeExpectedBalances: TypedContractMethod< + [balanceDeltas: BalanceDeltaStruct[]], + [void], + "nonpayable" + >; + + updateQuota: TypedContractMethod< + [token: AddressLike, quotaChange: BigNumberish, minQuota: BigNumberish], + [void], + "nonpayable" + >; + + withdrawCollateral: TypedContractMethod< + [token: AddressLike, amount: BigNumberish, to: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "addCollateral" + ): TypedContractMethod< + [token: AddressLike, amount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "addCollateralWithPermit" + ): TypedContractMethod< + [ + token: AddressLike, + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "compareBalances" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "decreaseDebt" + ): TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "disableToken" + ): TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "enableToken" + ): TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "increaseDebt" + ): TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "onDemandPriceUpdate" + ): TypedContractMethod< + [token: AddressLike, reserve: boolean, data: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "revokeAdapterAllowances" + ): TypedContractMethod< + [revocations: RevocationPairStruct[]], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFullCheckParams" + ): TypedContractMethod< + [collateralHints: BigNumberish[], minHealthFactor: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "storeExpectedBalances" + ): TypedContractMethod< + [balanceDeltas: BalanceDeltaStruct[]], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "updateQuota" + ): TypedContractMethod< + [token: AddressLike, quotaChange: BigNumberish, minQuota: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [token: AddressLike, amount: BigNumberish, to: AddressLike], + [void], + "nonpayable" + >; + + filters: {}; +} diff --git a/src/types/generated/ICreditManagerV3.sol/ICreditManagerV3.ts b/src/types/generated/ICreditManagerV3.sol/ICreditManagerV3.ts new file mode 100644 index 0000000..6cbbf3d --- /dev/null +++ b/src/types/generated/ICreditManagerV3.sol/ICreditManagerV3.ts @@ -0,0 +1,1305 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "../common"; + +export type CollateralDebtDataStruct = { + debt: BigNumberish; + cumulativeIndexNow: BigNumberish; + cumulativeIndexLastUpdate: BigNumberish; + cumulativeQuotaInterest: BigNumberish; + accruedInterest: BigNumberish; + accruedFees: BigNumberish; + totalDebtUSD: BigNumberish; + totalValue: BigNumberish; + totalValueUSD: BigNumberish; + twvUSD: BigNumberish; + enabledTokensMask: BigNumberish; + quotedTokensMask: BigNumberish; + quotedTokens: AddressLike[]; + _poolQuotaKeeper: AddressLike; +}; + +export type CollateralDebtDataStructOutput = [ + debt: bigint, + cumulativeIndexNow: bigint, + cumulativeIndexLastUpdate: bigint, + cumulativeQuotaInterest: bigint, + accruedInterest: bigint, + accruedFees: bigint, + totalDebtUSD: bigint, + totalValue: bigint, + totalValueUSD: bigint, + twvUSD: bigint, + enabledTokensMask: bigint, + quotedTokensMask: bigint, + quotedTokens: string[], + _poolQuotaKeeper: string +] & { + debt: bigint; + cumulativeIndexNow: bigint; + cumulativeIndexLastUpdate: bigint; + cumulativeQuotaInterest: bigint; + accruedInterest: bigint; + accruedFees: bigint; + totalDebtUSD: bigint; + totalValue: bigint; + totalValueUSD: bigint; + twvUSD: bigint; + enabledTokensMask: bigint; + quotedTokensMask: bigint; + quotedTokens: string[]; + _poolQuotaKeeper: string; +}; + +export type RevocationPairStruct = { spender: AddressLike; token: AddressLike }; + +export type RevocationPairStructOutput = [spender: string, token: string] & { + spender: string; + token: string; +}; + +export interface ICreditManagerV3Interface extends Interface { + getFunction( + nameOrSignature: + | "accountFactory" + | "adapterToContract" + | "addCollateral" + | "addToken" + | "addressProvider" + | "approveCreditAccount" + | "approveToken" + | "calcDebtAndCollateral" + | "closeCreditAccount" + | "collateralTokenByMask" + | "collateralTokensCount" + | "contractToAdapter" + | "creditAccountInfo" + | "creditAccounts(uint256,uint256)" + | "creditAccounts()" + | "creditAccountsLen" + | "creditConfigurator" + | "creditFacade" + | "enabledTokensMaskOf" + | "execute" + | "externalCall" + | "fees" + | "flagsOf" + | "fullCollateralCheck" + | "getActiveCreditAccountOrRevert" + | "getBorrowerOrRevert" + | "getTokenByMask" + | "getTokenMaskOrRevert" + | "isLiquidatable" + | "liquidateCreditAccount" + | "liquidationThresholds" + | "ltParams" + | "manageDebt" + | "maxEnabledTokens" + | "name" + | "openCreditAccount" + | "pool" + | "poolQuotaKeeper" + | "priceOracle" + | "quotedTokensMask" + | "revokeAdapterAllowances" + | "setActiveCreditAccount" + | "setCollateralTokenData" + | "setContractAllowance" + | "setCreditConfigurator" + | "setCreditFacade" + | "setFees" + | "setFlagFor" + | "setMaxEnabledTokens" + | "setPriceOracle" + | "setQuotedMask" + | "underlying" + | "updateQuota" + | "version" + | "withdrawCollateral" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "SetCreditConfigurator"): EventFragment; + + encodeFunctionData( + functionFragment: "accountFactory", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "adapterToContract", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "addCollateral", + values: [AddressLike, AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "addToken", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "addressProvider", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "approveCreditAccount", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "approveToken", + values: [AddressLike, AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "calcDebtAndCollateral", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "closeCreditAccount", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "collateralTokenByMask", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "collateralTokensCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "contractToAdapter", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "creditAccountInfo", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "creditAccounts(uint256,uint256)", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "creditAccounts()", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "creditAccountsLen", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "creditConfigurator", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "creditFacade", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "enabledTokensMaskOf", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "execute", values: [BytesLike]): string; + encodeFunctionData( + functionFragment: "externalCall", + values: [AddressLike, AddressLike, BytesLike] + ): string; + encodeFunctionData(functionFragment: "fees", values?: undefined): string; + encodeFunctionData( + functionFragment: "flagsOf", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "fullCollateralCheck", + values: [AddressLike, BigNumberish, BigNumberish[], BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "getActiveCreditAccountOrRevert", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getBorrowerOrRevert", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "getTokenByMask", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getTokenMaskOrRevert", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "isLiquidatable", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "liquidateCreditAccount", + values: [AddressLike, CollateralDebtDataStruct, AddressLike, boolean] + ): string; + encodeFunctionData( + functionFragment: "liquidationThresholds", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "ltParams", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "manageDebt", + values: [AddressLike, BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "maxEnabledTokens", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "openCreditAccount", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "pool", values?: undefined): string; + encodeFunctionData( + functionFragment: "poolQuotaKeeper", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "priceOracle", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "quotedTokensMask", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "revokeAdapterAllowances", + values: [AddressLike, RevocationPairStruct[]] + ): string; + encodeFunctionData( + functionFragment: "setActiveCreditAccount", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setCollateralTokenData", + values: [ + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "setContractAllowance", + values: [AddressLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setCreditConfigurator", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setCreditFacade", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setFees", + values: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "setFlagFor", + values: [AddressLike, BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "setMaxEnabledTokens", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPriceOracle", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setQuotedMask", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "underlying", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "updateQuota", + values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "withdrawCollateral", + values: [AddressLike, AddressLike, BigNumberish, AddressLike] + ): string; + + decodeFunctionResult( + functionFragment: "accountFactory", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "adapterToContract", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addCollateral", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addToken", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addressProvider", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "approveCreditAccount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "approveToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "calcDebtAndCollateral", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "closeCreditAccount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "collateralTokenByMask", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "collateralTokensCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "contractToAdapter", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "creditAccountInfo", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "creditAccounts(uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "creditAccounts()", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "creditAccountsLen", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "creditConfigurator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "creditFacade", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "enabledTokensMaskOf", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "externalCall", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "fees", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "flagsOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "fullCollateralCheck", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getActiveCreditAccountOrRevert", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBorrowerOrRevert", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTokenByMask", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTokenMaskOrRevert", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isLiquidatable", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "liquidateCreditAccount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "liquidationThresholds", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ltParams", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "manageDebt", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "maxEnabledTokens", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "openCreditAccount", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "pool", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "poolQuotaKeeper", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "priceOracle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "quotedTokensMask", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "revokeAdapterAllowances", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setActiveCreditAccount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setCollateralTokenData", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setContractAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setCreditConfigurator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setCreditFacade", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setFees", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setFlagFor", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setMaxEnabledTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPriceOracle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setQuotedMask", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "underlying", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updateQuota", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawCollateral", + data: BytesLike + ): Result; +} + +export namespace SetCreditConfiguratorEvent { + export type InputTuple = [newConfigurator: AddressLike]; + export type OutputTuple = [newConfigurator: string]; + export interface OutputObject { + newConfigurator: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface ICreditManagerV3 extends BaseContract { + connect(runner?: ContractRunner | null): ICreditManagerV3; + waitForDeployment(): Promise; + + interface: ICreditManagerV3Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + accountFactory: TypedContractMethod<[], [string], "view">; + + adapterToContract: TypedContractMethod< + [adapter: AddressLike], + [string], + "view" + >; + + addCollateral: TypedContractMethod< + [ + payer: AddressLike, + creditAccount: AddressLike, + token: AddressLike, + amount: BigNumberish + ], + [bigint], + "nonpayable" + >; + + addToken: TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + + addressProvider: TypedContractMethod<[], [string], "view">; + + approveCreditAccount: TypedContractMethod< + [token: AddressLike, amount: BigNumberish], + [void], + "nonpayable" + >; + + approveToken: TypedContractMethod< + [ + creditAccount: AddressLike, + token: AddressLike, + spender: AddressLike, + amount: BigNumberish + ], + [void], + "nonpayable" + >; + + calcDebtAndCollateral: TypedContractMethod< + [creditAccount: AddressLike, task: BigNumberish], + [CollateralDebtDataStructOutput], + "view" + >; + + closeCreditAccount: TypedContractMethod< + [creditAccount: AddressLike], + [void], + "nonpayable" + >; + + collateralTokenByMask: TypedContractMethod< + [tokenMask: BigNumberish], + [[string, bigint] & { token: string; liquidationThreshold: bigint }], + "view" + >; + + collateralTokensCount: TypedContractMethod<[], [bigint], "view">; + + contractToAdapter: TypedContractMethod< + [targetContract: AddressLike], + [string], + "view" + >; + + creditAccountInfo: TypedContractMethod< + [creditAccount: AddressLike], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, bigint, string] & { + debt: bigint; + cumulativeIndexLastUpdate: bigint; + cumulativeQuotaInterest: bigint; + quotaFees: bigint; + enabledTokensMask: bigint; + flags: bigint; + lastDebtUpdate: bigint; + borrower: string; + } + ], + "view" + >; + + "creditAccounts(uint256,uint256)": TypedContractMethod< + [offset: BigNumberish, limit: BigNumberish], + [string[]], + "view" + >; + + "creditAccounts()": TypedContractMethod<[], [string[]], "view">; + + creditAccountsLen: TypedContractMethod<[], [bigint], "view">; + + creditConfigurator: TypedContractMethod<[], [string], "view">; + + creditFacade: TypedContractMethod<[], [string], "view">; + + enabledTokensMaskOf: TypedContractMethod< + [creditAccount: AddressLike], + [bigint], + "view" + >; + + execute: TypedContractMethod<[data: BytesLike], [string], "nonpayable">; + + externalCall: TypedContractMethod< + [creditAccount: AddressLike, target: AddressLike, callData: BytesLike], + [string], + "nonpayable" + >; + + fees: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + feeInterest: bigint; + feeLiquidation: bigint; + liquidationDiscount: bigint; + feeLiquidationExpired: bigint; + liquidationDiscountExpired: bigint; + } + ], + "view" + >; + + flagsOf: TypedContractMethod<[creditAccount: AddressLike], [bigint], "view">; + + fullCollateralCheck: TypedContractMethod< + [ + creditAccount: AddressLike, + enabledTokensMask: BigNumberish, + collateralHints: BigNumberish[], + minHealthFactor: BigNumberish, + useSafePrices: boolean + ], + [bigint], + "nonpayable" + >; + + getActiveCreditAccountOrRevert: TypedContractMethod<[], [string], "view">; + + getBorrowerOrRevert: TypedContractMethod< + [creditAccount: AddressLike], + [string], + "view" + >; + + getTokenByMask: TypedContractMethod< + [tokenMask: BigNumberish], + [string], + "view" + >; + + getTokenMaskOrRevert: TypedContractMethod< + [token: AddressLike], + [bigint], + "view" + >; + + isLiquidatable: TypedContractMethod< + [creditAccount: AddressLike, minHealthFactor: BigNumberish], + [boolean], + "view" + >; + + liquidateCreditAccount: TypedContractMethod< + [ + creditAccount: AddressLike, + collateralDebtData: CollateralDebtDataStruct, + to: AddressLike, + isExpired: boolean + ], + [[bigint, bigint] & { remainingFunds: bigint; loss: bigint }], + "nonpayable" + >; + + liquidationThresholds: TypedContractMethod< + [token: AddressLike], + [bigint], + "view" + >; + + ltParams: TypedContractMethod< + [token: AddressLike], + [ + [bigint, bigint, bigint, bigint] & { + ltInitial: bigint; + ltFinal: bigint; + timestampRampStart: bigint; + rampDuration: bigint; + } + ], + "view" + >; + + manageDebt: TypedContractMethod< + [ + creditAccount: AddressLike, + amount: BigNumberish, + enabledTokensMask: BigNumberish, + action: BigNumberish + ], + [ + [bigint, bigint, bigint] & { + newDebt: bigint; + tokensToEnable: bigint; + tokensToDisable: bigint; + } + ], + "nonpayable" + >; + + maxEnabledTokens: TypedContractMethod<[], [bigint], "view">; + + name: TypedContractMethod<[], [string], "view">; + + openCreditAccount: TypedContractMethod< + [onBehalfOf: AddressLike], + [string], + "nonpayable" + >; + + pool: TypedContractMethod<[], [string], "view">; + + poolQuotaKeeper: TypedContractMethod<[], [string], "view">; + + priceOracle: TypedContractMethod<[], [string], "view">; + + quotedTokensMask: TypedContractMethod<[], [bigint], "view">; + + revokeAdapterAllowances: TypedContractMethod< + [creditAccount: AddressLike, revocations: RevocationPairStruct[]], + [void], + "nonpayable" + >; + + setActiveCreditAccount: TypedContractMethod< + [creditAccount: AddressLike], + [void], + "nonpayable" + >; + + setCollateralTokenData: TypedContractMethod< + [ + token: AddressLike, + ltInitial: BigNumberish, + ltFinal: BigNumberish, + timestampRampStart: BigNumberish, + rampDuration: BigNumberish + ], + [void], + "nonpayable" + >; + + setContractAllowance: TypedContractMethod< + [adapter: AddressLike, targetContract: AddressLike], + [void], + "nonpayable" + >; + + setCreditConfigurator: TypedContractMethod< + [creditConfigurator: AddressLike], + [void], + "nonpayable" + >; + + setCreditFacade: TypedContractMethod< + [creditFacade: AddressLike], + [void], + "nonpayable" + >; + + setFees: TypedContractMethod< + [ + feeInterest: BigNumberish, + feeLiquidation: BigNumberish, + liquidationDiscount: BigNumberish, + feeLiquidationExpired: BigNumberish, + liquidationDiscountExpired: BigNumberish + ], + [void], + "nonpayable" + >; + + setFlagFor: TypedContractMethod< + [creditAccount: AddressLike, flag: BigNumberish, value: boolean], + [void], + "nonpayable" + >; + + setMaxEnabledTokens: TypedContractMethod< + [maxEnabledTokens: BigNumberish], + [void], + "nonpayable" + >; + + setPriceOracle: TypedContractMethod< + [priceOracle: AddressLike], + [void], + "nonpayable" + >; + + setQuotedMask: TypedContractMethod< + [quotedTokensMask: BigNumberish], + [void], + "nonpayable" + >; + + underlying: TypedContractMethod<[], [string], "view">; + + updateQuota: TypedContractMethod< + [ + creditAccount: AddressLike, + token: AddressLike, + quotaChange: BigNumberish, + minQuota: BigNumberish, + maxQuota: BigNumberish + ], + [[bigint, bigint] & { tokensToEnable: bigint; tokensToDisable: bigint }], + "nonpayable" + >; + + version: TypedContractMethod<[], [bigint], "view">; + + withdrawCollateral: TypedContractMethod< + [ + creditAccount: AddressLike, + token: AddressLike, + amount: BigNumberish, + to: AddressLike + ], + [bigint], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "accountFactory" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "adapterToContract" + ): TypedContractMethod<[adapter: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "addCollateral" + ): TypedContractMethod< + [ + payer: AddressLike, + creditAccount: AddressLike, + token: AddressLike, + amount: BigNumberish + ], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "addToken" + ): TypedContractMethod<[token: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "addressProvider" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "approveCreditAccount" + ): TypedContractMethod< + [token: AddressLike, amount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "approveToken" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + token: AddressLike, + spender: AddressLike, + amount: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "calcDebtAndCollateral" + ): TypedContractMethod< + [creditAccount: AddressLike, task: BigNumberish], + [CollateralDebtDataStructOutput], + "view" + >; + getFunction( + nameOrSignature: "closeCreditAccount" + ): TypedContractMethod<[creditAccount: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "collateralTokenByMask" + ): TypedContractMethod< + [tokenMask: BigNumberish], + [[string, bigint] & { token: string; liquidationThreshold: bigint }], + "view" + >; + getFunction( + nameOrSignature: "collateralTokensCount" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "contractToAdapter" + ): TypedContractMethod<[targetContract: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "creditAccountInfo" + ): TypedContractMethod< + [creditAccount: AddressLike], + [ + [bigint, bigint, bigint, bigint, bigint, bigint, bigint, string] & { + debt: bigint; + cumulativeIndexLastUpdate: bigint; + cumulativeQuotaInterest: bigint; + quotaFees: bigint; + enabledTokensMask: bigint; + flags: bigint; + lastDebtUpdate: bigint; + borrower: string; + } + ], + "view" + >; + getFunction( + nameOrSignature: "creditAccounts(uint256,uint256)" + ): TypedContractMethod< + [offset: BigNumberish, limit: BigNumberish], + [string[]], + "view" + >; + getFunction( + nameOrSignature: "creditAccounts()" + ): TypedContractMethod<[], [string[]], "view">; + getFunction( + nameOrSignature: "creditAccountsLen" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "creditConfigurator" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "creditFacade" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "enabledTokensMaskOf" + ): TypedContractMethod<[creditAccount: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "execute" + ): TypedContractMethod<[data: BytesLike], [string], "nonpayable">; + getFunction( + nameOrSignature: "externalCall" + ): TypedContractMethod< + [creditAccount: AddressLike, target: AddressLike, callData: BytesLike], + [string], + "nonpayable" + >; + getFunction( + nameOrSignature: "fees" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + feeInterest: bigint; + feeLiquidation: bigint; + liquidationDiscount: bigint; + feeLiquidationExpired: bigint; + liquidationDiscountExpired: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "flagsOf" + ): TypedContractMethod<[creditAccount: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "fullCollateralCheck" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + enabledTokensMask: BigNumberish, + collateralHints: BigNumberish[], + minHealthFactor: BigNumberish, + useSafePrices: boolean + ], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "getActiveCreditAccountOrRevert" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getBorrowerOrRevert" + ): TypedContractMethod<[creditAccount: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "getTokenByMask" + ): TypedContractMethod<[tokenMask: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "getTokenMaskOrRevert" + ): TypedContractMethod<[token: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "isLiquidatable" + ): TypedContractMethod< + [creditAccount: AddressLike, minHealthFactor: BigNumberish], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "liquidateCreditAccount" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + collateralDebtData: CollateralDebtDataStruct, + to: AddressLike, + isExpired: boolean + ], + [[bigint, bigint] & { remainingFunds: bigint; loss: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "liquidationThresholds" + ): TypedContractMethod<[token: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "ltParams" + ): TypedContractMethod< + [token: AddressLike], + [ + [bigint, bigint, bigint, bigint] & { + ltInitial: bigint; + ltFinal: bigint; + timestampRampStart: bigint; + rampDuration: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "manageDebt" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + amount: BigNumberish, + enabledTokensMask: BigNumberish, + action: BigNumberish + ], + [ + [bigint, bigint, bigint] & { + newDebt: bigint; + tokensToEnable: bigint; + tokensToDisable: bigint; + } + ], + "nonpayable" + >; + getFunction( + nameOrSignature: "maxEnabledTokens" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "openCreditAccount" + ): TypedContractMethod<[onBehalfOf: AddressLike], [string], "nonpayable">; + getFunction( + nameOrSignature: "pool" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "poolQuotaKeeper" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "priceOracle" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "quotedTokensMask" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "revokeAdapterAllowances" + ): TypedContractMethod< + [creditAccount: AddressLike, revocations: RevocationPairStruct[]], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setActiveCreditAccount" + ): TypedContractMethod<[creditAccount: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setCollateralTokenData" + ): TypedContractMethod< + [ + token: AddressLike, + ltInitial: BigNumberish, + ltFinal: BigNumberish, + timestampRampStart: BigNumberish, + rampDuration: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setContractAllowance" + ): TypedContractMethod< + [adapter: AddressLike, targetContract: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCreditConfigurator" + ): TypedContractMethod< + [creditConfigurator: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setCreditFacade" + ): TypedContractMethod<[creditFacade: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setFees" + ): TypedContractMethod< + [ + feeInterest: BigNumberish, + feeLiquidation: BigNumberish, + liquidationDiscount: BigNumberish, + feeLiquidationExpired: BigNumberish, + liquidationDiscountExpired: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setFlagFor" + ): TypedContractMethod< + [creditAccount: AddressLike, flag: BigNumberish, value: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setMaxEnabledTokens" + ): TypedContractMethod< + [maxEnabledTokens: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setPriceOracle" + ): TypedContractMethod<[priceOracle: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setQuotedMask" + ): TypedContractMethod< + [quotedTokensMask: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "underlying" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "updateQuota" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + token: AddressLike, + quotaChange: BigNumberish, + minQuota: BigNumberish, + maxQuota: BigNumberish + ], + [[bigint, bigint] & { tokensToEnable: bigint; tokensToDisable: bigint }], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "withdrawCollateral" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + token: AddressLike, + amount: BigNumberish, + to: AddressLike + ], + [bigint], + "nonpayable" + >; + + getEvent( + key: "SetCreditConfigurator" + ): TypedContractEvent< + SetCreditConfiguratorEvent.InputTuple, + SetCreditConfiguratorEvent.OutputTuple, + SetCreditConfiguratorEvent.OutputObject + >; + + filters: { + "SetCreditConfigurator(address)": TypedContractEvent< + SetCreditConfiguratorEvent.InputTuple, + SetCreditConfiguratorEvent.OutputTuple, + SetCreditConfiguratorEvent.OutputObject + >; + SetCreditConfigurator: TypedContractEvent< + SetCreditConfiguratorEvent.InputTuple, + SetCreditConfiguratorEvent.OutputTuple, + SetCreditConfiguratorEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/ICreditManagerV3.sol/ICreditManagerV3Events.ts b/src/types/generated/ICreditManagerV3.sol/ICreditManagerV3Events.ts new file mode 100644 index 0000000..da4f130 --- /dev/null +++ b/src/types/generated/ICreditManagerV3.sol/ICreditManagerV3Events.ts @@ -0,0 +1,105 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + FunctionFragment, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, +} from "../common"; + +export interface ICreditManagerV3EventsInterface extends Interface { + getEvent(nameOrSignatureOrTopic: "SetCreditConfigurator"): EventFragment; +} + +export namespace SetCreditConfiguratorEvent { + export type InputTuple = [newConfigurator: AddressLike]; + export type OutputTuple = [newConfigurator: string]; + export interface OutputObject { + newConfigurator: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface ICreditManagerV3Events extends BaseContract { + connect(runner?: ContractRunner | null): ICreditManagerV3Events; + waitForDeployment(): Promise; + + interface: ICreditManagerV3EventsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + getFunction( + key: string | FunctionFragment + ): T; + + getEvent( + key: "SetCreditConfigurator" + ): TypedContractEvent< + SetCreditConfiguratorEvent.InputTuple, + SetCreditConfiguratorEvent.OutputTuple, + SetCreditConfiguratorEvent.OutputObject + >; + + filters: { + "SetCreditConfigurator(address)": TypedContractEvent< + SetCreditConfiguratorEvent.InputTuple, + SetCreditConfiguratorEvent.OutputTuple, + SetCreditConfiguratorEvent.OutputObject + >; + SetCreditConfigurator: TypedContractEvent< + SetCreditConfiguratorEvent.InputTuple, + SetCreditConfiguratorEvent.OutputTuple, + SetCreditConfiguratorEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/ICreditManagerV3.sol/index.ts b/src/types/generated/ICreditManagerV3.sol/index.ts new file mode 100644 index 0000000..58abfb7 --- /dev/null +++ b/src/types/generated/ICreditManagerV3.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ICreditManagerV3 } from "./ICreditManagerV3"; +export type { ICreditManagerV3Events } from "./ICreditManagerV3Events"; diff --git a/src/types/generated/IDaiLikePermit.ts b/src/types/generated/IDaiLikePermit.ts new file mode 100644 index 0000000..c9cec15 --- /dev/null +++ b/src/types/generated/IDaiLikePermit.ts @@ -0,0 +1,124 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IDaiLikePermitInterface extends Interface { + getFunction(nameOrSignature: "permit"): FunctionFragment; + + encodeFunctionData( + functionFragment: "permit", + values: [ + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; +} + +export interface IDaiLikePermit extends BaseContract { + connect(runner?: ContractRunner | null): IDaiLikePermit; + waitForDeployment(): Promise; + + interface: IDaiLikePermitInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + permit: TypedContractMethod< + [ + holder: AddressLike, + spender: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + allowed: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + holder: AddressLike, + spender: AddressLike, + nonce: BigNumberish, + expiry: BigNumberish, + allowed: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + filters: {}; +} diff --git a/src/types/generated/IERC20.ts b/src/types/generated/IERC20.ts new file mode 100644 index 0000000..5c78f96 --- /dev/null +++ b/src/types/generated/IERC20.ts @@ -0,0 +1,262 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IERC20Interface extends Interface { + getFunction( + nameOrSignature: + | "allowance" + | "approve" + | "balanceOf" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [AddressLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; +} + +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 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 IERC20 extends BaseContract { + connect(runner?: ContractRunner | null): IERC20; + waitForDeployment(): Promise; + + interface: IERC20Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + 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< + [to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + 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< + [to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: 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)": 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/src/types/generated/IERC20Metadata.ts b/src/types/generated/IERC20Metadata.ts new file mode 100644 index 0000000..79fcb31 --- /dev/null +++ b/src/types/generated/IERC20Metadata.ts @@ -0,0 +1,286 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IERC20MetadataInterface extends Interface { + getFunction( + nameOrSignature: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [AddressLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; +} + +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 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 IERC20Metadata extends BaseContract { + connect(runner?: ContractRunner | null): IERC20Metadata; + waitForDeployment(): Promise; + + interface: IERC20MetadataInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + 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">; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + 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: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: 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)": 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/src/types/generated/IERC20Permit.ts b/src/types/generated/IERC20Permit.ts new file mode 100644 index 0000000..9d1f1b3 --- /dev/null +++ b/src/types/generated/IERC20Permit.ts @@ -0,0 +1,143 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IERC20PermitInterface extends Interface { + getFunction( + nameOrSignature: "DOMAIN_SEPARATOR" | "nonces" | "permit" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; +} + +export interface IERC20Permit extends BaseContract { + connect(runner?: ContractRunner | null): IERC20Permit; + waitForDeployment(): Promise; + + interface: IERC20PermitInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + 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; + + 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: {}; +} diff --git a/src/types/generated/ILiquidator.ts b/src/types/generated/ILiquidator.ts new file mode 100644 index 0000000..abd4d85 --- /dev/null +++ b/src/types/generated/ILiquidator.ts @@ -0,0 +1,366 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export type MultiCallStruct = { target: AddressLike; callData: BytesLike }; + +export type MultiCallStructOutput = [target: string, callData: string] & { + target: string; + callData: string; +}; + +export type LiquidationResultStruct = { + calls: MultiCallStruct[]; + profit: BigNumberish; + amountIn: BigNumberish; + amountOut: BigNumberish; +}; + +export type LiquidationResultStructOutput = [ + calls: MultiCallStructOutput[], + profit: bigint, + amountIn: bigint, + amountOut: bigint +] & { + calls: MultiCallStructOutput[]; + profit: bigint; + amountIn: bigint; + amountOut: bigint; +}; + +export declare namespace IPartialLiquidationBotV3 { + export type PriceUpdateStruct = { + token: AddressLike; + reserve: boolean; + data: BytesLike; + }; + + export type PriceUpdateStructOutput = [ + token: string, + reserve: boolean, + data: string + ] & { token: string; reserve: boolean; data: string }; +} + +export interface ILiquidatorInterface extends Interface { + getFunction( + nameOrSignature: + | "cmToCA" + | "getOptimalLiquidation" + | "partialLiquidateAndConvert" + | "partialLiquidationBot" + | "previewPartialLiquidation" + | "registerCM" + | "router" + | "setPartialLiquidationBot" + | "setRouter" + | "withdrawToken" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "cmToCA", values: [AddressLike]): string; + encodeFunctionData( + functionFragment: "getOptimalLiquidation", + values: [ + AddressLike, + BigNumberish, + IPartialLiquidationBotV3.PriceUpdateStruct[] + ] + ): string; + encodeFunctionData( + functionFragment: "partialLiquidateAndConvert", + values: [ + AddressLike, + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + IPartialLiquidationBotV3.PriceUpdateStruct[], + MultiCallStruct[] + ] + ): string; + encodeFunctionData( + functionFragment: "partialLiquidationBot", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "previewPartialLiquidation", + values: [ + AddressLike, + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + IPartialLiquidationBotV3.PriceUpdateStruct[], + AddressLike[], + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "registerCM", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "setPartialLiquidationBot", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setRouter", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "withdrawToken", + values: [AddressLike, BigNumberish, AddressLike] + ): string; + + decodeFunctionResult(functionFragment: "cmToCA", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getOptimalLiquidation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "partialLiquidateAndConvert", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "partialLiquidationBot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "previewPartialLiquidation", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "registerCM", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setPartialLiquidationBot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setRouter", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawToken", + data: BytesLike + ): Result; +} + +export interface ILiquidator extends BaseContract { + connect(runner?: ContractRunner | null): ILiquidator; + waitForDeployment(): Promise; + + interface: ILiquidatorInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + cmToCA: TypedContractMethod<[cm: AddressLike], [string], "view">; + + getOptimalLiquidation: TypedContractMethod< + [ + creditAccount: AddressLike, + hfOptimal: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[] + ], + [ + [string, bigint, bigint, bigint, boolean] & { + tokenOut: string; + optimalAmount: bigint; + repaidAmount: bigint; + flashLoanAmount: bigint; + isOptimalRepayable: boolean; + } + ], + "nonpayable" + >; + + partialLiquidateAndConvert: TypedContractMethod< + [ + creditManager: AddressLike, + creditAccount: AddressLike, + assetOut: AddressLike, + amountOut: BigNumberish, + flashLoanAmount: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], + conversionCalls: MultiCallStruct[] + ], + [void], + "nonpayable" + >; + + partialLiquidationBot: TypedContractMethod<[], [string], "view">; + + previewPartialLiquidation: TypedContractMethod< + [ + creditManager: AddressLike, + creditAccount: AddressLike, + assetOut: AddressLike, + amountOut: BigNumberish, + flashLoanAmount: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], + connectors: AddressLike[], + slippage: BigNumberish + ], + [LiquidationResultStructOutput], + "nonpayable" + >; + + registerCM: TypedContractMethod< + [creditManager: AddressLike], + [void], + "nonpayable" + >; + + router: TypedContractMethod<[], [string], "view">; + + setPartialLiquidationBot: TypedContractMethod< + [newPLB: AddressLike], + [void], + "nonpayable" + >; + + setRouter: TypedContractMethod< + [newRouter: AddressLike], + [void], + "nonpayable" + >; + + withdrawToken: TypedContractMethod< + [token: AddressLike, amount: BigNumberish, to: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "cmToCA" + ): TypedContractMethod<[cm: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "getOptimalLiquidation" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + hfOptimal: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[] + ], + [ + [string, bigint, bigint, bigint, boolean] & { + tokenOut: string; + optimalAmount: bigint; + repaidAmount: bigint; + flashLoanAmount: bigint; + isOptimalRepayable: boolean; + } + ], + "nonpayable" + >; + getFunction( + nameOrSignature: "partialLiquidateAndConvert" + ): TypedContractMethod< + [ + creditManager: AddressLike, + creditAccount: AddressLike, + assetOut: AddressLike, + amountOut: BigNumberish, + flashLoanAmount: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], + conversionCalls: MultiCallStruct[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "partialLiquidationBot" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "previewPartialLiquidation" + ): TypedContractMethod< + [ + creditManager: AddressLike, + creditAccount: AddressLike, + assetOut: AddressLike, + amountOut: BigNumberish, + flashLoanAmount: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], + connectors: AddressLike[], + slippage: BigNumberish + ], + [LiquidationResultStructOutput], + "nonpayable" + >; + getFunction( + nameOrSignature: "registerCM" + ): TypedContractMethod<[creditManager: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "router" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setPartialLiquidationBot" + ): TypedContractMethod<[newPLB: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setRouter" + ): TypedContractMethod<[newRouter: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "withdrawToken" + ): TypedContractMethod< + [token: AddressLike, amount: BigNumberish, to: AddressLike], + [void], + "nonpayable" + >; + + filters: {}; +} diff --git a/src/types/generated/IPartialLiquidationBotV3.ts b/src/types/generated/IPartialLiquidationBotV3.ts new file mode 100644 index 0000000..96a259f --- /dev/null +++ b/src/types/generated/IPartialLiquidationBotV3.ts @@ -0,0 +1,307 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common"; + +export declare namespace IPartialLiquidationBotV3 { + export type PriceUpdateStruct = { + token: AddressLike; + reserve: boolean; + data: BytesLike; + }; + + export type PriceUpdateStructOutput = [ + token: string, + reserve: boolean, + data: string + ] & { token: string; reserve: boolean; data: string }; +} + +export interface IPartialLiquidationBotV3Interface extends Interface { + getFunction( + nameOrSignature: + | "feeScaleFactor" + | "liquidateExactCollateral" + | "liquidateExactDebt" + | "maxHealthFactor" + | "minHealthFactor" + | "premiumScaleFactor" + | "treasury" + | "version" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "LiquidatePartial"): EventFragment; + + encodeFunctionData( + functionFragment: "feeScaleFactor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "liquidateExactCollateral", + values: [ + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + AddressLike, + IPartialLiquidationBotV3.PriceUpdateStruct[] + ] + ): string; + encodeFunctionData( + functionFragment: "liquidateExactDebt", + values: [ + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + AddressLike, + IPartialLiquidationBotV3.PriceUpdateStruct[] + ] + ): string; + encodeFunctionData( + functionFragment: "maxHealthFactor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "minHealthFactor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "premiumScaleFactor", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "treasury", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "feeScaleFactor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "liquidateExactCollateral", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "liquidateExactDebt", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "maxHealthFactor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "minHealthFactor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "premiumScaleFactor", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "treasury", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; +} + +export namespace LiquidatePartialEvent { + export type InputTuple = [ + creditManager: AddressLike, + creditAccount: AddressLike, + token: AddressLike, + repaidDebt: BigNumberish, + seizedCollateral: BigNumberish, + fee: BigNumberish + ]; + export type OutputTuple = [ + creditManager: string, + creditAccount: string, + token: string, + repaidDebt: bigint, + seizedCollateral: bigint, + fee: bigint + ]; + export interface OutputObject { + creditManager: string; + creditAccount: string; + token: string; + repaidDebt: bigint; + seizedCollateral: bigint; + fee: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IPartialLiquidationBotV3 extends BaseContract { + connect(runner?: ContractRunner | null): IPartialLiquidationBotV3; + waitForDeployment(): Promise; + + interface: IPartialLiquidationBotV3Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + feeScaleFactor: TypedContractMethod<[], [bigint], "view">; + + liquidateExactCollateral: TypedContractMethod< + [ + creditAccount: AddressLike, + token: AddressLike, + seizedAmount: BigNumberish, + maxRepaidAmount: BigNumberish, + to: AddressLike, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[] + ], + [bigint], + "nonpayable" + >; + + liquidateExactDebt: TypedContractMethod< + [ + creditAccount: AddressLike, + token: AddressLike, + repaidAmount: BigNumberish, + minSeizedAmount: BigNumberish, + to: AddressLike, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[] + ], + [bigint], + "nonpayable" + >; + + maxHealthFactor: TypedContractMethod<[], [bigint], "view">; + + minHealthFactor: TypedContractMethod<[], [bigint], "view">; + + premiumScaleFactor: TypedContractMethod<[], [bigint], "view">; + + treasury: TypedContractMethod<[], [string], "view">; + + version: TypedContractMethod<[], [bigint], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "feeScaleFactor" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "liquidateExactCollateral" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + token: AddressLike, + seizedAmount: BigNumberish, + maxRepaidAmount: BigNumberish, + to: AddressLike, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[] + ], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "liquidateExactDebt" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + token: AddressLike, + repaidAmount: BigNumberish, + minSeizedAmount: BigNumberish, + to: AddressLike, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[] + ], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "maxHealthFactor" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "minHealthFactor" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "premiumScaleFactor" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "treasury" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + + getEvent( + key: "LiquidatePartial" + ): TypedContractEvent< + LiquidatePartialEvent.InputTuple, + LiquidatePartialEvent.OutputTuple, + LiquidatePartialEvent.OutputObject + >; + + filters: { + "LiquidatePartial(address,address,address,uint256,uint256,uint256)": TypedContractEvent< + LiquidatePartialEvent.InputTuple, + LiquidatePartialEvent.OutputTuple, + LiquidatePartialEvent.OutputObject + >; + LiquidatePartial: TypedContractEvent< + LiquidatePartialEvent.InputTuple, + LiquidatePartialEvent.OutputTuple, + LiquidatePartialEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/IPermit2.ts b/src/types/generated/IPermit2.ts new file mode 100644 index 0000000..e173625 --- /dev/null +++ b/src/types/generated/IPermit2.ts @@ -0,0 +1,200 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export declare namespace IPermit2 { + export type PackedAllowanceStruct = { + amount: BigNumberish; + expiration: BigNumberish; + nonce: BigNumberish; + }; + + export type PackedAllowanceStructOutput = [ + amount: bigint, + expiration: bigint, + nonce: bigint + ] & { amount: bigint; expiration: bigint; nonce: bigint }; + + export type PermitDetailsStruct = { + token: AddressLike; + amount: BigNumberish; + expiration: BigNumberish; + nonce: BigNumberish; + }; + + export type PermitDetailsStructOutput = [ + token: string, + amount: bigint, + expiration: bigint, + nonce: bigint + ] & { token: string; amount: bigint; expiration: bigint; nonce: bigint }; + + export type PermitSingleStruct = { + details: IPermit2.PermitDetailsStruct; + spender: AddressLike; + sigDeadline: BigNumberish; + }; + + export type PermitSingleStructOutput = [ + details: IPermit2.PermitDetailsStructOutput, + spender: string, + sigDeadline: bigint + ] & { + details: IPermit2.PermitDetailsStructOutput; + spender: string; + sigDeadline: bigint; + }; +} + +export interface IPermit2Interface extends Interface { + getFunction( + nameOrSignature: "allowance" | "permit" | "transferFrom" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [AddressLike, AddressLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [AddressLike, IPermit2.PermitSingleStruct, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [AddressLike, AddressLike, BigNumberish, AddressLike] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; +} + +export interface IPermit2 extends BaseContract { + connect(runner?: ContractRunner | null): IPermit2; + waitForDeployment(): Promise; + + interface: IPermit2Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + allowance: TypedContractMethod< + [user: AddressLike, token: AddressLike, spender: AddressLike], + [IPermit2.PackedAllowanceStructOutput], + "view" + >; + + permit: TypedContractMethod< + [ + owner: AddressLike, + permitSingle: IPermit2.PermitSingleStruct, + signature: BytesLike + ], + [void], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [ + user: AddressLike, + spender: AddressLike, + amount: BigNumberish, + token: AddressLike + ], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [user: AddressLike, token: AddressLike, spender: AddressLike], + [IPermit2.PackedAllowanceStructOutput], + "view" + >; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + permitSingle: IPermit2.PermitSingleStruct, + signature: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [ + user: AddressLike, + spender: AddressLike, + amount: BigNumberish, + token: AddressLike + ], + [void], + "nonpayable" + >; + + filters: {}; +} diff --git a/src/types/generated/IPriceFeed.sol/IPriceFeed.ts b/src/types/generated/IPriceFeed.sol/IPriceFeed.ts new file mode 100644 index 0000000..af1b517 --- /dev/null +++ b/src/types/generated/IPriceFeed.sol/IPriceFeed.ts @@ -0,0 +1,169 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BytesLike, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "../common"; + +export interface IPriceFeedInterface extends Interface { + getFunction( + nameOrSignature: + | "decimals" + | "description" + | "latestRoundData" + | "priceFeedType" + | "skipPriceCheck" + | "version" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "description", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "latestRoundData", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "priceFeedType", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "skipPriceCheck", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "description", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "latestRoundData", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "priceFeedType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "skipPriceCheck", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; +} + +export interface IPriceFeed extends BaseContract { + connect(runner?: ContractRunner | null): IPriceFeed; + waitForDeployment(): Promise; + + interface: IPriceFeedInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + decimals: TypedContractMethod<[], [bigint], "view">; + + description: TypedContractMethod<[], [string], "view">; + + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + answer: bigint; + updatedAt: bigint; + } + ], + "view" + >; + + priceFeedType: TypedContractMethod<[], [bigint], "view">; + + skipPriceCheck: TypedContractMethod<[], [boolean], "view">; + + version: TypedContractMethod<[], [bigint], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + answer: bigint; + updatedAt: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "priceFeedType" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "skipPriceCheck" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + + filters: {}; +} diff --git a/src/types/generated/IPriceFeed.sol/IUpdatablePriceFeed.ts b/src/types/generated/IPriceFeed.sol/IUpdatablePriceFeed.ts new file mode 100644 index 0000000..1836e9e --- /dev/null +++ b/src/types/generated/IPriceFeed.sol/IUpdatablePriceFeed.ts @@ -0,0 +1,191 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BytesLike, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "../common"; + +export interface IUpdatablePriceFeedInterface extends Interface { + getFunction( + nameOrSignature: + | "decimals" + | "description" + | "latestRoundData" + | "priceFeedType" + | "skipPriceCheck" + | "updatable" + | "updatePrice" + | "version" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "description", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "latestRoundData", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "priceFeedType", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "skipPriceCheck", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "updatable", values?: undefined): string; + encodeFunctionData( + functionFragment: "updatePrice", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "description", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "latestRoundData", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "priceFeedType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "skipPriceCheck", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "updatable", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updatePrice", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; +} + +export interface IUpdatablePriceFeed extends BaseContract { + connect(runner?: ContractRunner | null): IUpdatablePriceFeed; + waitForDeployment(): Promise; + + interface: IUpdatablePriceFeedInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + decimals: TypedContractMethod<[], [bigint], "view">; + + description: TypedContractMethod<[], [string], "view">; + + latestRoundData: TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + answer: bigint; + updatedAt: bigint; + } + ], + "view" + >; + + priceFeedType: TypedContractMethod<[], [bigint], "view">; + + skipPriceCheck: TypedContractMethod<[], [boolean], "view">; + + updatable: TypedContractMethod<[], [boolean], "view">; + + updatePrice: TypedContractMethod<[data: BytesLike], [void], "nonpayable">; + + version: TypedContractMethod<[], [bigint], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "description" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "latestRoundData" + ): TypedContractMethod< + [], + [ + [bigint, bigint, bigint, bigint, bigint] & { + answer: bigint; + updatedAt: bigint; + } + ], + "view" + >; + getFunction( + nameOrSignature: "priceFeedType" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "skipPriceCheck" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "updatable" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "updatePrice" + ): TypedContractMethod<[data: BytesLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + + filters: {}; +} diff --git a/src/types/generated/IPriceFeed.sol/index.ts b/src/types/generated/IPriceFeed.sol/index.ts new file mode 100644 index 0000000..42008f9 --- /dev/null +++ b/src/types/generated/IPriceFeed.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IPriceFeed } from "./IPriceFeed"; +export type { IUpdatablePriceFeed } from "./IUpdatablePriceFeed"; diff --git a/src/types/generated/IPriceHelper.ts b/src/types/generated/IPriceHelper.ts new file mode 100644 index 0000000..b01b868 --- /dev/null +++ b/src/types/generated/IPriceHelper.ts @@ -0,0 +1,126 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export type PriceOnDemandStruct = { token: AddressLike; callData: BytesLike }; + +export type PriceOnDemandStructOutput = [token: string, callData: string] & { + token: string; + callData: string; +}; + +export type TokenPriceInfoStruct = { + token: AddressLike; + balance: BigNumberish; + balanceInUnderlying: BigNumberish; + liquidationThreshold: BigNumberish; +}; + +export type TokenPriceInfoStructOutput = [ + token: string, + balance: bigint, + balanceInUnderlying: bigint, + liquidationThreshold: bigint +] & { + token: string; + balance: bigint; + balanceInUnderlying: bigint; + liquidationThreshold: bigint; +}; + +export interface IPriceHelperInterface extends Interface { + getFunction(nameOrSignature: "previewTokens"): FunctionFragment; + + encodeFunctionData( + functionFragment: "previewTokens", + values: [AddressLike, PriceOnDemandStruct[]] + ): string; + + decodeFunctionResult( + functionFragment: "previewTokens", + data: BytesLike + ): Result; +} + +export interface IPriceHelper extends BaseContract { + connect(runner?: ContractRunner | null): IPriceHelper; + waitForDeployment(): Promise; + + interface: IPriceHelperInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + previewTokens: TypedContractMethod< + [creditAccount: AddressLike, priceUpdates: PriceOnDemandStruct[]], + [TokenPriceInfoStructOutput[]], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "previewTokens" + ): TypedContractMethod< + [creditAccount: AddressLike, priceUpdates: PriceOnDemandStruct[]], + [TokenPriceInfoStructOutput[]], + "nonpayable" + >; + + filters: {}; +} diff --git a/src/types/generated/IPriceOracleBase.ts b/src/types/generated/IPriceOracleBase.ts new file mode 100644 index 0000000..1ef543b --- /dev/null +++ b/src/types/generated/IPriceOracleBase.ts @@ -0,0 +1,174 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IPriceOracleBaseInterface extends Interface { + getFunction( + nameOrSignature: + | "convert" + | "convertFromUSD" + | "convertToUSD" + | "getPrice" + | "priceFeeds" + | "version" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "convert", + values: [BigNumberish, AddressLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "convertFromUSD", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "convertToUSD", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "getPrice", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "priceFeeds", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult(functionFragment: "convert", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "convertFromUSD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "convertToUSD", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getPrice", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "priceFeeds", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; +} + +export interface IPriceOracleBase extends BaseContract { + connect(runner?: ContractRunner | null): IPriceOracleBase; + waitForDeployment(): Promise; + + interface: IPriceOracleBaseInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + convert: TypedContractMethod< + [amount: BigNumberish, tokenFrom: AddressLike, tokenTo: AddressLike], + [bigint], + "view" + >; + + convertFromUSD: TypedContractMethod< + [amount: BigNumberish, token: AddressLike], + [bigint], + "view" + >; + + convertToUSD: TypedContractMethod< + [amount: BigNumberish, token: AddressLike], + [bigint], + "view" + >; + + getPrice: TypedContractMethod<[token: AddressLike], [bigint], "view">; + + priceFeeds: TypedContractMethod<[token: AddressLike], [string], "view">; + + version: TypedContractMethod<[], [bigint], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "convert" + ): TypedContractMethod< + [amount: BigNumberish, tokenFrom: AddressLike, tokenTo: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "convertFromUSD" + ): TypedContractMethod< + [amount: BigNumberish, token: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "convertToUSD" + ): TypedContractMethod< + [amount: BigNumberish, token: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getPrice" + ): TypedContractMethod<[token: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "priceFeeds" + ): TypedContractMethod<[token: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + + filters: {}; +} diff --git a/src/types/generated/IPriceOracleV3.sol/IPriceOracleV3.ts b/src/types/generated/IPriceOracleV3.sol/IPriceOracleV3.ts new file mode 100644 index 0000000..84e6540 --- /dev/null +++ b/src/types/generated/IPriceOracleV3.sol/IPriceOracleV3.ts @@ -0,0 +1,498 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "../common"; + +export interface IPriceOracleV3Interface extends Interface { + getFunction( + nameOrSignature: + | "convert" + | "convertFromUSD" + | "convertToUSD" + | "getPrice" + | "getPriceRaw" + | "getPriceSafe" + | "priceFeedParams" + | "priceFeeds" + | "priceFeedsRaw" + | "safeConvertToUSD" + | "setPriceFeed" + | "setReservePriceFeed" + | "setReservePriceFeedStatus" + | "version" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "SetPriceFeed" + | "SetReservePriceFeed" + | "SetReservePriceFeedStatus" + ): EventFragment; + + encodeFunctionData( + functionFragment: "convert", + values: [BigNumberish, AddressLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "convertFromUSD", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "convertToUSD", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "getPrice", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "getPriceRaw", + values: [AddressLike, boolean] + ): string; + encodeFunctionData( + functionFragment: "getPriceSafe", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "priceFeedParams", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "priceFeeds", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "priceFeedsRaw", + values: [AddressLike, boolean] + ): string; + encodeFunctionData( + functionFragment: "safeConvertToUSD", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setPriceFeed", + values: [AddressLike, AddressLike, BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "setReservePriceFeed", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setReservePriceFeedStatus", + values: [AddressLike, boolean] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult(functionFragment: "convert", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "convertFromUSD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "convertToUSD", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getPrice", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getPriceRaw", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPriceSafe", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "priceFeedParams", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "priceFeeds", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "priceFeedsRaw", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "safeConvertToUSD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPriceFeed", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setReservePriceFeed", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setReservePriceFeedStatus", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; +} + +export namespace SetPriceFeedEvent { + export type InputTuple = [ + token: AddressLike, + priceFeed: AddressLike, + stalenessPeriod: BigNumberish, + skipCheck: boolean, + trusted: boolean + ]; + export type OutputTuple = [ + token: string, + priceFeed: string, + stalenessPeriod: bigint, + skipCheck: boolean, + trusted: boolean + ]; + export interface OutputObject { + token: string; + priceFeed: string; + stalenessPeriod: bigint; + skipCheck: boolean; + trusted: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetReservePriceFeedEvent { + export type InputTuple = [ + token: AddressLike, + priceFeed: AddressLike, + stalenessPeriod: BigNumberish, + skipCheck: boolean + ]; + export type OutputTuple = [ + token: string, + priceFeed: string, + stalenessPeriod: bigint, + skipCheck: boolean + ]; + export interface OutputObject { + token: string; + priceFeed: string; + stalenessPeriod: bigint; + skipCheck: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetReservePriceFeedStatusEvent { + export type InputTuple = [token: AddressLike, active: boolean]; + export type OutputTuple = [token: string, active: boolean]; + export interface OutputObject { + token: string; + active: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IPriceOracleV3 extends BaseContract { + connect(runner?: ContractRunner | null): IPriceOracleV3; + waitForDeployment(): Promise; + + interface: IPriceOracleV3Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + convert: TypedContractMethod< + [amount: BigNumberish, tokenFrom: AddressLike, tokenTo: AddressLike], + [bigint], + "view" + >; + + convertFromUSD: TypedContractMethod< + [amount: BigNumberish, token: AddressLike], + [bigint], + "view" + >; + + convertToUSD: TypedContractMethod< + [amount: BigNumberish, token: AddressLike], + [bigint], + "view" + >; + + getPrice: TypedContractMethod<[token: AddressLike], [bigint], "view">; + + getPriceRaw: TypedContractMethod< + [token: AddressLike, reserve: boolean], + [bigint], + "view" + >; + + getPriceSafe: TypedContractMethod<[token: AddressLike], [bigint], "view">; + + priceFeedParams: TypedContractMethod< + [token: AddressLike], + [ + [string, bigint, boolean, bigint, boolean] & { + priceFeed: string; + stalenessPeriod: bigint; + skipCheck: boolean; + decimals: bigint; + trusted: boolean; + } + ], + "view" + >; + + priceFeeds: TypedContractMethod<[token: AddressLike], [string], "view">; + + priceFeedsRaw: TypedContractMethod< + [token: AddressLike, reserve: boolean], + [string], + "view" + >; + + safeConvertToUSD: TypedContractMethod< + [amount: BigNumberish, token: AddressLike], + [bigint], + "view" + >; + + setPriceFeed: TypedContractMethod< + [ + token: AddressLike, + priceFeed: AddressLike, + stalenessPeriod: BigNumberish, + trusted: boolean + ], + [void], + "nonpayable" + >; + + setReservePriceFeed: TypedContractMethod< + [token: AddressLike, priceFeed: AddressLike, stalenessPeriod: BigNumberish], + [void], + "nonpayable" + >; + + setReservePriceFeedStatus: TypedContractMethod< + [token: AddressLike, active: boolean], + [void], + "nonpayable" + >; + + version: TypedContractMethod<[], [bigint], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "convert" + ): TypedContractMethod< + [amount: BigNumberish, tokenFrom: AddressLike, tokenTo: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "convertFromUSD" + ): TypedContractMethod< + [amount: BigNumberish, token: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "convertToUSD" + ): TypedContractMethod< + [amount: BigNumberish, token: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getPrice" + ): TypedContractMethod<[token: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getPriceRaw" + ): TypedContractMethod< + [token: AddressLike, reserve: boolean], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getPriceSafe" + ): TypedContractMethod<[token: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "priceFeedParams" + ): TypedContractMethod< + [token: AddressLike], + [ + [string, bigint, boolean, bigint, boolean] & { + priceFeed: string; + stalenessPeriod: bigint; + skipCheck: boolean; + decimals: bigint; + trusted: boolean; + } + ], + "view" + >; + getFunction( + nameOrSignature: "priceFeeds" + ): TypedContractMethod<[token: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "priceFeedsRaw" + ): TypedContractMethod< + [token: AddressLike, reserve: boolean], + [string], + "view" + >; + getFunction( + nameOrSignature: "safeConvertToUSD" + ): TypedContractMethod< + [amount: BigNumberish, token: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "setPriceFeed" + ): TypedContractMethod< + [ + token: AddressLike, + priceFeed: AddressLike, + stalenessPeriod: BigNumberish, + trusted: boolean + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setReservePriceFeed" + ): TypedContractMethod< + [token: AddressLike, priceFeed: AddressLike, stalenessPeriod: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setReservePriceFeedStatus" + ): TypedContractMethod< + [token: AddressLike, active: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + + getEvent( + key: "SetPriceFeed" + ): TypedContractEvent< + SetPriceFeedEvent.InputTuple, + SetPriceFeedEvent.OutputTuple, + SetPriceFeedEvent.OutputObject + >; + getEvent( + key: "SetReservePriceFeed" + ): TypedContractEvent< + SetReservePriceFeedEvent.InputTuple, + SetReservePriceFeedEvent.OutputTuple, + SetReservePriceFeedEvent.OutputObject + >; + getEvent( + key: "SetReservePriceFeedStatus" + ): TypedContractEvent< + SetReservePriceFeedStatusEvent.InputTuple, + SetReservePriceFeedStatusEvent.OutputTuple, + SetReservePriceFeedStatusEvent.OutputObject + >; + + filters: { + "SetPriceFeed(address,address,uint32,bool,bool)": TypedContractEvent< + SetPriceFeedEvent.InputTuple, + SetPriceFeedEvent.OutputTuple, + SetPriceFeedEvent.OutputObject + >; + SetPriceFeed: TypedContractEvent< + SetPriceFeedEvent.InputTuple, + SetPriceFeedEvent.OutputTuple, + SetPriceFeedEvent.OutputObject + >; + + "SetReservePriceFeed(address,address,uint32,bool)": TypedContractEvent< + SetReservePriceFeedEvent.InputTuple, + SetReservePriceFeedEvent.OutputTuple, + SetReservePriceFeedEvent.OutputObject + >; + SetReservePriceFeed: TypedContractEvent< + SetReservePriceFeedEvent.InputTuple, + SetReservePriceFeedEvent.OutputTuple, + SetReservePriceFeedEvent.OutputObject + >; + + "SetReservePriceFeedStatus(address,bool)": TypedContractEvent< + SetReservePriceFeedStatusEvent.InputTuple, + SetReservePriceFeedStatusEvent.OutputTuple, + SetReservePriceFeedStatusEvent.OutputObject + >; + SetReservePriceFeedStatus: TypedContractEvent< + SetReservePriceFeedStatusEvent.InputTuple, + SetReservePriceFeedStatusEvent.OutputTuple, + SetReservePriceFeedStatusEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/IPriceOracleV3.sol/IPriceOracleV3Events.ts b/src/types/generated/IPriceOracleV3.sol/IPriceOracleV3Events.ts new file mode 100644 index 0000000..2b002ce --- /dev/null +++ b/src/types/generated/IPriceOracleV3.sol/IPriceOracleV3Events.ts @@ -0,0 +1,201 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + FunctionFragment, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, +} from "../common"; + +export interface IPriceOracleV3EventsInterface extends Interface { + getEvent( + nameOrSignatureOrTopic: + | "SetPriceFeed" + | "SetReservePriceFeed" + | "SetReservePriceFeedStatus" + ): EventFragment; +} + +export namespace SetPriceFeedEvent { + export type InputTuple = [ + token: AddressLike, + priceFeed: AddressLike, + stalenessPeriod: BigNumberish, + skipCheck: boolean, + trusted: boolean + ]; + export type OutputTuple = [ + token: string, + priceFeed: string, + stalenessPeriod: bigint, + skipCheck: boolean, + trusted: boolean + ]; + export interface OutputObject { + token: string; + priceFeed: string; + stalenessPeriod: bigint; + skipCheck: boolean; + trusted: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetReservePriceFeedEvent { + export type InputTuple = [ + token: AddressLike, + priceFeed: AddressLike, + stalenessPeriod: BigNumberish, + skipCheck: boolean + ]; + export type OutputTuple = [ + token: string, + priceFeed: string, + stalenessPeriod: bigint, + skipCheck: boolean + ]; + export interface OutputObject { + token: string; + priceFeed: string; + stalenessPeriod: bigint; + skipCheck: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetReservePriceFeedStatusEvent { + export type InputTuple = [token: AddressLike, active: boolean]; + export type OutputTuple = [token: string, active: boolean]; + export interface OutputObject { + token: string; + active: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IPriceOracleV3Events extends BaseContract { + connect(runner?: ContractRunner | null): IPriceOracleV3Events; + waitForDeployment(): Promise; + + interface: IPriceOracleV3EventsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + getFunction( + key: string | FunctionFragment + ): T; + + getEvent( + key: "SetPriceFeed" + ): TypedContractEvent< + SetPriceFeedEvent.InputTuple, + SetPriceFeedEvent.OutputTuple, + SetPriceFeedEvent.OutputObject + >; + getEvent( + key: "SetReservePriceFeed" + ): TypedContractEvent< + SetReservePriceFeedEvent.InputTuple, + SetReservePriceFeedEvent.OutputTuple, + SetReservePriceFeedEvent.OutputObject + >; + getEvent( + key: "SetReservePriceFeedStatus" + ): TypedContractEvent< + SetReservePriceFeedStatusEvent.InputTuple, + SetReservePriceFeedStatusEvent.OutputTuple, + SetReservePriceFeedStatusEvent.OutputObject + >; + + filters: { + "SetPriceFeed(address,address,uint32,bool,bool)": TypedContractEvent< + SetPriceFeedEvent.InputTuple, + SetPriceFeedEvent.OutputTuple, + SetPriceFeedEvent.OutputObject + >; + SetPriceFeed: TypedContractEvent< + SetPriceFeedEvent.InputTuple, + SetPriceFeedEvent.OutputTuple, + SetPriceFeedEvent.OutputObject + >; + + "SetReservePriceFeed(address,address,uint32,bool)": TypedContractEvent< + SetReservePriceFeedEvent.InputTuple, + SetReservePriceFeedEvent.OutputTuple, + SetReservePriceFeedEvent.OutputObject + >; + SetReservePriceFeed: TypedContractEvent< + SetReservePriceFeedEvent.InputTuple, + SetReservePriceFeedEvent.OutputTuple, + SetReservePriceFeedEvent.OutputObject + >; + + "SetReservePriceFeedStatus(address,bool)": TypedContractEvent< + SetReservePriceFeedStatusEvent.InputTuple, + SetReservePriceFeedStatusEvent.OutputTuple, + SetReservePriceFeedStatusEvent.OutputObject + >; + SetReservePriceFeedStatus: TypedContractEvent< + SetReservePriceFeedStatusEvent.InputTuple, + SetReservePriceFeedStatusEvent.OutputTuple, + SetReservePriceFeedStatusEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/IPriceOracleV3.sol/index.ts b/src/types/generated/IPriceOracleV3.sol/index.ts new file mode 100644 index 0000000..08bd168 --- /dev/null +++ b/src/types/generated/IPriceOracleV3.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IPriceOracleV3 } from "./IPriceOracleV3"; +export type { IPriceOracleV3Events } from "./IPriceOracleV3Events"; diff --git a/src/types/generated/IRouterV3.ts b/src/types/generated/IRouterV3.ts new file mode 100644 index 0000000..8f00b21 --- /dev/null +++ b/src/types/generated/IRouterV3.ts @@ -0,0 +1,209 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export type BalanceStruct = { token: AddressLike; balance: BigNumberish }; + +export type BalanceStructOutput = [token: string, balance: bigint] & { + token: string; + balance: bigint; +}; + +export type PathOptionStruct = { + target: AddressLike; + option: BigNumberish; + totalOptions: BigNumberish; +}; + +export type PathOptionStructOutput = [ + target: string, + option: bigint, + totalOptions: bigint +] & { target: string; option: bigint; totalOptions: bigint }; + +export type MultiCallStruct = { target: AddressLike; callData: BytesLike }; + +export type MultiCallStructOutput = [target: string, callData: string] & { + target: string; + callData: string; +}; + +export type RouterResultStruct = { + amount: BigNumberish; + minAmount: BigNumberish; + calls: MultiCallStruct[]; +}; + +export type RouterResultStructOutput = [ + amount: bigint, + minAmount: bigint, + calls: MultiCallStructOutput[] +] & { amount: bigint; minAmount: bigint; calls: MultiCallStructOutput[] }; + +export interface IRouterV3Interface extends Interface { + getFunction( + nameOrSignature: "findBestClosePath" | "findOneTokenPath" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "findBestClosePath", + values: [ + AddressLike, + BalanceStruct[], + BalanceStruct[], + AddressLike[], + BigNumberish, + PathOptionStruct[], + BigNumberish, + boolean + ] + ): string; + encodeFunctionData( + functionFragment: "findOneTokenPath", + values: [ + AddressLike, + BigNumberish, + AddressLike, + AddressLike, + AddressLike[], + BigNumberish + ] + ): string; + + decodeFunctionResult( + functionFragment: "findBestClosePath", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "findOneTokenPath", + data: BytesLike + ): Result; +} + +export interface IRouterV3 extends BaseContract { + connect(runner?: ContractRunner | null): IRouterV3; + waitForDeployment(): Promise; + + interface: IRouterV3Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + findBestClosePath: TypedContractMethod< + [ + creditAccount: AddressLike, + expectedBalances: BalanceStruct[], + leftoverBalances: BalanceStruct[], + connectors: AddressLike[], + slippage: BigNumberish, + pathOptions: PathOptionStruct[], + iterations: BigNumberish, + force: boolean + ], + [RouterResultStructOutput], + "nonpayable" + >; + + findOneTokenPath: TypedContractMethod< + [ + tokenIn: AddressLike, + amount: BigNumberish, + tokenOut: AddressLike, + creditAccount: AddressLike, + connectors: AddressLike[], + slippage: BigNumberish + ], + [RouterResultStructOutput], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "findBestClosePath" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + expectedBalances: BalanceStruct[], + leftoverBalances: BalanceStruct[], + connectors: AddressLike[], + slippage: BigNumberish, + pathOptions: PathOptionStruct[], + iterations: BigNumberish, + force: boolean + ], + [RouterResultStructOutput], + "nonpayable" + >; + getFunction( + nameOrSignature: "findOneTokenPath" + ): TypedContractMethod< + [ + tokenIn: AddressLike, + amount: BigNumberish, + tokenOut: AddressLike, + creditAccount: AddressLike, + connectors: AddressLike[], + slippage: BigNumberish + ], + [RouterResultStructOutput], + "nonpayable" + >; + + filters: {}; +} diff --git a/src/types/generated/IVersion.ts b/src/types/generated/IVersion.ts new file mode 100644 index 0000000..5cdd119 --- /dev/null +++ b/src/types/generated/IVersion.ts @@ -0,0 +1,84 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BytesLike, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IVersionInterface extends Interface { + getFunction(nameOrSignature: "version"): FunctionFragment; + + encodeFunctionData(functionFragment: "version", values?: undefined): string; + + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; +} + +export interface IVersion extends BaseContract { + connect(runner?: ContractRunner | null): IVersion; + waitForDeployment(): Promise; + + interface: IVersionInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + version: TypedContractMethod<[], [bigint], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "version" + ): TypedContractMethod<[], [bigint], "view">; + + filters: {}; +} diff --git a/src/types/generated/IWETH.ts b/src/types/generated/IWETH.ts new file mode 100644 index 0000000..453855f --- /dev/null +++ b/src/types/generated/IWETH.ts @@ -0,0 +1,345 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IWETHInterface extends Interface { + getFunction( + nameOrSignature: + | "allowance" + | "approve" + | "balanceOf" + | "deposit" + | "totalSupply" + | "transfer" + | "transferFrom" + | "withdraw" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: "Approval" | "Deposit" | "Transfer" | "Withdrawal" + ): EventFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [AddressLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "deposit", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; +} + +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 namespace DepositEvent { + export type InputTuple = [dst: AddressLike, wad: BigNumberish]; + export type OutputTuple = [dst: string, wad: bigint]; + export interface OutputObject { + dst: string; + wad: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +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 namespace WithdrawalEvent { + export type InputTuple = [src: AddressLike, wad: BigNumberish]; + export type OutputTuple = [src: string, wad: bigint]; + export interface OutputObject { + src: string; + wad: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IWETH extends BaseContract { + connect(runner?: ContractRunner | null): IWETH; + waitForDeployment(): Promise; + + interface: IWETHInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + 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< + [to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + withdraw: TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; + + 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< + [to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "withdraw" + ): TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Deposit" + ): TypedContractEvent< + DepositEvent.InputTuple, + DepositEvent.OutputTuple, + DepositEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "Withdrawal" + ): TypedContractEvent< + WithdrawalEvent.InputTuple, + WithdrawalEvent.OutputTuple, + WithdrawalEvent.OutputObject + >; + + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Deposit(address,uint256)": TypedContractEvent< + DepositEvent.InputTuple, + DepositEvent.OutputTuple, + DepositEvent.OutputObject + >; + Deposit: TypedContractEvent< + DepositEvent.InputTuple, + DepositEvent.OutputTuple, + DepositEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "Withdrawal(address,uint256)": TypedContractEvent< + WithdrawalEvent.InputTuple, + WithdrawalEvent.OutputTuple, + WithdrawalEvent.OutputObject + >; + Withdrawal: TypedContractEvent< + WithdrawalEvent.InputTuple, + WithdrawalEvent.OutputTuple, + WithdrawalEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/Liquidator.ts b/src/types/generated/Liquidator.ts new file mode 100644 index 0000000..76358aa --- /dev/null +++ b/src/types/generated/Liquidator.ts @@ -0,0 +1,569 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common"; + +export type MultiCallStruct = { target: AddressLike; callData: BytesLike }; + +export type MultiCallStructOutput = [target: string, callData: string] & { + target: string; + callData: string; +}; + +export type LiquidationResultStruct = { + calls: MultiCallStruct[]; + profit: BigNumberish; + amountIn: BigNumberish; + amountOut: BigNumberish; +}; + +export type LiquidationResultStructOutput = [ + calls: MultiCallStructOutput[], + profit: bigint, + amountIn: bigint, + amountOut: bigint +] & { + calls: MultiCallStructOutput[]; + profit: bigint; + amountIn: bigint; + amountOut: bigint; +}; + +export declare namespace IPartialLiquidationBotV3 { + export type PriceUpdateStruct = { + token: AddressLike; + reserve: boolean; + data: BytesLike; + }; + + export type PriceUpdateStructOutput = [ + token: string, + reserve: boolean, + data: string + ] & { token: string; reserve: boolean; data: string }; +} + +export interface LiquidatorInterface extends Interface { + getFunction( + nameOrSignature: + | "aaveFLTaker" + | "aavePool" + | "cmToCA" + | "executeOperation" + | "getOptimalLiquidation" + | "owner" + | "partialLiquidateAndConvert" + | "partialLiquidationBot" + | "previewPartialLiquidation" + | "registerCM" + | "renounceOwnership" + | "router" + | "setPartialLiquidationBot" + | "setRouter" + | "transferOwnership" + | "withdrawToken" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "OwnershipTransferred" + | "SetPartialLiquidationBot" + | "SetRouter" + ): EventFragment; + + encodeFunctionData( + functionFragment: "aaveFLTaker", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "aavePool", values?: undefined): string; + encodeFunctionData(functionFragment: "cmToCA", values: [AddressLike]): string; + encodeFunctionData( + functionFragment: "executeOperation", + values: [ + AddressLike[], + BigNumberish[], + BigNumberish[], + AddressLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "getOptimalLiquidation", + values: [ + AddressLike, + BigNumberish, + IPartialLiquidationBotV3.PriceUpdateStruct[] + ] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "partialLiquidateAndConvert", + values: [ + AddressLike, + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + IPartialLiquidationBotV3.PriceUpdateStruct[], + MultiCallStruct[] + ] + ): string; + encodeFunctionData( + functionFragment: "partialLiquidationBot", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "previewPartialLiquidation", + values: [ + AddressLike, + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + IPartialLiquidationBotV3.PriceUpdateStruct[], + AddressLike[], + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "registerCM", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "router", values?: undefined): string; + encodeFunctionData( + functionFragment: "setPartialLiquidationBot", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setRouter", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "withdrawToken", + values: [AddressLike, BigNumberish, AddressLike] + ): string; + + decodeFunctionResult( + functionFragment: "aaveFLTaker", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "aavePool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cmToCA", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeOperation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getOptimalLiquidation", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "partialLiquidateAndConvert", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "partialLiquidationBot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "previewPartialLiquidation", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "registerCM", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "router", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setPartialLiquidationBot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setRouter", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "withdrawToken", + data: BytesLike + ): Result; +} + +export namespace OwnershipTransferredEvent { + export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [previousOwner: string, newOwner: string]; + export interface OutputObject { + previousOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetPartialLiquidationBotEvent { + export type InputTuple = [partialLiquidationBot: AddressLike]; + export type OutputTuple = [partialLiquidationBot: string]; + export interface OutputObject { + partialLiquidationBot: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetRouterEvent { + export type InputTuple = [newRouter: AddressLike]; + export type OutputTuple = [newRouter: string]; + export interface OutputObject { + newRouter: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface Liquidator extends BaseContract { + connect(runner?: ContractRunner | null): Liquidator; + waitForDeployment(): Promise; + + interface: LiquidatorInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + aaveFLTaker: TypedContractMethod<[], [string], "view">; + + aavePool: TypedContractMethod<[], [string], "view">; + + cmToCA: TypedContractMethod<[arg0: AddressLike], [string], "view">; + + executeOperation: TypedContractMethod< + [ + assets: AddressLike[], + amounts: BigNumberish[], + premiums: BigNumberish[], + initiator: AddressLike, + params: BytesLike + ], + [boolean], + "nonpayable" + >; + + getOptimalLiquidation: TypedContractMethod< + [ + creditAccount: AddressLike, + hfOptimal: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[] + ], + [ + [string, bigint, bigint, bigint, boolean] & { + tokenOut: string; + optimalAmount: bigint; + repaidAmount: bigint; + flashLoanAmount: bigint; + isOptimalRepayable: boolean; + } + ], + "nonpayable" + >; + + owner: TypedContractMethod<[], [string], "view">; + + partialLiquidateAndConvert: TypedContractMethod< + [ + creditManager: AddressLike, + creditAccount: AddressLike, + assetOut: AddressLike, + amountOut: BigNumberish, + flashLoanAmount: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], + conversionCalls: MultiCallStruct[] + ], + [void], + "nonpayable" + >; + + partialLiquidationBot: TypedContractMethod<[], [string], "view">; + + previewPartialLiquidation: TypedContractMethod< + [ + creditManager: AddressLike, + creditAccount: AddressLike, + assetOut: AddressLike, + amountOut: BigNumberish, + flashLoanAmount: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], + connectors: AddressLike[], + slippage: BigNumberish + ], + [LiquidationResultStructOutput], + "nonpayable" + >; + + registerCM: TypedContractMethod< + [creditManager: AddressLike], + [void], + "nonpayable" + >; + + renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + router: TypedContractMethod<[], [string], "view">; + + setPartialLiquidationBot: TypedContractMethod< + [newPLB: AddressLike], + [void], + "nonpayable" + >; + + setRouter: TypedContractMethod< + [newRouter: AddressLike], + [void], + "nonpayable" + >; + + transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + withdrawToken: TypedContractMethod< + [token: AddressLike, amount: BigNumberish, to: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "aaveFLTaker" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "aavePool" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "cmToCA" + ): TypedContractMethod<[arg0: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "executeOperation" + ): TypedContractMethod< + [ + assets: AddressLike[], + amounts: BigNumberish[], + premiums: BigNumberish[], + initiator: AddressLike, + params: BytesLike + ], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "getOptimalLiquidation" + ): TypedContractMethod< + [ + creditAccount: AddressLike, + hfOptimal: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[] + ], + [ + [string, bigint, bigint, bigint, boolean] & { + tokenOut: string; + optimalAmount: bigint; + repaidAmount: bigint; + flashLoanAmount: bigint; + isOptimalRepayable: boolean; + } + ], + "nonpayable" + >; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "partialLiquidateAndConvert" + ): TypedContractMethod< + [ + creditManager: AddressLike, + creditAccount: AddressLike, + assetOut: AddressLike, + amountOut: BigNumberish, + flashLoanAmount: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], + conversionCalls: MultiCallStruct[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "partialLiquidationBot" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "previewPartialLiquidation" + ): TypedContractMethod< + [ + creditManager: AddressLike, + creditAccount: AddressLike, + assetOut: AddressLike, + amountOut: BigNumberish, + flashLoanAmount: BigNumberish, + priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], + connectors: AddressLike[], + slippage: BigNumberish + ], + [LiquidationResultStructOutput], + "nonpayable" + >; + getFunction( + nameOrSignature: "registerCM" + ): TypedContractMethod<[creditManager: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "router" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setPartialLiquidationBot" + ): TypedContractMethod<[newPLB: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setRouter" + ): TypedContractMethod<[newRouter: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "withdrawToken" + ): TypedContractMethod< + [token: AddressLike, amount: BigNumberish, to: AddressLike], + [void], + "nonpayable" + >; + + getEvent( + key: "OwnershipTransferred" + ): TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + getEvent( + key: "SetPartialLiquidationBot" + ): TypedContractEvent< + SetPartialLiquidationBotEvent.InputTuple, + SetPartialLiquidationBotEvent.OutputTuple, + SetPartialLiquidationBotEvent.OutputObject + >; + getEvent( + key: "SetRouter" + ): TypedContractEvent< + SetRouterEvent.InputTuple, + SetRouterEvent.OutputTuple, + SetRouterEvent.OutputObject + >; + + filters: { + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + + "SetPartialLiquidationBot(address)": TypedContractEvent< + SetPartialLiquidationBotEvent.InputTuple, + SetPartialLiquidationBotEvent.OutputTuple, + SetPartialLiquidationBotEvent.OutputObject + >; + SetPartialLiquidationBot: TypedContractEvent< + SetPartialLiquidationBotEvent.InputTuple, + SetPartialLiquidationBotEvent.OutputTuple, + SetPartialLiquidationBotEvent.OutputObject + >; + + "SetRouter(address)": TypedContractEvent< + SetRouterEvent.InputTuple, + SetRouterEvent.OutputTuple, + SetRouterEvent.OutputObject + >; + SetRouter: TypedContractEvent< + SetRouterEvent.InputTuple, + SetRouterEvent.OutputTuple, + SetRouterEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/Ownable.ts b/src/types/generated/Ownable.ts new file mode 100644 index 0000000..c3efc4b --- /dev/null +++ b/src/types/generated/Ownable.ts @@ -0,0 +1,153 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface OwnableInterface extends Interface { + getFunction( + nameOrSignature: "owner" | "renounceOwnership" | "transferOwnership" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [AddressLike] + ): string; + + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; +} + +export namespace OwnershipTransferredEvent { + export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [previousOwner: string, newOwner: string]; + export interface OutputObject { + previousOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface Ownable extends BaseContract { + connect(runner?: ContractRunner | null): Ownable; + waitForDeployment(): Promise; + + interface: OwnableInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + owner: TypedContractMethod<[], [string], "view">; + + renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + + getEvent( + key: "OwnershipTransferred" + ): TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + + filters: { + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + }; +} diff --git a/src/types/generated/PriceHelper.ts b/src/types/generated/PriceHelper.ts new file mode 100644 index 0000000..f8899cb --- /dev/null +++ b/src/types/generated/PriceHelper.ts @@ -0,0 +1,126 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export type PriceOnDemandStruct = { token: AddressLike; callData: BytesLike }; + +export type PriceOnDemandStructOutput = [token: string, callData: string] & { + token: string; + callData: string; +}; + +export type TokenPriceInfoStruct = { + token: AddressLike; + balance: BigNumberish; + balanceInUnderlying: BigNumberish; + liquidationThreshold: BigNumberish; +}; + +export type TokenPriceInfoStructOutput = [ + token: string, + balance: bigint, + balanceInUnderlying: bigint, + liquidationThreshold: bigint +] & { + token: string; + balance: bigint; + balanceInUnderlying: bigint; + liquidationThreshold: bigint; +}; + +export interface PriceHelperInterface extends Interface { + getFunction(nameOrSignature: "previewTokens"): FunctionFragment; + + encodeFunctionData( + functionFragment: "previewTokens", + values: [AddressLike, PriceOnDemandStruct[]] + ): string; + + decodeFunctionResult( + functionFragment: "previewTokens", + data: BytesLike + ): Result; +} + +export interface PriceHelper extends BaseContract { + connect(runner?: ContractRunner | null): PriceHelper; + waitForDeployment(): Promise; + + interface: PriceHelperInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + previewTokens: TypedContractMethod< + [creditAccount: AddressLike, priceUpdates: PriceOnDemandStruct[]], + [TokenPriceInfoStructOutput[]], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "previewTokens" + ): TypedContractMethod< + [creditAccount: AddressLike, priceUpdates: PriceOnDemandStruct[]], + [TokenPriceInfoStructOutput[]], + "nonpayable" + >; + + filters: {}; +} diff --git a/src/types/generated/SafeERC20.ts b/src/types/generated/SafeERC20.ts new file mode 100644 index 0000000..99be323 --- /dev/null +++ b/src/types/generated/SafeERC20.ts @@ -0,0 +1,69 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + FunctionFragment, + Interface, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, +} from "./common"; + +export interface SafeERC20Interface extends Interface {} + +export interface SafeERC20 extends BaseContract { + connect(runner?: ContractRunner | null): SafeERC20; + waitForDeployment(): Promise; + + interface: SafeERC20Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + getFunction( + key: string | FunctionFragment + ): T; + + filters: {}; +} diff --git a/src/types/generated/common.ts b/src/types/generated/common.ts new file mode 100644 index 0000000..56b5f21 --- /dev/null +++ b/src/types/generated/common.ts @@ -0,0 +1,131 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from "ethers"; + +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> + extends DeferredTopicFilter {} + +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 __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 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; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; + +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/src/types/generated/factories/AaveFLTaker__factory.ts b/src/types/generated/factories/AaveFLTaker__factory.ts new file mode 100644 index 0000000..44218c2 --- /dev/null +++ b/src/types/generated/factories/AaveFLTaker__factory.ts @@ -0,0 +1,230 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../common"; +import type { AaveFLTaker, AaveFLTakerInterface } from "../AaveFLTaker"; + +const _abi = [ + { + type: "constructor", + inputs: [ + { + name: "_aavePool", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "aavePool", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "allowedFLReceiver", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setAllowedFLReceiver", + inputs: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "status", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "takeFlashLoan", + inputs: [ + { + name: "asset", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetAllowedFLReceiver", + inputs: [ + { + name: "consumer", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "status", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "CallerNotAllowedReceiverException", + inputs: [], + }, +] as const; + +const _bytecode = + "0x60a060405234801561001057600080fd5b506040516108da3803806108da83398101604081905261002f91610099565b61003833610049565b6001600160a01b03166080526100c9565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100ab57600080fd5b81516001600160a01b03811681146100c257600080fd5b9392505050565b6080516107f06100ea6000396000818160ee01526102ac01526107f06000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a03e4bc31161005b578063a03e4bc3146100e9578063b9c8345314610110578063d0f6b87514610123578063f2fde38b1461013657600080fd5b8063119b90a214610082578063715018a6146100ba5780638da5cb5b146100c4575b600080fd5b6100a5610090366004610529565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100c2610149565b005b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100b1565b6100d17f000000000000000000000000000000000000000000000000000000000000000081565b6100c261011e366004610561565b61015d565b6100c261013136600461062c565b610328565b6100c2610144366004610529565b6103b6565b61015161044b565b61015b60006104a5565b565b3360009081526001602052604090205460ff166101a6576040517fccc626ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160018082528183019092526000916020808301908036833701905050905083816000815181106101dc576101dc610668565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020016020820280368337019050509050838160008151811061022d5761022d610668565b602090810291909101015260408051600180825281830190925260009181602001602082028036833701905050905060008160008151811061027157610271610668565b60209081029190910101526040517fab9c4b5d0000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ab9c4b5d906102ee90339087908790879030908c906000906004016106ff565b600060405180830381600087803b15801561030857600080fd5b505af115801561031c573d6000803e3d6000fd5b50505050505050505050565b61033061044b565b6001600160a01b03821660009081526001602052604090205460ff161515811515146103b2576001600160a01b038216600081815260016020908152604091829020805460ff191685151590811790915591519182527f5c40d220dd4a83f4a7c95d6a06dd865715fc5a1dd4c7f85f69da051e00eeeb19910160405180910390a25b5050565b6103be61044b565b6001600160a01b03811661043f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610448816104a5565b50565b6000546001600160a01b0316331461015b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610436565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461052457600080fd5b919050565b60006020828403121561053b57600080fd5b6105448261050d565b9392505050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561057657600080fd5b61057f8461050d565b925060208401359150604084013567ffffffffffffffff808211156105a357600080fd5b818601915086601f8301126105b757600080fd5b8135818111156105c9576105c961054b565b604051601f8201601f19908116603f011681019083821181831017156105f1576105f161054b565b8160405282815289602084870101111561060a57600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000806040838503121561063f57600080fd5b6106488361050d565b91506020830135801515811461065d57600080fd5b809150509250929050565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b838110156106ae57815187529582019590820190600101610692565b509495945050505050565b6000815180845260005b818110156106df576020818501810151868301820152016106c3565b506000602082860101526020601f19601f83011685010191505092915050565b600060e082016001600160a01b03808b168452602060e081860152828b5180855261010087019150828d01945060005b8181101561074d57855185168352948301949183019160010161072f565b50508581036040870152610761818c61067e565b93505050508281036060840152610778818861067e565b6001600160a01b0387166080850152905082810360a084015261079b81866106b9565b9150506107ae60c083018461ffff169052565b9897505050505050505056fea264697066735822122078e31c046d8fc3fa2270fdbf517da1146c6ba418f937bd8e474dd7eee41dc53464736f6c63430008110033"; + +type AaveFLTakerConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: AaveFLTakerConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class AaveFLTaker__factory extends ContractFactory { + constructor(...args: AaveFLTakerConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + _aavePool: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction(_aavePool, overrides || {}); + } + override deploy( + _aavePool: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(_aavePool, overrides || {}) as Promise< + AaveFLTaker & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): AaveFLTaker__factory { + return super.connect(runner) as AaveFLTaker__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): AaveFLTakerInterface { + return new Interface(_abi) as AaveFLTakerInterface; + } + static connect(address: string, runner?: ContractRunner | null): AaveFLTaker { + return new Contract(address, _abi, runner) as unknown as AaveFLTaker; + } +} diff --git a/src/types/generated/factories/Balances.sol/BalanceOps__factory.ts b/src/types/generated/factories/Balances.sol/BalanceOps__factory.ts new file mode 100644 index 0000000..dd945a8 --- /dev/null +++ b/src/types/generated/factories/Balances.sol/BalanceOps__factory.ts @@ -0,0 +1,75 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../common"; +import type { + BalanceOps, + BalanceOpsInterface, +} from "../../Balances.sol/BalanceOps"; + +const _abi = [ + { + type: "error", + name: "UnknownToken", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + }, +] as const; + +const _bytecode = + "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200d17b4c0325ecb7a67f9060390a2a8d83cad36994d6e605855b2ee1d9cc7e28264736f6c63430008110033"; + +type BalanceOpsConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: BalanceOpsConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class BalanceOps__factory extends ContractFactory { + constructor(...args: BalanceOpsConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + BalanceOps & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): BalanceOps__factory { + return super.connect(runner) as BalanceOps__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): BalanceOpsInterface { + return new Interface(_abi) as BalanceOpsInterface; + } + static connect(address: string, runner?: ContractRunner | null): BalanceOps { + return new Contract(address, _abi, runner) as unknown as BalanceOps; + } +} diff --git a/src/types/generated/factories/Balances.sol/index.ts b/src/types/generated/factories/Balances.sol/index.ts new file mode 100644 index 0000000..d290106 --- /dev/null +++ b/src/types/generated/factories/Balances.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { BalanceOps__factory } from "./BalanceOps__factory"; diff --git a/src/types/generated/factories/BatchLiquidator__factory.ts b/src/types/generated/factories/BatchLiquidator__factory.ts new file mode 100644 index 0000000..8e4b258 --- /dev/null +++ b/src/types/generated/factories/BatchLiquidator__factory.ts @@ -0,0 +1,294 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../common"; +import type { + BatchLiquidator, + BatchLiquidatorInterface, +} from "../BatchLiquidator"; + +const _abi = [ + { + type: "constructor", + inputs: [ + { + name: "_router", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "estimateBatch", + inputs: [ + { + name: "params", + type: "tuple[]", + internalType: "struct RouterLiqParams[]", + components: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "expectedBalances", + type: "tuple[]", + internalType: "struct Balance[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "leftoverBalances", + type: "tuple[]", + internalType: "struct Balance[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "connectors", + type: "address[]", + internalType: "address[]", + }, + { + name: "slippage", + type: "uint256", + internalType: "uint256", + }, + { + name: "pathOptions", + type: "tuple[]", + internalType: "struct PathOption[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "option", + type: "uint8", + internalType: "uint8", + }, + { + name: "totalOptions", + type: "uint8", + internalType: "uint8", + }, + ], + }, + { + name: "iterations", + type: "uint256", + internalType: "uint256", + }, + { + name: "force", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "results", + type: "tuple[]", + internalType: "struct LiquidationResult[]", + components: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "pathFound", + type: "bool", + internalType: "bool", + }, + { + name: "executed", + type: "bool", + internalType: "bool", + }, + { + name: "profit", + type: "uint256", + internalType: "uint256", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "liquidateBatch", + inputs: [ + { + name: "params", + type: "tuple[]", + internalType: "struct LiqParams[]", + components: [ + { + name: "creditFacade", + type: "address", + internalType: "address", + }, + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + }, + { + name: "to", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "success", + type: "bool[]", + internalType: "bool[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "router", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b5060405161147b38038061147b83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b6113e8806100936000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806301b9f32614610046578063ba98ddb51461006f578063f887ea401461008f575b600080fd5b610059610054366004610865565b6100ba565b60405161006691906108bc565b60405180910390f35b61008261007d366004610902565b61023a565b6040516100669190610968565b6000546100a2906001600160a01b031681565b6040516001600160a01b039091168152602001610066565b6060828067ffffffffffffffff8111156100d6576100d6610a82565b6040519080825280602002602001820160405280156100ff578160200160208202803683370190505b50915060005b818110156102315785858281811061011f5761011f610a98565b90506020028101906101319190610aae565b61013f906020810190610ace565b6001600160a01b031663e3f46b2687878481811061015f5761015f610a98565b90506020028101906101719190610aae565b610182906040810190602001610ace565b8689898681811061019557610195610a98565b90506020028101906101a79190610aae565b6101b5906040810190610af2565b6040518563ffffffff1660e01b81526004016101d49493929190610b3c565b600060405180830381600087803b1580156101ee57600080fd5b505af19250505080156101ff575060015b1561022957600183828151811061021857610218610a98565b911515602092830291909101909101525b600101610105565b50509392505050565b6060818067ffffffffffffffff81111561025657610256610a82565b6040519080825280602002602001820160405280156102c657816020015b6102b36040518060a0016040528060006001600160a01b0316815260200160001515815260200160001515815260200160008152602001606081525090565b8152602001906001900390816102745790505b50915060005b818110156105d1578484828181106102e6576102e6610a98565b90506020028101906102f89190610c39565b610306906020810190610ace565b83828151811061031857610318610a98565b60209081029190910101516001600160a01b03909116905260008061036887878581811061034857610348610a98565b905060200281019061035a9190610c39565b61036390610edc565b6105d9565b9150915081156105c757600185848151811061038657610386610a98565b6020026020010151602001901515908115158152505080604001518584815181106103b3576103b3610a98565b6020026020010151608001819052506000806103ff8989878181106103da576103da610a98565b90506020028101906103ec9190610c39565b6103fa906020810190610ace565b6106ba565b6040516370a0823160e01b815230600482015291935091506000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561044b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046f9190610fca565b9050826001600160a01b031663e3f46b268b8b8981811061049257610492610a98565b90506020028101906104a49190610c39565b6104b2906020810190610ace565b3087604001516040518463ffffffff1660e01b81526004016104d693929190610fe3565b600060405180830381600087803b1580156104f057600080fd5b505af1925050508015610501575060015b156105c357600188878151811061051a5761051a610a98565b6020908102919091010151901515604091820152516370a0823160e01b815230600482015281906001600160a01b038416906370a0823190602401602060405180830381865afa158015610572573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105969190610fca565b6105a0919061108e565b8887815181106105b2576105b2610a98565b602002602001015160600181815250505b5050505b50506001016102cc565b505092915050565b604080516060808201835260008083526020830181905292820152600054835160208501516040808701516060880151608089015160a08a015160c08b015160e08c015195517ff0a294240000000000000000000000000000000000000000000000000000000081526001600160a01b039099169863f0a294249861066998909790969594939291600401611159565b6000604051808303816000875af19250505080156106a957506040513d6000823e601f3d908101601f191682016040526106a6919081019061120a565b60015b156106b5576001925090505b915091565b6000806000836001600160a01b031663c12c21c06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107219190611395565b9050806001600160a01b0316632f7a18816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610761573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107859190611395565b9250806001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e99190611395565b915050915091565b60008083601f84011261080357600080fd5b50813567ffffffffffffffff81111561081b57600080fd5b6020830191508360208260051b850101111561083657600080fd5b9250929050565b6001600160a01b038116811461085257600080fd5b50565b80356108608161083d565b919050565b60008060006040848603121561087a57600080fd5b833567ffffffffffffffff81111561089157600080fd5b61089d868287016107f1565b90945092505060208401356108b18161083d565b809150509250925092565b6020808252825182820181905260009190848201906040850190845b818110156108f65783511515835292840192918401916001016108d8565b50909695505050505050565b6000806020838503121561091557600080fd5b823567ffffffffffffffff81111561092c57600080fd5b610938858286016107f1565b90969095509350505050565b60005b8381101561095f578181015183820152602001610947565b50506000910152565b60208152600060208201835180825260408401915060408160051b8501016020860160005b838110156108f657603f1987840301855281516001600160a01b03808251168552602082015115156020860152604082015115156040860152606082015160608601526080820151915060a0608086015260a08501825180825260c08701915060c08160051b88010160208501945060005b82811015610a625760bf19898303018452855185815116835260208101519050604060208401528051806040850152610a3f816060860160208501610944565b6020978801979590950194601f01601f19169290920160600191506001016109ff565b50809750505050505060208201915060208501945060018101905061098d565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008235605e19833603018112610ac457600080fd5b9190910192915050565b600060208284031215610ae057600080fd5b8135610aeb8161083d565b9392505050565b6000808335601e19843603018112610b0957600080fd5b83018035915067ffffffffffffffff821115610b2457600080fd5b6020019150600581901b360382131561083657600080fd5b600060608083016001600160a01b038089168552602081891681870152604084818801528388855260808801905060808960051b89010194508960005b8a811015610c2757898703607f190183528135368d9003603e19018112610b9f57600080fd5b8c018035610bac8161083d565b871688528086013536829003601e19018112610bc757600080fd5b01858101903567ffffffffffffffff811115610be257600080fd5b803603821315610bf157600080fd5b85878a015280868a015280828b8b013760008982018b0152601f01601f1916909701880196509184019190840190600101610b79565b50949c9b505050505050505050505050565b6000823560fe19833603018112610ac457600080fd5b6040805190810167ffffffffffffffff81118282101715610c7257610c72610a82565b60405290565b6040516060810167ffffffffffffffff81118282101715610c7257610c72610a82565b604051610100810167ffffffffffffffff81118282101715610c7257610c72610a82565b604051601f8201601f1916810167ffffffffffffffff81118282101715610ce857610ce8610a82565b604052919050565b600067ffffffffffffffff821115610d0a57610d0a610a82565b5060051b60200190565b600082601f830112610d2557600080fd5b81356020610d3a610d3583610cf0565b610cbf565b82815260069290921b84018101918181019086841115610d5957600080fd5b8286015b84811015610da15760408189031215610d765760008081fd5b610d7e610c4f565b8135610d898161083d565b81528185013585820152835291830191604001610d5d565b509695505050505050565b600082601f830112610dbd57600080fd5b81356020610dcd610d3583610cf0565b82815260059290921b84018101918181019086841115610dec57600080fd5b8286015b84811015610da1578035610e038161083d565b8352918301918301610df0565b803560ff8116811461086057600080fd5b600082601f830112610e3257600080fd5b81356020610e42610d3583610cf0565b82815260609283028501820192828201919087851115610e6157600080fd5b8387015b85811015610ebf5781818a031215610e7d5760008081fd5b610e85610c78565b8135610e908161083d565b8152610e9d828701610e10565b868201526040610eae818401610e10565b908201528452928401928101610e65565b5090979650505050505050565b8035801515811461086057600080fd5b60006101008236031215610eef57600080fd5b610ef7610c9b565b610f0083610855565b8152602083013567ffffffffffffffff80821115610f1d57600080fd5b610f2936838701610d14565b60208401526040850135915080821115610f4257600080fd5b610f4e36838701610d14565b60408401526060850135915080821115610f6757600080fd5b610f7336838701610dac565b60608401526080850135608084015260a0850135915080821115610f9657600080fd5b50610fa336828601610e21565b60a08301525060c083013560c0820152610fbf60e08401610ecc565b60e082015292915050565b600060208284031215610fdc57600080fd5b5051919050565b600060608083016001600160a01b0380881685526020818816818701526040848188015283885180865260808901915060808160051b8a01019550838a0160005b8281101561107c578a8803607f1901845281518051881689528601518689018690528051868a0181905261105d818c8c01848b01610944565b601f01601f191698909801890197509285019290850190600101611024565b50959c9b505050505050505050505050565b818103818111156110af57634e487b7160e01b600052601160045260246000fd5b92915050565b600081518084526020808501945080840160005b838110156110f957815180516001600160a01b0316885283015183880152604090960195908201906001016110c9565b509495945050505050565b600081518084526020808501945080840160005b838110156110f957815180516001600160a01b031688528381015160ff908116858a0152604091820151169088015260609096019590820190600101611118565b60006101006001600160a01b03808c1684526020828186015261117e8386018d6110b5565b92508483036040860152611192838c6110b5565b85810360608701528a51808252828c0194509082019060005b818110156111c95785518516835294830194918301916001016111ab565b505089608087015285810360a08701526111e3818a611104565b9450505050508360c08301526111fd60e083018415159052565b9998505050505050505050565b6000602080838503121561121d57600080fd5b825167ffffffffffffffff8082111561123557600080fd5b908401906060828703121561124957600080fd5b611251610c78565b82518152838301518482015260408301518281111561126f57600080fd5b80840193505086601f84011261128457600080fd5b8251611292610d3582610cf0565b81815260059190911b840185019085810190898311156112b157600080fd5b8686015b83811015611382578051868111156112cc57600080fd5b8701601f196040828e03820112156112e357600080fd5b6112eb610c4f565b8a8301516112f88161083d565b815260408301518981111561130c57600080fd5b8084019350508d603f84011261132157600080fd5b8a8301518981111561133557611335610a82565b6113458c84601f84011601610cbf565b92508083528e604082860101111561135c57600080fd5b61136c818d850160408701610944565b50808b01919091528452509187019187016112b5565b5060408401525090979650505050505050565b6000602082840312156113a757600080fd5b8151610aeb8161083d56fea264697066735822122056ab91b2ed35e306b6088012b1b5964aaced0ac7d5dad25d5ac536842b12605f64736f6c63430008110033"; + +type BatchLiquidatorConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: BatchLiquidatorConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class BatchLiquidator__factory extends ContractFactory { + constructor(...args: BatchLiquidatorConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + _router: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction(_router, overrides || {}); + } + override deploy( + _router: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy(_router, overrides || {}) as Promise< + BatchLiquidator & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): BatchLiquidator__factory { + return super.connect(runner) as BatchLiquidator__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): BatchLiquidatorInterface { + return new Interface(_abi) as BatchLiquidatorInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): BatchLiquidator { + return new Contract(address, _abi, runner) as unknown as BatchLiquidator; + } +} diff --git a/src/types/generated/factories/IAavePoolFlashLoan__factory.ts b/src/types/generated/factories/IAavePoolFlashLoan__factory.ts new file mode 100644 index 0000000..2dd5f5b --- /dev/null +++ b/src/types/generated/factories/IAavePoolFlashLoan__factory.ts @@ -0,0 +1,101 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IAavePoolFlashLoan, + IAavePoolFlashLoanInterface, +} from "../IAavePoolFlashLoan"; + +const _abi = [ + { + type: "function", + name: "flashLoan", + inputs: [ + { + name: "receiverAddress", + type: "address", + internalType: "address", + }, + { + name: "assets", + type: "address[]", + internalType: "address[]", + }, + { + name: "amounts", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "interestRateModes", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "onBehalfOf", + type: "address", + internalType: "address", + }, + { + name: "params", + type: "bytes", + internalType: "bytes", + }, + { + name: "referralCode", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "flashLoanSimple", + inputs: [ + { + name: "receiverAddress", + type: "address", + internalType: "address", + }, + { + name: "asset", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "params", + type: "bytes", + internalType: "bytes", + }, + { + name: "referralCode", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +export class IAavePoolFlashLoan__factory { + static readonly abi = _abi; + static createInterface(): IAavePoolFlashLoanInterface { + return new Interface(_abi) as IAavePoolFlashLoanInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IAavePoolFlashLoan { + return new Contract(address, _abi, runner) as unknown as IAavePoolFlashLoan; + } +} diff --git a/src/types/generated/factories/IBalancerV2VaultFlashLoan__factory.ts b/src/types/generated/factories/IBalancerV2VaultFlashLoan__factory.ts new file mode 100644 index 0000000..b251e23 --- /dev/null +++ b/src/types/generated/factories/IBalancerV2VaultFlashLoan__factory.ts @@ -0,0 +1,57 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IBalancerV2VaultFlashLoan, + IBalancerV2VaultFlashLoanInterface, +} from "../IBalancerV2VaultFlashLoan"; + +const _abi = [ + { + type: "function", + name: "flashLoan", + inputs: [ + { + name: "recipient", + type: "address", + internalType: "address", + }, + { + name: "tokens", + type: "address[]", + internalType: "address[]", + }, + { + name: "amounts", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "userData", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +export class IBalancerV2VaultFlashLoan__factory { + static readonly abi = _abi; + static createInterface(): IBalancerV2VaultFlashLoanInterface { + return new Interface(_abi) as IBalancerV2VaultFlashLoanInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IBalancerV2VaultFlashLoan { + return new Contract( + address, + _abi, + runner + ) as unknown as IBalancerV2VaultFlashLoan; + } +} diff --git a/src/types/generated/factories/IBatchLiquidator__factory.ts b/src/types/generated/factories/IBatchLiquidator__factory.ts new file mode 100644 index 0000000..6961aea --- /dev/null +++ b/src/types/generated/factories/IBatchLiquidator__factory.ts @@ -0,0 +1,219 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IBatchLiquidator, + IBatchLiquidatorInterface, +} from "../IBatchLiquidator"; + +const _abi = [ + { + type: "function", + name: "estimateBatch", + inputs: [ + { + name: "params", + type: "tuple[]", + internalType: "struct RouterLiqParams[]", + components: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "expectedBalances", + type: "tuple[]", + internalType: "struct Balance[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "leftoverBalances", + type: "tuple[]", + internalType: "struct Balance[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "connectors", + type: "address[]", + internalType: "address[]", + }, + { + name: "slippage", + type: "uint256", + internalType: "uint256", + }, + { + name: "pathOptions", + type: "tuple[]", + internalType: "struct PathOption[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "option", + type: "uint8", + internalType: "uint8", + }, + { + name: "totalOptions", + type: "uint8", + internalType: "uint8", + }, + ], + }, + { + name: "iterations", + type: "uint256", + internalType: "uint256", + }, + { + name: "force", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "results", + type: "tuple[]", + internalType: "struct LiquidationResult[]", + components: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "pathFound", + type: "bool", + internalType: "bool", + }, + { + name: "executed", + type: "bool", + internalType: "bool", + }, + { + name: "profit", + type: "uint256", + internalType: "uint256", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "liquidateBatch", + inputs: [ + { + name: "params", + type: "tuple[]", + internalType: "struct LiqParams[]", + components: [ + { + name: "creditFacade", + type: "address", + internalType: "address", + }, + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + }, + { + name: "to", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "success", + type: "bool[]", + internalType: "bool[]", + }, + ], + stateMutability: "nonpayable", + }, +] as const; + +export class IBatchLiquidator__factory { + static readonly abi = _abi; + static createInterface(): IBatchLiquidatorInterface { + return new Interface(_abi) as IBatchLiquidatorInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IBatchLiquidator { + return new Contract(address, _abi, runner) as unknown as IBatchLiquidator; + } +} diff --git a/src/types/generated/factories/ICreditAccountV3.sol/ICreditAccountBase__factory.ts b/src/types/generated/factories/ICreditAccountV3.sol/ICreditAccountBase__factory.ts new file mode 100644 index 0000000..e808ef7 --- /dev/null +++ b/src/types/generated/factories/ICreditAccountV3.sol/ICreditAccountBase__factory.ts @@ -0,0 +1,98 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + ICreditAccountBase, + ICreditAccountBaseInterface, +} from "../../ICreditAccountV3.sol/ICreditAccountBase"; + +const _abi = [ + { + type: "function", + name: "creditManager", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "execute", + inputs: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "result", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "safeTransfer", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, +] as const; + +export class ICreditAccountBase__factory { + static readonly abi = _abi; + static createInterface(): ICreditAccountBaseInterface { + return new Interface(_abi) as ICreditAccountBaseInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): ICreditAccountBase { + return new Contract(address, _abi, runner) as unknown as ICreditAccountBase; + } +} diff --git a/src/types/generated/factories/ICreditAccountV3.sol/ICreditAccountV3__factory.ts b/src/types/generated/factories/ICreditAccountV3.sol/ICreditAccountV3__factory.ts new file mode 100644 index 0000000..545c512 --- /dev/null +++ b/src/types/generated/factories/ICreditAccountV3.sol/ICreditAccountV3__factory.ts @@ -0,0 +1,129 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + ICreditAccountV3, + ICreditAccountV3Interface, +} from "../../ICreditAccountV3.sol/ICreditAccountV3"; + +const _abi = [ + { + type: "function", + name: "creditManager", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "execute", + inputs: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "result", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "factory", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "rescue", + inputs: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "safeTransfer", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, +] as const; + +export class ICreditAccountV3__factory { + static readonly abi = _abi; + static createInterface(): ICreditAccountV3Interface { + return new Interface(_abi) as ICreditAccountV3Interface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): ICreditAccountV3 { + return new Contract(address, _abi, runner) as unknown as ICreditAccountV3; + } +} diff --git a/src/types/generated/factories/ICreditAccountV3.sol/index.ts b/src/types/generated/factories/ICreditAccountV3.sol/index.ts new file mode 100644 index 0000000..113f05a --- /dev/null +++ b/src/types/generated/factories/ICreditAccountV3.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ICreditAccountBase__factory } from "./ICreditAccountBase__factory"; +export { ICreditAccountV3__factory } from "./ICreditAccountV3__factory"; diff --git a/src/types/generated/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events__factory.ts b/src/types/generated/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events__factory.ts new file mode 100644 index 0000000..6f98d0a --- /dev/null +++ b/src/types/generated/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events__factory.ts @@ -0,0 +1,367 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + ICreditConfiguratorV3Events, + ICreditConfiguratorV3EventsInterface, +} from "../../ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events"; + +const _abi = [ + { + type: "event", + name: "AddCollateralToken", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "AddEmergencyLiquidator", + inputs: [ + { + name: "liquidator", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "AllowAdapter", + inputs: [ + { + name: "targetContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "adapter", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "AllowToken", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "CreditConfiguratorUpgraded", + inputs: [ + { + name: "creditConfigurator", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ForbidAdapter", + inputs: [ + { + name: "targetContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "adapter", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ForbidToken", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "QuoteToken", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "RemoveEmergencyLiquidator", + inputs: [ + { + name: "liquidator", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ResetCumulativeLoss", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "ScheduleTokenLiquidationThresholdRamp", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "liquidationThresholdInitial", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "liquidationThresholdFinal", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "timestampRampStart", + type: "uint40", + indexed: false, + internalType: "uint40", + }, + { + name: "timestampRampEnd", + type: "uint40", + indexed: false, + internalType: "uint40", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetBorrowingLimits", + inputs: [ + { + name: "minDebt", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "maxDebt", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetBotList", + inputs: [ + { + name: "botList", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetCreditFacade", + inputs: [ + { + name: "creditFacade", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetExpirationDate", + inputs: [ + { + name: "expirationDate", + type: "uint40", + indexed: false, + internalType: "uint40", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetMaxCumulativeLoss", + inputs: [ + { + name: "maxCumulativeLoss", + type: "uint128", + indexed: false, + internalType: "uint128", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetMaxDebtPerBlockMultiplier", + inputs: [ + { + name: "maxDebtPerBlockMultiplier", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetMaxEnabledTokens", + inputs: [ + { + name: "maxEnabledTokens", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetPriceOracle", + inputs: [ + { + name: "priceOracle", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetTokenLiquidationThreshold", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "liquidationThreshold", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "UpdateFees", + inputs: [ + { + name: "feeInterest", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "feeLiquidation", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "liquidationPremium", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "feeLiquidationExpired", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "liquidationPremiumExpired", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + ], + anonymous: false, + }, +] as const; + +export class ICreditConfiguratorV3Events__factory { + static readonly abi = _abi; + static createInterface(): ICreditConfiguratorV3EventsInterface { + return new Interface(_abi) as ICreditConfiguratorV3EventsInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): ICreditConfiguratorV3Events { + return new Contract( + address, + _abi, + runner + ) as unknown as ICreditConfiguratorV3Events; + } +} diff --git a/src/types/generated/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3__factory.ts b/src/types/generated/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3__factory.ts new file mode 100644 index 0000000..39ada76 --- /dev/null +++ b/src/types/generated/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3__factory.ts @@ -0,0 +1,795 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + ICreditConfiguratorV3, + ICreditConfiguratorV3Interface, +} from "../../ICreditConfiguratorV3.sol/ICreditConfiguratorV3"; + +const _abi = [ + { + type: "function", + name: "addCollateralToken", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "liquidationThreshold", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "addEmergencyLiquidator", + inputs: [ + { + name: "liquidator", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "addressProvider", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "allowAdapter", + inputs: [ + { + name: "adapter", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allowToken", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allowedAdapters", + inputs: [], + outputs: [ + { + name: "", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "creditFacade", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "creditManager", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "emergencyLiquidators", + inputs: [], + outputs: [ + { + name: "", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "forbidAdapter", + inputs: [ + { + name: "adapter", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "forbidBorrowing", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "forbidToken", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "makeTokenQuoted", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "rampLiquidationThreshold", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "liquidationThresholdFinal", + type: "uint16", + internalType: "uint16", + }, + { + name: "rampStart", + type: "uint40", + internalType: "uint40", + }, + { + name: "rampDuration", + type: "uint24", + internalType: "uint24", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "removeEmergencyLiquidator", + inputs: [ + { + name: "liquidator", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "resetCumulativeLoss", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setBotList", + inputs: [ + { + name: "newVersion", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setCreditFacade", + inputs: [ + { + name: "newCreditFacade", + type: "address", + internalType: "address", + }, + { + name: "migrateParams", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setExpirationDate", + inputs: [ + { + name: "newExpirationDate", + type: "uint40", + internalType: "uint40", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setFees", + inputs: [ + { + name: "feeInterest", + type: "uint16", + internalType: "uint16", + }, + { + name: "feeLiquidation", + type: "uint16", + internalType: "uint16", + }, + { + name: "liquidationPremium", + type: "uint16", + internalType: "uint16", + }, + { + name: "feeLiquidationExpired", + type: "uint16", + internalType: "uint16", + }, + { + name: "liquidationPremiumExpired", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setLiquidationThreshold", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "liquidationThreshold", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setMaxCumulativeLoss", + inputs: [ + { + name: "newMaxCumulativeLoss", + type: "uint128", + internalType: "uint128", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setMaxDebtLimit", + inputs: [ + { + name: "newMaxDebt", + type: "uint128", + internalType: "uint128", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setMaxDebtPerBlockMultiplier", + inputs: [ + { + name: "newMaxDebtLimitPerBlockMultiplier", + type: "uint8", + internalType: "uint8", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setMaxEnabledTokens", + inputs: [ + { + name: "newMaxEnabledTokens", + type: "uint8", + internalType: "uint8", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setMinDebtLimit", + inputs: [ + { + name: "newMinDebt", + type: "uint128", + internalType: "uint128", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setPriceOracle", + inputs: [ + { + name: "newVersion", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "underlying", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "upgradeCreditConfigurator", + inputs: [ + { + name: "newCreditConfigurator", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "AddCollateralToken", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "AddEmergencyLiquidator", + inputs: [ + { + name: "liquidator", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "AllowAdapter", + inputs: [ + { + name: "targetContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "adapter", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "AllowToken", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "CreditConfiguratorUpgraded", + inputs: [ + { + name: "creditConfigurator", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ForbidAdapter", + inputs: [ + { + name: "targetContract", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "adapter", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ForbidToken", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "QuoteToken", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "RemoveEmergencyLiquidator", + inputs: [ + { + name: "liquidator", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ResetCumulativeLoss", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "ScheduleTokenLiquidationThresholdRamp", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "liquidationThresholdInitial", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "liquidationThresholdFinal", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "timestampRampStart", + type: "uint40", + indexed: false, + internalType: "uint40", + }, + { + name: "timestampRampEnd", + type: "uint40", + indexed: false, + internalType: "uint40", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetBorrowingLimits", + inputs: [ + { + name: "minDebt", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "maxDebt", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetBotList", + inputs: [ + { + name: "botList", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetCreditFacade", + inputs: [ + { + name: "creditFacade", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetExpirationDate", + inputs: [ + { + name: "expirationDate", + type: "uint40", + indexed: false, + internalType: "uint40", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetMaxCumulativeLoss", + inputs: [ + { + name: "maxCumulativeLoss", + type: "uint128", + indexed: false, + internalType: "uint128", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetMaxDebtPerBlockMultiplier", + inputs: [ + { + name: "maxDebtPerBlockMultiplier", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetMaxEnabledTokens", + inputs: [ + { + name: "maxEnabledTokens", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetPriceOracle", + inputs: [ + { + name: "priceOracle", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetTokenLiquidationThreshold", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "liquidationThreshold", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "UpdateFees", + inputs: [ + { + name: "feeInterest", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "feeLiquidation", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "liquidationPremium", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "feeLiquidationExpired", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "liquidationPremiumExpired", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + ], + anonymous: false, + }, +] as const; + +export class ICreditConfiguratorV3__factory { + static readonly abi = _abi; + static createInterface(): ICreditConfiguratorV3Interface { + return new Interface(_abi) as ICreditConfiguratorV3Interface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): ICreditConfiguratorV3 { + return new Contract( + address, + _abi, + runner + ) as unknown as ICreditConfiguratorV3; + } +} diff --git a/src/types/generated/factories/ICreditConfiguratorV3.sol/index.ts b/src/types/generated/factories/ICreditConfiguratorV3.sol/index.ts new file mode 100644 index 0000000..005183a --- /dev/null +++ b/src/types/generated/factories/ICreditConfiguratorV3.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ICreditConfiguratorV3__factory } from "./ICreditConfiguratorV3__factory"; +export { ICreditConfiguratorV3Events__factory } from "./ICreditConfiguratorV3Events__factory"; diff --git a/src/types/generated/factories/ICreditFacadeV3.sol/ICreditFacadeV3Events__factory.ts b/src/types/generated/factories/ICreditFacadeV3.sol/ICreditFacadeV3Events__factory.ts new file mode 100644 index 0000000..7e0c21b --- /dev/null +++ b/src/types/generated/factories/ICreditFacadeV3.sol/ICreditFacadeV3Events__factory.ts @@ -0,0 +1,248 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + ICreditFacadeV3Events, + ICreditFacadeV3EventsInterface, +} from "../../ICreditFacadeV3.sol/ICreditFacadeV3Events"; + +const _abi = [ + { + type: "event", + name: "AddCollateral", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "CloseCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "borrower", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "DecreaseDebt", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Execute", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "targetContract", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "FinishMultiCall", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "IncreaseDebt", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "LiquidateCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "liquidator", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "remainingFunds", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OpenCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "onBehalfOf", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "referralCode", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "StartMultiCall", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "WithdrawCollateral", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "to", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, +] as const; + +export class ICreditFacadeV3Events__factory { + static readonly abi = _abi; + static createInterface(): ICreditFacadeV3EventsInterface { + return new Interface(_abi) as ICreditFacadeV3EventsInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): ICreditFacadeV3Events { + return new Contract( + address, + _abi, + runner + ) as unknown as ICreditFacadeV3Events; + } +} diff --git a/src/types/generated/factories/ICreditFacadeV3.sol/ICreditFacadeV3__factory.ts b/src/types/generated/factories/ICreditFacadeV3.sol/ICreditFacadeV3__factory.ts new file mode 100644 index 0000000..9e68a58 --- /dev/null +++ b/src/types/generated/factories/ICreditFacadeV3.sol/ICreditFacadeV3__factory.ts @@ -0,0 +1,721 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + ICreditFacadeV3, + ICreditFacadeV3Interface, +} from "../../ICreditFacadeV3.sol/ICreditFacadeV3"; + +const _abi = [ + { + type: "function", + name: "botList", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "botMulticall", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "canLiquidateWhilePaused", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "closeCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "creditManager", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "debtLimits", + inputs: [], + outputs: [ + { + name: "minDebt", + type: "uint128", + internalType: "uint128", + }, + { + name: "maxDebt", + type: "uint128", + internalType: "uint128", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "degenNFT", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "expirable", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "expirationDate", + inputs: [], + outputs: [ + { + name: "", + type: "uint40", + internalType: "uint40", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "forbiddenTokenMask", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "liquidateCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "lossParams", + inputs: [], + outputs: [ + { + name: "currentCumulativeLoss", + type: "uint128", + internalType: "uint128", + }, + { + name: "maxCumulativeLoss", + type: "uint128", + internalType: "uint128", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "maxDebtPerBlockMultiplier", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "maxQuotaMultiplier", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "multicall", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "openCreditAccount", + inputs: [ + { + name: "onBehalfOf", + type: "address", + internalType: "address", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "referralCode", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "setBotList", + inputs: [ + { + name: "newBotList", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setBotPermissions", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "bot", + type: "address", + internalType: "address", + }, + { + name: "permissions", + type: "uint192", + internalType: "uint192", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setCumulativeLossParams", + inputs: [ + { + name: "newMaxCumulativeLoss", + type: "uint128", + internalType: "uint128", + }, + { + name: "resetCumulativeLoss", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setDebtLimits", + inputs: [ + { + name: "newMinDebt", + type: "uint128", + internalType: "uint128", + }, + { + name: "newMaxDebt", + type: "uint128", + internalType: "uint128", + }, + { + name: "newMaxDebtPerBlockMultiplier", + type: "uint8", + internalType: "uint8", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setEmergencyLiquidator", + inputs: [ + { + name: "liquidator", + type: "address", + internalType: "address", + }, + { + name: "allowance", + type: "uint8", + internalType: "enum AllowanceAction", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setExpirationDate", + inputs: [ + { + name: "newExpirationDate", + type: "uint40", + internalType: "uint40", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setTokenAllowance", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "allowance", + type: "uint8", + internalType: "enum AllowanceAction", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "weth", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "AddCollateral", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "CloseCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "borrower", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "DecreaseDebt", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Execute", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "targetContract", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "FinishMultiCall", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "IncreaseDebt", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "LiquidateCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "liquidator", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "remainingFunds", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OpenCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "onBehalfOf", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "referralCode", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "StartMultiCall", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "WithdrawCollateral", + inputs: [ + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "to", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, +] as const; + +export class ICreditFacadeV3__factory { + static readonly abi = _abi; + static createInterface(): ICreditFacadeV3Interface { + return new Interface(_abi) as ICreditFacadeV3Interface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): ICreditFacadeV3 { + return new Contract(address, _abi, runner) as unknown as ICreditFacadeV3; + } +} diff --git a/src/types/generated/factories/ICreditFacadeV3.sol/index.ts b/src/types/generated/factories/ICreditFacadeV3.sol/index.ts new file mode 100644 index 0000000..26fc611 --- /dev/null +++ b/src/types/generated/factories/ICreditFacadeV3.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ICreditFacadeV3__factory } from "./ICreditFacadeV3__factory"; +export { ICreditFacadeV3Events__factory } from "./ICreditFacadeV3Events__factory"; diff --git a/src/types/generated/factories/ICreditFacadeV3Multicall__factory.ts b/src/types/generated/factories/ICreditFacadeV3Multicall__factory.ts new file mode 100644 index 0000000..047ef59 --- /dev/null +++ b/src/types/generated/factories/ICreditFacadeV3Multicall__factory.ts @@ -0,0 +1,281 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + ICreditFacadeV3Multicall, + ICreditFacadeV3MulticallInterface, +} from "../ICreditFacadeV3Multicall"; + +const _abi = [ + { + type: "function", + name: "addCollateral", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "addCollateralWithPermit", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "deadline", + type: "uint256", + internalType: "uint256", + }, + { + name: "v", + type: "uint8", + internalType: "uint8", + }, + { + name: "r", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "s", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "compareBalances", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "decreaseDebt", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "disableToken", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "enableToken", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "increaseDebt", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onDemandPriceUpdate", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "revokeAdapterAllowances", + inputs: [ + { + name: "revocations", + type: "tuple[]", + internalType: "struct RevocationPair[]", + components: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setFullCheckParams", + inputs: [ + { + name: "collateralHints", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "minHealthFactor", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "storeExpectedBalances", + inputs: [ + { + name: "balanceDeltas", + type: "tuple[]", + internalType: "struct BalanceDelta[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "int256", + internalType: "int256", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "updateQuota", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "quotaChange", + type: "int96", + internalType: "int96", + }, + { + name: "minQuota", + type: "uint96", + internalType: "uint96", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdrawCollateral", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +export class ICreditFacadeV3Multicall__factory { + static readonly abi = _abi; + static createInterface(): ICreditFacadeV3MulticallInterface { + return new Interface(_abi) as ICreditFacadeV3MulticallInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): ICreditFacadeV3Multicall { + return new Contract( + address, + _abi, + runner + ) as unknown as ICreditFacadeV3Multicall; + } +} diff --git a/src/types/generated/factories/ICreditManagerV3.sol/ICreditManagerV3Events__factory.ts b/src/types/generated/factories/ICreditManagerV3.sol/ICreditManagerV3Events__factory.ts new file mode 100644 index 0000000..c3621bf --- /dev/null +++ b/src/types/generated/factories/ICreditManagerV3.sol/ICreditManagerV3Events__factory.ts @@ -0,0 +1,42 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + ICreditManagerV3Events, + ICreditManagerV3EventsInterface, +} from "../../ICreditManagerV3.sol/ICreditManagerV3Events"; + +const _abi = [ + { + type: "event", + name: "SetCreditConfigurator", + inputs: [ + { + name: "newConfigurator", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, +] as const; + +export class ICreditManagerV3Events__factory { + static readonly abi = _abi; + static createInterface(): ICreditManagerV3EventsInterface { + return new Interface(_abi) as ICreditManagerV3EventsInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): ICreditManagerV3Events { + return new Contract( + address, + _abi, + runner + ) as unknown as ICreditManagerV3Events; + } +} diff --git a/src/types/generated/factories/ICreditManagerV3.sol/ICreditManagerV3__factory.ts b/src/types/generated/factories/ICreditManagerV3.sol/ICreditManagerV3__factory.ts new file mode 100644 index 0000000..7c1047a --- /dev/null +++ b/src/types/generated/factories/ICreditManagerV3.sol/ICreditManagerV3__factory.ts @@ -0,0 +1,1347 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + ICreditManagerV3, + ICreditManagerV3Interface, +} from "../../ICreditManagerV3.sol/ICreditManagerV3"; + +const _abi = [ + { + type: "function", + name: "accountFactory", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "adapterToContract", + inputs: [ + { + name: "adapter", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "targetContract", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "addCollateral", + inputs: [ + { + name: "payer", + type: "address", + internalType: "address", + }, + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "tokensToEnable", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "addToken", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "addressProvider", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approveCreditAccount", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "approveToken", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "calcDebtAndCollateral", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "task", + type: "uint8", + internalType: "enum CollateralCalcTask", + }, + ], + outputs: [ + { + name: "cdd", + type: "tuple", + internalType: "struct CollateralDebtData", + components: [ + { + name: "debt", + type: "uint256", + internalType: "uint256", + }, + { + name: "cumulativeIndexNow", + type: "uint256", + internalType: "uint256", + }, + { + name: "cumulativeIndexLastUpdate", + type: "uint256", + internalType: "uint256", + }, + { + name: "cumulativeQuotaInterest", + type: "uint128", + internalType: "uint128", + }, + { + name: "accruedInterest", + type: "uint256", + internalType: "uint256", + }, + { + name: "accruedFees", + type: "uint256", + internalType: "uint256", + }, + { + name: "totalDebtUSD", + type: "uint256", + internalType: "uint256", + }, + { + name: "totalValue", + type: "uint256", + internalType: "uint256", + }, + { + name: "totalValueUSD", + type: "uint256", + internalType: "uint256", + }, + { + name: "twvUSD", + type: "uint256", + internalType: "uint256", + }, + { + name: "enabledTokensMask", + type: "uint256", + internalType: "uint256", + }, + { + name: "quotedTokensMask", + type: "uint256", + internalType: "uint256", + }, + { + name: "quotedTokens", + type: "address[]", + internalType: "address[]", + }, + { + name: "_poolQuotaKeeper", + type: "address", + internalType: "address", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "closeCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "collateralTokenByMask", + inputs: [ + { + name: "tokenMask", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "liquidationThreshold", + type: "uint16", + internalType: "uint16", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "collateralTokensCount", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "contractToAdapter", + inputs: [ + { + name: "targetContract", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "adapter", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "creditAccountInfo", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "debt", + type: "uint256", + internalType: "uint256", + }, + { + name: "cumulativeIndexLastUpdate", + type: "uint256", + internalType: "uint256", + }, + { + name: "cumulativeQuotaInterest", + type: "uint128", + internalType: "uint128", + }, + { + name: "quotaFees", + type: "uint128", + internalType: "uint128", + }, + { + name: "enabledTokensMask", + type: "uint256", + internalType: "uint256", + }, + { + name: "flags", + type: "uint16", + internalType: "uint16", + }, + { + name: "lastDebtUpdate", + type: "uint64", + internalType: "uint64", + }, + { + name: "borrower", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "creditAccounts", + inputs: [ + { + name: "offset", + type: "uint256", + internalType: "uint256", + }, + { + name: "limit", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "creditAccounts", + inputs: [], + outputs: [ + { + name: "", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "creditAccountsLen", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "creditConfigurator", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "creditFacade", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "enabledTokensMaskOf", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "execute", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "result", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "externalCall", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "result", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "fees", + inputs: [], + outputs: [ + { + name: "feeInterest", + type: "uint16", + internalType: "uint16", + }, + { + name: "feeLiquidation", + type: "uint16", + internalType: "uint16", + }, + { + name: "liquidationDiscount", + type: "uint16", + internalType: "uint16", + }, + { + name: "feeLiquidationExpired", + type: "uint16", + internalType: "uint16", + }, + { + name: "liquidationDiscountExpired", + type: "uint16", + internalType: "uint16", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "flagsOf", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint16", + internalType: "uint16", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "fullCollateralCheck", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "enabledTokensMask", + type: "uint256", + internalType: "uint256", + }, + { + name: "collateralHints", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "minHealthFactor", + type: "uint16", + internalType: "uint16", + }, + { + name: "useSafePrices", + type: "bool", + internalType: "bool", + }, + ], + outputs: [ + { + name: "enabledTokensMaskAfter", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getActiveCreditAccountOrRevert", + inputs: [], + outputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getBorrowerOrRevert", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "borrower", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getTokenByMask", + inputs: [ + { + name: "tokenMask", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getTokenMaskOrRevert", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "tokenMask", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isLiquidatable", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "minHealthFactor", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "liquidateCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "collateralDebtData", + type: "tuple", + internalType: "struct CollateralDebtData", + components: [ + { + name: "debt", + type: "uint256", + internalType: "uint256", + }, + { + name: "cumulativeIndexNow", + type: "uint256", + internalType: "uint256", + }, + { + name: "cumulativeIndexLastUpdate", + type: "uint256", + internalType: "uint256", + }, + { + name: "cumulativeQuotaInterest", + type: "uint128", + internalType: "uint128", + }, + { + name: "accruedInterest", + type: "uint256", + internalType: "uint256", + }, + { + name: "accruedFees", + type: "uint256", + internalType: "uint256", + }, + { + name: "totalDebtUSD", + type: "uint256", + internalType: "uint256", + }, + { + name: "totalValue", + type: "uint256", + internalType: "uint256", + }, + { + name: "totalValueUSD", + type: "uint256", + internalType: "uint256", + }, + { + name: "twvUSD", + type: "uint256", + internalType: "uint256", + }, + { + name: "enabledTokensMask", + type: "uint256", + internalType: "uint256", + }, + { + name: "quotedTokensMask", + type: "uint256", + internalType: "uint256", + }, + { + name: "quotedTokens", + type: "address[]", + internalType: "address[]", + }, + { + name: "_poolQuotaKeeper", + type: "address", + internalType: "address", + }, + ], + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "isExpired", + type: "bool", + internalType: "bool", + }, + ], + outputs: [ + { + name: "remainingFunds", + type: "uint256", + internalType: "uint256", + }, + { + name: "loss", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "liquidationThresholds", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "lt", + type: "uint16", + internalType: "uint16", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "ltParams", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "ltInitial", + type: "uint16", + internalType: "uint16", + }, + { + name: "ltFinal", + type: "uint16", + internalType: "uint16", + }, + { + name: "timestampRampStart", + type: "uint40", + internalType: "uint40", + }, + { + name: "rampDuration", + type: "uint24", + internalType: "uint24", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "manageDebt", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "enabledTokensMask", + type: "uint256", + internalType: "uint256", + }, + { + name: "action", + type: "uint8", + internalType: "enum ManageDebtAction", + }, + ], + outputs: [ + { + name: "newDebt", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokensToEnable", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokensToDisable", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "maxEnabledTokens", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "openCreditAccount", + inputs: [ + { + name: "onBehalfOf", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "pool", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "poolQuotaKeeper", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "priceOracle", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "quotedTokensMask", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "revokeAdapterAllowances", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "revocations", + type: "tuple[]", + internalType: "struct RevocationPair[]", + components: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setActiveCreditAccount", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setCollateralTokenData", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "ltInitial", + type: "uint16", + internalType: "uint16", + }, + { + name: "ltFinal", + type: "uint16", + internalType: "uint16", + }, + { + name: "timestampRampStart", + type: "uint40", + internalType: "uint40", + }, + { + name: "rampDuration", + type: "uint24", + internalType: "uint24", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setContractAllowance", + inputs: [ + { + name: "adapter", + type: "address", + internalType: "address", + }, + { + name: "targetContract", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setCreditConfigurator", + inputs: [ + { + name: "creditConfigurator", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setCreditFacade", + inputs: [ + { + name: "creditFacade", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setFees", + inputs: [ + { + name: "feeInterest", + type: "uint16", + internalType: "uint16", + }, + { + name: "feeLiquidation", + type: "uint16", + internalType: "uint16", + }, + { + name: "liquidationDiscount", + type: "uint16", + internalType: "uint16", + }, + { + name: "feeLiquidationExpired", + type: "uint16", + internalType: "uint16", + }, + { + name: "liquidationDiscountExpired", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setFlagFor", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "flag", + type: "uint16", + internalType: "uint16", + }, + { + name: "value", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setMaxEnabledTokens", + inputs: [ + { + name: "maxEnabledTokens", + type: "uint8", + internalType: "uint8", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setPriceOracle", + inputs: [ + { + name: "priceOracle", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setQuotedMask", + inputs: [ + { + name: "quotedTokensMask", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "underlying", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "updateQuota", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "quotaChange", + type: "int96", + internalType: "int96", + }, + { + name: "minQuota", + type: "uint96", + internalType: "uint96", + }, + { + name: "maxQuota", + type: "uint96", + internalType: "uint96", + }, + ], + outputs: [ + { + name: "tokensToEnable", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokensToDisable", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "withdrawCollateral", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "tokensToDisable", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "SetCreditConfigurator", + inputs: [ + { + name: "newConfigurator", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, +] as const; + +export class ICreditManagerV3__factory { + static readonly abi = _abi; + static createInterface(): ICreditManagerV3Interface { + return new Interface(_abi) as ICreditManagerV3Interface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): ICreditManagerV3 { + return new Contract(address, _abi, runner) as unknown as ICreditManagerV3; + } +} diff --git a/src/types/generated/factories/ICreditManagerV3.sol/index.ts b/src/types/generated/factories/ICreditManagerV3.sol/index.ts new file mode 100644 index 0000000..5357d26 --- /dev/null +++ b/src/types/generated/factories/ICreditManagerV3.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ICreditManagerV3__factory } from "./ICreditManagerV3__factory"; +export { ICreditManagerV3Events__factory } from "./ICreditManagerV3Events__factory"; diff --git a/src/types/generated/factories/IDaiLikePermit__factory.ts b/src/types/generated/factories/IDaiLikePermit__factory.ts new file mode 100644 index 0000000..bee1a0b --- /dev/null +++ b/src/types/generated/factories/IDaiLikePermit__factory.ts @@ -0,0 +1,73 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IDaiLikePermit, + IDaiLikePermitInterface, +} from "../IDaiLikePermit"; + +const _abi = [ + { + type: "function", + name: "permit", + inputs: [ + { + name: "holder", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256", + }, + { + name: "expiry", + type: "uint256", + internalType: "uint256", + }, + { + name: "allowed", + type: "bool", + internalType: "bool", + }, + { + name: "v", + type: "uint8", + internalType: "uint8", + }, + { + name: "r", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "s", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +export class IDaiLikePermit__factory { + static readonly abi = _abi; + static createInterface(): IDaiLikePermitInterface { + return new Interface(_abi) as IDaiLikePermitInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IDaiLikePermit { + return new Contract(address, _abi, runner) as unknown as IDaiLikePermit; + } +} diff --git a/src/types/generated/factories/IERC20Metadata__factory.ts b/src/types/generated/factories/IERC20Metadata__factory.ts new file mode 100644 index 0000000..5b05b01 --- /dev/null +++ b/src/types/generated/factories/IERC20Metadata__factory.ts @@ -0,0 +1,247 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IERC20Metadata, + IERC20MetadataInterface, +} from "../IERC20Metadata"; + +const _abi = [ + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, +] as const; + +export class IERC20Metadata__factory { + static readonly abi = _abi; + static createInterface(): IERC20MetadataInterface { + return new Interface(_abi) as IERC20MetadataInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IERC20Metadata { + return new Contract(address, _abi, runner) as unknown as IERC20Metadata; + } +} diff --git a/src/types/generated/factories/IERC20Permit__factory.ts b/src/types/generated/factories/IERC20Permit__factory.ts new file mode 100644 index 0000000..24090d2 --- /dev/null +++ b/src/types/generated/factories/IERC20Permit__factory.ts @@ -0,0 +1,97 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IERC20Permit, IERC20PermitInterface } from "../IERC20Permit"; + +const _abi = [ + { + type: "function", + name: "DOMAIN_SEPARATOR", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "nonces", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "permit", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "deadline", + type: "uint256", + internalType: "uint256", + }, + { + name: "v", + type: "uint8", + internalType: "uint8", + }, + { + name: "r", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "s", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +export class IERC20Permit__factory { + static readonly abi = _abi; + static createInterface(): IERC20PermitInterface { + return new Interface(_abi) as IERC20PermitInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IERC20Permit { + return new Contract(address, _abi, runner) as unknown as IERC20Permit; + } +} diff --git a/src/types/generated/factories/IERC20__factory.ts b/src/types/generated/factories/IERC20__factory.ts new file mode 100644 index 0000000..dcf2c94 --- /dev/null +++ b/src/types/generated/factories/IERC20__factory.ts @@ -0,0 +1,202 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IERC20, IERC20Interface } from "../IERC20"; + +const _abi = [ + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, +] as const; + +export class IERC20__factory { + static readonly abi = _abi; + static createInterface(): IERC20Interface { + return new Interface(_abi) as IERC20Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC20 { + return new Contract(address, _abi, runner) as unknown as IERC20; + } +} diff --git a/src/types/generated/factories/ILiquidator__factory.ts b/src/types/generated/factories/ILiquidator__factory.ts new file mode 100644 index 0000000..157e425 --- /dev/null +++ b/src/types/generated/factories/ILiquidator__factory.ts @@ -0,0 +1,369 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { ILiquidator, ILiquidatorInterface } from "../ILiquidator"; + +const _abi = [ + { + type: "function", + name: "cmToCA", + inputs: [ + { + name: "cm", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getOptimalLiquidation", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "hfOptimal", + type: "uint256", + internalType: "uint256", + }, + { + name: "priceUpdates", + type: "tuple[]", + internalType: "struct IPartialLiquidationBotV3.PriceUpdate[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "tokenOut", + type: "address", + internalType: "address", + }, + { + name: "optimalAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "repaidAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "flashLoanAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "isOptimalRepayable", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "partialLiquidateAndConvert", + inputs: [ + { + name: "creditManager", + type: "address", + internalType: "address", + }, + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "assetOut", + type: "address", + internalType: "address", + }, + { + name: "amountOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "flashLoanAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "priceUpdates", + type: "tuple[]", + internalType: "struct IPartialLiquidationBotV3.PriceUpdate[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "conversionCalls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "partialLiquidationBot", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "previewPartialLiquidation", + inputs: [ + { + name: "creditManager", + type: "address", + internalType: "address", + }, + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "assetOut", + type: "address", + internalType: "address", + }, + { + name: "amountOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "flashLoanAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "priceUpdates", + type: "tuple[]", + internalType: "struct IPartialLiquidationBotV3.PriceUpdate[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "connectors", + type: "address[]", + internalType: "address[]", + }, + { + name: "slippage", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "res", + type: "tuple", + internalType: "struct LiquidationResult", + components: [ + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "profit", + type: "int256", + internalType: "int256", + }, + { + name: "amountIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountOut", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "registerCM", + inputs: [ + { + name: "creditManager", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "router", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "setPartialLiquidationBot", + inputs: [ + { + name: "newPLB", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setRouter", + inputs: [ + { + name: "newRouter", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdrawToken", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +export class ILiquidator__factory { + static readonly abi = _abi; + static createInterface(): ILiquidatorInterface { + return new Interface(_abi) as ILiquidatorInterface; + } + static connect(address: string, runner?: ContractRunner | null): ILiquidator { + return new Contract(address, _abi, runner) as unknown as ILiquidator; + } +} diff --git a/src/types/generated/factories/IPartialLiquidationBotV3__factory.ts b/src/types/generated/factories/IPartialLiquidationBotV3__factory.ts new file mode 100644 index 0000000..0807e21 --- /dev/null +++ b/src/types/generated/factories/IPartialLiquidationBotV3__factory.ts @@ -0,0 +1,297 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IPartialLiquidationBotV3, + IPartialLiquidationBotV3Interface, +} from "../IPartialLiquidationBotV3"; + +const _abi = [ + { + type: "function", + name: "feeScaleFactor", + inputs: [], + outputs: [ + { + name: "", + type: "uint16", + internalType: "uint16", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "liquidateExactCollateral", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "seizedAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "maxRepaidAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "priceUpdates", + type: "tuple[]", + internalType: "struct IPartialLiquidationBotV3.PriceUpdate[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "repaidAmount", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "liquidateExactDebt", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "repaidAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "minSeizedAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "priceUpdates", + type: "tuple[]", + internalType: "struct IPartialLiquidationBotV3.PriceUpdate[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "seizedAmount", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "maxHealthFactor", + inputs: [], + outputs: [ + { + name: "", + type: "uint16", + internalType: "uint16", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "minHealthFactor", + inputs: [], + outputs: [ + { + name: "", + type: "uint16", + internalType: "uint16", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "premiumScaleFactor", + inputs: [], + outputs: [ + { + name: "", + type: "uint16", + internalType: "uint16", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "treasury", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "LiquidatePartial", + inputs: [ + { + name: "creditManager", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "creditAccount", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "repaidDebt", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "seizedCollateral", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "fee", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "LiquidatedLessThanNeededException", + inputs: [], + }, + { + type: "error", + name: "LiquidatedMoreThanNeededException", + inputs: [], + }, + { + type: "error", + name: "RepaidMoreThanAllowedException", + inputs: [], + }, + { + type: "error", + name: "SeizedLessThanRequiredException", + inputs: [], + }, + { + type: "error", + name: "UnderlyingNotLiquidatableException", + inputs: [], + }, +] as const; + +export class IPartialLiquidationBotV3__factory { + static readonly abi = _abi; + static createInterface(): IPartialLiquidationBotV3Interface { + return new Interface(_abi) as IPartialLiquidationBotV3Interface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IPartialLiquidationBotV3 { + return new Contract( + address, + _abi, + runner + ) as unknown as IPartialLiquidationBotV3; + } +} diff --git a/src/types/generated/factories/IPermit2__factory.ts b/src/types/generated/factories/IPermit2__factory.ts new file mode 100644 index 0000000..643f0bc --- /dev/null +++ b/src/types/generated/factories/IPermit2__factory.ts @@ -0,0 +1,155 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IPermit2, IPermit2Interface } from "../IPermit2"; + +const _abi = [ + { + type: "function", + name: "allowance", + inputs: [ + { + name: "user", + type: "address", + internalType: "address", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct IPermit2.PackedAllowance", + components: [ + { + name: "amount", + type: "uint160", + internalType: "uint160", + }, + { + name: "expiration", + type: "uint48", + internalType: "uint48", + }, + { + name: "nonce", + type: "uint48", + internalType: "uint48", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "permit", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "permitSingle", + type: "tuple", + internalType: "struct IPermit2.PermitSingle", + components: [ + { + name: "details", + type: "tuple", + internalType: "struct IPermit2.PermitDetails", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint160", + internalType: "uint160", + }, + { + name: "expiration", + type: "uint48", + internalType: "uint48", + }, + { + name: "nonce", + type: "uint48", + internalType: "uint48", + }, + ], + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "sigDeadline", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "user", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint160", + internalType: "uint160", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +export class IPermit2__factory { + static readonly abi = _abi; + static createInterface(): IPermit2Interface { + return new Interface(_abi) as IPermit2Interface; + } + static connect(address: string, runner?: ContractRunner | null): IPermit2 { + return new Contract(address, _abi, runner) as unknown as IPermit2; + } +} diff --git a/src/types/generated/factories/IPriceFeed.sol/IPriceFeed__factory.ts b/src/types/generated/factories/IPriceFeed.sol/IPriceFeed__factory.ts new file mode 100644 index 0000000..94bd850 --- /dev/null +++ b/src/types/generated/factories/IPriceFeed.sol/IPriceFeed__factory.ts @@ -0,0 +1,120 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IPriceFeed, + IPriceFeedInterface, +} from "../../IPriceFeed.sol/IPriceFeed"; + +const _abi = [ + { + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "description", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "latestRoundData", + inputs: [], + outputs: [ + { + name: "", + type: "uint80", + internalType: "uint80", + }, + { + name: "answer", + type: "int256", + internalType: "int256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "updatedAt", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint80", + internalType: "uint80", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "priceFeedType", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "enum PriceFeedType", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "skipPriceCheck", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, +] as const; + +export class IPriceFeed__factory { + static readonly abi = _abi; + static createInterface(): IPriceFeedInterface { + return new Interface(_abi) as IPriceFeedInterface; + } + static connect(address: string, runner?: ContractRunner | null): IPriceFeed { + return new Contract(address, _abi, runner) as unknown as IPriceFeed; + } +} diff --git a/src/types/generated/factories/IPriceFeed.sol/IUpdatablePriceFeed__factory.ts b/src/types/generated/factories/IPriceFeed.sol/IUpdatablePriceFeed__factory.ts new file mode 100644 index 0000000..9840191 --- /dev/null +++ b/src/types/generated/factories/IPriceFeed.sol/IUpdatablePriceFeed__factory.ts @@ -0,0 +1,153 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IUpdatablePriceFeed, + IUpdatablePriceFeedInterface, +} from "../../IPriceFeed.sol/IUpdatablePriceFeed"; + +const _abi = [ + { + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "description", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "latestRoundData", + inputs: [], + outputs: [ + { + name: "", + type: "uint80", + internalType: "uint80", + }, + { + name: "answer", + type: "int256", + internalType: "int256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "updatedAt", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint80", + internalType: "uint80", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "priceFeedType", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "enum PriceFeedType", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "skipPriceCheck", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "updatable", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "updatePrice", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, +] as const; + +export class IUpdatablePriceFeed__factory { + static readonly abi = _abi; + static createInterface(): IUpdatablePriceFeedInterface { + return new Interface(_abi) as IUpdatablePriceFeedInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IUpdatablePriceFeed { + return new Contract( + address, + _abi, + runner + ) as unknown as IUpdatablePriceFeed; + } +} diff --git a/src/types/generated/factories/IPriceFeed.sol/index.ts b/src/types/generated/factories/IPriceFeed.sol/index.ts new file mode 100644 index 0000000..0daebf3 --- /dev/null +++ b/src/types/generated/factories/IPriceFeed.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IPriceFeed__factory } from "./IPriceFeed__factory"; +export { IUpdatablePriceFeed__factory } from "./IUpdatablePriceFeed__factory"; diff --git a/src/types/generated/factories/IPriceHelper__factory.ts b/src/types/generated/factories/IPriceHelper__factory.ts new file mode 100644 index 0000000..cba71f0 --- /dev/null +++ b/src/types/generated/factories/IPriceHelper__factory.ts @@ -0,0 +1,80 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IPriceHelper, IPriceHelperInterface } from "../IPriceHelper"; + +const _abi = [ + { + type: "function", + name: "previewTokens", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "priceUpdates", + type: "tuple[]", + internalType: "struct PriceOnDemand[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "results", + type: "tuple[]", + internalType: "struct TokenPriceInfo[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "balanceInUnderlying", + type: "uint256", + internalType: "uint256", + }, + { + name: "liquidationThreshold", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + stateMutability: "nonpayable", + }, +] as const; + +export class IPriceHelper__factory { + static readonly abi = _abi; + static createInterface(): IPriceHelperInterface { + return new Interface(_abi) as IPriceHelperInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IPriceHelper { + return new Contract(address, _abi, runner) as unknown as IPriceHelper; + } +} diff --git a/src/types/generated/factories/IPriceOracleBase__factory.ts b/src/types/generated/factories/IPriceOracleBase__factory.ts new file mode 100644 index 0000000..e98fb01 --- /dev/null +++ b/src/types/generated/factories/IPriceOracleBase__factory.ts @@ -0,0 +1,153 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IPriceOracleBase, + IPriceOracleBaseInterface, +} from "../IPriceOracleBase"; + +const _abi = [ + { + type: "function", + name: "convert", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenFrom", + type: "address", + internalType: "address", + }, + { + name: "tokenTo", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "convertFromUSD", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "convertToUSD", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPrice", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "priceFeeds", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "priceFeed", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, +] as const; + +export class IPriceOracleBase__factory { + static readonly abi = _abi; + static createInterface(): IPriceOracleBaseInterface { + return new Interface(_abi) as IPriceOracleBaseInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IPriceOracleBase { + return new Contract(address, _abi, runner) as unknown as IPriceOracleBase; + } +} diff --git a/src/types/generated/factories/IPriceOracleV3.sol/IPriceOracleV3Events__factory.ts b/src/types/generated/factories/IPriceOracleV3.sol/IPriceOracleV3Events__factory.ts new file mode 100644 index 0000000..ce58bd9 --- /dev/null +++ b/src/types/generated/factories/IPriceOracleV3.sol/IPriceOracleV3Events__factory.ts @@ -0,0 +1,116 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IPriceOracleV3Events, + IPriceOracleV3EventsInterface, +} from "../../IPriceOracleV3.sol/IPriceOracleV3Events"; + +const _abi = [ + { + type: "event", + name: "SetPriceFeed", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "priceFeed", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "stalenessPeriod", + type: "uint32", + indexed: false, + internalType: "uint32", + }, + { + name: "skipCheck", + type: "bool", + indexed: false, + internalType: "bool", + }, + { + name: "trusted", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetReservePriceFeed", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "priceFeed", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "stalenessPeriod", + type: "uint32", + indexed: false, + internalType: "uint32", + }, + { + name: "skipCheck", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetReservePriceFeedStatus", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "active", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, +] as const; + +export class IPriceOracleV3Events__factory { + static readonly abi = _abi; + static createInterface(): IPriceOracleV3EventsInterface { + return new Interface(_abi) as IPriceOracleV3EventsInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IPriceOracleV3Events { + return new Contract( + address, + _abi, + runner + ) as unknown as IPriceOracleV3Events; + } +} diff --git a/src/types/generated/factories/IPriceOracleV3.sol/IPriceOracleV3__factory.ts b/src/types/generated/factories/IPriceOracleV3.sol/IPriceOracleV3__factory.ts new file mode 100644 index 0000000..de5d6c1 --- /dev/null +++ b/src/types/generated/factories/IPriceOracleV3.sol/IPriceOracleV3__factory.ts @@ -0,0 +1,439 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IPriceOracleV3, + IPriceOracleV3Interface, +} from "../../IPriceOracleV3.sol/IPriceOracleV3"; + +const _abi = [ + { + type: "function", + name: "convert", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenFrom", + type: "address", + internalType: "address", + }, + { + name: "tokenTo", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "convertFromUSD", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "convertToUSD", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPrice", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPriceRaw", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPriceSafe", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "priceFeedParams", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "priceFeed", + type: "address", + internalType: "address", + }, + { + name: "stalenessPeriod", + type: "uint32", + internalType: "uint32", + }, + { + name: "skipCheck", + type: "bool", + internalType: "bool", + }, + { + name: "decimals", + type: "uint8", + internalType: "uint8", + }, + { + name: "trusted", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "priceFeeds", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "priceFeed", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "priceFeedsRaw", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "safeConvertToUSD", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "setPriceFeed", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "priceFeed", + type: "address", + internalType: "address", + }, + { + name: "stalenessPeriod", + type: "uint32", + internalType: "uint32", + }, + { + name: "trusted", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setReservePriceFeed", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "priceFeed", + type: "address", + internalType: "address", + }, + { + name: "stalenessPeriod", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setReservePriceFeedStatus", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "active", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "SetPriceFeed", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "priceFeed", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "stalenessPeriod", + type: "uint32", + indexed: false, + internalType: "uint32", + }, + { + name: "skipCheck", + type: "bool", + indexed: false, + internalType: "bool", + }, + { + name: "trusted", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetReservePriceFeed", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "priceFeed", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "stalenessPeriod", + type: "uint32", + indexed: false, + internalType: "uint32", + }, + { + name: "skipCheck", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetReservePriceFeedStatus", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "active", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, +] as const; + +export class IPriceOracleV3__factory { + static readonly abi = _abi; + static createInterface(): IPriceOracleV3Interface { + return new Interface(_abi) as IPriceOracleV3Interface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IPriceOracleV3 { + return new Contract(address, _abi, runner) as unknown as IPriceOracleV3; + } +} diff --git a/src/types/generated/factories/IPriceOracleV3.sol/index.ts b/src/types/generated/factories/IPriceOracleV3.sol/index.ts new file mode 100644 index 0000000..db6b864 --- /dev/null +++ b/src/types/generated/factories/IPriceOracleV3.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IPriceOracleV3__factory } from "./IPriceOracleV3__factory"; +export { IPriceOracleV3Events__factory } from "./IPriceOracleV3Events__factory"; diff --git a/src/types/generated/factories/IRouterV3__factory.ts b/src/types/generated/factories/IRouterV3__factory.ts new file mode 100644 index 0000000..d778a23 --- /dev/null +++ b/src/types/generated/factories/IRouterV3__factory.ts @@ -0,0 +1,216 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IRouterV3, IRouterV3Interface } from "../IRouterV3"; + +const _abi = [ + { + type: "function", + name: "findBestClosePath", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "expectedBalances", + type: "tuple[]", + internalType: "struct Balance[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "leftoverBalances", + type: "tuple[]", + internalType: "struct Balance[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "connectors", + type: "address[]", + internalType: "address[]", + }, + { + name: "slippage", + type: "uint256", + internalType: "uint256", + }, + { + name: "pathOptions", + type: "tuple[]", + internalType: "struct PathOption[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "option", + type: "uint8", + internalType: "uint8", + }, + { + name: "totalOptions", + type: "uint8", + internalType: "uint8", + }, + ], + }, + { + name: "iterations", + type: "uint256", + internalType: "uint256", + }, + { + name: "force", + type: "bool", + internalType: "bool", + }, + ], + outputs: [ + { + name: "result", + type: "tuple", + internalType: "struct RouterResult", + components: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "minAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "findOneTokenPath", + inputs: [ + { + name: "tokenIn", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "tokenOut", + type: "address", + internalType: "address", + }, + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "connectors", + type: "address[]", + internalType: "address[]", + }, + { + name: "slippage", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct RouterResult", + components: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "minAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + }, + ], + stateMutability: "nonpayable", + }, +] as const; + +export class IRouterV3__factory { + static readonly abi = _abi; + static createInterface(): IRouterV3Interface { + return new Interface(_abi) as IRouterV3Interface; + } + static connect(address: string, runner?: ContractRunner | null): IRouterV3 { + return new Contract(address, _abi, runner) as unknown as IRouterV3; + } +} diff --git a/src/types/generated/factories/IVersion__factory.ts b/src/types/generated/factories/IVersion__factory.ts new file mode 100644 index 0000000..2e24255 --- /dev/null +++ b/src/types/generated/factories/IVersion__factory.ts @@ -0,0 +1,32 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IVersion, IVersionInterface } from "../IVersion"; + +const _abi = [ + { + type: "function", + name: "version", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, +] as const; + +export class IVersion__factory { + static readonly abi = _abi; + static createInterface(): IVersionInterface { + return new Interface(_abi) as IVersionInterface; + } + static connect(address: string, runner?: ContractRunner | null): IVersion { + return new Contract(address, _abi, runner) as unknown as IVersion; + } +} diff --git a/src/types/generated/factories/IWETH__factory.ts b/src/types/generated/factories/IWETH__factory.ts new file mode 100644 index 0000000..2cc7963 --- /dev/null +++ b/src/types/generated/factories/IWETH__factory.ts @@ -0,0 +1,260 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IWETH, IWETHInterface } from "../IWETH"; + +const _abi = [ + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "deposit", + inputs: [], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdraw", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Deposit", + inputs: [ + { + name: "dst", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "wad", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Withdrawal", + inputs: [ + { + name: "src", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "wad", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, +] as const; + +export class IWETH__factory { + static readonly abi = _abi; + static createInterface(): IWETHInterface { + return new Interface(_abi) as IWETHInterface; + } + static connect(address: string, runner?: ContractRunner | null): IWETH { + return new Contract(address, _abi, runner) as unknown as IWETH; + } +} diff --git a/src/types/generated/factories/Liquidator__factory.ts b/src/types/generated/factories/Liquidator__factory.ts new file mode 100644 index 0000000..f75dded --- /dev/null +++ b/src/types/generated/factories/Liquidator__factory.ts @@ -0,0 +1,617 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../common"; +import type { Liquidator, LiquidatorInterface } from "../Liquidator"; + +const _abi = [ + { + type: "constructor", + inputs: [ + { + name: "_router", + type: "address", + internalType: "address", + }, + { + name: "_plb", + type: "address", + internalType: "address", + }, + { + name: "_aavePool", + type: "address", + internalType: "address", + }, + { + name: "_aaveFLTaker", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "aaveFLTaker", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "aavePool", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "cmToCA", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "executeOperation", + inputs: [ + { + name: "assets", + type: "address[]", + internalType: "address[]", + }, + { + name: "amounts", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "premiums", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "initiator", + type: "address", + internalType: "address", + }, + { + name: "params", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getOptimalLiquidation", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "hfOptimal", + type: "uint256", + internalType: "uint256", + }, + { + name: "priceUpdates", + type: "tuple[]", + internalType: "struct IPartialLiquidationBotV3.PriceUpdate[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "tokenOut", + type: "address", + internalType: "address", + }, + { + name: "optimalAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "repaidAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "flashLoanAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "isOptimalRepayable", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "partialLiquidateAndConvert", + inputs: [ + { + name: "creditManager", + type: "address", + internalType: "address", + }, + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "assetOut", + type: "address", + internalType: "address", + }, + { + name: "amountOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "flashLoanAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "priceUpdates", + type: "tuple[]", + internalType: "struct IPartialLiquidationBotV3.PriceUpdate[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "conversionCalls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "partialLiquidationBot", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "previewPartialLiquidation", + inputs: [ + { + name: "creditManager", + type: "address", + internalType: "address", + }, + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "assetOut", + type: "address", + internalType: "address", + }, + { + name: "amountOut", + type: "uint256", + internalType: "uint256", + }, + { + name: "flashLoanAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "priceUpdates", + type: "tuple[]", + internalType: "struct IPartialLiquidationBotV3.PriceUpdate[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "reserve", + type: "bool", + internalType: "bool", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "connectors", + type: "address[]", + internalType: "address[]", + }, + { + name: "slippage", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "res", + type: "tuple", + internalType: "struct LiquidationResult", + components: [ + { + name: "calls", + type: "tuple[]", + internalType: "struct MultiCall[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "profit", + type: "int256", + internalType: "int256", + }, + { + name: "amountIn", + type: "uint256", + internalType: "uint256", + }, + { + name: "amountOut", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "registerCM", + inputs: [ + { + name: "creditManager", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "router", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "setPartialLiquidationBot", + inputs: [ + { + name: "newPLB", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setRouter", + inputs: [ + { + name: "newRouter", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdrawToken", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetPartialLiquidationBot", + inputs: [ + { + name: "partialLiquidationBot", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetRouter", + inputs: [ + { + name: "newRouter", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ForceApproveFailed", + inputs: [], + }, + { + type: "error", + name: "SafeTransferFailed", + inputs: [], + }, +] as const; + +const _bytecode = + "0x60c06040523480156200001157600080fd5b5060405162003dd538038062003dd58339810160408190526200003491620000eb565b6200003f336200007e565b600180546001600160a01b03199081166001600160a01b0396871617909155600280549091169385169390931790925582166080521660a05262000148565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000e657600080fd5b919050565b600080600080608085870312156200010257600080fd5b6200010d85620000ce565b93506200011d60208601620000ce565b92506200012d60408601620000ce565b91506200013d60608601620000ce565b905092959194509250565b60805160a051613c44620001916000396000818161011f0152818161054b0152818161071501526111b90152600081816101d2015281816106a601526109b30152613c446000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b58f18c811610097578063ecb6c7cf11610066578063ecb6c7cf14610274578063f2fde38b1461029d578063f887ea40146102b0578063ff024f4d146102c357600080fd5b8063b58f18c8146101f4578063b60beeb814610207578063c0d786551461021a578063c9a523da1461022d57600080fd5b80638c3b7362116100d35780638c3b7362146101795780638da5cb5b14610199578063920f5c84146101aa578063a03e4bc3146101cd57600080fd5b80633ccdbb281461010557806366455f2f1461011a578063715018a61461015e578063789ea17614610166575b600080fd5b61011861011336600461276b565b6102d6565b005b6101417f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101186102f7565b600254610141906001600160a01b031681565b61018c6101873660046127f9565b61030b565b6040516101559190612983565b6000546001600160a01b0316610141565b6101bd6101b8366004612b97565b610699565b6040519015158152602001610155565b6101417f000000000000000000000000000000000000000000000000000000000000000081565b610118610202366004612c8b565b610a53565b610118610215366004612c8b565b610ac8565b610118610228366004612c8b565b610d2e565b61024061023b366004612e18565b610da2565b604080516001600160a01b03909616865260208601949094529284019190915260608301521515608082015260a001610155565b610141610282366004612c8b565b6003602052600090815260409020546001600160a01b031681565b6101186102ab366004612c8b565b610ed2565b600154610141906001600160a01b031681565b6101186102d1366004612e71565b610f5f565b6102de611265565b6102f26001600160a01b03841682846112bf565b505050565b6102ff611265565b6103096000611321565b565b6103366040518060800160405280606081526020016000815260200160008152602001600081525090565b60408051610180810182526000606080830182905260c0830181905260e0830181905261010083015261012082018190526101408201819052610160820152600181526001600160a01b038d811660208301528c811692820192909252908a16608082015260a081018990526103ac8688612f2e565b60c082015260408051602080870282810182019093528682529091879187918291850190849080828437600092018290525061010086019490945250505061012082018490526001600160a01b03808e16825260036020526040909120541661014082018190526104645760405162461bcd60e51b815260206004820152601d60248201527f437265646974204d616e61676572206e6f74207265676973746572656400000060448201526064015b60405180910390fd5b8b6001600160a01b0316632f7a18816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190612f46565b81606001906001600160a01b031690816001600160a01b03168152505060008c6001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105479190612f46565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b9c83453828b8560405160200161058b919061301a565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016105b89392919061312e565b600060405180830381600087803b1580156105d257600080fd5b505af11580156105e6573d6000803e3d6000fd5b50505050600480546105f79061315f565b80601f01602080910402602001604051908101604052809291908181526020018280546106239061315f565b80156106705780601f1061064557610100808354040283529160200191610670565b820191906000526020600020905b81548152906001019060200180831161065357829003601f168201915b505050505080602001905181019061068891906132a3565b9d9c50505050505050505050505050565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107135760405162461bcd60e51b815260206004820152601460248201527f43616c6c6572206e6f74204161766520706f6f6c000000000000000000000000604482015260640161045b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316146107ba5760405162461bcd60e51b815260206004820152602360248201527f466c617368206c6f616e20696e69746961746f72206973206e6f7420464c546160448201527f6b65720000000000000000000000000000000000000000000000000000000000606482015260840161045b565b60006107c883850185613413565b8051909150156108505760006108018260200151836040015184608001518560a001518660c0015187610100015188610120015161137e565b9050806040516020016108149190612983565b6040516020818303038152906040526004908161083191906135a0565b5061084a82606001518361014001518360000151611493565b506109ae565b610872816040015182610140015183608001518460a001518560c00151611511565b61088a81606001518261014001518360e00151611493565b8760008151811061089d5761089d613660565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156108ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109119190613676565b8660008151811061092457610924613660565b60200260200101518860008151811061093f5761093f613660565b602002602001015183610160015161095791906136a5565b61096191906136a5565b106109ae5760405162461bcd60e51b815260206004820152601e60248201527f4c69717569646174696f6e20776173206e6f742070726f66697461626c650000604482015260640161045b565b610a457f0000000000000000000000000000000000000000000000000000000000000000876000815181106109e5576109e5613660565b602002602001015189600081518110610a0057610a00613660565b6020026020010151610a1291906136a5565b8a600081518110610a2557610a25613660565b60200260200101516001600160a01b03166115989092919063ffffffff16565b506001979650505050505050565b610a5b611265565b6002546001600160a01b03828116911614610ac5576002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f86734f8b5e71ee24b76b2f2200fc3d4a4483e02a75a57284a946d4c470ee7cc390600090a25b50565b610ad0611265565b6001600160a01b038181166000908152600360205260409020541615610b385760405162461bcd60e51b815260206004820152601d60248201527f437265646974204163636f756e7420616c726561647920657869737473000000604482015260640161045b565b6000816001600160a01b0316632f7a18816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9c9190612f46565b90506001600160a01b0381166392beab1d306000604051908082528060200260200182016040528015610bf657816020015b604080518082019091526000815260606020820152815260200190600190039081610bce5790505b5060006040518463ffffffff1660e01b8152600401610c179392919061371d565b6020604051808303816000875af1158015610c36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5a9190612f46565b6001600160a01b038381166000818152600360209081526040808320805473ffffffffffffffffffffffffffffffffffffffff1916969095169590951790935583517f6f307dc3000000000000000000000000000000000000000000000000000000008152935190939192636f307dc392600480820193918290030181865afa158015610ceb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0f9190612f46565b6002549091506102f2906001600160a01b038084169116600019611598565b610d36611265565b6001546001600160a01b03828116911614610ac5576001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f6de4326a8b9054d72d9dbab97d27bc4edffadee7d966f5af9cc4eafdaf8e545590600090a250565b600080600080600080886001600160a01b031663c12c21c06040518163ffffffff1660e01b8152600401602060405180830381865afa158015610de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0d9190612f46565b90506000816001600160a01b0316632630c12f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e739190612f46565b9050610e7f8189611616565b610e8a8a83836117f5565b9650610e998a888b8585611b20565b919750955092506103e8610ead868461200d565b610eb9906103ed61374f565b610ec39190613766565b93505050939792965093509350565b610eda611265565b6001600160a01b038116610f565760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161045b565b610ac581611321565b610f67611265565b60408051610180810182526000808252606080830182905260c0830181905260e08301819052610100830152610120820181905261014082018190526101608201526001600160a01b038b811660208301528a811692820192909252908816608082015260a08101879052610fdc8486612f2e565b60c0820152610feb8284613788565b60e08201526001600160a01b03808b1660009081526003602052604090205416610140820181905261105f5760405162461bcd60e51b815260206004820152601d60248201527f437265646974204d616e61676572206e6f742072656769737465726564000000604482015260640161045b565b896001600160a01b0316632f7a18816040518163ffffffff1660e01b8152600401602060405180830381865afa15801561109d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c19190612f46565b81606001906001600160a01b031690816001600160a01b03168152505060008a6001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561111e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111429190612f46565b6040516370a0823160e01b81523060048201529091506001600160a01b038216906370a0823190602401602060405180830381865afa158015611189573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ad9190613676565b826101600181815250507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b9c834538289856040516020016111f9919061301a565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016112269392919061312e565b600060405180830381600087803b15801561124057600080fd5b505af1158015611254573d6000803e3d6000fd5b505050505050505050505050505050565b6000546001600160a01b031633146103095760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045b565b6112eb837fa9059cbb00000000000000000000000000000000000000000000000000000000848461213f565b6102f2576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6113a96040518060800160405280606081526020016000815260200160008152602001600081525090565b6001600160a01b03808916600090815260036020526040808220546002549151635fba905d60e11b815290841693919091169063bf7520ba906113fc908c908c908c906000199089908e90600401613795565b6020604051808303816000875af115801561141b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143f9190613676565b90506000806114528c858c8c8b8b612193565b915091506040518060800160405280838152602001848361147391906137e1565b81526020018481526020018a815250945050505050979650505050505050565b6040517febe4107c0000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063ebe4107c906114da9085908590600401613808565b600060405180830381600087803b1580156114f457600080fd5b505af1158015611508573d6000803e3d6000fd5b50505050505050565b600254604051635fba905d60e11b81526001600160a01b039091169063bf7520ba9061154d90889087908790600019908b908990600401613795565b6020604051808303816000875af115801561156c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115909190613676565b505050505050565b6115ab8363095ea7b360e01b848461213f565b6102f2576115c38363095ea7b360e01b84600061213f565b15806115df57506115dd8363095ea7b360e01b848461213f565b155b156102f2576040517f19be9a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160005b818110156117ef576000846001600160a01b031663ff29984585848151811061164657611646613660565b60200260200101516000015186858151811061166457611664613660565b6020026020010151602001516040518363ffffffff1660e01b81526004016116a39291906001600160a01b039290921682521515602082015260400190565b602060405180830381865afa1580156116c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e49190612f46565b90506001600160a01b0381166117625760405162461bcd60e51b815260206004820152602260248201527f55706461746564207072696365206665656420646f6573206e6f74206578697360448201527f742e000000000000000000000000000000000000000000000000000000000000606482015260840161045b565b806001600160a01b0316638736ec4785848151811061178357611783613660565b6020026020010151604001516040518263ffffffff1660e01b81526004016117ab919061382a565b600060405180830381600087803b1580156117c557600080fd5b505af11580156117d9573d6000803e3d6000fd5b5050505050806117e89061383d565b905061161b565b50505050565b6040517ff9f0ca660000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152600091829185169063f9f0ca6690602401602060405180830381865afa158015611859573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187d9190613676565b90506000846001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e39190612f46565b9050600060015b866001600160a01b031663458936f56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194c9190613856565b60ff16811015611b15576001811b841615611b05576040517f52c5fe110000000000000000000000000000000000000000000000000000000081526001821b60048201526000906001600160a01b038916906352c5fe11906024016040805180830381865afa1580156119c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e7919061388b565b506040516370a0823160e01b81526001600160a01b038b81166004830152919250600091808a169163b66102df918516906370a0823190602401602060405180830381865afa158015611a3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a629190613676565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260048101919091526001600160a01b03808616602483015288166044820152606401602060405180830381865afa158015611acd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af19190613676565b905083811115611b02578093508196505b50505b611b0e8161383d565b90506118ea565b505050509392505050565b600080600080856001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b889190612f46565b90506000866001600160a01b0316630d334ca68b60036040518363ffffffff1660e01b8152600401611bbb9291906138c0565b600060405180830381865afa158015611bd8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c009190810190613976565b6040517f783274380000000000000000000000000000000000000000000000000000000081526001600160a01b038b81166004830152919250600091829182918b1690637832743890602401602060405180830381865afa158015611c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8d9190613a83565b61ffff1690506000808b6001600160a01b0316639af1d35a6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611cd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf89190613a9e565b505061ffff16925061ffff169250506000612710600260009054906101000a90046001600160a01b03166001600160a01b031663a88e8f6d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d839190613a83565b611d919061ffff168561374f565b600260009054906101000a90046001600160a01b03166001600160a01b0316637d196f726040518163ffffffff1660e01b8152600401602060405180830381865afa158015611de4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e089190613a83565b61ffff16611e1885612710613b03565b611e22919061374f565b611e2c91906136a5565b611e369190613766565b9050611e4481612710613b03565b9550836127108f88611e56919061374f565b611e609190613766565b611e6a9190613b03565b6101208801516040517f7afb010400000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b038a8116602483015261271091908f1690637afb010490604401602060405180830381865afa158015611edc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f009190613676565b611f0a919061374f565b8f611f148a6123c0565b611f1e919061374f565b611f289190613b03565b611f329190613766565b9450505050506000886001600160a01b031663b66102df83878f6040518463ffffffff1660e01b8152600401611f84939291909283526001600160a01b03918216602084015216604082015260600190565b602060405180830381865afa158015611fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc59190613676565b90506000612710611fd6858561374f565b611fe09190613766565b9050611ff68b8383611ff1896123c0565b6123e3565b985098509850505050505050955095509592505050565b600080826001600160a01b0316639af1d35a6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561204e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120729190613a9e565b50505061ffff169150506000612710600260009054906101000a90046001600160a01b03166001600160a01b031663a88e8f6d6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f89190613a83565b6121069061ffff168461374f565b6121109190613766565b905061211e81612710613b03565b61212a6127108761374f565b6121349190613766565b925050505b92915050565b60006040518481528360048201528260248201526020600060448360008a5af1915050801561218b573d801561218157600160005114601f3d11169150612189565b6000863b1191505b505b949350505050565b6060600080886001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121fa9190612f46565b6001546040517f0cf7f6590000000000000000000000000000000000000000000000000000000081529192506000916001600160a01b0390911690630cf7f65990612253908b908b9087908f908d908d90600401613b16565b6000604051808303816000875af1158015612272573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261229a9190810190613b63565b905060008a6001600160a01b0316632f7a18816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123009190612f46565b6040805180820182526001600160a01b0380841682529151918616602483015260001960448301523060648301529192506123a19190602082019060840160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1f1088a0000000000000000000000000000000000000000000000000000000001790529152840151906125f9565b60408301819052602090920151919b919a509098505050505050505050565b60a081015160808201518251600092916123d9916136a5565b61213991906136a5565b6000806000806000886001600160a01b0316632f7a18816040518163ffffffff1660e01b8152600401602060405180830381865afa158015612429573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061244d9190612f46565b6001600160a01b031663166bf9d96040518163ffffffff1660e01b81526004016040805180830381865afa158015612489573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ad9190613be4565b91509150806001600160801b0316861180156124da57506124d76001600160801b03821687613b03565b87105b156125515760006124f46001600160801b03831688613b03565b9050612502886103e861374f565b61250c828b61374f565b612518906103ed61374f565b6125229190613766565b98506103e8612533826103ed61374f565b61253d9190613766565b9750888860009550955095505050506125ef565b816001600160801b031686101561257457600080600094509450945050506125ef565b6125876001600160801b03831687613b03565b8711156125e25760006125a36001600160801b03841688613b03565b90506125b1886103e861374f565b6125bb828b61374f565b6125c7906103e361374f565b6125d19190613766565b98506103e8612533826103e361374f565b8787600194509450945050505b9450945094915050565b81516060906126098160016136a5565b67ffffffffffffffff811115612621576126216129c9565b60405190808252806020026020018201604052801561266757816020015b60408051808201909152600081526060602082015281526020019060019003908161263f5790505b50915060005b818110156126ef576126ca85828151811061268a5761268a613660565b6020026020010151604080518082018252600081526060602091820152815180830190925282516001600160a01b03168252918201519181019190915290565b8382815181106126dc576126dc613660565b602090810291909101015260010161266d565b50604080518082018252600081526060602091820152815180830190925284516001600160a01b03168252808501519082015282828151811061273457612734613660565b60200260200101819052505092915050565b6001600160a01b0381168114610ac557600080fd5b803561276681612746565b919050565b60008060006060848603121561278057600080fd5b833561278b81612746565b92506020840135915060408401356127a281612746565b809150509250925092565b60008083601f8401126127bf57600080fd5b50813567ffffffffffffffff8111156127d757600080fd5b6020830191508360208260051b85010111156127f257600080fd5b9250929050565b6000806000806000806000806000806101008b8d03121561281957600080fd5b8a3561282481612746565b995060208b013561283481612746565b985060408b013561284481612746565b975060608b0135965060808b0135955060a08b013567ffffffffffffffff8082111561286f57600080fd5b61287b8e838f016127ad565b909750955060c08d013591508082111561289457600080fd5b506128a18d828e016127ad565b9150809450508092505060e08b013590509295989b9194979a5092959850565b60005b838110156128dc5781810151838201526020016128c4565b50506000910152565b600081518084526128fd8160208601602086016128c1565b601f01601f19169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b85811015612976578284038952815180516001600160a01b031685528501516040868601819052612962818701836128e5565b9a87019a955050509084019060010161292f565b5091979650505050505050565b60208152600082516080602084015261299f60a0840182612911565b90506020840151604084015260408401516060840152606084015160808401528091505092915050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715612a0257612a026129c9565b60405290565b6040805190810167ffffffffffffffff81118282101715612a0257612a026129c9565b604051610180810167ffffffffffffffff81118282101715612a0257612a026129c9565b6040516101c0810167ffffffffffffffff81118282101715612a0257612a026129c9565b604051601f8201601f1916810167ffffffffffffffff81118282101715612a9c57612a9c6129c9565b604052919050565b600067ffffffffffffffff821115612abe57612abe6129c9565b5060051b60200190565b600082601f830112612ad957600080fd5b81356020612aee612ae983612aa4565b612a73565b82815260059290921b84018101918181019086841115612b0d57600080fd5b8286015b84811015612b31578035612b2481612746565b8352918301918301612b11565b509695505050505050565b600082601f830112612b4d57600080fd5b81356020612b5d612ae983612aa4565b82815260059290921b84018101918181019086841115612b7c57600080fd5b8286015b84811015612b315780358352918301918301612b80565b60008060008060008060a08789031215612bb057600080fd5b863567ffffffffffffffff80821115612bc857600080fd5b612bd48a838b01612ac8565b97506020890135915080821115612bea57600080fd5b612bf68a838b01612b3c565b96506040890135915080821115612c0c57600080fd5b612c188a838b01612b3c565b955060608901359150612c2a82612746565b90935060808801359080821115612c4057600080fd5b818901915089601f830112612c5457600080fd5b813581811115612c6357600080fd5b8a6020828501011115612c7557600080fd5b6020830194508093505050509295509295509295565b600060208284031215612c9d57600080fd5b8135612ca881612746565b9392505050565b8035801515811461276657600080fd5b600067ffffffffffffffff821115612cd957612cd96129c9565b50601f01601f191660200190565b600082601f830112612cf857600080fd5b8135612d06612ae982612cbf565b818152846020838601011115612d1b57600080fd5b816020850160208301376000918101602001919091529392505050565b6000612d46612ae984612aa4565b8381529050602080820190600585901b840186811115612d6557600080fd5b845b81811015611b1557803567ffffffffffffffff80821115612d885760008081fd5b908701906060828b031215612d9d5760008081fd5b612da56129df565b8235612db081612746565b8152612dbd838701612caf565b8682015260408084013583811115612dd55760008081fd5b612de18d828701612ce7565b918301919091525086525050928201928201612d67565b600082601f830112612e0957600080fd5b612ca883833560208501612d38565b600080600060608486031215612e2d57600080fd5b8335612e3881612746565b925060208401359150604084013567ffffffffffffffff811115612e5b57600080fd5b612e6786828701612df8565b9150509250925092565b600080600080600080600080600060e08a8c031215612e8f57600080fd5b8935612e9a81612746565b985060208a0135612eaa81612746565b975060408a0135612eba81612746565b965060608a0135955060808a0135945060a08a013567ffffffffffffffff80821115612ee557600080fd5b612ef18d838e016127ad565b909650945060c08c0135915080821115612f0a57600080fd5b50612f178c828d016127ad565b915080935050809150509295985092959850929598565b6000612ca8368484612d38565b805161276681612746565b600060208284031215612f5857600080fd5b8151612ca881612746565b600081518084526020808501808196508360051b8101915082860160005b85811015612976578284038952815180516001600160a01b0316855285810151151586860152604090810151606091860182905290612fc2818701836128e5565b9a87019a9550505090840190600101612f81565b600081518084526020808501945080840160005b8381101561300f5781516001600160a01b031687529582019590820190600101612fea565b509495945050505050565b6020815261302d60208201835115159052565b6000602083015161304960408401826001600160a01b03169052565b5060408301516001600160a01b03811660608401525060608301516001600160a01b03811660808401525060808301516001600160a01b03811660a08401525060a083015160c083015260c08301516101808060e08501526130af6101a0850183612f63565b915060e0850151601f196101008187860301818801526130cf8584612911565b9450808801519250506101208187860301818801526130ee8584612fd6565b90880151610140888101919091528801519094509150610160905061311d818701836001600160a01b03169052565b959095015193019290925250919050565b6001600160a01b038416815282602082015260606040820152600061315660608301846128e5565b95945050505050565b600181811c9082168061317357607f821691505b60208210810361319357634e487b7160e01b600052602260045260246000fd5b50919050565b600082601f8301126131aa57600080fd5b815160206131ba612ae983612aa4565b82815260059290921b840181019181810190868411156131d957600080fd5b8286015b84811015612b3157805167ffffffffffffffff808211156131fe5760008081fd5b908801906040828b03601f19018113156132185760008081fd5b613220612a08565b8784015161322d81612746565b815283820151838111156132415760008081fd5b8085019450508b603f85011261325957600092508283fd5b87840151925061326b612ae984612cbf565b8381528c838587010111156132805760008081fd5b61328f848a83018588016128c1565b8189015286525050509183019183016131dd565b6000602082840312156132b557600080fd5b815167ffffffffffffffff808211156132cd57600080fd5b90830190608082860312156132e157600080fd5b6040516080810181811083821117156132fc576132fc6129c9565b60405282518281111561330e57600080fd5b61331a87828601613199565b82525060208301516020820152604083015160408201526060830151606082015280935050505092915050565b6000613355612ae984612aa4565b8381529050602080820190600585901b84018681111561337457600080fd5b845b81811015611b1557803567ffffffffffffffff808211156133975760008081fd5b908701906040828b0312156133ac5760008081fd5b6133b4612a08565b82356133bf81612746565b815282860135828111156133d35760008081fd5b6133df8c828601612ce7565b828801525086525050928201928201613376565b600082601f83011261340457600080fd5b612ca883833560208501613347565b60006020828403121561342557600080fd5b813567ffffffffffffffff8082111561343d57600080fd5b90830190610180828603121561345257600080fd5b61345a612a2b565b61346383612caf565b81526134716020840161275b565b60208201526134826040840161275b565b60408201526134936060840161275b565b60608201526134a46080840161275b565b608082015260a083013560a082015260c0830135828111156134c557600080fd5b6134d187828601612df8565b60c08301525060e0830135828111156134e957600080fd5b6134f5878286016133f3565b60e083015250610100808401358381111561350f57600080fd5b61351b88828701612ac8565b82840152505061012091508183013582820152610140915061353e82840161275b565b9181019190915261016091820135918101919091529392505050565b601f8211156102f257600081815260208120601f850160051c810160208610156135815750805b601f850160051c820191505b818110156115905782815560010161358d565b815167ffffffffffffffff8111156135ba576135ba6129c9565b6135ce816135c8845461315f565b8461355a565b602080601f83116001811461360357600084156135eb5750858301515b600019600386901b1c1916600185901b178555611590565b600085815260208120601f198616915b8281101561363257888601518255948401946001909101908401613613565b50858210156136505787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561368857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156121395761213961368f565b600081518084526020808501808196508360051b8101915082860160005b85811015612976578284038952815180516001600160a01b031685528501516040868601819052613709818701836128e5565b9a87019a95505050908401906001016136d6565b6001600160a01b038416815260606020820152600061373f60608301856136b8565b9050826040830152949350505050565b80820281158282048414176121395761213961368f565b60008261378357634e487b7160e01b600052601260045260246000fd5b500490565b6000612ca8368484613347565b60006001600160a01b038089168352808816602084015286604084015285606084015280851660808401525060c060a08301526137d560c0830184612f63565b98975050505050505050565b81810360008312801583831316838312821617156138015761380161368f565b5092915050565b6001600160a01b038316815260406020820152600061218b60408301846136b8565b602081526000612ca860208301846128e5565b60006001820161384f5761384f61368f565b5060010190565b60006020828403121561386857600080fd5b815160ff81168114612ca857600080fd5b805161ffff8116811461276657600080fd5b6000806040838503121561389e57600080fd5b82516138a981612746565b91506138b760208401613879565b90509250929050565b6001600160a01b038316815260408101600583106138ee57634e487b7160e01b600052602160045260246000fd5b8260208301529392505050565b80516001600160801b038116811461276657600080fd5b600082601f83011261392357600080fd5b81516020613933612ae983612aa4565b82815260059290921b8401810191818101908684111561395257600080fd5b8286015b84811015612b3157805161396981612746565b8352918301918301613956565b60006020828403121561398857600080fd5b815167ffffffffffffffff808211156139a057600080fd5b908301906101c082860312156139b557600080fd5b6139bd612a4f565b8251815260208301516020820152604083015160408201526139e1606084016138fb565b60608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201526101008084015181830152506101208084015181830152506101408084015181830152506101608084015181830152506101808084015183811115613a5257600080fd5b613a5e88828701613912565b8284015250506101a09150613a74828401612f3b565b91810191909152949350505050565b600060208284031215613a9557600080fd5b612ca882613879565b600080600080600060a08688031215613ab657600080fd5b613abf86613879565b9450613acd60208701613879565b9350613adb60408701613879565b9250613ae960608701613879565b9150613af760808701613879565b90509295509295909350565b818103818111156121395761213961368f565b60006001600160a01b038089168352876020840152808716604084015280861660608401525060c06080830152613b5060c0830185612fd6565b90508260a0830152979650505050505050565b600060208284031215613b7557600080fd5b815167ffffffffffffffff80821115613b8d57600080fd5b9083019060608286031215613ba157600080fd5b613ba96129df565b8251815260208301516020820152604083015182811115613bc957600080fd5b613bd587828601613199565b60408301525095945050505050565b60008060408385031215613bf757600080fd5b613c00836138fb565b91506138b7602084016138fb56fea264697066735822122078aa709426e9d7497e79a3ecb5b7e4889b178ed269004656d53762dd6354cc3364736f6c63430008110033"; + +type LiquidatorConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: LiquidatorConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Liquidator__factory extends ContractFactory { + constructor(...args: LiquidatorConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + _router: AddressLike, + _plb: AddressLike, + _aavePool: AddressLike, + _aaveFLTaker: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( + _router, + _plb, + _aavePool, + _aaveFLTaker, + overrides || {} + ); + } + override deploy( + _router: AddressLike, + _plb: AddressLike, + _aavePool: AddressLike, + _aaveFLTaker: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( + _router, + _plb, + _aavePool, + _aaveFLTaker, + overrides || {} + ) as Promise< + Liquidator & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): Liquidator__factory { + return super.connect(runner) as Liquidator__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): LiquidatorInterface { + return new Interface(_abi) as LiquidatorInterface; + } + static connect(address: string, runner?: ContractRunner | null): Liquidator { + return new Contract(address, _abi, runner) as unknown as Liquidator; + } +} diff --git a/src/types/generated/factories/Ownable__factory.ts b/src/types/generated/factories/Ownable__factory.ts new file mode 100644 index 0000000..4bea082 --- /dev/null +++ b/src/types/generated/factories/Ownable__factory.ts @@ -0,0 +1,71 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { Ownable, OwnableInterface } from "../Ownable"; + +const _abi = [ + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, +] as const; + +export class Ownable__factory { + static readonly abi = _abi; + static createInterface(): OwnableInterface { + return new Interface(_abi) as OwnableInterface; + } + static connect(address: string, runner?: ContractRunner | null): Ownable { + return new Contract(address, _abi, runner) as unknown as Ownable; + } +} diff --git a/src/types/generated/factories/PriceHelper__factory.ts b/src/types/generated/factories/PriceHelper__factory.ts new file mode 100644 index 0000000..295bfbe --- /dev/null +++ b/src/types/generated/factories/PriceHelper__factory.ts @@ -0,0 +1,124 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../common"; +import type { PriceHelper, PriceHelperInterface } from "../PriceHelper"; + +const _abi = [ + { + type: "function", + name: "previewTokens", + inputs: [ + { + name: "creditAccount", + type: "address", + internalType: "address", + }, + { + name: "priceUpdates", + type: "tuple[]", + internalType: "struct PriceOnDemand[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "results", + type: "tuple[]", + internalType: "struct TokenPriceInfo[]", + components: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "balanceInUnderlying", + type: "uint256", + internalType: "uint256", + }, + { + name: "liquidationThreshold", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + stateMutability: "nonpayable", + }, + { + type: "error", + name: "PriceFeedDoesNotExistException", + inputs: [], + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610fbb806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063324d1c8e14610030575b600080fd5b61004361003e366004610b12565b610059565b6040516100509190610c83565b60405180910390f35b60606000836001600160a01b031663c12c21c06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561009b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100bf9190610cf0565b90506000816001600160a01b0316632630c12f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610101573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101259190610cf0565b905061013181856106fc565b6000826001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610171573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101959190610cf0565b90506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fb9190610d14565b61020690600a610e33565b6040517ff9f0ca660000000000000000000000000000000000000000000000000000000081526001600160a01b03898116600483015291925060009186169063f9f0ca6690602401602060405180830381865afa15801561026b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028f9190610e42565b9050600061029d858561088a565b90506000866001600160a01b031663458936f56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103039190610d14565b60ff1690506000808267ffffffffffffffff81111561032457610324610aa2565b60405190808252806020026020018201604052801561038957816020015b610376604051806080016040528060006001600160a01b031681526020016000815260200160008152602001600081525090565b8152602001906001900390816103425790505b50905060005b838110156106205760408051608081018252600080825260208201819052818301819052606082015290517f52c5fe110000000000000000000000000000000000000000000000000000000081526001831b60048201526001600160a01b038c16906352c5fe11906024016040805180830381865afa158015610416573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043a9190610e5b565b8061ffff169050826000018360600182815250826001600160a01b03166001600160a01b0316815250505080600001516001600160a01b03166370a082318f6040518263ffffffff1660e01b81526004016104a491906001600160a01b0391909116815260200190565b602060405180830381865afa1580156104c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e59190610e42565b6020808301919091528151604080517f313ce56700000000000000000000000000000000000000000000000000000000815290516001861b936000936001600160a01b03169263313ce56792600480830193928290030181865afa158015610551573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105759190610d14565b60ff16600a0a9050600a8360200151118015610592575081891615155b156106125782516001600160a01b03808d169116036105ba57602083015160408401526105ed565b60006105ca8d856000015161088a565b90508189028b8286602001510202816105e5576105e5610e9c565b046040850152505b8285878151811061060057610600610eb2565b60209081029190910101526001909501945b50505080600101905061038f565b508167ffffffffffffffff81111561063a5761063a610aa2565b60405190808252806020026020018201604052801561069f57816020015b61068c604051806080016040528060006001600160a01b031681526020016000815260200160008152602001600081525090565b8152602001906001900390816106585790505b50995060005b828110156106ec578181815181106106bf576106bf610eb2565b60200260200101518b82815181106106d9576106d9610eb2565b60209081029190910101526001016106a5565b5050505050505050505092915050565b8051829060005b81811015610883576000836001600160a01b0316639dcb511a86848151811061072e5761072e610eb2565b6020908102919091010151516040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610796573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ba9190610cf0565b90506001600160a01b0381166107fc576040517f68d8c6d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160a01b0316638736ec4786848151811061081d5761081d610eb2565b6020026020010151602001516040518263ffffffff1660e01b81526004016108459190610ec8565b600060405180830381600087803b15801561085f57600080fd5b505af1158015610873573d6000803e3d6000fd5b5050505050806001019050610703565b5050505050565b6040517fff2998450000000000000000000000000000000000000000000000000000000081526001600160a01b03828116600483015260006024830181905291849183919083169063ff29984590604401602060405180830381865afa1580156108f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091c9190610cf0565b9050806001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa925050508015610978575060408051601f3d908101601f1916820190925261097591810190610f35565b60015b610a7a576040517fff2998450000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526001602483015283169063ff29984590604401602060405180830381865afa1580156109e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a069190610cf0565b90506000816001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610a48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6c9190610f35565b50919650610a829350505050565b509195505050505b505092915050565b6001600160a01b0381168114610a9f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715610adb57610adb610aa2565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610b0a57610b0a610aa2565b604052919050565b60008060408385031215610b2557600080fd5b8235610b3081610a8a565b915060208381013567ffffffffffffffff80821115610b4e57600080fd5b818601915086601f830112610b6257600080fd5b813581811115610b7457610b74610aa2565b8060051b610b83858201610ae1565b918252838101850191858101908a841115610b9d57600080fd5b86860192505b83831015610c7257823585811115610bba57600080fd5b8601601f196040828e0382011215610bd157600080fd5b610bd9610ab8565b89830135610be681610a8a565b8152604083013588811115610bfa57600080fd5b8084019350508d603f840112610c0f57600080fd5b8983013588811115610c2357610c23610aa2565b610c338b84601f84011601610ae1565b92508083528e6040828601011115610c4a57600080fd5b80604085018c85013760009083018b0152808a01919091528352509186019190860190610ba3565b809750505050505050509250929050565b602080825282518282018190526000919060409081850190868401855b82811015610ce357815180516001600160a01b03168552868101518786015285810151868601526060908101519085015260809093019290850190600101610ca0565b5091979650505050505050565b600060208284031215610d0257600080fd5b8151610d0d81610a8a565b9392505050565b600060208284031215610d2657600080fd5b815160ff81168114610d0d57600080fd5b634e487b7160e01b600052601160045260246000fd5b600181815b80851115610d88578160001904821115610d6e57610d6e610d37565b80851615610d7b57918102915b93841c9390800290610d52565b509250929050565b600082610d9f57506001610e2d565b81610dac57506000610e2d565b8160018114610dc25760028114610dcc57610de8565b6001915050610e2d565b60ff841115610ddd57610ddd610d37565b50506001821b610e2d565b5060208310610133831016604e8410600b8410161715610e0b575081810a610e2d565b610e158383610d4d565b8060001904821115610e2957610e29610d37565b0290505b92915050565b6000610d0d60ff841683610d90565b600060208284031215610e5457600080fd5b5051919050565b60008060408385031215610e6e57600080fd5b8251610e7981610a8a565b602084015190925061ffff81168114610e9157600080fd5b809150509250929050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060208083528351808285015260005b81811015610ef557858101830151858201604001528201610ed9565b506000604082860101526040601f19601f8301168501019250505092915050565b805169ffffffffffffffffffff81168114610f3057600080fd5b919050565b600080600080600060a08688031215610f4d57600080fd5b610f5686610f16565b9450602086015193506040860151925060608601519150610f7960808701610f16565b9050929550929590935056fea2646970667358221220080644edffef2135b417e097958d7bac9ec111dc7c311a9dbf6277542bca568b64736f6c63430008110033"; + +type PriceHelperConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: PriceHelperConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class PriceHelper__factory extends ContractFactory { + constructor(...args: PriceHelperConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + PriceHelper & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): PriceHelper__factory { + return super.connect(runner) as PriceHelper__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): PriceHelperInterface { + return new Interface(_abi) as PriceHelperInterface; + } + static connect(address: string, runner?: ContractRunner | null): PriceHelper { + return new Contract(address, _abi, runner) as unknown as PriceHelper; + } +} diff --git a/src/types/generated/factories/SafeERC20__factory.ts b/src/types/generated/factories/SafeERC20__factory.ts new file mode 100644 index 0000000..1fd9e72 --- /dev/null +++ b/src/types/generated/factories/SafeERC20__factory.ts @@ -0,0 +1,96 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../common"; +import type { SafeERC20, SafeERC20Interface } from "../SafeERC20"; + +const _abi = [ + { + type: "error", + name: "ForceApproveFailed", + inputs: [], + }, + { + type: "error", + name: "Permit2TransferAmountTooHigh", + inputs: [], + }, + { + type: "error", + name: "SafeDecreaseAllowanceFailed", + inputs: [], + }, + { + type: "error", + name: "SafeIncreaseAllowanceFailed", + inputs: [], + }, + { + type: "error", + name: "SafePermitBadLength", + inputs: [], + }, + { + type: "error", + name: "SafeTransferFailed", + inputs: [], + }, + { + type: "error", + name: "SafeTransferFromFailed", + inputs: [], + }, +] as const; + +const _bytecode = + "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b068fc2344995a7bb3bc772267e3ca45bc1a3a33a2e8745e004cf9f67297247f64736f6c63430008110033"; + +type SafeERC20ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: SafeERC20ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class SafeERC20__factory extends ContractFactory { + constructor(...args: SafeERC20ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + SafeERC20 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): SafeERC20__factory { + return super.connect(runner) as SafeERC20__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): SafeERC20Interface { + return new Interface(_abi) as SafeERC20Interface; + } + static connect(address: string, runner?: ContractRunner | null): SafeERC20 { + return new Contract(address, _abi, runner) as unknown as SafeERC20; + } +} diff --git a/src/types/generated/factories/index.ts b/src/types/generated/factories/index.ts new file mode 100644 index 0000000..9ff3a45 --- /dev/null +++ b/src/types/generated/factories/index.ts @@ -0,0 +1,32 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as balancesSol from "./Balances.sol"; +export * as iCreditAccountV3Sol from "./ICreditAccountV3.sol"; +export * as iCreditConfiguratorV3Sol from "./ICreditConfiguratorV3.sol"; +export * as iCreditFacadeV3Sol from "./ICreditFacadeV3.sol"; +export * as iCreditManagerV3Sol from "./ICreditManagerV3.sol"; +export * as iPriceFeedSol from "./IPriceFeed.sol"; +export * as iPriceOracleV3Sol from "./IPriceOracleV3.sol"; +export { AaveFLTaker__factory } from "./AaveFLTaker__factory"; +export { BatchLiquidator__factory } from "./BatchLiquidator__factory"; +export { IAavePoolFlashLoan__factory } from "./IAavePoolFlashLoan__factory"; +export { IBalancerV2VaultFlashLoan__factory } from "./IBalancerV2VaultFlashLoan__factory"; +export { IBatchLiquidator__factory } from "./IBatchLiquidator__factory"; +export { ICreditFacadeV3Multicall__factory } from "./ICreditFacadeV3Multicall__factory"; +export { IDaiLikePermit__factory } from "./IDaiLikePermit__factory"; +export { IERC20__factory } from "./IERC20__factory"; +export { IERC20Metadata__factory } from "./IERC20Metadata__factory"; +export { IERC20Permit__factory } from "./IERC20Permit__factory"; +export { ILiquidator__factory } from "./ILiquidator__factory"; +export { IPartialLiquidationBotV3__factory } from "./IPartialLiquidationBotV3__factory"; +export { IPermit2__factory } from "./IPermit2__factory"; +export { IPriceHelper__factory } from "./IPriceHelper__factory"; +export { IPriceOracleBase__factory } from "./IPriceOracleBase__factory"; +export { IRouterV3__factory } from "./IRouterV3__factory"; +export { IVersion__factory } from "./IVersion__factory"; +export { IWETH__factory } from "./IWETH__factory"; +export { Liquidator__factory } from "./Liquidator__factory"; +export { Ownable__factory } from "./Ownable__factory"; +export { PriceHelper__factory } from "./PriceHelper__factory"; +export { SafeERC20__factory } from "./SafeERC20__factory"; diff --git a/src/types/generated/index.ts b/src/types/generated/index.ts new file mode 100644 index 0000000..dd4e007 --- /dev/null +++ b/src/types/generated/index.ts @@ -0,0 +1,88 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as balancesSol from "./Balances.sol"; +export type { balancesSol }; +import type * as iCreditAccountV3Sol from "./ICreditAccountV3.sol"; +export type { iCreditAccountV3Sol }; +import type * as iCreditConfiguratorV3Sol from "./ICreditConfiguratorV3.sol"; +export type { iCreditConfiguratorV3Sol }; +import type * as iCreditFacadeV3Sol from "./ICreditFacadeV3.sol"; +export type { iCreditFacadeV3Sol }; +import type * as iCreditManagerV3Sol from "./ICreditManagerV3.sol"; +export type { iCreditManagerV3Sol }; +import type * as iPriceFeedSol from "./IPriceFeed.sol"; +export type { iPriceFeedSol }; +import type * as iPriceOracleV3Sol from "./IPriceOracleV3.sol"; +export type { iPriceOracleV3Sol }; +export type { AaveFLTaker } from "./AaveFLTaker"; +export type { BatchLiquidator } from "./BatchLiquidator"; +export type { IAavePoolFlashLoan } from "./IAavePoolFlashLoan"; +export type { IBalancerV2VaultFlashLoan } from "./IBalancerV2VaultFlashLoan"; +export type { IBatchLiquidator } from "./IBatchLiquidator"; +export type { ICreditFacadeV3Multicall } from "./ICreditFacadeV3Multicall"; +export type { IDaiLikePermit } from "./IDaiLikePermit"; +export type { IERC20 } from "./IERC20"; +export type { IERC20Metadata } from "./IERC20Metadata"; +export type { IERC20Permit } from "./IERC20Permit"; +export type { ILiquidator } from "./ILiquidator"; +export type { IPartialLiquidationBotV3 } from "./IPartialLiquidationBotV3"; +export type { IPermit2 } from "./IPermit2"; +export type { IPriceHelper } from "./IPriceHelper"; +export type { IPriceOracleBase } from "./IPriceOracleBase"; +export type { IRouterV3 } from "./IRouterV3"; +export type { IVersion } from "./IVersion"; +export type { IWETH } from "./IWETH"; +export type { Liquidator } from "./Liquidator"; +export type { Ownable } from "./Ownable"; +export type { PriceHelper } from "./PriceHelper"; +export type { SafeERC20 } from "./SafeERC20"; +export * as factories from "./factories"; +export { AaveFLTaker__factory } from "./factories/AaveFLTaker__factory"; +export type { BalanceOps } from "./Balances.sol/BalanceOps"; +export { BalanceOps__factory } from "./factories/Balances.sol/BalanceOps__factory"; +export { BatchLiquidator__factory } from "./factories/BatchLiquidator__factory"; +export { IAavePoolFlashLoan__factory } from "./factories/IAavePoolFlashLoan__factory"; +export { IBalancerV2VaultFlashLoan__factory } from "./factories/IBalancerV2VaultFlashLoan__factory"; +export { IBatchLiquidator__factory } from "./factories/IBatchLiquidator__factory"; +export type { ICreditAccountBase } from "./ICreditAccountV3.sol/ICreditAccountBase"; +export { ICreditAccountBase__factory } from "./factories/ICreditAccountV3.sol/ICreditAccountBase__factory"; +export type { ICreditAccountV3 } from "./ICreditAccountV3.sol/ICreditAccountV3"; +export { ICreditAccountV3__factory } from "./factories/ICreditAccountV3.sol/ICreditAccountV3__factory"; +export type { ICreditConfiguratorV3 } from "./ICreditConfiguratorV3.sol/ICreditConfiguratorV3"; +export { ICreditConfiguratorV3__factory } from "./factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3__factory"; +export type { ICreditConfiguratorV3Events } from "./ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events"; +export { ICreditConfiguratorV3Events__factory } from "./factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events__factory"; +export type { ICreditFacadeV3 } from "./ICreditFacadeV3.sol/ICreditFacadeV3"; +export { ICreditFacadeV3__factory } from "./factories/ICreditFacadeV3.sol/ICreditFacadeV3__factory"; +export type { ICreditFacadeV3Events } from "./ICreditFacadeV3.sol/ICreditFacadeV3Events"; +export { ICreditFacadeV3Events__factory } from "./factories/ICreditFacadeV3.sol/ICreditFacadeV3Events__factory"; +export { ICreditFacadeV3Multicall__factory } from "./factories/ICreditFacadeV3Multicall__factory"; +export type { ICreditManagerV3 } from "./ICreditManagerV3.sol/ICreditManagerV3"; +export { ICreditManagerV3__factory } from "./factories/ICreditManagerV3.sol/ICreditManagerV3__factory"; +export type { ICreditManagerV3Events } from "./ICreditManagerV3.sol/ICreditManagerV3Events"; +export { ICreditManagerV3Events__factory } from "./factories/ICreditManagerV3.sol/ICreditManagerV3Events__factory"; +export { IDaiLikePermit__factory } from "./factories/IDaiLikePermit__factory"; +export { IERC20__factory } from "./factories/IERC20__factory"; +export { IERC20Metadata__factory } from "./factories/IERC20Metadata__factory"; +export { IERC20Permit__factory } from "./factories/IERC20Permit__factory"; +export { ILiquidator__factory } from "./factories/ILiquidator__factory"; +export { IPartialLiquidationBotV3__factory } from "./factories/IPartialLiquidationBotV3__factory"; +export { IPermit2__factory } from "./factories/IPermit2__factory"; +export type { IPriceFeed } from "./IPriceFeed.sol/IPriceFeed"; +export { IPriceFeed__factory } from "./factories/IPriceFeed.sol/IPriceFeed__factory"; +export type { IUpdatablePriceFeed } from "./IPriceFeed.sol/IUpdatablePriceFeed"; +export { IUpdatablePriceFeed__factory } from "./factories/IPriceFeed.sol/IUpdatablePriceFeed__factory"; +export { IPriceHelper__factory } from "./factories/IPriceHelper__factory"; +export { IPriceOracleBase__factory } from "./factories/IPriceOracleBase__factory"; +export type { IPriceOracleV3 } from "./IPriceOracleV3.sol/IPriceOracleV3"; +export { IPriceOracleV3__factory } from "./factories/IPriceOracleV3.sol/IPriceOracleV3__factory"; +export type { IPriceOracleV3Events } from "./IPriceOracleV3.sol/IPriceOracleV3Events"; +export { IPriceOracleV3Events__factory } from "./factories/IPriceOracleV3.sol/IPriceOracleV3Events__factory"; +export { IRouterV3__factory } from "./factories/IRouterV3__factory"; +export { IVersion__factory } from "./factories/IVersion__factory"; +export { IWETH__factory } from "./factories/IWETH__factory"; +export { Liquidator__factory } from "./factories/Liquidator__factory"; +export { Ownable__factory } from "./factories/Ownable__factory"; +export { PriceHelper__factory } from "./factories/PriceHelper__factory"; +export { SafeERC20__factory } from "./factories/SafeERC20__factory"; diff --git a/src/index.ts b/src/types/index.ts similarity index 100% rename from src/index.ts rename to src/types/index.ts diff --git a/src/manual-reexport.ts b/src/types/manual-reexport.ts similarity index 100% rename from src/manual-reexport.ts rename to src/types/manual-reexport.ts diff --git a/tsup.config.ts b/tsup.config.ts index 531d049..0cd1c95 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -3,7 +3,7 @@ import { defineConfig } from "tsup"; export default defineConfig((options) => { const commonOptions: Partial = { - entry: ["src/index.ts", "src/abi/index.ts", "src/bytecode/index.ts"], + entry: ["src/types/index.ts", "src/abi/index.ts", "src/bytecode/index.ts"], clean: true, dts: true, splitting: false,