Skip to content

Commit

Permalink
Add events to SigningCosmWasmClient's methods
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Oct 24, 2022
1 parent 5242771 commit c51fb21
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,8 @@ and this project adheres to
replacement charater instead of throwing.
- @cosmjs/stargate: Add structured `Events`s to `IndexTx.events` and
`DeliverTxResponse.events`.
- @cosmjs/cosmwasm-stargate: Add structured `Events`s field to
`SigningCosmWasmClient`s transaction execution methods.

## [0.29.2] - 2022-10-13

Expand Down
12 changes: 12 additions & 0 deletions packages/cosmwasm-stargate/src/signingcosmwasmclient.ts
Expand Up @@ -20,6 +20,7 @@ import {
createBankAminoConverters,
defaultRegistryTypes as defaultStargateTypes,
DeliverTxResponse,
Event,
GasPrice,
isDeliverTxFailure,
logs,
Expand Down Expand Up @@ -76,6 +77,7 @@ export interface UploadResult {
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: number;
readonly gasUsed: number;
}
Expand Down Expand Up @@ -109,6 +111,7 @@ export interface InstantiateResult {
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: number;
readonly gasUsed: number;
}
Expand All @@ -122,6 +125,7 @@ export interface ChangeAdminResult {
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: number;
readonly gasUsed: number;
}
Expand All @@ -132,6 +136,7 @@ export interface MigrateResult {
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: number;
readonly gasUsed: number;
}
Expand All @@ -148,6 +153,7 @@ export interface ExecuteResult {
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: number;
readonly gasUsed: number;
}
Expand Down Expand Up @@ -271,6 +277,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
logs: parsedLogs,
height: result.height,
transactionHash: result.transactionHash,
events: result.events,
gasWanted: result.gasWanted,
gasUsed: result.gasUsed,
};
Expand Down Expand Up @@ -306,6 +313,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
logs: parsedLogs,
height: result.height,
transactionHash: result.transactionHash,
events: result.events,
gasWanted: result.gasWanted,
gasUsed: result.gasUsed,
};
Expand Down Expand Up @@ -334,6 +342,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
logs: logs.parseRawLog(result.rawLog),
height: result.height,
transactionHash: result.transactionHash,
events: result.events,
gasWanted: result.gasWanted,
gasUsed: result.gasUsed,
};
Expand All @@ -360,6 +369,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
logs: logs.parseRawLog(result.rawLog),
height: result.height,
transactionHash: result.transactionHash,
events: result.events,
gasWanted: result.gasWanted,
gasUsed: result.gasUsed,
};
Expand Down Expand Up @@ -390,6 +400,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
logs: logs.parseRawLog(result.rawLog),
height: result.height,
transactionHash: result.transactionHash,
events: result.events,
gasWanted: result.gasWanted,
gasUsed: result.gasUsed,
};
Expand Down Expand Up @@ -437,6 +448,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
logs: logs.parseRawLog(result.rawLog),
height: result.height,
transactionHash: result.transactionHash,
events: result.events,
gasWanted: result.gasWanted,
gasUsed: result.gasUsed,
};
Expand Down

0 comments on commit c51fb21

Please sign in to comment.