Skip to content

Commit

Permalink
resolved the conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
vishal-kanna committed Nov 23, 2023
1 parent 4bce807 commit b962a1f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 64 deletions.
62 changes: 2 additions & 60 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ import (
// wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"

"cosmossdk.io/log"
// "github.com/CosmWasm/wasmd/x/wasm"
// "github.com/CosmWasm/wasmd/x/wasm"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/proto"

// xchain "github.com/palomachain/paloma/internal/x-chain"
// "github.com/palomachain/paloma/x/evm"

"github.com/cosmos/cosmos-sdk/std"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"

Expand Down Expand Up @@ -231,9 +226,6 @@ var (
// wasm.ModuleName: {authtypes.Burner},
// treasurymoduletypes.ModuleName: {authtypes.Burner, authtypes.Minter},
// gravitymoduletypes.ModuleName: {authtypes.Minter, 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 All @@ -255,8 +247,6 @@ func init() {
// capabilities aren't needed for testing.
type App struct {
*baseapp.BaseApp

legacyAmino *codec.LegacyAmino
legacyAmino *codec.LegacyAmino
appCodec codec.Codec
interfaceRegistry types.InterfaceRegistry
Expand Down Expand Up @@ -288,13 +278,7 @@ type App struct {
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
ScopedIBCFeeKeeper capabilitykeeper.ScopedKeeper
// ScopedWasmKeeper capabilitykeeper.ScopedKeeper
ScopedConsensusKeeper capabilitykeeper.ScopedKeeper
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
IBCFeeKeeper ibcfeekeeper.Keeper
ICAControllerKeeper icacontrollerkeeper.Keeper
ICAHostKeeper icahostkeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
// ScopedWasmKeeper capabilitykeeper.ScopedKeeper

ScopedConsensusKeeper capabilitykeeper.ScopedKeeper
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
IBCFeeKeeper ibcfeekeeper.Keeper
Expand Down Expand Up @@ -352,24 +336,8 @@ func New(
bApp := baseapp.NewBaseApp(Name, logger, db, txConfig.TxDecoder(), baseAppOptions...)
bApp.SetTxEncoder(txConfig.TxEncoder())

interfaceRegistry, _ := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{
ProtoFiles: proto.HybridResolver,
SigningOptions: signing.Options{
AddressCodec: address.Bech32Codec{
Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(),
},
ValidatorAddressCodec: address.Bech32Codec{
Bech32Prefix: sdk.GetConfig().GetBech32ValidatorAddrPrefix(),
},
},
})
appCodec := codec.NewProtoCodec(interfaceRegistry)
legacyAmino := codec.NewLegacyAmino()
txConfig := tx.NewTxConfig(appCodec, tx.DefaultSignModes)

std.RegisterLegacyAminoCodec(legacyAmino)
std.RegisterInterfaces(interfaceRegistry)
bApp := baseapp.NewBaseApp(Name, logger, db, txConfig.TxDecoder(), baseAppOptions...)
bApp.SetTxEncoder(txConfig.TxEncoder())
bApp.SetCommitMultiStoreTracer(traceStore)
bApp.SetVersion(version.Version)
Expand Down Expand Up @@ -438,10 +406,8 @@ func New(
app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]),
runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
runtime.EventService{},
runtime.EventService{},
)
bApp.SetParamStore(app.ConsensusParamsKeeper.ParamsStore)
bApp.SetParamStore(app.ConsensusParamsKeeper.ParamsStore)
Expand All @@ -466,40 +432,30 @@ func New(
app.AccountKeeper = authkeeper.NewAccountKeeper(
appCodec,
runtime.NewKVStoreService(keys[authtypes.StoreKey]),
runtime.NewKVStoreService(keys[authtypes.StoreKey]),
authtypes.ProtoBaseAccount,
maccPerms,
authcodec.NewBech32Codec(sdk.Bech32MainPrefix),
sdk.Bech32MainPrefix,
authcodec.NewBech32Codec(sdk.Bech32MainPrefix),
sdk.Bech32MainPrefix,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
app.BankKeeper = bankkeeper.NewBaseKeeper(
appCodec,
runtime.NewKVStoreService(keys[banktypes.StoreKey]),
runtime.NewKVStoreService(keys[banktypes.StoreKey]),
app.AccountKeeper,
BlockedAddresses(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
logger,
logger,
)
app.StakingKeeper = stakingkeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[stakingtypes.StoreKey]),
runtime.NewKVStoreService(keys[stakingtypes.StoreKey]),
app.AccountKeeper,
app.BankKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
app.StakingKeeper.ValidatorAddressCodec(),
app.StakingKeeper.ConsensusAddressCodec(),
app.StakingKeeper.ValidatorAddressCodec(),
app.StakingKeeper.ConsensusAddressCodec(),
)
app.MintKeeper = mintkeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[minttypes.StoreKey]),
appCodec,
runtime.NewKVStoreService(keys[minttypes.StoreKey]),
app.StakingKeeper, app.AccountKeeper,
Expand All @@ -510,7 +466,6 @@ func New(
app.DistrKeeper = distrkeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[distrtypes.StoreKey]),
runtime.NewKVStoreService(keys[distrtypes.StoreKey]),
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
Expand All @@ -521,8 +476,6 @@ func New(
appCodec,
legacyAmino,
runtime.NewKVStoreService(keys[slashingtypes.StoreKey]),
legacyAmino,
runtime.NewKVStoreService(keys[slashingtypes.StoreKey]),
app.StakingKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
Expand All @@ -531,13 +484,11 @@ func New(
app.CrisisKeeper = crisiskeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[crisistypes.StoreKey]),
runtime.NewKVStoreService(keys[crisistypes.StoreKey]),
app.invCheckPeriod,
app.BankKeeper,
authtypes.FeeCollectorName,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
app.AccountKeeper.AddressCodec(),
app.AccountKeeper.AddressCodec(),
)

app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[feegrant.StoreKey]), app.AccountKeeper)
Expand All @@ -553,7 +504,6 @@ func New(
app.UpgradeKeeper = upgradekeeper.NewKeeper(
skipUpgradeHeights,
runtime.NewKVStoreService(keys[upgradetypes.StoreKey]),
runtime.NewKVStoreService(keys[upgradetypes.StoreKey]),
appCodec,
homePath,
app.BaseApp,
Expand All @@ -568,14 +518,12 @@ func New(
app.UpgradeKeeper,
scopedIBCKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
appCodec,
keys[ibcfeetypes.StoreKey],
app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.PortKeeper,
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.PortKeeper,
app.AccountKeeper,
app.BankKeeper,
Expand All @@ -587,12 +535,10 @@ func New(
app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.PortKeeper,
app.IBCKeeper.PortKeeper,
app.AccountKeeper,
app.BankKeeper,
scopedTransferKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
app.ICAHostKeeper = icahostkeeper.NewKeeper(
appCodec,
Expand All @@ -601,12 +547,10 @@ func New(
app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.PortKeeper,
app.IBCKeeper.PortKeeper,
app.AccountKeeper,
scopedICAHostKeeper,
app.MsgServiceRouter(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper(
appCodec,
Expand All @@ -615,11 +559,9 @@ func New(
app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.PortKeeper,
app.IBCKeeper.PortKeeper,
scopedICAControllerKeeper,
app.MsgServiceRouter(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

semverVersion := app.Version()
Expand Down
2 changes: 1 addition & 1 deletion cmd/palomad/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func NewRootCmd() *cobra.Command {
flags.FlagKeyringBackend: keyring.BackendOS,
}); err != nil {
// seems to be non-fatal issue
fmt.Println("error overriding flag defaults: %s", err.Error())
log.Printf("error overriding flag defaults: %s", err.Error())
}

stakingCmd := findCommand(rootCmd, "tx", "staking")
Expand Down
Loading

0 comments on commit b962a1f

Please sign in to comment.