randomness-js
Version:
A library for consuming, verifying and using randomness from the dcipher network
60 lines (59 loc) • 3.46 kB
TypeScript
import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, ContractRunner, ContractMethod, Listener } from "ethers";
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../common";
export interface DeployAllContractsInterface extends Interface {
getFunction(nameOrSignature: "IS_SCRIPT" | "deployAll" | "run"): FunctionFragment;
encodeFunctionData(functionFragment: "IS_SCRIPT", values?: undefined): string;
encodeFunctionData(functionFragment: "deployAll", values?: undefined): string;
encodeFunctionData(functionFragment: "run", values?: undefined): string;
decodeFunctionResult(functionFragment: "IS_SCRIPT", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "deployAll", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "run", data: BytesLike): Result;
}
export interface DeployAllContracts extends BaseContract {
connect(runner?: ContractRunner | null): DeployAllContracts;
waitForDeployment(): Promise<this>;
interface: DeployAllContractsInterface;
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>;
IS_SCRIPT: TypedContractMethod<[], [boolean], "view">;
deployAll: TypedContractMethod<[
], [
[
string,
string,
string,
string
] & {
bn254SignatureScheme: string;
randomnessSenderInstance: string;
signatureSchemeAddressProvider: string;
signatureSenderInstance: string;
}
], "nonpayable">;
run: TypedContractMethod<[], [void], "nonpayable">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "IS_SCRIPT"): TypedContractMethod<[], [boolean], "view">;
getFunction(nameOrSignature: "deployAll"): TypedContractMethod<[
], [
[
string,
string,
string,
string
] & {
bn254SignatureScheme: string;
randomnessSenderInstance: string;
signatureSchemeAddressProvider: string;
signatureSenderInstance: string;
}
], "nonpayable">;
getFunction(nameOrSignature: "run"): TypedContractMethod<[], [void], "nonpayable">;
filters: {};
}