types

package
v7.0.1-rc0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EventContractCode = "contract_code"

	AttributeKeyContract = "contract"
	AttributeKeyCodeHash = "code_hash"
)

Variables

View Source
var (
	ErrABIPack   = errorsmod.Register(types.ModuleName, codeErrABIPack, "failed abi pack args")
	ErrABIUnpack = errorsmod.Register(types.ModuleName, codeErrABIUnpack, "failed abi unpack data")
)
View Source
var (
	TypeAddress, _ = abi.NewType("address", "", nil)
	TypeUint256, _ = abi.NewType("uint256", "", nil)
	TypeString, _  = abi.NewType("string", "", nil)
	TypeBool, _    = abi.NewType("bool", "", nil)
	TypeBytes32, _ = abi.NewType("bytes32", "", nil)
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

ModuleCdc is the codec for the module

Functions

func PackRetError

func PackRetError(str string) ([]byte, error)

func PackTopicData

func PackTopicData(event abi.Event, topics []common.Hash, args ...interface{}) ([]byte, []common.Hash, error)

func ParseMethodArgs

func ParseMethodArgs(method abi.Method, v MethodArgs, data []byte) error

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the client interfaces to protobuf Any.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers concrete types on the Amino codec

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

Types

type AccountKeeper

type AccountKeeper interface {
	types.AccountKeeper

	GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI
}

AccountKeeper defines the expected interface needed to retrieve account info.

type EvmLogHandler

type EvmLogHandler interface {
	// EventID Return the id of the log signature it handles
	EventID() common.Hash
	// Handle Process the log
	Handle(ctx sdk.Context, msg core.Message, log *ethtypes.Log) error
}

EvmLogHandler defines the interface for evm log handler

type MethodArgs

type MethodArgs interface {
	Validate() error
}

type MsgCallContract

type MsgCallContract struct {
	//authority is the address that controls the module (defaults to x/gov unless overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// specify to call the contract address
	ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	Data            string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}

MsgCallContract defines the request structure for executing a CallContract message.

func (*MsgCallContract) Descriptor

func (*MsgCallContract) Descriptor() ([]byte, []int)

func (*MsgCallContract) GetAuthority

func (m *MsgCallContract) GetAuthority() string

func (*MsgCallContract) GetContractAddress

func (m *MsgCallContract) GetContractAddress() string

func (*MsgCallContract) GetData

func (m *MsgCallContract) GetData() string

func (*MsgCallContract) GetSignBytes

func (m *MsgCallContract) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg interface.

func (*MsgCallContract) GetSigners

func (m *MsgCallContract) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgUpdateParams message.

func (*MsgCallContract) Marshal

func (m *MsgCallContract) Marshal() (dAtA []byte, err error)

func (*MsgCallContract) MarshalTo

func (m *MsgCallContract) MarshalTo(dAtA []byte) (int, error)

func (*MsgCallContract) MarshalToSizedBuffer

func (m *MsgCallContract) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCallContract) ProtoMessage

func (*MsgCallContract) ProtoMessage()

func (*MsgCallContract) Reset

func (m *MsgCallContract) Reset()

func (*MsgCallContract) Size

func (m *MsgCallContract) Size() (n int)

func (*MsgCallContract) String

func (m *MsgCallContract) String() string

func (*MsgCallContract) Unmarshal

func (m *MsgCallContract) Unmarshal(dAtA []byte) error

func (*MsgCallContract) ValidateBasic

func (m *MsgCallContract) ValidateBasic() error

ValidateBasic does a sanity check on the provided data.

func (*MsgCallContract) XXX_DiscardUnknown

func (m *MsgCallContract) XXX_DiscardUnknown()

func (*MsgCallContract) XXX_Marshal

func (m *MsgCallContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCallContract) XXX_Merge

func (m *MsgCallContract) XXX_Merge(src proto.Message)

func (*MsgCallContract) XXX_Size

func (m *MsgCallContract) XXX_Size() int

func (*MsgCallContract) XXX_Unmarshal

func (m *MsgCallContract) XXX_Unmarshal(b []byte) error

type MsgCallContractResponse

type MsgCallContractResponse struct {
}

MsgCallContractResponse defines the response structure for executing a CallContract message.

func (*MsgCallContractResponse) Descriptor

func (*MsgCallContractResponse) Descriptor() ([]byte, []int)

func (*MsgCallContractResponse) Marshal

func (m *MsgCallContractResponse) Marshal() (dAtA []byte, err error)

func (*MsgCallContractResponse) MarshalTo

func (m *MsgCallContractResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCallContractResponse) MarshalToSizedBuffer

func (m *MsgCallContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCallContractResponse) ProtoMessage

func (*MsgCallContractResponse) ProtoMessage()

func (*MsgCallContractResponse) Reset

func (m *MsgCallContractResponse) Reset()

func (*MsgCallContractResponse) Size

func (m *MsgCallContractResponse) Size() (n int)

func (*MsgCallContractResponse) String

func (m *MsgCallContractResponse) String() string

func (*MsgCallContractResponse) Unmarshal

func (m *MsgCallContractResponse) Unmarshal(dAtA []byte) error

func (*MsgCallContractResponse) XXX_DiscardUnknown

func (m *MsgCallContractResponse) XXX_DiscardUnknown()

func (*MsgCallContractResponse) XXX_Marshal

func (m *MsgCallContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCallContractResponse) XXX_Merge

func (m *MsgCallContractResponse) XXX_Merge(src proto.Message)

func (*MsgCallContractResponse) XXX_Size

func (m *MsgCallContractResponse) XXX_Size() int

func (*MsgCallContractResponse) XXX_Unmarshal

func (m *MsgCallContractResponse) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// CallContract defines a (governance) operation for updating the x/evm module
	// callContract. The authority defaults to the x/gov module account.
	CallContract(ctx context.Context, in *MsgCallContract, opts ...grpc.CallOption) (*MsgCallContractResponse, 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 MsgServer

type MsgServer interface {
	// CallContract defines a (governance) operation for updating the x/evm module
	// callContract. The authority defaults to the x/gov module account.
	CallContract(context.Context, *MsgCallContract) (*MsgCallContractResponse, 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) CallContract

Jump to

Keyboard shortcuts

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