Skip to content

Commit

Permalink
add bridge for base dexes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jppade committed Sep 23, 2024
1 parent d4c5c5d commit d764da0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
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.527
github.com/diadata-org/diadata v1.4.537
github.com/segmentio/kafka-go v0.4.35
github.com/sirupsen/logrus v1.8.1
)
Expand Down
9 changes: 9 additions & 0 deletions internal/pkg/tradesBlockService/tradesBlockService.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,15 @@ func buildBridge(t dia.Trade) dia.Asset {
}
}
}
if basetoken.Blockchain == dia.BASE && t.Source == dia.UniswapExchangeV3Base {
if basetoken.Address == "0x4200000000000000000000000000000000000006" {
basetoken = dia.Asset{
Symbol: "WETH",
Address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
Blockchain: dia.ETHEREUM,
}
}
}

return basetoken
}
1 change: 1 addition & 0 deletions pkg/dia/Messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const (
LINEA = "Linea"
OPTIMISM = "Optimism"
ALEPHIUM = "Alephium"
BASE = "Base"
)

var CRYPTO_ZERO_UNIX_TIME = time.Unix(1230768000, 0)
Expand Down

0 comments on commit d764da0

Please sign in to comment.