From 0cf13dac0f22d428adb320115bac1435c4ebd1f3 Mon Sep 17 00:00:00 2001 From: sunspirit99 Date: Mon, 16 Dec 2024 17:44:16 +0700 Subject: [PATCH 1/4] update --- pkg/valueobject/chain.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/valueobject/chain.go b/pkg/valueobject/chain.go index e150db2f3..a0a99857f 100644 --- a/pkg/valueobject/chain.go +++ b/pkg/valueobject/chain.go @@ -114,6 +114,8 @@ func ToString(chainID ChainID) (string, error) { return "sonic", nil case 0: return "solana", nil + case 146: + return "sonic", nil default: return "", ErrChainUnsupported } From ac35b17c1c511c609e2349d077c2f4aff9ce69fc Mon Sep 17 00:00:00 2001 From: sunspirit99 Date: Thu, 19 Dec 2024 14:27:42 +0700 Subject: [PATCH 2/4] update --- .../algebra/integral/pool_list_updater.go | 8 ++++++-- pkg/liquidity-source/algebra/v1/pool_list_updater.go | 9 +++++++-- pkg/source/nuriv2/pools_list_updater.go | 9 +++++++-- pkg/source/pancakev3/pools_list_updater.go | 9 +++++++-- pkg/source/ramsesv2/pools_list_updater.go | 9 +++++++-- pkg/source/slipstream/pools_list_updater.go | 9 +++++++-- pkg/source/solidly-v3/pools_list_updater.go | 9 +++++++-- pkg/source/uniswapv3/pools_list_updater.go | 9 +++++++-- 8 files changed, 55 insertions(+), 16 deletions(-) diff --git a/pkg/liquidity-source/algebra/integral/pool_list_updater.go b/pkg/liquidity-source/algebra/integral/pool_list_updater.go index 904b147ce..9a51cfdb9 100644 --- a/pkg/liquidity-source/algebra/integral/pool_list_updater.go +++ b/pkg/liquidity-source/algebra/integral/pool_list_updater.go @@ -5,7 +5,6 @@ import ( "fmt" "math/big" "strconv" - "time" "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/logger" @@ -148,13 +147,18 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte return nil, metadataBytes, err } + createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) + if !ok { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", p.CreatedAtTimestamp, p.ID) + } + var newPool = entity.Pool{ Address: p.ID, ReserveUsd: 0, AmplifiedTvl: 0, Exchange: d.config.DexID, Type: DexType, - Timestamp: time.Now().Unix(), + Timestamp: createdAtTimestamp.Int64(), Reserves: reserves, Tokens: tokens, StaticExtra: string(staticExtra), diff --git a/pkg/liquidity-source/algebra/v1/pool_list_updater.go b/pkg/liquidity-source/algebra/v1/pool_list_updater.go index 70cb89c62..0c3ccb73e 100644 --- a/pkg/liquidity-source/algebra/v1/pool_list_updater.go +++ b/pkg/liquidity-source/algebra/v1/pool_list_updater.go @@ -5,7 +5,6 @@ import ( "fmt" "math/big" "strconv" - "time" "github.com/KyberNetwork/logger" "github.com/goccy/go-json" @@ -138,13 +137,19 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte reserves = append(reserves, zeroString) } + createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) + if !ok { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", + p.CreatedAtTimestamp, p.ID) + } + var newPool = entity.Pool{ Address: p.ID, ReserveUsd: 0, AmplifiedTvl: 0, Exchange: d.config.DexID, Type: DexTypeAlgebraV1, - Timestamp: time.Now().Unix(), + Timestamp: createdAtTimestamp.Int64(), Reserves: reserves, Tokens: tokens, } diff --git a/pkg/source/nuriv2/pools_list_updater.go b/pkg/source/nuriv2/pools_list_updater.go index 25228f954..e70f4b7be 100644 --- a/pkg/source/nuriv2/pools_list_updater.go +++ b/pkg/source/nuriv2/pools_list_updater.go @@ -5,7 +5,6 @@ import ( "fmt" "math/big" "strconv" - "time" "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" @@ -141,6 +140,12 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte reserves = append(reserves, zeroString) } + createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) + if !ok { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", + p.CreatedAtTimestamp, p.ID) + } + var swapFee, _ = strconv.ParseFloat(p.FeeTier, 64) extraBytes, _ := json.Marshal(extraField) @@ -152,7 +157,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: swapFee, Exchange: d.config.DexID, Type: DexType, - Timestamp: time.Now().Unix(), + Timestamp: createdAtTimestamp.Int64(), Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), diff --git a/pkg/source/pancakev3/pools_list_updater.go b/pkg/source/pancakev3/pools_list_updater.go index 0b84edab3..0768903d8 100644 --- a/pkg/source/pancakev3/pools_list_updater.go +++ b/pkg/source/pancakev3/pools_list_updater.go @@ -5,7 +5,6 @@ import ( "fmt" "math/big" "strconv" - "time" "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" @@ -150,6 +149,12 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte var swapFee, _ = strconv.ParseFloat(p.FeeTier, 64) + createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) + if !ok { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", + p.CreatedAtTimestamp, p.ID) + } + extraBytes, _ := json.Marshal(extraField) staticBytes, _ := json.Marshal(staticField) var newPool = entity.Pool{ @@ -159,7 +164,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: swapFee, Exchange: d.config.DexID, Type: DexTypePancakeV3, - Timestamp: time.Now().Unix(), + Timestamp: createdAtTimestamp.Int64(), Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), diff --git a/pkg/source/ramsesv2/pools_list_updater.go b/pkg/source/ramsesv2/pools_list_updater.go index 246d03c1f..6c3a113e3 100644 --- a/pkg/source/ramsesv2/pools_list_updater.go +++ b/pkg/source/ramsesv2/pools_list_updater.go @@ -5,7 +5,6 @@ import ( "fmt" "math/big" "strconv" - "time" "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" @@ -143,6 +142,12 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte var swapFee, _ = strconv.ParseFloat(p.FeeTier, 64) + createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) + if !ok { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", + p.CreatedAtTimestamp, p.ID) + } + extraBytes, _ := json.Marshal(extraField) var newPool = entity.Pool{ @@ -152,7 +157,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: swapFee, Exchange: d.config.DexID, Type: DexTypeRamsesV2, - Timestamp: time.Now().Unix(), + Timestamp: createdAtTimestamp.Int64(), Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), diff --git a/pkg/source/slipstream/pools_list_updater.go b/pkg/source/slipstream/pools_list_updater.go index 23ea3bd0f..78aa8b36e 100644 --- a/pkg/source/slipstream/pools_list_updater.go +++ b/pkg/source/slipstream/pools_list_updater.go @@ -5,7 +5,6 @@ import ( "fmt" "math/big" "strconv" - "time" "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" @@ -149,6 +148,12 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte reserves = append(reserves, zeroString) } + createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) + if !ok { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", + p.CreatedAtTimestamp, p.ID) + } + extraBytes, _ := json.Marshal(extraField) staticBytes, _ := json.Marshal(staticField) var newPool = entity.Pool{ @@ -158,7 +163,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: 0, Exchange: d.config.DexID, Type: DexType, - Timestamp: time.Now().Unix(), + Timestamp: createdAtTimestamp.Int64(), Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), diff --git a/pkg/source/solidly-v3/pools_list_updater.go b/pkg/source/solidly-v3/pools_list_updater.go index eb50b1c13..10f7d605e 100644 --- a/pkg/source/solidly-v3/pools_list_updater.go +++ b/pkg/source/solidly-v3/pools_list_updater.go @@ -5,7 +5,6 @@ import ( "fmt" "math/big" "strconv" - "time" "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" @@ -143,6 +142,12 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte var swapFee, _ = strconv.ParseFloat(p.FeeTier, 64) + createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) + if !ok { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", + p.CreatedAtTimestamp, p.ID) + } + extraBytes, _ := json.Marshal(extraField) var newPool = entity.Pool{ @@ -152,7 +157,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: swapFee, Exchange: d.config.DexID, Type: DexTypeSolidlyV3, - Timestamp: time.Now().Unix(), + Timestamp: createdAtTimestamp.Int64(), Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), diff --git a/pkg/source/uniswapv3/pools_list_updater.go b/pkg/source/uniswapv3/pools_list_updater.go index e84df76c5..3648308ac 100644 --- a/pkg/source/uniswapv3/pools_list_updater.go +++ b/pkg/source/uniswapv3/pools_list_updater.go @@ -5,7 +5,6 @@ import ( "fmt" "math/big" "strconv" - "time" "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" @@ -150,6 +149,12 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte var swapFee, _ = strconv.ParseFloat(p.FeeTier, 64) + createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) + if !ok { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", + p.CreatedAtTimestamp, p.ID) + } + extraBytes, _ := json.Marshal(extraField) staticBytes, _ := json.Marshal(staticField) var newPool = entity.Pool{ @@ -159,7 +164,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: swapFee, Exchange: d.config.DexID, Type: DexTypeUniswapV3, - Timestamp: time.Now().Unix(), + Timestamp: createdAtTimestamp.Int64(), Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), From c6a0a725c9c7ccf81d9935aefe14e18af69464e2 Mon Sep 17 00:00:00 2001 From: sunspirit99 Date: Thu, 19 Dec 2024 14:32:04 +0700 Subject: [PATCH 3/4] update --- pkg/valueobject/chain.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/valueobject/chain.go b/pkg/valueobject/chain.go index a0a99857f..e150db2f3 100644 --- a/pkg/valueobject/chain.go +++ b/pkg/valueobject/chain.go @@ -114,8 +114,6 @@ func ToString(chainID ChainID) (string, error) { return "sonic", nil case 0: return "solana", nil - case 146: - return "sonic", nil default: return "", ErrChainUnsupported } From a99a676af879d5072c746a6886be83c9ca80ef4a Mon Sep 17 00:00:00 2001 From: sunspirit99 Date: Thu, 19 Dec 2024 15:03:53 +0700 Subject: [PATCH 4/4] update --- go.mod | 22 +++++-- go.sum | 64 +++++++++++++++---- .../algebra/integral/pool_list_updater.go | 7 +- .../algebra/v1/pool_list_updater.go | 10 +-- pkg/source/nuriv2/pools_list_updater.go | 10 +-- pkg/source/pancakev3/pools_list_updater.go | 10 +-- pkg/source/ramsesv2/pools_list_updater.go | 10 +-- pkg/source/slipstream/pools_list_updater.go | 10 +-- pkg/source/solidly-v3/pools_list_updater.go | 10 +-- pkg/source/uniswapv3/pools_list_updater.go | 10 +-- 10 files changed, 108 insertions(+), 55 deletions(-) diff --git a/go.mod b/go.mod index 0056f01d4..fd97bdd43 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/KyberNetwork/kyberswap-dex-lib -go 1.22.8 - -toolchain go1.22.9 +go 1.23.1 require ( github.com/KyberNetwork/blockchain-toolkit v0.8.2-0.20241123202223-0b77d465adc4 @@ -10,6 +8,7 @@ require ( github.com/KyberNetwork/ethrpc v0.7.3 github.com/KyberNetwork/iZiSwap-SDK-go v1.1.0 github.com/KyberNetwork/int256 v0.1.4 + github.com/KyberNetwork/kutils v0.3.8 github.com/KyberNetwork/logger v0.2.1 github.com/KyberNetwork/msgpack/v5 v5.4.2 github.com/KyberNetwork/pancake-v3-sdk v0.2.0 @@ -18,7 +17,7 @@ require ( github.com/daoleno/uniswapv3-sdk v0.4.0 github.com/davecgh/go-spew v1.1.1 github.com/deckarep/golang-set/v2 v2.6.0 - github.com/dgraph-io/ristretto v0.1.1 + github.com/dgraph-io/ristretto v0.2.0 github.com/ethereum/go-ethereum v1.14.12 github.com/go-resty/resty/v2 v2.14.0 github.com/goccy/go-json v0.10.3 @@ -41,8 +40,13 @@ require ( require ( github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/aws/smithy-go v1.15.0 // indirect github.com/bits-and-blooms/bitset v1.14.3 // indirect + github.com/bytedance/sonic v1.12.1 // indirect + github.com/bytedance/sonic/loader v0.2.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/cloudwego/iasm v0.2.0 // indirect github.com/consensys/bavard v0.1.15 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect @@ -53,28 +57,36 @@ require ( github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/golang/glog v1.1.2 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/matryer/is v1.4.1 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/supranational/blst v0.3.13 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.8.0 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect + golang.org/x/arch v0.9.0 // indirect golang.org/x/crypto v0.27.0 // indirect golang.org/x/mod v0.21.0 // indirect golang.org/x/net v0.29.0 // indirect golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect golang.org/x/tools v0.25.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 1fedaa5a1..571487662 100644 --- a/go.sum +++ b/go.sum @@ -10,6 +10,8 @@ github.com/KyberNetwork/iZiSwap-SDK-go v1.1.0 h1:gjR4PS5MvPNBihRQihjn5auOQj2+TFf github.com/KyberNetwork/iZiSwap-SDK-go v1.1.0/go.mod h1:WbveqjEww3YdTb0NbT63qQ4WsxMGvofJu4j7yzC+LgQ= github.com/KyberNetwork/int256 v0.1.4 h1:SbnhxqcsZXrP+5pSkolpSo2ViEWiq3K/hjfl5OQgX/4= github.com/KyberNetwork/int256 v0.1.4/go.mod h1:qE/Ikpo86fn60sIB7CwcfiqJTjK2p+k+ASvuO79Rq4g= +github.com/KyberNetwork/kutils v0.3.8 h1:FMU3ux4yYRcXfT3EWk8PY0Is4vm0R6lBe9KiAXAyvO8= +github.com/KyberNetwork/kutils v0.3.8/go.mod h1:n8qRo+TkBkqspGRKu52h/UP5GvIxoSxWueTpgvHMuvo= github.com/KyberNetwork/logger v0.2.1 h1:ZkP/I7PN8Dx1lWRiEw8pfuhiG6BXTAfcuQTzU/3Z0DQ= github.com/KyberNetwork/logger v0.2.1/go.mod h1:zBqHbtJ3nJn6HQnp6UW8pbQkR+U6tSRFd5CzfiKL3Kw= github.com/KyberNetwork/msgpack/v5 v5.4.2 h1:1RBX5AriCTNnXheBzV3/upOPr8QxjdGDSY1RQBPtnvM= @@ -26,15 +28,25 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= +github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= +github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.14.3 h1:Gd2c8lSNf9pKXom5JtD7AaKO8o7fGQ2LtFj1436qilA= github.com/bits-and-blooms/bitset v1.14.3/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bytedance/sonic v1.12.1 h1:jWl5Qz1fy7X1ioY74WqO0KjAMtAGQs4sYnjiEBiyX24= +github.com/bytedance/sonic v1.12.1/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= +github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= @@ -66,11 +78,10 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5il github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= -github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dgraph-io/ristretto v0.2.0 h1:XAfl+7cmoUDWW/2Lx8TGZQjjxIQ2Ley9DSf52dru4WE= +github.com/dgraph-io/ristretto v0.2.0/go.mod h1:8uBHCU/PBV4Ag0CJrP47b9Ofby5dqWNh4FicAdoqFNU= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/ethereum/c-kzg-4844 v1.0.3 h1:IEnbOHwjixW2cTvKRUlAAUOeleV7nNM/umJR+qy4WDs= @@ -79,6 +90,8 @@ github.com/ethereum/go-ethereum v1.14.12 h1:8hl57x77HSUo+cXExrURjU/w1VhL+ShCTJrT github.com/ethereum/go-ethereum v1.14.12/go.mod h1:RAC2gVMWJ6FkxSPESfbshrcKpIokgQKsVKmAuqdekDY= github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 h1:8NfxH2iXvJ60YRB8ChToFTUzl8awsc3cJ8CbLjGIl/A= github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -98,9 +111,6 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo= github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -116,8 +126,10 @@ github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= @@ -127,6 +139,12 @@ github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aN github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= +github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= @@ -138,8 +156,16 @@ github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= +github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -167,6 +193,11 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -211,8 +242,13 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk= @@ -223,6 +259,8 @@ github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZ github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= @@ -240,6 +278,8 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/arch v0.9.0 h1:ub9TgUInamJ8mrZIGlBG6/4TqWeMszd4N8lNorbrr6k= +golang.org/x/arch v0.9.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -298,7 +338,6 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -359,13 +398,14 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/pkg/liquidity-source/algebra/integral/pool_list_updater.go b/pkg/liquidity-source/algebra/integral/pool_list_updater.go index 9a51cfdb9..379cd7253 100644 --- a/pkg/liquidity-source/algebra/integral/pool_list_updater.go +++ b/pkg/liquidity-source/algebra/integral/pool_list_updater.go @@ -7,6 +7,7 @@ import ( "strconv" "github.com/KyberNetwork/blockchain-toolkit/integer" + "github.com/KyberNetwork/kutils" "github.com/KyberNetwork/logger" "github.com/goccy/go-json" "github.com/machinebox/graphql" @@ -147,8 +148,8 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte return nil, metadataBytes, err } - createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) - if !ok { + createdAtTimestamp, err := kutils.Atoi[int64](p.CreatedAtTimestamp) + if err != nil { return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", p.CreatedAtTimestamp, p.ID) } @@ -158,7 +159,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte AmplifiedTvl: 0, Exchange: d.config.DexID, Type: DexType, - Timestamp: createdAtTimestamp.Int64(), + Timestamp: createdAtTimestamp, Reserves: reserves, Tokens: tokens, StaticExtra: string(staticExtra), diff --git a/pkg/liquidity-source/algebra/v1/pool_list_updater.go b/pkg/liquidity-source/algebra/v1/pool_list_updater.go index 0c3ccb73e..947888d2c 100644 --- a/pkg/liquidity-source/algebra/v1/pool_list_updater.go +++ b/pkg/liquidity-source/algebra/v1/pool_list_updater.go @@ -6,6 +6,7 @@ import ( "math/big" "strconv" + "github.com/KyberNetwork/kutils" "github.com/KyberNetwork/logger" "github.com/goccy/go-json" "github.com/machinebox/graphql" @@ -137,10 +138,9 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte reserves = append(reserves, zeroString) } - createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) - if !ok { - return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", - p.CreatedAtTimestamp, p.ID) + createdAtTimestamp, err := kutils.Atoi[int64](p.CreatedAtTimestamp) + if err != nil { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", p.CreatedAtTimestamp, p.ID) } var newPool = entity.Pool{ @@ -149,7 +149,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte AmplifiedTvl: 0, Exchange: d.config.DexID, Type: DexTypeAlgebraV1, - Timestamp: createdAtTimestamp.Int64(), + Timestamp: createdAtTimestamp, Reserves: reserves, Tokens: tokens, } diff --git a/pkg/source/nuriv2/pools_list_updater.go b/pkg/source/nuriv2/pools_list_updater.go index e70f4b7be..5f80f26e6 100644 --- a/pkg/source/nuriv2/pools_list_updater.go +++ b/pkg/source/nuriv2/pools_list_updater.go @@ -8,6 +8,7 @@ import ( "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" + "github.com/KyberNetwork/kutils" "github.com/KyberNetwork/logger" "github.com/goccy/go-json" "github.com/machinebox/graphql" @@ -140,10 +141,9 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte reserves = append(reserves, zeroString) } - createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) - if !ok { - return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", - p.CreatedAtTimestamp, p.ID) + createdAtTimestamp, err := kutils.Atoi[int64](p.CreatedAtTimestamp) + if err != nil { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", p.CreatedAtTimestamp, p.ID) } var swapFee, _ = strconv.ParseFloat(p.FeeTier, 64) @@ -157,7 +157,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: swapFee, Exchange: d.config.DexID, Type: DexType, - Timestamp: createdAtTimestamp.Int64(), + Timestamp: createdAtTimestamp, Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), diff --git a/pkg/source/pancakev3/pools_list_updater.go b/pkg/source/pancakev3/pools_list_updater.go index 0768903d8..990716213 100644 --- a/pkg/source/pancakev3/pools_list_updater.go +++ b/pkg/source/pancakev3/pools_list_updater.go @@ -8,6 +8,7 @@ import ( "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" + "github.com/KyberNetwork/kutils" "github.com/KyberNetwork/logger" "github.com/goccy/go-json" "github.com/machinebox/graphql" @@ -149,10 +150,9 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte var swapFee, _ = strconv.ParseFloat(p.FeeTier, 64) - createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) - if !ok { - return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", - p.CreatedAtTimestamp, p.ID) + createdAtTimestamp, err := kutils.Atoi[int64](p.CreatedAtTimestamp) + if err != nil { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", p.CreatedAtTimestamp, p.ID) } extraBytes, _ := json.Marshal(extraField) @@ -164,7 +164,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: swapFee, Exchange: d.config.DexID, Type: DexTypePancakeV3, - Timestamp: createdAtTimestamp.Int64(), + Timestamp: createdAtTimestamp, Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), diff --git a/pkg/source/ramsesv2/pools_list_updater.go b/pkg/source/ramsesv2/pools_list_updater.go index 6c3a113e3..6e390019c 100644 --- a/pkg/source/ramsesv2/pools_list_updater.go +++ b/pkg/source/ramsesv2/pools_list_updater.go @@ -8,6 +8,7 @@ import ( "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" + "github.com/KyberNetwork/kutils" "github.com/KyberNetwork/logger" "github.com/goccy/go-json" "github.com/machinebox/graphql" @@ -142,10 +143,9 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte var swapFee, _ = strconv.ParseFloat(p.FeeTier, 64) - createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) - if !ok { - return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", - p.CreatedAtTimestamp, p.ID) + createdAtTimestamp, err := kutils.Atoi[int64](p.CreatedAtTimestamp) + if err != nil { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", p.CreatedAtTimestamp, p.ID) } extraBytes, _ := json.Marshal(extraField) @@ -157,7 +157,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: swapFee, Exchange: d.config.DexID, Type: DexTypeRamsesV2, - Timestamp: createdAtTimestamp.Int64(), + Timestamp: createdAtTimestamp, Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), diff --git a/pkg/source/slipstream/pools_list_updater.go b/pkg/source/slipstream/pools_list_updater.go index 78aa8b36e..c8a8a77d5 100644 --- a/pkg/source/slipstream/pools_list_updater.go +++ b/pkg/source/slipstream/pools_list_updater.go @@ -8,6 +8,7 @@ import ( "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" + "github.com/KyberNetwork/kutils" "github.com/KyberNetwork/logger" "github.com/goccy/go-json" "github.com/machinebox/graphql" @@ -148,10 +149,9 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte reserves = append(reserves, zeroString) } - createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) - if !ok { - return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", - p.CreatedAtTimestamp, p.ID) + createdAtTimestamp, err := kutils.Atoi[int64](p.CreatedAtTimestamp) + if err != nil { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", p.CreatedAtTimestamp, p.ID) } extraBytes, _ := json.Marshal(extraField) @@ -163,7 +163,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: 0, Exchange: d.config.DexID, Type: DexType, - Timestamp: createdAtTimestamp.Int64(), + Timestamp: createdAtTimestamp, Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), diff --git a/pkg/source/solidly-v3/pools_list_updater.go b/pkg/source/solidly-v3/pools_list_updater.go index 10f7d605e..b9b762a0c 100644 --- a/pkg/source/solidly-v3/pools_list_updater.go +++ b/pkg/source/solidly-v3/pools_list_updater.go @@ -8,6 +8,7 @@ import ( "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" + "github.com/KyberNetwork/kutils" "github.com/KyberNetwork/logger" "github.com/goccy/go-json" "github.com/machinebox/graphql" @@ -142,10 +143,9 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte var swapFee, _ = strconv.ParseFloat(p.FeeTier, 64) - createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) - if !ok { - return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", - p.CreatedAtTimestamp, p.ID) + createdAtTimestamp, err := kutils.Atoi[int64](p.CreatedAtTimestamp) + if err != nil { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", p.CreatedAtTimestamp, p.ID) } extraBytes, _ := json.Marshal(extraField) @@ -157,7 +157,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: swapFee, Exchange: d.config.DexID, Type: DexTypeSolidlyV3, - Timestamp: createdAtTimestamp.Int64(), + Timestamp: createdAtTimestamp, Reserves: reserves, Tokens: tokens, Extra: string(extraBytes), diff --git a/pkg/source/uniswapv3/pools_list_updater.go b/pkg/source/uniswapv3/pools_list_updater.go index 3648308ac..bdfde0f08 100644 --- a/pkg/source/uniswapv3/pools_list_updater.go +++ b/pkg/source/uniswapv3/pools_list_updater.go @@ -8,6 +8,7 @@ import ( "github.com/KyberNetwork/blockchain-toolkit/integer" "github.com/KyberNetwork/ethrpc" + "github.com/KyberNetwork/kutils" "github.com/KyberNetwork/logger" "github.com/goccy/go-json" "github.com/machinebox/graphql" @@ -149,10 +150,9 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte var swapFee, _ = strconv.ParseFloat(p.FeeTier, 64) - createdAtTimestamp, ok := new(big.Int).SetString(p.CreatedAtTimestamp, 10) - if !ok { - return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", - p.CreatedAtTimestamp, p.ID) + createdAtTimestamp, err := kutils.Atoi[int64](p.CreatedAtTimestamp) + if err != nil { + return nil, metadataBytes, fmt.Errorf("invalid CreatedAtTimestamp: %v, pool: %v", p.CreatedAtTimestamp, p.ID) } extraBytes, _ := json.Marshal(extraField) @@ -164,7 +164,7 @@ func (d *PoolsListUpdater) GetNewPools(ctx context.Context, metadataBytes []byte SwapFee: swapFee, Exchange: d.config.DexID, Type: DexTypeUniswapV3, - Timestamp: createdAtTimestamp.Int64(), + Timestamp: createdAtTimestamp, Reserves: reserves, Tokens: tokens, Extra: string(extraBytes),