diff --git a/protocol/app/msgs/internal_msgs.go b/protocol/app/msgs/internal_msgs.go index 9c0e58f9f6..8587ff5e4c 100644 --- a/protocol/app/msgs/internal_msgs.go +++ b/protocol/app/msgs/internal_msgs.go @@ -156,10 +156,12 @@ var ( "/dydxprotocol.govplus.MsgSlashValidatorResponse": nil, // listing - "/dydxprotocol.listing.MsgSetMarketsHardCap": &listing.MsgSetMarketsHardCap{}, - "/dydxprotocol.listing.MsgSetMarketsHardCapResponse": nil, - "/dydxprotocol.listing.MsgSetListingVaultDepositParams": &listing.MsgSetListingVaultDepositParams{}, - "/dydxprotocol.listing.MsgSetListingVaultDepositParamsResponse": nil, + "/dydxprotocol.listing.MsgSetMarketsHardCap": &listing.MsgSetMarketsHardCap{}, + "/dydxprotocol.listing.MsgSetMarketsHardCapResponse": nil, + "/dydxprotocol.listing.MsgSetListingVaultDepositParams": &listing.MsgSetListingVaultDepositParams{}, + "/dydxprotocol.listing.MsgSetListingVaultDepositParamsResponse": nil, + "/dydxprotocol.listing.MsgUpgradeIsolatedPerpetualToCross": &listing.MsgUpgradeIsolatedPerpetualToCross{}, + "/dydxprotocol.listing.MsgUpgradeIsolatedPerpetualToCrossResponse": nil, // perpetuals "/dydxprotocol.perpetuals.MsgCreatePerpetual": &perpetuals.MsgCreatePerpetual{}, diff --git a/protocol/app/msgs/internal_msgs_test.go b/protocol/app/msgs/internal_msgs_test.go index 70e3549fe5..00bcbdc912 100644 --- a/protocol/app/msgs/internal_msgs_test.go +++ b/protocol/app/msgs/internal_msgs_test.go @@ -116,6 +116,8 @@ func TestInternalMsgSamples_Gov_Key(t *testing.T) { "/dydxprotocol.listing.MsgSetListingVaultDepositParamsResponse", "/dydxprotocol.listing.MsgSetMarketsHardCap", "/dydxprotocol.listing.MsgSetMarketsHardCapResponse", + "/dydxprotocol.listing.MsgUpgradeIsolatedPerpetualToCross", + "/dydxprotocol.listing.MsgUpgradeIsolatedPerpetualToCrossResponse", // perpeutals "/dydxprotocol.perpetuals.MsgCreatePerpetual", diff --git a/protocol/app/msgs/unsupported_msgs.go b/protocol/app/msgs/unsupported_msgs.go index 7b24098a9a..885917819c 100644 --- a/protocol/app/msgs/unsupported_msgs.go +++ b/protocol/app/msgs/unsupported_msgs.go @@ -5,7 +5,6 @@ import ( gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govbeta "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" - listingtypes "github.com/dydxprotocol/v4-chain/protocol/x/listing/types" vaulttypes "github.com/dydxprotocol/v4-chain/protocol/x/vault/types" ) @@ -31,11 +30,6 @@ var ( MsgUpdateParams{}, "/ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse": nil, - // WIP - "/dydxprotocol.listing.MsgUpgradeIsolatedPerpetualToCross": &listingtypes. - MsgUpgradeIsolatedPerpetualToCross{}, - "/dydxprotocol.listing.MsgUpgradeIsolatedPerpetualToCrossResponse": nil, - // vault // MsgSetVaultQuotingParams is deprecated since v6.x and replaced by MsgSetVaultParams. // nolint:staticcheck diff --git a/protocol/app/msgs/unsupported_msgs_test.go b/protocol/app/msgs/unsupported_msgs_test.go index 8f3b329f35..3ba4e9041f 100644 --- a/protocol/app/msgs/unsupported_msgs_test.go +++ b/protocol/app/msgs/unsupported_msgs_test.go @@ -19,10 +19,6 @@ func TestUnsupportedMsgSamples_Key(t *testing.T) { "/dydxprotocol.vault.MsgSetVaultQuotingParams", "/dydxprotocol.vault.MsgUpdateParams", - // WIP - "/dydxprotocol.listing.MsgUpgradeIsolatedPerpetualToCross", - "/dydxprotocol.listing.MsgUpgradeIsolatedPerpetualToCrossResponse", - // ICA Controller messages "/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount", "/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse", diff --git a/protocol/lib/ante/internal_msg.go b/protocol/lib/ante/internal_msg.go index 4d578d4f10..3e1b44a917 100644 --- a/protocol/lib/ante/internal_msg.go +++ b/protocol/lib/ante/internal_msg.go @@ -103,6 +103,7 @@ func IsInternalMsg(msg sdk.Msg) bool { // listing *listing.MsgSetMarketsHardCap, *listing.MsgSetListingVaultDepositParams, + *listing.MsgUpgradeIsolatedPerpetualToCross, // perpetuals *perpetuals.MsgCreatePerpetual, diff --git a/protocol/lib/ante/nested_msg_test.go b/protocol/lib/ante/nested_msg_test.go index a3f4dea79b..0a98a94b84 100644 --- a/protocol/lib/ante/nested_msg_test.go +++ b/protocol/lib/ante/nested_msg_test.go @@ -12,7 +12,6 @@ import ( "github.com/dydxprotocol/v4-chain/protocol/lib" "github.com/dydxprotocol/v4-chain/protocol/lib/ante" testmsgs "github.com/dydxprotocol/v4-chain/protocol/testutil/msgs" - listingtypes "github.com/dydxprotocol/v4-chain/protocol/x/listing/types" vaulttypes "github.com/dydxprotocol/v4-chain/protocol/x/vault/types" "github.com/stretchr/testify/require" @@ -77,8 +76,7 @@ func TestIsDydxMsg_Invalid(t *testing.T) { // nolint:staticcheck "/dydxprotocol.vault.MsgSetVaultQuotingParams": &vaulttypes.MsgSetVaultQuotingParams{}, // nolint:staticcheck - "/dydxprotocol.vault.MsgUpdateParams": &vaulttypes.MsgUpdateParams{}, - "/dydxprotocol.listing.MsgUpgradeIsolatedPerpetualToCross": &listingtypes.MsgUpgradeIsolatedPerpetualToCross{}, + "/dydxprotocol.vault.MsgUpdateParams": &vaulttypes.MsgUpdateParams{}, }, ) allMsgsMinusDydx := lib.MergeAllMapsMustHaveDistinctKeys(appmsgs.AllowMsgs, appmsgs.DisallowMsgs) diff --git a/protocol/lib/ante/unsupported_msgs.go b/protocol/lib/ante/unsupported_msgs.go index ea49127c85..8dd69cdf6d 100644 --- a/protocol/lib/ante/unsupported_msgs.go +++ b/protocol/lib/ante/unsupported_msgs.go @@ -5,7 +5,6 @@ import ( gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govbeta "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" - listingtypes "github.com/dydxprotocol/v4-chain/protocol/x/listing/types" vaulttypes "github.com/dydxprotocol/v4-chain/protocol/x/vault/types" ) @@ -26,9 +25,7 @@ func IsUnsupportedMsg(msg sdk.Msg) bool { // nolint:staticcheck *vaulttypes.MsgSetVaultQuotingParams, // nolint:staticcheck - *vaulttypes.MsgUpdateParams, - // WIP - *listingtypes.MsgUpgradeIsolatedPerpetualToCross: + *vaulttypes.MsgUpdateParams: return true } return false