evmos/erc20

Table of Contents

evmos/erc20/v1/query.proto

Top

QueryParamsRequest

QueryParamsRequest is the request type for the Query/Params RPC method.

QueryParamsResponse

QueryParamsResponse is the response type for the Query/Params RPC

method.

FieldTypeLabelDescription
params Params

QueryTokenPairRequest

QueryTokenPairRequest is the request type for the Query/TokenPair RPC method.

FieldTypeLabelDescription
token string

token identifier can be either the hex contract address of the ERC20 or the Cosmos base denomination

QueryTokenPairResponse

QueryTokenPairResponse is the response type for the Query/TokenPair RPC

method.

FieldTypeLabelDescription
token_pair TokenPair

QueryTokenPairsRequest

QueryTokenPairsRequest is the request type for the Query/TokenPairs RPC

method.

FieldTypeLabelDescription
pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryTokenPairsResponse

QueryTokenPairsResponse is the response type for the Query/TokenPairs RPC

method.

FieldTypeLabelDescription
token_pairs TokenPair repeated

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

Query

Query defines the gRPC querier service.

Method NameRequest TypeResponse TypeDescription
TokenPairs QueryTokenPairsRequest QueryTokenPairsResponse

TokenPairs retrieves registered token pairs

TokenPair QueryTokenPairRequest QueryTokenPairResponse

TokenPair retrieves a registered token pair

Params QueryParamsRequest QueryParamsResponse

Params retrieves the erc20 module params

Methods with HTTP bindings

Method Name Method Pattern Body
TokenPairs GET /evmos/erc20/v1/token_pairs
TokenPair GET /evmos/erc20/v1/token_pairs/{token}
Params GET /evmos/erc20/v1/params

evmos/erc20/v1/genesis.proto

Top

GenesisState

GenesisState defines the module's genesis state.

FieldTypeLabelDescription
params Params

module parameters

token_pairs TokenPair repeated

registered token pairs

Params

Params defines the erc20 module params

FieldTypeLabelDescription
enable_erc20 bool

parameter to enable the conversion of Cosmos coins <--> ERC20 tokens.

enable_evm_hook bool

parameter to enable the EVM hook that converts an ERC20 token to a Cosmos Coin by transferring the Tokens through a MsgEthereumTx to the ModuleAddress Ethereum address.

evmos/erc20/v1/tx.proto

Top

MsgConvertCoin

MsgConvertCoin defines a Msg to convert a native Cosmos coin to a ERC20 token

FieldTypeLabelDescription
coin cosmos.base.v1beta1.Coin

Cosmos coin which denomination is registered in a token pair. The coin amount defines the amount of coins to convert.

receiver string

recipient hex address to receive ERC20 token

sender string

cosmos bech32 address from the owner of the given Cosmos coins

MsgConvertCoinResponse

MsgConvertCoinResponse returns no fields

MsgConvertERC20

MsgConvertERC20 defines a Msg to convert a ERC20 token to a native Cosmos

coin.

FieldTypeLabelDescription
contract_address string

ERC20 token contract address registered in a token pair

amount string

amount of ERC20 tokens to convert

receiver string

bech32 address to receive native Cosmos coins

sender string

sender hex address from the owner of the given ERC20 tokens

MsgConvertERC20Response

MsgConvertERC20Response returns no fields

Msg

Msg defines the erc20 Msg service.

Method NameRequest TypeResponse TypeDescription
ConvertCoin MsgConvertCoin MsgConvertCoinResponse

ConvertCoin mints a ERC20 representation of the native Cosmos coin denom that is registered on the token mapping.

ConvertERC20 MsgConvertERC20 MsgConvertERC20Response

ConvertERC20 mints a native Cosmos coin representation of the ERC20 token contract that is registered on the token mapping.

Methods with HTTP bindings

Method Name Method Pattern Body
ConvertCoin GET /evmos/erc20/v1/tx/convert_coin
ConvertERC20 GET /evmos/erc20/v1/tx/convert_erc20

evmos/erc20/v1/erc20.proto

Top

RegisterCoinProposal

RegisterCoinProposal is a gov Content type to register a token pair for a

native Cosmos coin.

FieldTypeLabelDescription
title string

title of the proposal

description string

proposal description

metadata cosmos.bank.v1beta1.Metadata

metadata of the native Cosmos coin

RegisterERC20Proposal

RegisterERC20Proposal is a gov Content type to register a token pair for an

ERC20 token

FieldTypeLabelDescription
title string

title of the proposal

description string

proposal description

erc20address string

contract address of ERC20 token

ToggleTokenConversionProposal

ToggleTokenConversionProposal is a gov Content type to toggle the conversion

of a token pair.

FieldTypeLabelDescription
title string

title of the proposal

description string

proposal description

token string

token identifier can be either the hex contract address of the ERC20 or the Cosmos base denomination

TokenPair

TokenPair defines an instance that records a pairing consisting of a native

Cosmos Coin and an ERC20 token address.

FieldTypeLabelDescription
erc20_address string

address of ERC20 contract token

denom string

cosmos base denomination to be mapped to

enabled bool

shows token mapping enable status

contract_owner Owner

ERC20 owner address ENUM (0 invalid, 1 ModuleAccount, 2 external address)

Owner

Owner enumerates the ownership of a ERC20 contract.

NameNumberDescription
OWNER_UNSPECIFIED 0

OWNER_UNSPECIFIED defines an invalid/undefined owner.

OWNER_MODULE 1

OWNER_MODULE erc20 is owned by the erc20 module account.

OWNER_EXTERNAL 2

EXTERNAL erc20 is owned by an external account.

Scalar Value Types

.proto Type Notes Python Type
double float
float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int/long
uint32 Uses variable-length encoding. int/long
uint64 Uses variable-length encoding. int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. int/long
sfixed32 Always four bytes. int
sfixed64 Always eight bytes. int/long
bool boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. str/unicode
bytes May contain any arbitrary sequence of bytes. str