Skip to content

Conversation

@rezzmah
Copy link
Owner

@rezzmah rezzmah commented Jan 23, 2026

Summary

Refactors ConfigureEvm to enforce that EVM limits are always applied, eliminating the risk of SDK users forgetting to call .with_limits() in their custom implementations.

Problem: Previously, implementors of ConfigureEvm had to manually call .with_limits() in both evm_env() and next_evm_env(). This made it easy to forget to apply limits.

Solution: Introduces a template method pattern:

  • Adds evm_env_without_limits() and next_evm_env_without_limits() as required methods that return the base environment
  • evm_env() and next_evm_env() now have default implementations that automatically apply limits
  • Adds evm_limit_params_at_timestamp() as a required method to provide limits
  • Introduces NextBlockTimestamp trait to enable accessing timestamp from NextBlockEnvCtx

NOTE: This impl is missing equivalent for ConfigureEngineEvm

@rezzmah rezzmah changed the title refactor: enforced with_limits refactor: enforced with_limits demo Jan 23, 2026
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.

2 participants