@ardier16/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
238 lines (209 loc) • 5.89 kB
TypeScript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import BN from "bn.js";
import { ContractOptions } from "web3-eth-contract";
import { EventLog } from "web3-core";
import { EventEmitter } from "events";
import {
Callback,
PayableTransactionObject,
NonPayableTransactionObject,
BlockType,
ContractEventLog,
BaseContract,
} from "./types";
interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}
export type LockedAmountChanged = ContractEventLog<{
_tokenLockSource: string;
_who: string;
_newLockedAmount: string;
0: string;
1: string;
2: string;
}>;
export type NewVotingAgentAnnounced = ContractEventLog<{
_who: string;
_prevVotingAgent: string;
_newVotingAgent: string;
0: string;
1: string;
2: string;
}>;
export type PendingUnlockAmountChanged = ContractEventLog<{
_tokenLockSource: string;
_who: string;
_newPendingUnlockAmount: string;
0: string;
1: string;
2: string;
}>;
export type PendingUnlockChanged = ContractEventLog<{
_tokenLockSource: string;
_who: string;
_newPendingUnlockAmount: string;
_newPendingUnlockTime: string;
0: string;
1: string;
2: string;
3: string;
}>;
export type VotingAgentChanged = ContractEventLog<{
_who: string;
_votingAgent: string;
_delegatedAmount: string;
0: string;
1: string;
2: string;
}>;
export interface VotingWeightProxy extends BaseContract {
constructor(
jsonInterface: any[],
address?: string,
options?: ContractOptions
): VotingWeightProxy;
clone(): VotingWeightProxy;
methods: {
delegationInfos(
arg0: string
): NonPayableTransactionObject<{
receivedWeight: string;
votingAgent: string;
isPending: boolean;
votingAgentPassOverTime: string;
0: string;
1: string;
2: boolean;
3: string;
}>;
lockInfos(
arg0: string,
arg1: string
): NonPayableTransactionObject<{
lockedAmount: string;
lockedUntil: string;
pendingUnlockAmount: string;
pendingUnlockTime: string;
0: string;
1: string;
2: string;
3: string;
}>;
initialize(
_registry: string,
_tokenLockSourcesKeys: string[],
_votingContractsKeys: string[]
): NonPayableTransactionObject<void>;
lock(
_who: string,
_amount: number | string | BN
): NonPayableTransactionObject<void>;
announceUnlock(
_who: string,
_amount: number | string | BN,
_newUnlockTime: number | string | BN
): NonPayableTransactionObject<void>;
unlock(
_who: string,
_amount: number | string | BN
): NonPayableTransactionObject<void>;
forceUnlock(
_who: string,
_amount: number | string | BN
): NonPayableTransactionObject<void>;
announceNewVotingAgent(
_newAgent: string
): NonPayableTransactionObject<void>;
setNewVotingAgent(): NonPayableTransactionObject<void>;
extendLocking(
_who: string,
_lockNeededUntil: number | string | BN
): NonPayableTransactionObject<string>;
getLockInfo(
_tokenLockSource: string,
_who: string
): NonPayableTransactionObject<[string, string, string, string]>;
getBaseVotingWeightInfo(
_user: string,
_votingEndTime: number | string | BN
): NonPayableTransactionObject<[string, string, string, string]>;
getLockedUntil(_user: string): NonPayableTransactionObject<string>;
getVotingWeight(
_who: string,
_lockNeededUntil: number | string | BN
): NonPayableTransactionObject<string>;
getLockedAmount(_who: string): NonPayableTransactionObject<string>;
};
events: {
LockedAmountChanged(cb?: Callback<LockedAmountChanged>): EventEmitter;
LockedAmountChanged(
options?: EventOptions,
cb?: Callback<LockedAmountChanged>
): EventEmitter;
NewVotingAgentAnnounced(
cb?: Callback<NewVotingAgentAnnounced>
): EventEmitter;
NewVotingAgentAnnounced(
options?: EventOptions,
cb?: Callback<NewVotingAgentAnnounced>
): EventEmitter;
PendingUnlockAmountChanged(
cb?: Callback<PendingUnlockAmountChanged>
): EventEmitter;
PendingUnlockAmountChanged(
options?: EventOptions,
cb?: Callback<PendingUnlockAmountChanged>
): EventEmitter;
PendingUnlockChanged(cb?: Callback<PendingUnlockChanged>): EventEmitter;
PendingUnlockChanged(
options?: EventOptions,
cb?: Callback<PendingUnlockChanged>
): EventEmitter;
VotingAgentChanged(cb?: Callback<VotingAgentChanged>): EventEmitter;
VotingAgentChanged(
options?: EventOptions,
cb?: Callback<VotingAgentChanged>
): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "LockedAmountChanged", cb: Callback<LockedAmountChanged>): void;
once(
event: "LockedAmountChanged",
options: EventOptions,
cb: Callback<LockedAmountChanged>
): void;
once(
event: "NewVotingAgentAnnounced",
cb: Callback<NewVotingAgentAnnounced>
): void;
once(
event: "NewVotingAgentAnnounced",
options: EventOptions,
cb: Callback<NewVotingAgentAnnounced>
): void;
once(
event: "PendingUnlockAmountChanged",
cb: Callback<PendingUnlockAmountChanged>
): void;
once(
event: "PendingUnlockAmountChanged",
options: EventOptions,
cb: Callback<PendingUnlockAmountChanged>
): void;
once(event: "PendingUnlockChanged", cb: Callback<PendingUnlockChanged>): void;
once(
event: "PendingUnlockChanged",
options: EventOptions,
cb: Callback<PendingUnlockChanged>
): void;
once(event: "VotingAgentChanged", cb: Callback<VotingAgentChanged>): void;
once(
event: "VotingAgentChanged",
options: EventOptions,
cb: Callback<VotingAgentChanged>
): void;
}