Skip to content

Commit

Permalink
improve logging for event data
Browse files Browse the repository at this point in the history
  • Loading branch information
Warrior-7 committed Nov 29, 2023
1 parent a2faad0 commit 7fafb5d
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions packages/transactions/trigger/lib/triggerTxBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,7 @@ export class TriggerTxBuilder {
ergoLib.Constant.from_coll_coll_byte(this.eventData)
);
this.logger.debug(
`added event data to R5 register of trigger box: event-data=[${this.eventData.map(
(data) => uint8ArrayToHex(data)
)}]`
`added event data to R5 register of trigger box: event-data=[${this.rawEventData}]`
);

boxBuilder.set_register_value(
Expand Down Expand Up @@ -276,4 +274,21 @@ export class TriggerTxBuilder {
bigIntToUint8Array(BigInt(this.observation.height)),
];
}

private get rawEventData() {
return [
this.observation.sourceTxId,
this.observation.fromChain,
this.observation.toChain,
this.observation.fromAddress,
this.observation.toAddress,
this.observation.amount,
this.observation.bridgeFee,
this.observation.networkFee,
this.observation.sourceChainTokenId,
this.observation.targetChainTokenId,
this.observation.sourceBlockId,
this.observation.height,
];
}
}

0 comments on commit 7fafb5d

Please sign in to comment.