diff --git a/.changeset/spicy-walls-smell.md b/.changeset/spicy-walls-smell.md new file mode 100644 index 0000000..ab18c51 --- /dev/null +++ b/.changeset/spicy-walls-smell.md @@ -0,0 +1,5 @@ +--- +'@3loop/transaction-interpreter': patch +--- + +Add timestamp to interpreted transaction diff --git a/packages/transaction-interpreter/interpreters/std.ts b/packages/transaction-interpreter/interpreters/std.ts index f4c0641..58be925 100644 --- a/packages/transaction-interpreter/interpreters/std.ts +++ b/packages/transaction-interpreter/interpreters/std.ts @@ -295,6 +295,7 @@ export function defaultEvent(event: DecodedTransaction): InterpretedTransaction action: "Called method '" + event.methodCall.name + "'", chain: event.chainID, txHash: event.txHash, + timestamp: event.timestamp, user: { address: event.fromAddress, name: null }, method: event.methodCall.name, assetsSent: assetsSent(event.transfers, event.fromAddress), diff --git a/packages/transaction-interpreter/src/types.ts b/packages/transaction-interpreter/src/types.ts index bcea913..b164c89 100644 --- a/packages/transaction-interpreter/src/types.ts +++ b/packages/transaction-interpreter/src/types.ts @@ -55,6 +55,7 @@ export type InterpretedTransaction = { chain: number action: string txHash: string + timestamp: number user: Address method: string | null type: TransactionType