0g-chain/proto/kava/evmutil/v1beta1/conversion_pair.proto
Robert Pirtle ff709d73e1
feat(evmutil): add allow list for evm-convertible sdk denoms (#1590)
* add proto for allowed sdk denoms -> evm conversion

* add validation for AllowedNativeCoinERC20Token

* add validation for AllowedNativeCoinERC20Tokens

* add AllowedNativeDenoms into params & genesis

* add evmutil Params.Validate() test

* fix eip712 ante test

* update changelog

* update internal testnet genesis.json

* update state & param specs

updates to the sections describing functionality will be updated once
that functionality actually exists... :)

* update field decimal -> decimals

field now matches erc20 spec

* add validation decimals will cast to uint8

* add v2 store migration for evmutil

* create & register evmutil migrations

* adds migrator to evmutil's keeper
* sets up Migrate1To2 migration
* registers migration in module
* updates GetParams to properly handle historic block queries

* add unit test for GetParams with historic store
2023-05-19 16:01:46 -07:00

41 lines
1.2 KiB
Protocol Buffer

syntax = "proto3";
package kava.evmutil.v1beta1;
import "gogoproto/gogo.proto";
option go_package = "github.com/kava-labs/kava/x/evmutil/types";
option (gogoproto.equal_all) = true;
option (gogoproto.verbose_equal_all) = true;
// ConversionPair defines a Kava ERC20 address and corresponding denom that is
// allowed to be converted between ERC20 and sdk.Coin
message ConversionPair {
option (gogoproto.goproto_getters) = false;
// ERC20 address of the token on the Kava EVM
bytes kava_erc20_address = 1 [
(gogoproto.customname) = "KavaERC20Address",
(gogoproto.casttype) = "HexBytes"
];
// Denom of the corresponding sdk.Coin
string denom = 2;
}
// AllowedNativeCoinERC20Token defines allowed sdk denom & metadata
// for evm token representations of sdk assets.
// NOTE: once evm token contracts are deployed, changes to metadata for a given
// sdk_denom will not change metadata of deployed contract.
message AllowedNativeCoinERC20Token {
option (gogoproto.goproto_getters) = false;
// Denom of the sdk.Coin
string sdk_denom = 1;
// Name of ERC20 contract
string name = 2;
// Symbol of ERC20 contract
string symbol = 3;
// Number of decimals ERC20 contract is deployed with.
uint32 decimals = 4;
}