1+ /**
2+ * This file was automatically generated by @cosmwasm/ts-codegen@latest.
3+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4+ * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
5+ */
6+
7+ import { Addr , Uint128 , Duration , Threshold , PercentageThreshold , Decimal , ConfigResponse , CheckedDepositInfo , ExecuteMsg , CosmosMsgForEmpty , BankMsg , StakingMsg , DistributionMsg , Binary , IbcMsg , Timestamp , Uint64 , WasmMsg , GovMsg , VoteOption , Vote , DepositToken , Coin , Empty , IbcTimeout , IbcTimeoutBlock , DepositInfo , GovernanceModulesResponse , InfoResponse , ContractVersion , InstantiateMsg , Expiration , Status , ListProposalsResponse , ProposalResponse , Proposal , Votes , ListVotesResponse , VoteInfo , MigrateMsg , ProposalCountResponse , ProposalHooksResponse , QueryMsg , ReverseProposalsResponse , VoteHooksResponse , VoteResponse } from "./CwSingle.types" ;
8+ import { CamelCasedProperties } from "type-fest" ;
9+ export abstract class CwSingleExecuteMsgBuilder {
10+ static propose = ( {
11+ description,
12+ msgs,
13+ title
14+ } : CamelCasedProperties < Extract < ExecuteMsg , {
15+ propose : unknown ;
16+ } > [ "propose" ] > ) : ExecuteMsg => {
17+ return {
18+ propose : ( {
19+ description,
20+ msgs,
21+ title
22+ } as const )
23+ } ;
24+ } ;
25+ static vote = ( {
26+ proposalId,
27+ vote
28+ } : CamelCasedProperties < Extract < ExecuteMsg , {
29+ vote : unknown ;
30+ } > [ "vote" ] > ) : ExecuteMsg => {
31+ return {
32+ vote : ( {
33+ proposal_id : proposalId ,
34+ vote
35+ } as const )
36+ } ;
37+ } ;
38+ static execute = ( {
39+ proposalId
40+ } : CamelCasedProperties < Extract < ExecuteMsg , {
41+ execute : unknown ;
42+ } > [ "execute" ] > ) : ExecuteMsg => {
43+ return {
44+ execute : ( {
45+ proposal_id : proposalId
46+ } as const )
47+ } ;
48+ } ;
49+ static close = ( {
50+ proposalId
51+ } : CamelCasedProperties < Extract < ExecuteMsg , {
52+ close : unknown ;
53+ } > [ "close" ] > ) : ExecuteMsg => {
54+ return {
55+ close : ( {
56+ proposal_id : proposalId
57+ } as const )
58+ } ;
59+ } ;
60+ static updateConfig = ( {
61+ allowRevoting,
62+ dao,
63+ depositInfo,
64+ maxVotingPeriod,
65+ minVotingPeriod,
66+ onlyMembersExecute,
67+ threshold
68+ } : CamelCasedProperties < Extract < ExecuteMsg , {
69+ update_config : unknown ;
70+ } > [ "update_config" ] > ) : ExecuteMsg => {
71+ return {
72+ update_config : ( {
73+ allow_revoting : allowRevoting ,
74+ dao,
75+ deposit_info : depositInfo ,
76+ max_voting_period : maxVotingPeriod ,
77+ min_voting_period : minVotingPeriod ,
78+ only_members_execute : onlyMembersExecute ,
79+ threshold
80+ } as const )
81+ } ;
82+ } ;
83+ static addProposalHook = ( {
84+ address
85+ } : CamelCasedProperties < Extract < ExecuteMsg , {
86+ add_proposal_hook : unknown ;
87+ } > [ "add_proposal_hook" ] > ) : ExecuteMsg => {
88+ return {
89+ add_proposal_hook : ( {
90+ address
91+ } as const )
92+ } ;
93+ } ;
94+ static removeProposalHook = ( {
95+ address
96+ } : CamelCasedProperties < Extract < ExecuteMsg , {
97+ remove_proposal_hook : unknown ;
98+ } > [ "remove_proposal_hook" ] > ) : ExecuteMsg => {
99+ return {
100+ remove_proposal_hook : ( {
101+ address
102+ } as const )
103+ } ;
104+ } ;
105+ static addVoteHook = ( {
106+ address
107+ } : CamelCasedProperties < Extract < ExecuteMsg , {
108+ add_vote_hook : unknown ;
109+ } > [ "add_vote_hook" ] > ) : ExecuteMsg => {
110+ return {
111+ add_vote_hook : ( {
112+ address
113+ } as const )
114+ } ;
115+ } ;
116+ static removeVoteHook = ( {
117+ address
118+ } : CamelCasedProperties < Extract < ExecuteMsg , {
119+ remove_vote_hook : unknown ;
120+ } > [ "remove_vote_hook" ] > ) : ExecuteMsg => {
121+ return {
122+ remove_vote_hook : ( {
123+ address
124+ } as const )
125+ } ;
126+ } ;
127+ }
128+ export abstract class CwSingleQueryMsgBuilder {
129+ static config = ( ) : QueryMsg => {
130+ return {
131+ config : ( { } as const )
132+ } ;
133+ } ;
134+ static proposal = ( {
135+ proposalId
136+ } : CamelCasedProperties < Extract < QueryMsg , {
137+ proposal : unknown ;
138+ } > [ "proposal" ] > ) : QueryMsg => {
139+ return {
140+ proposal : ( {
141+ proposal_id : proposalId
142+ } as const )
143+ } ;
144+ } ;
145+ static listProposals = ( {
146+ limit,
147+ startAfter
148+ } : CamelCasedProperties < Extract < QueryMsg , {
149+ list_proposals : unknown ;
150+ } > [ "list_proposals" ] > ) : QueryMsg => {
151+ return {
152+ list_proposals : ( {
153+ limit,
154+ start_after : startAfter
155+ } as const )
156+ } ;
157+ } ;
158+ static reverseProposals = ( {
159+ limit,
160+ startBefore
161+ } : CamelCasedProperties < Extract < QueryMsg , {
162+ reverse_proposals : unknown ;
163+ } > [ "reverse_proposals" ] > ) : QueryMsg => {
164+ return {
165+ reverse_proposals : ( {
166+ limit,
167+ start_before : startBefore
168+ } as const )
169+ } ;
170+ } ;
171+ static proposalCount = ( ) : QueryMsg => {
172+ return {
173+ proposal_count : ( { } as const )
174+ } ;
175+ } ;
176+ static vote = ( {
177+ proposalId,
178+ voter
179+ } : CamelCasedProperties < Extract < QueryMsg , {
180+ vote : unknown ;
181+ } > [ "vote" ] > ) : QueryMsg => {
182+ return {
183+ vote : ( {
184+ proposal_id : proposalId ,
185+ voter
186+ } as const )
187+ } ;
188+ } ;
189+ static listVotes = ( {
190+ limit,
191+ proposalId,
192+ startAfter
193+ } : CamelCasedProperties < Extract < QueryMsg , {
194+ list_votes : unknown ;
195+ } > [ "list_votes" ] > ) : QueryMsg => {
196+ return {
197+ list_votes : ( {
198+ limit,
199+ proposal_id : proposalId ,
200+ start_after : startAfter
201+ } as const )
202+ } ;
203+ } ;
204+ static proposalHooks = ( ) : QueryMsg => {
205+ return {
206+ proposal_hooks : ( { } as const )
207+ } ;
208+ } ;
209+ static voteHooks = ( ) : QueryMsg => {
210+ return {
211+ vote_hooks : ( { } as const )
212+ } ;
213+ } ;
214+ static info = ( ) : QueryMsg => {
215+ return {
216+ info : ( { } as const )
217+ } ;
218+ } ;
219+ }
0 commit comments