Skip to content

Commit

Permalink
Merge branch 'zeta-chain:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
aks3213 authored Aug 7, 2023
2 parents 070ccd5 + cf5867d commit 842299c
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 83 deletions.
4 changes: 2 additions & 2 deletions x/crosschain/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/zeta-chain/zetacore/x/crosschain/types"
)

// InitGenesis initializes the capability module's state from a provided genesis
// InitGenesis initializes the crosschain module's state from a provided genesis
// state.
func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) {
// Set all the outTxTracker
Expand Down Expand Up @@ -44,7 +44,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState)

}

// ExportGenesis returns the capability module's exported genesis.
// ExportGenesis returns the crosschain module's exported genesis.
func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
genesis := types.DefaultGenesis()

Expand Down
34 changes: 17 additions & 17 deletions x/crosschain/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var (
// AppModuleBasic
// ----------------------------------------------------------------------------

// AppModuleBasic implements the AppModuleBasic interface for the capability module.
// AppModuleBasic implements the AppModuleBasic interface for the crosschain module.
type AppModuleBasic struct {
cdc codec.Codec
}
Expand All @@ -40,7 +40,7 @@ func NewAppModuleBasic(cdc codec.Codec) AppModuleBasic {
return AppModuleBasic{cdc: cdc}
}

// Name returns the capability module's name.
// Name returns the crosschain module's name.
func (AppModuleBasic) Name() string {
return types.ModuleName
}
Expand All @@ -58,12 +58,12 @@ func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) {
types.RegisterInterfaces(reg)
}

// DefaultGenesis returns the capability module's default genesis state.
// DefaultGenesis returns the crosschain module's default genesis state.
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
return cdc.MustMarshalJSON(types.DefaultGenesis())
}

// ValidateGenesis performs genesis state validation for the capability module.
// ValidateGenesis performs genesis state validation for the crosschain module.
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error {
var genState types.GenesisState
if err := cdc.UnmarshalJSON(bz, &genState); err != nil {
Expand All @@ -72,7 +72,7 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
return genState.Validate()
}

// RegisterRESTRoutes registers the capability module's REST service handlers.
// RegisterRESTRoutes registers the crosschain module's REST service handlers.
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {
}

Expand All @@ -89,12 +89,12 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r
}
}

// GetTxCmd returns the capability module's root tx command.
// GetTxCmd returns the crosschain module's root tx command.
func (a AppModuleBasic) GetTxCmd() *cobra.Command {
return cli.GetTxCmd()
}

// GetQueryCmd returns the capability module's root query command.
// GetQueryCmd returns the crosschain module's root query command.
func (AppModuleBasic) GetQueryCmd() *cobra.Command {
return cli.GetQueryCmd(types.StoreKey)
}
Expand All @@ -103,7 +103,7 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command {
// AppModule
// ----------------------------------------------------------------------------

// AppModule implements the AppModule interface for the capability module.
// AppModule implements the AppModule interface for the crosschain module.
type AppModule struct {
AppModuleBasic

Expand All @@ -122,20 +122,20 @@ func NewAppModule(
}
}

// Name returns the capability module's name.
// Name returns the crosschain module's name.
func (am AppModule) Name() string {
return am.AppModuleBasic.Name()
}

// Route returns the capability module's message routing key.
// Route returns the crosschain module's message routing key.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
}

// QuerierRoute returns the capability module's query routing key.
// QuerierRoute returns the crosschain module's query routing key.
func (AppModule) QuerierRoute() string { return types.QuerierRoute }

// LegacyQuerierHandler returns the capability module's Querier.
// LegacyQuerierHandler returns the crosschain module's Querier.
func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier {
return nil
}
Expand All @@ -151,10 +151,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
}
}

// RegisterInvariants registers the capability module's invariants.
// RegisterInvariants registers the crosschain module's invariants.
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// InitGenesis performs the capability module's genesis initialization It returns
// InitGenesis performs the crosschain module's genesis initialization It returns
// no validator updates.
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate {
var genState types.GenesisState
Expand All @@ -166,7 +166,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.Ra
return []abci.ValidatorUpdate{}
}

// ExportGenesis returns the capability module's exported genesis state as raw JSON bytes.
// ExportGenesis returns the crosschain 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 cdc.MustMarshalJSON(genState)
Expand All @@ -175,10 +175,10 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
// ConsensusVersion implements AppModule/ConsensusVersion.
func (AppModule) ConsensusVersion() uint64 { return 2 }

// BeginBlock executes all ABCI BeginBlock logic respective to the capability module.
// BeginBlock executes all ABCI BeginBlock logic respective to the crosschain module.
func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {}

// EndBlock executes all ABCI EndBlock logic respective to the capability module. It
// EndBlock executes all ABCI EndBlock logic respective to the crosschain module. It
// returns no validator updates.
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate {

Expand Down
4 changes: 2 additions & 2 deletions x/crosschain/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
)

// DefaultIndex is the default capability global index
// DefaultIndex is the default crosschain global index
const DefaultIndex uint64 = 1

