CosmWasm / ts-codegen

Convert your CosmWasm smart contracts into dev-friendly TypeScript classes so you can focus on shipping code.
https://cosmology.zone/products/ts-codegen
Apache License 2.0
116 stars 28 forks source link

When query message name is the same as execute message name there are conflicts. #140

Closed Rcontre360 closed 6 months ago

Rcontre360 commented 6 months ago

When query message name is the same as execute message name there are conflicts. Example, create a contract where you have a query message and execute message with the same name. When the client is generated with this it will have typescript issues because the return values of an execution and a query are different.

pyramation commented 6 months ago

this is a known issue and there is a workaround, in the options you can set:

https://github.com/CosmWasm/ts-codegen/tree/main?tab=readme-ov-file#client-options

client.execExtendsQuery should be false