keeper

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllInvariants added in v3.1.0

func AllInvariants(k Keeper) sdk.Invariant

AllInvariants runs all invariants of the x/sequencer module.

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func RegisterInvariants added in v3.1.0

func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)

RegisterInvariants registers the sequencer module invariants

func SequencersCountInvariant added in v3.1.0

func SequencersCountInvariant(k Keeper) sdk.Invariant

func SequencersPerRollappInvariant added in v3.1.0

func SequencersPerRollappInvariant(k Keeper) sdk.Invariant

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,

	bankKeeper types.BankKeeper, rollappKeeper types.RollappKeeper,
) *Keeper

func (Keeper) GetAllSequencers added in v3.1.0

func (k Keeper) GetAllSequencers(ctx sdk.Context) (list []types.Sequencer)

GetAllSequencers returns all sequencer

func (Keeper) GetMatureUnbondingSequencers added in v3.1.0

func (k Keeper) GetMatureUnbondingSequencers(ctx sdk.Context, endTime time.Time) (list []types.Sequencer)

GetMatureUnbondingSequencers returns all unbonding sequencers

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetSequencer

func (k Keeper) GetSequencer(ctx sdk.Context, sequencerAddress string) (val types.Sequencer, found bool)

GetSequencer returns a sequencer from its index

func (Keeper) GetSequencersByRollapp

func (k Keeper) GetSequencersByRollapp(ctx sdk.Context, rollappId string) (list []types.Sequencer)

GetSequencersByRollapp returns a sequencersByRollapp from its index

func (Keeper) GetSequencersByRollappByStatus added in v3.1.0

func (k Keeper) GetSequencersByRollappByStatus(ctx sdk.Context, rollappId string, status types.OperatingStatus) (list []types.Sequencer)

GetSequencersByRollapp returns a sequencersByRollapp from its index

func (Keeper) Logger

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

func (Keeper) MinBond added in v3.1.0

func (k Keeper) MinBond(ctx sdk.Context) (res sdk.Coin)

func (Keeper) Params

func (Keeper) RollappHooks

func (k Keeper) RollappHooks() rollapptypes.RollappHooks

Return the wrapper struct.

func (Keeper) RotateProposer added in v3.1.0

func (k Keeper) RotateProposer(ctx sdk.Context, rollappId string)

RotateProposer sets the proposer for a rollapp to be the proposer with the greatest bond This function will not clear the current proposer (assumes no proposer is set)

func (Keeper) Sequencers added in v3.1.0

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetSequencer

func (k Keeper) SetSequencer(ctx sdk.Context, sequencer types.Sequencer)

SetSequencer set a specific sequencer in the store from its index

func (Keeper) Slashing added in v3.1.0

func (k Keeper) Slashing(ctx sdk.Context, seqAddr string) error

Slashing slashes the sequencer for misbehaviour Slashing can occur on both Bonded and Unbonding sequencers

func (Keeper) UnbondAllMatureSequencers added in v3.1.0

func (k Keeper) UnbondAllMatureSequencers(ctx sdk.Context, currTime time.Time)

UnbondAllMatureSequencers unbonds all the mature unbonding sequencers that have finished their unbonding period.

func (Keeper) UnbondingTime added in v3.1.0

func (k Keeper) UnbondingTime(ctx sdk.Context) (res time.Duration)

func (Keeper) UpdateSequencer added in v3.1.0

func (k Keeper) UpdateSequencer(ctx sdk.Context, sequencer types.Sequencer, oldStatus types.OperatingStatus)

Update sequencer status

Jump to

Keyboard shortcuts

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