Skip to content

Commit 07479f9

Browse files
committed
add events in TxInfo
1 parent 3fddb17 commit 07479f9

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@initia/initia.js",
3-
"version": "0.1.24",
3+
"version": "0.1.25",
44
"description": "The JavaScript SDK for Initia",
55
"license": "MIT",
66
"author": "InitiaLabs",

src/client/lcd/api/TxAPI.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
PublicKey,
1111
num,
1212
TxLog,
13+
Event,
1314
} from '../../../core';
1415
import { hashToHex } from '../../../util';
1516
import { LCDClient } from '../LCDClient';
@@ -92,6 +93,7 @@ export namespace BlockTxBroadcastResult {
9293
info: string;
9394
data: string;
9495
timestamp: string;
96+
events: Event[];
9597
}
9698
}
9799

src/core/tx/TxInfo.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ export class TxInfo {
2020
* @param gas_used actual gas consumption
2121
* @param tx transaction content
2222
* @param timestamp time of inclusion
23+
* @param events events
2324
* @param code error code
25+
* @param codespace error codespace
2426
*/
2527
constructor(
2628
public height: number,
@@ -31,6 +33,7 @@ export class TxInfo {
3133
public gas_used: number,
3234
public tx: Tx,
3335
public timestamp: string,
36+
public events: Event[],
3437
public code?: number,
3538
public codespace?: string
3639
) {}
@@ -45,6 +48,7 @@ export class TxInfo {
4548
proto.gasUsed.toNumber(),
4649
Tx.unpackAny(proto.tx as Any),
4750
proto.timestamp,
51+
proto.events,
4852
proto.code,
4953
proto.codespace
5054
);
@@ -60,6 +64,7 @@ export class TxInfo {
6064
Number.parseInt(data.gas_used),
6165
Tx.fromData(data.tx),
6266
data.timestamp,
67+
data.events,
6368
data.code,
6469
data.codespace
6570
);
@@ -193,6 +198,7 @@ export namespace TxInfo {
193198
gas_used: string;
194199
tx: Tx.Data;
195200
timestamp: string;
201+
events: Event[];
196202
}
197203
export type Proto = TxResponse_pb;
198204
}

0 commit comments

Comments
 (0)