UNPKG

@vocdoni/davinci-contracts

Version:

Smart contracts powering DAVINCI's digital voting protocol

66 lines (65 loc) 3.53 kB
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers"; import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../../common"; export interface ProcessIdLibInterface extends Interface { getFunction(nameOrSignature: "computeProcessId" | "getPrefix" | "hasPrefix"): FunctionFragment; encodeFunctionData(functionFragment: "computeProcessId", values: [BigNumberish, AddressLike, BigNumberish]): string; encodeFunctionData(functionFragment: "getPrefix", values: [BigNumberish, AddressLike]): string; encodeFunctionData(functionFragment: "hasPrefix", values: [BytesLike, BigNumberish]): string; decodeFunctionResult(functionFragment: "computeProcessId", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getPrefix", data: BytesLike): Result; decodeFunctionResult(functionFragment: "hasPrefix", data: BytesLike): Result; } export interface ProcessIdLib extends BaseContract { connect(runner?: ContractRunner | null): ProcessIdLib; waitForDeployment(): Promise<this>; interface: ProcessIdLibInterface; 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>; computeProcessId: TypedContractMethod<[ prefix: BigNumberish, creatorAddr: AddressLike, nonce: BigNumberish ], [ string ], "view">; getPrefix: TypedContractMethod<[ chainId: BigNumberish, contractAddr: AddressLike ], [ bigint ], "view">; hasPrefix: TypedContractMethod<[ processId: BytesLike, expectedPrefix: BigNumberish ], [ boolean ], "view">; getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T; getFunction(nameOrSignature: "computeProcessId"): TypedContractMethod<[ prefix: BigNumberish, creatorAddr: AddressLike, nonce: BigNumberish ], [ string ], "view">; getFunction(nameOrSignature: "getPrefix"): TypedContractMethod<[ chainId: BigNumberish, contractAddr: AddressLike ], [ bigint ], "view">; getFunction(nameOrSignature: "hasPrefix"): TypedContractMethod<[ processId: BytesLike, expectedPrefix: BigNumberish ], [ boolean ], "view">; filters: {}; }