Skip to content

Commit 6792efe

Browse files
authored
refactor: remove unused MsgEmpty (#776)
* Remove MsgEmpty from proto * Remove related logic * Update CHANGELOG.md
1 parent 2357407 commit 6792efe

File tree

12 files changed

+13
-734
lines changed

12 files changed

+13
-734
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
4040
### Features
4141

4242
### Improvements
43+
* (x/auth) [\#776](https://github.com/line/lbm-sdk/pull/776) remove unused MsgEmpty
4344

4445
### Bug Fixes
4546
* (x/foundation) [\#772](https://github.com/line/lbm-sdk/pull/772) export x/foundation pool

docs/core/proto-docs.md

-57
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@
2626

2727
- [Query](#cosmos.auth.v1beta1.Query)
2828

29-
- [cosmos/auth/v1beta1/tx.proto](#cosmos/auth/v1beta1/tx.proto)
30-
- [MsgEmpty](#cosmos.auth.v1beta1.MsgEmpty)
31-
- [MsgEmptyResponse](#cosmos.auth.v1beta1.MsgEmptyResponse)
32-
33-
- [Msg](#cosmos.auth.v1beta1.Msg)
34-
3529
- [cosmos/authz/v1beta1/authz.proto](#cosmos/authz/v1beta1/authz.proto)
3630
- [GenericAuthorization](#cosmos.authz.v1beta1.GenericAuthorization)
3731
- [Grant](#cosmos.authz.v1beta1.Grant)
@@ -1598,57 +1592,6 @@ Since: cosmos-sdk 0.43 | GET|/cosmos/auth/v1beta1/accounts|
15981592

15991593

16001594

1601-
<a name="cosmos/auth/v1beta1/tx.proto"></a>
1602-
<p align="right"><a href="#top">Top</a></p>
1603-
1604-
## cosmos/auth/v1beta1/tx.proto
1605-
1606-
1607-
1608-
<a name="cosmos.auth.v1beta1.MsgEmpty"></a>
1609-
1610-
### MsgEmpty
1611-
MsgEmpty represents a message that doesn't do anything. Used to measure performance.
1612-
1613-
1614-
| Field | Type | Label | Description |
1615-
| ----- | ---- | ----- | ----------- |
1616-
| `from_address` | [string](#string) | | |
1617-
1618-
1619-
1620-
1621-
1622-
1623-
<a name="cosmos.auth.v1beta1.MsgEmptyResponse"></a>
1624-
1625-
### MsgEmptyResponse
1626-
MsgEmptyResponse defines the Msg/Empty response type.
1627-
1628-
1629-
1630-
1631-
1632-
<!-- end messages -->
1633-
1634-
<!-- end enums -->
1635-
1636-
<!-- end HasExtensions -->
1637-
1638-
1639-
<a name="cosmos.auth.v1beta1.Msg"></a>
1640-
1641-
### Msg
1642-
Msg defines the auth Msg service.
1643-
1644-
| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
1645-
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
1646-
| `Empty` | [MsgEmpty](#cosmos.auth.v1beta1.MsgEmpty) | [MsgEmptyResponse](#cosmos.auth.v1beta1.MsgEmptyResponse) | Empty defines a method that doesn't do anything. Used to measure performance. | |
1647-
1648-
<!-- end services -->
1649-
1650-
1651-
16521595
<a name="cosmos/authz/v1beta1/authz.proto"></a>
16531596
<p align="right"><a href="#top">Top</a></p>
16541597

proto/cosmos/auth/v1beta1/tx.proto

-23
This file was deleted.

x/auth/client/cli/tx.go

-54
This file was deleted.

x/auth/keeper/msg_server.go

-31
This file was deleted.

x/auth/module.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r
7474

7575
// GetTxCmd returns the root tx command for the auth module.
7676
func (AppModuleBasic) GetTxCmd() *cobra.Command {
77-
return cli.NewTxCmd()
77+
return nil
7878
}
7979

8080
// GetQueryCmd returns the root query command for the auth module.
@@ -128,7 +128,6 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd
128128
// RegisterServices registers a GRPC query service to respond to the
129129
// module-specific GRPC queries.
130130
func (am AppModule) RegisterServices(cfg module.Configurator) {
131-
types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.accountKeeper))
132131
types.RegisterQueryServer(cfg.QueryServer(), am.accountKeeper)
133132

134133
// m := keeper.NewMigrator(am.accountKeeper)

x/auth/types/codec.go

-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"github.com/line/lbm-sdk/codec/types"
66
cryptocodec "github.com/line/lbm-sdk/crypto/codec"
77
sdk "github.com/line/lbm-sdk/types"
8-
"github.com/line/lbm-sdk/types/msgservice"
98
"github.com/line/lbm-sdk/x/auth/legacy/legacytx"
109
authzcodec "github.com/line/lbm-sdk/x/authz/codec"
1110
govcodec "github.com/line/lbm-sdk/x/gov/codec"
@@ -19,19 +18,13 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
1918
cdc.RegisterInterface((*AccountI)(nil), nil)
2019
cdc.RegisterConcrete(&BaseAccount{}, "cosmos-sdk/BaseAccount", nil)
2120
cdc.RegisterConcrete(&ModuleAccount{}, "cosmos-sdk/ModuleAccount", nil)
22-
cdc.RegisterConcrete(&MsgEmpty{}, "cosmos-sdk/MsgEmpty", nil)
2321

2422
legacytx.RegisterLegacyAminoCodec(cdc)
2523
}
2624

2725
// RegisterInterfaces associates protoName with AccountI interface
2826
// and creates a registry of it's concrete implementations
2927
func RegisterInterfaces(registry types.InterfaceRegistry) {
30-
registry.RegisterImplementations((*sdk.Msg)(nil),
31-
&MsgEmpty{},
32-
)
33-
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
34-
3528
registry.RegisterInterface(
3629
"cosmos.auth.v1beta1.AccountI",
3730
(*AccountI)(nil),

x/auth/types/events.go

-7
This file was deleted.

x/auth/types/keys.go

-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ const (
1111
// StoreKey is string representation of the store key for auth
1212
StoreKey = "acc"
1313

14-
// RouterKey defines the module's message routing key
15-
RouterKey = ModuleName
16-
1714
// FeeCollectorName the root string for the fee collector account address
1815
FeeCollectorName = "fee_collector"
1916

x/auth/types/msgs.go

-45
This file was deleted.

x/auth/types/msgs_test.go

-55
This file was deleted.

0 commit comments

Comments
 (0)