evm, rpc: query ChainConfig via gRPC (#239)

* evm, rpc: query ChainConfig via gRPC

* c++
This commit is contained in:
Federico Kunze Küllmer
2021-07-08 14:46:42 +00:00
committed by GitHub
parent 61296071e3
commit 623863231b
14 changed files with 864 additions and 128 deletions
+14
View File
@@ -61,6 +61,11 @@ service Query {
option (google.api.http).get = "/ethermint/evm/v1alpha1/params";
}
// ChainConfig queries the chain configuration values of EVM.
rpc ChainConfig(QueryChainConfigRequest) returns (QueryChainConfigResponse) {
option (google.api.http).get = "/ethermint/evm/v1alpha1/chain_config";
}
// StaticCall queries the static call value of x/evm module.
rpc StaticCall(QueryStaticCallRequest) returns (QueryStaticCallResponse) {
option (google.api.http).get = "/ethermint/evm/v1alpha1/static_call";
@@ -228,6 +233,15 @@ message QueryParamsResponse {
Params params = 1 [(gogoproto.nullable) = false];
}
// QueryChainConfigRequest defines the request type for querying x/evm chain configuration.
message QueryChainConfigRequest {}
// QueryChainConfigResponse defines the response type for querying x/evm chain configuration.
message QueryChainConfigResponse {
// ChainConfig define the evm chain configuration.
ChainConfig config = 1 [(gogoproto.nullable) = false];
}
// QueryStaticCallRequest defines static call request
message QueryStaticCallRequest {
// address is the ethereum contract hex address to for static call.
+2 -2
View File
@@ -35,7 +35,7 @@ message MsgEthereumTx {
// LegacyTx is the transaction data of regular Ethereum transactions.
message LegacyTx {
option (gogoproto.goproto_getters) = false;
option (cosmos_proto.implements_interface) = "TxDataI";
option (cosmos_proto.implements_interface) = "TxData";
// nonce corresponds to the account nonce (transaction sequence).
uint64 nonce = 1;
@@ -66,7 +66,7 @@ message LegacyTx {
// AccessListTx is the data of EIP-2930 access list transactions.
message AccessListTx {
option (gogoproto.goproto_getters) = false;
option (cosmos_proto.implements_interface) = "TxDataI";
option (cosmos_proto.implements_interface) = "TxData";
// destination EVM chain ID
string chain_id = 1 [