apps
apps copied to clipboard
Make use of the `contracts_instantiate` RPC
We should make use of the somewhat recently added contracts_instantiate
( https://github.com/paritytech/substrate/pull/8451 ) RPC in order to help users picking an endowment
and gas_limit
values when instantiating a new contract. Any error returned (or the revert
flag) should be displayed to the user.
I'm just copy/pasting this over from https://github.com/polkadot-js/apps/issues/5629 in favor of closing that issue.
A thing to keep in mind when making use of the contracts_instantiate
RPC is to execute a dry-run RPC of the contract constructor before deployment of contract:
In paritytech/ink#821 we found that debug messages which are printed in contract constructors do not appear on the console. Debug messages in functions of an instantiated contract appear though. This is because
Debugging is not enabled during on-chain execution. Only during RPC calls.
In order to support debug messages in constructors the UI should execute a RPC dry-run of the constructor before deployment of a contract.
@jacogr We're currently planning the roadmap for Canvas and just want to bring up that this issue is still important for us :-).
@statictype FYI, this is one of the issues we talked about earlier today
I am acutely aware of it, but have only X hours in a day despite best efforts.
Whenever you have time, don't worry about it!