Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Contracts: Return emitted events for dry-runs #12412

Closed
cmichi opened this issue Oct 4, 2022 · 3 comments · Fixed by #13807
Closed

Contracts: Return emitted events for dry-runs #12412

cmichi opened this issue Oct 4, 2022 · 3 comments · Fixed by #13807
Assignees
Labels
J0-enhancement An additional feature request. Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.

Comments

@cmichi
Copy link
Contributor

cmichi commented Oct 4, 2022

Contract dry-runs should return the events that would be emitted.

This will e.g. enable user interfaces to indicate better what the consequence of signing and submitting a particular transaction is.

A current UX movement for blockchains is to counter the "blind sign and submit" behavior ("yolo sign and submit"). We should provide better means to assess the effect of a transaction before submitting; returning the events that would be emitted would be a major step towards that.

@kianenigma
Copy link
Contributor

Would be good if the system_dryRun does the same.

@athei athei added the J0-enhancement An additional feature request. label Oct 4, 2022
@xlc
Copy link
Contributor

xlc commented Oct 4, 2022

Yeah we should just improve system_dryRun paritytech/polkadot-sdk#341

@athei
Copy link
Member

athei commented Mar 19, 2023

Please note we can't just use system_dryRun for dry running contracts. We need to return dispatchable specific data from the dry run. As long as dispatchables can't return data we need out custom dry run runtime API.

@athei athei added the Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. label Mar 19, 2023
@juangirini juangirini linked a pull request Apr 3, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request. Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants