@@ -10,7 +10,7 @@ use alloy_primitives::{B256, U256};
1010
1111/// A single immutable reference inside a bytecode blob.
1212#[ derive( Debug , Clone , Copy ) ]
13- pub struct ImmutableRef {
13+ pub ( crate ) struct ImmutableRef {
1414 /// Byte offset into the **runtime** bytecode.
1515 pub start : usize ,
1616 /// Number of bytes (always 32 for EVM words).
@@ -22,7 +22,7 @@ pub struct ImmutableRef {
2222/// # Panics
2323///
2424/// Panics if any reference extends past the end of `bytecode`.
25- pub fn patch_bytes ( bytecode : & mut [ u8 ] , refs : & [ ImmutableRef ] , value : & [ u8 ; 32 ] ) {
25+ pub ( crate ) fn patch_bytes ( bytecode : & mut [ u8 ] , refs : & [ ImmutableRef ] , value : & [ u8 ; 32 ] ) {
2626 for r in refs {
2727 assert ! (
2828 r. start + r. length <= bytecode. len( ) ,
@@ -36,7 +36,7 @@ pub fn patch_bytes(bytecode: &mut [u8], refs: &[ImmutableRef], value: &[u8; 32])
3636}
3737
3838/// Convenience: patch with an ABI-encoded `uint256`.
39- pub fn patch_u256 ( bytecode : & mut [ u8 ] , refs : & [ ImmutableRef ] , val : U256 ) {
39+ pub ( crate ) fn patch_u256 ( bytecode : & mut [ u8 ] , refs : & [ ImmutableRef ] , val : U256 ) {
4040 let word = B256 :: from ( val) ;
4141 patch_bytes ( bytecode, refs, & word. 0 ) ;
4242}
0 commit comments