import { EthApi } from "@joincivil/ethapi"; import { EthAddress, Param, BigNumber, ParamProposalState } from "@joincivil/typescript-types"; import { Observable } from "rxjs"; import { TwoStepEthTransaction } from "../../types"; import { BaseWrapper } from "../basewrapper"; import { GovernmentContract } from "../generated/wrappers/government"; import { Voting } from "./voting"; export declare const enum GovtParameters { requestAppealLen = "requestAppealLen", judgeAppealLen = "judgeAppealLen", appealFee = "appealFee", appealVotePercentage = "appealVotePercentage", govtPCommitStageLen = "govtPCommitStageLen", govtPRevealStageLen = "govtPRevealStageLen" } /** * The Government contract is where parameters related to appeals are stored and where * the controlling entities can update them and update the controlling entities as well */ export declare class Government extends BaseWrapper { static singleton(ethApi: EthApi, multisigAddress: EthAddress): Promise; static atUntrusted(web3wrapper: EthApi, address: EthAddress): Promise; private multisig; private constructor(); /** * Returns Voting instance associated with this Government */ getVoting(): Promise; /** * Get address for voting contract used with this Government */ getVotingAddress(): Promise; /** * Gets an unending stream of parameters being set */ getParameterSet(fromBlock?: number): Observable; getAppealFee(): Promise; /** * Gets the current value of the specified parameter * @param parameter key of parameter to check */ getParameterValue(parameter: string): Promise; /** * Set value of Government Parameter * @param paramName name of parameter you intend to change * @param newValue value you want parameter to be changed to */ set(paramName: GovtParameters | string, newValue: BigNumber): Promise>; processProposal(propID: string): Promise; /** * Get the URI of the Civil Constitution */ getConstitutionURI(): Promise; /** * Get the hash of the Civil Constitution */ getConstitutionHash(): Promise; getAppellate(): Promise; getController(): Promise; /** * An unending stream of the propIDs of all Reparametization proposals currently in * Challenge Commit Phase * @param fromBlock Starting block in history for events. Set to "latest" for only new events. * @returns currently active proposals in Challenge Commit Phase propIDs */ propIDsInCommitPhase(fromBlock?: number): Observable; /** * An unending stream of the propIDs of all Reparametization proposals currently in * Challenge Reveal Phase * @param fromBlock Starting block in history for events. Set to "latest" for only new events * @returns currently active proposals in Challenge Reveal Phase propIDs */ propIDsInRevealPhase(fromBlock?: number): Observable; /** * An unending stream of the propIDs of all Reparametization proposals that can be * processed right now. Includes unchallenged applications that have passed their application * expiry time, and proposals with challenges that can be resolved. * @param fromBlock Starting block in history for events. Set to "latest" for only new events * @returns propIDs for proposals that can be updated */ propIDsToProcess(fromBlock?: number): Observable; getPropState(propID: string): Promise; /** * Returns whether or not a Proposal is in the Challenge Commit Phase * @param propID ID of prop to check */ isPropInCommitPhase(propID: string): Promise; /** * Returns whether or not a Proposal is in the Challenge Reveal Phase * @param propID ID of prop to check */ isPropInRevealPhase(propID: string): Promise; /** * Returns whether or not a Proposal is in the Challenge Resolve Phase * @param propID ID of prop to check */ isPropInResolvePhase(propID: string): Promise; /** * Gets the current ChallengeID of the specified parameter * @param parameter key of parameter to check */ getChallengeID(parameter: string): Promise; /** * * @param propID id of proposal to check * @throws {CivilErrors.NoChallenge} */ getPropCommitExpiry(propID: string): Promise; /** * * @param propID id of proposal to check * @throws {CivilErrors.NoChallenge} */ getPropRevealExpiry(propID: string): Promise; /** * Returns the date by which a proposal must be processed. Successful proposals must * be processed within a certain timeframe, to avoid gaming the parameterizer. * @param propID ID of prop to check */ getPropProcessBy(propID: string): Promise; /** * Returns the name of the paramater associated with the given proposal * @param propID ID of prop to check */ getPropName(propID: string): Promise; /** * Returns the value proposed associated with the given proposal * @param propID ID of prop to check */ getPropValue(propID: string): Promise; }