@orionprotocol/contracts
Version:
Orion Protocol contracts typings
183 lines (182 loc) • 6.88 kB
TypeScript
/// <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 ClaimReward = ContractEventLog<{
account: string;
amount: string;
rewardCumulativeTotal: string;
rateCumulative: string;
reward: string;
timestamp: string;
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
}>;
export type ClaimReward2 = ContractEventLog<{
provider: string;
value: string;
originValue: string;
ts: string;
0: string;
1: string;
2: string;
3: string;
}>;
export type Deposit = ContractEventLog<{
provider: string;
value: string;
lock_period: string;
ts: string;
0: string;
1: string;
2: string;
3: string;
}>;
export type SetRewards = ContractEventLog<{
rewards: string;
duration: string;
rewardCumulativeTotal: string;
rateCumulative: string;
timestamp: string;
0: string;
1: string;
2: string;
3: string;
4: string;
}>;
export type Stake = ContractEventLog<{
account: string;
amount: string;
rewardCumulativeTotal: string;
rateCumulative: string;
reward: string;
timestamp: string;
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
}>;
export type Unstake = ContractEventLog<{
account: string;
amount: string;
rewardCumulativeTotal: string;
rateCumulative: string;
reward: string;
timestamp: string;
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
}>;
export type Withdraw = ContractEventLog<{
provider: string;
value: string;
ts: string;
0: string;
1: string;
2: string;
}>;
export interface StakingReward extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): StakingReward;
clone(): StakingReward;
methods: {
MAX_BOOSTED_REWARD(): NonPayableTransactionObject<string>;
MAX_LOCK_MULTIPLIER(): NonPayableTransactionObject<string>;
MAX_VEORN_MULTIPLIER(): NonPayableTransactionObject<string>;
allStake(): NonPayableTransactionObject<string>;
calcNewRate(): NonPayableTransactionObject<string>;
claimReward(account: string): NonPayableTransactionObject<string>;
getBoost(account: string): NonPayableTransactionObject<string>;
getReward(account: string): NonPayableTransactionObject<string>;
getRewardCumulative(account: string): NonPayableTransactionObject<string>;
getRewardCumulativeAll(): NonPayableTransactionObject<string>;
getRewardWithdraw(account: string): NonPayableTransactionObject<string>;
getStake(account: string): NonPayableTransactionObject<string>;
init(_token: string): NonPayableTransactionObject<void>;
lockTimePeriod(account: string): NonPayableTransactionObject<string>;
lockTimeStart(account: string): NonPayableTransactionObject<string>;
parentSmart(): NonPayableTransactionObject<string>;
poolStake(arg0: string): NonPayableTransactionObject<{
stake: string;
rateCumulative: string;
reward: string;
rewardWithdraw: string;
0: string;
1: string;
2: string;
3: string;
}>;
poolTimeStake(arg0: string): NonPayableTransactionObject<{
lock_start: string;
lock_period: string;
staking: boolean;
balanceTW: [string, string];
totalTW: [string, string];
0: string;
1: string;
2: boolean;
3: [string, string];
4: [string, string];
}>;
rateCumulative(): NonPayableTransactionObject<string>;
rateTime(): NonPayableTransactionObject<string>;
rewardRate(): NonPayableTransactionObject<string>;
smartVote(): NonPayableTransactionObject<string>;
stake(account: string, amount: number | string | BN, lock_period: number | string | BN): NonPayableTransactionObject<string>;
tokenStake(): NonPayableTransactionObject<string>;
usedRewardForRate(): NonPayableTransactionObject<string>;
veORN(): NonPayableTransactionObject<string>;
withdraw(account: string): NonPayableTransactionObject<{
reward: string;
amount: string;
0: string;
1: string;
}>;
};
events: {
ClaimReward(cb?: Callback<ClaimReward>): EventEmitter;
ClaimReward(options?: EventOptions, cb?: Callback<ClaimReward>): EventEmitter;
ClaimReward2(cb?: Callback<ClaimReward2>): EventEmitter;
ClaimReward2(options?: EventOptions, cb?: Callback<ClaimReward2>): EventEmitter;
Deposit(cb?: Callback<Deposit>): EventEmitter;
Deposit(options?: EventOptions, cb?: Callback<Deposit>): EventEmitter;
SetRewards(cb?: Callback<SetRewards>): EventEmitter;
SetRewards(options?: EventOptions, cb?: Callback<SetRewards>): EventEmitter;
Stake(cb?: Callback<Stake>): EventEmitter;
Stake(options?: EventOptions, cb?: Callback<Stake>): EventEmitter;
Unstake(cb?: Callback<Unstake>): EventEmitter;
Unstake(options?: EventOptions, cb?: Callback<Unstake>): EventEmitter;
Withdraw(cb?: Callback<Withdraw>): EventEmitter;
Withdraw(options?: EventOptions, cb?: Callback<Withdraw>): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "ClaimReward", cb: Callback<ClaimReward>): void;
once(event: "ClaimReward", options: EventOptions, cb: Callback<ClaimReward>): void;
once(event: "ClaimReward2", cb: Callback<ClaimReward2>): void;
once(event: "ClaimReward2", options: EventOptions, cb: Callback<ClaimReward2>): void;
once(event: "Deposit", cb: Callback<Deposit>): void;
once(event: "Deposit", options: EventOptions, cb: Callback<Deposit>): void;
once(event: "SetRewards", cb: Callback<SetRewards>): void;
once(event: "SetRewards", options: EventOptions, cb: Callback<SetRewards>): void;
once(event: "Stake", cb: Callback<Stake>): void;
once(event: "Stake", options: EventOptions, cb: Callback<Stake>): void;
once(event: "Unstake", cb: Callback<Unstake>): void;
once(event: "Unstake", options: EventOptions, cb: Callback<Unstake>): void;
once(event: "Withdraw", cb: Callback<Withdraw>): void;
once(event: "Withdraw", options: EventOptions, cb: Callback<Withdraw>): void;
}