@orionprotocol/contracts
Version:
Orion Protocol contracts typings
264 lines (263 loc) • 11.6 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, PayableTransactionObject, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types";
export interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}
export type AirdropStateUpdated = ContractEventLog<{}>;
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 Deposit = ContractEventLog<{
provider: string;
value: string;
locktime: string;
mode: string;
ts: string;
0: string;
1: string;
2: string;
3: string;
4: string;
}>;
export type DropLockActivated = ContractEventLog<{
sender: string;
0: string;
}>;
export type SetPointsRewards = ContractEventLog<{
rewards: string;
duration: string;
rewardCumulativePointsTotal: string;
rateCumulativePoints: string;
timestamp: string;
0: string;
1: string;
2: string;
3: string;
4: 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 StakePoints = ContractEventLog<{
account: string;
amount: string;
rewardCumulativePointsTotal: string;
rateCumulativePoints: 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 UpdateDeposit = ContractEventLog<{
provider: string;
time_lock: string;
balance: string;
amount_token: string;
value: string;
totalSupplyT0: string;
ts: string;
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
6: string;
}>;
export type Withdraw = ContractEventLog<{
provider: string;
value: string;
ts: string;
0: string;
1: string;
2: string;
}>;
export interface VeORN extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): VeORN;
clone(): VeORN;
methods: {
ALPHA7(): NonPayableTransactionObject<string>;
START_TIME(): NonPayableTransactionObject<string>;
admin(): NonPayableTransactionObject<string>;
allStake(): NonPayableTransactionObject<string>;
amountAt(amount: number | string | BN, time: number | string | BN): NonPayableTransactionObject<string>;
amountByTokenAt(amount_token: number | string | BN, time_lock: number | string | BN): NonPayableTransactionObject<string>;
"balanceOf(address,uint256)"(account: string, time: number | string | BN): NonPayableTransactionObject<string>;
"balanceOf(address)"(account: string): NonPayableTransactionObject<string>;
balanceOf0(account: string): NonPayableTransactionObject<string>;
balanceOfAvg(user: string, itemStart: [number | string | BN, number | string | BN]): NonPayableTransactionObject<string>;
balanceOfTW(user: string): NonPayableTransactionObject<[string, string]>;
balanceTokenOf(account: string): NonPayableTransactionObject<string>;
calcNewRate(): NonPayableTransactionObject<string>;
calcPointsNewRate(): NonPayableTransactionObject<string>;
claimReward(): NonPayableTransactionObject<void>;
create_lock(_value: number | string | BN, unlock_time: number | string | BN): PayableTransactionObject<void>;
create_lock_period(_value: number | string | BN, unlock_period: number | string | BN): PayableTransactionObject<void>;
decimals(): NonPayableTransactionObject<string>;
dropLockUsers(arg0: string): NonPayableTransactionObject<boolean>;
endCumulativePointsTime(): NonPayableTransactionObject<string>;
getK(time: number | string | BN): NonPayableTransactionObject<string>;
getPointsReward(account: string): NonPayableTransactionObject<string>;
getPointsRewardCumulativeAll(): NonPayableTransactionObject<string>;
getPointsStake(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>;
increase_amount(_value: number | string | BN): PayableTransactionObject<void>;
increase_unlock_period(unlock_period: number | string | BN): NonPayableTransactionObject<void>;
increase_unlock_time(unlock_time: number | string | BN): NonPayableTransactionObject<void>;
isAirdropPassed(): NonPayableTransactionObject<boolean>;
lockTime(account: string): NonPayableTransactionObject<string>;
name(): NonPayableTransactionObject<string>;
poolStake(arg0: string): NonPayableTransactionObject<{
stake: string;
rateCumulative: string;
rateCumulativePoints: string;
reward: string;
pointsReward: string;
rewardWithdraw: string;
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
}>;
rateCumulative(): NonPayableTransactionObject<string>;
rateCumulativePoints(): NonPayableTransactionObject<string>;
rateTime(): NonPayableTransactionObject<string>;
rateTimePoints(): NonPayableTransactionObject<string>;
rewardPointsRate(): NonPayableTransactionObject<string>;
rewardRate(): NonPayableTransactionObject<string>;
setAdmin(_admin: string): NonPayableTransactionObject<void>;
setPointsRewards(rewards: number | string | BN, duration: number | string | BN): NonPayableTransactionObject<void>;
setRewards(rewards: number | string | BN, duration: number | string | BN): NonPayableTransactionObject<void>;
setSmartVote(addrVote: string): NonPayableTransactionObject<void>;
smartOwner(): NonPayableTransactionObject<string>;
smartVote(): NonPayableTransactionObject<string>;
symbol(): NonPayableTransactionObject<string>;
tokenMap(arg0: string): NonPayableTransactionObject<{
time_lock: string;
balance: string;
amount_token: string;
0: string;
1: string;
2: string;
}>;
"totalSupply()"(): NonPayableTransactionObject<string>;
"totalSupply(uint256)"(time: number | string | BN): NonPayableTransactionObject<string>;
totalSupply0(): NonPayableTransactionObject<string>;
totalSupplyAvg(itemStart: [number | string | BN, number | string | BN]): NonPayableTransactionObject<string>;
totalSupplyDropLockUsersT0(): NonPayableTransactionObject<string>;
totalSupplyTW(): NonPayableTransactionObject<[string, string]>;
updateAirdropState(): NonPayableTransactionObject<void>;
withdraw(): NonPayableTransactionObject<void>;
};
events: {
AirdropStateUpdated(cb?: Callback<AirdropStateUpdated>): EventEmitter;
AirdropStateUpdated(options?: EventOptions, cb?: Callback<AirdropStateUpdated>): EventEmitter;
ClaimReward(cb?: Callback<ClaimReward>): EventEmitter;
ClaimReward(options?: EventOptions, cb?: Callback<ClaimReward>): EventEmitter;
Deposit(cb?: Callback<Deposit>): EventEmitter;
Deposit(options?: EventOptions, cb?: Callback<Deposit>): EventEmitter;
DropLockActivated(cb?: Callback<DropLockActivated>): EventEmitter;
DropLockActivated(options?: EventOptions, cb?: Callback<DropLockActivated>): EventEmitter;
SetPointsRewards(cb?: Callback<SetPointsRewards>): EventEmitter;
SetPointsRewards(options?: EventOptions, cb?: Callback<SetPointsRewards>): 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;
StakePoints(cb?: Callback<StakePoints>): EventEmitter;
StakePoints(options?: EventOptions, cb?: Callback<StakePoints>): EventEmitter;
Unstake(cb?: Callback<Unstake>): EventEmitter;
Unstake(options?: EventOptions, cb?: Callback<Unstake>): EventEmitter;
UpdateDeposit(cb?: Callback<UpdateDeposit>): EventEmitter;
UpdateDeposit(options?: EventOptions, cb?: Callback<UpdateDeposit>): EventEmitter;
Withdraw(cb?: Callback<Withdraw>): EventEmitter;
Withdraw(options?: EventOptions, cb?: Callback<Withdraw>): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "AirdropStateUpdated", cb: Callback<AirdropStateUpdated>): void;
once(event: "AirdropStateUpdated", options: EventOptions, cb: Callback<AirdropStateUpdated>): void;
once(event: "ClaimReward", cb: Callback<ClaimReward>): void;
once(event: "ClaimReward", options: EventOptions, cb: Callback<ClaimReward>): void;
once(event: "Deposit", cb: Callback<Deposit>): void;
once(event: "Deposit", options: EventOptions, cb: Callback<Deposit>): void;
once(event: "DropLockActivated", cb: Callback<DropLockActivated>): void;
once(event: "DropLockActivated", options: EventOptions, cb: Callback<DropLockActivated>): void;
once(event: "SetPointsRewards", cb: Callback<SetPointsRewards>): void;
once(event: "SetPointsRewards", options: EventOptions, cb: Callback<SetPointsRewards>): 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: "StakePoints", cb: Callback<StakePoints>): void;
once(event: "StakePoints", options: EventOptions, cb: Callback<StakePoints>): void;
once(event: "Unstake", cb: Callback<Unstake>): void;
once(event: "Unstake", options: EventOptions, cb: Callback<Unstake>): void;
once(event: "UpdateDeposit", cb: Callback<UpdateDeposit>): void;
once(event: "UpdateDeposit", options: EventOptions, cb: Callback<UpdateDeposit>): void;
once(event: "Withdraw", cb: Callback<Withdraw>): void;
once(event: "Withdraw", options: EventOptions, cb: Callback<Withdraw>): void;
}