keeper

package
v0.0.0-...-051ef74 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper *Keeper) types.MsgServer

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

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,

	mintKeeper *mintkeeper.Keeper,
	bankkeeper bankkeeper.Keeper,

) *Keeper

NewKeeper create a new polyibc core keeper instance

func (Keeper) ApplyL1Txs

func (k Keeper) ApplyL1Txs(goCtx context.Context, msg *types.MsgL1Txs) (*types.MsgL1TxsResponse, error)

ApplyL1Txs implements types.MsgServer.

func (Keeper) GetL1BlockHistory

func (k Keeper) GetL1BlockHistory(rollupCfg *rollup.Config, ctx sdk.Context, blockHash []byte) (derive.L1BlockInfo, error)

GetL1BlockInfo retreieves the L1 block info from the app state

func (Keeper) GetL1BlockInfo

func (k Keeper) GetL1BlockInfo(rollupCfg *rollup.Config, ctx sdk.Context) (derive.L1BlockInfo, error)

GetL1BlockInfo gets the L1 block info from the app state

func (Keeper) L1BlockInfo

L1BlockInfo implements the Query/L1BlockInfo gRPC method It returns the L1 block info. L2 clients should directly get L1 block info from x/rolllup keeper

func (Keeper) MintETH

func (k Keeper) MintETH(ctx sdk.Context, addr sdk.AccAddress, amount sdkmath.Int) error

MintETH mints ETH to an account where the amount is in wei, the smallest unit of ETH

func (Keeper) SetL1BlockHistory

func (k Keeper) SetL1BlockHistory(rollupCfg *rollup.Config, ctx sdk.Context, l1blockInfo derive.L1BlockInfo) error

SetL1BlockHistory sets the L1 block info to the app state, with the key being the blockhash, so we can look it up easily later.

func (Keeper) SetL1BlockInfo

func (k Keeper) SetL1BlockInfo(rollupCfg *rollup.Config, ctx sdk.Context, l1blockInfo derive.L1BlockInfo) error

SetL1BlockInfo sets the L1 block info to the app state

Persisted data conforms to optimism specs on L1 attributes: https://github.com/ethereum-optimism/optimism/blob/develop/specs/deposits.md#l1-attributes-predeployed-contract

type RollUpKeeperReadOnly

type RollUpKeeperReadOnly interface {
	GetL1BlockHistory(rollupCfg *rollup.Config, ctx sdk.Context, blockHash []byte) (derive.L1BlockInfo, error)
}

Jump to

Keyboard shortcuts

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