Skip to content

Commit

Permalink
Merge branch 'diadata-org:master' into feat-curvefi-onchain-decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
hhio618 authored Sep 16, 2023
2 parents a9b328d + 0435551 commit 1a0abd0
Show file tree
Hide file tree
Showing 39 changed files with 5,628 additions and 58 deletions.
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.17

require (
github.com/diadata-org/diadata v1.4.340
github.com/diadata-org/diadata v1.4.357
github.com/sirupsen/logrus v1.8.1
)

Expand Down
8 changes: 8 additions & 0 deletions cmd/assetCollectionService/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ func NewAssetScraper(exchange string, secret string) source.AssetSource {
return source.NewOsmosisScraper(exchanges[dia.OsmosisExchange])
case dia.VelodromeExchange:
return source.NewVelodromeAssetSource(exchanges[dia.VelodromeExchange])
case dia.TraderJoeExchangeV2_1:
return source.NewTraderJoeAssetSource(exchanges[dia.TraderJoeExchangeV2_1])
case dia.TraderJoeExchangeV2_1Arbitrum:
return source.NewTraderJoeAssetSource(exchanges[dia.TraderJoeExchangeV2_1Arbitrum])
case dia.TraderJoeExchangeV2_1Avalanche:
return source.NewTraderJoeAssetSource(exchanges[dia.TraderJoeExchangeV2_1Avalanche])
case dia.TraderJoeExchangeV2_1BNB:
return source.NewTraderJoeAssetSource(exchanges[dia.TraderJoeExchangeV2_1BNB])
case "assetlists":
return source.NewJSONReader(exchange, secret)
default:
Expand Down
4 changes: 2 additions & 2 deletions cmd/exchange-scrapers/collector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/exchange-scrapers/collector
go 1.17

require (
github.com/diadata-org/diadata v1.4.336
github.com/diadata-org/diadata v1.4.360
github.com/segmentio/kafka-go v0.4.35
github.com/sirupsen/logrus v1.9.0
)
Expand Down Expand Up @@ -191,4 +191,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
2 changes: 1 addition & 1 deletion cmd/exchange-scrapers/collector/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2560,4 +2560,4 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ih
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
2 changes: 1 addition & 1 deletion cmd/exchange-scrapers/generic-collector/zenlink/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2541,4 +2541,4 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ih
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
174 changes: 162 additions & 12 deletions cmd/foreignscraper/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cmd/http/graphqlServer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module graphqlServer
go 1.17

require (
github.com/diadata-org/diadata v1.4.338
github.com/diadata-org/diadata v1.4.361
github.com/graph-gophers/graphql-go v1.1.0
github.com/sirupsen/logrus v1.8.1
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/http/graphqlServer/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2537,4 +2537,4 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ih
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
23 changes: 18 additions & 5 deletions cmd/http/oraclebuilder/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"strings"

builderUtils "github.com/diadata-org/diadata/http/oraclebuilder/utils"
"github.com/ethereum/go-ethereum/common"

kr "github.com/99designs/keyring"
"github.com/99designs/keyring/cmd/k8sbridge"
Expand Down Expand Up @@ -49,8 +50,11 @@ func (ob *Env) Create(context *gin.Context) {
isUpdate = false

oracleaddress := context.PostForm("oracleaddress")
oracleaddress = common.HexToAddress(oracleaddress).Hex()
chainID := context.PostForm("chainID")
creator := context.PostForm("creator")
creator = common.HexToAddress(creator).Hex()

symbols := context.PostForm("symbols")
signedData := context.PostForm("signeddata")
feederID := context.PostForm("feederID")
Expand Down Expand Up @@ -220,7 +224,7 @@ func (ob *Env) Create(context *gin.Context) {
}

if isUpdate {
oracleconfig, err := ob.RelDB.GetOracleConfig(oracleaddress)
oracleconfig, err := ob.RelDB.GetOracleConfig(oracleaddress, chainID)
if err != nil {
log.Errorln("error GetOracleConfig ", err)
context.JSON(http.StatusInternalServerError, err)
Expand Down Expand Up @@ -350,7 +354,7 @@ func (ob *Env) View(context *gin.Context) {
}
// creator := context.PostForm("creator")

oracleconfig, err := ob.RelDB.GetOracleConfig(oracleaddress)
oracleconfig, err := ob.RelDB.GetOracleConfig(oracleaddress, chainID)
if err != nil {
log.Errorln("error GetOracleConfig ", err)
context.JSON(http.StatusInternalServerError, err)
Expand All @@ -365,10 +369,11 @@ func (ob *Env) Pause(context *gin.Context) {
err error
)
oracleaddress := context.Query("oracleaddress")
chainid := context.Query("oracleChainID")

creator := context.Query("creator")

oracleconfig, err := ob.RelDB.GetOracleConfig(oracleaddress)
oracleconfig, err := ob.RelDB.GetOracleConfig(oracleaddress, chainid)
if err != nil {
log.Errorln("error GetOracleConfig ", err)
context.JSON(http.StatusInternalServerError, err)
Expand Down Expand Up @@ -400,10 +405,13 @@ func (ob *Env) Delete(context *gin.Context) {
err error
)
oracleaddress := context.Query("oracleaddress")
chainID := context.Query("oracleChainID")

oracleaddress = common.HexToAddress(oracleaddress).Hex()

creator := context.Query("creator")

oracleconfig, err := ob.RelDB.GetOracleConfig(oracleaddress)
oracleconfig, err := ob.RelDB.GetOracleConfig(oracleaddress, chainID)
if err != nil {
log.Errorln("error GetOracleConfig ", err)
context.JSON(http.StatusInternalServerError, err)
Expand Down Expand Up @@ -440,10 +448,13 @@ func (ob *Env) Restart(context *gin.Context) {
err error
)
oracleaddress := context.Query("oracleaddress")
chainid := context.Query("oracleChainID")

oracleaddress = common.HexToAddress(oracleaddress).Hex()

creator := context.Query("creator")

oracleconfig, err := ob.RelDB.GetOracleConfig(oracleaddress)
oracleconfig, err := ob.RelDB.GetOracleConfig(oracleaddress, chainid)
if err != nil {
log.Errorln("error GetOracleConfig ", err)
context.JSON(http.StatusInternalServerError, err)
Expand Down Expand Up @@ -489,6 +500,8 @@ func (ob *Env) Auth(context *gin.Context) {

if oracleaddress == "" {
oracleaddress = creator
} else {
oracleaddress = common.HexToAddress(oracleaddress).Hex()
}

signedData, err := getAuthToken(context.Request)
Expand Down
2 changes: 1 addition & 1 deletion cmd/http/oraclebuilder/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1232,4 +1232,4 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ih
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
2 changes: 1 addition & 1 deletion cmd/http/restServer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/appleboy/gin-jwt/v2 v2.6.4
github.com/diadata-org/diadata v1.4.314
github.com/diadata-org/diadata v1.4.364
github.com/gin-contrib/cache v1.1.0
github.com/gin-gonic/contrib v0.0.0-20201101042839-6a891bf89f19
github.com/gin-gonic/gin v1.8.1
Expand Down
2 changes: 1 addition & 1 deletion cmd/http/restServer/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1024,4 +1024,4 @@ honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
2 changes: 1 addition & 1 deletion cmd/liquidityScraper/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/liquidityScraper
go 1.17

require (
github.com/diadata-org/diadata v1.4.340
github.com/diadata-org/diadata v1.4.357
github.com/sirupsen/logrus v1.8.1
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/liquidityScraper/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2007,4 +2007,4 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
2 changes: 1 addition & 1 deletion cmd/nftTradescrapers/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1416,4 +1416,4 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
20 changes: 19 additions & 1 deletion cmd/oraclebuildertools/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,32 @@ func main() {
},
}

var updateAddressChecksum = &cobra.Command{
Use: "updateaddresschecksum",
Run: func(cmd *cobra.Command, args []string) {
oracleconfigs, err := relStore.GetAllFeeders()
if err != nil {
log.Errorln("error getting feeders", err)
return
}
for _, oracleconfig := range oracleconfigs {
log.Infoln("updating oracle config for ", oracleconfig.Address)
err = relStore.UpdateFeederAddressCheckSum(oracleconfig.Address)
if err != nil {
log.Errorln("error UpdateFeederAddressCheckSum ", err, oracleconfig.Address)
}
}
},
}

var rootCmd = &cobra.Command{
Use: "oraclebuildertool",
Run: func(cmd *cobra.Command, args []string) {
// Do Stuff Here
},
}

rootCmd.AddCommand(restartFeeder, deleteFeeder)
rootCmd.AddCommand(restartFeeder, deleteFeeder, updateAddressChecksum)

if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/services/filtersBlockService/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2384,4 +2384,4 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ih
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
2 changes: 1 addition & 1 deletion cmd/services/supplyService/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1454,4 +1454,4 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
4 changes: 2 additions & 2 deletions 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.17

require (
github.com/diadata-org/diadata v1.4.324
github.com/diadata-org/diadata v1.4.360
github.com/segmentio/kafka-go v0.4.35
github.com/sirupsen/logrus v1.8.1
)
Expand Down Expand Up @@ -189,4 +189,4 @@ require (

replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
)
)
2 changes: 1 addition & 1 deletion cmd/services/tradesBlockService/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2535,4 +2535,4 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ih
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
6 changes: 6 additions & 0 deletions config/MEXC.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@
"Exchange": "MEXC",
"Ignore": false
},
{
"Symbol": "PENDULUM",
"ForeignName": "PENDULUMUSDT",
"Exchange": "MEXC",
"Ignore": false
},
{
"Symbol": "PEPE",
"ForeignName": "PEPEUSDT",
Expand Down
6 changes: 6 additions & 0 deletions config/gitcoinverified/MEXC.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,12 @@
"Blockchain": "Ethereum",
"Address": "0x45804880De22913dAFE09f4980848ECE6EcbAf78"
},
{
"Symbol": "PENDULUM",
"Exchange": "MEXC",
"Blockchain": "Pendulum",
"Address": "0x0000000000000000000000000000000000000000"
},
{
"Symbol": "PEPE",
"Exchange": "MEXC",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,4 @@ require (
replace (
github.com/99designs/keyring => github.com/nnn-gif/keyring v1.0.0
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
)
)
2 changes: 1 addition & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2606,4 +2606,4 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
2 changes: 1 addition & 1 deletion internal/pkg/tradesBlockService/tradesBlockService.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ func buildBridge(t dia.Trade) dia.Asset {
}
}
}
if basetoken.Blockchain == dia.ARBITRUM && (t.Source == dia.UniswapExchangeV3Arbitrum || t.Source == dia.SushiSwapExchangeArbitrum || t.Source == dia.CamelotExchange) {
if basetoken.Blockchain == dia.ARBITRUM && (t.Source == dia.UniswapExchangeV3Arbitrum || t.Source == dia.SushiSwapExchangeArbitrum || t.Source == dia.CamelotExchange || t.Source == dia.TraderJoeExchangeV2_1Arbitrum) {
if basetoken.Address == common.HexToAddress("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1").Hex() {
basetoken = dia.Asset{
Symbol: "ETH",
Expand Down
4 changes: 4 additions & 0 deletions pkg/dia/Config.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ const (
HitBTCExchange = "HitBTC"
HuckleberryExchange = "Huckleberry"
TraderJoeExchange = "TraderJoe"
TraderJoeExchangeV2_1 = "TraderJoeV2.1"
TraderJoeExchangeV2_1Arbitrum = "TraderJoeV2.1-Arbitrum"
TraderJoeExchangeV2_1Avalanche = "TraderJoeV2.1-Avalanche"
TraderJoeExchangeV2_1BNB = "TraderJoeV2.1-BNB"
PangolinExchange = "Pangolin"
PlatypusExchange = "PlatypusFinance"
SimexExchange = "Simex"
Expand Down
1 change: 1 addition & 0 deletions pkg/dia/Messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ type PairVolume struct {
Pair Pair `json:"Pair"`
PoolAddress string `json:"Pooladdress"`
Volume float64 `json:"Volume"`
TradesCount int64 `json:"TradesCount"`
}

type EthereumBlockData struct {
Expand Down
8 changes: 8 additions & 0 deletions pkg/dia/scraper/exchange-scrapers/APIScraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,14 @@ func NewAPIScraper(exchange string, scrape bool, key string, secret string, relD
return NewUniswapScraper(Exchanges[dia.StellaswapExchange], scrape, relDB)
case dia.WanswapExchange:
return NewUniswapScraper(Exchanges[dia.WanswapExchange], scrape, relDB)
case dia.TraderJoeExchangeV2_1:
return NewTraderJoeScraper(Exchanges[dia.TraderJoeExchangeV2_1], scrape, relDB)
case dia.TraderJoeExchangeV2_1Arbitrum:
return NewTraderJoeScraper(Exchanges[dia.TraderJoeExchangeV2_1Arbitrum], scrape, relDB)
case dia.TraderJoeExchangeV2_1Avalanche:
return NewTraderJoeScraper(Exchanges[dia.TraderJoeExchangeV2_1Avalanche], scrape, relDB)
case dia.TraderJoeExchangeV2_1BNB:
return NewTraderJoeScraper(Exchanges[dia.TraderJoeExchangeV2_1BNB], scrape, relDB)
case dia.OsmosisExchange:
return NewOsmosisScraper(Exchanges[dia.OsmosisExchange], scrape, relDB)
case dia.ZenlinkswapExchange:
Expand Down
Loading

0 comments on commit 1a0abd0

Please sign in to comment.