@electra.finance/contracts
Version:
Electra Finance contracts typings
150 lines (149 loc) • 7.96 kB
TypeScript
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 DefaultInitialization = ContractEventLog<{}>;
export type OldYieldCollected = ContractEventLog<{
user: string;
yield: string;
token_address: string;
0: string;
1: string;
2: string;
}>;
export type OwnerChanged = ContractEventLog<{
oldOwner: string;
newOwner: string;
0: string;
1: string;
}>;
export type OwnerNominated = ContractEventLog<{
newOwner: string;
0: string;
}>;
export type RecoveredERC20 = ContractEventLog<{
token: string;
amount: string;
0: string;
1: string;
}>;
export type RewardAdded = ContractEventLog<{
reward: string;
yieldRate: string;
0: string;
1: string;
}>;
export type YieldCollected = ContractEventLog<{
user: string;
yield: string;
token_address: string;
0: string;
1: string;
2: string;
}>;
export type YieldDurationUpdated = ContractEventLog<{
newDuration: string;
0: string;
}>;
export type YieldPeriodRenewed = ContractEventLog<{
token: string;
yieldRate: string;
0: string;
1: string;
}>;
export interface VeTokenYieldDistributorV4 extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): VeTokenYieldDistributorV4;
clone(): VeTokenYieldDistributorV4;
methods: {
acceptOwnership(): NonPayableTransactionObject<void>;
checkpoint(): NonPayableTransactionObject<void>;
checkpointOtherUser(user_addr: string): NonPayableTransactionObject<void>;
earned(account: string): NonPayableTransactionObject<string>;
eligibleCurrentVeToken(account: string): NonPayableTransactionObject<{
eligible_vetoken_bal: string;
stored_ending_timestamp: string;
0: string;
1: string;
}>;
emittedToken(): NonPayableTransactionObject<string>;
emitted_token_address(): NonPayableTransactionObject<string>;
fractionParticipating(): NonPayableTransactionObject<string>;
getYield(): NonPayableTransactionObject<string>;
getYieldForDuration(): NonPayableTransactionObject<string>;
greylist(arg0: string): NonPayableTransactionObject<boolean>;
greylistAddress(_address: string): NonPayableTransactionObject<void>;
lastTimeYieldApplicable(): NonPayableTransactionObject<string>;
lastUpdateTime(): NonPayableTransactionObject<string>;
nominateNewOwner(_owner: string): NonPayableTransactionObject<void>;
nominatedOwner(): NonPayableTransactionObject<string>;
notifyRewardAmount(amount: number | string | BN): NonPayableTransactionObject<void>;
owner(): NonPayableTransactionObject<string>;
periodFinish(): NonPayableTransactionObject<string>;
recoverERC20(tokenAddress: string, tokenAmount: number | string | BN): NonPayableTransactionObject<void>;
reward_notifiers(arg0: string): NonPayableTransactionObject<boolean>;
setPauses(_yieldCollectionPaused: boolean): NonPayableTransactionObject<void>;
setTimelock(_new_timelock: string): NonPayableTransactionObject<void>;
setYieldDuration(_yieldDuration: number | string | BN): NonPayableTransactionObject<void>;
setYieldRate(_new_rate0: number | string | BN, sync_too: boolean): NonPayableTransactionObject<void>;
sync(): NonPayableTransactionObject<void>;
timelock_address(): NonPayableTransactionObject<string>;
toggleRewardNotifier(notifier_addr: string): NonPayableTransactionObject<void>;
totalVeTokenParticipating(): NonPayableTransactionObject<string>;
totalVeTokenSupplyStored(): NonPayableTransactionObject<string>;
userIsInitialized(arg0: string): NonPayableTransactionObject<boolean>;
userVeTokenCheckpointed(arg0: string): NonPayableTransactionObject<string>;
userVeTokenEndpointCheckpointed(arg0: string): NonPayableTransactionObject<string>;
userYieldPerTokenPaid(arg0: string): NonPayableTransactionObject<string>;
yieldCollectionPaused(): NonPayableTransactionObject<boolean>;
yieldDuration(): NonPayableTransactionObject<string>;
yieldPerVeToken(): NonPayableTransactionObject<string>;
yieldPerVeTokenStored(): NonPayableTransactionObject<string>;
yieldRate(): NonPayableTransactionObject<string>;
yields(arg0: string): NonPayableTransactionObject<string>;
};
events: {
DefaultInitialization(cb?: Callback<DefaultInitialization>): EventEmitter;
DefaultInitialization(options?: EventOptions, cb?: Callback<DefaultInitialization>): EventEmitter;
OldYieldCollected(cb?: Callback<OldYieldCollected>): EventEmitter;
OldYieldCollected(options?: EventOptions, cb?: Callback<OldYieldCollected>): EventEmitter;
OwnerChanged(cb?: Callback<OwnerChanged>): EventEmitter;
OwnerChanged(options?: EventOptions, cb?: Callback<OwnerChanged>): EventEmitter;
OwnerNominated(cb?: Callback<OwnerNominated>): EventEmitter;
OwnerNominated(options?: EventOptions, cb?: Callback<OwnerNominated>): EventEmitter;
RecoveredERC20(cb?: Callback<RecoveredERC20>): EventEmitter;
RecoveredERC20(options?: EventOptions, cb?: Callback<RecoveredERC20>): EventEmitter;
RewardAdded(cb?: Callback<RewardAdded>): EventEmitter;
RewardAdded(options?: EventOptions, cb?: Callback<RewardAdded>): EventEmitter;
YieldCollected(cb?: Callback<YieldCollected>): EventEmitter;
YieldCollected(options?: EventOptions, cb?: Callback<YieldCollected>): EventEmitter;
YieldDurationUpdated(cb?: Callback<YieldDurationUpdated>): EventEmitter;
YieldDurationUpdated(options?: EventOptions, cb?: Callback<YieldDurationUpdated>): EventEmitter;
YieldPeriodRenewed(cb?: Callback<YieldPeriodRenewed>): EventEmitter;
YieldPeriodRenewed(options?: EventOptions, cb?: Callback<YieldPeriodRenewed>): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "DefaultInitialization", cb: Callback<DefaultInitialization>): void;
once(event: "DefaultInitialization", options: EventOptions, cb: Callback<DefaultInitialization>): void;
once(event: "OldYieldCollected", cb: Callback<OldYieldCollected>): void;
once(event: "OldYieldCollected", options: EventOptions, cb: Callback<OldYieldCollected>): void;
once(event: "OwnerChanged", cb: Callback<OwnerChanged>): void;
once(event: "OwnerChanged", options: EventOptions, cb: Callback<OwnerChanged>): void;
once(event: "OwnerNominated", cb: Callback<OwnerNominated>): void;
once(event: "OwnerNominated", options: EventOptions, cb: Callback<OwnerNominated>): void;
once(event: "RecoveredERC20", cb: Callback<RecoveredERC20>): void;
once(event: "RecoveredERC20", options: EventOptions, cb: Callback<RecoveredERC20>): void;
once(event: "RewardAdded", cb: Callback<RewardAdded>): void;
once(event: "RewardAdded", options: EventOptions, cb: Callback<RewardAdded>): void;
once(event: "YieldCollected", cb: Callback<YieldCollected>): void;
once(event: "YieldCollected", options: EventOptions, cb: Callback<YieldCollected>): void;
once(event: "YieldDurationUpdated", cb: Callback<YieldDurationUpdated>): void;
once(event: "YieldDurationUpdated", options: EventOptions, cb: Callback<YieldDurationUpdated>): void;
once(event: "YieldPeriodRenewed", cb: Callback<YieldPeriodRenewed>): void;
once(event: "YieldPeriodRenewed", options: EventOptions, cb: Callback<YieldPeriodRenewed>): void;
}