// RegisterLegacyAminoCodec registers the necessary x/lscosmos interfaces and concrete types
// on the provided LegacyAmino codec. These types are used for Amino JSON serialization.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MinDepositAndFeeChangeProposal{}, "cosmos/MinDepositAndFeeChangeProposal", nil)
cdc.RegisterConcrete(&PstakeFeeAddressChangeProposal{}, "cosmos/PstakeFeeAddressChangeProposal", nil)
cdc.RegisterConcrete(&AllowListedValidatorSetChangeProposal{}, "cosmos/AllowListedValidatorSetChangeProposal", nil)
cdc.RegisterConcrete(&MsgLiquidStake{}, "cosmos/MsgLiquidStake", nil)
cdc.RegisterConcrete(&MsgLiquidUnstake{}, "cosmos/MsgLiquidUnstake", nil)
cdc.RegisterConcrete(&MsgRedeem{}, "cosmos/MsgRedeem", nil)
cdc.RegisterConcrete(&MsgClaim{}, "cosmos/MsgClaim", nil)
cdc.RegisterConcrete(&MsgRecreateICA{}, "cosmos/MsgRecreateICA", nil)
cdc.RegisterConcrete(&MsgJumpStart{}, "cosmos/MsgJumpStart", nil)
cdc.RegisterConcrete(&MsgChangeModuleState{}, "cosmos/MsgChangeModuleState", nil)
//cdc.RegisterConcrete(&MinDepositAndFeeChangeProposal{}, "pstake/MinDepositAndFeeChange", nil)
//cdc.RegisterConcrete(&PstakeFeeAddressChangeProposal{}, "pstake/PstakeFeeAddressChange", nil)
//cdc.RegisterConcrete(&AllowListedValidatorSetChangeProposal{}, "pstake/AllowListedValidatorSetChange", nil)
}
1) In Cosmos SDK v46, cdc.RegisterConcrete has been deprecated in favour of legacy.RegisterAminoMsg, see the reason there https://github.com/cosmos/cosmos-sdk/issues/10870 - RegisterAminoMsg first checks that the msgName is <40 chars (else this would break ledger nano signing)
2) the name cosmos/AllowListedValidatorSetChangeProposal is >40 chars
If left unattended, some messages will fail to sign using certain Ledger devices, as well as maybe other devices.
Also, I'd propose to change prefix cosmos/ to something else. We have LSM in works, so my idea to differentiate is lsnative vs lscosmos, maybe this module can have prefix ls/ to save on the space. Discussion is open.
From this piece:
1) In Cosmos SDK v46,
cdc.RegisterConcrete
has been deprecated in favour oflegacy.RegisterAminoMsg
, see the reason there https://github.com/cosmos/cosmos-sdk/issues/10870 -RegisterAminoMsg
first checks that the msgName is <40 chars (else this would break ledger nano signing)2) the name
cosmos/AllowListedValidatorSetChangeProposal
is >40 charsIf left unattended, some messages will fail to sign using certain Ledger devices, as well as maybe other devices.
Also, I'd propose to change prefix
cosmos/
to something else. We have LSM in works, so my idea to differentiate islsnative
vslscosmos
, maybe this module can have prefixls/
to save on the space. Discussion is open.