types

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0 Imports: 45 Imported by: 0

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_evm_erc20_to_coin"
	EventTypeConvertCoinToERC20 = "convert_evm_erc20_from_coin"

	EventTypeConvertCosmosCoinToERC20   = "convert_cosmos_coin_to_erc20"
	EventTypeConvertCosmosCoinFromERC20 = "convert_cosmos_coin_from_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"

	TypeMsgConvertCosmosCoinToERC20   = "evmutil_convert_cosmos_coin_to_erc20"
	TypeMsgConvertCosmosCoinFromERC20 = "evmutil_convert_cosmos_coin_from_erc20"
)

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

	//go:embed ethermint_json/ERC20FuryWrappedCosmosCoin.json
	ERC20FuryWrappedCosmosCoinJSON []byte

	// ERC20FuryWrappedCosmosCoinContract is the compiled erc20 contract
	ERC20FuryWrappedCosmosCoinContract evmtypes.CompiledContract
)
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                 = errorsmod.Register(ModuleName, 2, "contract ABI pack failed")
	ErrEVMCall                 = errorsmod.Register(ModuleName, 3, "EVM call unexpected error")
	ErrEVMConversionNotEnabled = 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

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 (
	// AccountStoreKeyPrefix is the prefix for keys that store accounts
	AccountStoreKeyPrefix = []byte{0x00}
	// DeployedCosmosCoinContractKeyPrefix is the key for storing deployed FuryWrappedCosmosCoinERC20s contract addresses
	DeployedCosmosCoinContractKeyPrefix = []byte{0x01}
)

KVStore keys

View Source
var (
	KeyEnabledConversionPairs  = []byte("EnabledConversionPairs")
	DefaultConversionPairs     = ConversionPairs{}
	KeyAllowedCosmosDenoms     = []byte("AllowedCosmosDenoms")
	DefaultAllowedCosmosDenoms = AllowedCosmosCoinERC20Tokens{}
)

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 (
	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 DenomFromDeployedCosmosCoinContractKey

func DenomFromDeployedCosmosCoinContractKey(key []byte) string

DenomFromDeployedCosmosCoinContractKey is the inverse of DeployedCosmosCoinContractKey

func DeployedCosmosCoinContractKey

func DeployedCosmosCoinContractKey(cosmosDenom string) []byte

DeployedCosmosCoinContractKey gives the store key that holds the address of the deployed ERC20 that wraps the given cosmosDenom sdk.Coin

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable for evmutil module.

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 RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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) Descriptor() ([]byte, []int)

func (*Account) Equal

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

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 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 Fury EVM
	FuryERC20Address 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 Fury 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 Fury ERC20 address.

func (*ConversionPair) Marshal

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

func (*ConversionPair) MarshalTo

