forked from cerc-io/laconicd-deprecated
grpc: add eth_call query command (#236)
* add eth_call query command Implement EthCall grpc query api Closes #229 add eth_call query command fix codec issue use query client use grpc status error and codes validate address length in grpc handler * Update x/evm/types/callargs.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Federico Kunze Küllmer
parent
7951852bb0
commit
0020e4f2cd
@@ -5,6 +5,7 @@ import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "ethermint/evm/v1alpha1/evm.proto";
|
||||
import "ethermint/evm/v1alpha1/tx.proto";
|
||||
|
||||
option go_package = "github.com/tharsis/ethermint/x/evm/types";
|
||||
|
||||
@@ -70,6 +71,11 @@ service Query {
|
||||
rpc StaticCall(QueryStaticCallRequest) returns (QueryStaticCallResponse) {
|
||||
option (google.api.http).get = "/ethermint/evm/v1alpha1/static_call";
|
||||
}
|
||||
|
||||
// EthCall implements the `eth_call` rpc api
|
||||
rpc EthCall(EthCallRequest) returns (MsgEthereumTxResponse) {
|
||||
option (google.api.http).get = "/ethermint/evm/v1alpha1/eth_call";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryAccountRequest is the request type for the Query/Account RPC method.
|
||||
@@ -250,7 +256,13 @@ message QueryStaticCallRequest {
|
||||
bytes input = 2;
|
||||
}
|
||||
|
||||
// // QueryStaticCallRequest defines static call response
|
||||
// QueryStaticCallRequest defines static call response
|
||||
message QueryStaticCallResponse {
|
||||
bytes data = 1;
|
||||
}
|
||||
|
||||
// EthCallRequest defines EthCall request
|
||||
message EthCallRequest {
|
||||
// same json format as the json rpc api.
|
||||
bytes args = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user