Open pyramation opened 2 years ago
from @grod220 (after closing #67 in favor of combining issues):
When you have a query type such as:
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(String)]
AllPreviousOwners(String),
The generated typescript will be missing the String argument required for this query:
allPreviousOwners = async (): Promise<String> => {
return this.client.queryContractSmart(this.contractAddress, {
all_previous_owners: {}
});
};
Reproducible example here: https://github.com/grod220/ts-codegen-example/blob/master/contracts/account-nft/src/msg/query.rs#L32-L33
Is this still an open issue? Timestamps in typescript work as a nanosecond int wrapped as a string. We're explicitly using Timestamp
instead of block time (time or height) to avoid potential confusion with block height. https://github.com/public-awesome/stargaze-tools/blob/main/scripts/minter.ts#L277
Here is the latest export for
ExecuteMsg
(in Typescript)I noticed that
update_start_time
is the only one that doesn't take an object. Every other message uses either an empty object or an object with props.Is there a convention? Or should we account for this in the cosmwasm-typescript-gen