Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No query helpers generated for string queries #133

Open
Art3miX opened this issue Dec 20, 2023 · 2 comments
Open

No query helpers generated for string queries #133

Art3miX opened this issue Dec 20, 2023 · 2 comments

Comments

@Art3miX
Copy link

Art3miX commented Dec 20, 2023

If we have a query like this:

#[returns(Config)]
GetConfig,

The client will not generate a query helper for it, rather just ignore it (unless i missed an option for it)

Tho it will recognize it as a type in the types file:

export type QueryMsg = "get_admin" | "get_config" ...

But that doesn't help much, as the general query of the SigningCosmWasmClient function doesn't know those types, so its not really giving me any type checks.

  1. The preferred way for me:
    To generate a simple helpers for those queries as well, will make it a lot easier to use.

  2. Less preferred way
    Generate a general query message specific to the schema, this at least will give us some type checks as the general query function will accept the contract specific QueryMsg and not just any.
    Something like:

query = async (msg: QueryMsg): Promise<any> => {
    return this.client.queryContractSmart(this.contractAddress, msg);
  };
@elenamik
Copy link

This is impacting me as well :)

@NoahSaso
Copy link
Collaborator

bump!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants