mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 13:47:12 +00:00
Add DeliverTxResponse.events
This commit is contained in:
parent
e62e461f85
commit
f2cfb3136a
@ -12,7 +12,8 @@ and this project adheres to
|
||||
supporting batch RPC requests ([#1300]).
|
||||
- @cosmjs/encoding: Add `lossy` parameter to `fromUtf8` allowing the use of a
|
||||
replacement charater instead of throwing.
|
||||
- @cosmjs/stargate: Add structured `Events`s to `IndexTx.events`.
|
||||
- @cosmjs/stargate: Add structured `Events`s to `IndexTx.events` and
|
||||
`DeliverTxResponse.events`.
|
||||
|
||||
## [0.29.2] - 2022-10-13
|
||||
|
||||
|
@ -284,6 +284,7 @@ export class CosmWasmClient {
|
||||
height: result.height,
|
||||
rawLog: result.rawLog,
|
||||
transactionHash: txId,
|
||||
events: result.events,
|
||||
gasUsed: result.gasUsed,
|
||||
gasWanted: result.gasWanted,
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ const resultFailure = {
|
||||
rawLog:
|
||||
"failed to execute message; message index: 0: 1855527000ufct is smaller than 20000000000000000000000ufct: insufficient funds",
|
||||
transactionHash: "FDC4FB701AABD465935F7D04AE490D1EF5F2BD4B227601C4E98B57EB077D9B7D",
|
||||
events: [],
|
||||
gasUsed: 54396,
|
||||
gasWanted: 200000,
|
||||
};
|
||||
@ -51,6 +52,7 @@ const resultSuccess = {
|
||||
rawLog:
|
||||
'[{"events":[{"type":"message","attributes":[{"key":"action","value":"send"},{"key":"sender","value":"firma1trqyle9m2nvyafc2n25frkpwed2504y6avgfzr"},{"key":"module","value":"bank"}]},{"type":"transfer","attributes":[{"key":"recipient","value":"firma12er8ls2sf5zess3jgjxz59xat9xtf8hz0hk6n4"},{"key":"sender","value":"firma1trqyle9m2nvyafc2n25frkpwed2504y6avgfzr"},{"key":"amount","value":"2000000ufct"}]}]}]',
|
||||
transactionHash: "C0B416CA868C55C2B8C1BBB8F3CFA233854F13A5CB15D3E9599F50CAF7B3D161",
|
||||
events: [],
|
||||
gasUsed: 61556,
|
||||
gasWanted: 200000,
|
||||
};
|
||||
|
@ -107,6 +107,14 @@ export interface DeliverTxResponse {
|
||||
/** Error code. The transaction suceeded iff code is 0. */
|
||||
readonly code: number;
|
||||
readonly transactionHash: string;
|
||||
readonly events: readonly Event[];
|
||||
/**
|
||||
* A string-based log document.
|
||||
*
|
||||
* This currently seems to merge attributes of multiple events into one event per type
|
||||
* (https://github.com/tendermint/tendermint/issues/9595). You might want to use the `events`
|
||||
* field instead.
|
||||
*/
|
||||
readonly rawLog?: string;
|
||||
readonly data?: readonly MsgData[];
|
||||
readonly gasUsed: number;
|
||||
@ -426,6 +434,7 @@ export class StargateClient {
|
||||
? {
|
||||
code: result.code,
|
||||
height: result.height,
|
||||
events: result.events,
|
||||
rawLog: result.rawLog,
|
||||
transactionHash: txId,
|
||||
gasUsed: result.gasUsed,
|
||||
|
Loading…
x
Reference in New Issue
Block a user