Skip to content

Conversation

@filip-parity
Copy link

Fix fund_pranked_accounts overwriting dealt account balances.
Track accounts explicitly funded via vm.deal() and skip auto-funding them in fund_pranked_accounts. Previously, pranking an account that had spent its balance to zero would incorrectly set it to u128::MAX, breaking balance assertions in tests.

pub eth_deals: Vec<DealRecord>,

/// Addresses that have been explicitly funded via `vm.deal()`.
pub dealt_accounts: HashSet<Address>,
Copy link

Choose a reason for hiding this comment

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

it already exists inside eth_deals

}

/// Funds pranked fuzz addresses with u128::MAX so they can make calls in pallet-revive.
/// Skips accounts that were explicitly dealt to via vm.deal() to preserve balance assertions.
Copy link

@pkhry pkhry Jan 18, 2026

Choose a reason for hiding this comment

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

what happens if account is nonexistant in pallet-revive and needs a balance/nonce sync? e.g. created from within a self call within a test contract

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.

3 participants