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

queryMsg / Response reported missing #55

Open pyramation opened 2 years ago

dusterbloom commented 2 years ago

In the image below you can see what VSCode is pointing at. this is in the .client.ts file generated with v.0.10.0

image

pyramation commented 2 years ago

the proper steps to generate code when editing

  1. edit Rust
  2. update examples/schema.rs

if any Responses in msg.rs aren't properly exported in examples/schema.rs, the codegen will miss types.

great examples: https://github.com/public-awesome/launchpad/blob/main/contracts/whitelist/examples/schema.rs

https://github.com/public-awesome/launchpad/blob/main/contracts/vending-minter/examples/schema.rs

https://github.com/public-awesome/launchpad/blob/main/contracts/vending-factory/examples/schema.rs

https://github.com/public-awesome/launchpad/blob/main/contracts/sg721-base/examples/schema.rs