scale-it/algo-builder

Improve runtime debug output for contract-to-contract calls

MetaB0y opened this issue · 0 comments

Is your feature request related to a problem? Please describe.

I am working on an app which features contract-to-contract calls. I have contract A and contract B. B calls A using inner transactions. When I am executing it with Algobuilder runtime debugger (runtime.executeTx(myTxs, 2)), it runs fine but after A calls B, it continues to output as if nothing happened.

An example:

stack(depth = 2) for opcode ITxnField at line 619:
stack(depth = 2) for opcode Retsub at line 620:
stack(depth = 2) for opcode Pragma at line 1:
stack(depth = 2) for opcode Txn at line 2:

Here, the first two lines belong to contract A, but the last two lines belong to contract B.

Describe the solution you'd like

I would like the debugger to output something ---CALLING CONTRACT A--- and ---BACK TO CONTRACT B--- between the switches as the minimum.

Some possible improvements/options could be writing the name of the running contract on each line and using indentation to show call depth.