0g-chain/third_party/proto/ethermint/evm/v1/evm.proto
Draco Li c511c56560
Add EVM Support (#1215)
* ibc v3 upgrade

* ibc no longer uses confio

* add proofs proto for ibc/v3

* wip add ethermint module

* update cosmos to 0.45.0

* add ethermint proto & bug fixes

* remove todo

* update docs

* fix a number of bugs

* minor comments update

* fix breaking tests

* Wrap bank keeper for EVM to convert decimals (#1154)

* Add bankkeeper wrapper for evm

* Remove agas from init-new-chain.sh, use ukava for evm_denom

* Fix sdk.Coins conversion, require min 1 coin amount

* Remove gas from init script

idk how this happened lol

* Remove debug logging stmt

* Restore original init ukava amounts

* Fix inplace coins conversion

* Use evmtypes.BankKeeper interface insteadof banktypes

* Add TestGetBalance

* Add doc comments, remove temp actualAmt vars

actualAmt vars replaced with inline calls to make it more clear that the
converted value is being used, as opposed to accidentally reusing the
raw EVM amt.

* Add TestSetBalance

* Add TestIdempotentConversion

* Panic if converted coin from EVM is 0

This happens if a value is less than 1ukava

* Deep copy coins instead of in place modification

* Update test coins amount

* Add panic tests for small EVM amounts

* Use evmtypes.BankKeeper as NewEVMBankKeeper param

* Tidy test setup

* ensure sdk config is set when creating new apps

* Respond EVM bank keeper GetBalance with SpendableCoins

Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>

* further speed up docker builds

* feat: restore previous keys add defaults, add eth flag (#1172)

* feat: restore previous keys add defaults, add eth flag

* remove outdated comment

* fix: remove redundant flag default

* evm bank keeper with akava handling

* fix issues

* add remaining tests

* add emv module to app

* add missing imports

* clean up comments

* wip akava keeper

* evm keeper

* fix genesis import

* reduce module permissions

* add bank keeper tests

* cleanup tests

* genesis tests

* change defaults

* add eth faucet key & fix issues

* switch to kava ethermint

* add a lot of tests

* add balances invariant

* add evm tests

* Remove panic if Swagger disabled in config (#1155) (#1183)

Co-authored-by: Derrick Lee <derrick@dlee.dev>

* add invariant to catch any akava balance > 1 ukava

* clarify name of balances invariant

* connect invariants to app

* fix evmbankkeeper akava issues

* add spec for evmutil

* remove zero balance accounts from state

* minor adustments

* update to ethermint 0.10.0

* fix eth ante

* add missing godoc comment

* Update x/evmutil/spec/01_concepts.md

Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>

* Update x/evmutil/spec/01_concepts.md

Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>

* Update ethermint to v0.12 (#1203)

* update to ethermint v0.12.2

* use app.Options for new evm options

* fix missed references to app.Options

* use ethermint branch while waiting on upstream fix

* evm migrations for tesnet alpha 2 (#1206)

* update to ethermint v0.12.2

* use app.Options for new evm options

* fix missed references to app.Options

* use ethermint branch while waiting on upstream fix

* add upgrade handler for evm-alpha testnet 2

* v17 migration setup + evm modules

* refactor migrate states

* x/feemarket migration

* v17 migrations setup + evm modules migration (#1210)

* v17 migration setup + evm modules

* refactor migrate states

* update gen time

* fix: update genesis time in test output

Co-authored-by: karzak <kjydavis3@gmail.com>

* add savings module to app blockers

Co-authored-by: Derrick Lee <derrick@dlee.dev>
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com>
Co-authored-by: karzak <kjydavis3@gmail.com>
2022-04-21 16:16:28 -04:00

223 lines
8.4 KiB
Protocol Buffer

syntax = "proto3";
package ethermint.evm.v1;
import "gogoproto/gogo.proto";
option go_package = "github.com/tharsis/ethermint/x/evm/types";
// Params defines the EVM module parameters
message Params {
// evm denom represents the token denomination used to run the EVM state
// transitions.
string evm_denom = 1 [ (gogoproto.moretags) = "yaml:\"evm_denom\"" ];
// enable create toggles state transitions that use the vm.Create function
bool enable_create = 2 [ (gogoproto.moretags) = "yaml:\"enable_create\"" ];
// enable call toggles state transitions that use the vm.Call function
bool enable_call = 3 [ (gogoproto.moretags) = "yaml:\"enable_call\"" ];
// extra eips defines the additional EIPs for the vm.Config
repeated int64 extra_eips = 4 [
(gogoproto.customname) = "ExtraEIPs",
(gogoproto.moretags) = "yaml:\"extra_eips\""
];
// chain config defines the EVM chain configuration parameters
ChainConfig chain_config = 5 [
(gogoproto.moretags) = "yaml:\"chain_config\"",
(gogoproto.nullable) = false
];
}
// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values
// instead of *big.Int.
message ChainConfig {
// Homestead switch block (nil no fork, 0 = already homestead)
string homestead_block = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"homestead_block\""
];
// TheDAO hard-fork switch block (nil no fork)
string dao_fork_block = 2 [
(gogoproto.customname) = "DAOForkBlock",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"dao_fork_block\""
];
// Whether the nodes supports or opposes the DAO hard-fork
bool dao_fork_support = 3 [
(gogoproto.customname) = "DAOForkSupport",
(gogoproto.moretags) = "yaml:\"dao_fork_support\""
];
// EIP150 implements the Gas price changes
// (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork)
string eip150_block = 4 [
(gogoproto.customname) = "EIP150Block",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"eip150_block\""
];
// EIP150 HF hash (needed for header only clients as only gas pricing changed)
string eip150_hash = 5 [
(gogoproto.customname) = "EIP150Hash",
(gogoproto.moretags) = "yaml:\"byzantium_block\""
];
// EIP155Block HF block
string eip155_block = 6 [
(gogoproto.customname) = "EIP155Block",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"eip155_block\""
];
// EIP158 HF block
string eip158_block = 7 [
(gogoproto.customname) = "EIP158Block",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"eip158_block\""
];
// Byzantium switch block (nil no fork, 0 = already on byzantium)
string byzantium_block = 8 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"byzantium_block\""
];
// Constantinople switch block (nil no fork, 0 = already activated)
string constantinople_block = 9 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"constantinople_block\""
];
// Petersburg switch block (nil same as Constantinople)
string petersburg_block = 10 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"petersburg_block\""
];
// Istanbul switch block (nil no fork, 0 = already on istanbul)
string istanbul_block = 11 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"istanbul_block\""
];
// Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated)
string muir_glacier_block = 12 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"muir_glacier_block\""
];
// Berlin switch block (nil = no fork, 0 = already on berlin)
string berlin_block = 13 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"berlin_block\""
];
// DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated
reserved 14, 15, 16;
reserved "yolo_v3_block", "ewasm_block", "catalyst_block";
// London switch block (nil = no fork, 0 = already on london)
string london_block = 17 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"london_block\""
];
}
// State represents a single Storage key value pair item.
message State {
string key = 1;
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 {
string hash = 1;
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.
message Log {
// Consensus fields:
// address of the contract that generated the event
string address = 1;
// list of topics provided by the contract.
repeated string topics = 2;
// supplied by the contract, usually ABI-encoded
bytes data = 3;
// Derived fields. These fields are filled in by the node
// but not secured by consensus.
// block in which the transaction was included
uint64 block_number = 4 [ (gogoproto.jsontag) = "blockNumber" ];
// hash of the transaction
string tx_hash = 5 [ (gogoproto.jsontag) = "transactionHash" ];
// index of the transaction in the block
uint64 tx_index = 6 [ (gogoproto.jsontag) = "transactionIndex" ];
// hash of the block in which the transaction was included
string block_hash = 7 [ (gogoproto.jsontag) = "blockHash" ];
// index of the log in the block
uint64 index = 8 [ (gogoproto.jsontag) = "logIndex" ];
// The Removed field is true if this log was reverted due to a chain
// reorganisation. You must pay attention to this field if you receive logs
// through a filter query.
bool removed = 9;
}
// 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.
string contract_address = 1
[ (gogoproto.moretags) = "yaml:\"contract_address\"" ];
// bloom represents the bloom filter bytes
bytes bloom = 2;
// tx_logs contains the transaction hash and the proto-compatible ethereum
// logs.
TransactionLogs tx_logs = 3 [
(gogoproto.moretags) = "yaml:\"tx_logs\"",
(gogoproto.nullable) = false
];
// 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;
}
// AccessTuple is the element type of an access list.
message AccessTuple {
option (gogoproto.goproto_getters) = false;
// hex formatted ethereum address
string address = 1;
// hex formatted hashes of the storage keys
repeated string storage_keys = 2 [ (gogoproto.jsontag) = "storageKeys" ];
}
// TraceConfig holds extra parameters to trace functions.
message TraceConfig {
// DEPRECATED: DisableMemory and DisableReturnData have been renamed to
// Enable*.
reserved 4, 7;
reserved "disable_memory", "disable_return_data";
// custom javascript tracer
string tracer = 1;
// overrides the default timeout of 5 seconds for JavaScript-based tracing
// calls
string timeout = 2;
// number of blocks the tracer is willing to go back
uint64 reexec = 3;
// disable stack capture
bool disable_stack = 5 [ (gogoproto.jsontag) = "disableStack" ];
// disable storage capture
bool disable_storage = 6 [ (gogoproto.jsontag) = "disableStorage" ];
// print output during capture end
bool debug = 8;
// maximum length of output, but zero means unlimited
int32 limit = 9;
// Chain overrides, can be used to execute a trace using future fork rules
ChainConfig overrides = 10;
// enable memory capture
bool enable_memory = 11 [ (gogoproto.jsontag) = "enableMemory" ];
// enable return data capture
bool enable_return_data = 12 [ (gogoproto.jsontag) = "enableReturnData" ];
}