Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vuquang23 committed Nov 15, 2023
1 parent dd4dfcc commit 3ade4ab
Show file tree
Hide file tree
Showing 29 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/abis.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/chainlink_flags.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

type ChainlinkFlags struct {
Flags map[string]bool `json:"flags"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/chainlink_flags_reader.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand All @@ -20,7 +20,7 @@ func NewChainlinkFlagsReader(ethrpcClient *ethrpc.Client) *ChainlinkFlagsReader
abi: chainlinkABI,
ethrpcClient: ethrpcClient,
log: logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"reader": "ChainlinkFlagsReader",
}),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

type Config struct {
DexID string `json:"-"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/constants.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gmx
package rollupfinance

import "math/big"

const DexTypeGmx = "gmx"
const DexTypeRollupFinance = "rollup-finance"

const flagArbitrumSeqOffline = "0xa438451d6458044c3c8cd2f6f31c91ac882a6d91"

Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/embed.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import _ "embed"

Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/errors.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import "errors"

Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/fast_price_feed_v1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"math/big"
Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/fast_price_feed_v1_reader.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand All @@ -21,7 +21,7 @@ func NewFastPriceFeedV1Reader(ethrpcClient *ethrpc.Client) *FastPriceFeedV1Reade
abi: fastPriceFeedV1ABI,
ethrpcClient: ethrpcClient,
log: logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"reader": "FastPriceFeedV1Reader",
}),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/fast_price_feed_v2.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"math/big"
Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/fast_price_feed_v2_reader.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand All @@ -21,7 +21,7 @@ func NewFastPriceFeedV2Reader(ethrpcClient *ethrpc.Client) *FastPriceFeedV2Reade
abi: fastPriceFeedV2ABI,
ethrpcClient: ethrpcClient,
log: logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"reader": "FastPriceFeedV2Reader",
}),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/helper.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"github.com/KyberNetwork/ethrpc"
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/iface.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/pancake_pair.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import "math/big"

Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/pancake_pair_reader.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand All @@ -20,7 +20,7 @@ func NewPancakePairReader(ethrpcClient *ethrpc.Client) *PancakePairReader {
abi: pancakePairABI,
ethrpcClient: ethrpcClient,
log: logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"reader": "PancakePairReader",
}),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/pool_simulator.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"encoding/json"
Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/pool_tracker.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand Down Expand Up @@ -34,7 +34,7 @@ func (d *PoolTracker) GetNewPoolState(
_ pool.GetNewPoolStateParams,
) (entity.Pool, error) {
log := logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"poolAddress": p.Address,
})
log.Info("Start getting new state of pool")
Expand Down
6 changes: 3 additions & 3 deletions pkg/source/rollup-finance/pools_list_updater.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand Down Expand Up @@ -30,7 +30,7 @@ func NewPoolsListUpdater(

func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte) ([]entity.Pool, []byte, error) {
log := logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"kind": "getNewPools",
})
if d.hasInitialized {
Expand Down Expand Up @@ -65,7 +65,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte
pool := entity.Pool{
Address: d.config.VaultAddress,
Exchange: d.config.DexID,
Type: DexTypeGmx,
Type: DexTypeRollupFinance,
Tokens: poolTokens,
Reserves: reserves,
Extra: string(extraBytes),
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/price_feed.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"math/big"
Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/price_feed_reader.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand All @@ -20,7 +20,7 @@ func NewPriceFeedReader(ethrpcClient *ethrpc.Client) *PriceFeedReader {
abi: priceFeedABI,
ethrpcClient: ethrpcClient,
log: logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"reader": "PriceFeedReader",
}),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/types.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

type VaultAddress struct {
Vault string `json:"vault"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/usdr.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"math/big"
Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/usdr_reader.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand All @@ -20,7 +20,7 @@ func NewUSDRReader(ethrpcClient *ethrpc.Client) *USDRReader {
abi: erc20ABI,
ethrpcClient: ethrpcClient,
log: logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"reader": "USDRReader",
}),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/vault.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"math/big"
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/vault_price_feed.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"encoding/json"
Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/vault_price_feed_reader.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand All @@ -22,7 +22,7 @@ func NewVaultPriceFeedReader(ethrpcClient *ethrpc.Client) *VaultPriceFeedReader
abi: vaultPriceFeedABI,
ethrpcClient: ethrpcClient,
log: logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"reader": "VaultPriceFeedReader",
}),
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/vault_reader.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand All @@ -22,7 +22,7 @@ func NewVaultReader(ethrpcClient *ethrpc.Client) *VaultReader {
abi: vaultABI,
ethrpcClient: ethrpcClient,
log: logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"reader": "VaultReader",
}),
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/source/rollup-finance/vault_scanner.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"context"
Expand Down Expand Up @@ -39,7 +39,7 @@ func NewVaultScanner(
chainlinkFlagsReader: NewChainlinkFlagsReader(ethrpcClient),
pancakePairReader: NewPancakePairReader(ethrpcClient),
log: logger.WithFields(logger.Fields{
"liquiditySource": DexTypeGmx,
"liquiditySource": DexTypeRollupFinance,
"scanner": "VaultScanner",
}),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/rollup-finance/vault_utils.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gmx
package rollupfinance

import (
"math/big"
Expand Down

0 comments on commit 3ade4ab

Please sign in to comment.