Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TxsByEvent gRPC endpoint #7842

Merged
merged 27 commits into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
081369f
add service definition for TxsByEvents
aleem1314 Nov 6, 2020
3bee1ff
add TxsByEvent gRPC endpoint
aleem1314 Nov 6, 2020
1cda4ff
fix lint
aleem1314 Nov 6, 2020
ca102d8
fix test
aleem1314 Nov 6, 2020
7e18e49
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into al…
aleem1314 Nov 7, 2020
867f6eb
Merge branch 'master' into aleem/7355-grpc-endpoints
aleem1314 Nov 9, 2020
df5444e
Merge branch 'master' into aleem/7355-grpc-endpoints
aleem1314 Nov 9, 2020
8be084a
review changes
aleem1314 Nov 9, 2020
f6de842
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into al…
aleem1314 Nov 9, 2020
a46de40
Merge branch 'aleem/7355-grpc-endpoints' of https://github.com/cosmos…
aleem1314 Nov 9, 2020
44ccc1d
review changes
aleem1314 Nov 10, 2020
5869b49
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into al…
aleem1314 Nov 10, 2020
c422541
fix proto descriptions
aleem1314 Nov 10, 2020
efa1f45
Merge branch 'master' into aleem/7355-grpc-endpoints
alexanderbez Nov 10, 2020
94f7986
review changes
aleem1314 Nov 11, 2020
fb5bf71
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into al…
aleem1314 Nov 11, 2020
1e1bf06
fix lint
aleem1314 Nov 11, 2020
c43abaa
review changes
aleem1314 Nov 11, 2020
985b330
Update proto/cosmos/tx/v1beta1/service.proto
aleem1314 Nov 11, 2020
919d10e
Merge branch 'master' into aleem/7355-grpc-endpoints
aleem1314 Nov 11, 2020
d411845
Merge branch 'master' into aleem/7355-grpc-endpoints
mergify[bot] Nov 11, 2020
5d3307d
Merge branch 'master' into aleem/7355-grpc-endpoints
mergify[bot] Nov 11, 2020
846a677
Merge branch 'master' into aleem/7355-grpc-endpoints
mergify[bot] Nov 11, 2020
ff3b552
review changes
aleem1314 Nov 11, 2020
439dddf
Merge branch 'master' into aleem/7355-grpc-endpoints
mergify[bot] Nov 11, 2020
6d52e94
Merge branch 'master' into aleem/7355-grpc-endpoints
mergify[bot] Nov 12, 2020
cad1dd4
Merge branch 'master' into aleem/7355-grpc-endpoints
mergify[bot] Nov 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 10 additions & 41 deletions proto/cosmos/tx/v1beta1/service.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
syntax = "proto3";
package cosmos.tx.v1beta1;

import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/abci/v1beta1/abci.proto";
import "cosmos/tx/v1beta1/tx.proto";
import "tendermint/types/types.proto";
import "cosmos/base/query/v1beta1/pagination.proto";

option go_package = "github.com/cosmos/cosmos-sdk/types/tx";
Expand All @@ -21,19 +19,17 @@ service Service {
option (google.api.http).get = "/cosmos/tx/v1beta1/tx/{hash}";
}

// TxsByEvents fetches txs by event.
rpc TxsByEvents(GetTxsEventRequest) returns (TxsByEventsResponse) {
// GetTxsEvent fetches txs by event.
rpc GetTxsEvent(GetTxsEventRequest) returns (TxsByEventsResponse) {
option (google.api.http).get = "/cosmos/tx/v1beta1/txs";
}
}

// GetTxsEventRequest is the request type for the Service.TxsByEvents
// RPC method.
message GetTxsEventRequest {

// event is the transaction event type.
string event = 1;

// pagination defines an pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 2;

aleem1314 marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -43,42 +39,14 @@ message GetTxsEventRequest {
// RPC method.
message TxsByEventsResponse {
// txs is the list of queried transactions.
repeated TxRes txs = 1;

repeated cosmos.tx.v1beta1.Tx txs = 1;
aleem1314 marked this conversation as resolved.
Show resolved Hide resolved
// tx_responses is the list of queried TxResponses.
repeated cosmos.base.abci.v1beta1.TxResponse tx_response = 2;
aleem1314 marked this conversation as resolved.
Show resolved Hide resolved
// pagination defines an pagination for the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
cosmos.base.query.v1beta1.PageResponse pagination = 3;

}

// TxRes defines a structure containing relevant tx data and metadata.
message TxRes {
option (gogoproto.goproto_getters) = false;
// The block height
int64 height = 1;
// The transaction hash.
string txhash = 2 [(gogoproto.customname) = "TxHash"];
// Namespace for the Code
string codespace = 3;
// Response code.
uint32 code = 4;
// tx is the queried transaction.
cosmos.tx.v1beta1.Tx tx = 5;
// The output of the application's logger (raw string). May be
// non-deterministic.
string raw_log = 6;
// Additional information. May be non-deterministic.
string info = 7;
// Amount of gas requested for transaction.
int64 gas_wanted = 8;
// Amount of gas consumed by transaction.
int64 gas_used = 9;
// index defines the index of the transaction in the block.
uint32 index = 10;
// proof returns the transaction merkle proof of the presence of the transaction
// in the block
tendermint.types.TxProof proof = 11;
}

// SimulateRequest is the request type for the Service.Simulate
// RPC method.
message SimulateRequest {
Expand All @@ -104,7 +72,8 @@ message GetTxRequest {

// GetTxResponse is the response type for the Service.GetTx method.
message GetTxResponse {
// TxRes is the queried transaction.
TxRes result = 1;

// tx is the queried transaction.
cosmos.tx.v1beta1.Tx tx = 1;
// tx_response is the queried TxResponses.
cosmos.base.abci.v1beta1.TxResponse tx_response = 2;
}
Loading