Skip to content

Commit

Permalink
Switch connect v2 back to slinky v1 (#2657)
Browse files Browse the repository at this point in the history
(cherry picked from commit a3aea35)

# Conflicts:
#	protocol/docker-compose.yml
  • Loading branch information
chenyaoy authored and mergify[bot] committed Dec 16, 2024
1 parent 7389462 commit a39bb66
Show file tree
Hide file tree
Showing 77 changed files with 331 additions and 344 deletions.
7 changes: 3 additions & 4 deletions protocol/app/ante/market_update.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package ante

import (
"context"
"errors"
"fmt"
slinkytypes "github.com/skip-mev/slinky/pkg/types"

errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
slinkytypes "github.com/skip-mev/connect/v2/pkg/types"
mmtypes "github.com/skip-mev/connect/v2/x/marketmap/types"
mmtypes "github.com/skip-mev/slinky/x/marketmap/types"

slinkylibs "github.com/dydxprotocol/v4-chain/protocol/lib/slinky"
perpetualstypes "github.com/dydxprotocol/v4-chain/protocol/x/perpetuals/types"
Expand All @@ -20,7 +19,7 @@ var ErrRestrictedMarketUpdates = errors.New("cannot call MsgUpdateMarkets or Msg
"on a restricted market")

type MarketMapKeeper interface {
GetAllMarkets(ctx context.Context) (map[string]mmtypes.Market, error)
GetAllMarkets(ctx sdk.Context) (map[string]mmtypes.Market, error)
}

var (
Expand Down
4 changes: 2 additions & 2 deletions protocol/app/ante/market_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/cosmos/cosmos-sdk/types/tx/signing"
xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/skip-mev/connect/v2/pkg/types"
mmtypes "github.com/skip-mev/connect/v2/x/marketmap/types"
"github.com/skip-mev/slinky/pkg/types"
mmtypes "github.com/skip-mev/slinky/x/marketmap/types"
"github.com/stretchr/testify/require"

"github.com/dydxprotocol/v4-chain/protocol/app/ante"
Expand Down
26 changes: 13 additions & 13 deletions protocol/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ import (
vestmodule "github.com/dydxprotocol/v4-chain/protocol/x/vest"
vestmodulekeeper "github.com/dydxprotocol/v4-chain/protocol/x/vest/keeper"
vestmoduletypes "github.com/dydxprotocol/v4-chain/protocol/x/vest/types"
marketmapmodule "github.com/skip-mev/connect/v2/x/marketmap"
marketmapmodulekeeper "github.com/skip-mev/connect/v2/x/marketmap/keeper"
marketmapmoduletypes "github.com/skip-mev/connect/v2/x/marketmap/types"
marketmapmodule "github.com/skip-mev/slinky/x/marketmap"
marketmapmodulekeeper "github.com/skip-mev/slinky/x/marketmap/keeper"
marketmapmoduletypes "github.com/skip-mev/slinky/x/marketmap/types"

// IBC
ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts"
Expand All @@ -225,16 +225,16 @@ import (
"github.com/dydxprotocol/v4-chain/protocol/indexer/msgsender"

// Slinky
slinkyproposals "github.com/skip-mev/connect/v2/abci/proposals"
"github.com/skip-mev/connect/v2/abci/strategies/aggregator"
compression "github.com/skip-mev/connect/v2/abci/strategies/codec"
"github.com/skip-mev/connect/v2/abci/strategies/currencypair"
"github.com/skip-mev/connect/v2/abci/ve"
oracleconfig "github.com/skip-mev/connect/v2/oracle/config"
"github.com/skip-mev/connect/v2/pkg/math/voteweighted"
oracleclient "github.com/skip-mev/connect/v2/service/clients/oracle"
servicemetrics "github.com/skip-mev/connect/v2/service/metrics"
promserver "github.com/skip-mev/connect/v2/service/servers/prometheus"
slinkyproposals "github.com/skip-mev/slinky/abci/proposals"
"github.com/skip-mev/slinky/abci/strategies/aggregator"
compression "github.com/skip-mev/slinky/abci/strategies/codec"
"github.com/skip-mev/slinky/abci/strategies/currencypair"
"github.com/skip-mev/slinky/abci/ve"
oracleconfig "github.com/skip-mev/slinky/oracle/config"
"github.com/skip-mev/slinky/pkg/math/voteweighted"
oracleclient "github.com/skip-mev/slinky/service/clients/oracle"
servicemetrics "github.com/skip-mev/slinky/service/metrics"
promserver "github.com/skip-mev/slinky/service/servers/prometheus"

// Full Node Streaming
streaming "github.com/dydxprotocol/v4-chain/protocol/streaming"
Expand Down
2 changes: 1 addition & 1 deletion protocol/app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

marketmapmodule "github.com/skip-mev/connect/v2/x/marketmap"
marketmapmodule "github.com/skip-mev/slinky/x/marketmap"

evidencemodule "cosmossdk.io/x/evidence"
feegrantmodule "cosmossdk.io/x/feegrant/module"
Expand Down
2 changes: 1 addition & 1 deletion protocol/app/basic_manager/basic_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
subaccountsmodule "github.com/dydxprotocol/v4-chain/protocol/x/subaccounts"
vaultmodule "github.com/dydxprotocol/v4-chain/protocol/x/vault"
vestmodule "github.com/dydxprotocol/v4-chain/protocol/x/vest"
marketmapmodule "github.com/skip-mev/connect/v2/x/marketmap"
marketmapmodule "github.com/skip-mev/slinky/x/marketmap"

ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts"
"github.com/cosmos/ibc-go/v8/modules/apps/transfer"
Expand Down
2 changes: 1 addition & 1 deletion protocol/app/module_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
satypes "github.com/dydxprotocol/v4-chain/protocol/x/subaccounts/types"
vaultmoduletypes "github.com/dydxprotocol/v4-chain/protocol/x/vault/types"
vestmoduletypes "github.com/dydxprotocol/v4-chain/protocol/x/vest/types"
marketmapmoduletypes "github.com/skip-mev/connect/v2/x/marketmap/types"
marketmapmoduletypes "github.com/skip-mev/slinky/x/marketmap/types"

"golang.org/x/exp/maps"
)
Expand Down
2 changes: 1 addition & 1 deletion protocol/app/module_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
satypes "github.com/dydxprotocol/v4-chain/protocol/x/subaccounts/types"
vaultmoduletypes "github.com/dydxprotocol/v4-chain/protocol/x/vault/types"
vestmoduletypes "github.com/dydxprotocol/v4-chain/protocol/x/vest/types"
marketmapmoduletypes "github.com/skip-mev/connect/v2/x/marketmap/types"
marketmapmoduletypes "github.com/skip-mev/slinky/x/marketmap/types"
)

func TestModuleAccountsToAddresses(t *testing.T) {
Expand Down
28 changes: 14 additions & 14 deletions protocol/app/msgs/all_msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ var (
// AllTypeMessages is a list of all messages and types that are used in the app.
// This list comes from the app's `InterfaceRegistry`.
AllTypeMessages = map[string]struct{}{
// connect marketmap messages
"/connect.marketmap.v2.MsgCreateMarkets": {},
"/connect.marketmap.v2.MsgCreateMarketsResponse": {},
"/connect.marketmap.v2.MsgParams": {},
"/connect.marketmap.v2.MsgParamsResponse": {},
"/connect.marketmap.v2.MsgRemoveMarkets": {},
"/connect.marketmap.v2.MsgRemoveMarketsResponse": {},
"/connect.marketmap.v2.MsgRemoveMarketAuthorities": {},
"/connect.marketmap.v2.MsgRemoveMarketAuthoritiesResponse": {},
"/connect.marketmap.v2.MsgUpdateMarkets": {},
"/connect.marketmap.v2.MsgUpdateMarketsResponse": {},
"/connect.marketmap.v2.MsgUpsertMarkets": {},
"/connect.marketmap.v2.MsgUpsertMarketsResponse": {},

// auth
"/cosmos.auth.v1beta1.BaseAccount": {},
"/cosmos.auth.v1beta1.ModuleAccount": {},
Expand Down Expand Up @@ -407,6 +393,20 @@ var (
"/ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse": {},
"/ibc.applications.interchain_accounts.host.v1.MsgUpdateParams": {},
"/ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse": {},

// slinky marketmap messages
"/slinky.marketmap.v1.MsgCreateMarkets": {},
"/slinky.marketmap.v1.MsgCreateMarketsResponse": {},
"/slinky.marketmap.v1.MsgParams": {},
"/slinky.marketmap.v1.MsgParamsResponse": {},
"/slinky.marketmap.v1.MsgRemoveMarkets": {},
"/slinky.marketmap.v1.MsgRemoveMarketsResponse": {},
"/slinky.marketmap.v1.MsgRemoveMarketAuthorities": {},
"/slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse": {},
"/slinky.marketmap.v1.MsgUpdateMarkets": {},
"/slinky.marketmap.v1.MsgUpdateMarketsResponse": {},
"/slinky.marketmap.v1.MsgUpsertMarkets": {},
"/slinky.marketmap.v1.MsgUpsertMarketsResponse": {},
}

// DisallowMsgs are messages that cannot be externally submitted.
Expand Down
32 changes: 16 additions & 16 deletions protocol/app/msgs/normal_msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
listing "github.com/dydxprotocol/v4-chain/protocol/x/listing/types"
sending "github.com/dydxprotocol/v4-chain/protocol/x/sending/types"
vault "github.com/dydxprotocol/v4-chain/protocol/x/vault/types"
marketmapmoduletypes "github.com/skip-mev/connect/v2/x/marketmap/types"
marketmapmoduletypes "github.com/skip-mev/slinky/x/marketmap/types"
)

var (
// NormalMsgs are messages that can be submitted by external users.
NormalMsgs = lib.MergeAllMapsMustHaveDistinctKeys(NormalMsgsDefault, NormalMsgsDydxCustom, NormalMsgsConnect)
NormalMsgs = lib.MergeAllMapsMustHaveDistinctKeys(NormalMsgsDefault, NormalMsgsDydxCustom, NormalMsgsSlinky)

// Default modules
NormalMsgsDefault = map[string]sdk.Msg{
Expand Down Expand Up @@ -267,19 +267,19 @@ var (
"/dydxprotocol.vault.MsgWithdrawFromMegavaultResponse": nil,
}

NormalMsgsConnect = map[string]sdk.Msg{
// connect marketmap messages
"/connect.marketmap.v2.MsgCreateMarkets": &marketmapmoduletypes.MsgCreateMarkets{},
"/connect.marketmap.v2.MsgCreateMarketsResponse": nil,
"/connect.marketmap.v2.MsgParams": &marketmapmoduletypes.MsgParams{},
"/connect.marketmap.v2.MsgParamsResponse": nil,
"/connect.marketmap.v2.MsgRemoveMarketAuthorities": &marketmapmoduletypes.MsgRemoveMarketAuthorities{},
"/connect.marketmap.v2.MsgRemoveMarketAuthoritiesResponse": nil,
"/connect.marketmap.v2.MsgRemoveMarkets": &marketmapmoduletypes.MsgRemoveMarkets{},
"/connect.marketmap.v2.MsgRemoveMarketsResponse": nil,
"/connect.marketmap.v2.MsgUpdateMarkets": &marketmapmoduletypes.MsgUpdateMarkets{},
"/connect.marketmap.v2.MsgUpdateMarketsResponse": nil,
"/connect.marketmap.v2.MsgUpsertMarkets": &marketmapmoduletypes.MsgUpsertMarkets{},
"/connect.marketmap.v2.MsgUpsertMarketsResponse": nil,
NormalMsgsSlinky = map[string]sdk.Msg{
// slinky marketmap messages
"/slinky.marketmap.v1.MsgCreateMarkets": &marketmapmoduletypes.MsgCreateMarkets{},
"/slinky.marketmap.v1.MsgCreateMarketsResponse": nil,
"/slinky.marketmap.v1.MsgParams": &marketmapmoduletypes.MsgParams{},
"/slinky.marketmap.v1.MsgParamsResponse": nil,
"/slinky.marketmap.v1.MsgRemoveMarkets": &marketmapmoduletypes.MsgRemoveMarkets{},
"/slinky.marketmap.v1.MsgRemoveMarketsResponse": nil,
"/slinky.marketmap.v1.MsgRemoveMarketAuthorities": &marketmapmoduletypes.MsgRemoveMarketAuthorities{},
"/slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse": nil,
"/slinky.marketmap.v1.MsgUpdateMarkets": &marketmapmoduletypes.MsgUpdateMarkets{},
"/slinky.marketmap.v1.MsgUpdateMarketsResponse": nil,
"/slinky.marketmap.v1.MsgUpsertMarkets": &marketmapmoduletypes.MsgUpsertMarkets{},
"/slinky.marketmap.v1.MsgUpsertMarketsResponse": nil,
}
)
28 changes: 14 additions & 14 deletions protocol/app/msgs/normal_msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,6 @@ import (

func TestNormalMsgs_Key(t *testing.T) {
expectedMsgs := []string{
// connect marketmap messages
"/connect.marketmap.v2.MsgCreateMarkets",
"/connect.marketmap.v2.MsgCreateMarketsResponse",
"/connect.marketmap.v2.MsgParams",
"/connect.marketmap.v2.MsgParamsResponse",
"/connect.marketmap.v2.MsgRemoveMarketAuthorities",
"/connect.marketmap.v2.MsgRemoveMarketAuthoritiesResponse",
"/connect.marketmap.v2.MsgRemoveMarkets",
"/connect.marketmap.v2.MsgRemoveMarketsResponse",
"/connect.marketmap.v2.MsgUpdateMarkets",
"/connect.marketmap.v2.MsgUpdateMarketsResponse",
"/connect.marketmap.v2.MsgUpsertMarkets",
"/connect.marketmap.v2.MsgUpsertMarketsResponse",

// auth
"/cosmos.auth.v1beta1.BaseAccount",
"/cosmos.auth.v1beta1.ModuleAccount",
Expand Down Expand Up @@ -253,6 +239,20 @@ func TestNormalMsgs_Key(t *testing.T) {
"/ibc.lightclients.tendermint.v1.ConsensusState",
"/ibc.lightclients.tendermint.v1.Header",
"/ibc.lightclients.tendermint.v1.Misbehaviour",

// slinky marketmap messages
"/slinky.marketmap.v1.MsgCreateMarkets",
"/slinky.marketmap.v1.MsgCreateMarketsResponse",
"/slinky.marketmap.v1.MsgParams",
"/slinky.marketmap.v1.MsgParamsResponse",
"/slinky.marketmap.v1.MsgRemoveMarketAuthorities",
"/slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse",
"/slinky.marketmap.v1.MsgRemoveMarkets",
"/slinky.marketmap.v1.MsgRemoveMarketsResponse",
"/slinky.marketmap.v1.MsgUpdateMarkets",
"/slinky.marketmap.v1.MsgUpdateMarketsResponse",
"/slinky.marketmap.v1.MsgUpsertMarkets",
"/slinky.marketmap.v1.MsgUpsertMarketsResponse",
}

require.Equal(t, expectedMsgs, lib.GetSortedKeys[sort.StringSlice](msgs.NormalMsgs))
Expand Down
2 changes: 1 addition & 1 deletion protocol/app/prepare/prepare_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/dydxprotocol/v4-chain/protocol/app/prepare/prices"
"github.com/dydxprotocol/v4-chain/protocol/lib/metrics"
pricetypes "github.com/dydxprotocol/v4-chain/protocol/x/prices/types"
"github.com/skip-mev/connect/v2/abci/ve"
"github.com/skip-mev/slinky/abci/ve"
)

var (
Expand Down
14 changes: 7 additions & 7 deletions protocol/app/prepare/prepare_proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import (
clobtypes "github.com/dydxprotocol/v4-chain/protocol/x/clob/types"
perpetualtypes "github.com/dydxprotocol/v4-chain/protocol/x/perpetuals/types"
pricestypes "github.com/dydxprotocol/v4-chain/protocol/x/prices/types"
"github.com/skip-mev/connect/v2/abci/strategies/aggregator"
aggregatormock "github.com/skip-mev/connect/v2/abci/strategies/aggregator/mocks"
"github.com/skip-mev/connect/v2/abci/strategies/codec"
strategymock "github.com/skip-mev/connect/v2/abci/strategies/currencypair/mocks"
slinkytestutils "github.com/skip-mev/connect/v2/abci/testutils"
vetypes "github.com/skip-mev/connect/v2/abci/ve/types"
oracletypes "github.com/skip-mev/connect/v2/pkg/types"
"github.com/skip-mev/slinky/abci/strategies/aggregator"
aggregatormock "github.com/skip-mev/slinky/abci/strategies/aggregator/mocks"
"github.com/skip-mev/slinky/abci/strategies/codec"
strategymock "github.com/skip-mev/slinky/abci/strategies/currencypair/mocks"
slinkytestutils "github.com/skip-mev/slinky/abci/testutils"
vetypes "github.com/skip-mev/slinky/abci/ve/types"
oracletypes "github.com/skip-mev/slinky/pkg/types"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
)
Expand Down
8 changes: 4 additions & 4 deletions protocol/app/prepare/prices/slinky_price_update_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
pricestypes "github.com/dydxprotocol/v4-chain/protocol/x/prices/types"
"github.com/skip-mev/connect/v2/abci/strategies/aggregator"
"github.com/skip-mev/connect/v2/abci/strategies/codec"
"github.com/skip-mev/connect/v2/abci/strategies/currencypair"
"github.com/skip-mev/connect/v2/abci/ve"
"github.com/skip-mev/slinky/abci/strategies/aggregator"
"github.com/skip-mev/slinky/abci/strategies/codec"
"github.com/skip-mev/slinky/abci/strategies/currencypair"
"github.com/skip-mev/slinky/abci/ve"
)

// SlinkyPriceUpdateGenerator is an implementation of the PriceUpdateGenerator interface. This implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
cmtabci "github.com/cometbft/cometbft/abci/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/dydxprotocol/v4-chain/protocol/app/prepare/prices"
"github.com/skip-mev/connect/v2/abci/strategies/aggregator"
aggregatormock "github.com/skip-mev/connect/v2/abci/strategies/aggregator/mocks"
codecmock "github.com/skip-mev/connect/v2/abci/strategies/codec/mocks"
strategymock "github.com/skip-mev/connect/v2/abci/strategies/currencypair/mocks"
"github.com/skip-mev/connect/v2/abci/testutils"
vetypes "github.com/skip-mev/connect/v2/abci/ve/types"
oracletypes "github.com/skip-mev/connect/v2/pkg/types"
"github.com/skip-mev/slinky/abci/strategies/aggregator"
aggregatormock "github.com/skip-mev/slinky/abci/strategies/aggregator/mocks"
codecmock "github.com/skip-mev/slinky/abci/strategies/codec/mocks"
strategymock "github.com/skip-mev/slinky/abci/strategies/currencypair/mocks"
"github.com/skip-mev/slinky/abci/testutils"
vetypes "github.com/skip-mev/slinky/abci/ve/types"
oracletypes "github.com/skip-mev/slinky/pkg/types"
"github.com/stretchr/testify/suite"
"math/big"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion protocol/app/process/slinky_market_price_decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/skip-mev/connect/v2/abci/ve"
"github.com/skip-mev/slinky/abci/ve"

"github.com/dydxprotocol/v4-chain/protocol/app/constants"
"github.com/dydxprotocol/v4-chain/protocol/app/prepare/prices"
Expand Down
2 changes: 1 addition & 1 deletion protocol/app/process/slinky_market_price_decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/skip-mev/connect/v2/abci/testutils"
"github.com/skip-mev/slinky/abci/testutils"
"github.com/stretchr/testify/suite"

"github.com/dydxprotocol/v4-chain/protocol/app/constants"
Expand Down
4 changes: 2 additions & 2 deletions protocol/app/upgrades/v6.0.0/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package v_6_0_0

import (
store "cosmossdk.io/store/types"
slinkytypes "github.com/skip-mev/connect/v2/pkg/types"
marketmapmoduletypes "github.com/skip-mev/connect/v2/x/marketmap/types"
slinkytypes "github.com/skip-mev/slinky/pkg/types"
marketmapmoduletypes "github.com/skip-mev/slinky/x/marketmap/types"

"github.com/dydxprotocol/v4-chain/protocol/app/upgrades"
accountplustypes "github.com/dydxprotocol/v4-chain/protocol/x/accountplus/types"
Expand Down
8 changes: 4 additions & 4 deletions protocol/app/upgrades/v6.0.0/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
revsharetypes "github.com/dydxprotocol/v4-chain/protocol/x/revshare/types"
vaultkeeper "github.com/dydxprotocol/v4-chain/protocol/x/vault/keeper"
vaulttypes "github.com/dydxprotocol/v4-chain/protocol/x/vault/types"
"github.com/skip-mev/connect/v2/providers/apis/dydx"
dydxtypes "github.com/skip-mev/connect/v2/providers/apis/dydx/types"
marketmapkeeper "github.com/skip-mev/connect/v2/x/marketmap/keeper"
marketmaptypes "github.com/skip-mev/connect/v2/x/marketmap/types"
"github.com/skip-mev/slinky/providers/apis/dydx"
dydxtypes "github.com/skip-mev/slinky/providers/apis/dydx/types"
marketmapkeeper "github.com/skip-mev/slinky/x/marketmap/keeper"
marketmaptypes "github.com/skip-mev/slinky/x/marketmap/types"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
Expand Down
5 changes: 2 additions & 3 deletions protocol/app/vote_extensions/expected_keepers.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package vote_extensions

import (
"context"
sdk "github.com/cosmos/cosmos-sdk/types"
oracletypes "github.com/skip-mev/connect/v2/pkg/types"
oracletypes "github.com/skip-mev/slinky/pkg/types"

pricestypes "github.com/dydxprotocol/v4-chain/protocol/x/prices/types"
)

// PricesKeeper is the expected interface for the x/price keeper used by the vote extension handlers
type PricesKeeper interface {
GetCurrencyPairFromID(ctx context.Context, id uint64) (cp oracletypes.CurrencyPair, found bool)
GetCurrencyPairFromID(ctx sdk.Context, id uint64) (cp oracletypes.CurrencyPair, found bool)
GetValidMarketPriceUpdates(ctx sdk.Context) *pricestypes.MsgUpdateMarketPrices
UpdateMarketPrices(
ctx sdk.Context,
Expand Down
5 changes: 2 additions & 3 deletions protocol/app/vote_extensions/extend_vote_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package vote_extensions

import (
"fmt"
slinkytypes "github.com/skip-mev/connect/v2/pkg/types"
slinkytypes "github.com/skip-mev/slinky/pkg/types"
"math/big"

cometabci "github.com/cometbft/cometbft/abci/types"
Expand Down Expand Up @@ -38,8 +38,7 @@ func (n NoopPriceApplier) GetPricesForValidator(_ sdk.ConsAddress) map[slinkytyp
// latest available market prices
// 4. Calling the Slinky ExtendVoteHandler to handle the rest of ExtendVote
//
// See
// https://github.com/skip-mev/connect/v2/blob/a5b1d3d3a2723e4746b5d588c512d7cc052dc0ff/abci/ve/vote_extension.go#L77
// See https://github.com/skip-mev/slinky/blob/a5b1d3d3a2723e4746b5d588c512d7cc052dc0ff/abci/ve/vote_extension.go#L77
// for the Slinky ExtendVoteHandler logic.
func (e *ExtendVoteHandler) ExtendVoteHandler() sdk.ExtendVoteHandler {
return func(ctx sdk.Context, req *cometabci.RequestExtendVote) (resp *cometabci.ResponseExtendVote, err error) {
Expand Down
Loading

0 comments on commit a39bb66

Please sign in to comment.