Skip to content

Commit

Permalink
fix: move typechain to types subpath
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsower committed Jun 13, 2024
1 parent 4d56c3f commit 5c8255c
Show file tree
Hide file tree
Showing 91 changed files with 20,412 additions and 7 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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",
Expand Down
260 changes: 260 additions & 0 deletions src/types/generated/AaveFLTaker.ts
Original file line number Diff line number Diff line change
@@ -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<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}

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<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}

export interface AaveFLTaker extends BaseContract {
connect(runner?: ContractRunner | null): AaveFLTaker;
waitForDeployment(): Promise<this>;

interface: AaveFLTakerInterface;

queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;

on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;

once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;

listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;

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<T extends ContractMethod = ContractMethod>(
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
>;
};
}
69 changes: 69 additions & 0 deletions src/types/generated/Balances.sol/BalanceOps.ts
Original file line number Diff line number Diff line change
@@ -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<this>;

interface: BalanceOpsInterface;

queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;

on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;

once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;

listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;

getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;

filters: {};
}
4 changes: 4 additions & 0 deletions src/types/generated/Balances.sol/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export type { BalanceOps } from "./BalanceOps";
Loading

0 comments on commit 5c8255c

Please sign in to comment.