2022-08-23 17:04:40 +00:00
|
|
|
syntax = "proto3";
|
2024-04-24 06:42:02 +00:00
|
|
|
package zgc.evmutil.v1beta1;
|
2022-08-23 17:04:40 +00:00
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
|
2024-04-24 06:42:02 +00:00
|
|
|
option go_package = "github.com/0glabs/0g-chain/x/evmutil/types";
|
2022-11-22 23:22:07 +00:00
|
|
|
option (gogoproto.equal_all) = true;
|
2022-08-23 17:04:40 +00:00
|
|
|
option (gogoproto.verbose_equal_all) = true;
|
|
|
|
|
2024-04-24 06:42:02 +00:00
|
|
|
// ConversionPair defines a 0g-chain ERC20 address and corresponding denom that is
|
2022-08-23 17:04:40 +00:00
|
|
|
// allowed to be converted between ERC20 and sdk.Coin
|
|
|
|
message ConversionPair {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
2024-04-24 06:42:02 +00:00
|
|
|
// ERC20 address of the token on the 0g-chain EVM
|
|
|
|
bytes zgchain_erc20_address = 1 [
|
|
|
|
(gogoproto.customname) = "ZgchainERC20Address",
|
2022-11-22 23:22:07 +00:00
|
|
|
(gogoproto.casttype) = "HexBytes"
|
|
|
|
];
|
2022-08-23 17:04:40 +00:00
|
|
|
|
|
|
|
// Denom of the corresponding sdk.Coin
|
|
|
|
string denom = 2;
|
|
|
|
}
|
2023-05-19 23:01:46 +00:00
|
|
|
|
2023-05-23 19:32:27 +00:00
|
|
|
// AllowedCosmosCoinERC20Token defines allowed cosmos-sdk denom & metadata
|
2023-05-19 23:01:46 +00:00
|
|
|
// for evm token representations of sdk assets.
|
|
|
|
// NOTE: once evm token contracts are deployed, changes to metadata for a given
|
2023-05-23 19:32:27 +00:00
|
|
|
// cosmos_denom will not change metadata of deployed contract.
|
|
|
|
message AllowedCosmosCoinERC20Token {
|
2023-05-19 23:01:46 +00:00
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// Denom of the sdk.Coin
|
2023-05-23 19:32:27 +00:00
|
|
|
string cosmos_denom = 1;
|
2023-05-19 23:01:46 +00:00
|
|
|
// 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;
|
|
|
|
}
|