/** * 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 Threshold = | { absolute_percentage: { percentage: PercentageThreshold } } | { threshold_quorum: { quorum: PercentageThreshold threshold: PercentageThreshold } } | { absolute_count: { threshold: Uint128 } } 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 threshold: Threshold veto?: VetoConfig | null /** * v2.7.0+ */ delegation_module?: string | null } export interface ModuleInstantiateInfo { admin?: Admin | null code_id: number 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: SingleChoiceProposeMsg } | { vote: { proposal_id: number rationale?: string | null vote: Vote } } | { update_rationale: { proposal_id: number rationale?: string | null } } | { 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 threshold: Threshold veto?: VetoConfig | 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 type WasmMsg = | { execute: { contract_addr: string funds: Coin[] msg: Binary } } | { instantiate: { admin?: string | null code_id: number funds: Coin[] label: string msg: Binary } } | { migrate: { contract_addr: string msg: Binary new_code_id: number } } | { update_admin: { admin: string contract_addr: string } } | { clear_admin: { contract_addr: string } } export type Vote = 'yes' | 'no' | 'abstain' export interface SingleChoiceProposeMsg { description: string msgs: UnifiedCosmosMsg[] proposer?: string | null title: string vote?: SingleChoiceAutoVote | null } export interface Empty {} export interface SingleChoiceAutoVote { rationale?: string | null vote: Vote } 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 threshold: Threshold veto?: VetoConfig | null } export interface VoteResponse { vote?: VoteInfo | null } export interface VoteInfo { power: Uint128 /** * v2.7.0+ */ individual_power?: Uint128 rationale?: string | null vote: Vote voter: Addr // Indexer may return these. votedAt?: string } export interface InfoResponse { info: ContractVersion } export interface ContractVersion { contract: string version: string } 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: SingleChoiceProposal // Indexer may return these. hideFromSearch?: boolean dao?: string daoProposalId?: string proposalModule?: ProposalModuleWithInfo createdAt?: string completedAt?: string executedAt?: string closedAt?: string } export interface SingleChoiceProposal { allow_revoting: boolean description: string expiration: Expiration min_voting_period?: Expiration | null msgs: UnifiedCosmosMsg[] proposer: Addr start_height: number status: Status threshold: Threshold title: string total_power: Uint128 veto?: VetoConfig | null votes: Votes /** * v2.7.0+ */ individual_votes: Votes } export interface Votes { abstain: Uint128 no: Uint128 yes: 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[] }