Skip to content

Commit

Permalink
update tbs for bifrost scraper.
Browse files Browse the repository at this point in the history
  • Loading branch information
jppade committed Oct 31, 2024
1 parent f88fb9a commit ae73d23
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build/Dockerfile-genericCollector
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ARG exchange
FROM us.icr.io/dia-registry/devops/build-119:latest as build
FROM us.icr.io/dia-registry/devops/build-122:latest as build

WORKDIR $GOPATH/src/

COPY ./cmd/exchange-scrapers/collector ./
RUN go mod tidy -go=1.19 && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go install
RUN go mod tidy && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go install

FROM gcr.io/distroless/base

Expand Down
1 change: 1 addition & 0 deletions cmd/exchange-scrapers/collector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,4 @@ require (
)

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
replace github.com/btcsuite/btcd/btcec/v2 => github.com/btcsuite/btcd/btcec/v2 v2.3.3
2 changes: 1 addition & 1 deletion cmd/services/tradesBlockService/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/services/tradesBlockService
go 1.19

require (
github.com/diadata-org/diadata v1.4.540
github.com/diadata-org/diadata v1.4.554
github.com/segmentio/kafka-go v0.4.35
github.com/sirupsen/logrus v1.8.1
)
Expand Down
31 changes: 22 additions & 9 deletions internal/pkg/tradesBlockService/tradesBlockService.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,24 +599,37 @@ func buildBridge(t dia.Trade) dia.Asset {
}
}
}
if basetoken.Blockchain == dia.BIFROST && t.Source == dia.ZenlinkswapExchange {
if basetoken.Address == "516" {
if basetoken.Blockchain == dia.BIFROST && t.Source == dia.BifrostExchange {
if basetoken.Address == "token2-0" {
basetoken = dia.Asset{
Symbol: "KSM",
Symbol: "DOT",
Address: "0x0000000000000000000000000000000000000000",
Blockchain: dia.KUSAMA,
Blockchain: dia.POLKADOT,
}
}
}
if basetoken.Blockchain == dia.BIFROST_POLKADOT && t.Source == dia.ZenlinkswapExchangeBifrostPolkadot {
if basetoken.Address == "2048" {
if basetoken.Address == "token2-1" {
basetoken = dia.Asset{
Symbol: "DOT",
Symbol: "GLMR",
Address: "0x0000000000000000000000000000000000000000",
Blockchain: dia.POLKADOT,
Blockchain: dia.MOONBEAM,
}
}
if basetoken.Address == "token2-3" {
basetoken = dia.Asset{
Symbol: "ASTR",
Address: "0x0000000000000000000000000000000000000000",
Blockchain: dia.FILECOIN,
}
}
if basetoken.Address == "token2-4" {
basetoken = dia.Asset{
Symbol: "ASTR",
Address: "0x0000000000000000000000000000000000000000",
Blockchain: dia.ASTAR,
}
}
}

if basetoken.Blockchain == dia.UNREAL_TESTNET && t.Source == dia.PearlfiExchangeTestnet {
if basetoken.Address == "0x0C68a3C11FB3550e50a4ed8403e873D367A8E361" {
basetoken = dia.Asset{
Expand Down

0 comments on commit ae73d23

Please sign in to comment.