@ardier16/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
101 lines (88 loc) • 2.43 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 ProposalCreated = ContractEventLog<{
_id: string;
_proposal: [
string,
[string, string, string, string, string, string, string, string],
[string, string, string],
boolean
];
0: string;
1: [
string,
[string, string, string, string, string, string, string, string],
[string, string, string],
boolean
];
}>;
export interface ISlashingVoting extends BaseContract {
constructor(
jsonInterface: any[],
address?: string,
options?: ContractOptions
): ISlashingVoting;
clone(): ISlashingVoting;
methods: {
execute(
_proposalId: number | string | BN
): NonPayableTransactionObject<void>;
getProposal(
_proposalId: number | string | BN
): NonPayableTransactionObject<
[
string,
[string, string, string, string, string, string, string, string],
[string, string, string],
boolean
]
>;
getProposalStats(
_proposalId: number | string | BN
): NonPayableTransactionObject<[string, string, string, string, string]>;
voteAgainst(
_proposalId: number | string | BN
): NonPayableTransactionObject<void>;
voteFor(
_proposalId: number | string | BN
): NonPayableTransactionObject<void>;
getSlashingVictim(
_proposalId: number | string | BN
): NonPayableTransactionObject<string>;
getSlashingProposer(
_proposalId: number | string | BN
): NonPayableTransactionObject<string>;
};
events: {
ProposalCreated(cb?: Callback<ProposalCreated>): EventEmitter;
ProposalCreated(
options?: EventOptions,
cb?: Callback<ProposalCreated>
): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "ProposalCreated", cb: Callback<ProposalCreated>): void;
once(
event: "ProposalCreated",
options: EventOptions,
cb: Callback<ProposalCreated>
): void;
}