TezosX/PoC: Add precompile gateway to transfer money to implicit addresses linked to account on another runtime
Closes L2-602
Checklist
- Provide automatic testing.
What
Add a new precompile "runtime gateway" that have a function transfer for now (could have multiple in the future). This transfer function transfer money from an origin account to an implicit account linked to an origin on another runtime.
Why
We prevent normal natives transfer to implicit addresses and so people needs to use this precompile to credit the correct balance.
How
- Copy/Paste the rest of the
tezosx.rsfile to his own crate to be able to use it through the whole code (only change is the error type, we now have a crate specific one instead of usingrevm_etherlinkone. - Create a new precompile for gateway transfer
Manually testing the MR
New test in revm/lib.rs
Edited by Aurélien Foucault