Skip to content

Commit

Permalink
contract types
Browse files Browse the repository at this point in the history
  • Loading branch information
D4mph1r committed Aug 7, 2024
1 parent 3646777 commit 32a8b7f
Show file tree
Hide file tree
Showing 19 changed files with 1,011 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type * as proxy from "./proxy";
export type { proxy };
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type * as utils from "./utils";
export type { utils };
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumberish,
FunctionFragment,
Interface,
EventFragment,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
} from "../../../../common";

export interface InitializableInterface extends Interface {
getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment;
}

export namespace InitializedEvent {
export type InputTuple = [version: BigNumberish];
export type OutputTuple = [version: bigint];
export interface OutputObject {
version: 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 Initializable extends BaseContract {
connect(runner?: ContractRunner | null): Initializable;
waitForDeployment(): Promise<this>;

interface: InitializableInterface;

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;

getEvent(
key: "Initialized"
): TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;

filters: {
"Initialized(uint64)": TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
Initialized: TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
/* 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 UUPSUpgradeableInterface extends Interface {
getFunction(
nameOrSignature:
| "UPGRADE_INTERFACE_VERSION"
| "proxiableUUID"
| "upgradeToAndCall"
): FunctionFragment;

getEvent(nameOrSignatureOrTopic: "Initialized" | "Upgraded"): EventFragment;

encodeFunctionData(
functionFragment: "UPGRADE_INTERFACE_VERSION",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "proxiableUUID",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "upgradeToAndCall",
values: [AddressLike, BytesLike]
): string;

decodeFunctionResult(
functionFragment: "UPGRADE_INTERFACE_VERSION",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "proxiableUUID",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "upgradeToAndCall",
data: BytesLike
): Result;
}

export namespace InitializedEvent {
export type InputTuple = [version: BigNumberish];
export type OutputTuple = [version: bigint];
export interface OutputObject {
version: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}

export namespace UpgradedEvent {
export type InputTuple = [implementation: AddressLike];
export type OutputTuple = [implementation: string];
export interface OutputObject {
implementation: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}

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

interface: UUPSUpgradeableInterface;

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>;

UPGRADE_INTERFACE_VERSION: TypedContractMethod<[], [string], "view">;

proxiableUUID: TypedContractMethod<[], [string], "view">;

upgradeToAndCall: TypedContractMethod<
[newImplementation: AddressLike, data: BytesLike],
[void],
"payable"
>;

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

getFunction(
nameOrSignature: "UPGRADE_INTERFACE_VERSION"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "proxiableUUID"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "upgradeToAndCall"
): TypedContractMethod<
[newImplementation: AddressLike, data: BytesLike],
[void],
"payable"
>;

getEvent(
key: "Initialized"
): TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
getEvent(
key: "Upgraded"
): TypedContractEvent<
UpgradedEvent.InputTuple,
UpgradedEvent.OutputTuple,
UpgradedEvent.OutputObject
>;

filters: {
"Initialized(uint64)": TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
Initialized: TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;

"Upgraded(address)": TypedContractEvent<
UpgradedEvent.InputTuple,
UpgradedEvent.OutputTuple,
UpgradedEvent.OutputObject
>;
Upgraded: TypedContractEvent<
UpgradedEvent.InputTuple,
UpgradedEvent.OutputTuple,
UpgradedEvent.OutputObject
>;
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export type { Initializable } from "./Initializable";
export type { UUPSUpgradeable } from "./UUPSUpgradeable";
2 changes: 2 additions & 0 deletions src/contractsTypes/evm/@openzeppelin/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import type * as access from "./access";
export type { access };
import type * as interfaces from "./interfaces";
export type { interfaces };
import type * as proxy from "./proxy";
export type { proxy };
import type * as token from "./token";
export type { token };
import type * as utils from "./utils";
Expand Down
Loading

0 comments on commit 32a8b7f

Please sign in to comment.