From 44c2f6ef158e371c2acb23b91a350686310c070a Mon Sep 17 00:00:00 2001 From: Dat Luong Date: Mon, 2 Dec 2024 14:14:39 +0700 Subject: [PATCH] feat: add etherfivampire --- go.mod | 2 +- go.sum | 4 ++-- pkg/poolsimulators/poolsimulators.go | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index ff4f774..b221937 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ replace ( require ( github.com/KyberNetwork/kyber-trace-go v0.1.1 - github.com/KyberNetwork/kyberswap-dex-lib v0.80.8 + github.com/KyberNetwork/kyberswap-dex-lib v0.81.1 github.com/duoxehyon/mev-share-go v0.3.0 github.com/ethereum/go-ethereum v1.13.14 github.com/flashbots/mev-share-node v0.0.0-20230926173018-7862d944990a diff --git a/go.sum b/go.sum index 50a848c..6078acd 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/KyberNetwork/int256 v0.1.4 h1:SbnhxqcsZXrP+5pSkolpSo2ViEWiq3K/hjfl5OQ github.com/KyberNetwork/int256 v0.1.4/go.mod h1:qE/Ikpo86fn60sIB7CwcfiqJTjK2p+k+ASvuO79Rq4g= github.com/KyberNetwork/kyber-trace-go v0.1.1 h1:YgzZb7jSg0Rgj7zFv9zUnSlB13Iksv1eVO5MSWAvjmM= github.com/KyberNetwork/kyber-trace-go v0.1.1/go.mod h1:X6hVacmKMeOEOlFh4TyfEHaEVRerFQ5YLuQ4keRV3hw= -github.com/KyberNetwork/kyberswap-dex-lib v0.80.8 h1:tH25QLTAHWmsvLGxUXenVUrh8DU32oxVzxWjpWqELC0= -github.com/KyberNetwork/kyberswap-dex-lib v0.80.8/go.mod h1:CGzUYsj6FtsVf9NoyLgKEZTWMPwZy4lWqIXVvgbh/Dc= +github.com/KyberNetwork/kyberswap-dex-lib v0.81.1 h1:8+pncEqqMrDTczc+4phJIQZscWymXrEAlvsrB2+9P3Q= +github.com/KyberNetwork/kyberswap-dex-lib v0.81.1/go.mod h1:CGzUYsj6FtsVf9NoyLgKEZTWMPwZy4lWqIXVvgbh/Dc= 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/pancake-v3-sdk v0.2.0 h1:dd5k2Z223kkzSky8SFgRy2/eQGp4bf586SS71XqqBlM= diff --git a/pkg/poolsimulators/poolsimulators.go b/pkg/poolsimulators/poolsimulators.go index 1d66e33..6a372f3 100644 --- a/pkg/poolsimulators/poolsimulators.go +++ b/pkg/poolsimulators/poolsimulators.go @@ -3,6 +3,7 @@ package poolsimulators import ( "errors" "fmt" + etherfivampire "github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/etherfi/vampire" "math/big" ksent "github.com/KyberNetwork/kyberswap-dex-lib/pkg/entity" @@ -305,7 +306,7 @@ func PoolSimulatorFromPool(pool ksent.Pool, chainID uint) (pkgpool.IPoolSimulato case pooltypes.PoolTypes.SwaapV2: pSim, err = swaapv2.NewPoolSimulator(pool) case pooltypes.PoolTypes.EtherVista: - pSim, err = ethervista.NewPoolSimulator(pool) + pSim, err = ethervista.NewPoolSimulator(pool, valueobject.ChainID(chainID)) case pooltypes.PoolTypes.LitePSM: pSim, err = litepsm.NewPoolSimulator(pool) case pooltypes.PoolTypes.Integral: @@ -372,6 +373,8 @@ func PoolSimulatorFromPool(pool ksent.Pool, chainID uint) (pkgpool.IPoolSimulato pSim, err = sfrxeth.NewPoolSimulator(pool) case pooltypes.PoolTypes.SfrxETHConvertor: pSim, err = sfrxeth_convertor.NewPoolSimulator(pool) + case pooltypes.PoolTypes.EtherfiVampire: + pSim, err = etherfivampire.NewPoolSimulator(pool) default: err = fmt.Errorf("%w: %s %s", ErrPoolTypeNotSupported, pool.Type, pool.Address) }