Skip to content

Commit 8d901ea

Browse files
Remove the tokenfactory module behind the v6.8 upgrade (#4536)
Tokenfactory is still a fully live module on main. Anyone can create, mint, burn and re-admin `factory/` denoms, CosmWasm contracts reach it through the `create_denom`, `mint_tokens`, `burn_tokens`, `change_admin` and `set_metadata` custom messages and the `tokenfactory` query route, and both bank keepers enforce its per-denom transfer allowlists. Only its unused governance route is gone so far (#4431). This removes the module outright behind the `v6.8` upgrade, the same way #4319 removed oracle. `x/tokenfactory` and `proto/tokenfactory` are deleted and the module is unwired from `app.New`. `retiredtokenfactory.ModuleName` joins `v68DeletedStores`, so the store loader deletes the `tokenfactory` store at the upgrade height and the handler drops its version-map entry. The handler also deletes the module's parameter subspace from the params store with `pruneTokenfactoryParams` (on v6.7 that is `tokenfactory/allowlistmaxsize`), so none of its state outlives it. The module account joins `retiredModuleAccounts` so its address stays blocked from receiving funds. The six Msg types move to a decode-only `app/retiredtokenfactory` package with the same type URLs and amino names, so historical blocks still decode for tx queries and `debug_trace*`. Their `ValidateBasic` returns `ErrDeprecated` (codespace `tokenfactory`, code 26, because codes 2 to 25 keep their historical meanings), so a new tokenfactory transaction is refused at CheckTx without paying a fee, and `retiredtokenfactory_test.go` pins their amino sign bytes against bytes captured from the removed module. The `factory/` transfer allowlist (`IsInDenomAllowList` and its setters) goes from both `sei-cosmos/x/bank` and `giga/deps/xbank`, and `pruneDenomAllowLists` deletes the stored entries in the v6.8 handler. Pacific-1 holds only two: a test denom restricted to its own creator and an empty list, so lifting the check changes nothing for a real token. The `AllowList` proto type stays in the sei-cosmos `bank.proto` because the retired `MsgCreateDenom` and `MsgUpdateDenom` reference it, while giga's unused generated copy of it is removed. Giga's embedded `bank.proto` descriptor is left as is: it registers under the same file name as the sei-cosmos one, so it has to keep describing `AllowList` whichever registration wins. Contracts that send tokenfactory messages or queries now get the existing "Unknown Sei Wasm Message" and "Unknown Sei Query Route" errors. This is app-hash breaking at the v6.8 height, and unlike oracle there was no deprecation phase: from that height anything still creating, minting or burning `factory/` denoms stops working, while existing balances stay in bank, remain transferable, and have a frozen supply. The part to scrutinise is `evmrpc/tests/regression_test.go`: two pacific-1 fixtures (`0x29b9…`, `0x534a…`) executed a CosmWasm contract through the wasmd precompile that emitted tokenfactory messages, so they now trace as reverted with different gas, and they move the way #4230's pointer-creation fixtures did. A third fixture, `0xc2da…`, calls the same contract but has traced as a revert since #4202, so its gas is unchanged and it now asserts the revert. More generally, tracing a pre-v6.8 block no longer reproduces mainnet where a tokenfactory transaction changed state that a later EVM transaction in the same block read, the limitation the oracle and vesting retirements already accepted. Fixtures that created tokenfactory denoms now use genesis `uatom`, the authz generic-grant test grants `MsgSend` instead, and the tokenfactory YAML suite, which CI never ran, is deleted. Validated with the v6.8-tagged and untagged `app` tests, the bank, giga, wasmbinding, evmrpc, `x/`, precompile, occ and testutil packages, golangci-lint, `make fmtcheck`, and `make upgrade-test-offline` from `release/v6.7`, whose fixture snapshots the params store so a v6.7-written database shows the parameter prune touches nothing else; the cross-version and docker-cluster suites have not run yet. --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a47089b commit 8d901ea

99 files changed

Lines changed: 811 additions & 11382 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/integration-test-matrix.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,10 @@
6464
]
6565
},
6666
{
67-
"_comment": "Suites: SeiDB State Store, Mint & Staking & Bank, Distribution. SeiDB State Store runs first because it asserts absolute wasm code counts (genesis + its own fixtures). TestMintModule asserts an absolute usei total supply, so nothing upstream of it in this row may mint or burn usei (SeiDB SS is safe today: fees are not burned and tokenfactory creation does not burn usei).",
67+
"_comment": "Suites: SeiDB State Store, Mint & Staking & Bank, Distribution. SeiDB State Store runs first because it asserts absolute wasm code counts (genesis + its own fixtures). TestMintModule asserts an absolute usei total supply, so nothing upstream of it in this row may mint or burn usei (SeiDB SS is safe today: fees are not burned).",
6868
"name": "Cosmos Modules (SeiDB SS, Mint & Staking & Bank, Distribution)",
6969
"scripts": [
7070
"docker exec sei-node-0 integration_test/contracts/deploy_wasm_contracts.sh",
71-
"docker exec sei-node-0 integration_test/contracts/create_tokenfactory_denoms.sh",
7271
"go test -tags yaml_integration -v -timeout $JOB_TIMEOUT ./integration_test/runner/... -run TestSeiDBStateStore",
7372
"go test -tags yaml_integration -v -timeout $JOB_TIMEOUT ./integration_test/runner/... -run \"TestMintModule|TestStakingModule|TestBankModule\"",
7473
"go test -tags yaml_integration -v -timeout $JOB_TIMEOUT ./integration_test/runner/... -run TestDistributionModule"

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
3030

3131
## Unreleased
3232
sei-chain
33+
* [#4536](https://github.com/sei-protocol/sei-chain/pull/4536) Remove the tokenfactory module behind the v6.8 upgrade: module, store, params, protobuf schema, CLI, wasm bindings, the bank `factory/` denom transfer allowlist and tooling are gone; only the tokenfactory Msg types remain decodable so historical blocks still trace. Existing `factory/` balances stay in bank but can no longer be minted or burned, and denoms that had a transfer allowlist become freely transferable. The upgrade deletes at most 1,000 allowlists from the bank store and leaves any beyond that in place, unenforced. App-hash breaking at the upgrade height.
3334
* [#4319](https://github.com/sei-protocol/sei-chain/pull/4319) Remove the oracle module behind the v6.8 upgrade: module, store, protobuf schema, wasm query route and tooling are gone; only the oracle Msg types remain decodable so historical blocks still trace. App-hash breaking at the upgrade height.
3435
* [#4332](https://github.com/sei-protocol/sei-chain/pull/4332) Bump sei-protocol/go-ethereum to v1.15.7-sei-21
3536
* [#4329](https://github.com/sei-protocol/sei-chain/pull/4329) Add Giga fetch/serve and BlockDB prune metrics

‎app/app.go‎

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ import (
100100
"github.com/sei-protocol/sei-chain/app/migration"
101101
appparams "github.com/sei-protocol/sei-chain/app/params"
102102
"github.com/sei-protocol/sei-chain/app/retiredoracle"
103+
"github.com/sei-protocol/sei-chain/app/retiredtokenfactory"
103104
"github.com/sei-protocol/sei-chain/app/upgrades"
104105
"github.com/sei-protocol/sei-chain/app/upgrades/kvrepair"
105106
v0upgrade "github.com/sei-protocol/sei-chain/app/upgrades/v0"
@@ -139,9 +140,6 @@ import (
139140
mintclient "github.com/sei-protocol/sei-chain/x/mint/client/cli"
140141
mintkeeper "github.com/sei-protocol/sei-chain/x/mint/keeper"
141142
minttypes "github.com/sei-protocol/sei-chain/x/mint/types"
142-
tokenfactorymodule "github.com/sei-protocol/sei-chain/x/tokenfactory"
143-
tokenfactorykeeper "github.com/sei-protocol/sei-chain/x/tokenfactory/keeper"
144-
tokenfactorytypes "github.com/sei-protocol/sei-chain/x/tokenfactory/types"
145143
dbm "github.com/tendermint/tm-db"
146144
"go.opentelemetry.io/otel/attribute"
147145
otelmetric "go.opentelemetry.io/otel/metric"
@@ -206,7 +204,6 @@ var (
206204
evm.AppModuleBasic{},
207205
wasm.AppModuleBasic{},
208206
epochmodule.AppModuleBasic{},
209-
tokenfactorymodule.AppModuleBasic{},
210207
// this line is used by starport scaffolding # stargate/app/moduleBasic
211208
)
212209

@@ -220,7 +217,6 @@ var (
220217
govtypes.ModuleName: {authtypes.Burner},
221218
wasm.ModuleName: {authtypes.Burner},
222219
evmtypes.ModuleName: {authtypes.Minter, authtypes.Burner},
223-
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
224220
// this line is used by starport scaffolding # stargate/app/maccPerms
225221
}
226222

@@ -229,7 +225,7 @@ var (
229225
// retiredModuleAccounts are module accounts whose modules no longer exist
230226
// but whose deterministic addresses stay blocked so funds cannot be sent
231227
// to an account nothing can sign for.
232-
retiredModuleAccounts = []string{"transfer"}
228+
retiredModuleAccounts = []string{"transfer", retiredtokenfactory.ModuleName}
233229

234230
// kvStoreKeyNames is the canonical, in-order list of module KV store
235231
// names mounted on the SeiDB / memiavl backend. It is the single source
@@ -244,7 +240,6 @@ var (
244240
evidencetypes.StoreKey,
245241
evmtypes.StoreKey, wasm.StoreKey,
246242
epochmoduletypes.StoreKey,
247-
tokenfactorytypes.StoreKey,
248243
// this line is used by starport scaffolding # stargate/app/storeKey
249244
}
250245

@@ -381,8 +376,6 @@ type App struct {
381376

382377
EpochKeeper epochmodulekeeper.Keeper
383378

384-
TokenFactoryKeeper tokenfactorykeeper.Keeper
385-
386379
BeginBlockKeepers legacyabci.BeginBlockKeepers
387380
EndBlockKeepers legacyabci.EndBlockKeepers
388381
CheckTxKeepers legacyabci.CheckTxKeepers
@@ -583,22 +576,12 @@ func New(
583576
).SetHooks(epochmoduletypes.NewMultiEpochHooks(
584577
app.MintKeeper.Hooks()))
585578

586-
app.TokenFactoryKeeper = tokenfactorykeeper.NewKeeper(
587-
appCodec,
588-
app.keys[tokenfactorytypes.StoreKey],
589-
app.GetSubspace(tokenfactorytypes.ModuleName),
590-
app.AccountKeeper,
591-
app.BankKeeper.(bankkeeper.BaseKeeper).WithMintCoinsRestriction(tokenfactorytypes.NewTokenFactoryDenomMintCoinsRestriction()),
592-
app.DistrKeeper,
593-
)
594-
595579
// The last arguments can contain custom message handlers, and custom query handlers,
596580
// if we want to allow any custom callbacks
597581
supportedFeatures := "iterator,staking,stargate,sei"
598582
wasmOpts = append(
599583
wasmbinding.RegisterCustomPlugins(
600584
&app.EpochKeeper,
601-
&app.TokenFactoryKeeper,
602585
&app.AccountKeeper,
603586
app.MsgServiceRouter(),
604587
app.BankKeeper,
@@ -812,7 +795,6 @@ func New(
812795
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper),
813796
evm.NewAppModule(appCodec, &app.EvmKeeper),
814797
epochModule,
815-
tokenfactorymodule.NewAppModule(app.TokenFactoryKeeper, app.AccountKeeper, app.BankKeeper),
816798
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
817799
// this line is used by starport scaffolding # stargate/app/appModule
818800
)
@@ -862,7 +844,6 @@ func New(
862844
genutiltypes.ModuleName,
863845
evidencetypes.ModuleName,
864846
authz.ModuleName,
865-
tokenfactorytypes.ModuleName,
866847
epochmoduletypes.ModuleName,
867848
wasm.ModuleName,
868849
evmtypes.ModuleName,
@@ -1047,7 +1028,7 @@ func (app *App) SetStoreUpgradeHandlers() {
10471028

10481029
if upgradeInfo.Name == "1.1.1beta" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
10491030
storeUpgrades := storetypes.StoreUpgrades{
1050-
Added: []string{tokenfactorytypes.StoreKey},
1031+
Added: []string{retiredtokenfactory.ModuleName},
10511032
}
10521033

10531034
// configure store loader that checks if version == upgradeHeight and applies store upgrades
@@ -2701,7 +2682,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
27012682
paramsKeeper.Subspace(wasm.ModuleName)
27022683
paramsKeeper.Subspace(evmtypes.ModuleName)
27032684
paramsKeeper.Subspace(epochmoduletypes.ModuleName)
2704-
paramsKeeper.Subspace(tokenfactorytypes.ModuleName)
27052685
paramsKeeper.Subspace(migration.SubspaceName).WithKeyTable(migration.ParamKeyTable())
27062686
// this line is used by starport scaffolding # stargate/app/paramSubspace
27072687

‎app/apptesting/test_suite.go‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,6 @@ func (s *KeeperTestHelper) SetupValidator(bondStatus stakingtypes.BondStatus) sd
110110
return valAddr
111111
}
112112

113-
// SetupTokenFactory sets up a token module account for the TokenFactoryKeeper.
114-
func (s *KeeperTestHelper) SetupTokenFactory() {
115-
s.App.TokenFactoryKeeper.CreateModuleAccount(s.Ctx)
116-
}
117-
118113
// EndBlock ends the block.
119114
func (s *KeeperTestHelper) EndBlock() {
120115
legacyabci.EndBlock(s.Ctx, s.Ctx.BlockHeight(), 0, s.App.EndBlockKeepers)

‎app/encoding.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package app
33
import (
44
"github.com/sei-protocol/sei-chain/app/params"
55
"github.com/sei-protocol/sei-chain/app/retiredoracle"
6+
"github.com/sei-protocol/sei-chain/app/retiredtokenfactory"
67
"github.com/sei-protocol/sei-chain/app/retiredvesting"
78
"github.com/sei-protocol/sei-chain/sei-cosmos/std"
89
)
@@ -16,6 +17,8 @@ func MakeEncodingConfig() params.EncodingConfig {
1617
ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry)
1718
retiredoracle.RegisterInterfaces(encodingConfig.InterfaceRegistry)
1819
retiredoracle.RegisterLegacyAminoCodec(encodingConfig.Amino)
20+
retiredtokenfactory.RegisterInterfaces(encodingConfig.InterfaceRegistry)
21+
retiredtokenfactory.RegisterLegacyAminoCodec(encodingConfig.Amino)
1922
retiredvesting.RegisterInterfaces(encodingConfig.InterfaceRegistry)
2023
return encodingConfig
2124
}
@@ -29,6 +32,8 @@ func MakeLegacyEncodingConfig() params.EncodingConfig {
2932
ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry)
3033
retiredoracle.RegisterInterfaces(encodingConfig.InterfaceRegistry)
3134
retiredoracle.RegisterLegacyAminoCodec(encodingConfig.Amino)
35+
retiredtokenfactory.RegisterInterfaces(encodingConfig.InterfaceRegistry)
36+
retiredtokenfactory.RegisterLegacyAminoCodec(encodingConfig.Amino)
3237
retiredvesting.RegisterInterfaces(encodingConfig.InterfaceRegistry)
3338
return encodingConfig
3439
}
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,29 @@
1-
package types
1+
package retiredtokenfactory
22

33
import (
44
"github.com/sei-protocol/sei-chain/sei-cosmos/codec"
5-
cdctypes "github.com/sei-protocol/sei-chain/sei-cosmos/codec/types"
5+
codectypes "github.com/sei-protocol/sei-chain/sei-cosmos/codec/types"
66
sdk "github.com/sei-protocol/sei-chain/sei-cosmos/types"
7-
8-
// this line is used by starport scaffolding # 1
9-
"github.com/sei-protocol/sei-chain/sei-cosmos/types/msgservice"
107
)
118

12-
func RegisterCodec(cdc *codec.LegacyAmino) {
13-
cdc.RegisterConcrete(&MsgCreateDenom{}, "tokenfactory/MsgCreateDenom", nil)
14-
cdc.RegisterConcrete(&MsgUpdateDenom{}, "tokenfactory/MsgUpdateDenom", nil)
15-
cdc.RegisterConcrete(&MsgMint{}, "tokenfactory/MsgMint", nil)
16-
cdc.RegisterConcrete(&MsgBurn{}, "tokenfactory/MsgBurn", nil)
17-
cdc.RegisterConcrete(&MsgChangeAdmin{}, "tokenfactory/MsgChangeAdmin", nil)
18-
cdc.RegisterConcrete(&MsgSetDenomMetadata{}, "tokenfactory/MsgSetDenomMetadata", nil)
19-
}
20-
21-
func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
9+
func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
2210
registry.RegisterImplementations((*sdk.Msg)(nil),
2311
&MsgCreateDenom{},
24-
)
25-
registry.RegisterImplementations((*sdk.Msg)(nil),
2612
&MsgUpdateDenom{},
27-
)
28-
registry.RegisterImplementations((*sdk.Msg)(nil),
2913
&MsgMint{},
30-
)
31-
registry.RegisterImplementations((*sdk.Msg)(nil),
3214
&MsgBurn{},
33-
)
34-
registry.RegisterImplementations((*sdk.Msg)(nil),
3515
&MsgChangeAdmin{},
36-
)
37-
registry.RegisterImplementations((*sdk.Msg)(nil),
3816
&MsgSetDenomMetadata{},
3917
)
18+
}
4019

41-
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
20+
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
21+
cdc.RegisterConcrete(&MsgCreateDenom{}, "tokenfactory/MsgCreateDenom", nil)
22+
cdc.RegisterConcrete(&MsgUpdateDenom{}, "tokenfactory/MsgUpdateDenom", nil)
23+
cdc.RegisterConcrete(&MsgMint{}, "tokenfactory/MsgMint", nil)
24+
cdc.RegisterConcrete(&MsgBurn{}, "tokenfactory/MsgBurn", nil)
25+
cdc.RegisterConcrete(&MsgChangeAdmin{}, "tokenfactory/MsgChangeAdmin", nil)
26+
cdc.RegisterConcrete(&MsgSetDenomMetadata{}, "tokenfactory/MsgSetDenomMetadata", nil)
4227
}
4328

4429
var (
@@ -47,8 +32,7 @@ var (
4732
)
4833

4934
func init() {
50-
RegisterCodec(amino)
35+
RegisterLegacyAminoCodec(amino)
5136
sdk.RegisterLegacyAminoCodec(amino)
52-
5337
amino.Seal()
5438
}

‎app/retiredtokenfactory/errors.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package retiredtokenfactory
2+
3+
import "github.com/sei-protocol/sei-chain/sei-cosmos/types/errors"
4+
5+
// ErrDeprecated is the error every retired tokenfactory message fails validation with.
6+
var ErrDeprecated = errors.Register(ModuleName, 26, "tokenfactory module is deprecated") // codes 2-25 keep their historical meanings

‎app/retiredtokenfactory/msgs.go‎

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
// Package retiredtokenfactory provides decode-only compatibility for retired tokenfactory transactions.
2+
package retiredtokenfactory
3+
4+
import (
5+
sdk "github.com/sei-protocol/sei-chain/sei-cosmos/types"
6+
)
7+
8+
const (
9+
// ModuleName is the name of the retired tokenfactory module, which also names
10+
// its deleted store and its error codespace.
11+
ModuleName = "tokenfactory"
12+
13+
TypeMsgCreateDenom = "create_denom"
14+
TypeMsgUpdateDenom = "update_denom"
15+
TypeMsgMint = "mint"
16+
TypeMsgBurn = "burn"
17+
TypeMsgChangeAdmin = "change_admin"
18+
TypeMsgSetDenomMetadata = "set_denom_metadata"
19+
)
20+
21+
var (
22+
_ sdk.Msg = (*MsgCreateDenom)(nil)
23+
_ sdk.Msg = (*MsgUpdateDenom)(nil)
24+
_ sdk.Msg = (*MsgMint)(nil)
25+
_ sdk.Msg = (*MsgBurn)(nil)
26+
_ sdk.Msg = (*MsgChangeAdmin)(nil)
27+
_ sdk.Msg = (*MsgSetDenomMetadata)(nil)
28+
)
29+
30+
func (m MsgCreateDenom) Route() string { return ModuleName }
31+
32+
func (m MsgCreateDenom) Type() string { return TypeMsgCreateDenom }
33+
34+
func (m MsgCreateDenom) GetSignBytes() []byte {
35+
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
36+
}
37+
38+
func (m MsgCreateDenom) GetSigners() []sdk.AccAddress { return senderSigners(m.Sender) }
39+
40+
func (m MsgCreateDenom) ValidateBasic() error { return ErrDeprecated }
41+
42+
func (m MsgUpdateDenom) Route() string { return ModuleName }
43+
44+
func (m MsgUpdateDenom) Type() string { return TypeMsgUpdateDenom }
45+
46+
func (m MsgUpdateDenom) GetSignBytes() []byte {
47+
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
48+
}
49+
50+
func (m MsgUpdateDenom) GetSigners() []sdk.AccAddress { return senderSigners(m.Sender) }
51+
52+
func (m MsgUpdateDenom) ValidateBasic() error { return ErrDeprecated }
53+
54+
func (m MsgMint) Route() string { return ModuleName }
55+
56+
func (m MsgMint) Type() string { return TypeMsgMint }
57+
58+
func (m MsgMint) GetSignBytes() []byte {
59+
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
60+
}
61+
62+
func (m MsgMint) GetSigners() []sdk.AccAddress { return senderSigners(m.Sender) }
63+
64+
func (m MsgMint) ValidateBasic() error { return ErrDeprecated }
65+
66+
func (m MsgBurn) Route() string { return ModuleName }
67+
68+
func (m MsgBurn) Type() string { return TypeMsgBurn }
69+
70+
func (m MsgBurn) GetSignBytes() []byte {
71+
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
72+
}
73+
74+
func (m MsgBurn) GetSigners() []sdk.AccAddress { return senderSigners(m.Sender) }
75+
76+
func (m MsgBurn) ValidateBasic() error { return ErrDeprecated }
77+
78+
func (m MsgChangeAdmin) Route() string { return ModuleName }
79+
80+
func (m MsgChangeAdmin) Type() string { return TypeMsgChangeAdmin }
81+
82+
func (m MsgChangeAdmin) GetSignBytes() []byte {
83+
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
84+
}
85+
86+
func (m MsgChangeAdmin) GetSigners() []sdk.AccAddress { return senderSigners(m.Sender) }
87+
88+
func (m MsgChangeAdmin) ValidateBasic() error { return ErrDeprecated }
89+
90+
func (m MsgSetDenomMetadata) Route() string { return ModuleName }
91+
92+
func (m MsgSetDenomMetadata) Type() string { return TypeMsgSetDenomMetadata }
93+
94+
func (m MsgSetDenomMetadata) GetSignBytes() []byte {
95+
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
96+
}
97+
98+
func (m MsgSetDenomMetadata) GetSigners() []sdk.AccAddress { return senderSigners(m.Sender) }
99+
100+
func (m MsgSetDenomMetadata) ValidateBasic() error { return ErrDeprecated }
101+
102+
// senderSigners returns the sender as the only signer, or an empty address when
103+
// the sender does not parse.
104+
func senderSigners(sender string) []sdk.AccAddress {
105+
addr, _ := sdk.AccAddressFromBech32(sender)
106+
return []sdk.AccAddress{addr}
107+
}

0 commit comments

Comments
 (0)