apps icon indicating copy to clipboard operation
apps copied to clipboard

Make use of the `contracts_instantiate` RPC

Open athei opened this issue 3 years ago • 5 comments

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.

athei avatar May 21 '21 10:05 athei

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.

cmichi avatar Jun 20 '21 13:06 cmichi

@jacogr We're currently planning the roadmap for Canvas and just want to bring up that this issue is still important for us :-).

cmichi avatar Oct 31 '21 18:10 cmichi

@statictype FYI, this is one of the issues we talked about earlier today

HCastano avatar Oct 31 '21 18:10 HCastano

I am acutely aware of it, but have only X hours in a day despite best efforts.

jacogr avatar Oct 31 '21 18:10 jacogr

Whenever you have time, don't worry about it!

HCastano avatar Nov 01 '21 18:11 HCastano