keeper

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier creates a new querier for slashing clients.

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authexported.Account
	SetAccount(ctx sdk.Context, acc authexported.Account)
	NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authexported.Account
}

AccountKeeper defines the expected account keeper interface

type BankKeeper

type BankKeeper interface {
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
}

type EVMKeeper

type EVMKeeper interface {
	GetChainConfig(ctx sdk.Context) (evmtypes.ChainConfig, bool)
	GenerateCSDBParams() evmtypes.CommitStateDBParams
	GetParams(ctx sdk.Context) evmtypes.Params
	GetCallToCM() vm.CallToWasmByPrecompile
	GetBlockHash() ethcmn.Hash
	AddInnerTx(...interface{})
	AddContract(...interface{})
}

type Keeper

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

func NewKeeper

func NewKeeper(cdc *codec.CodecProxy, storeKey sdk.StoreKey, logger log.Logger, evmKeeper EVMKeeper, accountKeeper AccountKeeper, bk BankKeeper, sk SupplyKeeper) *Keeper

func (Keeper) CallEvm

func (k Keeper) CallEvm(ctx sdk.Context, callerAddr common.Address, to *common.Address, value *big.Int, data []byte, info *types.ResultInfo) (*evmtypes.ExecutionResult, *evmtypes.ResultData, error)

CallEvm execute an evm message from native module

func (Keeper) GetBRCXAccount

func (k Keeper) GetBRCXAccount(ctx sdk.Context) exported.ModuleAccountI

func (Keeper) GetBRCXAddress

func (k Keeper) GetBRCXAddress() sdk.AccAddress

func (Keeper) GetContractAddrByProtocol

func (k Keeper) GetContractAddrByProtocol(ctx sdk.Context, protocol string) (common.Address, error)

func (Keeper) GetContractAddressByName

func (k Keeper) GetContractAddressByName(ctx sdk.Context, name string) []sdk.AccAddress

func (Keeper) GetProtoCodec

func (k Keeper) GetProtoCodec() *codec.ProtoCodec

func (Keeper) InsertContractAddressWithName

func (k Keeper) InsertContractAddressWithName(ctx sdk.Context, name string, address sdk.AccAddress)

func (Keeper) Logger

func (k Keeper) Logger() log.Logger

type SupplyKeeper

type SupplyKeeper interface {
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	GetModuleAccount(ctx sdk.Context, moduleName string) exported.ModuleAccountI
	GetModuleAddress(moduleName string) sdk.AccAddress
}

Jump to

Keyboard shortcuts

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