types

package
v0.20.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 39 Imported by: 7

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	AttributeValueCategory = ModuleName

	// Event Types
	EventTypeConvertERC20ToCoin = "convert_erc20_to_coin"
	EventTypeConvertCoinToERC20 = "convert_coin_to_erc20"

	// Event Attributes - Common
	AttributeKeyReceiver = "receiver"
	AttributeKeyAmount   = "amount"

	// Event Attributes - Conversions
	AttributeKeyInitiator    = "initiator"
	AttributeKeyERC20Address = "erc20_address"
)

Events for the module

View Source
const (
	// ModuleName name that will be used throughout the module
	ModuleName = "evmutil"

	StoreKey = "utilevm" // note: cannot be emvutil due to collision with x/evm

	// RouterKey Top level router key
	RouterKey = ModuleName
)
View Source
const (
	TypeMsgConvertCoinToERC20 = "evmutil_convert_coin_to_erc20"
	TypeMsgConvertERC20ToCoin = "evmutil_convert_erc20_to_coin"
)

legacy message types

Variables

View Source
var (
	//go:embed ethermint_json/ERC20MintableBurnable.json
	ERC20MintableBurnableJSON []byte

	// ERC20MintableBurnableContract is the compiled erc20 contract
	ERC20MintableBurnableContract evmtypes.CompiledContract

	// ERC20MintableBurnableAddress is the erc20 module address
	ERC20MintableBurnableAddress common.Address
)
View Source
var (
	ErrInvalidLengthConversionPair        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConversionPair          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupConversionPair = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrABIPack                 = sdkerrors.Register(ModuleName, 2, "contract ABI pack failed")
	ErrEVMCall                 = sdkerrors.Register(ModuleName, 3, "EVM call unexpected error")
	ErrConversionNotEnabled    = sdkerrors.Register(ModuleName, 4, "ERC20 token not enabled to convert to sdk.Coin")
	ErrBalanceInvariance       = sdkerrors.Register(ModuleName, 5, "post EVM transfer balance invariant failed")
	ErrUnexpectedContractEvent = sdkerrors.Register(ModuleName, 6, "unexpected contract event")
)

errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyEnabledConversionPairs = []byte("EnabledConversionPairs")
	DefaultConversionPairs    = ConversionPairs{}
)

Parameter keys and default values

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
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")
)
View Source
var AccountStoreKeyPrefix = []byte{0x00} // prefix for keys that store accounts
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var ModuleEVMAddress common.Address

ModuleAddress is the native module address for EVM

Functions

func AccountStoreKey

func AccountStoreKey(addr sdk.AccAddress) []byte

AccountStoreKey turns an address to a key used to get the account from the store

func ParamKeyTable added in v0.19.0

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable for evmutil module.

func RegisterInterfaces added in v0.19.0

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterLegacyAminoCodec added in v0.19.0

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary evmutil interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer added in v0.19.0

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler added in v0.19.0

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient added in v0.19.0

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint added in v0.19.0

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer added in v0.19.0

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer added in v0.19.0

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type Account

type Account struct {
	Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
	// balance indicates the amount of akava owned by the address.
	Balance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"`
}

BalanceAccount defines an account in the evmutil module.

func NewAccount

func NewAccount(addr sdk.AccAddress, balance sdk.Int) *Account

func (*Account) Descriptor

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

func (*Account) Equal added in v0.19.0

func (this *Account) Equal(that interface{}) bool

func (*Account) Marshal

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

func (*Account) MarshalTo

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

func (*Account) MarshalToSizedBuffer

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

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) Size

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

func (*Account) String

func (m *Account) String() string

func (*Account) Unmarshal

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

func (Account) Validate

func (b Account) Validate() error

func (*Account) VerboseEqual added in v0.19.0

func (this *Account) VerboseEqual(that interface{}) error

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

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

func (*Account) XXX_Merge

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

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

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

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(moduleName string) sdk.AccAddress
	GetSequence(sdk.Context, sdk.AccAddress) (uint64, error)
}

