Skip to content

Commit

Permalink
Update CoW dependencies to v2.272.0 (#65)
Browse files Browse the repository at this point in the history
Co-authored-by: Your Name <[email protected]>
Co-authored-by: ilya <[email protected]>
  • Loading branch information
3 people authored Aug 21, 2024
1 parent 108e8cf commit 64efcaa
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 35 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

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

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ tower-http = { version = "0.4", features = ["trace"] }
tracing = "0.1"
web3 = "0.19"

contracts = { git = "https://github.com/cowprotocol/services.git", tag = "v2.271.0", package = "contracts" }
ethrpc = { git = "https://github.com/cowprotocol/services.git", tag = "v2.271.0", package = "ethrpc" }
observe = { git = "https://github.com/cowprotocol/services.git", tag = "v2.271.0", package = "observe" }
shared = { git = "https://github.com/cowprotocol/services.git", tag = "v2.271.0", package = "shared" }
dto = { git = "https://github.com/cowprotocol/services.git", tag = "v2.271.0", package = "solvers-dto" }
rate-limit = { git = "https://github.com/cowprotocol/services.git", tag = "v2.271.0", package = "rate-limit" }
number = { git = "https://github.com/cowprotocol/services.git", tag = "v2.271.0", package = "number" }
contracts = { git = "https://github.com/cowprotocol/services.git", tag = "v2.272.0", package = "contracts" }
ethrpc = { git = "https://github.com/cowprotocol/services.git", tag = "v2.272.0", package = "ethrpc" }
observe = { git = "https://github.com/cowprotocol/services.git", tag = "v2.272.0", package = "observe" }
shared = { git = "https://github.com/cowprotocol/services.git", tag = "v2.272.0", package = "shared" }
dto = { git = "https://github.com/cowprotocol/services.git", tag = "v2.272.0", package = "solvers-dto" }
rate-limit = { git = "https://github.com/cowprotocol/services.git", tag = "v2.272.0", package = "rate-limit" }
number = { git = "https://github.com/cowprotocol/services.git", tag = "v2.272.0", package = "number" }

[dev-dependencies]
glob = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion src/infra/config/dex/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub async fn load<T: DeserializeOwned>(path: &Path) -> (super::Config, T) {

let block_stream = match config.current_block_poll_interval {
Some(interval) => Some(
ethrpc::current_block::current_block_stream(config.node_url.clone(), interval)
ethrpc::block_stream::current_block_stream(config.node_url.clone(), interval)
.await
.unwrap(),
),
Expand Down
4 changes: 2 additions & 2 deletions src/infra/config/dex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub mod zeroex;

use {
crate::domain::{dex::slippage, eth},
ethrpc::current_block::CurrentBlockStream,
ethrpc::block_stream::CurrentBlockWatcher,
std::num::NonZeroUsize,
};

Expand All @@ -25,6 +25,6 @@ pub struct Config {
pub smallest_partial_fill: eth::Ether,
pub rate_limiting_strategy: rate_limit::Strategy,
pub gas_offset: eth::Gas,
pub block_stream: Option<CurrentBlockStream>,
pub block_stream: Option<CurrentBlockWatcher>,
pub internalize_interactions: bool,
}
4 changes: 2 additions & 2 deletions src/infra/dex/balancer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use {
},
contracts::ethcontract::I256,
ethereum_types::U256,
ethrpc::current_block::CurrentBlockStream,
ethrpc::block_stream::CurrentBlockWatcher,
num::ToPrimitive,
std::{
ops::Add,
Expand All @@ -35,7 +35,7 @@ pub struct Sor {

pub struct Config {
/// Stream that yields every new block.
pub block_stream: Option<CurrentBlockStream>,
pub block_stream: Option<CurrentBlockWatcher>,

/// The URL for the Balancer SOR API.
pub endpoint: reqwest::Url,
Expand Down
6 changes: 3 additions & 3 deletions src/infra/dex/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use {
crate::domain::{auction, dex},
ethrpc::current_block::CurrentBlockStream,
ethrpc::block_stream::CurrentBlockWatcher,
reqwest::RequestBuilder,
};

Expand Down Expand Up @@ -64,11 +64,11 @@ struct Client {
client: reqwest::Client,

/// Block stream to read the current block.
block_stream: Option<CurrentBlockStream>,
block_stream: Option<CurrentBlockWatcher>,
}

impl Client {
pub fn new(client: reqwest::Client, block_stream: Option<CurrentBlockStream>) -> Self {
pub fn new(client: reqwest::Client, block_stream: Option<CurrentBlockWatcher>) -> Self {
Self {
client,
block_stream,
Expand Down
4 changes: 2 additions & 2 deletions src/infra/dex/oneinch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use {
util,
},
ethereum_types::H160,
ethrpc::current_block::CurrentBlockStream,
ethrpc::block_stream::CurrentBlockWatcher,
std::{
sync::atomic::{self, AtomicU64},
time::{Duration, Instant},
Expand Down Expand Up @@ -46,7 +46,7 @@ pub struct Config {
pub complexity_level: Option<u32>,

/// Stream that yields every new block.
pub block_stream: Option<CurrentBlockStream>,
pub block_stream: Option<CurrentBlockWatcher>,
}

#[derive(Debug, Clone)]
Expand Down
4 changes: 2 additions & 2 deletions src/infra/dex/paraswap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use {
util,
},
ethereum_types::Address,
ethrpc::current_block::CurrentBlockStream,
ethrpc::block_stream::CurrentBlockWatcher,
};

mod dto;
Expand Down Expand Up @@ -42,7 +42,7 @@ pub struct Config {
pub chain_id: eth::ChainId,

/// A stream that yields every new block.
pub block_stream: Option<CurrentBlockStream>,
pub block_stream: Option<CurrentBlockWatcher>,
}

impl ParaSwap {
Expand Down
4 changes: 2 additions & 2 deletions src/infra/dex/zeroex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use {
util,
},
ethereum_types::H160,
ethrpc::current_block::CurrentBlockStream,
ethrpc::block_stream::CurrentBlockWatcher,
hyper::StatusCode,
std::sync::atomic::{self, AtomicU64},
tracing::Instrument,
Expand Down Expand Up @@ -46,7 +46,7 @@ pub struct Config {
pub enable_slippage_protection: bool,

/// The stream that yields every new block.
pub block_stream: Option<CurrentBlockStream>,
pub block_stream: Option<CurrentBlockWatcher>,
}

impl ZeroEx {
Expand Down

0 comments on commit 64efcaa

Please sign in to comment.