Skip to content

Commit 6fc9465

Browse files
authored
Add timestamp to interpreted transaction (#184)
1 parent abf0dce commit 6fc9465

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.changeset/spicy-walls-smell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@3loop/transaction-interpreter': patch
3+
---
4+
5+
Add timestamp to interpreted transaction

packages/transaction-interpreter/interpreters/std.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ export function defaultEvent(event: DecodedTransaction): InterpretedTransaction
295295
action: "Called method '" + event.methodCall.name + "'",
296296
chain: event.chainID,
297297
txHash: event.txHash,
298+
timestamp: event.timestamp,
298299
user: { address: event.fromAddress, name: null },
299300
method: event.methodCall.name,
300301
assetsSent: assetsSent(event.transfers, event.fromAddress),

packages/transaction-interpreter/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export type InterpretedTransaction = {
5555
chain: number
5656
action: string
5757
txHash: string
58+
timestamp: number
5859
user: Address
5960
method: string | null
6061
type: TransactionType

0 commit comments

Comments
 (0)