Refactor CalculateGas
to use proto-generated service client #7726
Closed
Description
opened on Oct 29, 2020
Summary of Refactor
Use the generated tx service client instead of hardcoding the gRPC route
ref: #7688 (comment)
Version
Description
Currently, the calculate gas makes a Tendermint query with a hardcoded gRPC route to the simulate service. This works, but we should prefer to use the generated client.
Proposed Refactor
- Remove the hardcoded gRPC service method route: https://github.com/cosmos/cosmos-sdk/blob/master/client/tx/tx.go#L289-L300
- Use the new tx service introduced in Add GetTx gRPC endpoint #7688
txServiceClient = tx.NewServiceClient(clientCtx)
txServiceClient.Simulate(...)
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Activity