Skip to content

Commit 1a2639f

Browse files
authored
Merge pull request #110 from adairrr/underscoreFunds
Update client and message composer to underscore funds to avoid conflicts
2 parents 90fb688 + a9d3a03 commit 1a2639f

File tree

87 files changed

+2121
-2236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2121
-2236
lines changed

__fixtures__/issues/98/out/98.client.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export interface 98Interface extends 98ReadOnlyInterface {
7575
}: {
7676
id: number;
7777
instantiateMsg: Binary;
78-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
78+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
7979
registerPlugin: ({
8080
checksum,
8181
codeId,
@@ -90,12 +90,12 @@ export interface 98Interface extends 98ReadOnlyInterface {
9090
ipfsHash: string;
9191
name: string;
9292
version: string;
93-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
93+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
9494
unregisterPlugin: ({
9595
id
9696
}: {
9797
id: number;
98-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
98+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
9999
updatePlugin: ({
100100
checksum,
101101
codeId,
@@ -112,17 +112,17 @@ export interface 98Interface extends 98ReadOnlyInterface {
112112
ipfsHash?: string;
113113
name?: string;
114114
version?: string;
115-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
115+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
116116
updateRegistryFee: ({
117117
newFee
118118
}: {
119119
newFee: Coin;
120-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
120+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
121121
updateDaoAddr: ({
122122
newAddr
123123
}: {
124124
newAddr: string;
125-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
125+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
126126
}
127127
export class 98Client extends 98QueryClient implements 98Interface {
128128
client: SigningCosmWasmClient;
@@ -148,13 +148,13 @@ export class 98Client extends 98QueryClient implements 98Interface {
148148
}: {
149149
id: number;
150150
instantiateMsg: Binary;
151-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
151+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
152152
return await this.client.execute(this.sender, this.contractAddress, {
153153
proxy_install_plugin: {
154154
id,
155155
instantiate_msg: instantiateMsg
156156
}
157-
}, fee, memo, funds);
157+
}, fee, memo, _funds);
158158
};
159159
registerPlugin = async ({
160160
checksum,
@@ -170,7 +170,7 @@ export class 98Client extends 98QueryClient implements 98Interface {
170170
ipfsHash: string;
171171
name: string;
172172
version: string;
173-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
173+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
174174
return await this.client.execute(this.sender, this.contractAddress, {
175175
register_plugin: {
176176
checksum,
@@ -180,18 +180,18 @@ export class 98Client extends 98QueryClient implements 98Interface {
180180
name,
181181
version
182182
}
183-
}, fee, memo, funds);
183+
}, fee, memo, _funds);
184184
};
185185
unregisterPlugin = async ({
186186
id
187187
}: {
188188
id: number;
189-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
189+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
190190
return await this.client.execute(this.sender, this.contractAddress, {
191191
unregister_plugin: {
192192
id
193193
}
194-
}, fee, memo, funds);
194+
}, fee, memo, _funds);
195195
};
196196
updatePlugin = async ({
197197
checksum,
@@ -209,7 +209,7 @@ export class 98Client extends 98QueryClient implements 98Interface {
209209
ipfsHash?: string;
210210
name?: string;
211211
version?: string;
212-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
212+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
213213
return await this.client.execute(this.sender, this.contractAddress, {
214214
update_plugin: {
215215
checksum,
@@ -220,28 +220,28 @@ export class 98Client extends 98QueryClient implements 98Interface {
220220
name,
221221
version
222222
}
223-
}, fee, memo, funds);
223+
}, fee, memo, _funds);
224224
};
225225
updateRegistryFee = async ({
226226
newFee
227227
}: {
228228
newFee: Coin;
229-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
229+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
230230
return await this.client.execute(this.sender, this.contractAddress, {
231231
update_registry_fee: {
232232
new_fee: newFee
233233
}
234-
}, fee, memo, funds);
234+
}, fee, memo, _funds);
235235
};
236236
updateDaoAddr = async ({
237237
newAddr
238238
}: {
239239
newAddr: string;
240-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
240+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
241241
return await this.client.execute(this.sender, this.contractAddress, {
242242
update_dao_addr: {
243243
new_addr: newAddr
244244
}
245-
}, fee, memo, funds);
245+
}, fee, memo, _funds);
246246
};
247247
}

__output__/builder/bundler_test/contracts/CwAdminFactory.client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface CwAdminFactoryInterface {
3131
codeId: number;
3232
instantiateMsg: Binary;
3333
label: string;
34-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
34+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
3535
}
3636
export class CwAdminFactoryClient implements CwAdminFactoryInterface {
3737
client: SigningCosmWasmClient;
@@ -53,13 +53,13 @@ export class CwAdminFactoryClient implements CwAdminFactoryInterface {
5353
codeId: number;
5454
instantiateMsg: Binary;
5555
label: string;
56-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
56+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
5757
return await this.client.execute(this.sender, this.contractAddress, {
5858
instantiate_contract_with_self_admin: {
5959
code_id: codeId,
6060
instantiate_msg: instantiateMsg,
6161
label
6262
}
63-
}, fee, memo, funds);
63+
}, fee, memo, _funds);
6464
};
6565
}

__output__/builder/bundler_test/contracts/CwAdminFactory.message-composer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface CwAdminFactoryMessage {
2020
codeId: number;
2121
instantiateMsg: Binary;
2222
label: string;
23-
}, funds?: Coin[]) => MsgExecuteContractEncodeObject;
23+
}, _funds?: Coin[]) => MsgExecuteContractEncodeObject;
2424
}
2525
export class CwAdminFactoryMessageComposer implements CwAdminFactoryMessage {
2626
sender: string;
@@ -40,7 +40,7 @@ export class CwAdminFactoryMessageComposer implements CwAdminFactoryMessage {
4040
codeId: number;
4141
instantiateMsg: Binary;
4242
label: string;
43-
}, funds?: Coin[]): MsgExecuteContractEncodeObject => {
43+
}, _funds?: Coin[]): MsgExecuteContractEncodeObject => {
4444
return {
4545
typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract",
4646
value: MsgExecuteContract.fromPartial({
@@ -53,7 +53,7 @@ export class CwAdminFactoryMessageComposer implements CwAdminFactoryMessage {
5353
label
5454
}
5555
})),
56-
funds
56+
funds: _funds
5757
})
5858
};
5959
};

