cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
https://cosmos.github.io/cosmjs/
Apache License 2.0
655 stars 344 forks source link

Adapt codebase to work with wasmd 0.50 (Cosmos SDK 0.50) #1564

Closed webmaster128 closed 8 months ago

webmaster128 commented 9 months ago

Closes #1562

pynixwang commented 9 months ago

can we move common field in to common interface

interface TransactionResult {
  /** @deprecated Not filled in Cosmos SDK >= 0.50. Use events instead. */
  readonly logs: readonly logs.Log[];
  /** Block height in which the transaction is included */
  readonly height: number;
  /** Transaction hash (might be used as transaction ID). Guaranteed to be non-empty upper-case hex */
  readonly transactionHash: string;
  readonly events: readonly Event[];
  readonly gasWanted: bigint;
  readonly gasUsed: bigint;
}

do not repeat on every interface such as upload, execute, change admin.

webmaster128 commented 8 months ago

can we move common field in to common interface

Why do you think this is needed? Could you open a separate issue for that?

webmaster128 commented 8 months ago

I'm merging this work now and do a patch release. This should provide some basic Cosmos SDK 0.50 support for CosmWasm. However, it looks like Amino JSON is broken for many cases with Cosmos SDK 0.50, including CosmWasm message types. But this is the case for all 0.32.x releases.