Skip to content

Conversation

@smiasojed
Copy link
Collaborator

@smiasojed smiasojed commented Jan 21, 2026

When an overflow happens on the block timestamp, block number, or balance while using cheatcodes, a warning is triggered and the value is rounded to the maximum possible value. For CALL and CREATE opcodes with an excessively high balance, a revert is triggered.

@smiasojed smiasojed marked this pull request as ready for review January 21, 2026 13:49

let u128_max: U256 = U256::from(u128::MAX);
let clamped_amount = if amount > u128_max {
tracing::info!(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it's info and in state it's warn. Shouldn't this be consistent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue was that it flooded the terminal. The migration runs during each test for 15 accounts which are funded with u256::max, so I decided to decrease the log level.

@smiasojed smiasojed merged commit a03e347 into master Jan 23, 2026
69 of 79 checks passed
@smiasojed smiasojed deleted the sm/overflow branch January 23, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants