randomness-js
Version:
A library for consuming, verifying and using randomness from the dcipher network
74 lines (73 loc) • 4.96 kB
TypeScript
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 declare namespace InitializedEvent {
type InputTuple = [version: BigNumberish];
type OutputTuple = [version: bigint];
interface OutputObject {
version: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace UpgradedEvent {
type InputTuple = [implementation: AddressLike];
type OutputTuple = [implementation: string];
interface OutputObject {
implementation: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
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>;
};
}