-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from starknet-id/ref/update_use_new_indexer
feat: update bot to new indexer
- Loading branch information
Showing
12 changed files
with
357 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
tonic_build::configure() | ||
.build_server(false) | ||
.protoc_arg("--experimental_allow_proto3_optional") | ||
.compile(&["proto/status.proto"], &["proto"])?; | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Apibara Sink status server | ||
syntax = "proto3"; | ||
|
||
package apibara.sink.v1; | ||
|
||
service Status { | ||
// Get Sink status. | ||
rpc GetStatus(GetStatusRequest) returns (GetStatusResponse); | ||
} | ||
|
||
// Request for the `GetStatus` method. | ||
message GetStatusRequest {} | ||
|
||
// Response for the `GetStatus` method. | ||
message GetStatusResponse { | ||
// The status of the sink. | ||
SinkStatus status = 1; | ||
// The starting block. | ||
optional uint64 starting_block = 2; | ||
// The current block. | ||
optional uint64 current_block = 3; | ||
// The current head of the chain. | ||
optional uint64 head_block = 4; | ||
// The reason why the sink is not running. | ||
optional string reason = 5; | ||
} | ||
|
||
enum SinkStatus { | ||
SINK_STATUS_UNKNOWN = 0; | ||
// The sink is running. | ||
SINK_STATUS_RUNNING = 1; | ||
// The sink has errored. | ||
SINK_STATUS_ERRORED = 2; | ||
} |
Oops, something went wrong.