2021-01-07 21:45:32 +00:00
|
|
|
syntax = "proto3";
|
2021-08-17 15:30:35 +00:00
|
|
|
package ethermint.evm.v1;
|
2021-01-07 21:45:32 +00:00
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
|
2022-06-19 09:43:41 +00:00
|
|
|
option go_package = "github.com/evmos/ethermint/x/evm/types";
|
2021-01-07 21:45:32 +00:00
|
|
|
|
|
|
|
// Params defines the EVM module parameters
|
|
|
|
message Params {
|
2022-11-30 17:00:19 +00:00
|
|
|
// evm_denom represents the token denomination used to run the EVM state
|
2021-01-07 21:45:32 +00:00
|
|
|
// transitions.
|
2022-10-20 20:43:19 +00:00
|
|
|
string evm_denom = 1 [(gogoproto.moretags) = "yaml:\"evm_denom\""];
|
2022-11-30 17:00:19 +00:00
|
|
|
// enable_create toggles state transitions that use the vm.Create function
|
2022-10-20 20:43:19 +00:00
|
|
|
bool enable_create = 2 [(gogoproto.moretags) = "yaml:\"enable_create\""];
|
2022-11-30 17:00:19 +00:00
|
|
|
// enable_call toggles state transitions that use the vm.Call function
|
2022-10-20 20:43:19 +00:00
|
|
|
bool enable_call = 3 [(gogoproto.moretags) = "yaml:\"enable_call\""];
|
2022-11-30 17:00:19 +00:00
|
|
|
// extra_eips defines the additional EIPs for the vm.Config
|
2022-10-20 20:43:19 +00:00
|
|
|
repeated int64 extra_eips = 4 [(gogoproto.customname) = "ExtraEIPs", (gogoproto.moretags) = "yaml:\"extra_eips\""];
|
2022-11-30 17:00:19 +00:00
|
|
|
// chain_config defines the EVM chain configuration parameters
|
2022-10-20 20:43:19 +00:00
|
|
|
ChainConfig chain_config = 5 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false];
|
2022-11-30 17:00:19 +00:00
|
|
|
// allow_unprotected_txs defines if replay-protected (i.e non EIP155
|
2022-06-22 10:51:14 +00:00
|
|
|
// signed) transactions can be executed on the state machine.
|
|
|
|
bool allow_unprotected_txs = 6;
|
2021-01-07 21:45:32 +00:00
|
|
|
}
|
|
|
|
|
2021-07-14 09:13:55 +00:00
|
|
|
// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values
|
|
|
|
// instead of *big.Int.
|
2021-01-07 21:45:32 +00:00
|
|
|
message ChainConfig {
|
2022-11-30 17:00:19 +00:00
|
|
|
// homestead_block switch (nil no fork, 0 = already homestead)
|
2021-01-07 21:45:32 +00:00
|
|
|
string homestead_block = 1 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"homestead_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork)
|
2021-01-07 21:45:32 +00:00
|
|
|
string dao_fork_block = 2 [
|
|
|
|
(gogoproto.customname) = "DAOForkBlock",
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"dao_fork_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork
|
2022-10-20 20:43:19 +00:00
|
|
|
bool dao_fork_support = 3
|
2022-11-30 17:00:19 +00:00
|
|
|
[(gogoproto.customname) = "DAOForkSupport", (gogoproto.moretags) = "yaml:\"dao_fork_support\""];
|
|
|
|
// eip150_block: EIP150 implements the Gas price changes
|
2021-07-14 09:13:55 +00:00
|
|
|
// (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork)
|
2021-01-07 21:45:32 +00:00
|
|
|
string eip150_block = 4 [
|
|
|
|
(gogoproto.customname) = "EIP150Block",
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"eip150_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed)
|
2022-10-20 20:43:19 +00:00
|
|
|
string eip150_hash = 5 [(gogoproto.customname) = "EIP150Hash", (gogoproto.moretags) = "yaml:\"byzantium_block\""];
|
2022-11-30 17:00:19 +00:00
|
|
|
// eip155_block: EIP155Block HF block
|
2021-01-07 21:45:32 +00:00
|
|
|
string eip155_block = 6 [
|
|
|
|
(gogoproto.customname) = "EIP155Block",
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"eip155_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// eip158_block: EIP158 HF block
|
2021-01-07 21:45:32 +00:00
|
|
|
string eip158_block = 7 [
|
|
|
|
(gogoproto.customname) = "EIP158Block",
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"eip158_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium)
|
2021-01-07 21:45:32 +00:00
|
|
|
string byzantium_block = 8 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"byzantium_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// constantinople_block: Constantinople switch block (nil no fork, 0 = already activated)
|
2021-01-07 21:45:32 +00:00
|
|
|
string constantinople_block = 9 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"constantinople_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// petersburg_block: Petersburg switch block (nil same as Constantinople)
|
2021-01-07 21:45:32 +00:00
|
|
|
string petersburg_block = 10 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"petersburg_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul)
|
2021-01-07 21:45:32 +00:00
|
|
|
string istanbul_block = 11 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"istanbul_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated)
|
2021-01-07 21:45:32 +00:00
|
|
|
string muir_glacier_block = 12 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"muir_glacier_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin)
|
2021-06-08 11:11:37 +00:00
|
|
|
string berlin_block = 13 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"berlin_block\""
|
2021-01-07 21:45:32 +00:00
|
|
|
];
|
2021-10-25 15:01:04 +00:00
|
|
|
// DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated
|
|
|
|
reserved 14, 15, 16;
|
|
|
|
reserved "yolo_v3_block", "ewasm_block", "catalyst_block";
|
2022-11-30 17:00:19 +00:00
|
|
|
// london_block: London switch block (nil = no fork, 0 = already on london)
|
2021-08-25 14:45:51 +00:00
|
|
|
string london_block = 17 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"london_block\""
|
2021-05-10 16:34:00 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated)
|
2022-02-14 23:08:41 +00:00
|
|
|
string arrow_glacier_block = 18 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"arrow_glacier_block\""
|
2022-02-14 23:08:41 +00:00
|
|
|
];
|
2022-07-08 10:58:04 +00:00
|
|
|
// DEPRECATED: merge fork block was deprecated: https://github.com/ethereum/go-ethereum/pull/24904
|
|
|
|
reserved 19;
|
|
|
|
reserved "merge_fork_block";
|
2022-11-30 17:00:19 +00:00
|
|
|
// gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated)
|
2022-07-08 10:58:04 +00:00
|
|
|
string gray_glacier_block = 20 [
|
2022-02-14 23:08:41 +00:00
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"gray_glacier_block\""
|
2022-02-14 23:08:41 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// merge_netsplit_block: Virtual fork after The Merge to use as a network splitter
|
2022-07-08 10:58:04 +00:00
|
|
|
string merge_netsplit_block = 21 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
2022-11-30 17:00:19 +00:00
|
|
|
(gogoproto.moretags) = "yaml:\"merge_netsplit_block\""
|
2022-07-08 10:58:04 +00:00
|
|
|
];
|
2022-11-30 17:00:19 +00:00
|
|
|
// shanghai_block switch block (nil = no fork, 0 = already on shanghai)
|
|
|
|
string shanghai_block = 22 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
|
|
|
(gogoproto.moretags) = "yaml:\"shanghai_block\""
|
|
|
|
];
|
|
|
|
// cancun_block switch block (nil = no fork, 0 = already on cancun)
|
|
|
|
string cancun_block = 23 [
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
|
|
|
(gogoproto.moretags) = "yaml:\"cancun_block\""
|
|
|
|
];
|
|
|
|
|
2021-01-07 21:45:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// State represents a single Storage key value pair item.
|
|
|
|
message State {
|
2022-11-30 17:00:19 +00:00
|
|
|
// key is the stored key
|
|
|
|
string key = 1;
|
|
|
|
// value is the stored value for the given key
|
2021-01-07 21:45:32 +00:00
|
|
|
string value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// TransactionLogs define the logs generated from a transaction execution
|
|
|
|
// with a given hash. It it used for import/export data as transactions are not
|
|
|
|
// persisted on blockchain state after an upgrade.
|
|
|
|
message TransactionLogs {
|
2022-11-30 17:00:19 +00:00
|
|
|
// hash of the transaction
|
|
|
|
string hash = 1;
|
|
|
|
// logs is an array of Logs for the given transaction hash
|
2021-01-07 21:45:32 +00:00
|
|
|
repeated Log logs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Log represents an protobuf compatible Ethereum Log that defines a contract
|
|
|
|
// log event. These events are generated by the LOG opcode and stored/indexed by
|
|
|
|
// the node.
|
2022-11-30 17:00:19 +00:00
|
|
|
//
|
|
|
|
// NOTE: address, topics and data are consensus fields. The rest of the fields
|
|
|
|
// are derived, i.e. filled in by the nodes, but not secured by consensus.
|
2021-01-07 21:45:32 +00:00
|
|
|
message Log {
|
|
|
|
// address of the contract that generated the event
|
|
|
|
string address = 1;
|
2022-11-30 17:00:19 +00:00
|
|
|
// topics is a list of topics provided by the contract.
|
2021-01-07 21:45:32 +00:00
|
|
|
repeated string topics = 2;
|
2022-11-30 17:00:19 +00:00
|
|
|
// data which is supplied by the contract, usually ABI-encoded
|
2021-01-07 21:45:32 +00:00
|
|
|
bytes data = 3;
|
|
|
|
|
2022-11-30 17:00:19 +00:00
|
|
|
// block_number of the block in which the transaction was included
|
2022-10-20 20:43:19 +00:00
|
|
|
uint64 block_number = 4 [(gogoproto.jsontag) = "blockNumber"];
|
2022-11-30 17:00:19 +00:00
|
|
|
// tx_hash is the transaction hash
|
2022-10-20 20:43:19 +00:00
|
|
|
string tx_hash = 5 [(gogoproto.jsontag) = "transactionHash"];
|
2022-11-30 17:00:19 +00:00
|
|
|
// tx_index of the transaction in the block
|
2022-10-20 20:43:19 +00:00
|
|
|
uint64 tx_index = 6 [(gogoproto.jsontag) = "transactionIndex"];
|
2022-11-30 17:00:19 +00:00
|
|
|
// block_hash of the block in which the transaction was included
|
2022-10-20 20:43:19 +00:00
|
|
|
string block_hash = 7 [(gogoproto.jsontag) = "blockHash"];
|
2021-01-07 21:45:32 +00:00
|
|
|
// index of the log in the block
|
2022-10-20 20:43:19 +00:00
|
|
|
uint64 index = 8 [(gogoproto.jsontag) = "logIndex"];
|
2021-01-07 21:45:32 +00:00
|
|
|
|
2022-11-30 17:00:19 +00:00
|
|
|
// removed is true if this log was reverted due to a chain
|
2021-01-07 21:45:32 +00:00
|
|
|
// reorganisation. You must pay attention to this field if you receive logs
|
|
|
|
// through a filter query.
|
|
|
|
bool removed = 9;
|
|
|
|
}
|
2021-04-18 15:54:18 +00:00
|
|
|
|
|
|
|
// TxResult stores results of Tx execution.
|
|
|
|
message TxResult {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// contract_address contains the ethereum address of the created contract (if
|
|
|
|
// any). If the state transition is an evm.Call, the contract address will be
|
|
|
|
// empty.
|
2022-10-20 20:43:19 +00:00
|
|
|
string contract_address = 1 [(gogoproto.moretags) = "yaml:\"contract_address\""];
|
2021-04-18 15:54:18 +00:00
|
|
|
// bloom represents the bloom filter bytes
|
|
|
|
bytes bloom = 2;
|
|
|
|
// tx_logs contains the transaction hash and the proto-compatible ethereum
|
|
|
|
// logs.
|
2022-10-20 20:43:19 +00:00
|
|
|
TransactionLogs tx_logs = 3 [(gogoproto.moretags) = "yaml:\"tx_logs\"", (gogoproto.nullable) = false];
|
2021-04-18 15:54:18 +00:00
|
|
|
// ret defines the bytes from the execution.
|
|
|
|
bytes ret = 4;
|
|
|
|
// reverted flag is set to true when the call has been reverted
|
|
|
|
bool reverted = 5;
|
|
|
|
// gas_used notes the amount of gas consumed while execution
|
|
|
|
uint64 gas_used = 6;
|
|
|
|
}
|
|
|
|
|
2021-05-10 16:34:00 +00:00
|
|
|
// AccessTuple is the element type of an access list.
|
|
|
|
message AccessTuple {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
2022-11-30 17:00:19 +00:00
|
|
|
// address is a hex formatted ethereum address
|
2021-06-08 11:11:37 +00:00
|
|
|
string address = 1;
|
2022-11-30 17:00:19 +00:00
|
|
|
// storage_keys are hex formatted hashes of the storage keys
|
2022-10-20 20:43:19 +00:00
|
|
|
repeated string storage_keys = 2 [(gogoproto.jsontag) = "storageKeys"];
|
2021-09-04 20:33:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// TraceConfig holds extra parameters to trace functions.
|
|
|
|
message TraceConfig {
|
2021-10-07 11:02:31 +00:00
|
|
|
// DEPRECATED: DisableMemory and DisableReturnData have been renamed to
|
|
|
|
// Enable*.
|
2021-10-05 15:38:20 +00:00
|
|
|
reserved 4, 7;
|
|
|
|
reserved "disable_memory", "disable_return_data";
|
|
|
|
|
2022-11-30 17:00:19 +00:00
|
|
|
// tracer is a custom javascript tracer
|
2021-09-04 20:33:06 +00:00
|
|
|
string tracer = 1;
|
2022-11-30 17:00:19 +00:00
|
|
|
// timeout overrides the default timeout of 5 seconds for JavaScript-based tracing
|
2021-10-07 11:02:31 +00:00
|
|
|
// calls
|
2021-09-04 20:33:06 +00:00
|
|
|
string timeout = 2;
|
2022-11-30 17:00:19 +00:00
|
|
|
// reexec defines the number of blocks the tracer is willing to go back
|
2021-10-07 11:02:31 +00:00
|
|
|
uint64 reexec = 3;
|
2022-11-30 17:00:19 +00:00
|
|
|
// disable_stack switches stack capture
|
2022-10-20 20:43:19 +00:00
|
|
|
bool disable_stack = 5 [(gogoproto.jsontag) = "disableStack"];
|
2022-11-30 17:00:19 +00:00
|
|
|
// disable_storage switches storage capture
|
2022-10-20 20:43:19 +00:00
|
|
|
bool disable_storage = 6 [(gogoproto.jsontag) = "disableStorage"];
|
2022-11-30 17:00:19 +00:00
|
|
|
// debug can be used to print output during capture end
|
2021-09-15 13:50:52 +00:00
|
|
|
bool debug = 8;
|
2022-11-30 17:00:19 +00:00
|
|
|
// limit defines the maximum length of output, but zero means unlimited
|
2021-09-15 13:50:52 +00:00
|
|
|
int32 limit = 9;
|
2022-11-30 17:00:19 +00:00
|
|
|
// overrides can be used to execute a trace using future fork rules
|
2021-09-15 13:50:52 +00:00
|
|
|
ChainConfig overrides = 10;
|
2022-11-30 17:00:19 +00:00
|
|
|
// enable_memory switches memory capture
|
2022-10-20 20:43:19 +00:00
|
|
|
bool enable_memory = 11 [(gogoproto.jsontag) = "enableMemory"];
|
2022-11-30 17:00:19 +00:00
|
|
|
// enable_return_data switches the capture of return data
|
2022-10-20 20:43:19 +00:00
|
|
|
bool enable_return_data = 12 [(gogoproto.jsontag) = "enableReturnData"];
|
2022-11-30 17:00:19 +00:00
|
|
|
// tracer_json_config configures the tracer using a JSON string
|
|
|
|
string tracer_json_config = 13 [(gogoproto.jsontag) = "tracerConfig"];
|
2021-10-05 15:38:20 +00:00
|
|
|
}
|