@q-dev/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
51 lines (50 loc) • 2.49 kB
TypeScript
import type { ContractTransaction } from 'ethers';
import { BaseProposal, QNonPayableTx, SignerOrProvider } from '../../types';
import { GeneralUpdateVoting } from '../../ethers-contracts/GeneralUpdateVoting';
import { SystemVotingVetoableInstance } from '../SystemVotingVetoableInstance';
import { VotingWeightProxyInstance } from './VotingWeightProxyInstance';
export interface GeneralProposal {
base: BaseProposal;
}
/**
* General update voting instance to interact with General update voting contract.
* See [onchain documentation](@system-contracts-repo/@network/GeneralUpdateVoting/) for more details.
* An instance of this class for a deployed network can be obtained via {@link ContractRegistryInstance.generalUpdateVoting}
*/
export declare class GeneralUpdateVotingInstance extends SystemVotingVetoableInstance<GeneralUpdateVoting, GeneralProposal> {
static readonly registryKey = "governance.generalUpdateVoting";
static readonly abi = "GeneralUpdateVoting.json";
/**
* VotingWeightProxy instance. Used by local methods.
*/
votingWeightProxy: VotingWeightProxyInstance;
constructor(signerOrProvider: SignerOrProvider, address: string);
/**
* [External documentation](@system-contracts-repo/@network/GeneralUpdateVoting/#proposalcount)
*/
proposalCount(): Promise<string>;
/**
* [External documentation](@system-contracts-repo/@network/GeneralUpdateVoting/#hasrootvetoed)
*/
hasRootVetoed(proposalId: number | string, address: string): Promise<boolean>;
/**
* [External documentation](@system-contracts-repo/@network/GeneralUpdateVoting/#hasuservoted)
*/
hasUserVoted(proposalId: string | number, address: string): Promise<boolean>;
/**
* [External documentation](@system-contracts-repo/@network/GeneralUpdateVoting/#createproposal)
*/
createProposal(remark: string, txOptions?: QNonPayableTx): Promise<ContractTransaction>;
/**
* [External documentation](@system-contracts-repo/@network/GeneralUpdateVoting/#getvotesfor)
*/
getVotesFor(proposalId: number | string): Promise<string>;
/**
* [External documentation](@system-contracts-repo/@network/GeneralUpdateVoting/#getvotesagainst)
*/
getVotesAgainst(proposalId: number | string): Promise<string>;
/**
* [External documentation](@system-contracts-repo/@network/GeneralUpdateVoting/#proposals)
*/
getProposal(proposalId: string | number): Promise<GeneralProposal>;
}