@electra.finance/contracts
Version:
Electra Finance contracts typings
117 lines (116 loc) • 6.22 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 CommitOwnership = ContractEventLog<{
admin: string;
0: string;
}>;
export type ApplyOwnership = ContractEventLog<{
admin: string;
0: string;
}>;
export type Deposit = ContractEventLog<{
provider: string;
value: string;
locktime: string;
type: string;
ts: string;
0: string;
1: string;
2: string;
3: string;
4: string;
}>;
export type Withdraw = ContractEventLog<{
provider: string;
value: string;
ts: string;
0: string;
1: string;
2: string;
}>;
export type Supply = ContractEventLog<{
prevSupply: string;
supply: string;
0: string;
1: string;
}>;
export interface VeELT extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): VeELT;
clone(): VeELT;
methods: {
commit_transfer_ownership(addr: string): NonPayableTransactionObject<void>;
apply_transfer_ownership(): NonPayableTransactionObject<void>;
commit_smart_wallet_checker(addr: string): NonPayableTransactionObject<void>;
apply_smart_wallet_checker(): NonPayableTransactionObject<void>;
toggleEmergencyUnlock(): NonPayableTransactionObject<void>;
recoverERC20(token_addr: string, amount: number | string | BN): NonPayableTransactionObject<void>;
get_last_user_slope(addr: string): NonPayableTransactionObject<string>;
user_point_history__ts(_addr: string, _idx: number | string | BN): NonPayableTransactionObject<string>;
locked__end(_addr: string): NonPayableTransactionObject<string>;
checkpoint(): NonPayableTransactionObject<void>;
deposit_for(_addr: string, _value: number | string | BN): NonPayableTransactionObject<void>;
create_lock(_value: number | string | BN, _unlock_time: number | string | BN): NonPayableTransactionObject<void>;
increase_amount(_value: number | string | BN): NonPayableTransactionObject<void>;
increase_unlock_time(_unlock_time: number | string | BN): NonPayableTransactionObject<void>;
withdraw(): NonPayableTransactionObject<void>;
"balanceOf(address)"(addr: string): NonPayableTransactionObject<string>;
"balanceOf(address,uint256)"(addr: string, _t: number | string | BN): NonPayableTransactionObject<string>;
balanceOfAt(addr: string, _block: number | string | BN): NonPayableTransactionObject<string>;
"totalSupply()"(): NonPayableTransactionObject<string>;
"totalSupply(uint256)"(t: number | string | BN): NonPayableTransactionObject<string>;
totalSupplyAt(_block: number | string | BN): NonPayableTransactionObject<string>;
totalTokenSupply(): NonPayableTransactionObject<string>;
totalTokenSupplyAt(_block: number | string | BN): NonPayableTransactionObject<string>;
changeController(_newController: string): NonPayableTransactionObject<void>;
token(): NonPayableTransactionObject<string>;
supply(): NonPayableTransactionObject<string>;
locked(arg0: string): NonPayableTransactionObject<[string, string]>;
epoch(): NonPayableTransactionObject<string>;
point_history(arg0: number | string | BN): NonPayableTransactionObject<[string, string, string, string, string]>;
user_point_history(arg0: string, arg1: number | string | BN): NonPayableTransactionObject<[string, string, string, string, string]>;
user_point_epoch(arg0: string): NonPayableTransactionObject<string>;
slope_changes(arg0: number | string | BN): NonPayableTransactionObject<string>;
controller(): NonPayableTransactionObject<string>;
transfersEnabled(): NonPayableTransactionObject<boolean>;
emergencyUnlockActive(): NonPayableTransactionObject<boolean>;
name(): NonPayableTransactionObject<string>;
symbol(): NonPayableTransactionObject<string>;
version(): NonPayableTransactionObject<string>;
decimals(): NonPayableTransactionObject<string>;
future_smart_wallet_checker(): NonPayableTransactionObject<string>;
smart_wallet_checker(): NonPayableTransactionObject<string>;
admin(): NonPayableTransactionObject<string>;
future_admin(): NonPayableTransactionObject<string>;
};
events: {
CommitOwnership(cb?: Callback<CommitOwnership>): EventEmitter;
CommitOwnership(options?: EventOptions, cb?: Callback<CommitOwnership>): EventEmitter;
ApplyOwnership(cb?: Callback<ApplyOwnership>): EventEmitter;
ApplyOwnership(options?: EventOptions, cb?: Callback<ApplyOwnership>): EventEmitter;
Deposit(cb?: Callback<Deposit>): EventEmitter;
Deposit(options?: EventOptions, cb?: Callback<Deposit>): EventEmitter;
Withdraw(cb?: Callback<Withdraw>): EventEmitter;
Withdraw(options?: EventOptions, cb?: Callback<Withdraw>): EventEmitter;
Supply(cb?: Callback<Supply>): EventEmitter;
Supply(options?: EventOptions, cb?: Callback<Supply>): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "CommitOwnership", cb: Callback<CommitOwnership>): void;
once(event: "CommitOwnership", options: EventOptions, cb: Callback<CommitOwnership>): void;
once(event: "ApplyOwnership", cb: Callback<ApplyOwnership>): void;
once(event: "ApplyOwnership", options: EventOptions, cb: Callback<ApplyOwnership>): void;
once(event: "Deposit", cb: Callback<Deposit>): void;
once(event: "Deposit", options: EventOptions, cb: Callback<Deposit>): void;
once(event: "Withdraw", cb: Callback<Withdraw>): void;
once(event: "Withdraw", options: EventOptions, cb: Callback<Withdraw>): void;
once(event: "Supply", cb: Callback<Supply>): void;
once(event: "Supply", options: EventOptions, cb: Callback<Supply>): void;
}