Skip to content
Open
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
4 changes: 3 additions & 1 deletion contracts/src/Multicall3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ contract Multicall3 {
)
{
blockNumber = block.number;
blockHash = blockhash(block.number);
// blockhash(block.number) always returns 0, so use blockhash(block.number - 1) for a valid previous block hash.
// Note: block.number is always > 0 except for genesis block, so this is safe in normal usage.
blockHash = blockhash(block.number - 1);
returnData = tryAggregate(requireSuccess, calls);
}

Expand Down