// DefaultGenesis returns the default Capability genesis state
// DefaultGenesis returns the default crosschain genesis state
func DefaultGenesis() *GenesisState {
return &GenesisState{
OutTxTrackerList: []OutTxTracker{},
Expand Down
4 changes: 2 additions & 2 deletions x/emissions/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/zeta-chain/zetacore/x/emissions/types"
)

// InitGenesis initializes the capability module's state from a provided genesis
// InitGenesis initializes the emissions module's state from a provided genesis
// state.
func InitGenesis(ctx sdk.Context, k keeper.Keeper, ak types.AccountKeeper, genState types.GenesisState) {
k.SetParams(ctx, genState.Params)
Expand All @@ -16,7 +16,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, ak types.AccountKeeper, genSt

}

// ExportGenesis returns the capability module's exported genesis.
// ExportGenesis returns the emissions module's exported genesis.
func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
genesis := types.DefaultGenesis()
genesis.Params = k.GetParams(ctx)
Expand Down
34 changes: 17 additions & 17 deletions x/emissions/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var (
// AppModuleBasic
// ----------------------------------------------------------------------------

// AppModuleBasic implements the AppModuleBasic interface for the capability module.
// AppModuleBasic implements the AppModuleBasic interface for the emissions module.
type AppModuleBasic struct {
cdc codec.BinaryCodec
}
Expand All @@ -38,7 +38,7 @@ func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic {
return AppModuleBasic{cdc: cdc}
}

// Name returns the capability module's name.
// Name returns the emissions module's name.
func (AppModuleBasic) Name() string {
return types.ModuleName
}
Expand All @@ -56,12 +56,12 @@ func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) {
types.RegisterInterfaces(reg)
}

// DefaultGenesis returns the capability module's default genesis state.
// DefaultGenesis returns the emissions module's default genesis state.
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
return cdc.MustMarshalJSON(types.DefaultGenesis())
}

// ValidateGenesis performs genesis state validation for the capability module.
// ValidateGenesis performs genesis state validation for the emissions module.
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error {
var genState types.GenesisState
if err := cdc.UnmarshalJSON(bz, &genState); err != nil {
Expand All @@ -70,20 +70,20 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
return genState.Validate()
}

// RegisterRESTRoutes registers the capability module's REST service handlers.
// RegisterRESTRoutes registers the emissions module's REST service handlers.
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {
}

// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module.
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
}

// GetTxCmd returns the capability module's root tx command.
// GetTxCmd returns the emissions module's root tx command.
func (a AppModuleBasic) GetTxCmd() *cobra.Command {
return cli.GetTxCmd()
}

// GetQueryCmd returns the capability module's root query command.
// GetQueryCmd returns the emissions module's root query command.
func (AppModuleBasic) GetQueryCmd() *cobra.Command {
return cli.GetQueryCmd(types.StoreKey)
}
Expand All @@ -92,7 +92,7 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command {
// AppModule
// ----------------------------------------------------------------------------

// AppModule implements the AppModule interface for the capability module.
// AppModule implements the AppModule interface for the emissions module.
type AppModule struct {
AppModuleBasic

Expand Down Expand Up @@ -121,20 +121,20 @@ func NewAppModule(
}
}

// Name returns the capability module's name.
// Name returns the emissions module's name.
func (am AppModule) Name() string {
return am.AppModuleBasic.Name()
}

// Route returns the capability module's message routing key.
// Route returns the emissions module's message routing key.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
}

// QuerierRoute returns the capability module's query routing key.
// QuerierRoute returns the emissions module's query routing key.
func (AppModule) QuerierRoute() string { return types.QuerierRoute }

// LegacyQuerierHandler returns the capability module's Querier.
// LegacyQuerierHandler returns the emissions module's Querier.
func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier {
return nil
}
Expand All @@ -146,10 +146,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)
}

// RegisterInvariants registers the capability module's invariants.
// RegisterInvariants registers the emissions module's invariants.
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}

// InitGenesis performs the capability module's genesis initialization It returns
// InitGenesis performs the emissions module's genesis initialization It returns
// no validator updates.
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate {
var genState types.GenesisState
Expand All @@ -161,7 +161,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.Ra
return []abci.ValidatorUpdate{}
}

// ExportGenesis returns the capability module's exported genesis state as raw JSON bytes.
// ExportGenesis returns the emissions 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 cdc.MustMarshalJSON(genState)
Expand All @@ -170,12 +170,12 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
// ConsensusVersion implements ConsensusVersion.
func (AppModule) ConsensusVersion() uint64 { return 2 }

// BeginBlock executes all ABCI BeginBlock logic respective to the capability module.
// BeginBlock executes all ABCI BeginBlock logic respective to the emissions module.
func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {
BeginBlocker(ctx, am.keeper, am.stakingKeeper, am.bankKeeper, am.observerKeeper)
}

// EndBlock executes all ABCI EndBlock logic respective to the capability module. It
// EndBlock executes all ABCI EndBlock logic respective to the emissions module. It
// returns no validator updates.
func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate {
return []abci.ValidatorUpdate{}
Expand Down
4 changes: 2 additions & 2 deletions x/emissions/types/genesis.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package types

// DefaultIndex is the default capability global index
// DefaultIndex is the default emissions global index
const DefaultIndex uint64 = 1

// DefaultGenesis returns the default Capability genesis state
// DefaultGenesis returns the default emissions genesis state
func DefaultGenesis() *GenesisState {
return &GenesisState{
Params: DefaultParams(),
Expand Down
4 changes: 2 additions & 2 deletions x/fungible/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/zeta-chain/zetacore/x/fungible/types"
)

// InitGenesis initializes the capability module's state from a provided genesis
// InitGenesis initializes the fungible module's state from a provided genesis
// state.
func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState, authKeeper types.AccountKeeper) {
// Set all the foreignCoins
Expand All @@ -26,7 +26,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState,
}
}

// ExportGenesis returns the capability module's exported genesis.
// ExportGenesis returns the fungible module's exported genesis.
func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
genesis := types.DefaultGenesis()
genesis.Params = k.GetParams(ctx)
Expand Down
Loading

0 comments on commit 842299c

Please sign in to comment.