AccountKeeper defines the expected account keeper interface

type BankKeeper

type BankKeeper interface {
	evmtypes.BankKeeper

	GetSupply(ctx sdk.Context, denom string) sdk.Coin
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
}

BankKeeper defines the expected bank keeper interface

type ConversionPair added in v0.19.0

type ConversionPair struct {
	// ERC20 address of the token on the Kava EVM
	KavaERC20Address HexBytes `` /* 129-byte string literal not displayed */
	// Denom of the corresponding sdk.Coin
	Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
}

ConversionPair defines a Kava ERC20 address and corresponding denom that is allowed to be converted between ERC20 and sdk.Coin

func NewConversionPair added in v0.19.0

func NewConversionPair(address InternalEVMAddress, denom string) ConversionPair

NewConversionPair returns a new ConversionPair.

func (*ConversionPair) Descriptor added in v0.19.0

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

func (*ConversionPair) Equal added in v0.19.0

func (this *ConversionPair) Equal(that interface{}) bool

func (ConversionPair) GetAddress added in v0.19.0

func (pair ConversionPair) GetAddress() InternalEVMAddress

GetAddress returns the InternalEVMAddress of the Kava ERC20 address.

func (*ConversionPair) Marshal added in v0.19.0

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

func (*ConversionPair) MarshalTo added in v0.19.0

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

func (*ConversionPair) MarshalToSizedBuffer added in v0.19.0

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

func (*ConversionPair) ProtoMessage added in v0.19.0

func (*ConversionPair) ProtoMessage()

func (*ConversionPair) Reset added in v0.19.0

func (m *ConversionPair) Reset()

func (*ConversionPair) Size added in v0.19.0

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

func (*ConversionPair) String added in v0.19.0

func (m *ConversionPair) String() string

func (*ConversionPair) Unmarshal added in v0.19.0

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

func (ConversionPair) Validate added in v0.19.0

func (pair ConversionPair) Validate() error

Validate returns an error if the ConversionPair is invalid.

func (*ConversionPair) VerboseEqual added in v0.19.0

func (this *ConversionPair) VerboseEqual(that interface{}) error

func (*ConversionPair) XXX_DiscardUnknown added in v0.19.0

func (m *ConversionPair) XXX_DiscardUnknown()

func (*ConversionPair) XXX_Marshal added in v0.19.0

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

func (*ConversionPair) XXX_Merge added in v0.19.0

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

func (*ConversionPair) XXX_Size added in v0.19.0

func (m *ConversionPair) XXX_Size() int

func (*ConversionPair) XXX_Unmarshal added in v0.19.0

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

type ConversionPairs added in v0.19.0

type ConversionPairs []ConversionPair

ConversionPairs defines a slice of ConversionPair.

func NewConversionPairs added in v0.19.0

func NewConversionPairs(pairs ...ConversionPair) ConversionPairs

NewConversionPairs returns ConversionPairs from the provided values.

func (ConversionPairs) Validate added in v0.19.0

func (pairs ConversionPairs) Validate() error

type EvmKeeper added in v0.19.0

type EvmKeeper interface {
	// This is actually a gRPC query method
	EstimateGas(ctx context.Context, req *evmtypes.EthCallRequest) (*evmtypes.EstimateGasResponse, error)
	ApplyMessage(ctx sdk.Context, msg core.Message, tracer vm.EVMLogger, commit bool) (*evmtypes.MsgEthereumTxResponse, error)
}

EvmKeeper defines the expected interface needed to make EVM transactions.

type GenesisState

