Skip to content

Commit

Permalink
feat: support subgraph headers for balancer/gyroscope (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
NgoKimPhu authored Oct 24, 2024
1 parent 12f8c70 commit 99125ac
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ type PoolsListUpdater struct {

func NewPoolsListUpdater(config *Config, ethrpcClient *ethrpc.Client) *PoolsListUpdater {
sharedUpdater := shared.NewPoolsListUpdater(&shared.Config{
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolTypeComposableStable},
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
SubgraphHeaders: config.SubgraphHeaders,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolTypeComposableStable},
})

return &PoolsListUpdater{
Expand Down
9 changes: 5 additions & 4 deletions pkg/liquidity-source/balancer-v2/stable/pools_list_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ type PoolsListUpdater struct {

func NewPoolsListUpdater(config *Config, ethrpcClient *ethrpc.Client) *PoolsListUpdater {
sharedUpdater := shared.NewPoolsListUpdater(&shared.Config{
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolTypeStable, poolTypeMetaStable},
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
SubgraphHeaders: config.SubgraphHeaders,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolTypeStable, poolTypeMetaStable},
})

return &PoolsListUpdater{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ type PoolsListUpdater struct {

func NewPoolsListUpdater(config *Config, ethrpcClient *ethrpc.Client) *PoolsListUpdater {
sharedUpdater := shared.NewPoolsListUpdater(&shared.Config{
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolTypeWeighted},
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
SubgraphHeaders: config.SubgraphHeaders,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolTypeWeighted},
})

return &PoolsListUpdater{
Expand Down
9 changes: 5 additions & 4 deletions pkg/liquidity-source/gyroscope/2clp/pools_list_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ type PoolsListUpdater struct {

func NewPoolsListUpdater(config *Config, ethrpcClient *ethrpc.Client) *PoolsListUpdater {
sharedUpdater := shared.NewPoolsListUpdater(&shared.Config{
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolType},
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
SubgraphHeaders: config.SubgraphHeaders,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolType},
})

return &PoolsListUpdater{
Expand Down
9 changes: 5 additions & 4 deletions pkg/liquidity-source/gyroscope/3clp/pools_list_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ type PoolsListUpdater struct {

func NewPoolsListUpdater(config *Config, ethrpcClient *ethrpc.Client) *PoolsListUpdater {
sharedUpdater := shared.NewPoolsListUpdater(&shared.Config{
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolType},
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
SubgraphHeaders: config.SubgraphHeaders,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolType},
})

return &PoolsListUpdater{
Expand Down
9 changes: 5 additions & 4 deletions pkg/liquidity-source/gyroscope/eclp/pools_list_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ type PoolsListUpdater struct {

func NewPoolsListUpdater(config *Config, ethrpcClient *ethrpc.Client) *PoolsListUpdater {
sharedUpdater := shared.NewPoolsListUpdater(&shared.Config{
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolType},
DexID: config.DexID,
SubgraphAPI: config.SubgraphAPI,
SubgraphHeaders: config.SubgraphHeaders,
NewPoolLimit: config.NewPoolLimit,
PoolTypes: []string{poolType},
})

return &PoolsListUpdater{
Expand Down

0 comments on commit 99125ac

Please sign in to comment.