UNPKG

@ardier16/q-js-sdk

Version:

Typescript Library to interact with Q System Contracts

31 lines (30 loc) 1.36 kB
import { TransactionReceipt } from 'web3-eth'; import { ProposalWithBaseInfo, QNonPayableTx } from '../types'; import { IVetoable } from '../web3-contracts/IVetoable'; import { IVoting } from '../web3-contracts/IVoting'; import { BaseVotingInstance } from './BaseVotingInstance'; /** * Vetoable interface to interact with Vetoable implementation contracts. * See [onchain documentation](@system-contracts-repo/@network/IVetoable/) for more details. */ export declare abstract class BaseVotingVetoableInstance<T extends IVoting & IVetoable, P extends ProposalWithBaseInfo> extends BaseVotingInstance<T, P> { abstract hasRootVetoed(proposalId: number | string, address: string): Promise<boolean>; /** * Veto specific proposal * @param proposalId proposal id * @param txOptions transaction options * @returns transaction receipt */ veto(proposalId: string | number, txOptions?: QNonPayableTx): Promise<TransactionReceipt>; /** * Get vetoes number for specific proposal * @param proposalId proposal id * @returns vetoes number */ getVetoesNumber(proposalId: string | number): Promise<string>; /** * Get vetoes percentage for specific proposal * @param proposalId proposal id * @returns vetoes number */ getVetoesPercentage(proposalId: string | number): Promise<string>; }