Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func AccountStoreKey(addr sdk.AccAddress) []byte
- func DeployedCosmosCoinContractKey(cosmosDenom string) []byte
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type Account
- func (*Account) Descriptor() ([]byte, []int)
- func (this *Account) Equal(that interface{}) bool
- func (m *Account) Marshal() (dAtA []byte, err error)
- func (m *Account) MarshalTo(dAtA []byte) (int, error)
- func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Account) ProtoMessage()
- func (m *Account) Reset()
- func (m *Account) Size() (n int)
- func (m *Account) String() string
- func (m *Account) Unmarshal(dAtA []byte) error
- func (b Account) Validate() error
- func (this *Account) VerboseEqual(that interface{}) error
- func (m *Account) XXX_DiscardUnknown()
- func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Account) XXX_Merge(src proto.Message)
- func (m *Account) XXX_Size() int
- func (m *Account) XXX_Unmarshal(b []byte) error
- type AccountKeeper
- type AllowedCosmosCoinERC20Token
- func (*AllowedCosmosCoinERC20Token) Descriptor() ([]byte, []int)
- func (this *AllowedCosmosCoinERC20Token) Equal(that interface{}) bool
- func (m *AllowedCosmosCoinERC20Token) Marshal() (dAtA []byte, err error)
- func (m *AllowedCosmosCoinERC20Token) MarshalTo(dAtA []byte) (int, error)
- func (m *AllowedCosmosCoinERC20Token) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AllowedCosmosCoinERC20Token) ProtoMessage()
- func (m *AllowedCosmosCoinERC20Token) Reset()
- func (m *AllowedCosmosCoinERC20Token) Size() (n int)
- func (m *AllowedCosmosCoinERC20Token) String() string
- func (m *AllowedCosmosCoinERC20Token) Unmarshal(dAtA []byte) error
- func (token AllowedCosmosCoinERC20Token) Validate() error
- func (this *AllowedCosmosCoinERC20Token) VerboseEqual(that interface{}) error
- func (m *AllowedCosmosCoinERC20Token) XXX_DiscardUnknown()
- func (m *AllowedCosmosCoinERC20Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AllowedCosmosCoinERC20Token) XXX_Merge(src proto.Message)
- func (m *AllowedCosmosCoinERC20Token) XXX_Size() int
- func (m *AllowedCosmosCoinERC20Token) XXX_Unmarshal(b []byte) error
- type AllowedCosmosCoinERC20Tokens
- type BankKeeper
- type ConversionPair
- func (*ConversionPair) Descriptor() ([]byte, []int)
- func (this *ConversionPair) Equal(that interface{}) bool
- func (pair ConversionPair) GetAddress() InternalEVMAddress
- func (m *ConversionPair) Marshal() (dAtA []byte, err error)
- func (m *ConversionPair) MarshalTo(dAtA []byte) (int, error)
- func (m *ConversionPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConversionPair) ProtoMessage()
- func (m *ConversionPair) Reset()
- func (m *ConversionPair) Size() (n int)
- func (m *ConversionPair) String() string
- func (m *ConversionPair) Unmarshal(dAtA []byte) error
- func (pair ConversionPair) Validate() error
- func (this *ConversionPair) VerboseEqual(that interface{}) error
- func (m *ConversionPair) XXX_DiscardUnknown()
- func (m *ConversionPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConversionPair) XXX_Merge(src proto.Message)
- func (m *ConversionPair) XXX_Size() int
- func (m *ConversionPair) XXX_Unmarshal(b []byte) error
- type ConversionPairs
- type EvmKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (this *GenesisState) Equal(that interface{}) bool
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (this *GenesisState) VerboseEqual(that interface{}) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type HexBytes
- type InternalEVMAddress
- type MsgClient
- type MsgConvertCoinToERC20
- func (*MsgConvertCoinToERC20) Descriptor() ([]byte, []int)
- func (this *MsgConvertCoinToERC20) Equal(that interface{}) bool
- func (m *MsgConvertCoinToERC20) GetAmount() *types.Coin
- func (m *MsgConvertCoinToERC20) GetInitiator() string
- func (m *MsgConvertCoinToERC20) GetReceiver() string
- func (msg MsgConvertCoinToERC20) GetSignBytes() []byte
- func (msg MsgConvertCoinToERC20) GetSigners() []sdk.AccAddress
- func (m *MsgConvertCoinToERC20) Marshal() (dAtA []byte, err error)
- func (m *MsgConvertCoinToERC20) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgConvertCoinToERC20) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgConvertCoinToERC20) ProtoMessage()
- func (m *MsgConvertCoinToERC20) Reset()
- func (msg MsgConvertCoinToERC20) Route() string
- func (m *MsgConvertCoinToERC20) Size() (n int)
- func (m *MsgConvertCoinToERC20) String() string
- func (msg MsgConvertCoinToERC20) Type() string
- func (m *MsgConvertCoinToERC20) Unmarshal(dAtA []byte) error
- func (msg MsgConvertCoinToERC20) ValidateBasic() error
- func (this *MsgConvertCoinToERC20) VerboseEqual(that interface{}) error
- func (m *MsgConvertCoinToERC20) XXX_DiscardUnknown()
- func (m *MsgConvertCoinToERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgConvertCoinToERC20) XXX_Merge(src proto.Message)
- func (m *MsgConvertCoinToERC20) XXX_Size() int
- func (m *MsgConvertCoinToERC20) XXX_Unmarshal(b []byte) error
- type MsgConvertCoinToERC20Response
- func (*MsgConvertCoinToERC20Response) Descriptor() ([]byte, []int)
- func (this *MsgConvertCoinToERC20Response) Equal(that interface{}) bool
- func (m *MsgConvertCoinToERC20Response) Marshal() (dAtA []byte, err error)
- func (m *MsgConvertCoinToERC20Response) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgConvertCoinToERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgConvertCoinToERC20Response) ProtoMessage()
- func (m *MsgConvertCoinToERC20Response) Reset()
- func (m *MsgConvertCoinToERC20Response) Size() (n int)
- func (m *MsgConvertCoinToERC20Response) String() string
- func (m *MsgConvertCoinToERC20Response) Unmarshal(dAtA []byte) error
- func (this *MsgConvertCoinToERC20Response) VerboseEqual(that interface{}) error
- func (m *MsgConvertCoinToERC20Response) XXX_DiscardUnknown()
- func (m *MsgConvertCoinToERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgConvertCoinToERC20Response) XXX_Merge(src proto.Message)
- func (m *MsgConvertCoinToERC20Response) XXX_Size() int
- func (m *MsgConvertCoinToERC20Response) XXX_Unmarshal(b []byte) error
- type MsgConvertCosmosCoinToERC20
- func (*MsgConvertCosmosCoinToERC20) Descriptor() ([]byte, []int)
- func (this *MsgConvertCosmosCoinToERC20) Equal(that interface{}) bool
- func (m *MsgConvertCosmosCoinToERC20) GetAmount() *types.Coin
- func (m *MsgConvertCosmosCoinToERC20) GetInitiator() string
- func (m *MsgConvertCosmosCoinToERC20) GetReceiver() string
- func (msg MsgConvertCosmosCoinToERC20) GetSignBytes() []byte
- func (msg MsgConvertCosmosCoinToERC20) GetSigners() []sdk.AccAddress
- func (m *MsgConvertCosmosCoinToERC20) Marshal() (dAtA []byte, err error)
- func (m *MsgConvertCosmosCoinToERC20) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgConvertCosmosCoinToERC20) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgConvertCosmosCoinToERC20) ProtoMessage()
- func (m *MsgConvertCosmosCoinToERC20) Reset()
- func (MsgConvertCosmosCoinToERC20) Route() string
- func (m *MsgConvertCosmosCoinToERC20) Size() (n int)
- func (m *MsgConvertCosmosCoinToERC20) String() string
- func (MsgConvertCosmosCoinToERC20) Type() string
- func (m *MsgConvertCosmosCoinToERC20) Unmarshal(dAtA []byte) error
- func (msg MsgConvertCosmosCoinToERC20) ValidateBasic() error
- func (this *MsgConvertCosmosCoinToERC20) VerboseEqual(that interface{}) error
- func (m *MsgConvertCosmosCoinToERC20) XXX_DiscardUnknown()
- func (m *MsgConvertCosmosCoinToERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgConvertCosmosCoinToERC20) XXX_Merge(src proto.Message)
- func (m *MsgConvertCosmosCoinToERC20) XXX_Size() int
- func (m *MsgConvertCosmosCoinToERC20) XXX_Unmarshal(b []byte) error
- type MsgConvertCosmosCoinToERC20Response
- func (*MsgConvertCosmosCoinToERC20Response) Descriptor() ([]byte, []int)
- func (this *MsgConvertCosmosCoinToERC20Response) Equal(that interface{}) bool
- func (m *MsgConvertCosmosCoinToERC20Response) Marshal() (dAtA []byte, err error)
- func (m *MsgConvertCosmosCoinToERC20Response) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgConvertCosmosCoinToERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgConvertCosmosCoinToERC20Response) ProtoMessage()
- func (m *MsgConvertCosmosCoinToERC20Response) Reset()
- func (m *MsgConvertCosmosCoinToERC20Response) Size() (n int)
- func (m *MsgConvertCosmosCoinToERC20Response) String() string
- func (m *MsgConvertCosmosCoinToERC20Response) Unmarshal(dAtA []byte) error
- func (this *MsgConvertCosmosCoinToERC20Response) VerboseEqual(that interface{}) error
- func (m *MsgConvertCosmosCoinToERC20Response) XXX_DiscardUnknown()
- func (m *MsgConvertCosmosCoinToERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgConvertCosmosCoinToERC20Response) XXX_Merge(src proto.Message)
- func (m *MsgConvertCosmosCoinToERC20Response) XXX_Size() int
- func (m *MsgConvertCosmosCoinToERC20Response) XXX_Unmarshal(b []byte) error
- type MsgConvertERC20ToCoin
- func (*MsgConvertERC20ToCoin) Descriptor() ([]byte, []int)
- func (this *MsgConvertERC20ToCoin) Equal(that interface{}) bool
- func (m *MsgConvertERC20ToCoin) GetBlackERC20Address() string
- func (m *MsgConvertERC20ToCoin) GetInitiator() string
- func (m *MsgConvertERC20ToCoin) GetReceiver() string
- func (msg MsgConvertERC20ToCoin) GetSignBytes() []byte
- func (msg MsgConvertERC20ToCoin) GetSigners() []sdk.AccAddress
- func (m *MsgConvertERC20ToCoin) Marshal() (dAtA []byte, err error)
- func (m *MsgConvertERC20ToCoin) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgConvertERC20ToCoin) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgConvertERC20ToCoin) ProtoMessage()
- func (m *MsgConvertERC20ToCoin) Reset()
- func (msg MsgConvertERC20ToCoin) Route() string
- func (m *MsgConvertERC20ToCoin) Size() (n int)
- func (m *MsgConvertERC20ToCoin) String() string
- func (msg MsgConvertERC20ToCoin) Type() string
- func (m *MsgConvertERC20ToCoin) Unmarshal(dAtA []byte) error
- func (msg MsgConvertERC20ToCoin) ValidateBasic() error
- func (this *MsgConvertERC20ToCoin) VerboseEqual(that interface{}) error
- func (m *MsgConvertERC20ToCoin) XXX_DiscardUnknown()
- func (m *MsgConvertERC20ToCoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgConvertERC20ToCoin) XXX_Merge(src proto.Message)
- func (m *MsgConvertERC20ToCoin) XXX_Size() int
- func (m *MsgConvertERC20ToCoin) XXX_Unmarshal(b []byte) error
- type MsgConvertERC20ToCoinResponse
- func (*MsgConvertERC20ToCoinResponse) Descriptor() ([]byte, []int)
- func (this *MsgConvertERC20ToCoinResponse) Equal(that interface{}) bool
- func (m *MsgConvertERC20ToCoinResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgConvertERC20ToCoinResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgConvertERC20ToCoinResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgConvertERC20ToCoinResponse) ProtoMessage()
- func (m *MsgConvertERC20ToCoinResponse) Reset()
- func (m *MsgConvertERC20ToCoinResponse) Size() (n int)
- func (m *MsgConvertERC20ToCoinResponse) String() string
- func (m *MsgConvertERC20ToCoinResponse) Unmarshal(dAtA []byte) error
- func (this *MsgConvertERC20ToCoinResponse) VerboseEqual(that interface{}) error
- func (m *MsgConvertERC20ToCoinResponse) XXX_DiscardUnknown()
- func (m *MsgConvertERC20ToCoinResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgConvertERC20ToCoinResponse) XXX_Merge(src proto.Message)
- func (m *MsgConvertERC20ToCoinResponse) XXX_Size() int
- func (m *MsgConvertERC20ToCoinResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (this *Params) Equal(that interface{}) bool
- func (m *Params) GetAllowedCosmosDenoms() AllowedCosmosCoinERC20Tokens
- func (m *Params) GetEnabledConversionPairs() ConversionPairs
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p *Params) Validate() error
- func (this *Params) VerboseEqual(that interface{}) error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (this *QueryParamsRequest) Equal(that interface{}) bool
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (this *QueryParamsRequest) VerboseEqual(that interface{}) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (this *QueryParamsResponse) Equal(that interface{}) bool
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (this *QueryParamsResponse) VerboseEqual(that interface{}) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) ConvertCoinToERC20(ctx context.Context, req *MsgConvertCoinToERC20) (*MsgConvertCoinToERC20Response, error)
- func (*UnimplementedMsgServer) ConvertCosmosCoinToERC20(ctx context.Context, req *MsgConvertCosmosCoinToERC20) (*MsgConvertCosmosCoinToERC20Response, error)
- func (*UnimplementedMsgServer) ConvertERC20ToCoin(ctx context.Context, req *MsgConvertERC20ToCoin) (*MsgConvertERC20ToCoinResponse, error)
- type UnimplementedQueryServer
Constants ¶
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
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 )
const ( TypeMsgConvertCoinToERC20 = "evmutil_convert_coin_to_erc20" TypeMsgConvertERC20ToCoin = "evmutil_convert_erc20_to_coin" TypeMsgConvertCosmosCoinToERC20 = "evmutil_convert_cosmos_coin_to_erc20" )
legacy message types
Variables ¶
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 //go:embed ethermint_json/ERC20BlackWrappedCosmosCoin.json ERC20BlackWrappedCosmosCoinJSON []byte // ERC20BlackWrappedCosmosCoinContract is the compiled erc20 contract ERC20BlackWrappedCosmosCoinContract evmtypes.CompiledContract )
var ( ErrInvalidLengthConversionPair = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowConversionPair = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupConversionPair = fmt.Errorf("proto: unexpected end of group") )
var ( ErrABIPack = errorsmod.Register(ModuleName, 2, "contract ABI pack failed") ErrEVMCall = errorsmod.Register(ModuleName, 3, "EVM call unexpected error") ErrConversionNotEnabled = errorsmod.Register(ModuleName, 4, "ERC20 token not enabled to convert to sdk.Coin") ErrBalanceInvariance = errorsmod.Register(ModuleName, 5, "post EVM transfer balance invariant failed") ErrUnexpectedContractEvent = errorsmod.Register(ModuleName, 6, "unexpected contract event") ErrInvalidCosmosDenom = errorsmod.Register(ModuleName, 7, "invalid cosmos denom") ErrSDKConversionNotEnabled = errorsmod.Register(ModuleName, 8, "sdk.Coin not enabled to convert to ERC20 token") )
errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( // AccountStoreKeyPrefix is the prefix for keys that store accounts AccountStoreKeyPrefix = []byte{0x00} // DeployedCosmosCoinContractKeyPrefix is the key for storing deployed BlackWrappedCosmosCoinERC20s contract addresses DeployedCosmosCoinContractKeyPrefix = []byte{0x01} )
KVStore keys
var ( KeyEnabledConversionPairs = []byte("EnabledConversionPairs") DefaultConversionPairs = ConversionPairs{} KeyAllowedCosmosDenoms = []byte("AllowedCosmosDenoms") DefaultAllowedCosmosDenoms = AllowedCosmosCoinERC20Tokens{} )
Parameter keys and default values
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var (
ModuleCdc = codec.NewAminoCodec(amino)
)
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 DeployedCosmosCoinContractKey ¶
DeployedCosmosCoinContractKey gives the store key that holds the address of the deployed ERC20 that wraps the given cosmosDenom sdk.Coin
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
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 ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
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 ¶
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 ¶
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 ¶
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 afury 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 sdkmath.Int) *Account
func (*Account) Descriptor ¶
func (*Account) MarshalToSizedBuffer ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) VerboseEqual ¶
func (*Account) XXX_DiscardUnknown ¶
func (m *Account) XXX_DiscardUnknown()
func (*Account) XXX_Marshal ¶
func (*Account) XXX_Unmarshal ¶
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 AllowedCosmosCoinERC20Token ¶
type AllowedCosmosCoinERC20Token struct { // Denom of the sdk.Coin CosmosDenom string `protobuf:"bytes,1,opt,name=cosmos_denom,json=cosmosDenom,proto3" json:"cosmos_denom,omitempty"` // Name of ERC20 contract Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Symbol of ERC20 contract Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` // Number of decimals ERC20 contract is deployed with. Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` }
AllowedCosmosCoinERC20Token defines allowed cosmos-sdk denom & metadata for evm token representations of sdk assets. NOTE: once evm token contracts are deployed, changes to metadata for a given cosmos_denom will not change metadata of deployed contract.
func NewAllowedCosmosCoinERC20Token ¶
func NewAllowedCosmosCoinERC20Token( cosmosDenom, name, symbol string, decimal uint32, ) AllowedCosmosCoinERC20Token
NewAllowedCosmosCoinERC20Token returns an AllowedCosmosCoinERC20Token
func (*AllowedCosmosCoinERC20Token) Descriptor ¶
func (*AllowedCosmosCoinERC20Token) Descriptor() ([]byte, []int)
func (*AllowedCosmosCoinERC20Token) Equal ¶
func (this *AllowedCosmosCoinERC20Token) Equal(that interface{}) bool
func (*AllowedCosmosCoinERC20Token) Marshal ¶
func (m *AllowedCosmosCoinERC20Token) Marshal() (dAtA []byte, err error)
func (*AllowedCosmosCoinERC20Token) MarshalTo ¶
func (m *AllowedCosmosCoinERC20Token) MarshalTo(dAtA []byte) (int, error)
func (*AllowedCosmosCoinERC20Token) MarshalToSizedBuffer ¶
func (m *AllowedCosmosCoinERC20Token) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AllowedCosmosCoinERC20Token) ProtoMessage ¶
func (*AllowedCosmosCoinERC20Token) ProtoMessage()
func (*AllowedCosmosCoinERC20Token) Reset ¶
func (m *AllowedCosmosCoinERC20Token) Reset()
func (*AllowedCosmosCoinERC20Token) Size ¶
func (m *AllowedCosmosCoinERC20Token) Size() (n int)
func (*AllowedCosmosCoinERC20Token) String ¶
func (m *AllowedCosmosCoinERC20Token) String() string
func (*AllowedCosmosCoinERC20Token) Unmarshal ¶
func (m *AllowedCosmosCoinERC20Token) Unmarshal(dAtA []byte) error
func (AllowedCosmosCoinERC20Token) Validate ¶
func (token AllowedCosmosCoinERC20Token) Validate() error
Validate validates the fields of a single AllowedCosmosCoinERC20Token
func (*AllowedCosmosCoinERC20Token) VerboseEqual ¶
func (this *AllowedCosmosCoinERC20Token) VerboseEqual(that interface{}) error
func (*AllowedCosmosCoinERC20Token) XXX_DiscardUnknown ¶
func (m *AllowedCosmosCoinERC20Token) XXX_DiscardUnknown()
func (*AllowedCosmosCoinERC20Token) XXX_Marshal ¶
func (m *AllowedCosmosCoinERC20Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AllowedCosmosCoinERC20Token) XXX_Merge ¶
func (m *AllowedCosmosCoinERC20Token) XXX_Merge(src proto.Message)
func (*AllowedCosmosCoinERC20Token) XXX_Size ¶
func (m *AllowedCosmosCoinERC20Token) XXX_Size() int
func (*AllowedCosmosCoinERC20Token) XXX_Unmarshal ¶
func (m *AllowedCosmosCoinERC20Token) XXX_Unmarshal(b []byte) error
type AllowedCosmosCoinERC20Tokens ¶
type AllowedCosmosCoinERC20Tokens []AllowedCosmosCoinERC20Token
AllowedCosmosCoinERC20Tokens defines a slice of AllowedCosmosCoinERC20Token
func NewAllowedCosmosCoinERC20Tokens ¶
func NewAllowedCosmosCoinERC20Tokens(pairs ...AllowedCosmosCoinERC20Token) AllowedCosmosCoinERC20Tokens
NewAllowedCosmosCoinERC20Tokens returns AllowedCosmosCoinERC20Tokens from the provided values.
func (AllowedCosmosCoinERC20Tokens) Validate ¶
func (tokens AllowedCosmosCoinERC20Tokens) Validate() error
Validate checks that all containing tokens are valid and that there are no duplicate denoms or symbols.
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 ¶
type ConversionPair struct { // ERC20 address of the token on the Black EVM BlackERC20Address HexBytes `` /* 132-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 Black ERC20 address and corresponding denom that is allowed to be converted between ERC20 and sdk.Coin
func NewConversionPair ¶
func NewConversionPair(address InternalEVMAddress, denom string) ConversionPair
NewConversionPair returns a new ConversionPair.
func (*ConversionPair) Descriptor ¶
func (*ConversionPair) Descriptor() ([]byte, []int)
func (*ConversionPair) Equal ¶
func (this *ConversionPair) Equal(that interface{}) bool
func (ConversionPair) GetAddress ¶
func (pair ConversionPair) GetAddress() InternalEVMAddress
GetAddress returns the InternalEVMAddress of the Black ERC20 address.
func (*ConversionPair) Marshal ¶
func (m *ConversionPair) Marshal() (dAtA []byte, err error)
func (*ConversionPair) MarshalToSizedBuffer ¶
func (m *ConversionPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConversionPair) ProtoMessage ¶
func (*ConversionPair) ProtoMessage()
func (*ConversionPair) Reset ¶
func (m *ConversionPair) Reset()
func (*ConversionPair) Size ¶
func (m *ConversionPair) Size() (n int)
func (*ConversionPair) String ¶
func (m *ConversionPair) String() string
func (*ConversionPair) Unmarshal ¶
func (m *ConversionPair) Unmarshal(dAtA []byte) error
func (ConversionPair) Validate ¶
func (pair ConversionPair) Validate() error
Validate returns an error if the ConversionPair is invalid.
func (*ConversionPair) VerboseEqual ¶
func (this *ConversionPair) VerboseEqual(that interface{}) error
func (*ConversionPair) XXX_DiscardUnknown ¶
func (m *ConversionPair) XXX_DiscardUnknown()
func (*ConversionPair) XXX_Marshal ¶
func (m *ConversionPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConversionPair) XXX_Merge ¶
func (m *ConversionPair) XXX_Merge(src proto.Message)
func (*ConversionPair) XXX_Size ¶
func (m *ConversionPair) XXX_Size() int
func (*ConversionPair) XXX_Unmarshal ¶
func (m *ConversionPair) XXX_Unmarshal(b []byte) error
type ConversionPairs ¶
type ConversionPairs []ConversionPair
ConversionPairs defines a slice of ConversionPair.
func NewConversionPairs ¶
func NewConversionPairs(pairs ...ConversionPair) ConversionPairs
NewConversionPairs returns ConversionPairs from the provided values.
func (ConversionPairs) Validate ¶
func (pairs ConversionPairs) Validate() error
type EvmKeeper ¶
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 ¶
func (this *GenesisState) Equal(that interface{}) bool
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err 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 ¶
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 ¶
type HexBytes []byte
HexBytes represents a byte slice that marshals into a 0x representation
func (HexBytes) MarshalJSON ¶
MarshalJSON marshals HexBytes into a 0x json string
func (*HexBytes) UnmarshalJSON ¶
UnmarshalJSON unmarshals a 0x json string into bytes
type InternalEVMAddress ¶
InternalEVMAddress is a type alias of common.Address to represent an address on the Black EVM.
func BytesToInternalEVMAddress ¶
func BytesToInternalEVMAddress(bz []byte) InternalEVMAddress
BytesToInternalEVMAddress creates an InternalEVMAddress from a slice of bytes
func NewInternalEVMAddress ¶
func NewInternalEVMAddress(addr common.Address) InternalEVMAddress
NewInternalEVMAddress returns a new InternalEVMAddress from a common.Address.
func NewInternalEVMAddressFromString ¶
func NewInternalEVMAddressFromString(addrStr string) (InternalEVMAddress, error)
NewInternalEVMAddressFromString returns a new InternalEVMAddress from a hex string. Returns an error if hex string is invalid.
func (InternalEVMAddress) IsNil ¶
func (a InternalEVMAddress) IsNil() bool
IsNil returns true when the address is the 0 address
type MsgClient ¶
type MsgClient interface { // ConvertCoinToERC20 defines a method for converting sdk.Coin to Black ERC20. ConvertCoinToERC20(ctx context.Context, in *MsgConvertCoinToERC20, opts ...grpc.CallOption) (*MsgConvertCoinToERC20Response, error) // ConvertERC20ToCoin defines a method for converting Black ERC20 to sdk.Coin. ConvertERC20ToCoin(ctx context.Context, in *MsgConvertERC20ToCoin, opts ...grpc.CallOption) (*MsgConvertERC20ToCoinResponse, error) // ConvertCosmosCoinToERC20 defines a method for converting a cosmos sdk.Coin to an ERC20. ConvertCosmosCoinToERC20(ctx context.Context, in *MsgConvertCosmosCoinToERC20, opts ...grpc.CallOption) (*MsgConvertCosmosCoinToERC20Response, 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 MsgConvertCoinToERC20 ¶
type MsgConvertCoinToERC20 struct { // Black 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 Black 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 Black ERC20.
func NewMsgConvertCoinToERC20 ¶
func NewMsgConvertCoinToERC20( initiator string, receiver string, amount sdk.Coin, ) MsgConvertCoinToERC20
NewMsgConvertCoinToERC20 returns a new MsgConvertCoinToERC20
func (*MsgConvertCoinToERC20) Descriptor ¶
func (*MsgConvertCoinToERC20) Descriptor() ([]byte, []int)
func (*MsgConvertCoinToERC20) Equal ¶
func (this *MsgConvertCoinToERC20) Equal(that interface{}) bool
func (*MsgConvertCoinToERC20) GetAmount ¶
func (m *MsgConvertCoinToERC20) GetAmount() *types.Coin
func (*MsgConvertCoinToERC20) GetInitiator ¶
func (m *MsgConvertCoinToERC20) GetInitiator() string
func (*MsgConvertCoinToERC20) GetReceiver ¶
func (m *MsgConvertCoinToERC20) GetReceiver() string
func (MsgConvertCoinToERC20) GetSignBytes ¶
func (msg MsgConvertCoinToERC20) GetSignBytes() []byte
GetSignBytes implements the LegacyMsg.GetSignBytes method.
func (MsgConvertCoinToERC20) GetSigners ¶
func (msg MsgConvertCoinToERC20) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgConvertCoinToERC20) Marshal ¶
func (m *MsgConvertCoinToERC20) Marshal() (dAtA []byte, err error)
func (*MsgConvertCoinToERC20) MarshalTo ¶
func (m *MsgConvertCoinToERC20) MarshalTo(dAtA []byte) (int, error)
func (*MsgConvertCoinToERC20) MarshalToSizedBuffer ¶
func (m *MsgConvertCoinToERC20) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgConvertCoinToERC20) ProtoMessage ¶
func (*MsgConvertCoinToERC20) ProtoMessage()
func (*MsgConvertCoinToERC20) Reset ¶
func (m *MsgConvertCoinToERC20) Reset()
func (MsgConvertCoinToERC20) Route ¶
func (msg MsgConvertCoinToERC20) Route() string
Route implements the LegacyMsg.Route method.
func (*MsgConvertCoinToERC20) Size ¶
func (m *MsgConvertCoinToERC20) Size() (n int)
func (*MsgConvertCoinToERC20) String ¶
func (m *MsgConvertCoinToERC20) String() string
func (MsgConvertCoinToERC20) Type ¶
func (msg MsgConvertCoinToERC20) Type() string
Type implements the LegacyMsg.Type method.
func (*MsgConvertCoinToERC20) Unmarshal ¶
func (m *MsgConvertCoinToERC20) Unmarshal(dAtA []byte) error
func (MsgConvertCoinToERC20) ValidateBasic ¶
func (msg MsgConvertCoinToERC20) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
func (*MsgConvertCoinToERC20) VerboseEqual ¶
func (this *MsgConvertCoinToERC20) VerboseEqual(that interface{}) error
func (*MsgConvertCoinToERC20) XXX_DiscardUnknown ¶
func (m *MsgConvertCoinToERC20) XXX_DiscardUnknown()
func (*MsgConvertCoinToERC20) XXX_Marshal ¶
func (m *MsgConvertCoinToERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgConvertCoinToERC20) XXX_Merge ¶
func (m *MsgConvertCoinToERC20) XXX_Merge(src proto.Message)
func (*MsgConvertCoinToERC20) XXX_Size ¶
func (m *MsgConvertCoinToERC20) XXX_Size() int
func (*MsgConvertCoinToERC20) XXX_Unmarshal ¶
func (m *MsgConvertCoinToERC20) XXX_Unmarshal(b []byte) error
type MsgConvertCoinToERC20Response ¶
type MsgConvertCoinToERC20Response struct { }
MsgConvertCoinToERC20Response defines the response value from Msg/ConvertCoinToERC20.
func (*MsgConvertCoinToERC20Response) Descriptor ¶
func (*MsgConvertCoinToERC20Response) Descriptor() ([]byte, []int)
func (*MsgConvertCoinToERC20Response) Equal ¶
func (this *MsgConvertCoinToERC20Response) Equal(that interface{}) bool
func (*MsgConvertCoinToERC20Response) Marshal ¶
func (m *MsgConvertCoinToERC20Response) Marshal() (dAtA []byte, err error)
func (*MsgConvertCoinToERC20Response) MarshalTo ¶
func (m *MsgConvertCoinToERC20Response) MarshalTo(dAtA []byte) (int, error)
func (*MsgConvertCoinToERC20Response) MarshalToSizedBuffer ¶
func (m *MsgConvertCoinToERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgConvertCoinToERC20Response) ProtoMessage ¶
func (*MsgConvertCoinToERC20Response) ProtoMessage()
func (*MsgConvertCoinToERC20Response) Reset ¶
func (m *MsgConvertCoinToERC20Response) Reset()
func (*MsgConvertCoinToERC20Response) Size ¶
func (m *MsgConvertCoinToERC20Response) Size() (n int)
func (*MsgConvertCoinToERC20Response) String ¶
func (m *MsgConvertCoinToERC20Response) String() string
func (*MsgConvertCoinToERC20Response) Unmarshal ¶
func (m *MsgConvertCoinToERC20Response) Unmarshal(dAtA []byte) error
func (*MsgConvertCoinToERC20Response) VerboseEqual ¶
func (this *MsgConvertCoinToERC20Response) VerboseEqual(that interface{}) error
func (*MsgConvertCoinToERC20Response) XXX_DiscardUnknown ¶
func (m *MsgConvertCoinToERC20Response) XXX_DiscardUnknown()
func (*MsgConvertCoinToERC20Response) XXX_Marshal ¶
func (m *MsgConvertCoinToERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgConvertCoinToERC20Response) XXX_Merge ¶
func (m *MsgConvertCoinToERC20Response) XXX_Merge(src proto.Message)
func (*MsgConvertCoinToERC20Response) XXX_Size ¶
func (m *MsgConvertCoinToERC20Response) XXX_Size() int
func (*MsgConvertCoinToERC20Response) XXX_Unmarshal ¶
func (m *MsgConvertCoinToERC20Response) XXX_Unmarshal(b []byte) error
type MsgConvertCosmosCoinToERC20 ¶
type MsgConvertCosmosCoinToERC20 struct { // Black bech32 address initiating the conversion. Initiator string `protobuf:"bytes,1,opt,name=initiator,proto3" json:"initiator,omitempty"` // EVM hex address that will receive the 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"` }
ConvertCosmosCoinToERC20 defines a conversion from cosmos sdk.Coin to ERC20.
func NewMsgConvertCosmosCoinToERC20 ¶
func NewMsgConvertCosmosCoinToERC20( initiator string, receiver string, amount sdk.Coin, ) MsgConvertCosmosCoinToERC20
NewMsgConvertCosmosCoinToERC20 returns a new MsgConvertCosmosCoinToERC20
func (*MsgConvertCosmosCoinToERC20) Descriptor ¶
func (*MsgConvertCosmosCoinToERC20) Descriptor() ([]byte, []int)
func (*MsgConvertCosmosCoinToERC20) Equal ¶
func (this *MsgConvertCosmosCoinToERC20) Equal(that interface{}) bool
func (*MsgConvertCosmosCoinToERC20) GetAmount ¶
func (m *MsgConvertCosmosCoinToERC20) GetAmount() *types.Coin
func (*MsgConvertCosmosCoinToERC20) GetInitiator ¶
func (m *MsgConvertCosmosCoinToERC20) GetInitiator() string
func (*MsgConvertCosmosCoinToERC20) GetReceiver ¶
func (m *MsgConvertCosmosCoinToERC20) GetReceiver() string
func (MsgConvertCosmosCoinToERC20) GetSignBytes ¶
func (msg MsgConvertCosmosCoinToERC20) GetSignBytes() []byte
GetSignBytes implements legacytx.LegacyMsg
func (MsgConvertCosmosCoinToERC20) GetSigners ¶
func (msg MsgConvertCosmosCoinToERC20) GetSigners() []sdk.AccAddress
GetSigners implements types.Msg
func (*MsgConvertCosmosCoinToERC20) Marshal ¶
func (m *MsgConvertCosmosCoinToERC20) Marshal() (dAtA []byte, err error)
func (*MsgConvertCosmosCoinToERC20) MarshalTo ¶
func (m *MsgConvertCosmosCoinToERC20) MarshalTo(dAtA []byte) (int, error)
func (*MsgConvertCosmosCoinToERC20) MarshalToSizedBuffer ¶
func (m *MsgConvertCosmosCoinToERC20) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgConvertCosmosCoinToERC20) ProtoMessage ¶
func (*MsgConvertCosmosCoinToERC20) ProtoMessage()
func (*MsgConvertCosmosCoinToERC20) Reset ¶
func (m *MsgConvertCosmosCoinToERC20) Reset()
func (MsgConvertCosmosCoinToERC20) Route ¶
func (MsgConvertCosmosCoinToERC20) Route() string
Route implements legacytx.LegacyMsg
func (*MsgConvertCosmosCoinToERC20) Size ¶
func (m *MsgConvertCosmosCoinToERC20) Size() (n int)
func (*MsgConvertCosmosCoinToERC20) String ¶
func (m *MsgConvertCosmosCoinToERC20) String() string
func (MsgConvertCosmosCoinToERC20) Type ¶
func (MsgConvertCosmosCoinToERC20) Type() string
Type implements legacytx.LegacyMsg
func (*MsgConvertCosmosCoinToERC20) Unmarshal ¶
func (m *MsgConvertCosmosCoinToERC20) Unmarshal(dAtA []byte) error
func (MsgConvertCosmosCoinToERC20) ValidateBasic ¶
func (msg MsgConvertCosmosCoinToERC20) ValidateBasic() error
ValidateBasic implements types.Msg
func (*MsgConvertCosmosCoinToERC20) VerboseEqual ¶
func (this *MsgConvertCosmosCoinToERC20) VerboseEqual(that interface{}) error
func (*MsgConvertCosmosCoinToERC20) XXX_DiscardUnknown ¶
func (m *MsgConvertCosmosCoinToERC20) XXX_DiscardUnknown()
func (*MsgConvertCosmosCoinToERC20) XXX_Marshal ¶
func (m *MsgConvertCosmosCoinToERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgConvertCosmosCoinToERC20) XXX_Merge ¶
func (m *MsgConvertCosmosCoinToERC20) XXX_Merge(src proto.Message)
func (*MsgConvertCosmosCoinToERC20) XXX_Size ¶
func (m *MsgConvertCosmosCoinToERC20) XXX_Size() int
func (*MsgConvertCosmosCoinToERC20) XXX_Unmarshal ¶
func (m *MsgConvertCosmosCoinToERC20) XXX_Unmarshal(b []byte) error
type MsgConvertCosmosCoinToERC20Response ¶
type MsgConvertCosmosCoinToERC20Response struct { }
MsgConvertCosmosCoinToERC20Response defines the response value from Msg/MsgConvertCosmosCoinToERC20.
func (*MsgConvertCosmosCoinToERC20Response) Descriptor ¶
func (*MsgConvertCosmosCoinToERC20Response) Descriptor() ([]byte, []int)
func (*MsgConvertCosmosCoinToERC20Response) Equal ¶
func (this *MsgConvertCosmosCoinToERC20Response) Equal(that interface{}) bool
func (*MsgConvertCosmosCoinToERC20Response) Marshal ¶
func (m *MsgConvertCosmosCoinToERC20Response) Marshal() (dAtA []byte, err error)
func (*MsgConvertCosmosCoinToERC20Response) MarshalTo ¶
func (m *MsgConvertCosmosCoinToERC20Response) MarshalTo(dAtA []byte) (int, error)
func (*MsgConvertCosmosCoinToERC20Response) MarshalToSizedBuffer ¶
func (m *MsgConvertCosmosCoinToERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgConvertCosmosCoinToERC20Response) ProtoMessage ¶
func (*MsgConvertCosmosCoinToERC20Response) ProtoMessage()
func (*MsgConvertCosmosCoinToERC20Response) Reset ¶
func (m *MsgConvertCosmosCoinToERC20Response) Reset()
func (*MsgConvertCosmosCoinToERC20Response) Size ¶
func (m *MsgConvertCosmosCoinToERC20Response) Size() (n int)
func (*MsgConvertCosmosCoinToERC20Response) String ¶
func (m *MsgConvertCosmosCoinToERC20Response) String() string
func (*MsgConvertCosmosCoinToERC20Response) Unmarshal ¶
func (m *MsgConvertCosmosCoinToERC20Response) Unmarshal(dAtA []byte) error
func (*MsgConvertCosmosCoinToERC20Response) VerboseEqual ¶
func (this *MsgConvertCosmosCoinToERC20Response) VerboseEqual(that interface{}) error
func (*MsgConvertCosmosCoinToERC20Response) XXX_DiscardUnknown ¶
func (m *MsgConvertCosmosCoinToERC20Response) XXX_DiscardUnknown()
func (*MsgConvertCosmosCoinToERC20Response) XXX_Marshal ¶
func (m *MsgConvertCosmosCoinToERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgConvertCosmosCoinToERC20Response) XXX_Merge ¶
func (m *MsgConvertCosmosCoinToERC20Response) XXX_Merge(src proto.Message)
func (*MsgConvertCosmosCoinToERC20Response) XXX_Size ¶
func (m *MsgConvertCosmosCoinToERC20Response) XXX_Size() int
func (*MsgConvertCosmosCoinToERC20Response) XXX_Unmarshal ¶
func (m *MsgConvertCosmosCoinToERC20Response) XXX_Unmarshal(b []byte) error
type MsgConvertERC20ToCoin ¶
type MsgConvertERC20ToCoin struct { // EVM 0x hex address initiating the conversion. Initiator string `protobuf:"bytes,1,opt,name=initiator,proto3" json:"initiator,omitempty"` // Black 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. BlackERC20Address string `protobuf:"bytes,3,opt,name=black_erc20_address,json=blackErc20Address,proto3" json:"black_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 Black ERC20 to sdk.Coin.
func NewMsgConvertERC20ToCoin ¶
func NewMsgConvertERC20ToCoin( initiator InternalEVMAddress, receiver sdk.AccAddress, contractAddr InternalEVMAddress, amount sdkmath.Int, ) MsgConvertERC20ToCoin
NewMsgConvertERC20ToCoin returns a new MsgConvertERC20ToCoin
func (*MsgConvertERC20ToCoin) Descriptor ¶
func (*MsgConvertERC20ToCoin) Descriptor() ([]byte, []int)
func (*MsgConvertERC20ToCoin) Equal ¶
func (this *MsgConvertERC20ToCoin) Equal(that interface{}) bool
func (*MsgConvertERC20ToCoin) GetBlackERC20Address ¶
func (m *MsgConvertERC20ToCoin) GetBlackERC20Address() string
func (*MsgConvertERC20ToCoin) GetInitiator ¶
func (m *MsgConvertERC20ToCoin) GetInitiator() string
func (*MsgConvertERC20ToCoin) GetReceiver ¶
func (m *MsgConvertERC20ToCoin) GetReceiver() string
func (MsgConvertERC20ToCoin) GetSignBytes ¶
func (msg MsgConvertERC20ToCoin) GetSignBytes() []byte
GetSignBytes implements the LegacyMsg.GetSignBytes method.
func (MsgConvertERC20ToCoin) GetSigners ¶
func (msg MsgConvertERC20ToCoin) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgConvertERC20ToCoin) Marshal ¶
func (m *MsgConvertERC20ToCoin) Marshal() (dAtA []byte, err error)
func (*MsgConvertERC20ToCoin) MarshalTo ¶
func (m *MsgConvertERC20ToCoin) MarshalTo(dAtA []byte) (int, error)
func (*MsgConvertERC20ToCoin) MarshalToSizedBuffer ¶
func (m *MsgConvertERC20ToCoin) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgConvertERC20ToCoin) ProtoMessage ¶
func (*MsgConvertERC20ToCoin) ProtoMessage()
func (*MsgConvertERC20ToCoin) Reset ¶
func (m *MsgConvertERC20ToCoin) Reset()
func (MsgConvertERC20ToCoin) Route ¶
func (msg MsgConvertERC20ToCoin) Route() string
Route implements the LegacyMsg.Route method.
func (*MsgConvertERC20ToCoin) Size ¶
func (m *MsgConvertERC20ToCoin) Size() (n int)
func (*MsgConvertERC20ToCoin) String ¶
func (m *MsgConvertERC20ToCoin) String() string
func (MsgConvertERC20ToCoin) Type ¶
func (msg MsgConvertERC20ToCoin) Type() string
Type implements the LegacyMsg.Type method.
func (*MsgConvertERC20ToCoin) Unmarshal ¶
func (m *MsgConvertERC20ToCoin) Unmarshal(dAtA []byte) error
func (MsgConvertERC20ToCoin) ValidateBasic ¶
func (msg MsgConvertERC20ToCoin) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
func (*MsgConvertERC20ToCoin) VerboseEqual ¶
func (this *MsgConvertERC20ToCoin) VerboseEqual(that interface{}) error
func (*MsgConvertERC20ToCoin) XXX_DiscardUnknown ¶
func (m *MsgConvertERC20ToCoin) XXX_DiscardUnknown()
func (*MsgConvertERC20ToCoin) XXX_Marshal ¶
func (m *MsgConvertERC20ToCoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgConvertERC20ToCoin) XXX_Merge ¶
func (m *MsgConvertERC20ToCoin) XXX_Merge(src proto.Message)
func (*MsgConvertERC20ToCoin) XXX_Size ¶
func (m *MsgConvertERC20ToCoin) XXX_Size() int
func (*MsgConvertERC20ToCoin) XXX_Unmarshal ¶
func (m *MsgConvertERC20ToCoin) XXX_Unmarshal(b []byte) error
type MsgConvertERC20ToCoinResponse ¶
type MsgConvertERC20ToCoinResponse struct { }
MsgConvertERC20ToCoinResponse defines the response value from Msg/MsgConvertERC20ToCoin.
func (*MsgConvertERC20ToCoinResponse) Descriptor ¶
func (*MsgConvertERC20ToCoinResponse) Descriptor() ([]byte, []int)
func (*MsgConvertERC20ToCoinResponse) Equal ¶
func (this *MsgConvertERC20ToCoinResponse) Equal(that interface{}) bool
func (*MsgConvertERC20ToCoinResponse) Marshal ¶
func (m *MsgConvertERC20ToCoinResponse) Marshal() (dAtA []byte, err error)
func (*MsgConvertERC20ToCoinResponse) MarshalTo ¶
func (m *MsgConvertERC20ToCoinResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgConvertERC20ToCoinResponse) MarshalToSizedBuffer ¶
func (m *MsgConvertERC20ToCoinResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgConvertERC20ToCoinResponse) ProtoMessage ¶
func (*MsgConvertERC20ToCoinResponse) ProtoMessage()
func (*MsgConvertERC20ToCoinResponse) Reset ¶
func (m *MsgConvertERC20ToCoinResponse) Reset()
func (*MsgConvertERC20ToCoinResponse) Size ¶
func (m *MsgConvertERC20ToCoinResponse) Size() (n int)
func (*MsgConvertERC20ToCoinResponse) String ¶
func (m *MsgConvertERC20ToCoinResponse) String() string
func (*MsgConvertERC20ToCoinResponse) Unmarshal ¶
func (m *MsgConvertERC20ToCoinResponse) Unmarshal(dAtA []byte) error
func (*MsgConvertERC20ToCoinResponse) VerboseEqual ¶
func (this *MsgConvertERC20ToCoinResponse) VerboseEqual(that interface{}) error
func (*MsgConvertERC20ToCoinResponse) XXX_DiscardUnknown ¶
func (m *MsgConvertERC20ToCoinResponse) XXX_DiscardUnknown()
func (*MsgConvertERC20ToCoinResponse) XXX_Marshal ¶
func (m *MsgConvertERC20ToCoinResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgConvertERC20ToCoinResponse) XXX_Merge ¶
func (m *MsgConvertERC20ToCoinResponse) XXX_Merge(src proto.Message)
func (*MsgConvertERC20ToCoinResponse) XXX_Size ¶
func (m *MsgConvertERC20ToCoinResponse) XXX_Size() int
func (*MsgConvertERC20ToCoinResponse) XXX_Unmarshal ¶
func (m *MsgConvertERC20ToCoinResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // ConvertCoinToERC20 defines a method for converting sdk.Coin to Black ERC20. ConvertCoinToERC20(context.Context, *MsgConvertCoinToERC20) (*MsgConvertCoinToERC20Response, error) // ConvertERC20ToCoin defines a method for converting Black ERC20 to sdk.Coin. ConvertERC20ToCoin(context.Context, *MsgConvertERC20ToCoin) (*MsgConvertERC20ToCoinResponse, error) // ConvertCosmosCoinToERC20 defines a method for converting a cosmos sdk.Coin to an ERC20. ConvertCosmosCoinToERC20(context.Context, *MsgConvertCosmosCoinToERC20) (*MsgConvertCosmosCoinToERC20Response, error) }
MsgServer is the server API for Msg service.
type Params ¶
type Params struct { // enabled_conversion_pairs defines the list of conversion pairs allowed to be // converted between Black ERC20 and sdk.Coin EnabledConversionPairs ConversionPairs `` /* 148-byte string literal not displayed */ // allowed_cosmos_denoms is a list of denom & erc20 token metadata pairs. // if a denom is in the list, it is allowed to be converted to an erc20 in the evm. AllowedCosmosDenoms AllowedCosmosCoinERC20Tokens `` /* 152-byte string literal not displayed */ }
Params defines the evmutil module params
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns the default parameters for evmutil.
func NewParams ¶
func NewParams( conversionPairs ConversionPairs, allowedCosmosDenoms AllowedCosmosCoinERC20Tokens, ) Params
NewParams returns new evmutil module Params.
func (*Params) Descriptor ¶
func (*Params) GetAllowedCosmosDenoms ¶
func (m *Params) GetAllowedCosmosDenoms() AllowedCosmosCoinERC20Tokens
func (*Params) GetEnabledConversionPairs ¶
func (m *Params) GetEnabledConversionPairs() ConversionPairs
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
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 ¶
func (*Params) ProtoMessage()
func (*Params) VerboseEqual ¶
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
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 ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest defines the request type for querying x/evmutil parameters.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Equal ¶
func (this *QueryParamsRequest) Equal(that interface{}) bool
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) VerboseEqual ¶
func (this *QueryParamsRequest) VerboseEqual(that interface{}) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
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 ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) Equal ¶
func (this *QueryParamsResponse) Equal(that interface{}) bool
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) VerboseEqual ¶
func (this *QueryParamsResponse) VerboseEqual(that interface{}) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
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 ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) ConvertCoinToERC20 ¶
func (*UnimplementedMsgServer) ConvertCoinToERC20(ctx context.Context, req *MsgConvertCoinToERC20) (*MsgConvertCoinToERC20Response, error)
func (*UnimplementedMsgServer) ConvertCosmosCoinToERC20 ¶
func (*UnimplementedMsgServer) ConvertCosmosCoinToERC20(ctx context.Context, req *MsgConvertCosmosCoinToERC20) (*MsgConvertCosmosCoinToERC20Response, error)
func (*UnimplementedMsgServer) ConvertERC20ToCoin ¶
func (*UnimplementedMsgServer) ConvertERC20ToCoin(ctx context.Context, req *MsgConvertERC20ToCoin) (*MsgConvertERC20ToCoinResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)