UNPKG

@q-dev/q-ts-gdk-sdk

Version:

Typescript Library to interact with GDK Contracts

51 lines (50 loc) 2.37 kB
/// <reference types="node" /> import type { ContractOptions } from "web3-eth-contract"; import type { EventLog } from "web3-core"; import type { EventEmitter } from "events"; import type { Callback, PayableTransactionObject, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types"; export interface EventOptions { filter?: object; fromBlock?: BlockType; topics?: string[]; } export type AdminChanged = ContractEventLog<{ previousAdmin: string; newAdmin: string; 0: string; 1: string; }>; export type BeaconUpgraded = ContractEventLog<{ beacon: string; 0: string; }>; export type Upgraded = ContractEventLog<{ implementation: string; 0: string; }>; export interface TransparentUpgradeableProxy extends BaseContract { constructor(jsonInterface: any[], address?: string, options?: ContractOptions): TransparentUpgradeableProxy; clone(): TransparentUpgradeableProxy; methods: { admin(): NonPayableTransactionObject<string>; changeAdmin(newAdmin: string): NonPayableTransactionObject<void>; implementation(): NonPayableTransactionObject<string>; upgradeTo(newImplementation: string): NonPayableTransactionObject<void>; upgradeToAndCall(newImplementation: string, data: string | number[]): PayableTransactionObject<void>; }; events: { AdminChanged(cb?: Callback<AdminChanged>): EventEmitter; AdminChanged(options?: EventOptions, cb?: Callback<AdminChanged>): EventEmitter; BeaconUpgraded(cb?: Callback<BeaconUpgraded>): EventEmitter; BeaconUpgraded(options?: EventOptions, cb?: Callback<BeaconUpgraded>): EventEmitter; Upgraded(cb?: Callback<Upgraded>): EventEmitter; Upgraded(options?: EventOptions, cb?: Callback<Upgraded>): EventEmitter; allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter; }; once(event: "AdminChanged", cb: Callback<AdminChanged>): void; once(event: "AdminChanged", options: EventOptions, cb: Callback<AdminChanged>): void; once(event: "BeaconUpgraded", cb: Callback<BeaconUpgraded>): void; once(event: "BeaconUpgraded", options: EventOptions, cb: Callback<BeaconUpgraded>): void; once(event: "Upgraded", cb: Callback<Upgraded>): void; once(event: "Upgraded", options: EventOptions, cb: Callback<Upgraded>): void; }