@q-dev/q-ts-gdk-sdk
Version:
Typescript Library to interact with GDK Contracts
30 lines (29 loc) • 1.21 kB
TypeScript
/// <reference types="node" />
import type { ContractOptions } from "web3-eth-contract";
import type { EventLog } from "web3-core";
import type { EventEmitter } from "events";
import type { Callback, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types";
export interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}
export type Upgraded = ContractEventLog<{
implementation: string;
0: string;
}>;
export interface ProxyBeacon extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): ProxyBeacon;
clone(): ProxyBeacon;
methods: {
implementation(): NonPayableTransactionObject<string>;
upgrade(newImplementation_: string): NonPayableTransactionObject<void>;
};
events: {
Upgraded(cb?: Callback<Upgraded>): EventEmitter;
Upgraded(options?: EventOptions, cb?: Callback<Upgraded>): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "Upgraded", cb: Callback<Upgraded>): void;
once(event: "Upgraded", options: EventOptions, cb: Callback<Upgraded>): void;
}