Skip to content

Commit a9000e9

Browse files
committed
replace builder domain with b256
1 parent 6c8c330 commit a9000e9

1 file changed

Lines changed: 22 additions & 27 deletions

File tree

crates/common/src/types.rs

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::path::PathBuf;
22

3-
use alloy::primitives::{hex, Bytes, B256};
3+
use alloy::primitives::{b256, hex, Bytes, B256};
44
use derive_more::{Deref, Display, From, Into};
55
use eyre::{bail, Context};
66
use serde::{Deserialize, Serialize};
@@ -84,11 +84,11 @@ impl Chain {
8484

8585
pub fn builder_domain(&self) -> B256 {
8686
match self {
87-
Chain::Mainnet => KnownChain::Mainnet.builder_domain().into(),
88-
Chain::Holesky => KnownChain::Holesky.builder_domain().into(),
89-
Chain::Sepolia => KnownChain::Sepolia.builder_domain().into(),
90-
Chain::Helder => KnownChain::Helder.builder_domain().into(),
91-
Chain::Hoodi => KnownChain::Hoodi.builder_domain().into(),
87+
Chain::Mainnet => KnownChain::Mainnet.builder_domain(),
88+
Chain::Holesky => KnownChain::Holesky.builder_domain(),
89+
Chain::Sepolia => KnownChain::Sepolia.builder_domain(),
90+
Chain::Helder => KnownChain::Helder.builder_domain(),
91+
Chain::Hoodi => KnownChain::Hoodi.builder_domain(),
9292
Chain::Custom { .. } => compute_domain(*self, APPLICATION_BUILDER_DOMAIN),
9393
}
9494
}
@@ -153,28 +153,23 @@ impl KnownChain {
153153
}
154154
}
155155

156-
pub fn builder_domain(&self) -> [u8; 32] {
156+
pub fn builder_domain(&self) -> B256 {
157157
match self {
158-
KnownChain::Mainnet => [
159-
0, 0, 0, 1, 245, 165, 253, 66, 209, 106, 32, 48, 39, 152, 239, 110, 211, 9, 151,
160-
155, 67, 0, 61, 35, 32, 217, 240, 232, 234, 152, 49, 169,
161-
],
162-
KnownChain::Holesky => [
163-
0, 0, 0, 1, 91, 131, 162, 55, 89, 197, 96, 178, 208, 198, 69, 118, 225, 220, 252,
164-
52, 234, 148, 196, 152, 143, 62, 13, 159, 119, 240, 83, 135,
165-
],
166-
KnownChain::Sepolia => [
167-
0, 0, 0, 1, 211, 1, 7, 120, 205, 8, 238, 81, 75, 8, 254, 103, 182, 197, 3, 181, 16,
168-
152, 122, 76, 228, 63, 66, 48, 109, 151, 198, 124,
169-
],
170-
KnownChain::Helder => [
171-
0, 0, 0, 1, 148, 196, 26, 244, 132, 255, 247, 150, 73, 105, 224, 189, 217, 34, 248,
172-
45, 255, 15, 75, 232, 122, 96, 208, 102, 76, 201, 209, 255,
173-
],
174-
KnownChain::Hoodi => [
175-
0, 0, 0, 1, 113, 145, 3, 81, 30, 250, 79, 19, 98, 255, 42, 80, 153, 108, 204, 243,
176-
41, 204, 132, 203, 65, 12, 94, 92, 125, 53, 29, 3,
177-
],
158+
KnownChain::Mainnet => {
159+
b256!("0x00000001f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a9")
160+
}
161+
KnownChain::Holesky => {
162+
b256!("0x000000015b83a23759c560b2d0c64576e1dcfc34ea94c4988f3e0d9f77f05387")
163+
}
164+
KnownChain::Sepolia => {
165+
b256!("0x00000001d3010778cd08ee514b08fe67b6c503b510987a4ce43f42306d97c67c")
166+
}
167+
KnownChain::Helder => {
168+
b256!("0x0000000194c41af484fff7964969e0bdd922f82dff0f4be87a60d0664cc9d1ff")
169+
}
170+
KnownChain::Hoodi => {
171+
b256!("0x00000001719103511efa4f1362ff2a50996cccf329cc84cb410c5e5c7d351d03")
172+
}
178173
}
179174
}
180175

0 commit comments

Comments
 (0)