Skip to content

Commit

Permalink
refactor: update module name
Browse files Browse the repository at this point in the history
  • Loading branch information
piavgh committed May 11, 2023
1 parent 0c57c65 commit 3c30f5f
Show file tree
Hide file tree
Showing 30 changed files with 51 additions and 621 deletions.
2 changes: 1 addition & 1 deletion entities/nearestusabletick.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package entities
import (
"math"

"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

/**
Expand Down
2 changes: 1 addition & 1 deletion entities/nearestusabletick_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

func TestNearestUsableTick(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions entities/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/daoleno/uniswap-sdk-core/entities"
"github.com/ethereum/go-ethereum/common"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/constants"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions entities/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/assert"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/constants"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions entities/position.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/daoleno/uniswap-sdk-core/entities"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/constants"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions entities/position_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/shopspring/decimal"
"github.com/stretchr/testify/assert"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/constants"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions entities/route_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/assert"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/constants"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion entities/ticklist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion entities/trade.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/daoleno/uniswap-sdk-core/entities"
"github.com/ethereum/go-ethereum/common"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions entities/trade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/assert"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/constants"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

var (
Expand Down
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
module github.com/KyberNetwork/promm-sdk-go
module github.com/KyberNetwork/elastic-go-sdk

go 1.17
go 1.20

replace (
github.com/daoleno/uniswap-sdk-core v0.1.5 => github.com/KyberNetwork/uniswap-sdk-core v0.1.5
)
replace github.com/daoleno/uniswap-sdk-core v0.1.5 => github.com/KyberNetwork/uniswap-sdk-core v0.1.5

require (
github.com/daoleno/uniswap-sdk-core v0.1.5
Expand Down
573 changes: 1 addition & 572 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions periphery/const_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
core "github.com/daoleno/uniswap-sdk-core/entities"
"github.com/ethereum/go-ethereum/common"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/promm-sdk-go/entities"
"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/constants"
"github.com/KyberNetwork/elastic-go-sdk/entities"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions periphery/nonfungible_position_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/promm-sdk-go/entities"
"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/constants"
"github.com/KyberNetwork/elastic-go-sdk/entities"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

//go:embed contracts/interfaces/INonfungiblePositionManager.sol/INonfungiblePositionManager.json
Expand Down
6 changes: 3 additions & 3 deletions periphery/nonfungible_position_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/stretchr/testify/assert"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/promm-sdk-go/entities"
"github.com/KyberNetwork/promm-sdk-go/utils"
"github.com/KyberNetwork/elastic-go-sdk/constants"
"github.com/KyberNetwork/elastic-go-sdk/entities"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions periphery/quoter.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import (
"math/big"
"reflect"

"github.com/KyberNetwork/promm-sdk-go/entities"
"github.com/KyberNetwork/promm-sdk-go/utils"
core "github.com/daoleno/uniswap-sdk-core/entities"
"github.com/ethereum/go-ethereum/common"

"github.com/KyberNetwork/elastic-go-sdk/entities"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

//go:embed contracts/lens/Quoter.sol/Quoter.json
Expand Down
5 changes: 3 additions & 2 deletions periphery/staker.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
_ "embed"
"math/big"

"github.com/KyberNetwork/promm-sdk-go/entities"
"github.com/KyberNetwork/promm-sdk-go/utils"
core "github.com/daoleno/uniswap-sdk-core/entities"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"

"github.com/KyberNetwork/elastic-go-sdk/entities"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

const INCENTIVE_KEY_ABI = "tuple(address rewardToken, address pool, uint256 startTime, uint256 endTime, address refundee)"
Expand Down
7 changes: 4 additions & 3 deletions periphery/swaprouter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"errors"
"math/big"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/promm-sdk-go/entities"
"github.com/KyberNetwork/promm-sdk-go/utils"
core "github.com/daoleno/uniswap-sdk-core/entities"
"github.com/ethereum/go-ethereum/common"

"github.com/KyberNetwork/elastic-go-sdk/constants"
"github.com/KyberNetwork/elastic-go-sdk/entities"
"github.com/KyberNetwork/elastic-go-sdk/utils"
)

//go:embed contracts/SwapRouter.sol/SwapRouter.json
Expand Down
2 changes: 1 addition & 1 deletion utils/compute_pool_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

/**
Expand Down
2 changes: 1 addition & 1 deletion utils/compute_pool_address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/assert"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

func TestComputePoolAddress(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion utils/encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

func TestEncodeSqrtRatioX96(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion utils/full_math.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package utils
import (
"math/big"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

func MulDivRoundingUp(a, b, denominator *big.Int) *big.Int {
Expand Down
2 changes: 1 addition & 1 deletion utils/liquidity_math.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package utils
import (
"math/big"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

func AddDelta(x, y *big.Int) *big.Int {
Expand Down
2 changes: 1 addition & 1 deletion utils/max_liquidity_for_amounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package utils
import (
"math/big"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

/**
Expand Down
2 changes: 1 addition & 1 deletion utils/most_significant_bit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/daoleno/uniswap-sdk-core/entities"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

var ErrInvalidInput = errors.New("invalid input")
Expand Down
2 changes: 1 addition & 1 deletion utils/price_tick_conversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/daoleno/uniswap-sdk-core/entities"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

/**
Expand Down
2 changes: 1 addition & 1 deletion utils/sqrtprice_math.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/daoleno/uniswap-sdk-core/entities"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion utils/swap_math.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package utils
import (
"math/big"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

var FeeUnits = new(big.Int).Exp(big.NewInt(10), big.NewInt(5), nil)
Expand Down
2 changes: 1 addition & 1 deletion utils/tick_math.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/daoleno/uniswap-sdk-core/entities"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion utils/tick_math_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/KyberNetwork/promm-sdk-go/constants"
"github.com/KyberNetwork/elastic-go-sdk/constants"
)

func TestGetSqrtRatioAtTick(t *testing.T) {
Expand Down

0 comments on commit 3c30f5f

Please sign in to comment.