Mx - Endpoints - Rust + Mx
Closed this issue · 0 comments
virgil-serbanuta commented
Needed for #35
- Preprocess contracts to index endpoints
- Contract call - push Rust state (including most of the K cell)
- Contract call - push Mx state (needed for rollbacks on errors)
- Contract call - clear Rust state
- Contract call - load Rust state for the new contract
- Setup Mx state (transfers, caller/callee, and so on)
- Transform contract calls into function calls
- Call the endpoint method
- Pop + restore the Rust state with the endpoint return value / error
- Pop and either drop or restore (on error) the Mx state.