keeper

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChannelName = "params"
	ChannelId   = sdk.ChannelID(9)
)
View Source
const (
	ParamSpace = "paramhub"

	SafeToleratePeriod = 2 * 7 * 24 * 60 * 60 * time.Second // 2 weeks
)

Variables

View Source
var (
	ParamStoreKeyLastFeeChangeProposalID = []byte("lastFeeChangeProposalID")
	ParamStoreKeyFees                    = []byte("fees")

	// for side chain
	ParamStoreKeySCLastParamsChangeProposalID = []byte("SCLastParamsChangeProposalID")
	// for beacon chain
	ParamStoreKeyBCLastParamsChangeProposalID = []byte("BCLastParamsChangeProposalID")
)

Functions

func ParamTypeTable

func ParamTypeTable() params.TypeTable

Types

type Keeper

type Keeper struct {
	params.Keeper

	ScKeeper *sidechain.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc *codec.Codec, key *sdk.KVStoreKey, tkey *sdk.TransientStoreKey) *Keeper

func (*Keeper) EndBlock

func (keeper *Keeper) EndBlock(ctx sdk.Context)

func (*Keeper) EndBreatheBlock

func (keeper *Keeper) EndBreatheBlock(ctx sdk.Context)

func (*Keeper) ExecuteAckPackage

func (keeper *Keeper) ExecuteAckPackage(ctx sdk.Context, payload []byte) sdk.ExecuteResult

func (*Keeper) ExecuteFailAckPackage

func (keeper *Keeper) ExecuteFailAckPackage(ctx sdk.Context, payload []byte) sdk.ExecuteResult

When the ack application crash, payload is the payload of the origin package.

func (*Keeper) ExecuteSynPackage

func (keeper *Keeper) ExecuteSynPackage(ctx sdk.Context, payload []byte, _ int64) sdk.ExecuteResult

implement cross chain app

func (*Keeper) GetBCParams

func (keeper *Keeper) GetBCParams(ctx sdk.Context) ([]types.BCParam, sdk.Error)

func (*Keeper) GetCodeC

func (keeper *Keeper) GetCodeC() *codec.Codec

func (*Keeper) GetFeeParams

func (keeper *Keeper) GetFeeParams(ctx sdk.Context) []types.FeeParam

func (*Keeper) GetLastBCParamChangeProposalId

func (keeper *Keeper) GetLastBCParamChangeProposalId(ctx sdk.Context) types.LastProposalID

func (*Keeper) GetLastSCParamChangeProposalId

func (keeper *Keeper) GetLastSCParamChangeProposalId(ctx sdk.Context) types.LastProposalID

func (*Keeper) GetSCParams

func (keeper *Keeper) GetSCParams(ctx sdk.Context, sideChainId string) ([]types.SCParam, sdk.Error)

func (*Keeper) GetSubscriberBCParamSpace

func (keeper *Keeper) GetSubscriberBCParamSpace() []*types.BCParamSpaceProto

func (*Keeper) GetSubscriberParamSpace

func (keeper *Keeper) GetSubscriberParamSpace() []*types.ParamSpaceProto

func (*Keeper) InitGenesis

func (keeper *Keeper) InitGenesis(ctx sdk.Context, params types.GenesisState)

func (*Keeper) Load

func (keeper *Keeper) Load(ctx sdk.Context)

func (*Keeper) Logger

func (keeper *Keeper) Logger(ctx sdk.Context) log.Logger

func (*Keeper) SaveParamChangeToIbc

func (keeper *Keeper) SaveParamChangeToIbc(ctx sdk.Context, sideChainId string, paramChange types.CSCParamChange) (seq uint64, sdkErr sdk.Error)

func (*Keeper) SetFeeParams

func (keeper *Keeper) SetFeeParams(ctx sdk.Context, fp []types.FeeParam)

func (*Keeper) SetGovKeeper

func (keeper *Keeper) SetGovKeeper(govKeeper *gov.Keeper)

func (*Keeper) SetLastBCParamChangeProposalId

func (keeper *Keeper) SetLastBCParamChangeProposalId(ctx sdk.Context, id types.LastProposalID)

func (*Keeper) SetLastSCParamChangeProposalId

func (keeper *Keeper) SetLastSCParamChangeProposalId(ctx sdk.Context, id types.LastProposalID)

func (*Keeper) SetupForSideChain

func (keeper *Keeper) SetupForSideChain(scKeeper *sidechain.Keeper, ibcKeeper *ibc.Keeper)

func (*Keeper) SubscribeBCParamChange

func (keeper *Keeper) SubscribeBCParamChange(updateCb func(sdk.Context, interface{}), spaceProto *types.BCParamSpaceProto)

func (*Keeper) SubscribeGenesisEvent

func (keeper *Keeper) SubscribeGenesisEvent(c func(sdk.Context, interface{}))

func (*Keeper) SubscribeLoadEvent

func (keeper *Keeper) SubscribeLoadEvent(c func(sdk.Context, interface{}))

func (*Keeper) SubscribeParamChange

func (keeper *Keeper) SubscribeParamChange(updateCb func(sdk.Context, interface{}), spaceProto *types.ParamSpaceProto, genesisCb func(sdk.Context, interface{}), loadCb func(sdk.Context, interface{}))

func (*Keeper) SubscribeUpdateEvent

func (keeper *Keeper) SubscribeUpdateEvent(c func(sdk.Context, interface{}))

func (*Keeper) UpdateFeeParams

func (keeper *Keeper) UpdateFeeParams(ctx sdk.Context, updates []types.FeeParam)

Jump to

Keyboard shortcuts

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