canvas-ui
canvas-ui copied to clipboard
Add console for debug output of smart contract executions
The new and upcoming seal_debug_print
call no longer directly prints the debug output to the Substrate console.
Instead it is stored into a buffer which can be retrieved by a dedicated RPC call.
Therefore it will become important for UI tools such as Canvas UI to properly show the debug output after each smart contract execution or chain of smart contract execution in some "console" style output for inspection.
I think for an MVP it is totally fine to style this in the way a console would look to most developers since that is what they probably expect from this output. It may not yet be possible but a future upgrade and extension to this console output is to also include the addresses of the contracts and the call chains i.e. backtrace of all the calls starting from a smart contract invocation from the user.
cc @cmichi , @athei
Please note that this buffer can still be printed to the console: https://github.com/paritytech/substrate/tree/master/frame/contracts#debugging