cosmos-sdk/proto/cosmos/base/simulate/v1beta1/simulate.proto
Amaury Martiny 3d969a1ffd
Implement gRPC Simulate endpoint (#7035)
* Implement simulate endpoint

* Add GetProtoTx()

* Add signing in test

* Add txBuilderFromProto

* Remove stray println

* Update to master

* Merge master

* Fix tests

* Make tests pass

* Integrate in router

* Make proto-gen

* Fix lint

* Really fix lint

* Refactor to fix import cycles

* Rename builder -> wrapper

* Update proto/cosmos/base/reflection/v1beta1/reflection.proto

* Fix after merge

* t->w

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-24 14:41:08 +00:00

34 lines
1.2 KiB
Protocol Buffer

syntax = "proto3";
package cosmos.base.simulate.v1beta1;
import "google/api/annotations.proto";
import "cosmos/base/abci/v1beta1/abci.proto";
import "cosmos/tx/v1beta1/tx.proto";
option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/simulate";
// SimulateService defines a gRPC service for simulating transactions.
// It may also support querying and broadcasting in the future.
service SimulateService {
// Simulate simulates executing a transaction for estimating gas usage.
rpc Simulate(SimulateRequest) returns (SimulateResponse) {
option (google.api.http).post = "/cosmos/base/simulate/v1beta1/simulate";
}
}
// SimulateRequest is the request type for the SimulateServiceService.Simulate
// RPC method.
message SimulateRequest {
// tx is the transaction to simulate.
cosmos.tx.v1beta1.Tx tx = 1;
}
// SimulateResponse is the response type for the
// SimulateServiceService.SimulateRPC method.
message SimulateResponse {
// gas_info is the information about gas used in the simulation.
cosmos.base.abci.v1beta1.GasInfo gas_info = 1;
// result is the result of the simulation.
cosmos.base.abci.v1beta1.Result result = 2;
}