-
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.
* docs(readme): add supported endpoints Signed-off-by: Luca Georges Francois <[email protected]> * docs(examples): add simple example Signed-off-by: Luca Georges Francois <[email protected]> * docs(readme): update examples section Signed-off-by: Luca Georges Francois <[email protected]> --------- Signed-off-by: Luca Georges Francois <[email protected]>
- Loading branch information
1 parent
12e3cd7
commit 7123c9b
Showing
2 changed files
with
49 additions
and
5 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,20 @@ | ||
use redax_rs::sdk::data::v1::GetBidsDeliveredRequest; | ||
use redax_rs::*; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
let clt = relay::RelayClient::new()?.with_api_url("https://boost-relay.flashbots.net")?; | ||
let relay_sdk = sdk::RelaySDK::new(clt); | ||
|
||
// Get the bids delivered. | ||
let bids_delivered = relay_sdk | ||
.data() | ||
.v1() | ||
.get_bids_delivered(GetBidsDeliveredRequest::default()) | ||
.await?; | ||
|
||
// Print the first bid's value. | ||
println!("{:?}", bids_delivered[0].bid_trace.value.to_string()); | ||
|
||
Ok(()) | ||
} |