@ardier16/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
73 lines (72 loc) • 3.78 kB
TypeScript
import Web3 from 'web3';
import { TransactionReceipt } from 'web3-eth';
import { RootNodesSlashingVoting } from '../../../web3-contracts/RootNodesSlashingVoting';
import { SlashingProposal } from '../../SlashingVotingHelperInstance';
import { QNonPayableTx } from '../../../types';
import { VotingWeightInfo } from '../../QthVotingHelperInstance';
import { SystemVotingVetoableInstance } from '../../SystemVotingVetoableInstance';
import { VotingWeightProxyInstance } from '../VotingWeightProxyInstance';
/**
* Root nodes Slashing voting instance to interact with Root nodes Slashing voting contract.
* See [onchain documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/) for more details.
* An instance of this class for a deployed network can be obtained via {@link ContractRegistryInstance.rootNodesSlashingVoting}
*/
export declare class RootNodesSlashingVotingInstance extends SystemVotingVetoableInstance<RootNodesSlashingVoting, SlashingProposal> {
static readonly registryKey = "governance.rootNodes.slashingVoting";
static readonly abi = "RootNodesSlashingVoting.json";
/**
* VotingWeightProxy instance. Used by local methods.
*/
votingWeightProxy: VotingWeightProxyInstance;
private qthVotingHelper;
private slashingVoting;
constructor(web3: Web3, address: string);
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#getproposal)
*/
getProposal(proposalId: string | number): Promise<SlashingProposal>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#hasrootvetoed)
*/
hasRootVetoed(proposalId: string | number, address: string): Promise<boolean>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#hasuservoted)
*/
hasUserVoted(proposalId: string | number, address: string): Promise<boolean>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#proposalcount)
*/
proposalCount(): Promise<string>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#createproposal)
*/
createProposal(remark: string, candidate: string, percentage: string, txOptions?: QNonPayableTx): Promise<TransactionReceipt>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#slashingaffectswithdrawal)
*/
slashingAffectsWithdrawal(proposalId: string | number): Promise<boolean>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#getproposalstarttime)
*/
getProposalStartTime(proposalId: string | number): Promise<string>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#isoverruleapplied)
*/
isOverruleApplied(proposalId: number | string): Promise<boolean>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#skipvetophase)
*/
skipVetoPhase(proposalId: number | string, txOptions?: QNonPayableTx): Promise<TransactionReceipt>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#getslashingvictim)
*/
getSlashingVictim(proposalId: string | number): Promise<string>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#getslashingproposer)
*/
getSlashingProposer(proposalId: string | number): Promise<string>;
/**
* [External documentation](@system-contracts-repo/@network/RootNodesSlashingVoting/#getvotingweightinfo)
*/
getVotingWeightInfo(proposalId: string | number, address: string): Promise<VotingWeightInfo>;
}