Refactor: Tx process and Validation #8
+338
−81
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.
This PR introduces several improvements and refactorings to the alternative fee (alt fee) mechanism, focusing on token-based gas payments.
Key changes include:
reimburse_callerlogic in the EVM handler has been updated to correctly handle fee reimbursement forAltFeeTxtransactions. A newreimburse_caller_token_feefunction calculates the appropriate token amount to return to the caller.transfer_erc20_with_evmfunction has been added to facilitate ERC20 token transfers during the fee payment process, using a dedicated EVM call. This provides a more robust way to handle token transfers.validate_and_deduct_token_feefunction now includes a check to prevent the use of token ID 0 for gas payments.MorphTxEnvnow correctly extracts thefee_limitfromAltFeeTxtransactions.authorization_listfield for EIP-7702 transactions.These changes enhance the reliability and functionality of the alt fee system.