Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/freeze/src/datasets/erc20_transfers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl CollectByTransaction for Erc20Transfers {
fn is_erc20_transfer(log: &Log) -> bool {
log.topics().len() == 3 &&
log.data().data.len() == 32 &&
log.topics()[0] == ERC20::Approval::SIGNATURE_HASH
log.topics()[0] == ERC20::Transfer::SIGNATURE_HASH
}

/// process block into columns
Expand Down
5 changes: 5 additions & 0 deletions crates/freeze/src/types/chunks/number_chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ impl NumberChunk {

/// align boundaries of chunk to clean boundaries
pub fn align(self, chunk_size: u64) -> Option<NumberChunk> {
if chunk_size == 0 {
// Cannot align with a chunk_size of 0, return None or self based on desired behavior.
// Returning None seems appropriate as alignment isn't possible.
return None;
}
match self {
NumberChunk::Numbers(numbers) => Some(NumberChunk::Numbers(numbers)),
NumberChunk::Range(start, end) => {
Expand Down