Skip to content

Commit 8980e23

Browse files
committed
creates mod consts
1 parent c8deba9 commit 8980e23

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

src/consts.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//! Constants used in the builder.
2+
3+
/// Pecorino Chain ID used for the Pecorino network.
4+
pub const PECORINO_CHAIN_ID: u64 = 14174;

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#![deny(unused_must_use, rust_2018_idioms)]
1313
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
1414

15+
/// Constants for the Builder.
16+
pub mod consts;
17+
1518
/// Configuration for the Builder binary.
1619
pub mod config;
1720

src/tasks/block.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::{
22
config::{BuilderConfig, RuProvider},
3+
consts::PECORINO_CHAIN_ID,
34
tasks::bundler::Bundle,
45
};
56
use alloy::{
@@ -33,9 +34,6 @@ use trevm::{
3334
},
3435
};
3536

36-
/// Pecorino Chain ID used for the Pecorino network.
37-
pub const PECORINO_CHAIN_ID: u64 = 14174;
38-
3937
/// `Simulator` is responsible for periodically building blocks and submitting them for
4038
/// signing and inclusion in the blockchain.
4139
#[derive(Debug)]

src/test_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Test utilities for testing builder tasks
2-
use crate::{config::BuilderConfig, tasks::block::PECORINO_CHAIN_ID};
2+
use crate::{config::BuilderConfig, consts::PECORINO_CHAIN_ID};
33
use alloy::{
44
consensus::{SignableTransaction, TxEip1559, TxEnvelope},
55
primitives::{Address, TxKind, U256},

tests/block_builder_test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ mod tests {
66
signers::local::PrivateKeySigner,
77
};
88
use builder::{
9-
tasks::block::{PECORINO_CHAIN_ID, Simulator},
9+
consts::PECORINO_CHAIN_ID,
10+
tasks::block::Simulator,
1011
test_utils::{new_signed_tx, setup_logging, setup_test_config},
1112
};
1213

0 commit comments

Comments
 (0)