From f20364de059250ec4a22cfb0459e616b154459f8 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 15 Feb 2024 12:13:07 +0530 Subject: [PATCH] Integrate registry module into the chain --- app/app.go | 30 +++++++++++++++++------------- app/app.yaml | 10 ++++++++-- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/app/app.go b/app/app.go index 1b3f86e4..d83c40cf 100644 --- a/app/app.go +++ b/app/app.go @@ -15,6 +15,7 @@ import ( auctionkeeper "git.vdb.to/cerc-io/laconic2d/x/auction/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/client" "github.com/cosmos/cosmos-sdk/codec" @@ -33,16 +34,17 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - _ "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/bond/module" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/auth" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/distribution" // 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 + _ "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/bond/module" // import for side-effects + _ "git.vdb.to/cerc-io/laconic2d/x/registry/module" // import for side-effects + _ "github.com/cosmos/cosmos-sdk/x/auth" // import for side-effects + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects + _ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects + _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects + _ "github.com/cosmos/cosmos-sdk/x/distribution" // 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 @@ -74,9 +76,9 @@ type LaconicApp struct { ConsensusParamsKeeper consensuskeeper.Keeper // laconic keepers - AuctionKeeper auctionkeeper.Keeper - BondKeeper bondkeeper.Keeper - // RegistryKeeper registrykeeper.Keeper + AuctionKeeper auctionkeeper.Keeper + BondKeeper bondkeeper.Keeper + RegistryKeeper registrykeeper.Keeper // RegistryRecordKeeper registrykeeper.RecordKeeper // simulation manager @@ -139,6 +141,8 @@ func NewLaconicApp( &app.ConsensusParamsKeeper, &app.AuctionKeeper, &app.BondKeeper, + // &app.RegistryRecordKeeper, + &app.RegistryKeeper, ); err != nil { return nil, err } diff --git a/app/app.yaml b/app/app.yaml index e34deea4..3d432433 100644 --- a/app/app.yaml +++ b/app/app.yaml @@ -7,10 +7,10 @@ modules: # 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 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 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: - module_name: auth kv_store_key: acc @@ -28,6 +28,9 @@ modules: - account: auction - account: auction_burn - account: bond + - account: registry + - account: record_rent + - account: authority_rent - name: bank config: "@type": cosmos.bank.module.v1.Module @@ -54,3 +57,6 @@ modules: - name: auction config: "@type": cerc.auction.module.v1.Module + - name: registry + config: + "@type": cerc.registry.module.v1.Module