@orionprotocol/contracts
Version:
Orion Protocol contracts typings
58 lines (57 loc) • 2.97 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 OwnershipTransferred = ContractEventLog<{
previousOwner: string;
newOwner: string;
0: string;
1: string;
}>;
export interface OrionVoting extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): OrionVoting;
clone(): OrionVoting;
methods: {
cease(poolAddress: string, amount: number | string | BN): NonPayableTransactionObject<void>;
claimRewards(amount: number | string | BN, to: string): NonPayableTransactionObject<void>;
getPoolRewards(pool_address: string): NonPayableTransactionObject<string>;
getRewardPerVotingToken(): NonPayableTransactionObject<string>;
initialize(rewards_token: string, governance_contract_address: string): PayableTransactionObject<void>;
owner(): NonPayableTransactionObject<string>;
pool_states_(arg0: string): NonPayableTransactionObject<{
state: string;
votes: string;
last_acc_reward_per_voting_token: string;
acc_reward: string;
0: string;
1: string;
2: string;
3: string;
}>;
renounceOwnership(): NonPayableTransactionObject<void>;
reward_rate_(): NonPayableTransactionObject<string>;
rewards_token_(): NonPayableTransactionObject<string>;
setPoolState(pool_address: string, new_state: number | string | BN): NonPayableTransactionObject<void>;
setRewards(rewards: number | string | BN, duration: number | string | BN): NonPayableTransactionObject<void>;
totalSupply(): NonPayableTransactionObject<string>;
total_supply_(): NonPayableTransactionObject<string>;
transferOwnership(newOwner: string): NonPayableTransactionObject<void>;
user_votes_(arg0: string, arg1: string): NonPayableTransactionObject<string>;
vote(poolAddress: string, amount: number | string | BN): NonPayableTransactionObject<void>;
votes(pool_address: string): NonPayableTransactionObject<string>;
};
events: {
OwnershipTransferred(cb?: Callback<OwnershipTransferred>): EventEmitter;
OwnershipTransferred(options?: EventOptions, cb?: Callback<OwnershipTransferred>): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "OwnershipTransferred", cb: Callback<OwnershipTransferred>): void;
once(event: "OwnershipTransferred", options: EventOptions, cb: Callback<OwnershipTransferred>): void;
}