From 5ce045f46f8d09da3abc41c369a5e708913dcf1c Mon Sep 17 00:00:00 2001 From: Denali Marsh Date: Fri, 25 Sep 2020 17:07:20 +0200 Subject: [PATCH] rename hvt (#661) --- app/app.go | 28 +++++++++---------- app/test_common.go | 4 +-- x/{hvt => harvest}/abci.go | 2 +- x/{hvt => harvest}/alias.go | 6 ++-- x/{hvt => harvest}/client/cli/query.go | 2 +- x/{hvt => harvest}/client/cli/tx.go | 2 +- x/{hvt => harvest}/client/rest/query.go | 2 +- x/{hvt => harvest}/client/rest/rest.go | 0 x/{hvt => harvest}/client/rest/tx.go | 2 +- x/{hvt => harvest}/genesis.go | 4 +-- x/{hvt => harvest}/handler.go | 6 ++-- x/{hvt => harvest}/keeper/claim.go | 2 +- x/{hvt => harvest}/keeper/claim_test.go | 2 +- x/{hvt => harvest}/keeper/deposit.go | 2 +- x/{hvt => harvest}/keeper/deposit_test.go | 2 +- x/{hvt => harvest}/keeper/keeper.go | 2 +- x/{hvt => harvest}/keeper/keeper_test.go | 4 +-- x/{hvt => harvest}/keeper/params.go | 2 +- x/{hvt => harvest}/keeper/querier.go | 2 +- x/{hvt => harvest}/keeper/rewards.go | 2 +- x/{hvt => harvest}/keeper/rewards_test.go | 2 +- x/{hvt => harvest}/keeper/timelock.go | 2 +- x/{hvt => harvest}/keeper/timelock_test.go | 2 +- x/{hvt => harvest}/module.go | 12 ++++---- x/{hvt => harvest}/simulation/decoder.go | 2 +- x/{hvt => harvest}/simulation/decoder_test.go | 2 +- x/{hvt => harvest}/simulation/genesis.go | 2 +- x/{hvt => harvest}/simulation/params.go | 0 x/{hvt => harvest}/spec/01_concepts.md | 0 x/{hvt => harvest}/spec/02_state.md | 0 x/{hvt => harvest}/spec/03_messages.md | 0 x/{hvt => harvest}/spec/04_events.md | 0 x/{hvt => harvest}/spec/05_params.md | 0 x/{hvt => harvest}/spec/06_begin_block.md | 0 x/harvest/spec/README.md | 20 +++++++++++++ x/{hvt => harvest}/types/claim.go | 0 x/harvest/types/codec.go | 21 ++++++++++++++ x/{hvt => harvest}/types/deposit.go | 0 x/{hvt => harvest}/types/errors.go | 0 x/{hvt => harvest}/types/events.go | 0 x/{hvt => harvest}/types/expected_keepers.go | 0 x/{hvt => harvest}/types/genesis.go | 0 x/{hvt => harvest}/types/genesis_test.go | 2 +- x/{hvt => harvest}/types/keys.go | 0 x/{hvt => harvest}/types/msg.go | 0 x/{hvt => harvest}/types/msg_test.go | 2 +- x/{hvt => harvest}/types/params.go | 0 x/{hvt => harvest}/types/params_test.go | 2 +- x/{hvt => harvest}/types/period.go | 0 x/{hvt => harvest}/types/querier.go | 0 x/hvt/spec/README.md | 20 ------------- x/hvt/types/codec.go | 21 -------------- 52 files changed, 95 insertions(+), 95 deletions(-) rename x/{hvt => harvest}/abci.go (96%) rename x/{hvt => harvest}/alias.go (98%) rename x/{hvt => harvest}/client/cli/query.go (99%) rename x/{hvt => harvest}/client/cli/tx.go (98%) rename x/{hvt => harvest}/client/rest/query.go (99%) rename x/{hvt => harvest}/client/rest/rest.go (100%) rename x/{hvt => harvest}/client/rest/tx.go (98%) rename x/{hvt => harvest}/genesis.go (97%) rename x/{hvt => harvest}/handler.go (95%) rename x/{hvt => harvest}/keeper/claim.go (99%) rename x/{hvt => harvest}/keeper/claim_test.go (99%) rename x/{hvt => harvest}/keeper/deposit.go (98%) rename x/{hvt => harvest}/keeper/deposit_test.go (99%) rename x/{hvt => harvest}/keeper/keeper.go (99%) rename x/{hvt => harvest}/keeper/keeper_test.go (98%) rename x/{hvt => harvest}/keeper/params.go (95%) rename x/{hvt => harvest}/keeper/querier.go (99%) rename x/{hvt => harvest}/keeper/rewards.go (99%) rename x/{hvt => harvest}/keeper/rewards_test.go (99%) rename x/{hvt => harvest}/keeper/timelock.go (99%) rename x/{hvt => harvest}/keeper/timelock_test.go (99%) rename x/{hvt => harvest}/module.go (94%) rename x/{hvt => harvest}/simulation/decoder.go (96%) rename x/{hvt => harvest}/simulation/decoder_test.go (97%) rename x/{hvt => harvest}/simulation/genesis.go (98%) rename x/{hvt => harvest}/simulation/params.go (100%) rename x/{hvt => harvest}/spec/01_concepts.md (100%) rename x/{hvt => harvest}/spec/02_state.md (100%) rename x/{hvt => harvest}/spec/03_messages.md (100%) rename x/{hvt => harvest}/spec/04_events.md (100%) rename x/{hvt => harvest}/spec/05_params.md (100%) rename x/{hvt => harvest}/spec/06_begin_block.md (100%) create mode 100644 x/harvest/spec/README.md rename x/{hvt => harvest}/types/claim.go (100%) create mode 100644 x/harvest/types/codec.go rename x/{hvt => harvest}/types/deposit.go (100%) rename x/{hvt => harvest}/types/errors.go (100%) rename x/{hvt => harvest}/types/events.go (100%) rename x/{hvt => harvest}/types/expected_keepers.go (100%) rename x/{hvt => harvest}/types/genesis.go (100%) rename x/{hvt => harvest}/types/genesis_test.go (99%) rename x/{hvt => harvest}/types/keys.go (100%) rename x/{hvt => harvest}/types/msg.go (100%) rename x/{hvt => harvest}/types/msg_test.go (99%) rename x/{hvt => harvest}/types/params.go (100%) rename x/{hvt => harvest}/types/params_test.go (98%) rename x/{hvt => harvest}/types/period.go (100%) rename x/{hvt => harvest}/types/querier.go (100%) delete mode 100644 x/hvt/spec/README.md delete mode 100644 x/hvt/types/codec.go diff --git a/app/app.go b/app/app.go index 0e7863ce..64db9531 100644 --- a/app/app.go +++ b/app/app.go @@ -37,7 +37,7 @@ import ( "github.com/kava-labs/kava/x/bep3" "github.com/kava-labs/kava/x/cdp" "github.com/kava-labs/kava/x/committee" - "github.com/kava-labs/kava/x/hvt" + "github.com/kava-labs/kava/x/harvest" "github.com/kava-labs/kava/x/incentive" "github.com/kava-labs/kava/x/issuance" "github.com/kava-labs/kava/x/kavadist" @@ -83,7 +83,7 @@ var ( kavadist.AppModuleBasic{}, incentive.AppModuleBasic{}, issuance.AppModuleBasic{}, - hvt.AppModuleBasic{}, + harvest.AppModuleBasic{}, ) // module account permissions @@ -102,9 +102,9 @@ var ( bep3.ModuleName: {supply.Minter, supply.Burner}, kavadist.ModuleName: {supply.Minter}, issuance.ModuleAccountName: {supply.Minter, supply.Burner}, - hvt.LPAccount: {supply.Minter, supply.Burner}, - hvt.DelegatorAccount: {supply.Minter, supply.Burner}, - hvt.ModuleAccountName: {supply.Minter, supply.Burner}, + harvest.LPAccount: {supply.Minter, supply.Burner}, + harvest.DelegatorAccount: {supply.Minter, supply.Burner}, + harvest.ModuleAccountName: {supply.Minter, supply.Burner}, } // module accounts that are allowed to receive tokens @@ -149,7 +149,7 @@ type App struct { kavadistKeeper kavadist.Keeper incentiveKeeper incentive.Keeper issuanceKeeper issuance.Keeper - harvestKeeper hvt.Keeper + harvestKeeper harvest.Keeper // the module manager mm *module.Manager @@ -175,7 +175,7 @@ func NewApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, gov.StoreKey, params.StoreKey, upgrade.StoreKey, evidence.StoreKey, validatorvesting.StoreKey, auction.StoreKey, cdp.StoreKey, pricefeed.StoreKey, bep3.StoreKey, kavadist.StoreKey, incentive.StoreKey, issuance.StoreKey, committee.StoreKey, - hvt.StoreKey, + harvest.StoreKey, ) tkeys := sdk.NewTransientStoreKeys(params.TStoreKey) @@ -205,7 +205,7 @@ func NewApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, kavadistSubspace := app.paramsKeeper.Subspace(kavadist.DefaultParamspace) incentiveSubspace := app.paramsKeeper.Subspace(incentive.DefaultParamspace) issuanceSubspace := app.paramsKeeper.Subspace(issuance.DefaultParamspace) - harvestSubspace := app.paramsKeeper.Subspace(hvt.DefaultParamspace) + harvestSubspace := app.paramsKeeper.Subspace(harvest.DefaultParamspace) // add keepers app.accountKeeper = auth.NewAccountKeeper( @@ -370,9 +370,9 @@ func NewApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, app.accountKeeper, app.supplyKeeper, ) - app.harvestKeeper = hvt.NewKeeper( + app.harvestKeeper = harvest.NewKeeper( app.cdc, - keys[hvt.StoreKey], + keys[harvest.StoreKey], harvestSubspace, app.accountKeeper, app.supplyKeeper, @@ -407,7 +407,7 @@ func NewApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, incentive.NewAppModule(app.incentiveKeeper, app.accountKeeper, app.supplyKeeper), committee.NewAppModule(app.committeeKeeper, app.accountKeeper), issuance.NewAppModule(app.issuanceKeeper, app.accountKeeper, app.supplyKeeper), - hvt.NewAppModule(app.harvestKeeper, app.supplyKeeper), + harvest.NewAppModule(app.harvestKeeper, app.supplyKeeper), ) // During begin block slashing happens after distr.BeginBlocker so that @@ -418,7 +418,7 @@ func NewApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, app.mm.SetOrderBeginBlockers( upgrade.ModuleName, mint.ModuleName, distr.ModuleName, slashing.ModuleName, validatorvesting.ModuleName, kavadist.ModuleName, auction.ModuleName, cdp.ModuleName, - bep3.ModuleName, incentive.ModuleName, committee.ModuleName, issuance.ModuleName, hvt.ModuleName, + bep3.ModuleName, incentive.ModuleName, committee.ModuleName, issuance.ModuleName, harvest.ModuleName, ) app.mm.SetOrderEndBlockers(crisis.ModuleName, gov.ModuleName, staking.ModuleName, pricefeed.ModuleName) @@ -429,7 +429,7 @@ func NewApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, staking.ModuleName, bank.ModuleName, slashing.ModuleName, gov.ModuleName, mint.ModuleName, evidence.ModuleName, pricefeed.ModuleName, cdp.ModuleName, auction.ModuleName, - bep3.ModuleName, kavadist.ModuleName, incentive.ModuleName, committee.ModuleName, issuance.ModuleName, hvt.ModuleName, + bep3.ModuleName, kavadist.ModuleName, incentive.ModuleName, committee.ModuleName, issuance.ModuleName, harvest.ModuleName, supply.ModuleName, // calculates the total supply from account - should run after modules that modify accounts in genesis crisis.ModuleName, // runs the invariants at genesis - should run after other modules genutil.ModuleName, // genutils must occur after staking so that pools are properly initialized with tokens from genesis accounts. @@ -460,7 +460,7 @@ func NewApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, incentive.NewAppModule(app.incentiveKeeper, app.accountKeeper, app.supplyKeeper), committee.NewAppModule(app.committeeKeeper, app.accountKeeper), issuance.NewAppModule(app.issuanceKeeper, app.accountKeeper, app.supplyKeeper), - hvt.NewAppModule(app.harvestKeeper, app.supplyKeeper), + harvest.NewAppModule(app.harvestKeeper, app.supplyKeeper), ) app.sm.RegisterStoreDecoders() diff --git a/app/test_common.go b/app/test_common.go index ba596aa8..9b047fbf 100644 --- a/app/test_common.go +++ b/app/test_common.go @@ -34,7 +34,7 @@ import ( "github.com/kava-labs/kava/x/bep3" "github.com/kava-labs/kava/x/cdp" "github.com/kava-labs/kava/x/committee" - "github.com/kava-labs/kava/x/hvt" + "github.com/kava-labs/kava/x/harvest" "github.com/kava-labs/kava/x/incentive" "github.com/kava-labs/kava/x/issuance" "github.com/kava-labs/kava/x/kavadist" @@ -85,7 +85,7 @@ func (tApp TestApp) GetPriceFeedKeeper() pricefeed.Keeper { return tApp.pricefee func (tApp TestApp) GetBep3Keeper() bep3.Keeper { return tApp.bep3Keeper } func (tApp TestApp) GetKavadistKeeper() kavadist.Keeper { return tApp.kavadistKeeper } func (tApp TestApp) GetIncentiveKeeper() incentive.Keeper { return tApp.incentiveKeeper } -func (tApp TestApp) GetHarvestKeeper() hvt.Keeper { return tApp.harvestKeeper } +func (tApp TestApp) GetHarvestKeeper() harvest.Keeper { return tApp.harvestKeeper } func (tApp TestApp) GetCommitteeKeeper() committee.Keeper { return tApp.committeeKeeper } func (tApp TestApp) GetIssuanceKeeper() issuance.Keeper { return tApp.issuanceKeeper } diff --git a/x/hvt/abci.go b/x/harvest/abci.go similarity index 96% rename from x/hvt/abci.go rename to x/harvest/abci.go index ba4223a9..3b89e2d8 100644 --- a/x/hvt/abci.go +++ b/x/harvest/abci.go @@ -1,4 +1,4 @@ -package hvt +package harvest import ( sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/hvt/alias.go b/x/harvest/alias.go similarity index 98% rename from x/hvt/alias.go rename to x/harvest/alias.go index 24a77609..70846d5a 100644 --- a/x/hvt/alias.go +++ b/x/harvest/alias.go @@ -1,10 +1,10 @@ -package hvt +package harvest // DO NOT EDIT - generated by aliasgen tool (github.com/rhuairahrighairidh/aliasgen) import ( - "github.com/kava-labs/kava/x/hvt/keeper" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/keeper" + "github.com/kava-labs/kava/x/harvest/types" ) const ( diff --git a/x/hvt/client/cli/query.go b/x/harvest/client/cli/query.go similarity index 99% rename from x/hvt/client/cli/query.go rename to x/harvest/client/cli/query.go index be70369f..2704d6da 100644 --- a/x/hvt/client/cli/query.go +++ b/x/harvest/client/cli/query.go @@ -14,7 +14,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" supplyexported "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) // flags for cli queries diff --git a/x/hvt/client/cli/tx.go b/x/harvest/client/cli/tx.go similarity index 98% rename from x/hvt/client/cli/tx.go rename to x/harvest/client/cli/tx.go index 03f4dc9b..403c36a6 100644 --- a/x/hvt/client/cli/tx.go +++ b/x/harvest/client/cli/tx.go @@ -16,7 +16,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/hvt/client/rest/query.go b/x/harvest/client/rest/query.go similarity index 99% rename from x/hvt/client/rest/query.go rename to x/harvest/client/rest/query.go index 629ef042..a00e14d2 100644 --- a/x/hvt/client/rest/query.go +++ b/x/harvest/client/rest/query.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) func registerQueryRoutes(cliCtx context.CLIContext, r *mux.Router) { diff --git a/x/hvt/client/rest/rest.go b/x/harvest/client/rest/rest.go similarity index 100% rename from x/hvt/client/rest/rest.go rename to x/harvest/client/rest/rest.go diff --git a/x/hvt/client/rest/tx.go b/x/harvest/client/rest/tx.go similarity index 98% rename from x/hvt/client/rest/tx.go rename to x/harvest/client/rest/tx.go index 882110b8..7736c12d 100644 --- a/x/hvt/client/rest/tx.go +++ b/x/harvest/client/rest/tx.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) func registerTxRoutes(cliCtx context.CLIContext, r *mux.Router) { diff --git a/x/hvt/genesis.go b/x/harvest/genesis.go similarity index 97% rename from x/hvt/genesis.go rename to x/harvest/genesis.go index 9a8bb074..4a9cd04d 100644 --- a/x/hvt/genesis.go +++ b/x/harvest/genesis.go @@ -1,11 +1,11 @@ -package hvt +package harvest import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) // InitGenesis initializes the store state from a genesis state. diff --git a/x/hvt/handler.go b/x/harvest/handler.go similarity index 95% rename from x/hvt/handler.go rename to x/harvest/handler.go index 10a1b5c0..196a5fc5 100644 --- a/x/hvt/handler.go +++ b/x/harvest/handler.go @@ -1,4 +1,4 @@ -package hvt +package harvest import ( "strings" @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/kava-labs/kava/x/hvt/keeper" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/keeper" + "github.com/kava-labs/kava/x/harvest/types" ) // NewHandler creates an sdk.Handler for harvest messages diff --git a/x/hvt/keeper/claim.go b/x/harvest/keeper/claim.go similarity index 99% rename from x/hvt/keeper/claim.go rename to x/harvest/keeper/claim.go index 94504f99..a85f0fb5 100644 --- a/x/hvt/keeper/claim.go +++ b/x/harvest/keeper/claim.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" validatorvesting "github.com/kava-labs/kava/x/validator-vesting" ) diff --git a/x/hvt/keeper/claim_test.go b/x/harvest/keeper/claim_test.go similarity index 99% rename from x/hvt/keeper/claim_test.go rename to x/harvest/keeper/claim_test.go index 8765e159..8f6bed48 100644 --- a/x/hvt/keeper/claim_test.go +++ b/x/harvest/keeper/claim_test.go @@ -11,7 +11,7 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/kava-labs/kava/app" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" validatorvesting "github.com/kava-labs/kava/x/validator-vesting" ) diff --git a/x/hvt/keeper/deposit.go b/x/harvest/keeper/deposit.go similarity index 98% rename from x/hvt/keeper/deposit.go rename to x/harvest/keeper/deposit.go index 40bea499..24d5f90e 100644 --- a/x/hvt/keeper/deposit.go +++ b/x/harvest/keeper/deposit.go @@ -5,7 +5,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" supplyExported "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) // Deposit deposit diff --git a/x/hvt/keeper/deposit_test.go b/x/harvest/keeper/deposit_test.go similarity index 99% rename from x/hvt/keeper/deposit_test.go rename to x/harvest/keeper/deposit_test.go index d3738ebb..9c688f2d 100644 --- a/x/hvt/keeper/deposit_test.go +++ b/x/harvest/keeper/deposit_test.go @@ -10,7 +10,7 @@ import ( tmtime "github.com/tendermint/tendermint/types/time" "github.com/kava-labs/kava/app" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) func (suite *KeeperTestSuite) TestDeposit() { diff --git a/x/hvt/keeper/keeper.go b/x/harvest/keeper/keeper.go similarity index 99% rename from x/hvt/keeper/keeper.go rename to x/harvest/keeper/keeper.go index 1e54e13e..3f6fa219 100644 --- a/x/hvt/keeper/keeper.go +++ b/x/harvest/keeper/keeper.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/params/subspace" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) // Keeper keeper for the harvest module diff --git a/x/hvt/keeper/keeper_test.go b/x/harvest/keeper/keeper_test.go similarity index 98% rename from x/hvt/keeper/keeper_test.go rename to x/harvest/keeper/keeper_test.go index 82c00db8..3289fb06 100644 --- a/x/hvt/keeper/keeper_test.go +++ b/x/harvest/keeper/keeper_test.go @@ -13,8 +13,8 @@ import ( tmtime "github.com/tendermint/tendermint/types/time" "github.com/kava-labs/kava/app" - "github.com/kava-labs/kava/x/hvt/keeper" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/keeper" + "github.com/kava-labs/kava/x/harvest/types" ) // Test suite used for all keeper tests diff --git a/x/hvt/keeper/params.go b/x/harvest/keeper/params.go similarity index 95% rename from x/hvt/keeper/params.go rename to x/harvest/keeper/params.go index 5eea50c7..7a04ae42 100644 --- a/x/hvt/keeper/params.go +++ b/x/harvest/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) // GetParams returns the params from the store diff --git a/x/hvt/keeper/querier.go b/x/harvest/keeper/querier.go similarity index 99% rename from x/hvt/keeper/querier.go rename to x/harvest/keeper/querier.go index 41ae14d8..91d322bc 100644 --- a/x/hvt/keeper/querier.go +++ b/x/harvest/keeper/querier.go @@ -9,7 +9,7 @@ import ( abci "github.com/tendermint/tendermint/abci/types" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) // NewQuerier is the module level router for state queries diff --git a/x/hvt/keeper/rewards.go b/x/harvest/keeper/rewards.go similarity index 99% rename from x/hvt/keeper/rewards.go rename to x/harvest/keeper/rewards.go index e2c8b586..ce350dd1 100644 --- a/x/hvt/keeper/rewards.go +++ b/x/harvest/keeper/rewards.go @@ -7,7 +7,7 @@ import ( stakingexported "github.com/cosmos/cosmos-sdk/x/staking/exported" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) // ApplyDepositRewards iterates over lp and gov deposits and updates the amount of rewards for each depositor diff --git a/x/hvt/keeper/rewards_test.go b/x/harvest/keeper/rewards_test.go similarity index 99% rename from x/hvt/keeper/rewards_test.go rename to x/harvest/keeper/rewards_test.go index 549e13f7..f0a1a7a8 100644 --- a/x/hvt/keeper/rewards_test.go +++ b/x/harvest/keeper/rewards_test.go @@ -10,7 +10,7 @@ import ( "github.com/tendermint/tendermint/crypto/ed25519" "github.com/kava-labs/kava/app" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) func (suite *KeeperTestSuite) TestApplyDepositRewards() { diff --git a/x/hvt/keeper/timelock.go b/x/harvest/keeper/timelock.go similarity index 99% rename from x/hvt/keeper/timelock.go rename to x/harvest/keeper/timelock.go index ae06c071..cfadde34 100644 --- a/x/hvt/keeper/timelock.go +++ b/x/harvest/keeper/timelock.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/vesting" supplyExported "github.com/cosmos/cosmos-sdk/x/supply/exported" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" validatorvesting "github.com/kava-labs/kava/x/validator-vesting" ) diff --git a/x/hvt/keeper/timelock_test.go b/x/harvest/keeper/timelock_test.go similarity index 99% rename from x/hvt/keeper/timelock_test.go rename to x/harvest/keeper/timelock_test.go index 569791b7..a4727e40 100644 --- a/x/hvt/keeper/timelock_test.go +++ b/x/harvest/keeper/timelock_test.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/vesting" "github.com/kava-labs/kava/app" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" ) diff --git a/x/hvt/module.go b/x/harvest/module.go similarity index 94% rename from x/hvt/module.go rename to x/harvest/module.go index 01a6c9b3..9fa94d0a 100644 --- a/x/hvt/module.go +++ b/x/harvest/module.go @@ -1,4 +1,4 @@ -package hvt +package harvest import ( "encoding/json" @@ -15,11 +15,11 @@ import ( abci "github.com/tendermint/tendermint/abci/types" - "github.com/kava-labs/kava/x/hvt/client/cli" - "github.com/kava-labs/kava/x/hvt/client/rest" - "github.com/kava-labs/kava/x/hvt/keeper" - "github.com/kava-labs/kava/x/hvt/simulation" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/client/cli" + "github.com/kava-labs/kava/x/harvest/client/rest" + "github.com/kava-labs/kava/x/harvest/keeper" + "github.com/kava-labs/kava/x/harvest/simulation" + "github.com/kava-labs/kava/x/harvest/types" ) var ( diff --git a/x/hvt/simulation/decoder.go b/x/harvest/simulation/decoder.go similarity index 96% rename from x/hvt/simulation/decoder.go rename to x/harvest/simulation/decoder.go index 6dc6f7f1..6bde9400 100644 --- a/x/hvt/simulation/decoder.go +++ b/x/harvest/simulation/decoder.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) // DecodeStore unmarshals the KVPair's Value to the corresponding harvest type diff --git a/x/hvt/simulation/decoder_test.go b/x/harvest/simulation/decoder_test.go similarity index 97% rename from x/hvt/simulation/decoder_test.go rename to x/harvest/simulation/decoder_test.go index e6f741d5..df1a9eda 100644 --- a/x/hvt/simulation/decoder_test.go +++ b/x/harvest/simulation/decoder_test.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) func makeTestCodec() (cdc *codec.Codec) { diff --git a/x/hvt/simulation/genesis.go b/x/harvest/simulation/genesis.go similarity index 98% rename from x/hvt/simulation/genesis.go rename to x/harvest/simulation/genesis.go index 4074565a..29ef3f6b 100644 --- a/x/hvt/simulation/genesis.go +++ b/x/harvest/simulation/genesis.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) // SecondsPerYear is the number of seconds in a year diff --git a/x/hvt/simulation/params.go b/x/harvest/simulation/params.go similarity index 100% rename from x/hvt/simulation/params.go rename to x/harvest/simulation/params.go diff --git a/x/hvt/spec/01_concepts.md b/x/harvest/spec/01_concepts.md similarity index 100% rename from x/hvt/spec/01_concepts.md rename to x/harvest/spec/01_concepts.md diff --git a/x/hvt/spec/02_state.md b/x/harvest/spec/02_state.md similarity index 100% rename from x/hvt/spec/02_state.md rename to x/harvest/spec/02_state.md diff --git a/x/hvt/spec/03_messages.md b/x/harvest/spec/03_messages.md similarity index 100% rename from x/hvt/spec/03_messages.md rename to x/harvest/spec/03_messages.md diff --git a/x/hvt/spec/04_events.md b/x/harvest/spec/04_events.md similarity index 100% rename from x/hvt/spec/04_events.md rename to x/harvest/spec/04_events.md diff --git a/x/hvt/spec/05_params.md b/x/harvest/spec/05_params.md similarity index 100% rename from x/hvt/spec/05_params.md rename to x/harvest/spec/05_params.md diff --git a/x/hvt/spec/06_begin_block.md b/x/harvest/spec/06_begin_block.md similarity index 100% rename from x/hvt/spec/06_begin_block.md rename to x/harvest/spec/06_begin_block.md diff --git a/x/harvest/spec/README.md b/x/harvest/spec/README.md new file mode 100644 index 00000000..49e05f6c --- /dev/null +++ b/x/harvest/spec/README.md @@ -0,0 +1,20 @@ + + +# `harvest` + + +1. **[Concepts](01_concepts.md)** +2. **[State](02_state.md)** +3. **[Messages](03_messages.md)** +4. **[Events](04_events.md)** +5. **[Params](05_params.md)** +6. **[BeginBlock](06_begin_block.md)** + +## Abstract + +`x/harvest` is an implementation of a Cosmos SDK Module that will serve as the basis for a cross-chain money market platform. The current version of the module defines how HARD tokens are distributed, while future versions of this module will define lending, borrowing, distribution, incentives, and governance for the money market module. diff --git a/x/hvt/types/claim.go b/x/harvest/types/claim.go similarity index 100% rename from x/hvt/types/claim.go rename to x/harvest/types/claim.go diff --git a/x/harvest/types/codec.go b/x/harvest/types/codec.go new file mode 100644 index 00000000..87858be8 --- /dev/null +++ b/x/harvest/types/codec.go @@ -0,0 +1,21 @@ +package types + +import "github.com/cosmos/cosmos-sdk/codec" + +// ModuleCdc generic sealed codec to be used throughout module +var ModuleCdc *codec.Codec + +func init() { + cdc := codec.New() + RegisterCodec(cdc) + codec.RegisterCrypto(cdc) + ModuleCdc = cdc.Seal() +} + +// RegisterCodec registers the necessary types for harvest module +func RegisterCodec(cdc *codec.Codec) { + cdc.RegisterConcrete(MsgClaimReward{}, "harvest/MsgClaimReward", nil) + cdc.RegisterConcrete(MsgDeposit{}, "harvest/MsgDeposit", nil) + cdc.RegisterConcrete(MsgWithdraw{}, "harvest/MsgWithdraw", nil) + cdc.RegisterConcrete(DistributionSchedule{}, "harvest/DistributionSchedule", nil) +} diff --git a/x/hvt/types/deposit.go b/x/harvest/types/deposit.go similarity index 100% rename from x/hvt/types/deposit.go rename to x/harvest/types/deposit.go diff --git a/x/hvt/types/errors.go b/x/harvest/types/errors.go similarity index 100% rename from x/hvt/types/errors.go rename to x/harvest/types/errors.go diff --git a/x/hvt/types/events.go b/x/harvest/types/events.go similarity index 100% rename from x/hvt/types/events.go rename to x/harvest/types/events.go diff --git a/x/hvt/types/expected_keepers.go b/x/harvest/types/expected_keepers.go similarity index 100% rename from x/hvt/types/expected_keepers.go rename to x/harvest/types/expected_keepers.go diff --git a/x/hvt/types/genesis.go b/x/harvest/types/genesis.go similarity index 100% rename from x/hvt/types/genesis.go rename to x/harvest/types/genesis.go diff --git a/x/hvt/types/genesis_test.go b/x/harvest/types/genesis_test.go similarity index 99% rename from x/hvt/types/genesis_test.go rename to x/harvest/types/genesis_test.go index 9c9330b5..76f6a980 100644 --- a/x/hvt/types/genesis_test.go +++ b/x/harvest/types/genesis_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/suite" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) type GenesisTestSuite struct { diff --git a/x/hvt/types/keys.go b/x/harvest/types/keys.go similarity index 100% rename from x/hvt/types/keys.go rename to x/harvest/types/keys.go diff --git a/x/hvt/types/msg.go b/x/harvest/types/msg.go similarity index 100% rename from x/hvt/types/msg.go rename to x/harvest/types/msg.go diff --git a/x/hvt/types/msg_test.go b/x/harvest/types/msg_test.go similarity index 99% rename from x/hvt/types/msg_test.go rename to x/harvest/types/msg_test.go index 98723b96..de228e2a 100644 --- a/x/hvt/types/msg_test.go +++ b/x/harvest/types/msg_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) type MsgTestSuite struct { diff --git a/x/hvt/types/params.go b/x/harvest/types/params.go similarity index 100% rename from x/hvt/types/params.go rename to x/harvest/types/params.go diff --git a/x/hvt/types/params_test.go b/x/harvest/types/params_test.go similarity index 98% rename from x/hvt/types/params_test.go rename to x/harvest/types/params_test.go index 4a844858..87852406 100644 --- a/x/hvt/types/params_test.go +++ b/x/harvest/types/params_test.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/kava-labs/kava/x/hvt/types" + "github.com/kava-labs/kava/x/harvest/types" ) type ParamTestSuite struct { diff --git a/x/hvt/types/period.go b/x/harvest/types/period.go similarity index 100% rename from x/hvt/types/period.go rename to x/harvest/types/period.go diff --git a/x/hvt/types/querier.go b/x/harvest/types/querier.go similarity index 100% rename from x/hvt/types/querier.go rename to x/harvest/types/querier.go diff --git a/x/hvt/spec/README.md b/x/hvt/spec/README.md deleted file mode 100644 index 94cbe85b..00000000 --- a/x/hvt/spec/README.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# `harvest` - - -1. **[Concepts](01_concepts.md)** -2. **[State](02_state.md)** -3. **[Messages](03_messages.md)** -4. **[Events](04_events.md)** -5. **[Params](05_params.md)** -6. **[BeginBlock](06_begin_block.md)** - -## Abstract - -`x/hvt` is an implementation of a Cosmos SDK Module that will serve as the basis for a cross-chain money market platform. The current version of the module defines how HARD tokens are distributed, while future versions of this module will define lending, borrowing, distribution, incentives, and governance for the money market module. diff --git a/x/hvt/types/codec.go b/x/hvt/types/codec.go deleted file mode 100644 index 38e93c9d..00000000 --- a/x/hvt/types/codec.go +++ /dev/null @@ -1,21 +0,0 @@ -package types - -import "github.com/cosmos/cosmos-sdk/codec" - -// ModuleCdc generic sealed codec to be used throughout module -var ModuleCdc *codec.Codec - -func init() { - cdc := codec.New() - RegisterCodec(cdc) - codec.RegisterCrypto(cdc) - ModuleCdc = cdc.Seal() -} - -// RegisterCodec registers the necessary types for hvt module -func RegisterCodec(cdc *codec.Codec) { - cdc.RegisterConcrete(MsgClaimReward{}, "hvt/MsgClaimReward", nil) - cdc.RegisterConcrete(MsgDeposit{}, "hvt/MsgDeposit", nil) - cdc.RegisterConcrete(MsgWithdraw{}, "hvt/MsgWithdraw", nil) - cdc.RegisterConcrete(DistributionSchedule{}, "hvt/DistributionSchedule", nil) -}