-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,169 additions
and
464 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,9 @@ | ||
fn main() { | ||
println!("cargo:rerun-if-changed=proto"); | ||
tonic_build::configure() | ||
.out_dir("src/proto") | ||
.include_file("mod.rs") | ||
.protoc_arg("--experimental_allow_proto3_optional") | ||
.compile_protos(&["proto/dips.proto"], &["proto"]) | ||
.expect("Failed to compile dips proto(s)"); | ||
} |
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,56 @@ | ||
syntax = "proto3"; | ||
|
||
package graphprotocol.indexer.dips; | ||
|
||
service AgreementService { | ||
rpc CreateAgreement(CreateAgreementRequest) returns (CreateAgreementResponse); | ||
rpc CancelAgreement(CancelAgreementRequest) returns (AgreementCanellationResponse); | ||
rpc GetAgreementById(GetAgreementByIdRequest) returns (GetAgreementByIdResponse); | ||
rpc GetPrice(PriceRequest) returns (PriceResponse); | ||
} | ||
|
||
message GetAgreementByIdRequest { | ||
|
||
} | ||
|
||
message GetAgreementByIdResponse { | ||
|
||
} | ||
|
||
message CreateAgreementRequest { | ||
string id = 1; | ||
bytes signed_voucher = 2; | ||
} | ||
|
||
message CancelAgreementRequest { | ||
string id = 1; | ||
bytes signed_voucher = 2; | ||
} | ||
|
||
message CreateAgreementResponse { | ||
string uuid = 1; | ||
} | ||
|
||
message AgreementCanellationResponse { | ||
string uuid = 1; | ||
} | ||
|
||
message PriceRequest { | ||
ProtocolNetwork protocol = 1; | ||
string chain_id = 2; | ||
} | ||
|
||
message PriceResponse { | ||
optional Price price = 1; | ||
} | ||
|
||
message Price { | ||
string price_per_block = 1; | ||
string chain_id = 2; | ||
ProtocolNetwork protocol = 3; | ||
} | ||
|
||
enum ProtocolNetwork { | ||
UNKNOWN = 0; | ||
EVM = 1; | ||
} |
Oops, something went wrong.