From 6bf08b36e3cdab06a96129b7f3992a70ff39d8f3 Mon Sep 17 00:00:00 2001 From: "fateme.r" Date: Fri, 8 Dec 2023 22:39:14 +0330 Subject: [PATCH] Add transaction debug log --- services/watcher/src/ergo/utils.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/watcher/src/ergo/utils.ts b/services/watcher/src/ergo/utils.ts index d2c1dfd6..2912022f 100644 --- a/services/watcher/src/ergo/utils.ts +++ b/services/watcher/src/ergo/utils.ts @@ -26,7 +26,9 @@ import { import { PagedItemData } from '../types/items'; import { EventTriggerEntity } from '@rosen-bridge/watcher-data-extractor'; import { ObservationEntity } from '@rosen-bridge/observation-extractor'; +import WinstonLogger from '@rosen-bridge/winston-logger'; +const logger = WinstonLogger.getInstance().getLogger(import.meta.url); const txFee = parseInt(getConfig().general.fee); export const extractBoxes = (boxes: wasm.ErgoBoxes): Array => { @@ -191,6 +193,12 @@ export class ErgoUtils { dataInputs: wasm.ErgoBoxes = wasm.ErgoBoxes.from_boxes_json([]) ) => { const tx = builder.build(); + logger.debug( + `Tx with txId: [${tx + .id() + .to_str()}] built successfully, tx json format: [${tx.to_json()}]` + ); + const secrets = new wasm.SecretKeys(); secrets.add(secret); const wallet = wasm.Wallet.from_secrets(secrets);