intents-framework
Version:
A reference ERC7683 implementation with TypeScript support
459 lines (420 loc) • 13.2 kB
text/typescript
/* 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 RouterInterface extends Interface {
getFunction(
nameOrSignature:
| "PACKAGE_VERSION"
| "domains"
| "enrollRemoteRouter"
| "enrollRemoteRouters"
| "handle"
| "hook"
| "interchainSecurityModule"
| "localDomain"
| "mailbox"
| "owner"
| "renounceOwnership"
| "routers"
| "setHook"
| "setInterchainSecurityModule"
| "transferOwnership"
| "unenrollRemoteRouter"
| "unenrollRemoteRouters"
): FunctionFragment;
getEvent(
nameOrSignatureOrTopic:
| "HookSet"
| "Initialized"
| "IsmSet"
| "OwnershipTransferred"
): EventFragment;
encodeFunctionData(
functionFragment: "PACKAGE_VERSION",
values?: undefined
): string;
encodeFunctionData(functionFragment: "domains", values?: undefined): string;
encodeFunctionData(
functionFragment: "enrollRemoteRouter",
values: [BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "enrollRemoteRouters",
values: [BigNumberish[], BytesLike[]]
): string;
encodeFunctionData(
functionFragment: "handle",
values: [BigNumberish, BytesLike, BytesLike]
): string;
encodeFunctionData(functionFragment: "hook", values?: undefined): string;
encodeFunctionData(
functionFragment: "interchainSecurityModule",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "localDomain",
values?: undefined
): string;
encodeFunctionData(functionFragment: "mailbox", values?: undefined): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "renounceOwnership",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "routers",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "setHook",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "setInterchainSecurityModule",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "transferOwnership",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "unenrollRemoteRouter",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "unenrollRemoteRouters",
values: [BigNumberish[]]
): string;
decodeFunctionResult(
functionFragment: "PACKAGE_VERSION",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "domains", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "enrollRemoteRouter",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "enrollRemoteRouters",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "handle", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "hook", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "interchainSecurityModule",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "localDomain",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "mailbox", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "renounceOwnership",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "routers", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setHook", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "setInterchainSecurityModule",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "transferOwnership",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "unenrollRemoteRouter",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "unenrollRemoteRouters",
data: BytesLike
): Result;
}
export namespace HookSetEvent {
export type InputTuple = [_hook: AddressLike];
export type OutputTuple = [_hook: string];
export interface OutputObject {
_hook: 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 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 IsmSetEvent {
export type InputTuple = [_ism: AddressLike];
export type OutputTuple = [_ism: string];
export interface OutputObject {
_ism: 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 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 interface Router extends BaseContract {
connect(runner?: ContractRunner | null): Router;
waitForDeployment(): Promise<this>;
interface: RouterInterface;
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>;
PACKAGE_VERSION: TypedContractMethod<[], [string], "view">;
domains: TypedContractMethod<[], [bigint[]], "view">;
enrollRemoteRouter: TypedContractMethod<
[_domain: BigNumberish, _router: BytesLike],
[void],
"nonpayable"
>;
enrollRemoteRouters: TypedContractMethod<
[_domains: BigNumberish[], _addresses: BytesLike[]],
[void],
"nonpayable"
>;
handle: TypedContractMethod<
[_origin: BigNumberish, _sender: BytesLike, _message: BytesLike],
[void],
"payable"
>;
hook: TypedContractMethod<[], [string], "view">;
interchainSecurityModule: TypedContractMethod<[], [string], "view">;
localDomain: TypedContractMethod<[], [bigint], "view">;
mailbox: TypedContractMethod<[], [string], "view">;
owner: TypedContractMethod<[], [string], "view">;
renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
routers: TypedContractMethod<[_domain: BigNumberish], [string], "view">;
setHook: TypedContractMethod<[_hook: AddressLike], [void], "nonpayable">;
setInterchainSecurityModule: TypedContractMethod<
[_module: AddressLike],
[void],
"nonpayable"
>;
transferOwnership: TypedContractMethod<
[newOwner: AddressLike],
[void],
"nonpayable"
>;
unenrollRemoteRouter: TypedContractMethod<
[_domain: BigNumberish],
[void],
"nonpayable"
>;
unenrollRemoteRouters: TypedContractMethod<
[_domains: BigNumberish[]],
[void],
"nonpayable"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "PACKAGE_VERSION"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "domains"
): TypedContractMethod<[], [bigint[]], "view">;
getFunction(
nameOrSignature: "enrollRemoteRouter"
): TypedContractMethod<
[_domain: BigNumberish, _router: BytesLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "enrollRemoteRouters"
): TypedContractMethod<
[_domains: BigNumberish[], _addresses: BytesLike[]],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "handle"
): TypedContractMethod<
[_origin: BigNumberish, _sender: BytesLike, _message: BytesLike],
[void],
"payable"
>;
getFunction(
nameOrSignature: "hook"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "interchainSecurityModule"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "localDomain"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "mailbox"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "owner"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "renounceOwnership"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "routers"
): TypedContractMethod<[_domain: BigNumberish], [string], "view">;
getFunction(
nameOrSignature: "setHook"
): TypedContractMethod<[_hook: AddressLike], [void], "nonpayable">;
getFunction(
nameOrSignature: "setInterchainSecurityModule"
): TypedContractMethod<[_module: AddressLike], [void], "nonpayable">;
getFunction(
nameOrSignature: "transferOwnership"
): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
getFunction(
nameOrSignature: "unenrollRemoteRouter"
): TypedContractMethod<[_domain: BigNumberish], [void], "nonpayable">;
getFunction(
nameOrSignature: "unenrollRemoteRouters"
): TypedContractMethod<[_domains: BigNumberish[]], [void], "nonpayable">;
getEvent(
key: "HookSet"
): TypedContractEvent<
HookSetEvent.InputTuple,
HookSetEvent.OutputTuple,
HookSetEvent.OutputObject
>;
getEvent(
key: "Initialized"
): TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
getEvent(
key: "IsmSet"
): TypedContractEvent<
IsmSetEvent.InputTuple,
IsmSetEvent.OutputTuple,
IsmSetEvent.OutputObject
>;
getEvent(
key: "OwnershipTransferred"
): TypedContractEvent<
OwnershipTransferredEvent.InputTuple,
OwnershipTransferredEvent.OutputTuple,
OwnershipTransferredEvent.OutputObject
>;
filters: {
"HookSet(address)": TypedContractEvent<
HookSetEvent.InputTuple,
HookSetEvent.OutputTuple,
HookSetEvent.OutputObject
>;
HookSet: TypedContractEvent<
HookSetEvent.InputTuple,
HookSetEvent.OutputTuple,
HookSetEvent.OutputObject
>;
"Initialized(uint8)": TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
Initialized: TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
"IsmSet(address)": TypedContractEvent<
IsmSetEvent.InputTuple,
IsmSetEvent.OutputTuple,
IsmSetEvent.OutputObject
>;
IsmSet: TypedContractEvent<
IsmSetEvent.InputTuple,
IsmSetEvent.OutputTuple,
IsmSetEvent.OutputObject
>;
"OwnershipTransferred(address,address)": TypedContractEvent<
OwnershipTransferredEvent.InputTuple,
OwnershipTransferredEvent.OutputTuple,
OwnershipTransferredEvent.OutputObject
>;
OwnershipTransferred: TypedContractEvent<
OwnershipTransferredEvent.InputTuple,
OwnershipTransferredEvent.OutputTuple,
OwnershipTransferredEvent.OutputObject
>;
};
}