Skip to content

Commit

Permalink
feat(bridge-history): add puffer gateways (#1252)
Browse files Browse the repository at this point in the history
Co-authored-by: colinlyguo <[email protected]>
  • Loading branch information
colinlyguo and colinlyguo authored Apr 9, 2024
1 parent b7324c7 commit 3d5250e
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions bridge-history-api/internal/config/config.go
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ type FetcherConfig struct {
DAIGatewayAddr string `json:"DAIGatewayAddr"`
USDCGatewayAddr string `json:"USDCGatewayAddr"`
LIDOGatewayAddr string `json:"LIDOGatewayAddr"`
PufferGatewayAddr string `json:"PufferGatewayAddr"`
ERC721GatewayAddr string `json:"ERC721GatewayAddr"`
ERC1155GatewayAddr string `json:"ERC1155GatewayAddr"`
ScrollChainAddr string `json:"ScrollChainAddr"`
5 changes: 5 additions & 0 deletions bridge-history-api/internal/logic/l1_fetcher.go
Original file line number Diff line number Diff line change
@@ -93,6 +93,11 @@ func NewL1FetcherLogic(cfg *config.FetcherConfig, db *gorm.DB, client *ethclient
gatewayList = append(gatewayList, common.HexToAddress(cfg.LIDOGatewayAddr))
}

if common.HexToAddress(cfg.PufferGatewayAddr) != (common.Address{}) {
addressList = append(addressList, common.HexToAddress(cfg.PufferGatewayAddr))
gatewayList = append(gatewayList, common.HexToAddress(cfg.PufferGatewayAddr))
}

log.Info("L1 Fetcher configured with the following address list", "addresses", addressList, "gateways", gatewayList)

f := &L1FetcherLogic{
7 changes: 6 additions & 1 deletion bridge-history-api/internal/logic/l2_fetcher.go
Original file line number Diff line number Diff line change
@@ -85,7 +85,12 @@ func NewL2FetcherLogic(cfg *config.FetcherConfig, db *gorm.DB, client *ethclient

if common.HexToAddress(cfg.LIDOGatewayAddr) != (common.Address{}) {
addressList = append(addressList, common.HexToAddress(cfg.LIDOGatewayAddr))
gatewayList = append(gatewayList, common.HexToAddress(cfg.USDCGatewayAddr))
gatewayList = append(gatewayList, common.HexToAddress(cfg.LIDOGatewayAddr))
}

if common.HexToAddress(cfg.PufferGatewayAddr) != (common.Address{}) {
addressList = append(addressList, common.HexToAddress(cfg.PufferGatewayAddr))
gatewayList = append(gatewayList, common.HexToAddress(cfg.PufferGatewayAddr))
}

log.Info("L2 Fetcher configured with the following address list", "addresses", addressList, "gateways", gatewayList)
2 changes: 1 addition & 1 deletion common/version/version.go
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import (
"runtime/debug"
)

var tag = "v4.3.84"
var tag = "v4.3.85"

var commit = func() string {
if info, ok := debug.ReadBuildInfo(); ok {

0 comments on commit 3d5250e

Please sign in to comment.