Skip to content

Commit

Permalink
fix: init gen
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Oct 30, 2024
1 parent 7902394 commit 517836e
Show file tree
Hide file tree
Showing 3 changed files with 279 additions and 2 deletions.
9 changes: 9 additions & 0 deletions proto/babylon/btcdistribution/v1/genesis.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";
package babylon.btcdistribution.v1;

import "gogoproto/gogo.proto";
option go_package = "github.com/babylonlabs-io/babylon/x/btcdistribution/types";

// GenesisState defines the btcdistribution module's genesis state.
message GenesisState {
}
4 changes: 2 additions & 2 deletions x/btcdistribution/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) {

// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. The default GenesisState need to be defined by the module developer and is primarily used for testing
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
return json.RawMessage{}
return cdc.MustMarshalJSON(&types.GenesisState{})
}

// ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form
Expand Down Expand Up @@ -124,7 +124,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.Ra
// ExportGenesis returns the module's exported genesis state as raw JSON bytes.
func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage {
// genState := ExportGenesis(ctx, am.keeper)
return []byte{}
return cdc.MustMarshalJSON(&types.GenesisState{})
}

// ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1
Expand Down
268 changes: 268 additions & 0 deletions x/btcdistribution/types/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 517836e

Please sign in to comment.