-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
human readable operations #33
Comments
There are a few challenges with this issue. The ABIs need to registered somewhere. I am assuming "I would like to interpret the operations without reading the ABI" means the client does not need to read the ABI. This makes some sense for The ABI could be registered behind the JSON RPC microservice and used to translate the requests/responses. This is an interesting feature for an API endpoint to implement. The idea does not work, however, once a transaction needs to be signed as the JSON does not always have the required type information needed to serialize the object correctly. A parser could probably be written that gets the general case working, but the only way to ensure it works 100% of the time is to read from the ABI to operate on the Protobuf types directly. I don't think this is that unreasonable as it is exactly what Web3 does to interact with contracts "natively" in javascript. Providing those facilities will be a core component of good client libraries. |
I've done more research on this topic. We could have a similar contract in koinos to register all ABIs. As you said, the ABI could be registered in the JSON RPC microservice. So, each dev should make sure to register the ABI in the different nodes. Another option is to store the ABI in each smart contract, for instance, by calling the entry point 0. |
The website that triggers the request for signing can provide the ABI as well, but there is a risk of fraud if we consider that the websites cannot be trusted (this is the simplest solution at the moment though). |
Related to koinos/koinos-cli#77 |
This issue is stale because it has been open for 30 days with no activity. |
As a front-end developer, I would like to interpret the operations without reading the ABI (for block explorer and extensions for browsers).
In the current implementation, an operation to transfer tokens looks like this:
It would be good to have:
In this sense, it would be easy to present this information to the user (for instance, a request for signing a transaction using an extension in the browser) without having to get the ABI of each smart contract.
The text was updated successfully, but these errors were encountered: