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

question: update_start_time message #305

Open
pyramation opened this issue Jun 16, 2022 · 0 comments
Open

question: update_start_time message #305

pyramation opened this issue Jun 16, 2022 · 0 comments

Comments

@pyramation
Copy link
Contributor

Here is the latest export for ExecuteMsg (in Typescript)

export type ExecuteMsg = {
  mint: {
    [k: string]: unknown;
  };
} | {
  set_whitelist: {
    whitelist: string;
    [k: string]: unknown;
  };
} | {
  update_start_time: Timestamp;
} | {
  update_per_address_limit: {
    per_address_limit: number;
    [k: string]: unknown;
  };
} | {
  mint_to: {
    recipient: string;
    [k: string]: unknown;
  };
} | {
  mint_for: {
    recipient: string;
    token_id: number;
    [k: string]: unknown;
  };
} | {
  withdraw: {
    [k: string]: unknown;
  };
};

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.

update_start_time: Timestamp

The generated code as a result would be

updateStartTime = async (fee: number | StdFee | "auto" = "auto", memo?: string, funds?: readonly Coin[]): Promise<ExecuteResult> => {
    return await this.client.execute(this.sender, this.contractAddress, {
      update_start_time: {}
    }, fee, memo, funds);
  };

@JakeHartnell I'm curious if this is a convention to use objects or should we account for this in the cosmwasm-typescript-gen and allow scalar values?

Seems that this is likely an issue in the transpiler and I'll be tracking it here CosmWasm/ts-codegen#21

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

1 participant