From 31739f4435694cde8e01f9580fc64b4b54276046 Mon Sep 17 00:00:00 2001 From: jppade Date: Tue, 5 Nov 2024 10:28:45 +0100 Subject: [PATCH] amend tbs for hydration scraper suite deployment. --- cmd/assetCollectionService/go.mod | 2 +- cmd/exchange-scrapers/collector/go.mod | 2 +- cmd/liquidityScraper/go.mod | 2 +- cmd/services/tradesBlockService/go.mod | 2 +- .../pkg/tradesBlockService/tradesBlockService.go | 16 ++++++++++++++++ pkg/dia/Messages.go | 1 + 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/cmd/assetCollectionService/go.mod b/cmd/assetCollectionService/go.mod index 565bf47d8..505859ec6 100644 --- a/cmd/assetCollectionService/go.mod +++ b/cmd/assetCollectionService/go.mod @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/assetCollectionService go 1.22 require ( - github.com/diadata-org/diadata v1.4.552 + github.com/diadata-org/diadata v1.4.556 github.com/sirupsen/logrus v1.9.3 ) diff --git a/cmd/exchange-scrapers/collector/go.mod b/cmd/exchange-scrapers/collector/go.mod index e4e293613..9b224d561 100644 --- a/cmd/exchange-scrapers/collector/go.mod +++ b/cmd/exchange-scrapers/collector/go.mod @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/exchange-scrapers/collector go 1.22 require ( - github.com/diadata-org/diadata v1.4.552 + github.com/diadata-org/diadata v1.4.556 github.com/segmentio/kafka-go v0.4.35 github.com/sirupsen/logrus v1.9.3 ) diff --git a/cmd/liquidityScraper/go.mod b/cmd/liquidityScraper/go.mod index 0f3034c56..9a2c14d80 100644 --- a/cmd/liquidityScraper/go.mod +++ b/cmd/liquidityScraper/go.mod @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/liquidityScraper go 1.22 require ( - github.com/diadata-org/diadata v1.4.553 + github.com/diadata-org/diadata v1.4.556 github.com/sirupsen/logrus v1.9.3 ) diff --git a/cmd/services/tradesBlockService/go.mod b/cmd/services/tradesBlockService/go.mod index 7d85852de..662facf75 100644 --- a/cmd/services/tradesBlockService/go.mod +++ b/cmd/services/tradesBlockService/go.mod @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/services/tradesBlockService go 1.22 require ( - github.com/diadata-org/diadata v1.4.555 + github.com/diadata-org/diadata v1.4.556 github.com/segmentio/kafka-go v0.4.35 github.com/sirupsen/logrus v1.9.3 ) diff --git a/internal/pkg/tradesBlockService/tradesBlockService.go b/internal/pkg/tradesBlockService/tradesBlockService.go index 046051cd5..7b97f027b 100644 --- a/internal/pkg/tradesBlockService/tradesBlockService.go +++ b/internal/pkg/tradesBlockService/tradesBlockService.go @@ -708,6 +708,22 @@ func buildBridge(t dia.Trade) dia.Asset { } } } + if basetoken.Blockchain == dia.HYDRATION && t.Source == dia.HydrationExchange { + if basetoken.Address == "18" { + basetoken = dia.Asset{ + Symbol: "DAI", + Address: "0x6B175474E89094C44Da98b954EedeAC495271d0F", + Blockchain: dia.ETHEREUM, + } + } + if basetoken.Address == "10" { + basetoken = dia.Asset{ + Symbol: "USDT", + Address: "0xdAC17F958D2ee523a2206206994597C13D831ec7", + Blockchain: dia.ETHEREUM, + } + } + } return basetoken } diff --git a/pkg/dia/Messages.go b/pkg/dia/Messages.go index d8eeb030c..9fea83f82 100644 --- a/pkg/dia/Messages.go +++ b/pkg/dia/Messages.go @@ -54,6 +54,7 @@ const ( ALEPHIUM = "Alephium" BASE = "Base" FILECOIN = "Filecoin" + HYDRATION = "Hydration" ) var CRYPTO_ZERO_UNIX_TIME = time.Unix(1230768000, 0)