diff --git a/crates/freeze/src/datasets/contracts.rs b/crates/freeze/src/datasets/contracts.rs index 4ea8a26a..9c682dca 100644 --- a/crates/freeze/src/datasets/contracts.rs +++ b/crates/freeze/src/datasets/contracts.rs @@ -19,6 +19,8 @@ pub struct Contracts { init_code: Vec>, code: Vec>, init_code_hash: Vec>, + n_init_code_bytes: Vec, + n_code_bytes: Vec, code_hash: Vec>, chain_id: Vec, } @@ -93,8 +95,10 @@ pub(crate) fn process_contracts( store!(schema, columns, factory, create.from.as_bytes().into()); store!(schema, columns, init_code, create.init.to_vec()); store!(schema, columns, code, result.code.to_vec()); - store!(schema, columns, code_hash, keccak256(create.init.clone()).into()); store!(schema, columns, init_code_hash, keccak256(result.code.clone()).into()); + store!(schema, columns, code_hash, keccak256(create.init.clone()).into()); + store!(schema, columns, n_init_code_bytes, create.init.len() as u32); + store!(schema, columns, n_code_bytes, result.code.len() as u32); } } Ok(())