Skip to content

Commit

Permalink
Deprecate logs fields but set them as before
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Feb 28, 2024
1 parent 57d6703 commit 9ff5725
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/cosmwasm-stargate/src/signingcosmwasmclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface UploadResult {
readonly compressedSize: number;
/** The ID of the code asigned by the chain */
readonly codeId: number;
/** @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;
Expand Down Expand Up @@ -107,6 +108,7 @@ export interface InstantiateOptions {
export interface InstantiateResult {
/** The address of the newly instantiated contract */
readonly contractAddress: string;
/** @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;
Expand All @@ -121,6 +123,7 @@ export interface InstantiateResult {
* Result type of updateAdmin and clearAdmin
*/
export interface ChangeAdminResult {
/** @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;
Expand All @@ -132,6 +135,7 @@ export interface ChangeAdminResult {
}

export interface MigrateResult {
/** @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;
Expand All @@ -149,6 +153,7 @@ export interface ExecuteInstruction {
}

export interface ExecuteResult {
/** @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;
Expand Down Expand Up @@ -313,7 +318,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
originalSize: wasmCode.length,
compressedSize: compressed.length,
codeId: Number.parseInt(codeIdAttr.value, 10),
logs: [],
logs: logs.parseRawLog(result.rawLog),
height: result.height,
transactionHash: result.transactionHash,
events: result.events,
Expand Down Expand Up @@ -348,7 +353,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
const contractAddressAttr = findAttribute(result.events, "instantiate", "_contract_address");
return {
contractAddress: contractAddressAttr.value,
logs: [],
logs: logs.parseRawLog(result.rawLog),
height: result.height,
transactionHash: result.transactionHash,
events: result.events,
Expand Down Expand Up @@ -386,7 +391,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
const contractAddressAttr = findAttribute(result.events, "instantiate", "_contract_address");
return {
contractAddress: contractAddressAttr.value,
logs: [],
logs: logs.parseRawLog(result.rawLog),
height: result.height,
transactionHash: result.transactionHash,
events: result.events,
Expand Down

0 comments on commit 9ff5725

Please sign in to comment.