-
Notifications
You must be signed in to change notification settings - Fork 375
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
[chain] ABI-like support for Realm / Package requests / responses #1842
Comments
Are we not doing this in #1776? |
I mean, ok, this issue is about making a spec for it, but I'm still surprised to see that it wasn't even mentioned as an effort Having good cross-references to other issues is one of the few good things about our issue tracker, let's try to keep it that way :) |
@jeronimoalbi @salmad3 pinging just for visibility. Could be a related effort to |
not sure where to put this: re: encoding structs in transaction result solidity supports returning structs via ABIEncoderV2 |
The Realm ABI Specification formally describes the protocol and encoding of interactions between realms and external clients, independently of their language. It can be seen as an extension of the [ABCI](https://github.com/tendermint/tendermint/tree/master/spec/abci) which covers the protocol between blockchain nodes and clients, but without details on blockchain practical applications, such as realms. This PR addresses [gnolang#1842]. This is an initial draft commit, work in progress.
The Realm ABI Specification formally describes the protocol and encoding of interactions between realms and external clients, not necessarily written in Go. It can be seen as an extension of the [ABCI](https://github.com/tendermint/tendermint/tree/master/spec/abci) which covers the protocol between blockchain nodes and clients, but without details on their practical applications, such as realms. This PR addresses [#1842]. This is an initial draft commit, work in progress.
Description
This effort covers the introduction of an ABI-like standard for Gno Realm / Packages.
Copied from an issue on the Gno repo:
Gno.land Realms expose public methods that can be queried off-chain by client applications. The problem lies in the fact that the responses of specific public methods can be different from primitive types in Golang, for example a struct or a type alias.
In this case, the response the clients will receive will contain the raw value and the type of response (ex my response MyComplexType), leaving the clients to do custom parsing on their own.
There is also the parallel problem of constructing method calls. Clients need to know upfront what kind of data needs to be packaged as the arguments of a public Realm method.
Ethereum Solidity Smart Contracts provide a contract ABI (essentially a JSON specification), which the clients can utilize to understand how to call Smart Contract methods, and what kinds of responses to expect.
Successful outcome of this effort:
The text was updated successfully, but these errors were encountered: