forked from dethcrypto/TypeChain
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Raymond Feng <[email protected]>
- Loading branch information
1 parent
0e10680
commit 9dc5a0f
Showing
14 changed files
with
1,047 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
/* Autogenerated file. Do not edit manually. */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { | ||
BaseContract, | ||
BigNumberish, | ||
BytesLike, | ||
FunctionFragment, | ||
Result, | ||
Interface, | ||
EventFragment, | ||
ContractRunner, | ||
ContractMethod, | ||
Listener, | ||
} from "ethers"; | ||
import type { | ||
TypedContractEvent, | ||
TypedDeferredTopicFilter, | ||
TypedEventLog, | ||
TypedLogDescription, | ||
TypedListener, | ||
TypedContractMethod, | ||
} from "./common"; | ||
|
||
export interface CounterInterface extends Interface { | ||
getFunction( | ||
nameOrSignature: "countDown" | "countUp" | "getCount" | ||
): FunctionFragment; | ||
|
||
getEvent(nameOrSignatureOrTopic: "CountedTo"): EventFragment; | ||
|
||
encodeFunctionData(functionFragment: "countDown", values?: undefined): string; | ||
encodeFunctionData(functionFragment: "countUp", values?: undefined): string; | ||
encodeFunctionData(functionFragment: "getCount", values?: undefined): string; | ||
|
||
decodeFunctionResult(functionFragment: "countDown", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "countUp", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "getCount", data: BytesLike): Result; | ||
} | ||
|
||
export namespace CountedToEvent { | ||
export type InputTuple = [number: BigNumberish]; | ||
export type OutputTuple = [number: bigint]; | ||
export interface OutputObject { | ||
number: bigint; | ||
} | ||
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>; | ||
export type Filter = TypedDeferredTopicFilter<Event>; | ||
export type Log = TypedEventLog<Event>; | ||
export type LogDescription = TypedLogDescription<Event>; | ||
} | ||
|
||
export interface Counter extends BaseContract { | ||
connect(runner?: ContractRunner | null): Counter; | ||
waitForDeployment(): Promise<this>; | ||
|
||
interface: CounterInterface; | ||
|
||
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>; | ||
|
||
countDown: TypedContractMethod<[], [bigint], "nonpayable">; | ||
|
||
countUp: TypedContractMethod<[], [bigint], "nonpayable">; | ||
|
||
getCount: TypedContractMethod<[], [bigint], "view">; | ||
|
||
getFunction<T extends ContractMethod = ContractMethod>( | ||
key: string | FunctionFragment | ||
): T; | ||
|
||
getFunction( | ||
nameOrSignature: "countDown" | ||
): TypedContractMethod<[], [bigint], "nonpayable">; | ||
getFunction( | ||
nameOrSignature: "countUp" | ||
): TypedContractMethod<[], [bigint], "nonpayable">; | ||
getFunction( | ||
nameOrSignature: "getCount" | ||
): TypedContractMethod<[], [bigint], "view">; | ||
|
||
getEvent( | ||
key: "CountedTo" | ||
): TypedContractEvent< | ||
CountedToEvent.InputTuple, | ||
CountedToEvent.OutputTuple, | ||
CountedToEvent.OutputObject | ||
>; | ||
|
||
filters: { | ||
"CountedTo(uint256)": TypedContractEvent< | ||
CountedToEvent.InputTuple, | ||
CountedToEvent.OutputTuple, | ||
CountedToEvent.OutputObject | ||
>; | ||
CountedTo: TypedContractEvent< | ||
CountedToEvent.InputTuple, | ||
CountedToEvent.OutputTuple, | ||
CountedToEvent.OutputObject | ||
>; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* Autogenerated file. Do not edit manually. */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { | ||
BaseContract, | ||
BigNumberish, | ||
FunctionFragment, | ||
Interface, | ||
ContractRunner, | ||
ContractMethod, | ||
Listener, | ||
} from "ethers"; | ||
import type { | ||
TypedContractEvent, | ||
TypedDeferredTopicFilter, | ||
TypedEventLog, | ||
TypedListener, | ||
} from "./common"; | ||
|
||
export declare namespace Demo { | ||
export type Struct1Struct = { a: BigNumberish; b: BigNumberish }; | ||
|
||
export type Struct1StructOutput = [a: bigint, b: bigint] & { | ||
a: bigint; | ||
b: bigint; | ||
}; | ||
|
||
export type Struct2Struct = { a: BigNumberish; b: BigNumberish }; | ||
|
||
export type Struct2StructOutput = [a: bigint, b: bigint] & { | ||
a: bigint; | ||
b: bigint; | ||
}; | ||
} | ||
|
||
export interface DemoInterface extends Interface {} | ||
|
||
export interface Demo extends BaseContract { | ||
connect(runner?: ContractRunner | null): Demo; | ||
waitForDeployment(): Promise<this>; | ||
|
||
interface: DemoInterface; | ||
|
||
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: {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 HelloInterface extends Interface {} | ||
|
||
export interface Hello extends BaseContract { | ||
connect(runner?: ContractRunner | null): Hello; | ||
waitForDeployment(): Promise<this>; | ||
|
||
interface: HelloInterface; | ||
|
||
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: {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { Hello } from "./Hello"; |
77 changes: 77 additions & 0 deletions
77
packages/hardhat-test/typechain-types/StructsInConstructor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* Autogenerated file. Do not edit manually. */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { | ||
BaseContract, | ||
BigNumberish, | ||
FunctionFragment, | ||
Interface, | ||
ContractRunner, | ||
ContractMethod, | ||
Listener, | ||
} from "ethers"; | ||
import type { | ||
TypedContractEvent, | ||
TypedDeferredTopicFilter, | ||
TypedEventLog, | ||
TypedListener, | ||
} from "./common"; | ||
|
||
export type Vector2Struct = { x: BigNumberish; y: BigNumberish }; | ||
|
||
export type Vector2StructOutput = [x: bigint, y: bigint] & { | ||
x: bigint; | ||
y: bigint; | ||
}; | ||
|
||
export interface StructsInConstructorInterface extends Interface {} | ||
|
||
export interface StructsInConstructor extends BaseContract { | ||
connect(runner?: ContractRunner | null): StructsInConstructor; | ||
waitForDeployment(): Promise<this>; | ||
|
||
interface: StructsInConstructorInterface; | ||
|
||
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: {}; | ||
} |
Oops, something went wrong.