Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch connect v2 to slinky v1 #2657

Merged
merged 13 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading