Skip to content

Commit

Permalink
made changes as per review
Browse files Browse the repository at this point in the history
  • Loading branch information
vishal-kanna committed Dec 13, 2023
1 parent 88ad268 commit d12639e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
17 changes: 11 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ import (
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"

ibcclient "github.com/cosmos/ibc-go/v8/modules/core/02-client"
ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
palomamempool "github.com/palomachain/paloma/app/mempool"

// xchain "github.com/palomachain/paloma/internal/x-chain"
Expand Down Expand Up @@ -183,10 +185,10 @@ var (
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
// gravitymoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: nil,
icatypes.ModuleName: nil,
// wasm.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: nil,
icatypes.ModuleName: nil,
wasm.ModuleName: {authtypes.Burner},
treasurymoduletypes.ModuleName: {authtypes.Burner, authtypes.Minter},
}
)
Expand Down Expand Up @@ -625,8 +627,8 @@ func New(
govRouter.
AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
// AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))
// AddRoute(evmmoduletypes.RouterKey, evm.NewReferenceChainReferenceIDProposalHandler(app.EvmKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
AddRoute(evmmoduletypes.RouterKey, evm.NewReferenceChainReferenceIDProposalHandler(app.EvmKeeper)).
// AddRoute(gravitymoduletypes.RouterKey, gravitymodulekeeper.NewGravityProposalHandler(app.GravityKeeper)).
AddRoute(treasurymoduletypes.RouterKey, treasurymodule.NewFeeProposalHandler(app.TreasuryKeeper))

Expand Down Expand Up @@ -789,6 +791,9 @@ func New(
},
),
})

app.BasicModuleManager.RegisterLegacyAminoCodec(legacyAmino)
app.BasicModuleManager.RegisterInterfaces(interfaceRegistry)
// During begin block slashing happens after distr.BeginBlocker so that
// there is nothing left over in the validator fee pool, so as to keep the
// CanWithdrawInvariant invariant.
Expand Down
14 changes: 7 additions & 7 deletions x/treasury/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ import (
// InitGenesis initializes the capability module's state from a provided genesis
// state.
func InitGenesis(ctx context.Context, k keeper.Keeper, genState types.GenesisState) {
Ctx := sdk.UnwrapSDKContext(ctx)
k.SetParams(Ctx, genState.Params)
sdkctx := sdk.UnwrapSDKContext(ctx)
k.SetParams(sdkctx, genState.Params)

err := k.SetCommunityFundFee(Ctx, "0.01")
err := k.SetCommunityFundFee(sdkctx, "0.01")
if err != nil {
panic(err)
}

err = k.SetSecurityFee(Ctx, "0.01")
err = k.SetSecurityFee(sdkctx, "0.01")
if err != nil {
panic(err)
}
}

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

genesis := types.DefaultGenesis()
genesis.Params = k.GetParams(Ctx)
genesis.Params = k.GetParams(sdkctx)

fees, err := k.GetFees(Ctx)
fees, err := k.GetFees(sdkctx)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit d12639e

Please sign in to comment.