UNPKG

@ardier16/q-js-sdk

Version:

Typescript Library to interact with Q System Contracts

162 lines (139 loc) 4.13 kB
/* 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 type ProposalExecuted = ContractEventLog<{ _proposalId: string; 0: string; }>; export type UserVoted = ContractEventLog<{ _proposalId: string; _votingOption: string; 0: string; 1: string; }>; export interface EmergencyUpdateVoting extends BaseContract { constructor( jsonInterface: any[], address?: string, options?: ContractOptions ): EmergencyUpdateVoting; clone(): EmergencyUpdateVoting; methods: { proposalCount(): NonPayableTransactionObject<string>; proposals( arg0: number | string | BN ): NonPayableTransactionObject<{ remark: string; params: [string, string, string, string, string, string, string, string]; counters: [string, string, string]; executed: boolean; 0: string; 1: [string, string, string, string, string, string, string, string]; 2: [string, string, string]; 3: boolean; }>; voted( arg0: number | string | BN, arg1: string ): NonPayableTransactionObject<boolean>; initialize(_registry: string): NonPayableTransactionObject<void>; createProposal(_remark: string): NonPayableTransactionObject<string>; execute( _proposalId: number | string | BN ): NonPayableTransactionObject<void>; voteFor( _proposalId: number | string | BN ): NonPayableTransactionObject<void>; voteAgainst( _proposalId: number | string | BN ): NonPayableTransactionObject<void>; getVotesFor( _proposalId: number | string | BN ): NonPayableTransactionObject<string>; getVotesAgainst( _proposalId: number | string | BN ): NonPayableTransactionObject<string>; 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]>; getStatus( _proposalId: number | string | BN ): NonPayableTransactionObject<string>; }; events: { ProposalCreated(cb?: Callback<ProposalCreated>): EventEmitter; ProposalCreated( options?: EventOptions, cb?: Callback<ProposalCreated> ): EventEmitter; ProposalExecuted(cb?: Callback<ProposalExecuted>): EventEmitter; ProposalExecuted( options?: EventOptions, cb?: Callback<ProposalExecuted> ): EventEmitter; UserVoted(cb?: Callback<UserVoted>): EventEmitter; UserVoted(options?: EventOptions, cb?: Callback<UserVoted>): EventEmitter; allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter; }; once(event: "ProposalCreated", cb: Callback<ProposalCreated>): void; once( event: "ProposalCreated", options: EventOptions, cb: Callback<ProposalCreated> ): void; once(event: "ProposalExecuted", cb: Callback<ProposalExecuted>): void; once( event: "ProposalExecuted", options: EventOptions, cb: Callback<ProposalExecuted> ): void; once(event: "UserVoted", cb: Callback<UserVoted>): void; once( event: "UserVoted", options: EventOptions, cb: Callback<UserVoted> ): void; }