Skip to content

Commit

Permalink
chore: add .proto to .editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-rushakoff committed Nov 5, 2024
1 parent 0910c2b commit 7a0171e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{sh,bash}]
[*.{sh,bash,proto}]
indent_style = space
indent_size = 2
86 changes: 43 additions & 43 deletions proto/gordian/server/v1/grpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,87 +5,87 @@ option go_package = "github.com/rollchains/gordian/gcosmos/gserver/internal/ggrp
package gordian.server.v1;

service GordianGRPC {
// GetBlocksWatermark returns the current block information.
rpc GetBlocksWatermark(CurrentBlockRequest) returns (CurrentBlockResponse) {}
// GetValidators returns the validator set.
rpc GetValidators(GetValidatorsRequest) returns (GetValidatorsResponse) {}
// GetBlocksWatermark returns the current block information.
rpc GetBlocksWatermark(CurrentBlockRequest) returns (CurrentBlockResponse) {}
// GetValidators returns the validator set.
rpc GetValidators(GetValidatorsRequest) returns (GetValidatorsResponse) {}

// (DEBUG) SubmitTransaction submits a transaction to the network.
rpc SubmitTransaction(SubmitTransactionRequest) returns (TxResultResponse) {}
// (DEBUG) SimulateTransaction submits and simulates a transaction.
rpc SimulateTransaction(SubmitSimulationTransactionRequest) returns (TxResultResponse) {}
// (DEBUG) PendingTransactions returns the pending transactions in JSON form.
rpc PendingTransactions(PendingTransactionsRequest) returns (PendingTransactionsResponse) {}
// (DEBUG) QueryAccountBalance returns the balance of an account.
rpc QueryAccountBalance(QueryAccountBalanceRequest) returns (QueryAccountBalanceResponse) {}
// (DEBUG) SubmitTransaction submits a transaction to the network.
rpc SubmitTransaction(SubmitTransactionRequest) returns (TxResultResponse) {}
// (DEBUG) SimulateTransaction submits and simulates a transaction.
rpc SimulateTransaction(SubmitSimulationTransactionRequest) returns (TxResultResponse) {}
// (DEBUG) PendingTransactions returns the pending transactions in JSON form.
rpc PendingTransactions(PendingTransactionsRequest) returns (PendingTransactionsResponse) {}
// (DEBUG) QueryAccountBalance returns the balance of an account.
rpc QueryAccountBalance(QueryAccountBalanceRequest) returns (QueryAccountBalanceResponse) {}
}

message CurrentBlockRequest {}
message CurrentBlockResponse {
uint64 voting_height = 1;
uint32 voting_round = 2;
uint64 voting_height = 1;
uint32 voting_round = 2;

uint64 committing_height = 3;
uint32 committing_round = 4;
uint64 committing_height = 3;
uint32 committing_round = 4;
}

message Validator {
bytes encoded_pub_key = 1;
uint64 power = 2;
bytes encoded_pub_key = 1;
uint64 power = 2;
}
message GetValidatorsRequest {}
message GetValidatorsResponse {
repeated Validator validators = 1;
repeated Validator validators = 1;
}

message SubmitTransactionRequest {
bytes tx = 1;
bytes tx = 1;
}

message SubmitSimulationTransactionRequest {
bytes tx = 1;
bytes tx = 1;
}

message PendingTransactionsRequest {}

message PendingTransactionsResponse {
// json encoded transactions
repeated bytes txs = 1;
// json encoded transactions
repeated bytes txs = 1;
}

// cosmos-sdk/core/app/app.go#TxResult
// TODO: import this directly from the SDK? or use our own?
message Attribute {
string key = 1;
string value = 2;
string key = 1;
string value = 2;
}
message Event {
string type = 1;
repeated Attribute attributes = 2;
string type = 1;
repeated Attribute attributes = 2;
}
message TxResultResponse {
// TODO: tx hash?
repeated Event events = 1 [json_name="events"];
// bytes resp = 2; // []transaction.Msg
string error = 3 [json_name="error"];
uint32 code = 4 [json_name="code"];
bytes data = 5 [json_name="data"];
string log = 6 [json_name="log"];
string info = 7 [json_name="info"];
uint64 gas_wanted = 8 [json_name="gas_wanted"];
uint64 gas_used = 9 [json_name="gas_used"];
string codespace = 10 [json_name="codespace"];
// TODO: tx hash?
repeated Event events = 1 [json_name="events"];
// bytes resp = 2; // []transaction.Msg
string error = 3 [json_name="error"];
uint32 code = 4 [json_name="code"];
bytes data = 5 [json_name="data"];
string log = 6 [json_name="log"];
string info = 7 [json_name="info"];
uint64 gas_wanted = 8 [json_name="gas_wanted"];
uint64 gas_used = 9 [json_name="gas_used"];
string codespace = 10 [json_name="codespace"];
}


message BalanceResponse {
string denom = 1;
string amount = 2;
string denom = 1;
string amount = 2;
}
message QueryAccountBalanceRequest {
string address = 1;
string denom = 2;
string address = 1;
string denom = 2;
}
message QueryAccountBalanceResponse {
BalanceResponse balance = 1;
BalanceResponse balance = 1;
}

0 comments on commit 7a0171e

Please sign in to comment.