Integrate registry module into the chain

This commit is contained in:
Prathamesh Musale 2024-02-15 12:13:07 +05:30
parent 812683724e
commit f20364de05
2 changed files with 25 additions and 15 deletions

View File

@ -15,6 +15,7 @@ import (
auctionkeeper "git.vdb.to/cerc-io/laconic2d/x/auction/keeper" auctionkeeper "git.vdb.to/cerc-io/laconic2d/x/auction/keeper"
bondkeeper "git.vdb.to/cerc-io/laconic2d/x/bond/keeper" bondkeeper "git.vdb.to/cerc-io/laconic2d/x/bond/keeper"
registrykeeper "git.vdb.to/cerc-io/laconic2d/x/registry/keeper"
"github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec"
@ -33,16 +34,17 @@ import (
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
_ "cosmossdk.io/api/cosmos/tx/config/v1" // import for side-effects _ "cosmossdk.io/api/cosmos/tx/config/v1" // import for side-effects
_ "git.vdb.to/cerc-io/laconic2d/x/auction/module" // import for side-effects _ "git.vdb.to/cerc-io/laconic2d/x/auction/module" // import for side-effects
_ "git.vdb.to/cerc-io/laconic2d/x/bond/module" // import for side-effects _ "git.vdb.to/cerc-io/laconic2d/x/bond/module" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/auth" // import for side-effects _ "git.vdb.to/cerc-io/laconic2d/x/registry/module" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/auth" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects
) )
// DefaultNodeHome default home directories for the application daemon // DefaultNodeHome default home directories for the application daemon
@ -74,9 +76,9 @@ type LaconicApp struct {
ConsensusParamsKeeper consensuskeeper.Keeper ConsensusParamsKeeper consensuskeeper.Keeper
// laconic keepers // laconic keepers
AuctionKeeper auctionkeeper.Keeper AuctionKeeper auctionkeeper.Keeper
BondKeeper bondkeeper.Keeper BondKeeper bondkeeper.Keeper
// RegistryKeeper registrykeeper.Keeper RegistryKeeper registrykeeper.Keeper
// RegistryRecordKeeper registrykeeper.RecordKeeper // RegistryRecordKeeper registrykeeper.RecordKeeper
// simulation manager // simulation manager
@ -139,6 +141,8 @@ func NewLaconicApp(
&app.ConsensusParamsKeeper, &app.ConsensusParamsKeeper,
&app.AuctionKeeper, &app.AuctionKeeper,
&app.BondKeeper, &app.BondKeeper,
// &app.RegistryRecordKeeper,
&app.RegistryKeeper,
); err != nil { ); err != nil {
return nil, err return nil, err
} }

View File

@ -7,10 +7,10 @@ modules:
# there is nothing left over in the validator fee pool, so as to keep the CanWithdrawInvariant invariant. # there is nothing left over in the validator fee pool, so as to keep the CanWithdrawInvariant invariant.
# NOTE: staking module is required if HistoricalEntries param > 0 # NOTE: staking module is required if HistoricalEntries param > 0
begin_blockers: [distribution, staking] begin_blockers: [distribution, staking]
end_blockers: [staking, auction] end_blockers: [staking, auction, registry]
# NOTE: The genutils module must occur after staking so that pools are properly initialized with tokens from genesis accounts. # NOTE: The genutils module must occur after staking so that pools are properly initialized with tokens from genesis accounts.
# NOTE: The genutils module must also occur after auth so that it can access the params from auth. # NOTE: The genutils module must also occur after auth so that it can access the params from auth.
init_genesis: [auth, bank, distribution, staking, genutil, auction, bond] init_genesis: [auth, bank, distribution, staking, genutil, auction, bond, registry]
override_store_keys: override_store_keys:
- module_name: auth - module_name: auth
kv_store_key: acc kv_store_key: acc
@ -28,6 +28,9 @@ modules:
- account: auction - account: auction
- account: auction_burn - account: auction_burn
- account: bond - account: bond
- account: registry
- account: record_rent
- account: authority_rent
- name: bank - name: bank
config: config:
"@type": cosmos.bank.module.v1.Module "@type": cosmos.bank.module.v1.Module
@ -54,3 +57,6 @@ modules:
- name: auction - name: auction
config: config:
"@type": cerc.auction.module.v1.Module "@type": cerc.auction.module.v1.Module
- name: registry
config:
"@type": cerc.registry.module.v1.Module