/** * This file was automatically generated by @cosmwasm/ts-codegen@1.10.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ import { UnifiedCosmosMsg } from './common' import { ProposalModuleWithInfo } from './DaoDaoCore' export type Duration = | { height: number } | { time: number } export type PreProposeInfo = | { anyone_may_propose: {} } | { module_may_propose: { info: ModuleInstantiateInfo } } export type Admin = | { address: { addr: string } } | { core_module: {} } export type Uint128 = string export type Binary = string export type VotingStrategy = { single_choice: { quorum: PercentageThreshold } } export type PercentageThreshold = | { majority: {} } | { percent: Decimal } export type Decimal = string export interface InstantiateMsg { allow_revoting: boolean close_proposal_on_execution_failure: boolean max_voting_period: Duration min_voting_period?: Duration | null only_members_execute: boolean pre_propose_info: PreProposeInfo veto?: VetoConfig | null voting_strategy: VotingStrategy /** * v2.7.0+ */ delegation_module?: string | null } export interface ModuleInstantiateInfo { admin?: Admin | null code_id: number // added in v2.3.0 funds?: Coin[] label: string msg: Binary } export interface Coin { amount: Uint128 denom: string } export interface VetoConfig { early_execute: boolean timelock_duration: Duration veto_before_passed: boolean vetoer: string } export type ExecuteMsg = | { propose: MultipleChoiceProposeMsg } | { vote: { proposal_id: number rationale?: string | null vote: MultipleChoiceVote } } | { execute: { proposal_id: number } } | { veto: { proposal_id: number } } | { close: { proposal_id: number } } | { update_config: { allow_revoting: boolean close_proposal_on_execution_failure: boolean dao: string max_voting_period: Duration min_voting_period?: Duration | null only_members_execute: boolean veto?: VetoConfig | null voting_strategy: VotingStrategy } } | { update_rationale: { proposal_id: number rationale?: string | null } } | { update_pre_propose_info: { info: PreProposeInfo } } | { add_proposal_hook: { address: string } } | { remove_proposal_hook: { address: string } } | { add_vote_hook: { address: string } } | { remove_vote_hook: { address: string } } export type Timestamp = Uint64 export type Uint64 = string export interface MultipleChoiceProposeMsg { choices: MultipleChoiceOptions description: string proposer?: string | null title: string vote?: MultipleChoiceAutoVote | null } export interface MultipleChoiceOptions { options: MultipleChoiceOption[] } export interface MultipleChoiceOption { description: string msgs: UnifiedCosmosMsg[] title: string } export interface Empty {} export interface MultipleChoiceAutoVote { rationale?: string | null vote: MultipleChoiceVote } export interface MultipleChoiceVote { option_id: number } export type QueryMsg = | { config: {} } | { delegation_module: {} } | { proposal: { proposal_id: number } } | { list_proposals: { limit?: number | null start_after?: number | null } } | { reverse_proposals: { limit?: number | null start_before?: number | null } } | { get_vote: { proposal_id: number voter: string } } | { list_votes: { limit?: number | null proposal_id: number start_after?: string | null } } | { proposal_count: {} } | { proposal_creation_policy: {} } | { proposal_hooks: {} } | { vote_hooks: {} } | { dao: {} } | { info: {} } | { next_proposal_id: {} } export type MigrateMsg = | { from_v1: { close_proposal_on_execution_failure: boolean pre_propose_info: PreProposeInfo veto?: VetoConfig | null } } | { from_compatible: {} } export type Addr = string export interface Config { allow_revoting: boolean close_proposal_on_execution_failure: boolean dao: Addr max_voting_period: Duration min_voting_period?: Duration | null only_members_execute: boolean veto?: VetoConfig | null voting_strategy: VotingStrategy } export interface VoteResponse { vote?: VoteInfo | null } export interface VoteInfo { power: Uint128 /** * v2.7.0+ */ individual_power?: Uint128 rationale?: string | null vote: MultipleChoiceVote voter: Addr // Indexer may return these. votedAt?: string } export interface InfoResponse { info: ContractVersion } export interface ContractVersion { contract: string version: string } export type MultipleChoiceOptionType = 'standard' | 'none' export type Expiration = | { at_height: number } | { at_time: Timestamp } | { never: {} } export type Status = | 'open' | 'rejected' | 'passed' | 'executed' | 'closed' | 'execution_failed' | { veto_timelock: { expiration: Expiration } } | 'vetoed' export interface ProposalListResponse { proposals: ProposalResponse[] } export interface ProposalResponse { id: number proposal: MultipleChoiceProposal // Indexer may return these. hideFromSearch?: boolean dao?: string daoProposalId?: string proposalModule?: ProposalModuleWithInfo createdAt?: string completedAt?: string executedAt?: string closedAt?: string } export interface MultipleChoiceProposal { allow_revoting: boolean choices: CheckedMultipleChoiceOption[] description: string expiration: Expiration min_voting_period?: Expiration | null proposer: Addr start_height: number status: Status title: string total_power: Uint128 veto?: VetoConfig | null votes: MultipleChoiceVotes /** * v2.7.0+ */ individual_votes: MultipleChoiceVotes voting_strategy: VotingStrategy } export interface CheckedMultipleChoiceOption { description: string index: number msgs: UnifiedCosmosMsg[] option_type: MultipleChoiceOptionType title: string vote_count: Uint128 } export interface MultipleChoiceVotes { vote_weights: Uint128[] } export interface VoteListResponse { votes: VoteInfo[] } export type ProposalCreationPolicy = // v2-beta | { Anyone: {} } | { Module: { addr: Addr } } // v2 | { anyone: {} } | { module: { addr: Addr } } export interface HooksResponse { hooks: string[] }