Skip to content
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
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "init4-bin-base"
description = "Internal utilities for binaries produced by the init4 team"
keywords = ["init4", "bin", "base"]

version = "0.8.0"
version = "0.9.0"
edition = "2021"
rust-version = "1.81"
authors = ["init4", "James Prestwich"]
Expand All @@ -16,8 +16,8 @@ repository = "https://github.com/init4tech/bin-base"
init4-from-env-derive = "0.1.0"

# Signet
signet-constants = { version = "0.7.0" }
signet-tx-cache = { version = "0.7.0", optional = true }
signet-constants = { version = "0.8.0" }
signet-tx-cache = { version = "0.8.0", optional = true }

# Tracing
tracing = "0.1.40"
Expand Down
24 changes: 12 additions & 12 deletions examples/tx_cache.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
use init4_bin_base::{
perms::tx_cache::BuilderTxCache, perms::OAuthConfig, utils::from_env::FromEnv,
};
use signet_tx_cache::client::TxCache;
// use init4_bin_base::{
// perms::tx_cache::BuilderTxCache, perms::OAuthConfig, utils::from_env::FromEnv,
// };
// use signet_tx_cache::client::TxCache;

#[tokio::main]
async fn main() -> eyre::Result<()> {
let cfg = OAuthConfig::from_env()?;
let authenticator = cfg.authenticator();
let token = authenticator.token();
// let cfg = OAuthConfig::from_env()?;
// let authenticator = cfg.authenticator();
// let token = authenticator.token();

let _jh = authenticator.spawn();
// let _jh = authenticator.spawn();

tokio::time::sleep(std::time::Duration::from_secs(5)).await;
// tokio::time::sleep(std::time::Duration::from_secs(5)).await;

let tx_cache = BuilderTxCache::new(TxCache::pecorino(), token);
// let tx_cache = BuilderTxCache::new(TxCache::pecorino(), token);

let bundles = tx_cache.get_bundles().await?;
// let bundles = tx_cache.get_bundles().await?;

println!("Bundles: {bundles:#?}");
// println!("Bundles: {bundles:#?}");

Ok(())
}
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ pub mod utils {
/// [`FromEnvVar`]: from_env::FromEnvVar
pub mod from_env;

#[cfg(feature = "alloy")]
/// SignetConstants variables FromEnv
pub mod constants_from_env;

/// Prometheus metrics utilities.
pub mod metrics;

Expand Down
Loading