Skip to content

chore(deps): bump bin-base #122

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

Merged
merged 1 commit into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
73 changes: 67 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ path = "bin/submit_transaction.rs"
integration = []

[dependencies]
init4-bin-base = { version = "0.4.3", features = ["perms"] }
init4-bin-base = { version = "0.5.0", features = ["perms"] }

signet-constants = { version = "0.4.2" }
signet-sim = { version = "0.4.2" }
Expand Down Expand Up @@ -55,7 +55,6 @@ reqwest = { version = "0.11.24", features = ["blocking", "json"] }
serde_json = "1.0"
tokio = { version = "1.36.0", features = ["full", "macros", "rt-multi-thread"] }

oauth2 = "5"
tokio-stream = "0.1.17"
url = "2.5.4"
tracing = "0.1.41"
6 changes: 3 additions & 3 deletions src/quincey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use init4_bin_base::{
perms::SharedToken,
utils::signer::LocalOrAws,
};
use oauth2::TokenResponse;
use reqwest::Client;
use signet_types::{SignRequest, SignResponse};

Expand Down Expand Up @@ -53,12 +52,13 @@ impl Quincey {
async fn sup_remote(&self, sig_request: &SignRequest) -> eyre::Result<SignResponse> {
let Self::Remote { client, url, token } = &self else { bail!("not a remote client") };

let Some(token) = token.read() else { bail!("no token available") };
let token =
token.secret().await.map_err(|e| eyre::eyre!("failed to retrieve token: {e}"))?;

let resp: reqwest::Response = client
.post(url.clone())
.json(sig_request)
.bearer_auth(token.access_token().secret())
.bearer_auth(token)
.send()
.await?
.error_for_status()?;
Expand Down
9 changes: 3 additions & 6 deletions src/tasks/cache/bundle.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
//! Bundler service responsible for fetching bundles and sending them to the simulator.
use crate::config::BuilderConfig;
use eyre::bail;
use init4_bin_base::{
deps::tracing::{Instrument, debug, debug_span, error, trace},
perms::SharedToken,
};
use oauth2::TokenResponse;
use reqwest::{Client, Url};
use signet_tx_cache::types::{TxCacheBundle, TxCacheBundlesResponse};
use tokio::{
Expand Down Expand Up @@ -46,13 +44,12 @@ impl BundlePoller {
/// Fetches bundles from the transaction cache and returns them.
pub async fn check_bundle_cache(&mut self) -> eyre::Result<Vec<TxCacheBundle>> {
let bundle_url: Url = Url::parse(&self.config.tx_pool_url)?.join("bundles")?;
let Some(token) = self.token.read() else {
bail!("No token available, skipping bundle fetch");
};
let token =
self.token.secret().await.map_err(|e| eyre::eyre!("Failed to read token: {e}"))?;

self.client
.get(bundle_url)
.bearer_auth(token.access_token().secret())
.bearer_auth(token)
.send()
.await?
.error_for_status()?
Expand Down