[General] How can I run a sequence of transactions one by one using the sandbox vm in api server? #524
-
EnvironmentMainnet Provide a brief description of the functionality you're trying to implement and the issue you are running into.I want to modify eth_call method to call a sequence of transactions, using the sandbox vm I can only get the first transaction's result return data, I found that after cycle function the stop reason is VmFinished. And in result tracer, the pointer to dump memory is always the same. So does it mean we can't simulate multi transactions using this vm? Repo Link (Optional)No response Additional DetailsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Which sandbox vm are you referring to? |
Beta Was this translation helpful? Give feedback.
-
Hey! Our eth_call is written in a way that it uses a specially written bootloader (since eth_call should not require validation of txs). This function is invoked when you use eth_call: https://github.com/matter-labs/era-contracts/blob/452a54f6724347b7e517be1a3d948299ab827d8c/system-contracts/bootloader/bootloader.yul#L1967. Note, that it completely halts the execution of the bootloader once the tx is processed: https://github.com/matter-labs/era-contracts/blob/452a54f6724347b7e517be1a3d948299ab827d8c/system-contracts/bootloader/bootloader.yul#L2032, i.e. there can not be multiple eth_calls in such model, yes. I would suggest to either use standard multicall which is a standard trick to do multiple calls within one. If you really want to have multiple |
Beta Was this translation helpful? Give feedback.
Hey! Our eth_call is written in a way that it uses a specially written bootloader (since eth_call should not require validation of txs). This function is invoked when you use eth_call: https://github.com/matter-labs/era-contracts/blob/452a54f6724347b7e517be1a3d948299ab827d8c/system-contracts/bootloader/bootloader.yul#L1967.
Note, that it completely halts the execution of the bootloader once the tx is processed: https://github.com/matter-labs/era-contracts/blob/452a54f6724347b7e517be1a3d948299ab827d8c/system-contracts/bootloader/bootloader.yul#L2032, i.e. there can not be multiple eth_calls in such model, yes.
I would suggest to either use standard multicall which is a standard trick to do…