Skip to content

Commit

Permalink
Merge branch 'register-binance-extractors-on-ergo' into 'dev'
Browse files Browse the repository at this point in the history
register Binance commitment and event trigger extractor on Ergo

See merge request ergo/rosen-bridge/guard-service!431
  • Loading branch information
vorujack committed Dec 24, 2024
2 parents 568f63e + 8c5847b commit 1fb876f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .changeset/odd-candles-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
28 changes: 28 additions & 0 deletions src/jobs/initScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ const createLoggers = () => ({
DefaultLoggerFactory.getInstance().getLogger(
'ethereum-lock-address-tx-extractor'
),
binanceCommitmentExtractorLogger:
DefaultLoggerFactory.getInstance().getLogger(
'binance-commitment-extractor'
),
binanceEventTriggerExtractorLogger:
DefaultLoggerFactory.getInstance().getLogger(
'binance-event-trigger-extractor'
),
binanceScannerLogger:
DefaultLoggerFactory.getInstance().getLogger('binance-scanner'),
binanceLockAddressTxExtractorLogger:
Expand Down Expand Up @@ -231,6 +239,24 @@ const initScanner = () => {
loggers.ethereumEventTriggerExtractorLogger
);

const binanceCommitmentExtractor = new CommitmentExtractor(
'binanceCommitment',
[GuardsBinanceConfigs.binanceContractConfig.commitmentAddress],
GuardsBinanceConfigs.binanceContractConfig.RWTId,
dataSource,
tokens,
loggers.binanceCommitmentExtractorLogger
);
const binanceEventTriggerExtractor = new EventTriggerExtractor(
'binanceEventTrigger',
dataSource,
GuardsBinanceConfigs.binanceContractConfig.eventTriggerAddress,
GuardsBinanceConfigs.binanceContractConfig.RWTId,
GuardsBinanceConfigs.binanceContractConfig.permitAddress,
GuardsBinanceConfigs.binanceContractConfig.fraudAddress,
loggers.binanceEventTriggerExtractorLogger
);

ergoScanner.registerExtractor(bitcoinCommitmentExtractor);
ergoScanner.registerExtractor(bitcoinEventTriggerExtractor);
ergoScanner.registerExtractor(cardanoCommitmentExtractor);
Expand All @@ -239,6 +265,8 @@ const initScanner = () => {
ergoScanner.registerExtractor(ergoEventTriggerExtractor);
ergoScanner.registerExtractor(ethereumCommitmentExtractor);
ergoScanner.registerExtractor(ethereumEventTriggerExtractor);
ergoScanner.registerExtractor(binanceCommitmentExtractor);
ergoScanner.registerExtractor(binanceEventTriggerExtractor);

ergoScannerJob();

Expand Down

0 comments on commit 1fb876f

Please sign in to comment.