keeper

package
v0.1.3-testnet Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSuspend = errorsmod.Register("JoltifyChain", 1, "bridge transfer suspended as quota reached")

Functions

func NewHistory added in v0.0.6

func NewHistory(height int64, amount sdk.Coins) *types.HistoricalAmount

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func ProcessHistory added in v0.0.6

func ProcessHistory(historyLength int32, newItem *types.HistoricalAmount, coinsQuota *types.CoinsQuota) *types.CoinsQuota

func PubKeyToPoolAddr

func PubKeyToPoolAddr(pk string) (sdk.AccAddress, error)

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	vaultStaking types.VaultStaking,
	bankKeeper types.BankKeeper,
	ps paramtypes.Subspace,
	ak banktypes.AccountKeeper,

) *Keeper

func (Keeper) BlockChurnInterval

func (k Keeper) BlockChurnInterval(ctx sdk.Context) (res int64)

func (Keeper) BurnTokens

func (k Keeper) BurnTokens(ctx sdk.Context, addr sdk.AccAddress) error

func (Keeper) CandidateRatio

func (k Keeper) CandidateRatio(ctx sdk.Context) (res sdk.Dec)

func (Keeper) DelStandbyPower

func (k Keeper) DelStandbyPower(ctx sdk.Context, addr string)

DelStandbyPower set a specific validator in the store from its index

func (Keeper) DoGetAllStandbyPower

func (k Keeper) DoGetAllStandbyPower(ctx sdk.Context) (list []types.StandbyPower)

DoGetAllStandbyPower returns all issueToken

func (Keeper) DoGetAllValidators

func (k Keeper) DoGetAllValidators(ctx sdk.Context) (list []types.Validators)

DoGetAllValidators returns all issueToken

func (Keeper) GenSetLastTwoPool

func (k Keeper) GenSetLastTwoPool(ctx sdk.Context, lastPool []*types.CreatePool)

GenSetLastTwoPool the first is the newest

func (Keeper) GetAllCreatePool

func (k Keeper) GetAllCreatePool(ctx sdk.Context) (list []types.CreatePool)

GetAllCreatePool returns all createPool

func (Keeper) GetAllFeeAmount

func (k Keeper) GetAllFeeAmount(ctx sdk.Context) sdk.Coins

GetAllFeeAmount returns all outboundTx

func (Keeper) GetAllIssueToken

func (k Keeper) GetAllIssueToken(ctx sdk.Context) (list []types.IssueToken)

GetAllIssueToken returns all issueToken

func (Keeper) GetAllOutboundTx

func (k Keeper) GetAllOutboundTx(ctx sdk.Context) (list []types.OutboundTx)

GetAllOutboundTx returns all outboundTx

func (Keeper) GetCreatePool

func (k Keeper) GetCreatePool(ctx sdk.Context, index string) (val types.CreatePool, found bool)

GetCreatePool returns a createPool from its index

func (Keeper) GetFeeAmount

func (k Keeper) GetFeeAmount(
	ctx sdk.Context,
	denom string,
) (fee sdk.Coin, found bool)

GetFeeAmount returns a outboundTx from its index

func (Keeper) GetIssueToken

func (k Keeper) GetIssueToken(ctx sdk.Context, index string) (val types.IssueToken, found bool)

GetIssueToken returns a issueToken from its index

func (Keeper) GetLatestTwoPool

func (k Keeper) GetLatestTwoPool(ctx sdk.Context) ([]*types.CreatePool, bool)

func (Keeper) GetOutboundTx

func (k Keeper) GetOutboundTx(
	ctx sdk.Context,
	requestID string,
) (val types.OutboundTx, found bool)

GetOutboundTx returns a outboundTx from its index

func (Keeper) GetOutboundTxProposal added in v0.0.5

func (k Keeper) GetOutboundTxProposal(
	ctx sdk.Context,
	reqID, outboundTxID string,
) (val types.Proposals, found bool)

GetOutboundTxProposal returns proposals from its requestID:outboundTxID

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) vaultmoduletypes.Params

GetParams Get all parameteras as types.Params

func (Keeper) GetQuota

