Skip to content

feat(anvil): add Tempo genesis and basic behavior tests#14112

Merged
zerosnacks merged 2 commits intofoundry-rs:masterfrom
stevencartavia:tempo-tests-genesis
Apr 3, 2026
Merged

feat(anvil): add Tempo genesis and basic behavior tests#14112
zerosnacks merged 2 commits intofoundry-rs:masterfrom
stevencartavia:tempo-tests-genesis

Conversation

@stevencartavia
Copy link
Copy Markdown
Collaborator

Add initial Tempo test suite for anvil --tempo mode.

Ported:

  • test_tempo_precompiles_have_code — precompiles and tokens have code at genesis
  • test_tip20_token_metadata — name, symbol, decimals for all 4 fee tokens
  • test_fee_token_balances_minted_to_dev_accounts — dev accounts have token balances
  • test_dev_accounts_have_balance — dev accounts have genesis balance
  • test_native_value_transfer_rejected — value > 0 rejected with error
  • test_nonce_increments — nonce updates after TIP20 transfer

New:

  • test_zero_value_tx_succeeds — zero-value EIP-1559 tx mines successfully
  • test_contract_deployment — contract creation works with value=0

Comment thread crates/anvil/tests/it/tempo.rs Outdated
Comment on lines +52 to +62
// Tempo precompiles should have sentinel bytecode (0xef)
let precompiles: &[Address] = &[
NONCE_PRECOMPILE_ADDRESS,
STABLECOIN_DEX_ADDRESS,
TIP20_FACTORY_ADDRESS,
TIP403_REGISTRY_ADDRESS,
TIP_FEE_MANAGER_ADDRESS,
VALIDATOR_CONFIG_ADDRESS,
VALIDATOR_CONFIG_V2_ADDRESS,
ACCOUNT_KEYCHAIN_ADDRESS,
];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Preferred to maintain this as a single list outside of the test suite so implementation and test suite cannot diverge

zerosnacks
zerosnacks previously approved these changes Apr 3, 2026
@zerosnacks zerosnacks merged commit cb91394 into foundry-rs:master Apr 3, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Foundry Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants