UNPKG

@orionprotocol/contracts

Version:
84 lines (83 loc) 4.41 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, PayableTransactionObject, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types"; export interface EventOptions { filter?: object; fromBlock?: BlockType; topics?: string[]; } export type RewardAdded = ContractEventLog<{ reward: string; 0: string; }>; export type RewardPaid = ContractEventLog<{ user: string; reward: string; 0: string; 1: string; }>; export type Staked = ContractEventLog<{ user: string; amount: string; 0: string; 1: string; }>; export type Withdrawn = ContractEventLog<{ user: string; amount: string; 0: string; 1: string; }>; export interface StakingRewardsWithLongTermBonus extends BaseContract { constructor(jsonInterface: any[], address?: string, options?: ContractOptions): StakingRewardsWithLongTermBonus; clone(): StakingRewardsWithLongTermBonus; methods: { balanceOf(account: string): NonPayableTransactionObject<string>; earned(account: string): NonPayableTransactionObject<string>; emergencyAssetWithdrawal(asset: string): NonPayableTransactionObject<void>; exit(): NonPayableTransactionObject<void>; findLastBalanceInPeriod(account: string, period: number | string | BN): NonPayableTransactionObject<string>; getReward(): NonPayableTransactionObject<void>; getRewardForDuration(): NonPayableTransactionObject<string>; initialize(_rewardsDistribution: string, _rewardsToken: string, _stakingToken: string): PayableTransactionObject<void>; lastTimeRewardApplicable(): NonPayableTransactionObject<string>; lastUpdateTime(): NonPayableTransactionObject<string>; notifyRewardAmount(reward: number | string | BN, _rewardsDuration: number | string | BN, longTermBonus: number | string | BN): NonPayableTransactionObject<void>; periodFinish(): NonPayableTransactionObject<string>; rewardPerToken(): NonPayableTransactionObject<string>; rewardPerTokenStored(): NonPayableTransactionObject<string>; rewardRate(): NonPayableTransactionObject<string>; rewards(arg0: string): NonPayableTransactionObject<string>; rewardsDistribution(): NonPayableTransactionObject<string>; rewardsDuration(): NonPayableTransactionObject<string>; rewardsToken(): NonPayableTransactionObject<string>; stake(amount: number | string | BN): NonPayableTransactionObject<void>; stakeWithPermit(amount: number | string | BN, deadline: number | string | BN, v: number | string | BN, r: string | number[], s: string | number[]): NonPayableTransactionObject<void>; stakingToken(): NonPayableTransactionObject<string>; totalSupply(): NonPayableTransactionObject<string>; userRewardPerTokenPaid(arg0: string): NonPayableTransactionObject<string>; withdraw(amount: number | string | BN): NonPayableTransactionObject<void>; }; events: { RewardAdded(cb?: Callback<RewardAdded>): EventEmitter; RewardAdded(options?: EventOptions, cb?: Callback<RewardAdded>): EventEmitter; RewardPaid(cb?: Callback<RewardPaid>): EventEmitter; RewardPaid(options?: EventOptions, cb?: Callback<RewardPaid>): EventEmitter; Staked(cb?: Callback<Staked>): EventEmitter; Staked(options?: EventOptions, cb?: Callback<Staked>): EventEmitter; Withdrawn(cb?: Callback<Withdrawn>): EventEmitter; Withdrawn(options?: EventOptions, cb?: Callback<Withdrawn>): EventEmitter; allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter; }; once(event: "RewardAdded", cb: Callback<RewardAdded>): void; once(event: "RewardAdded", options: EventOptions, cb: Callback<RewardAdded>): void; once(event: "RewardPaid", cb: Callback<RewardPaid>): void; once(event: "RewardPaid", options: EventOptions, cb: Callback<RewardPaid>): void; once(event: "Staked", cb: Callback<Staked>): void; once(event: "Staked", options: EventOptions, cb: Callback<Staked>): void; once(event: "Withdrawn", cb: Callback<Withdrawn>): void; once(event: "Withdrawn", options: EventOptions, cb: Callback<Withdrawn>): void; }