Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func PrecompileHooks(k *Keeper) vm.CallToWasmByPrecompile
- func RegisterSendToEvmEncoder(cdc *codec.ProtoCodec) *wasm.MessageEncoders
- type AccountKeeper
- type BankKeeper
- type CallToWasmEventHandler
- type EVMKeeper
- type Keeper
- func (k Keeper) CallEvm(ctx sdk.Context, callerAddr common.Address, to *common.Address, value *big.Int, ...) (*evmtypes.ExecutionResult, *evmtypes.ResultData, error)
- func (k Keeper) CallToEvm(ctx sdk.Context, caller, contract string, calldata string, value sdk.Int) (response string, err error)
- func (k Keeper) CallToWasm(ctx sdk.Context, caller sdk.AccAddress, wasmContractAddr string, value sdk.Int, ...) ([]byte, error)
- func (k Keeper) GetProtoCodec() *codec.ProtoCodec
- func (k Keeper) Logger() log.Logger
- func (k Keeper) QueryToWasm(ctx sdk.Context, wasmContractAddr string, calldata []byte) ([]byte, error)
- func (k Keeper) SendToEvm(ctx sdk.Context, caller, contract string, recipient string, amount sdk.Int) (success bool, err error)
- func (k Keeper) SendToWasm(ctx sdk.Context, caller sdk.AccAddress, wasmContractAddr, recipient string, ...) error
- type SendToWasmEventHandler
- type WASMKeeper
Constants ¶
View Source
const ( VMBRIDGE_START_INNERTX = "vmbridge_start" VMBRIDGE_END_INNERTX = "vmbridge_end" )
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the bank MsgServer interface for the provided Keeper.
func PrecompileHooks ¶ added in v1.7.4
func PrecompileHooks(k *Keeper) vm.CallToWasmByPrecompile
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 BankKeeper ¶ added in v1.7.0
type BankKeeper interface {
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
}
type CallToWasmEventHandler ¶ added in v1.7.0
type CallToWasmEventHandler struct {
Keeper
}
event __OKCCallToWasm(string wasmAddr,uint256 value, string calldata)
func NewCallToWasmEventHandler ¶ added in v1.7.0
func NewCallToWasmEventHandler(k Keeper) *CallToWasmEventHandler
func (CallToWasmEventHandler) EventID ¶ added in v1.7.0
func (h CallToWasmEventHandler) EventID() common.Hash
EventID Return the id of the log signature it handles
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, logger log.Logger, evmKeeper EVMKeeper, wasmKeeper WASMKeeper, accountKeeper AccountKeeper, bk BankKeeper) *Keeper
func (Keeper) CallEvm ¶
func (k Keeper) CallEvm(ctx sdk.Context, callerAddr common.Address, to *common.Address, value *big.Int, data []byte) (*evmtypes.ExecutionResult, *evmtypes.ResultData, error)
callEvm execute an evm message from native module
func (Keeper) CallToEvm ¶ added in v1.7.0
func (k Keeper) CallToEvm(ctx sdk.Context, caller, contract string, calldata string, value sdk.Int) (response string, err error)
wasm call evm
func (Keeper) CallToWasm ¶ added in v1.7.0
func (Keeper) GetProtoCodec ¶
func (k Keeper) GetProtoCodec() *codec.ProtoCodec
func (Keeper) QueryToWasm ¶ added in v1.7.4
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
type WASMKeeper ¶
type WASMKeeper interface { // Execute executes the contract instance Execute(ctx sdk.Context, contractAddress sdk.WasmAddress, caller sdk.WasmAddress, msg []byte, coins sdk.Coins) ([]byte, error) GetParams(ctx sdk.Context) wasmtypes.Params NewQueryHandler(ctx sdk.Context, contractAddress sdk.WasmAddress) wasmvmtypes.Querier RuntimeGasForContract(ctx sdk.Context) uint64 }
Click to show internal directories.
Click to hide internal directories.