Skip to content

Commit

Permalink
add contract length columns
Browse files Browse the repository at this point in the history
  • Loading branch information
sslivkoff committed Jan 11, 2024
1 parent da6ce5e commit e867a91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/freeze/src/datasets/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pub struct Contracts {
init_code: Vec<Vec<u8>>,
code: Vec<Vec<u8>>,
init_code_hash: Vec<Vec<u8>>,
n_init_code_bytes: Vec<u32>,
n_code_bytes: Vec<u32>,
code_hash: Vec<Vec<u8>>,
chain_id: Vec<u64>,
}
Expand Down Expand Up @@ -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(())
Expand Down

0 comments on commit e867a91

Please sign in to comment.