func (m *ConversionPair) MarshalTo(dAtA []byte) (int, 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 DeployedCosmosCoinContract

type DeployedCosmosCoinContract struct {
	CosmosDenom string              `protobuf:"bytes,1,opt,name=cosmos_denom,json=cosmosDenom,proto3" json:"cosmos_denom,omitempty"`
	Address     *InternalEVMAddress `protobuf:"bytes,2,opt,name=address,proto3,customtype=InternalEVMAddress" json:"address,omitempty"`
}

DeployedCosmosCoinContract defines a deployed token contract to the evm representing a native cosmos-sdk coin

func NewDeployedCosmosCoinContract

func NewDeployedCosmosCoinContract(denom string, address InternalEVMAddress) DeployedCosmosCoinContract

NewDeployedCosmosCoinContract returns a new DeployedCosmosCoinContract

func (*DeployedCosmosCoinContract) Descriptor

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

func (*DeployedCosmosCoinContract) GetCosmosDenom

func (m *DeployedCosmosCoinContract) GetCosmosDenom() string

func (*DeployedCosmosCoinContract) Marshal

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

func (*DeployedCosmosCoinContract) MarshalTo

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

func (*DeployedCosmosCoinContract) MarshalToSizedBuffer

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

func (*DeployedCosmosCoinContract) ProtoMessage

func (*DeployedCosmosCoinContract) ProtoMessage()

func (*DeployedCosmosCoinContract) Reset

func (m *DeployedCosmosCoinContract) Reset()

func (*DeployedCosmosCoinContract) Size

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

func (*DeployedCosmosCoinContract) String

func (m *DeployedCosmosCoinContract) String() string

func (*DeployedCosmosCoinContract) Unmarshal

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

func (*DeployedCosmosCoinContract) XXX_DiscardUnknown

func (m *DeployedCosmosCoinContract) XXX_DiscardUnknown()

func (*DeployedCosmosCoinContract) XXX_Marshal

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

func (*DeployedCosmosCoinContract) XXX_Merge

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

func (*DeployedCosmosCoinContract) XXX_Size

func (m *DeployedCosmosCoinContract) XXX_Size() int

func (*DeployedCosmosCoinContract) XXX_Unmarshal

func (m *DeployedCosmosCoinContract) XXX_Unmarshal(b []byte) 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) 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

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

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

MarshalJSON marshals HexBytes into a 0x json string

func (HexBytes) String

func (b HexBytes) String() string

String implements Stringer and returns the 0x representation

func (*HexBytes) UnmarshalJSON

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

UnmarshalJSON unmarshals a 0x json string into bytes

type InternalEVMAddress

type InternalEVMAddress struct {
	common.Address
}

InternalEVMAddress is a type alias of common.Address to represent an address on the Fury 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) Equal

func (addr InternalEVMAddress) Equal(other InternalEVMAddress) bool

Equal checks if two InternalEVMAddress instances are equal.

func (InternalEVMAddress) IsNil

func (a InternalEVMAddress) IsNil() bool

IsNil returns true when the address is the 0 address

func (InternalEVMAddress) MarshalJSON

func (addr InternalEVMAddress) MarshalJSON() ([]byte, error)

MarshalJSON allows PrintProto to handle InternalEVMAddress

func (InternalEVMAddress) MarshalTo

func (addr InternalEVMAddress) MarshalTo(data []byte) (int, error)

MarshalTo implements the protobuf Marshaler interface.

func (InternalEVMAddress) Size

func (a InternalEVMAddress) Size() int

Size implements protobuf Unmarshaler interface.

func (*InternalEVMAddress) Unmarshal

func (addr *InternalEVMAddress) Unmarshal(data []byte) error

Unmarshal implements the protobuf Unmarshaler interface.

type MsgClient

