Skip to content

Commit dad14ec

Browse files
committed
fix: lint
1 parent 2224113 commit dad14ec

File tree

6 files changed

+24
-74
lines changed

6 files changed

+24
-74
lines changed

crates/evm/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ reth-db-common.workspace = true
2828

2929
trevm = { workspace = true, features = ["test-utils"] }
3030

31+
signet-types = { workspace = true, features = ["test-utils"] }
32+
signet-extract = { workspace = true, features = ["test-utils"] }
3133

3234
[features]
3335
default = []

crates/evm/src/driver.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,10 @@ mod test {
780780
};
781781
use reth::primitives::{Block, RecoveredBlock, Transaction};
782782
use signet_extract::ExtractedEvent;
783-
use signet_types::config::{HostConfig, PredeployTokens, RollupConfig};
783+
use signet_types::{
784+
config::{HostConfig, PredeployTokens, RollupConfig},
785+
test_utils::*,
786+
};
784787
use trevm::NoopCfg;
785788

786789
/// Make a fake block with a specific number.

crates/evm/src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,9 @@ where
7878
/// Test utilities for the Signet EVM impl.
7979
#[cfg(any(test, feature = "test-utils"))]
8080
pub mod test_utils {
81-
use alloy::primitives::Address;
81+
8282
use reth::revm::InMemoryDB;
83-
use signet_types::{
84-
config::{HostConfig, PredeployTokens, RollupConfig, SignetSystemConstants},
85-
test_utils::*,
86-
};
83+
use signet_types::test_utils::*;
8784

8885
/// Create a new Signet EVM with an in-memory database for testing.
8986
pub fn test_signet_evm() -> super::EvmNeedsCfg<'static, trevm::revm::db::InMemoryDB> {

crates/extract/src/test_utils/host_spec.rs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
use crate::test_utils::{
2-
sign_tx_with_key_pair, simple_send, NotificationSpec, NotificationWithSidecars, RuBlockSpec,
2+
NotificationSpec, NotificationWithSidecars, RuBlockSpec,
33
};
44
use alloy::{
55
consensus::{
6-
constants::GWEI_TO_WEI, BlobTransactionSidecar, SidecarBuilder, SimpleCoder, TxEip4844,
7-
TxEnvelope,
6+
constants::GWEI_TO_WEI, BlobTransactionSidecar, TxEip4844,
87
},
9-
eips::eip2718::Encodable2718,
10-
primitives::{keccak256, Address, Bytes, FixedBytes, Log, LogData, Sealable, B256, U256},
11-
rlp::Encodable,
12-
signers::{local::PrivateKeySigner, Signature},
8+
primitives::{Address, Bytes, FixedBytes, Log, LogData, Sealable, B256, U256},
9+
signers::Signature,
1310
};
1411
use reth::{
1512
primitives::{
@@ -18,19 +15,13 @@ use reth::{
1815
},
1916
providers::{Chain, ExecutionOutcome},
2017
};
21-
use reth_exex::ExExNotification;
2218
use signet_types::config::SignetSystemConstants;
2319
use signet_zenith::{
2420
Passage, RollupOrders, Transactor,
25-
Zenith::{self},
2621
};
2722
use std::{
2823
borrow::Borrow,
29-
collections::BTreeMap,
30-
sync::{
31-
atomic::{AtomicU64, Ordering},
32-
Arc,
33-
},
24+
sync::atomic::{AtomicU64, Ordering},
3425
};
3526

3627
/// A block spec for the host chain.
@@ -66,7 +57,7 @@ impl Clone for HostBlockSpec {
6657

6758
impl HostBlockSpec {
6859
/// Make a new block spec
69-
pub fn new(constants: SignetSystemConstants) -> Self {
60+
pub const fn new(constants: SignetSystemConstants) -> Self {
7061
Self {
7162
constants,
7263
receipts: vec![],

crates/extract/src/test_utils/notif_spec.rs

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,10 @@
1-
use super::{sign_tx_with_key_pair, simple_send};
21
use crate::test_utils::HostBlockSpec;
3-
use alloy::{
4-
consensus::{
5-
constants::GWEI_TO_WEI, BlobTransactionSidecar, SidecarBuilder, SimpleCoder, TxEip4844,
6-
TxEnvelope,
7-
},
8-
eips::eip2718::Encodable2718,
9-
primitives::{keccak256, Address, Bytes, FixedBytes, Log, LogData, Sealable, B256, U256},
10-
rlp::Encodable,
11-
signers::{local::PrivateKeySigner, Signature},
12-
};
13-
use reth::{
14-
primitives::{
15-
Block, BlockBody, Header, Receipt, RecoveredBlock, SealedBlock, SealedHeader, Transaction,
16-
TransactionSigned, TxType,
17-
},
18-
providers::{Chain, ExecutionOutcome},
19-
};
2+
use alloy::consensus::BlobTransactionSidecar;
3+
use reth::primitives::TransactionSigned;
204
use reth_exex::ExExNotification;
21-
use signet_types::config::SignetSystemConstants;
22-
use signet_zenith::{
23-
Passage, RollupOrders, Transactor,
24-
Zenith::{self},
25-
};
265
use std::{
27-
borrow::Borrow,
286
collections::BTreeMap,
29-
sync::{
30-
atomic::{AtomicU64, Ordering},
31-
Arc,
32-
},
7+
sync::Arc,
338
};
349

3510
/// A notification spec.

crates/extract/src/test_utils/ru_spec.rs

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,17 @@
11
use super::{sign_tx_with_key_pair, simple_send};
22
use alloy::{
33
consensus::{
4-
constants::GWEI_TO_WEI, BlobTransactionSidecar, SidecarBuilder, SimpleCoder, TxEip4844,
4+
BlobTransactionSidecar, SidecarBuilder, SimpleCoder,
55
TxEnvelope,
66
},
77
eips::eip2718::Encodable2718,
8-
primitives::{keccak256, Address, Bytes, FixedBytes, Log, LogData, Sealable, B256, U256},
8+
primitives::{keccak256, Address, Bytes, B256, U256},
99
rlp::Encodable,
10-
signers::{local::PrivateKeySigner, Signature},
10+
signers::local::PrivateKeySigner,
1111
};
12-
use reth::{
13-
primitives::{
14-
Block, BlockBody, Header, Receipt, RecoveredBlock, SealedBlock, SealedHeader, Transaction,
15-
TransactionSigned, TxType,
16-
},
17-
providers::{Chain, ExecutionOutcome},
18-
};
19-
use reth_exex::ExExNotification;
12+
use reth::primitives::TransactionSigned;
2013
use signet_types::config::SignetSystemConstants;
21-
use signet_zenith::{
22-
Passage, RollupOrders, Transactor,
23-
Zenith::{self},
24-
};
25-
use std::{
26-
borrow::Borrow,
27-
collections::BTreeMap,
28-
sync::{
29-
atomic::{AtomicU64, Ordering},
30-
Arc,
31-
},
32-
};
14+
use signet_zenith::Zenith::{self};
3315

3416
/// A block spec for the Ru chain.
3517
#[derive(Debug, Clone)]
@@ -46,13 +28,13 @@ pub struct RuBlockSpec {
4628

4729
impl RuBlockSpec {
4830
/// Builder method to set the gas limit.
49-
pub fn with_gas_limit(mut self, gas_limit: u64) -> Self {
31+
pub const fn with_gas_limit(mut self, gas_limit: u64) -> Self {
5032
self.gas_limit = Some(gas_limit);
5133
self
5234
}
5335

5436
/// Builder method to set the reward address.
55-
pub fn with_reward_address(mut self, reward_address: Address) -> Self {
37+
pub const fn with_reward_address(mut self, reward_address: Address) -> Self {
5638
self.reward_address = Some(reward_address);
5739
self
5840
}

0 commit comments

Comments
 (0)