Skip to content

Conversation

@Parizval
Copy link
Contributor

@Parizval Parizval commented Dec 4, 2025

Motivation

Issue: #387

Refactoring data type of Value of FunctionCallDefinition and FunctionCallDefinitionStrict to U256.

PR Checklist

  • Added Tests
  • Added Documentation
  • Ran cargo +nightly clippy --workspace --lib --examples --tests --benches --all-features --locked --fix
  • Ran cargo fmt --all
  • Note breaking changes in PR description, if applicable
  • update changelogs
    • Update CHANGELOG.md in each affected crate
    • add a high-level description in the root changelog

@Parizval Parizval requested a review from zeroXbrock as a code owner December 4, 2025 18:55
Copy link
Member

@zeroXbrock zeroXbrock left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, good first pass. I made a mistake in the original spec that requires some changes: FunctionCallDefinition.value actually does need to be Option<String> because the templater relies on strings to support placeholder injection. It's a tiny change on your end, but my mistake -- sorry bout that!

Once the changes I requested are addressed, the code will be ready to support values with units!

@Parizval Parizval requested a review from zeroXbrock December 9, 2025 16:42
@Parizval
Copy link
Contributor Author

@zeroXbrock, Could you provide your feedback on the changes ?

@zeroXbrock
Copy link
Member

@zeroXbrock, Could you provide your feedback on the changes ?

yep, reviewing today! 🫡

@zeroXbrock
Copy link
Member

thanks @Parizval! I realized that I made yet another mistake -- FunctionCallDefinitionStrict is supposed to hold String values -- its only guarantee is that it has a definite from field (where FunctionCallDefinition does not), but otherwise the strings it holds are to be evaluated by the Templater. Sorry for the confusion! Anyhow, I just went ahead and fixed it up. Everything works great -- thanks again for contributing!

@zeroXbrock zeroXbrock changed the title refactor: updated data type of Value of FunctionCallDefinition to U256 parse values with units in FunctionCallDefinition Dec 18, 2025
@zeroXbrock zeroXbrock merged commit 3a7830b into flashbots:main Dec 18, 2025
7 checks passed
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