UNPKG

@q-dev/gdk-sdk

Version:

Typescript Library to interact with GDK Contracts

63 lines (62 loc) 3.87 kB
import { BigNumberish, ContractTransaction, providers, Signer } from "ethers"; import { SystemContractInstance } from "../SystemContractInstance"; import { TxOptions, VotingSituationInfo } from "../../types"; import { ExtendedDAOVoting, ExtendedVotingStatsStructOutput, IDAOVoting } from "../../ethers-contracts/ExtendedDAOVoting"; export declare class DAOVotingInstance extends SystemContractInstance<ExtendedDAOVoting> { constructor(signer: Signer | providers.Provider, address: string); createProposal(situation: string, remark: string, callData: string, txOptions?: TxOptions): Promise<ContractTransaction>; voteFor(proposalId: BigNumberish, txOptions?: TxOptions): Promise<ContractTransaction>; voteAgainst(proposalId: BigNumberish, txOptions?: TxOptions): Promise<ContractTransaction>; /** * Note: This method will throw an error if invoked on data from an older contract version, * prior to the introduction of external link support. */ voteByExpertFor(proposalId: BigNumberish, txOptions?: TxOptions): Promise<ContractTransaction>; /** * Note: This method will throw an error if invoked on data from an older contract version, * prior to the introduction of external link support. */ voteByExpertAgainst(proposalId: BigNumberish, txOptions?: TxOptions): Promise<ContractTransaction>; /** * Note: This method will throw an error if invoked on data from an older contract version, * prior to the introduction of external link support. */ appealByUser(proposalId: BigNumberish, txOptions?: TxOptions): Promise<ContractTransaction>; veto(proposalId: BigNumberish, txOptions?: TxOptions): Promise<ContractTransaction>; executeProposal(proposalId: BigNumberish, txOptions?: TxOptions): Promise<ContractTransaction>; executeProposalWithSignature(proposalId: BigNumberish, signature: string, txOptions?: TxOptions): Promise<ContractTransaction>; getProposalStatus(proposalId: BigNumberish): Promise<number>; getProposalList(offset: BigNumberish, limit: BigNumberish): Promise<IDAOVoting.DAOProposalStructOutput[]>; getProposal(proposalId: BigNumberish): Promise<IDAOVoting.DAOProposalStructOutput>; getProposalVotingStats(proposalId: BigNumberish): Promise<IDAOVoting.VotingStatsStructOutput>; /** * Note: This method will throw an error if invoked on data from an older contract version, * prior to the introduction of external link support. */ getExtendedVotingStats(proposalId: BigNumberish): Promise<ExtendedVotingStatsStructOutput>; /** * Note: This method will throw an error if invoked on data from an older contract version, * prior to the introduction of external link support. */ isAppealConfigured(proposalId: BigNumberish): Promise<boolean>; /** * Note: This method will throw an error if invoked on data from an older contract version, * prior to the introduction of external link support. */ isVoteByExpertConfigured(proposalId: BigNumberish): Promise<boolean>; getVotingSituations(): Promise<VotingSituationInfo[]>; getBasicVotingSituationInfo(situationName: string): Promise<IDAOVoting.DAOVotingValuesStructOutput>; /** * Note: This method will throw an error if invoked on data from an older contract version, * prior to the introduction of external link support. */ proposalSituationLink(proposalId: BigNumberish): Promise<string>; /** * Retrieves a list of situation links for proposals. * This method is closely aligned with the getProposalList method. * * Note: This method will throw an error if invoked on data from an older contract version, * prior to the introduction of external link support. */ getProposalSituationLinkList(offset: BigNumberish, limit: BigNumberish): Promise<string[]>; }