type MsgClient interface {
	// ConvertCoinToERC20 defines a method for converting sdk.Coin to Fury ERC20.
	ConvertCoinToERC20(ctx context.Context, in *MsgConvertCoinToERC20, opts ...grpc.CallOption) (*MsgConvertCoinToERC20Response, error)
	// ConvertERC20ToCoin defines a method for converting Fury 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)
	// ConvertCosmosCoinFromERC20 defines a method for converting a cosmos sdk.Coin to an ERC20.
	ConvertCosmosCoinFromERC20(ctx context.Context, in *MsgConvertCosmosCoinFromERC20, opts ...grpc.CallOption) (*MsgConvertCosmosCoinFromERC20Response, 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 {
	// Fury 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 Fury 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 Fury ERC20 for EVM-native assets.

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 (*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 MsgConvertCosmosCoinFromERC20

type MsgConvertCosmosCoinFromERC20 struct {
	// EVM hex address initiating the conversion.
	Initiator string `protobuf:"bytes,1,opt,name=initiator,proto3" json:"initiator,omitempty"`
	// Fury bech32 address that will receive the cosmos coins.
	Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// Amount is the amount to convert, expressed as a Cosmos coin.
	Amount *types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
}

MsgConvertCosmosCoinFromERC20 defines a conversion from ERC20 to cosmos coins for cosmos-native assets.

func NewMsgConvertCosmosCoinFromERC20

func NewMsgConvertCosmosCoinFromERC20(
	initiator string,
	receiver string,
	amount sdk.Coin,
) MsgConvertCosmosCoinFromERC20

NewMsgConvertCosmosCoinToERC20 returns a new MsgConvertCosmosCoinToERC20

func (*MsgConvertCosmosCoinFromERC20) Descriptor

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

func (*MsgConvertCosmosCoinFromERC20) Equal

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

func (*MsgConvertCosmosCoinFromERC20) GetAmount

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

func (*MsgConvertCosmosCoinFromERC20) GetInitiator

func (m *MsgConvertCosmosCoinFromERC20) GetInitiator() string

func (*MsgConvertCosmosCoinFromERC20) GetReceiver

func (m *MsgConvertCosmosCoinFromERC20) GetReceiver() string

func (MsgConvertCosmosCoinFromERC20) GetSignBytes

func (msg MsgConvertCosmosCoinFromERC20) GetSignBytes() []byte

GetSignBytes implements legacytx.LegacyMsg

func (MsgConvertCosmosCoinFromERC20) GetSigners

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

GetSigners implements types.Msg

func (*MsgConvertCosmosCoinFromERC20) Marshal

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

func (*MsgConvertCosmosCoinFromERC20) MarshalTo

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

func (*MsgConvertCosmosCoinFromERC20) MarshalToSizedBuffer

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

func (*MsgConvertCosmosCoinFromERC20) ProtoMessage

func (*MsgConvertCosmosCoinFromERC20) ProtoMessage()

func (*MsgConvertCosmosCoinFromERC20) Reset

func (m *MsgConvertCosmosCoinFromERC20) Reset()

func (MsgConvertCosmosCoinFromERC20) Route

Route implements legacytx.LegacyMsg

func (*MsgConvertCosmosCoinFromERC20) Size

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

func (*MsgConvertCosmosCoinFromERC20) String

func (MsgConvertCosmosCoinFromERC20) Type

Type implements legacytx.LegacyMsg

func (*MsgConvertCosmosCoinFromERC20) Unmarshal

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

func (MsgConvertCosmosCoinFromERC20) ValidateBasic

func (msg MsgConvertCosmosCoinFromERC20) ValidateBasic() error

ValidateBasic implements types.Msg

func (*MsgConvertCosmosCoinFromERC20) VerboseEqual

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

func (*MsgConvertCosmosCoinFromERC20) XXX_DiscardUnknown

func (m *MsgConvertCosmosCoinFromERC20) XXX_DiscardUnknown()

func (*MsgConvertCosmosCoinFromERC20) XXX_Marshal

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

func (*MsgConvertCosmosCoinFromERC20) XXX_Merge

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

func (*MsgConvertCosmosCoinFromERC20) XXX_Size

func (m *MsgConvertCosmosCoinFromERC20) XXX_Size() int

func (*MsgConvertCosmosCoinFromERC20) XXX_Unmarshal

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

type MsgConvertCosmosCoinFromERC20Response

type MsgConvertCosmosCoinFromERC20Response struct {
}

MsgConvertCosmosCoinFromERC20Response defines the response value from Msg/MsgConvertCosmosCoinFromERC20.

func (*MsgConvertCosmosCoinFromERC20Response) Descriptor

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

func (*MsgConvertCosmosCoinFromERC20Response) Equal

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

func (*MsgConvertCosmosCoinFromERC20Response) Marshal

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

func (*MsgConvertCosmosCoinFromERC20Response) MarshalTo

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

func (*MsgConvertCosmosCoinFromERC20Response) MarshalToSizedBuffer

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

func (*MsgConvertCosmosCoinFromERC20Response) ProtoMessage

func (*MsgConvertCosmosCoinFromERC20Response) ProtoMessage()

func (*MsgConvertCosmosCoinFromERC20Response) Reset

func (*MsgConvertCosmosCoinFromERC20Response) Size

func (*MsgConvertCosmosCoinFromERC20Response) String

func (*MsgConvertCosmosCoinFromERC20Response) Unmarshal

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

func (*MsgConvertCosmosCoinFromERC20Response) VerboseEqual

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

func (*MsgConvertCosmosCoinFromERC20Response) XXX_DiscardUnknown

func (m *MsgConvertCosmosCoinFromERC20Response) XXX_DiscardUnknown()

func (*MsgConvertCosmosCoinFromERC20Response) XXX_Marshal

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

func (*MsgConvertCosmosCoinFromERC20Response) XXX_Merge

func (*MsgConvertCosmosCoinFromERC20Response) XXX_Size

func (*MsgConvertCosmosCoinFromERC20Response) XXX_Unmarshal

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

type MsgConvertCosmosCoinToERC20

type MsgConvertCosmosCoinToERC20 struct {
	// Fury 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"`
}

MsgConvertCosmosCoinToERC20 defines a conversion from cosmos sdk.Coin to ERC20 for cosmos-native assets.

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

Route implements legacytx.LegacyMsg

func (*MsgConvertCosmosCoinToERC20) Size

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

func (*MsgConvertCosmosCoinToERC20) String

func (m *MsgConvertCosmosCoinToERC20) String() string

func (MsgConvertCosmosCoinToERC20) Type

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 (*MsgConvertCosmosCoinToERC20Response) Size

func (*MsgConvertCosmosCoinToERC20Response) 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 (*MsgConvertCosmosCoinToERC20Response) XXX_Size

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"`
	// Fury 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.
	FuryERC20Address string `protobuf:"bytes,3,opt,name=fury_erc20_address,json=furyErc20Address,proto3" json:"fury_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 Fury ERC20 to sdk.Coin for EVM-native assets.

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) GetFuryERC20Address

func (m *MsgConvertERC20ToCoin) GetFuryERC20Address() 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 (*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 Fury ERC20.
	ConvertCoinToERC20(context.Context, *MsgConvertCoinToERC20) (*MsgConvertCoinToERC20Response, error)
	// ConvertERC20ToCoin defines a method for converting Fury 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)
	// ConvertCosmosCoinFromERC20 defines a method for converting a cosmos sdk.Coin to an ERC20.
	ConvertCosmosCoinFromERC20(context.Context, *MsgConvertCosmosCoinFromERC20) (*MsgConvertCosmosCoinFromERC20Response, 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 Fury 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) Descriptor() ([]byte, []int)

func (*Params) Equal

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

func (*Params) GetAllowedCosmosDenoms

func (m *Params) GetAllowedCosmosDenoms() AllowedCosmosCoinERC20Tokens

func (*Params) GetEnabledConversionPairs

func (m *Params) GetEnabledConversionPairs() ConversionPairs

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

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) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (*Params) Validate

func (p *Params) Validate() error

Validate returns an error if the Params is invalid.

func (*Params) VerboseEqual

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

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Params queries all parameters of the evmutil module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// DeployedCosmosCoinContracts queries a list cosmos coin denom and their deployed erc20 address
	DeployedCosmosCoinContracts(ctx context.Context, in *QueryDeployedCosmosCoinContractsRequest, opts ...grpc.CallOption) (*QueryDeployedCosmosCoinContractsResponse, 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 QueryDeployedCosmosCoinContractsRequest

type QueryDeployedCosmosCoinContractsRequest struct {
	// optional query param to only return specific denoms in the list
	// denoms that do not have deployed contracts will be omitted from the result
	// must request fewer than 100 denoms at a time.
	CosmosDenoms []string `protobuf:"bytes,1,rep,name=cosmos_denoms,json=cosmosDenoms,proto3" json:"cosmos_denoms,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDeployedCosmosCoinContractsRequest defines the request type for Query/DeployedCosmosCoinContracts method.

func (*QueryDeployedCosmosCoinContractsRequest) Descriptor

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

func (*QueryDeployedCosmosCoinContractsRequest) Marshal

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

func (*QueryDeployedCosmosCoinContractsRequest) MarshalTo

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

func (*QueryDeployedCosmosCoinContractsRequest) MarshalToSizedBuffer

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

func (*QueryDeployedCosmosCoinContractsRequest) ProtoMessage

func (*QueryDeployedCosmosCoinContractsRequest) Reset

func (*QueryDeployedCosmosCoinContractsRequest) Size

func (*QueryDeployedCosmosCoinContractsRequest) String

func (*QueryDeployedCosmosCoinContractsRequest) Unmarshal

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

func (*QueryDeployedCosmosCoinContractsRequest) XXX_DiscardUnknown

func (m *QueryDeployedCosmosCoinContractsRequest) XXX_DiscardUnknown()

func (*QueryDeployedCosmosCoinContractsRequest) XXX_Marshal

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

func (*QueryDeployedCosmosCoinContractsRequest) XXX_Merge

func (*QueryDeployedCosmosCoinContractsRequest) XXX_Size

func (*QueryDeployedCosmosCoinContractsRequest) XXX_Unmarshal

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

type QueryDeployedCosmosCoinContractsResponse

type QueryDeployedCosmosCoinContractsResponse struct {
	// deployed_cosmos_coin_contracts is a list of cosmos-sdk coin denom and its deployed contract address
	DeployedCosmosCoinContracts []DeployedCosmosCoinContract `` /* 136-byte string literal not displayed */
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDeployedCosmosCoinContractsResponse defines the response type for the Query/DeployedCosmosCoinContracts method.

func (*QueryDeployedCosmosCoinContractsResponse) Descriptor

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

func (*QueryDeployedCosmosCoinContractsResponse) GetDeployedCosmosCoinContracts

func (m *QueryDeployedCosmosCoinContractsResponse) GetDeployedCosmosCoinContracts() []DeployedCosmosCoinContract

func (*QueryDeployedCosmosCoinContractsResponse) GetPagination

func (*QueryDeployedCosmosCoinContractsResponse) Marshal

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

func (*QueryDeployedCosmosCoinContractsResponse) MarshalTo

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

func (*QueryDeployedCosmosCoinContractsResponse) MarshalToSizedBuffer

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

func (*QueryDeployedCosmosCoinContractsResponse) ProtoMessage

func (*QueryDeployedCosmosCoinContractsResponse) Reset

func (*QueryDeployedCosmosCoinContractsResponse) Size

func (*QueryDeployedCosmosCoinContractsResponse) String

func (*QueryDeployedCosmosCoinContractsResponse) Unmarshal

func (*QueryDeployedCosmosCoinContractsResponse) XXX_DiscardUnknown

func (m *QueryDeployedCosmosCoinContractsResponse) XXX_DiscardUnknown()

func (*QueryDeployedCosmosCoinContractsResponse) XXX_Marshal

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

func (*QueryDeployedCosmosCoinContractsResponse) XXX_Merge

func (*QueryDeployedCosmosCoinContractsResponse) XXX_Size

func (*QueryDeployedCosmosCoinContractsResponse) XXX_Unmarshal

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

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) 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) 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) 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) 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)
	// DeployedCosmosCoinContracts queries a list cosmos coin denom and their deployed erc20 address
	DeployedCosmosCoinContracts(context.Context, *QueryDeployedCosmosCoinContractsRequest) (*QueryDeployedCosmosCoinContractsResponse, 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) ConvertCosmosCoinFromERC20

func (*UnimplementedMsgServer) ConvertCosmosCoinToERC20

func (*UnimplementedMsgServer) ConvertERC20ToCoin

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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