@orochi-network/contracts
Version:
Orochi smart contracts for on-chain verification
103 lines • 5.08 kB
TypeScript
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "./common.js";
export declare namespace Multicast {
type MulticastResultStruct = {
success: boolean;
result: BytesLike;
};
type MulticastResultStructOutput = [
success: boolean,
result: string
] & {
success: boolean;
result: string;
};
type EvmStateStruct = {
blockNumber: BigNumberish;
previousBlockHash: BytesLike;
chainId: BigNumberish;
gaslimit: BigNumberish;
timestamp: BigNumberish;
};
type EvmStateStructOutput = [
blockNumber: bigint,
previousBlockHash: string,
chainId: bigint,
gaslimit: bigint,
timestamp: bigint
] & {
blockNumber: bigint;
previousBlockHash: string;
chainId: bigint;
gaslimit: bigint;
timestamp: bigint;
};
}
export interface MulticastInterface extends Interface {
getFunction(nameOrSignature: "cast" | "contractDigest" | "multicast" | "nativeBalance" | "state"): FunctionFragment;
encodeFunctionData(functionFragment: "cast", values: [AddressLike, BytesLike[]]): string;
encodeFunctionData(functionFragment: "contractDigest", values: [AddressLike[]]): string;
encodeFunctionData(functionFragment: "multicast", values: [AddressLike[], BytesLike[]]): string;
encodeFunctionData(functionFragment: "nativeBalance", values: [AddressLike[]]): string;
encodeFunctionData(functionFragment: "state", values?: undefined): string;
decodeFunctionResult(functionFragment: "cast", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "contractDigest", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "multicast", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "nativeBalance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "state", data: BytesLike): Result;
}
export interface Multicast extends BaseContract {
connect(runner?: ContractRunner | null): Multicast;
waitForDeployment(): Promise<this>;
interface: MulticastInterface;
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>;
cast: TypedContractMethod<[
target: AddressLike,
inputs: BytesLike[]
], [
Multicast.MulticastResultStructOutput[]
], "view">;
contractDigest: TypedContractMethod<[
addresses: AddressLike[]
], [
string[]
], "view">;
multicast: TypedContractMethod<[
targets: AddressLike[],
inputs: BytesLike[]
], [
Multicast.MulticastResultStructOutput[]
], "view">;
nativeBalance: TypedContractMethod<[
addresses: AddressLike[]
], [
bigint[]
], "view">;
state: TypedContractMethod<[], [Multicast.EvmStateStructOutput], "view">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "cast"): TypedContractMethod<[
target: AddressLike,
inputs: BytesLike[]
], [
Multicast.MulticastResultStructOutput[]
], "view">;
getFunction(nameOrSignature: "contractDigest"): TypedContractMethod<[addresses: AddressLike[]], [string[]], "view">;
getFunction(nameOrSignature: "multicast"): TypedContractMethod<[
targets: AddressLike[],
inputs: BytesLike[]
], [
Multicast.MulticastResultStructOutput[]
], "view">;
getFunction(nameOrSignature: "nativeBalance"): TypedContractMethod<[addresses: AddressLike[]], [bigint[]], "view">;
getFunction(nameOrSignature: "state"): TypedContractMethod<[], [Multicast.EvmStateStructOutput], "view">;
filters: {};
}
//# sourceMappingURL=Multicast.d.ts.map