Documentation ¶
Index ¶
- Constants
- Variables
- func ErrMsgSendToEvm(str string) sdk.EnvelopedErr
- func GetEVMABIConfig(data []byte) (abi.ABI, abi.Event)
- func GetMintCW20Input(amount, recipient string) ([]byte, error)
- func GetMintERC20Input(callerAddr string, recipient common.Address, amount *big.Int) ([]byte, error)
- func GetMintERC20Output(data []byte) (bool, error)
- func RegisterInterface(registry interfacetypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- type MintCW20Method
- type MintERC20Method
- type MsgClient
- type MsgSendToEvm
- func (*MsgSendToEvm) Descriptor() ([]byte, []int)
- func (msg MsgSendToEvm) GetSignBytes() []byte
- func (msg MsgSendToEvm) GetSigners() []sdk.AccAddress
- func (m *MsgSendToEvm) Marshal() (dAtA []byte, err error)
- func (m *MsgSendToEvm) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSendToEvm) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSendToEvm) ProtoMessage()
- func (m *MsgSendToEvm) Reset()
- func (msg MsgSendToEvm) Route() string
- func (m *MsgSendToEvm) Size() (n int)
- func (m *MsgSendToEvm) String() string
- func (msg MsgSendToEvm) Type() string
- func (m *MsgSendToEvm) Unmarshal(dAtA []byte) error
- func (msg MsgSendToEvm) ValidateBasic() error
- func (m *MsgSendToEvm) XXX_DiscardUnknown()
- func (m *MsgSendToEvm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSendToEvm) XXX_Merge(src proto.Message)
- func (m *MsgSendToEvm) XXX_Size() int
- func (m *MsgSendToEvm) XXX_Unmarshal(b []byte) error
- type MsgSendToEvmResponse
- func (*MsgSendToEvmResponse) Descriptor() ([]byte, []int)
- func (m *MsgSendToEvmResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSendToEvmResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSendToEvmResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSendToEvmResponse) ProtoMessage()
- func (m *MsgSendToEvmResponse) Reset()
- func (m *MsgSendToEvmResponse) Size() (n int)
- func (m *MsgSendToEvmResponse) String() string
- func (m *MsgSendToEvmResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSendToEvmResponse) XXX_DiscardUnknown()
- func (m *MsgSendToEvmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSendToEvmResponse) XXX_Merge(src proto.Message)
- func (m *MsgSendToEvmResponse) XXX_Size() int
- func (m *MsgSendToEvmResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type UnimplementedMsgServer
Constants ¶
View Source
const ( // ModuleName is the name of the contract module ModuleName = "vmbridge" // StoreKey is the string store representation StoreKey = ModuleName // TStoreKey is the string transient store representation TStoreKey = "transient_" + ModuleName // QuerierRoute is the querier route for the wasm module QuerierRoute = ModuleName // RouterKey is the msg router key for the wasm module RouterKey = ModuleName )
View Source
const ( SendToWasmEventName = "__OKCSendToWasm" WasmCalledMethodName = "mintCW20" SendToEvmSubMsgName = "send-to-evm" EvmCalledMethodName = "mintERC20" )
Variables ¶
View Source
var ( // ErrChainConfigNotFound returns an error if the chain config cannot be found on the store. ErrChainConfigNotFound = sdkerrors.Register(ModuleName, 1, "chain configuration not found") ErrCallerOfEvmEmpty = sdkerrors.Register(ModuleName, 2, "the caller of evm can not be nil") ErrCannotCreate = sdkerrors.Register(ModuleName, 3, "create is not supprot for vmbridge") ErrIsNotWasmAddr = sdkerrors.Register(ModuleName, 4, "call wasm contract must use wasmaddress") ErrIsNotEvmAddr = sdkerrors.Register(ModuleName, 5, "call evm contract must use evmaddress") ErrAmountNegative = sdkerrors.Register(ModuleName, 6, "the amount can not negative") ErrEvmExecuteFailed = sdkerrors.Register(ModuleName, 7, "the evm execute") ErrVMBridgeEnable = sdkerrors.Register(ModuleName, 8, "the vmbridge is disable") ErrIsNotOKCAddr = sdkerrors.Register(ModuleName, 9, "the address prefix must be ex") ErrIsNotETHAddr = sdkerrors.Register(ModuleName, 10, "the address prefix must be 0x") )
View Source
var ( // SendToWasmEventName represent the signature of // `event __SendToWasmEventName(string wasmAddr,string recipient, string amount)` SendToWasmEvent abi.Event EvmABI abi.ABI )
Functions ¶
func ErrMsgSendToEvm ¶
func ErrMsgSendToEvm(str string) sdk.EnvelopedErr
func GetMintCW20Input ¶
func GetMintERC20Input ¶
func GetMintERC20Output ¶
func RegisterInterface ¶
func RegisterInterface(registry interfacetypes.InterfaceRegistry)
func RegisterMsgServer ¶
Types ¶
type MintCW20Method ¶
type MintERC20Method ¶
type MsgClient ¶
type MsgClient interface { // StoreCode to submit Wasm code to the system SendToEvmEvent(ctx context.Context, in *MsgSendToEvm, opts ...grpc.CallOption) (*MsgSendToEvmResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgSendToEvm ¶
type MsgSendToEvm struct { // Sender is the that actor that signed the messages Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"` Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` Amount sdk.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=Int" json:"amount"` }
MsgStoreCode submit Wasm code to the system
func (*MsgSendToEvm) Descriptor ¶
func (*MsgSendToEvm) Descriptor() ([]byte, []int)
func (MsgSendToEvm) GetSignBytes ¶
func (msg MsgSendToEvm) GetSignBytes() []byte
func (MsgSendToEvm) GetSigners ¶
func (msg MsgSendToEvm) GetSigners() []sdk.AccAddress
func (*MsgSendToEvm) Marshal ¶
func (m *MsgSendToEvm) Marshal() (dAtA []byte, err error)
func (*MsgSendToEvm) MarshalToSizedBuffer ¶
func (m *MsgSendToEvm) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSendToEvm) ProtoMessage ¶
func (*MsgSendToEvm) ProtoMessage()
func (*MsgSendToEvm) Reset ¶
func (m *MsgSendToEvm) Reset()
func (MsgSendToEvm) Route ¶
func (msg MsgSendToEvm) Route() string
func (*MsgSendToEvm) Size ¶
func (m *MsgSendToEvm) Size() (n int)
func (*MsgSendToEvm) String ¶
func (m *MsgSendToEvm) String() string
func (MsgSendToEvm) Type ¶
func (msg MsgSendToEvm) Type() string
func (*MsgSendToEvm) Unmarshal ¶
func (m *MsgSendToEvm) Unmarshal(dAtA []byte) error
func (MsgSendToEvm) ValidateBasic ¶
func (msg MsgSendToEvm) ValidateBasic() error
func (*MsgSendToEvm) XXX_DiscardUnknown ¶
func (m *MsgSendToEvm) XXX_DiscardUnknown()
func (*MsgSendToEvm) XXX_Marshal ¶
func (m *MsgSendToEvm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSendToEvm) XXX_Merge ¶
func (m *MsgSendToEvm) XXX_Merge(src proto.Message)
func (*MsgSendToEvm) XXX_Size ¶
func (m *MsgSendToEvm) XXX_Size() int
func (*MsgSendToEvm) XXX_Unmarshal ¶
func (m *MsgSendToEvm) XXX_Unmarshal(b []byte) error
type MsgSendToEvmResponse ¶
type MsgSendToEvmResponse struct { // CodeID is the reference to the stored WASM code Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` }
MsgStoreCodeResponse returns store result data.
func (*MsgSendToEvmResponse) Descriptor ¶
func (*MsgSendToEvmResponse) Descriptor() ([]byte, []int)
func (*MsgSendToEvmResponse) Marshal ¶
func (m *MsgSendToEvmResponse) Marshal() (dAtA []byte, err error)
func (*MsgSendToEvmResponse) MarshalTo ¶
func (m *MsgSendToEvmResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSendToEvmResponse) MarshalToSizedBuffer ¶
func (m *MsgSendToEvmResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSendToEvmResponse) ProtoMessage ¶
func (*MsgSendToEvmResponse) ProtoMessage()
func (*MsgSendToEvmResponse) Reset ¶
func (m *MsgSendToEvmResponse) Reset()
func (*MsgSendToEvmResponse) Size ¶
func (m *MsgSendToEvmResponse) Size() (n int)
func (*MsgSendToEvmResponse) String ¶
func (m *MsgSendToEvmResponse) String() string
func (*MsgSendToEvmResponse) Unmarshal ¶
func (m *MsgSendToEvmResponse) Unmarshal(dAtA []byte) error
func (*MsgSendToEvmResponse) XXX_DiscardUnknown ¶
func (m *MsgSendToEvmResponse) XXX_DiscardUnknown()
func (*MsgSendToEvmResponse) XXX_Marshal ¶
func (m *MsgSendToEvmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSendToEvmResponse) XXX_Merge ¶
func (m *MsgSendToEvmResponse) XXX_Merge(src proto.Message)
func (*MsgSendToEvmResponse) XXX_Size ¶
func (m *MsgSendToEvmResponse) XXX_Size() int
func (*MsgSendToEvmResponse) XXX_Unmarshal ¶
func (m *MsgSendToEvmResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // StoreCode to submit Wasm code to the system SendToEvmEvent(context.Context, *MsgSendToEvm) (*MsgSendToEvmResponse, error) }
MsgServer is the server API for Msg service.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) SendToEvmEvent ¶
func (*UnimplementedMsgServer) SendToEvmEvent(ctx context.Context, req *MsgSendToEvm) (*MsgSendToEvmResponse, error)
Click to show internal directories.
Click to hide internal directories.