0g-chain/proto/kava/evmutil/v1beta1/genesis.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

55 lines
1.8 KiB
Protocol Buffer

syntax = "proto3";
package kava.evmutil.v1beta1;
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "kava/evmutil/v1beta1/conversion_pair.proto";
option go_package = "github.com/kava-labs/kava/x/evmutil/types";
option (gogoproto.equal_all) = true;
option (gogoproto.verbose_equal_all) = true;
// GenesisState defines the evmutil module's genesis state.
message GenesisState {
option (gogoproto.goproto_getters) = false;
repeated Account accounts = 1 [(gogoproto.nullable) = false];
// params defines all the parameters of the module.
Params params = 2 [(gogoproto.nullable) = false];
}
// BalanceAccount defines an account in the evmutil module.
message Account {
option (gogoproto.goproto_getters) = false;
bytes address = 1 [
(cosmos_proto.scalar) = "cosmos.AddressBytes",
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
];
// balance indicates the amount of akava owned by the address.
string balance = 2 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
}
// Params defines the evmutil module params
message Params {
// enabled_conversion_pairs defines the list of conversion pairs allowed to be
// converted between Kava ERC20 and sdk.Coin
repeated ConversionPair enabled_conversion_pairs = 4 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "ConversionPairs"
];
// allowed_native_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.
repeated AllowedNativeCoinERC20Token allowed_native_denoms = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "AllowedNativeCoinERC20Tokens"
];
}