type GenesisState struct {
	Accounts []Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"`
	// params defines all the parameters of the module.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

GenesisState defines the evmutil module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns the default genesis state for the module.

func NewGenesisState

func NewGenesisState(accounts []Account, params Params) *GenesisState

NewGenesisState returns a new genesis state object for the module.

func (*GenesisState) Descriptor

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

func (*GenesisState) Equal added in v0.19.0

func (this *GenesisState) Equal(that interface{}) bool

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic validation of genesis data.

func (*GenesisState) VerboseEqual added in v0.19.0

func (this *GenesisState) VerboseEqual(that interface{}) error

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type HexBytes added in v0.19.0

type HexBytes []byte

HexBytes represents a byte slice that marshals into a 0x representation

func (HexBytes) MarshalJSON added in v0.19.0

func (b HexBytes) MarshalJSON() ([]byte, error)

MarshalJSON marshals HexBytes into a 0x json string

func (HexBytes) String added in v0.19.0

func (b HexBytes) String() string

String implements Stringer and returns the 0x representation

func (*HexBytes) UnmarshalJSON added in v0.19.0

func (b *HexBytes) UnmarshalJSON(input []byte) error

UnmarshalJSON unmarshals a 0x json string into bytes

type InternalEVMAddress added in v0.19.0

type InternalEVMAddress struct {
	common.Address
}

InternalEVMAddress is a type alias of common.Address to represent an address on the Kava EVM.

func NewInternalEVMAddress added in v0.19.0

func NewInternalEVMAddress(addr common.Address) InternalEVMAddress

NewInternalEVMAddress returns a new InternalEVMAddress from a common.Address.

func NewInternalEVMAddressFromString added in v0.19.0

func NewInternalEVMAddressFromString(addrStr string) (InternalEVMAddress, error)

NewInternalEVMAddressFromString returns a new InternalEVMAddress from a hex string. Returns an error if hex string is invalid.

type MsgClient added in v0.19.0

type MsgClient interface {
	// ConvertCoinToERC20 defines a method for converting sdk.Coin to Kava ERC20.
	ConvertCoinToERC20(ctx context.Context, in *MsgConvertCoinToERC20, opts ...grpc.CallOption) (*MsgConvertCoinToERC20Response, error)
	// ConvertERC20ToCoin defines a method for converting Kava ERC20 to sdk.Coin.
	ConvertERC20ToCoin(ctx context.Context, in *MsgConvertERC20ToCoin, opts ...grpc.CallOption) (*MsgConvertERC20ToCoinResponse, 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 added in v0.19.0

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgConvertCoinToERC20 added in v0.19.0

type MsgConvertCoinToERC20 struct {
	// Kava bech32 address initiating the conversion.
	Initiator string `protobuf:"bytes,1,opt,name=initiator,proto3" json:"initiator,omitempty"`
	// EVM 0x hex address that will receive the converted Kava ERC20 tokens.
	Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// Amount is the sdk.Coin amount to convert.
	Amount *types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
}

MsgConvertCoinToERC20 defines a conversion from sdk.Coin to Kava ERC20.

func NewMsgConvertCoinToERC20 added in v0.19.0

func NewMsgConvertCoinToERC20(
	initiator string,
	receiver string,
	amount sdk.Coin,
) MsgConvertCoinToERC20

NewMsgConvertCoinToERC20 returns a new MsgConvertCoinToERC20

func (*MsgConvertCoinToERC20) Descriptor added in v0.19.0

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

func (*MsgConvertCoinToERC20) Equal added in v0.19.0

func (this *MsgConvertCoinToERC20) Equal(that interface{}) bool

func (*MsgConvertCoinToERC20) GetAmount added in v0.19.0

func (m *MsgConvertCoinToERC20) GetAmount() *types.Coin

func (*MsgConvertCoinToERC20) GetInitiator added in v0.19.0

func (m *MsgConvertCoinToERC20) GetInitiator() string

func (*MsgConvertCoinToERC20) GetReceiver added in v0.19.0

func (m *MsgConvertCoinToERC20) GetReceiver() string

func (MsgConvertCoinToERC20) GetSignBytes added in v0.19.0

func (msg MsgConvertCoinToERC20) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg.GetSignBytes method.

func (MsgConvertCoinToERC20) GetSigners added in v0.19.0

func (msg MsgConvertCoinToERC20) GetSigners() []sdk.AccAddress

GetSigners returns the addresses of signers that must sign.

func (*MsgConvertCoinToERC20) Marshal added in v0.19.0

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

func (*MsgConvertCoinToERC20) MarshalTo added in v0.19.0

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

func (*MsgConvertCoinToERC20) MarshalToSizedBuffer added in v0.19.0

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

func (*MsgConvertCoinToERC20) ProtoMessage added in v0.19.0

func (*MsgConvertCoinToERC20) ProtoMessage()

func (*MsgConvertCoinToERC20) Reset added in v0.19.0

func (m *MsgConvertCoinToERC20) Reset()

func (MsgConvertCoinToERC20) Route added in v0.19.0

func (msg MsgConvertCoinToERC20) Route() string

Route implements the LegacyMsg.Route method.

func (*MsgConvertCoinToERC20) Size added in v0.19.0

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

func (*MsgConvertCoinToERC20) String added in v0.19.0

func (m *MsgConvertCoinToERC20) String() string

func (MsgConvertCoinToERC20) Type added in v0.19.0

func (msg MsgConvertCoinToERC20) Type() string

Type implements the LegacyMsg.Type method.

func (*MsgConvertCoinToERC20) Unmarshal added in v0.19.0

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

func (MsgConvertCoinToERC20) ValidateBasic added in v0.19.0

func (msg MsgConvertCoinToERC20) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

func (*MsgConvertCoinToERC20) VerboseEqual added in v0.19.0

func (this *MsgConvertCoinToERC20) VerboseEqual(that interface{}) error

func (*MsgConvertCoinToERC20) XXX_DiscardUnknown added in v0.19.0

func (m *MsgConvertCoinToERC20) XXX_DiscardUnknown()

func (*MsgConvertCoinToERC20) XXX_Marshal added in v0.19.0

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

func (*MsgConvertCoinToERC20) XXX_Merge added in v0.19.0

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

func (*MsgConvertCoinToERC20) XXX_Size added in v0.19.0

func (m *MsgConvertCoinToERC20) XXX_Size() int

func (*MsgConvertCoinToERC20) XXX_Unmarshal added in v0.19.0

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

type MsgConvertCoinToERC20Response added in v0.19.0

type MsgConvertCoinToERC20Response struct {
}

MsgConvertCoinToERC20Response defines the response value from Msg/ConvertCoinToERC20.

func (*MsgConvertCoinToERC20Response) Descriptor added in v0.19.0

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

func (*MsgConvertCoinToERC20Response) Equal added in v0.19.0

func (this *MsgConvertCoinToERC20Response) Equal(that interface{}) bool

func (*MsgConvertCoinToERC20Response) Marshal added in v0.19.0

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

func (*MsgConvertCoinToERC20Response) MarshalTo added in v0.19.0

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

func (*MsgConvertCoinToERC20Response) MarshalToSizedBuffer added in v0.19.0

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

func (*MsgConvertCoinToERC20Response) ProtoMessage added in v0.19.0

func (*MsgConvertCoinToERC20Response) ProtoMessage()

func (*MsgConvertCoinToERC20Response) Reset added in v0.19.0

func (m *MsgConvertCoinToERC20Response) Reset()

func (*MsgConvertCoinToERC20Response) Size added in v0.19.0

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

func (*MsgConvertCoinToERC20Response) String added in v0.19.0

func (*MsgConvertCoinToERC20Response) Unmarshal added in v0.19.0

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

func (*MsgConvertCoinToERC20Response) VerboseEqual added in v0.19.0

func (this *MsgConvertCoinToERC20Response) VerboseEqual(that interface{}) error

func (*MsgConvertCoinToERC20Response) XXX_DiscardUnknown added in v0.19.0

func (m *MsgConvertCoinToERC20Response) XXX_DiscardUnknown()

func (*MsgConvertCoinToERC20Response) XXX_Marshal added in v0.19.0

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

func (*MsgConvertCoinToERC20Response) XXX_Merge added in v0.19.0

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

func (*MsgConvertCoinToERC20Response) XXX_Size added in v0.19.0

func (m *MsgConvertCoinToERC20Response) XXX_Size() int

func (*MsgConvertCoinToERC20Response) XXX_Unmarshal added in v0.19.0

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

type MsgConvertERC20ToCoin added in v0.19.0

type MsgConvertERC20ToCoin struct {
	// EVM 0x hex address initiating the conversion.
	Initiator string `protobuf:"bytes,1,opt,name=initiator,proto3" json:"initiator,omitempty"`
	// Kava bech32 address that will receive the converted sdk.Coin.
	Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// EVM 0x hex address of the ERC20 contract.
	KavaERC20Address string `protobuf:"bytes,3,opt,name=kava_erc20_address,json=kavaErc20Address,proto3" json:"kava_erc20_address,omitempty"`
	// ERC20 token amount to convert.
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}

MsgConvertERC20ToCoin defines a conversion from Kava ERC20 to sdk.Coin.

func NewMsgConvertERC20ToCoin added in v0.19.0

func NewMsgConvertERC20ToCoin(
	initiator InternalEVMAddress,
	receiver sdk.AccAddress,
	contractAddr InternalEVMAddress,
	amount sdk.Int,
) MsgConvertERC20ToCoin

NewMsgConvertERC20ToCoin returns a new MsgConvertERC20ToCoin

func (*MsgConvertERC20ToCoin) Descriptor added in v0.19.0

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

func (*MsgConvertERC20ToCoin) Equal added in v0.19.0

func (this *MsgConvertERC20ToCoin) Equal(that interface{}) bool

func (*MsgConvertERC20ToCoin) GetInitiator added in v0.19.0

func (m *MsgConvertERC20ToCoin) GetInitiator() string

func (*MsgConvertERC20ToCoin) GetKavaERC20Address added in v0.19.0

func (m *MsgConvertERC20ToCoin) GetKavaERC20Address() string

func (*MsgConvertERC20ToCoin) GetReceiver added in v0.19.0

func (m *MsgConvertERC20ToCoin) GetReceiver() string

func (MsgConvertERC20ToCoin) GetSignBytes added in v0.19.0

func (msg MsgConvertERC20ToCoin) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg.GetSignBytes method.

func (MsgConvertERC20ToCoin) GetSigners added in v0.19.0

func (msg MsgConvertERC20ToCoin) GetSigners() []sdk.AccAddress

GetSigners returns the addresses of signers that must sign.

func (*MsgConvertERC20ToCoin) Marshal added in v0.19.0

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

func (*MsgConvertERC20ToCoin) MarshalTo added in v0.19.0

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

func (*MsgConvertERC20ToCoin) MarshalToSizedBuffer added in v0.19.0

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

func (*MsgConvertERC20ToCoin) ProtoMessage added in v0.19.0

func (*MsgConvertERC20ToCoin) ProtoMessage()

func (*MsgConvertERC20ToCoin) Reset added in v0.19.0

func (m *MsgConvertERC20ToCoin) Reset()

func (MsgConvertERC20ToCoin) Route added in v0.19.0

func (msg MsgConvertERC20ToCoin) Route() string

Route implements the LegacyMsg.Route method.

func (*MsgConvertERC20ToCoin) Size added in v0.19.0

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

func (*MsgConvertERC20ToCoin) String added in v0.19.0

func (m *MsgConvertERC20ToCoin) String() string

func (MsgConvertERC20ToCoin) Type added in v0.19.0

func (msg MsgConvertERC20ToCoin) Type() string

Type implements the LegacyMsg.Type method.

func (*MsgConvertERC20ToCoin) Unmarshal added in v0.19.0

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

func (MsgConvertERC20ToCoin) ValidateBasic added in v0.19.0

func (msg MsgConvertERC20ToCoin) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

func (*MsgConvertERC20ToCoin) VerboseEqual added in v0.19.0

func (this *MsgConvertERC20ToCoin) VerboseEqual(that interface{}) error

func (*MsgConvertERC20ToCoin) XXX_DiscardUnknown added in v0.19.0

func (m *MsgConvertERC20ToCoin) XXX_DiscardUnknown()

func (*MsgConvertERC20ToCoin) XXX_Marshal added in v0.19.0

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

func (*MsgConvertERC20ToCoin) XXX_Merge added in v0.19.0

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

func (*MsgConvertERC20ToCoin) XXX_Size added in v0.19.0

func (m *MsgConvertERC20ToCoin) XXX_Size() int

func (*MsgConvertERC20ToCoin) XXX_Unmarshal added in v0.19.0

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

type MsgConvertERC20ToCoinResponse added in v0.19.0

type MsgConvertERC20ToCoinResponse struct {
}

MsgConvertERC20ToCoinResponse defines the response value from Msg/MsgConvertERC20ToCoin.

func (*MsgConvertERC20ToCoinResponse) Descriptor added in v0.19.0

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

func (*MsgConvertERC20ToCoinResponse) Equal added in v0.19.0

func (this *MsgConvertERC20ToCoinResponse) Equal(that interface{}) bool

func (*MsgConvertERC20ToCoinResponse) Marshal added in v0.19.0

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

func (*MsgConvertERC20ToCoinResponse) MarshalTo added in v0.19.0

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

func (*MsgConvertERC20ToCoinResponse) MarshalToSizedBuffer added in v0.19.0

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

func (*MsgConvertERC20ToCoinResponse) ProtoMessage added in v0.19.0

func (*MsgConvertERC20ToCoinResponse) ProtoMessage()

func (*MsgConvertERC20ToCoinResponse) Reset added in v0.19.0

func (m *MsgConvertERC20ToCoinResponse) Reset()

func (*MsgConvertERC20ToCoinResponse) Size added in v0.19.0

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

func (*MsgConvertERC20ToCoinResponse) String added in v0.19.0

func (*MsgConvertERC20ToCoinResponse) Unmarshal added in v0.19.0

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

func (*MsgConvertERC20ToCoinResponse) VerboseEqual added in v0.19.0

func (this *MsgConvertERC20ToCoinResponse) VerboseEqual(that interface{}) error

func (*MsgConvertERC20ToCoinResponse) XXX_DiscardUnknown added in v0.19.0

func (m *MsgConvertERC20ToCoinResponse) XXX_DiscardUnknown()

func (*MsgConvertERC20ToCoinResponse) XXX_Marshal added in v0.19.0

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

func (*MsgConvertERC20ToCoinResponse) XXX_Merge added in v0.19.0

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

func (*MsgConvertERC20ToCoinResponse) XXX_Size added in v0.19.0

func (m *MsgConvertERC20ToCoinResponse) XXX_Size() int

func (*MsgConvertERC20ToCoinResponse) XXX_Unmarshal added in v0.19.0

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

type MsgServer added in v0.19.0

type MsgServer interface {
	// ConvertCoinToERC20 defines a method for converting sdk.Coin to Kava ERC20.
	ConvertCoinToERC20(context.Context, *MsgConvertCoinToERC20) (*MsgConvertCoinToERC20Response, error)
	// ConvertERC20ToCoin defines a method for converting Kava ERC20 to sdk.Coin.
	ConvertERC20ToCoin(context.Context, *MsgConvertERC20ToCoin) (*MsgConvertERC20ToCoinResponse, error)
}

MsgServer is the server API for Msg service.

type Params added in v0.19.0

type Params struct {
	// enabled_conversion_pairs defines the list of conversion pairs allowed to be
	// converted between Kava ERC20 and sdk.Coin
	EnabledConversionPairs ConversionPairs `` /* 148-byte string literal not displayed */
}

Params defines the evmutil module params

func DefaultParams added in v0.19.0

func DefaultParams() Params

DefaultParams returns the default parameters for evmutil.

func NewParams added in v0.19.0

func NewParams(
	conversionPairs ConversionPairs,
) Params

NewParams returns new evmutil module Params.

func (*Params) Descriptor added in v0.19.0

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

func (*Params) Equal added in v0.19.0

func (this *Params) Equal(that interface{}) bool

func (*Params) GetEnabledConversionPairs added in v0.19.0

func (m *Params) GetEnabledConversionPairs() ConversionPairs

func (*Params) Marshal added in v0.19.0

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

func (*Params) MarshalTo added in v0.19.0

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

func (*Params) MarshalToSizedBuffer added in v0.19.0

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

func (*Params) ParamSetPairs added in v0.19.0

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of the evmutil module's parameters.

func (*Params) ProtoMessage added in v0.19.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v0.19.0

func (m *Params) Reset()

func (*Params) Size added in v0.19.0

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

func (*Params) String added in v0.19.0

func (m *Params) String() string

func (*Params) Unmarshal added in v0.19.0

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

func (*Params) Validate added in v0.19.0

func (p *Params) Validate() error

Validate returns an error if the Parmas is invalid.

func (*Params) VerboseEqual added in v0.19.0

func (this *Params) VerboseEqual(that interface{}) error

func (*Params) XXX_DiscardUnknown added in v0.19.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v0.19.0

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

func (*Params) XXX_Merge added in v0.19.0

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

func (*Params) XXX_Size added in v0.19.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v0.19.0

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

type QueryClient added in v0.19.0

type QueryClient interface {
	// Params queries all parameters of the evmutil module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient added in v0.19.0

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest added in v0.19.0

type QueryParamsRequest struct {
}

QueryParamsRequest defines the request type for querying x/evmutil parameters.

func (*QueryParamsRequest) Descriptor added in v0.19.0

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

func (*QueryParamsRequest) Equal added in v0.19.0

func (this *QueryParamsRequest) Equal(that interface{}) bool

func (*QueryParamsRequest) Marshal added in v0.19.0

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

func (*QueryParamsRequest) MarshalTo added in v0.19.0

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

func (*QueryParamsRequest) MarshalToSizedBuffer added in v0.19.0

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

func (*QueryParamsRequest) ProtoMessage added in v0.19.0

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset added in v0.19.0

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size added in v0.19.0

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

func (*QueryParamsRequest) String added in v0.19.0

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal added in v0.19.0

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

func (*QueryParamsRequest) VerboseEqual added in v0.19.0

func (this *QueryParamsRequest) VerboseEqual(that interface{}) error

func (*QueryParamsRequest) XXX_DiscardUnknown added in v0.19.0

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal added in v0.19.0

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

func (*QueryParamsRequest) XXX_Merge added in v0.19.0

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

func (*QueryParamsRequest) XXX_Size added in v0.19.0

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal added in v0.19.0

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

type QueryParamsResponse added in v0.19.0

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse defines the response type for querying x/evmutil parameters.

func (*QueryParamsResponse) Descriptor added in v0.19.0

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

func (*QueryParamsResponse) Equal added in v0.19.0

func (this *QueryParamsResponse) Equal(that interface{}) bool

func (*QueryParamsResponse) GetParams added in v0.19.0

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal added in v0.19.0

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

func (*QueryParamsResponse) MarshalTo added in v0.19.0

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

func (*QueryParamsResponse) MarshalToSizedBuffer added in v0.19.0

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

func (*QueryParamsResponse) ProtoMessage added in v0.19.0

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset added in v0.19.0

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size added in v0.19.0

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

func (*QueryParamsResponse) String added in v0.19.0

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal added in v0.19.0

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

func (*QueryParamsResponse) VerboseEqual added in v0.19.0

func (this *QueryParamsResponse) VerboseEqual(that interface{}) error

func (*QueryParamsResponse) XXX_DiscardUnknown added in v0.19.0

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal added in v0.19.0

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

func (*QueryParamsResponse) XXX_Merge added in v0.19.0

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

func (*QueryParamsResponse) XXX_Size added in v0.19.0

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal added in v0.19.0

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

type QueryServer added in v0.19.0

type QueryServer interface {
	// Params queries all parameters of the evmutil module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer added in v0.19.0

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) ConvertCoinToERC20 added in v0.19.0

func (*UnimplementedMsgServer) ConvertERC20ToCoin added in v0.19.0

type UnimplementedQueryServer added in v0.19.0

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params added in v0.19.0

Jump to

Keyboard shortcuts

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