Skip to content

Commit

Permalink
add asset collector for univ2 on base.
Browse files Browse the repository at this point in the history
  • Loading branch information
jppade committed Sep 20, 2024
1 parent 1fefb92 commit 271f19c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/assetCollectionService/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/assetCollectionService
go 1.20

require (
github.com/diadata-org/diadata v1.4.528
github.com/diadata-org/diadata v1.4.532
github.com/sirupsen/logrus v1.9.3
)

Expand Down
2 changes: 2 additions & 0 deletions cmd/assetCollectionService/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ func NewAssetScraper(exchange string, secret string, relDB *models.RelDB) source
return source.NewUniswapAssetSource(exchanges[dia.PearlfiExchange], relDB)
case dia.ThenaExchange:
return source.NewUniswapAssetSource(exchanges[dia.ThenaExchange], relDB)
case dia.UniswapExchangeBase:
return source.NewUniswapAssetSource(exchanges[dia.UniswapExchangeBase], relDB)
case "assetlists":
return source.NewJSONReader(exchange, secret)
case dia.AyinExchange:
Expand Down
1 change: 1 addition & 0 deletions pkg/dia/Config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const (
FilterKing = "MAIR120"
BancorExchange = "Bancor"
UniswapExchange = "Uniswap"
UniswapExchangeBase = "Uniswap-Base"
UniswapExchangeV3 = "UniswapV3"
UniswapExchangeV3Polygon = "UniswapV3-polygon"
UniswapExchangeV3Arbitrum = "UniswapV3-Arbitrum"
Expand Down
4 changes: 4 additions & 0 deletions pkg/dia/service/assetservice/source/uniswap.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type UniswapPair struct {

const (
restDial = ""
restDialBase = ""
restDialBSC = ""
restDialPolygon = ""
restDialCelo = ""
Expand All @@ -44,6 +45,7 @@ const (
restDialLinea = ""

uniswapWaitMilliseconds = "25"
baseWaitMilliseconds = "200"
sushiswapWaitMilliseconds = "100"
pancakeswapWaitMilliseconds = "100"
dfynWaitMilliseconds = "100"
Expand Down Expand Up @@ -138,6 +140,8 @@ func NewUniswapAssetSource(exchange dia.Exchange, relDB *models.RelDB) (uas *Uni
uas = makeUniswapAssetSource(exchange, restDialLinea, relDB, wanchainWaitMilliseconds)
case dia.ThenaExchange:
uas = makeUniswapAssetSource(exchange, restDialBSC, relDB, sushiswapWaitMilliseconds)
case dia.UniswapExchangeBase:
uas = makeUniswapAssetSource(exchange, restDialBase, relDB, baseWaitMilliseconds)
}

exchangeFactoryContractAddress = exchange.Contract
Expand Down

0 comments on commit 271f19c

Please sign in to comment.