Skip to content

Commit

Permalink
Merge branch 'add-debug-log' into 'dev'
Browse files Browse the repository at this point in the history
Add transaction debug log

See merge request ergo/rosen-bridge/watcher!193
  • Loading branch information
vorujack committed Dec 8, 2023
2 parents a0e1abe + 6bf08b3 commit 1187559
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions services/watcher/src/ergo/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<wasm.ErgoBox> => {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1187559

Please sign in to comment.