You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Leap transaction run on Plasma, a virtual state environment is created from the inputs of the transaction:
For each fungible input an ERC20 mock is created and a balance minted.
For each non-fungible input an ERC721 mock is created and a token minted.
A mock for the Plasma bridge is created and the last 100 periods with data are added.
During the execution of a spending condition the CALL and STATICCALL OP-codes are intercepted.
If the destination of the OP-codes is any other address than the described mocks, the transaction fails.
If the destination is one of the mocks, selected functions are executed.
To create a virtual state environment for Plasma transaction in the EVM enforcer, CALL and STATICCALL OP-codes need to be intercepted in a similar way.
for transfer() on a token contract a LOG event should be emitted.
for balanceOf() on a token contract the input's balance should be returned.
for getPeriod() on the bridge the call should be forwarded to the actual bridge contract.
The text was updated successfully, but these errors were encountered:
johannbarbie
changed the title
Enable Contract mocks for CALL OP-codes in solEVM
Enable contract mocks for CALL OP-codes in solEVM
Nov 2, 2018
When Leap transaction run on Plasma, a virtual state environment is created from the inputs of the transaction:
During the execution of a spending condition the CALL and STATICCALL OP-codes are intercepted.
To create a virtual state environment for Plasma transaction in the EVM enforcer, CALL and STATICCALL OP-codes need to be intercepted in a similar way.
transfer()
on a token contract a LOG event should be emitted.balanceOf()
on a token contract the input's balance should be returned.getPeriod()
on the bridge the call should be forwarded to the actual bridge contract.The text was updated successfully, but these errors were encountered: