Skip to content

Commit

Permalink
provider: change codec registration calls (not sure it works)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Oct 16, 2023
1 parent e20b2c1 commit cf06800
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 111 deletions.
12 changes: 8 additions & 4 deletions app/provider/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ func New(
appCodec := encodingConfig.Codec
legacyAmino := encodingConfig.Amino
txConfig := encodingConfig.TxConfig
std.RegisterLegacyAminoCodec(legacyAmino)
std.RegisterInterfaces(interfaceRegistry)

// ABCI++, v50
voteExtOp := func(bApp *baseapp.BaseApp) {
Expand Down Expand Up @@ -555,6 +557,9 @@ func New(
},
),
})
ModuleBasics.RegisterLegacyAminoCodec(app.legacyAmino)
ModuleBasics.RegisterInterfaces(app.interfaceRegistry)

app.MM.SetOrderPreBlockers(
upgradetypes.ModuleName,
)
Expand Down Expand Up @@ -931,6 +936,7 @@ func (app *App) AutoCliOpts() autocli.AppOptions {

return autocli.AppOptions{
Modules: modules,
ModuleOptions: runtimeservices.ExtractAutoCLIOptions(app.MM.Modules),
AddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()),
ValidatorAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()),
ConsensusAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()),
Expand Down Expand Up @@ -1012,9 +1018,7 @@ func MakeTestEncodingConfig() appparams.EncodingConfig {

func makeEncodingConfig() appparams.EncodingConfig {
encodingConfig := appparams.MakeTestEncodingConfig()
std.RegisterLegacyAminoCodec(encodingConfig.Amino)
std.RegisterInterfaces(encodingConfig.InterfaceRegistry)
ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino)
ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry)
// std.RegisterLegacyAminoCodec(encodingConfig.Amino)
// std.RegisterInterfaces(encodingConfig.InterfaceRegistry)
return encodingConfig
}
1 change: 1 addition & 0 deletions app/sovereign/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ func (app *App) AutoCliOpts() autocli.AppOptions {

return autocli.AppOptions{
Modules: modules,
ModuleOptions: runtimeservices.ExtractAutoCLIOptions(app.MM.Modules),
AddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()),
ValidatorAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()),
ConsensusAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()),
Expand Down
6 changes: 6 additions & 0 deletions proto/interchain_security/ccv/provider/v1/provider.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "ibc/lightclients/tendermint/v1/tendermint.proto";
import "tendermint/crypto/keys.proto";
import "cosmos/evidence/v1beta1/evidence.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos_proto/cosmos.proto";

//
// Note any type defined in this file is ONLY used internally to the provider CCV module.
Expand All @@ -28,6 +29,7 @@ import "cosmos/base/v1beta1/coin.proto";
message ConsumerAdditionProposal {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

// the title of the proposal
string title = 1;
Expand Down Expand Up @@ -91,6 +93,8 @@ message ConsumerAdditionProposal {
// state is removed from the provider chain. The outstanding unbonding operation
// funds are released.
message ConsumerRemovalProposal {
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

// the title of the proposal
string title = 1;
// the description of the proposal
Expand All @@ -106,6 +110,8 @@ message ConsumerRemovalProposal {
// ChangeRewardDenomsProposal is a governance proposal on the provider chain to
// mutate the set of denoms accepted by the provider as rewards.
message ChangeRewardDenomsProposal {
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

// the title of the proposal
string title = 1;
// the description of the proposal
Expand Down
Loading

0 comments on commit cf06800

Please sign in to comment.