func (Keeper) GetQuotaData

func (k Keeper) GetQuotaData(ctx sdk.Context) (val types.CoinsQuota, found bool)

GetQuotaData returns a createPool from its index

func (Keeper) GetStandbyPower

func (k Keeper) GetStandbyPower(ctx sdk.Context, addr string) (val types.StandbyPower, found bool)

GetStandbyPower returns a validators group from its index

func (Keeper) GetValidatorsByHeight

func (k Keeper) GetValidatorsByHeight(ctx sdk.Context, index string) (val types.Validators, found bool)

GetValidatorsByHeight returns a validators group from its index

func (Keeper) LegacyGetAllFeeAMountAndDelete added in v0.0.3

func (k Keeper) LegacyGetAllFeeAMountAndDelete(ctx sdk.Context) sdk.Coins

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) NewUpdate

func (k Keeper) NewUpdate(ctx sdk.Context) []abci.ValidatorUpdate

func (Keeper) Power

func (k Keeper) Power(ctx sdk.Context) (res int64)

func (Keeper) ProcessAccountLeft

func (k Keeper) ProcessAccountLeft(ctx sdk.Context)

func (Keeper) ProcessQuota

func (k Keeper) ProcessQuota(ctx sdk.Context, totalCoins sdk.Coins)

func (Keeper) QuotaHistoryLength

func (k Keeper) QuotaHistoryLength(ctx sdk.Context) (res int32)

func (Keeper) RemoveCreatePool

func (k Keeper) RemoveCreatePool(ctx sdk.Context, index string)

RemoveCreatePool removes a createPool from the store

func (Keeper) SetCreatePool

func (k Keeper) SetCreatePool(ctx sdk.Context, createPool types.CreatePool)

SetCreatePool set a specific createPool in the store from its index

func (Keeper) SetIssueToken

func (k Keeper) SetIssueToken(ctx sdk.Context, issueToken types.IssueToken)

SetIssueToken set a specific issueToken in the store from its index

func (Keeper) SetOutboundTx

func (k Keeper) SetOutboundTx(ctx sdk.Context, outboundTx types.OutboundTx)

SetOutboundTx set a specific outboundTx in the store from its index

func (Keeper) SetOutboundTxProposal added in v0.0.5

func (k Keeper) SetOutboundTxProposal(ctx sdk.Context, reqID, outboundTxID string, proposals types.Proposals)

SetOutboundTxProposal set proposals based on its requestID:outboundTxID

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params vaultmoduletypes.Params)

SetParams set the params

func (Keeper) SetQuotaData

func (k Keeper) SetQuotaData(ctx sdk.Context, coinsQuota types.CoinsQuota)

SetQuotaData set a specific createPool in the store from its index

func (Keeper) SetStandbyPower

func (k Keeper) SetStandbyPower(ctx sdk.Context, addr string, powerItem types.StandbyPower)

SetStandbyPower set a specific validator in the store from its index

func (Keeper) SetStoreFeeAmount

func (k Keeper) SetStoreFeeAmount(ctx sdk.Context, fees sdk.Coins)

SetStoreFeeAmount set a specific outboundTx in the store from its index

func (Keeper) SetValidators

func (k Keeper) SetValidators(ctx sdk.Context, index string, validators types.Validators)

SetValidators set a specific validator in the store from its index

func (Keeper) Step

func (k Keeper) Step(ctx sdk.Context) (res int64)

func (Keeper) TargetQuota

func (k Keeper) TargetQuota(ctx sdk.Context) (res sdk.Coins)

func (Keeper) UpdateLastTwoPool

func (k Keeper) UpdateLastTwoPool(ctx sdk.Context, latestPool types.CreatePool)

UpdateLastTwoPool updates the last two pool

func (Keeper) UpdateStakingInfo

func (k Keeper) UpdateStakingInfo(ctx sdk.Context)

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate2to3

func (m Migrator) Migrate2to3(ctx sdk.Context) error

Migrate2to3 from version 2 to 3.

func (Migrator) Migrate3to4

func (m Migrator) Migrate3to4(ctx sdk.Context) error

Migrate3to4 from version3 to 4.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL