keeper

package
v0.0.0-...-c763619 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: Apache-2.0 Imports: 19 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 bank MsgServer interface for the provided Keeper.

func RegisterSendToEvmEncoder

func RegisterSendToEvmEncoder(cdc *codec.ProtoCodec) *wasm.MessageEncoders

RegisterSendToEvmEncoder needs to be registered in app setup to handle custom message callbacks

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 EVMKeeper

type EVMKeeper interface {
	GetChainConfig(ctx sdk.Context) (evmtypes.ChainConfig, bool)
	GenerateCSDBParams() evmtypes.CommitStateDBParams
	GetParams(ctx sdk.Context) evmtypes.Params
}

type Keeper

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

func NewKeeper

func NewKeeper(cdc *codec.CodecProxy, logger log.Logger, evmKeeper EVMKeeper, wasmKeeper WASMKeeper, accountKeeper AccountKeeper) *Keeper

func (Keeper) CallEvm

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

callEvm execute an evm message from native module

func (Keeper) GetProtoCodec

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

func (Keeper) Logger

func (k Keeper) Logger() log.Logger

func (Keeper) SendToEvm

func (k Keeper) SendToEvm(ctx sdk.Context, caller, contract string, recipient string, amount sdk.Int) (success bool, err error)

wasm call evm for erc20 exchange cw20,

func (Keeper) SendToWasm

func (k Keeper) SendToWasm(ctx sdk.Context, caller sdk.AccAddress, wasmContractAddr, recipient string, amount sdk.Int) error

type SendToWasmEventHandler

type SendToWasmEventHandler struct {
	Keeper
}

event __SendToWasmEventName(string wasmAddr,string recipient, string amount)

func NewSendToWasmEventHandler

func NewSendToWasmEventHandler(k Keeper) *SendToWasmEventHandler

func (SendToWasmEventHandler) EventID

func (h SendToWasmEventHandler) EventID() common.Hash

EventID Return the id of the log signature it handles

func (SendToWasmEventHandler) Handle

func (h SendToWasmEventHandler) Handle(ctx sdk.Context, contract common.Address, data []byte) error

Handle Process the log

type WASMKeeper

type WASMKeeper interface {
	// Execute executes the contract instance
	Execute(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, msg []byte, coins sdk.Coins) ([]byte, error)
	GetParams(ctx sdk.Context) wasmtypes.Params
}

Jump to

Keyboard shortcuts

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