mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
rename hvt (#661)
This commit is contained in:
parent
087b10d15f
commit
5ce045f46f
28
app/app.go
28
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()
|
||||
|
@ -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 }
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package hvt
|
||||
package harvest
|
||||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
@ -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 (
|
@ -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
|
@ -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
|
@ -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) {
|
@ -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) {
|
@ -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.
|
@ -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
|
@ -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"
|
||||
)
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -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
|
@ -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() {
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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() {
|
@ -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"
|
||||
)
|
||||
|
@ -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"
|
||||
)
|
@ -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 (
|
@ -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
|
@ -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) {
|
@ -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
|
20
x/harvest/spec/README.md
Normal file
20
x/harvest/spec/README.md
Normal file
@ -0,0 +1,20 @@
|
||||
<!--
|
||||
order: 0
|
||||
title: "Harvest Overview"
|
||||
parent:
|
||||
title: "harvest"
|
||||
-->
|
||||
|
||||
# `harvest`
|
||||
|
||||
<!-- TOC -->
|
||||
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.
|
21
x/harvest/types/codec.go
Normal file
21
x/harvest/types/codec.go
Normal file
@ -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)
|
||||
}
|
@ -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 {
|
@ -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 {
|
@ -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 {
|
@ -1,20 +0,0 @@
|
||||
<!--
|
||||
order: 0
|
||||
title: "Harvest Overview"
|
||||
parent:
|
||||
title: "harvest"
|
||||
-->
|
||||
|
||||
# `harvest`
|
||||
|
||||
<!-- TOC -->
|
||||
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.
|
@ -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)
|
||||
}
|
Loading…
Reference in New Issue
Block a user