concordium-node-sdk-js icon indicating copy to clipboard operation
concordium-node-sdk-js copied to clipboard

`Simulate` transaction feature similar to `invokeContract` for all types of transactions

Open DOBEN opened this issue 2 years ago • 1 comments

Task description It would be good to have a simulate transaction/feature in the webSDK, so a front-end can first call to simulate a specific transaction to see if it would revert (e.g. because insufficient funds in the wallet or because of a contract revert) and only if the simulation was successful, allow the user the execution of the real transaction on the front end. It would be similar to the invokeContract call (which can simulate Transaction.Update transactions). This request is to expand the simulation to any type of transaction e.g. deploy/initilize transactions as well.

Add label for component and priority.

DOBEN avatar Jun 23 '23 11:06 DOBEN

This would need node support to implement properly.

We would add an API call like invoke_instance we have now that would try to make a block with a (list of) transactions, and report on the results.

abizjak avatar Jun 23 '23 11:06 abizjak