From c774ff0866d6a3141d88fc8a09d5eb1ee1b6c0d0 Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Thu, 4 Jul 2024 09:13:31 +0800 Subject: [PATCH] cleanup unused code --- x/onion/client/cli/tx.go | 2 -- x/onion/keeper/ante_test.go | 2 +- x/onion/types/errors.go | 20 -------------------- x/onion/types/genesis.go | 3 ++- 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/x/onion/client/cli/tx.go b/x/onion/client/cli/tx.go index a5021552..a4dfc31c 100644 --- a/x/onion/client/cli/tx.go +++ b/x/onion/client/cli/tx.go @@ -18,8 +18,6 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) -var FlagSplit = "split" - // NewTxCmd returns a root CLI command handler for all x/bank transaction commands. func NewTxCmd() *cobra.Command { txCmd := &cobra.Command{ diff --git a/x/onion/keeper/ante_test.go b/x/onion/keeper/ante_test.go index 1e549761..adcc5968 100644 --- a/x/onion/keeper/ante_test.go +++ b/x/onion/keeper/ante_test.go @@ -78,7 +78,7 @@ func (s *KeeperTestSuite) TestExecuteAnte() { // check account set in account module acc1 := s.App.AccountKeeper.GetAccount(s.Ctx, addr1) s.Require().NotNil(acc1) - // check sequence increased + // check sequence increase seq, err := s.App.OnionKeeper.GetSequence(s.Ctx, addr1.String()) s.Require().NoError(err) s.Require().Equal(seq.Sequence, uint64(1)) diff --git a/x/onion/types/errors.go b/x/onion/types/errors.go index 31722619..ab1254f4 100644 --- a/x/onion/types/errors.go +++ b/x/onion/types/errors.go @@ -1,21 +1 @@ package types - -import ( - errorsmod "cosmossdk.io/errors" -) - -var ( - ErrBadMetadataFormatMsg = "wasm metadata not properly formatted for: '%v'. %s" - ErrBadExecutionMsg = "cannot execute contract: %v" - - ErrMsgValidation = errorsmod.Register("wasm-hooks", 2, "error in wasmhook message validation") - ErrMarshaling = errorsmod.Register("wasm-hooks", 3, "cannot marshal the ICS20 packet") - ErrInvalidPacket = errorsmod.Register("wasm-hooks", 4, "invalid packet data") - ErrBadResponse = errorsmod.Register("wasm-hooks", 5, "cannot create response") - ErrWasmError = errorsmod.Register("wasm-hooks", 6, "wasm error") - ErrBadSender = errorsmod.Register("wasm-hooks", 7, "bad sender") - ErrAckFromContract = errorsmod.Register("wasm-hooks", 8, "contract returned error ack") - ErrAsyncAckNotAllowed = errorsmod.Register("wasm-hooks", 9, "contract not allowed to send async acks") - ErrAckPacketMismatch = errorsmod.Register("wasm-hooks", 10, "packet does not match the expected packet") - ErrInvalidContractAddr = errorsmod.Register("wasm-hooks", 11, "invalid contract address") -) diff --git a/x/onion/types/genesis.go b/x/onion/types/genesis.go index dd111be6..980e39e2 100644 --- a/x/onion/types/genesis.go +++ b/x/onion/types/genesis.go @@ -3,7 +3,8 @@ package types // DefaultGenesis returns the default GenesisState for the concentrated-liquidity module. func DefaultGenesis() *GenesisState { return &GenesisState{ - Params: DefaultParams(), + Params: DefaultParams(), + Sequences: []OnionSequence{}, } }