Abstract
This proposal is about an ability to make dApp invocations by transaction id (txId) of latest account script of dApp.
For this purpose, the following improvements are needed:
- Add the ability to call dApp by a txId (in addition to Address|Alias).
- Resolve dApp account by this txId.
- Check that a currently active script of the account was set by this txId.
- Return an error if the current script of the account was set by different txId.
- Do regular Invoke Script Transaction stuff.
Motivation and purposes
Currently, dApp users must trust dApp developers if dApp`s account script allows changes.
The new functionality guarantees dApp users that they call the exact account script as was audited. And if a script changes users will get an error and can audit code and update their invocation procedures.
Example:
Before WEP 13:
- user calls dApp as address + function + payment
- dApp script changes
- invocations still work
- user code was not ready for new changes
- user loses tokens
After WEP 13:
- user calls dApp as txId + function + payment
- dApp script changes
- invocations fail
- user can audit and adopt
- user saves tokens and earn more