keeper

package
v0.1.6 Latest Latest
Warning

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

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

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 Flash Chain
	ParamStoreKeyFCLastParamsChangeProposalID = []byte("FCLastParamsChangeProposalID")
)

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) GetCodeC

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

func (*Keeper) GetFCParams added in v0.1.4

func (keeper *Keeper) GetFCParams(ctx sdk.Context) ([]types.FCParam, sdk.Error)

func (*Keeper) GetFeeParams

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

func (*Keeper) GetLastFCParamChangeProposalId added in v0.1.4

func (keeper *Keeper) GetLastFCParamChangeProposalId(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) GetSubscriberFCParamSpace added in v0.1.4

func (keeper *Keeper) GetSubscriberFCParamSpace() []*types.FCParamSpaceProto

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) SetLastFCParamChangeProposalId added in v0.1.4

func (keeper *Keeper) SetLastFCParamChangeProposalId(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) SubscribeFCParamChange added in v0.1.4

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

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