warp
warp copied to clipboard
docs: internal writes documentation
Contract C_TX_2
makes an internal write on contract C_TX_1
at interaction I(n).
- Evaluator loads the state of the
C_TX_1
up to internal write interaction I(n) - I(n) is an internal write interaction. Thanks to tag data saved in the interaction, the evaluator
knows that
C_TX_2
is making write onC_TX_1
. Evaluator saves theC_TX_1
state at I(n-1) interaction in cache. - Evaluator loads the
C_TX_2
contract and evaluates its state up to I(n) interaction. - I(n) interaction for
C_TX_2
is making aSmartWeave.contracts.write
call onC_TX_1
with certainInput
. - In order to perform the write, evaluator loads the
C_TX_1
contract state at I(n-1) transaction from cache - Evaluator applies the input from the
SmartWeave.contracts.write
on theC_TX_1
as a 'dry-run' call - Evaluator stores the result of the 'dry-run' in cache.
- Evaluator returns with the evaluation to the
C_TX_1
contract. If first loads the state stored in point 7. and then continues to evaluate next interactions.