[go: up one dir, main page]

EVM: refactor xtz native withdrawals

What

This MR refactors the way native (xtz) withdrawals are handled in the EVM kernel.

Why

These changes are required for FA withdrawals to be added in further FA Bridge MRs.

How

  • The Withdrawal struct used to store withdrawals in the ExecutionOutcome, PrecompileOutcome and TransactionLayerData changed to match OutboxMessage<Expr: Michelson>, so it is possible to store both FA Withdrawals and Native withdrawals in the same data structures
  • RouterInterface type added which reflects both Native and FA Ticketers Michelson entrypoint
  • The logic of the withdrawal_precompile includes all steps required to prepare OutboxMessage which was initially implemented in the post_withdrawals fn within apply_transaction logic
  • Removed the ticketer value, which propagated to handle_transaction_result
  • Added test to the kernel which checks that native (xtz) withdrawal applied and expected OutboxMessage created.

Manually testing the MR

Run make test

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Stepan Naumov

Merge request reports

Loading