UNPKG

@orionprotocol/contracts

Version:
66 lines (65 loc) 3.14 kB
/// <reference types="node" /> import type BN from "bn.js"; 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 FeeAccrued = ContractEventLog<{ referrer: string; amountAccrued: string; 0: string; 1: string; }>; export type Initialized = ContractEventLog<{ version: string; 0: string; }>; export type OwnershipTransferred = ContractEventLog<{ previousOwner: string; newOwner: string; 0: string; 1: string; }>; export type VerifierUpdate = ContractEventLog<{ verifier: string; 0: string; }>; export interface OrionReferral extends BaseContract { constructor(jsonInterface: any[], address?: string, options?: ContractOptions): OrionReferral; clone(): OrionReferral; methods: { getFee(order: [string, number | string | BN, string | number[]]): NonPayableTransactionObject<void>; initialize(rewardToken_: string, verifier_: string): NonPayableTransactionObject<void>; owner(): NonPayableTransactionObject<string>; renounceOwnership(): NonPayableTransactionObject<void>; rewardToken(): NonPayableTransactionObject<string>; setVerifier(verifier_: string): NonPayableTransactionObject<void>; totalFeeAccrued(arg0: string): NonPayableTransactionObject<string>; transferOwnership(newOwner: string): NonPayableTransactionObject<void>; verifier(): NonPayableTransactionObject<string>; }; events: { FeeAccrued(cb?: Callback<FeeAccrued>): EventEmitter; FeeAccrued(options?: EventOptions, cb?: Callback<FeeAccrued>): EventEmitter; Initialized(cb?: Callback<Initialized>): EventEmitter; Initialized(options?: EventOptions, cb?: Callback<Initialized>): EventEmitter; OwnershipTransferred(cb?: Callback<OwnershipTransferred>): EventEmitter; OwnershipTransferred(options?: EventOptions, cb?: Callback<OwnershipTransferred>): EventEmitter; VerifierUpdate(cb?: Callback<VerifierUpdate>): EventEmitter; VerifierUpdate(options?: EventOptions, cb?: Callback<VerifierUpdate>): EventEmitter; allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter; }; once(event: "FeeAccrued", cb: Callback<FeeAccrued>): void; once(event: "FeeAccrued", options: EventOptions, cb: Callback<FeeAccrued>): void; once(event: "Initialized", cb: Callback<Initialized>): void; once(event: "Initialized", options: EventOptions, cb: Callback<Initialized>): void; once(event: "OwnershipTransferred", cb: Callback<OwnershipTransferred>): void; once(event: "OwnershipTransferred", options: EventOptions, cb: Callback<OwnershipTransferred>): void; once(event: "VerifierUpdate", cb: Callback<VerifierUpdate>): void; once(event: "VerifierUpdate", options: EventOptions, cb: Callback<VerifierUpdate>): void; }