UNPKG

@ardier16/q-js-sdk

Version:

Typescript Library to interact with Q System Contracts

36 lines 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseVotingVetoableInstance = void 0; const BaseVotingInstance_1 = require("./BaseVotingInstance"); /** * Vetoable interface to interact with Vetoable implementation contracts. * See [onchain documentation](@system-contracts-repo/@network/IVetoable/) for more details. */ class BaseVotingVetoableInstance extends BaseVotingInstance_1.BaseVotingInstance { /** * Veto specific proposal * @param proposalId proposal id * @param txOptions transaction options * @returns transaction receipt */ async veto(proposalId, txOptions) { return this.submitTransaction(this.instance.methods.veto(proposalId), txOptions); } /** * Get vetoes number for specific proposal * @param proposalId proposal id * @returns vetoes number */ async getVetoesNumber(proposalId) { return this.instance.methods.getVetosNumber(proposalId).call(); } /** * Get vetoes percentage for specific proposal * @param proposalId proposal id * @returns vetoes number */ async getVetoesPercentage(proposalId) { return this.instance.methods.getVetosPercentage(proposalId).call(); } } exports.BaseVotingVetoableInstance = BaseVotingVetoableInstance; //# sourceMappingURL=BaseVotingVetoableInstance.js.map