@orionprotocol/contracts
Version:
Orion Protocol contracts typings
129 lines (128 loc) • 7.02 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 OwnershipTransferred = ContractEventLog<{
previousOwner: string;
newOwner: string;
0: string;
1: 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 OrionGovernance extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): OrionGovernance;
clone(): OrionGovernance;
methods: {
acceptLock(user: string, lock_increase_amount: number | string | BN): NonPayableTransactionObject<void>;
acceptNewLockAmount(user: string, new_lock_amount: number | string | BN): NonPayableTransactionObject<void>;
acceptUnlock(user: string, lock_decrease_amount: number | string | BN): NonPayableTransactionObject<void>;
balances_(arg0: string): NonPayableTransactionObject<{
balance: string;
locked_balance: string;
0: string;
1: string;
}>;
basic_fee_percent(): NonPayableTransactionObject<string>;
burn(burn_size: number | string | BN): NonPayableTransactionObject<void>;
burn_vote_end_(): NonPayableTransactionObject<string>;
earned(account: string): NonPayableTransactionObject<string>;
emergencyAssetWithdrawal(asset: string): NonPayableTransactionObject<void>;
exit(): NonPayableTransactionObject<void>;
extra_fee_percent(): NonPayableTransactionObject<string>;
extra_fee_seconds(): NonPayableTransactionObject<string>;
fee_total(): NonPayableTransactionObject<string>;
getAvailableWithdrawBalance(user: string): NonPayableTransactionObject<string>;
getBalance(user: string): NonPayableTransactionObject<string>;
getLockedBalance(user: string): NonPayableTransactionObject<string>;
getReward(): NonPayableTransactionObject<void>;
getRewardForDuration(): NonPayableTransactionObject<string>;
getTotalBalance(): NonPayableTransactionObject<string>;
getTotalLockedBalance(user: string): NonPayableTransactionObject<string>;
getVaults(wallet: string): NonPayableTransactionObject<[string, string][]>;
initialize(staking_token: string): NonPayableTransactionObject<void>;
lastTimeRewardApplicable(): NonPayableTransactionObject<string>;
lastUpdateTime(): NonPayableTransactionObject<string>;
notifyRewardAmount(reward: number | string | BN, _rewardsDuration: number | string | BN): NonPayableTransactionObject<void>;
owner(): NonPayableTransactionObject<string>;
periodFinish(): NonPayableTransactionObject<string>;
renounceOwnership(): NonPayableTransactionObject<void>;
rewardPerToken(): NonPayableTransactionObject<string>;
rewardPerTokenStored(): NonPayableTransactionObject<string>;
rewardRate(): NonPayableTransactionObject<string>;
rewards(arg0: string): NonPayableTransactionObject<string>;
rewardsDuration(): NonPayableTransactionObject<string>;
setBurnVoteEnd(burn_vote_end: number | string | BN): NonPayableTransactionObject<void>;
setVaultParameters(extra_fee_percent_: number | string | BN, extra_fee_seconds_: number | string | BN, basic_fee_percent_: number | string | BN): NonPayableTransactionObject<void>;
setVotingContractAddress(voting_contract_address: string): NonPayableTransactionObject<void>;
stake(adding_amount: number | string | BN): NonPayableTransactionObject<void>;
staking_token_(): NonPayableTransactionObject<string>;
total_balance_(): NonPayableTransactionObject<string>;
total_votes_burn_(): NonPayableTransactionObject<string>;
total_votes_dont_burn_(): NonPayableTransactionObject<string>;
transferOwnership(newOwner: string): NonPayableTransactionObject<void>;
userRewardPerTokenPaid(arg0: string): NonPayableTransactionObject<string>;
user_burn_votes_(arg0: string): NonPayableTransactionObject<string>;
vaultWithdraw(index: number | string | BN): NonPayableTransactionObject<void>;
vaults_(arg0: string, arg1: number | string | BN): NonPayableTransactionObject<{
amount: string;
created_time: string;
0: string;
1: string;
}>;
voteBurn(voting_amount: number | string | BN, vote_for_burn: boolean): NonPayableTransactionObject<void>;
voteBurnAvailable(): NonPayableTransactionObject<boolean>;
voting_contract_address_(): NonPayableTransactionObject<string>;
withdraw(removing_amount: number | string | BN): NonPayableTransactionObject<void>;
};
events: {
OwnershipTransferred(cb?: Callback<OwnershipTransferred>): EventEmitter;
OwnershipTransferred(options?: EventOptions, cb?: Callback<OwnershipTransferred>): EventEmitter;
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: "OwnershipTransferred", cb: Callback<OwnershipTransferred>): void;
once(event: "OwnershipTransferred", options: EventOptions, cb: Callback<OwnershipTransferred>): void;
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;
}