__output__/builder/bundler_test/contracts/CwCodeIdRegistry.client.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export interface CwCodeIdRegistryInterface {
109109
amount: Uint128;
110110
msg: Binary;
111111
sender: string;
112-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
112+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
113113
register: ({
114114
chainId,
115115
checksum,
@@ -122,7 +122,7 @@ export interface CwCodeIdRegistryInterface {
122122
codeId: number;
123123
name: string;
124124
version: string;
125-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
125+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
126126
setOwner: ({
127127
chainId,
128128
name,
@@ -131,21 +131,21 @@ export interface CwCodeIdRegistryInterface {
131131
chainId: string;
132132
name: string;
133133
owner?: string;
134-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
134+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
135135
unregister: ({
136136
chainId,
137137
codeId
138138
}: {
139139
chainId: string;
140140
codeId: number;
141-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
141+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
142142
updateConfig: ({
143143
admin,
144144
paymentInfo
145145
}: {
146146
admin?: string;
147147
paymentInfo?: PaymentInfo;
148-
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
148+
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
149149
}
150150
export class CwCodeIdRegistryClient implements CwCodeIdRegistryInterface {
151151
client: SigningCosmWasmClient;
@@ -171,14 +171,14 @@ export class CwCodeIdRegistryClient implements CwCodeIdRegistryInterface {
171171
amount: Uint128;
172172
msg: Binary;
173173
sender: string;
174-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
174+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
175175
return await this.client.execute(this.sender, this.contractAddress, {
176176
receive: {
177177
amount,
178178
msg,
179179
sender
180180
}
181-
}, fee, memo, funds);
181+
}, fee, memo, _funds);
182182
};
183183
register = async ({
184184
chainId,
@@ -192,7 +192,7 @@ export class CwCodeIdRegistryClient implements CwCodeIdRegistryInterface {
192192
codeId: number;
193193
name: string;
194194
version: string;
195-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
195+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
196196
return await this.client.execute(this.sender, this.contractAddress, {
197197
register: {
198198
chain_id: chainId,
@@ -201,7 +201,7 @@ export class CwCodeIdRegistryClient implements CwCodeIdRegistryInterface {
201201
name,
202202
version
203203
}
204-
}, fee, memo, funds);
204+
}, fee, memo, _funds);
205205
};
206206
setOwner = async ({
207207
chainId,
@@ -211,41 +211,41 @@ export class CwCodeIdRegistryClient implements CwCodeIdRegistryInterface {
211211
chainId: string;
212212
name: string;
213213
owner?: string;
214-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
214+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
215215
return await this.client.execute(this.sender, this.contractAddress, {
216216
set_owner: {
217217
chain_id: chainId,
218218
name,
219219
owner
220220
}
221-
}, fee, memo, funds);
221+
}, fee, memo, _funds);
222222
};
223223
unregister = async ({
224224
chainId,
225225
codeId
226226
}: {
227227
chainId: string;
228228
codeId: number;
229-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
229+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
230230
return await this.client.execute(this.sender, this.contractAddress, {
231231
unregister: {
232232
chain_id: chainId,
233233
code_id: codeId
234234
}
235-
}, fee, memo, funds);
235+
}, fee, memo, _funds);
236236
};
237237
updateConfig = async ({
238238
admin,
239239
paymentInfo
240240
}: {
241241
admin?: string;
242242
paymentInfo?: PaymentInfo;
243-
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
243+
}, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
244244
return await this.client.execute(this.sender, this.contractAddress, {
245245
update_config: {
246246
admin,
247247
payment_info: paymentInfo
248248
}
249-
}, fee, memo, funds);
249+
}, fee, memo, _funds);
250250
};
251251
}

0 commit comments

Comments
 (0)