Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
setDefaults
has a lot of logic handling blobs that are passed in the args, and that will become broken if we just change thisThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could just call
setBlobTxSidecar
in CallDefaults. But I'd say it's OK not to support them here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But
setDefaults
will set the fee defaults on the latest block.And regardless of what order we invoke it, it will use the latest header, and do
SO it will apply cancun checks according to
tip
, regardless of what the given block is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about something like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic there is to fill in blob proofs and commitments if they were not provided. Those matter only when submitting a tx. Since for a simulation all that can be accessed via evm is blob hashes (which still can be passed in via TransactionArgs).
All in all I think I agree with @jwasinger that CallDefaults is a better validation function to use here. All the methods that involve signing and submitting a tx use
setDefaults
while all the "simulation" methods use CallDefaults.