Skip to content
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

docs: Add Realm ABI Specification #2833

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

docs: Add Realm ABI Specification #2833

wants to merge 3 commits into from

Conversation

mvertes
Copy link
Contributor

@mvertes mvertes commented Sep 23, 2024

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 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.

Contributors' checklist...
  • [*] Added new tests, or not needed, or not feasible
  • [*] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • [*] Updated the official documentation or not needed
  • [*] No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • [*] Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

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.
@mvertes mvertes added the 📖 documentation Improvements or additions to documentation label Sep 23, 2024
@mvertes mvertes requested a review from moul as a code owner September 23, 2024 08:50
@mvertes mvertes marked this pull request as draft September 23, 2024 08:50
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.85%. Comparing base (9897b66) to head (839b6f4).
Report is 43 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2833      +/-   ##
==========================================
- Coverage   60.87%   60.85%   -0.02%     
==========================================
  Files         563      563              
  Lines       75193    75193              
==========================================
- Hits        45770    45759      -11     
- Misses      26055    26066      +11     
  Partials     3368     3368              
Flag Coverage Δ
contribs/gnodev 61.46% <ø> (ø)
contribs/gnofaucet 14.46% <ø> (-0.86%) ⬇️
gno.land 67.17% <ø> (ø)
gnovm 65.63% <ø> (ø)
misc/genstd 80.54% <ø> (ø)
misc/logos 19.88% <ø> (-0.36%) ⬇️
tm2 62.08% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leohhhn leohhhn changed the title [docs] Add Realm ABI Specification docs: Add Realm ABI Specification Sep 23, 2024
Copy link
Contributor

@leohhhn leohhhn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is in draft, but still left a few comments


# GNO Realm ABI specification

The GNO Realm Application Binary Interface (ABI) specifies the interface between realms (GNO smart contracts) and clients interacting with the realms.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GNO > Gno, generally

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks.


Realms implement live programs on the blockchain, also called smart contracts.

Each realm exists as a package, identified by its URL, and containing the realm source files. A realm has the following properties:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Each realm exists as a package, identified by its URL, and containing the realm source files. A realm has the following properties:
Each realm exists as a package, identified by its package path, and containing the package source files. A realm has the following properties:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Comment on lines +95 to +98
| Send | repeated [Coin](#coin) | amount to pay | 2 |
| PkgPath | string | package path of the function to call | 3 |
| Func | string | function name | 4 |
| Args | repeated string | function arguments | 5 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's important to make a distinction in that Send can take in a single string of multiple coins, like "1ugnot,3leon,5marc", while Args is a slice of strings instead of a single one.

@thehowl thehowl mentioned this pull request Oct 2, 2024
@Kouteki Kouteki added the in focus Core team is prioritizing this work label Oct 18, 2024
@zivkovicmilos zivkovicmilos added this to the 🚀 Mainnet launch milestone Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 documentation Improvements or additions to documentation in focus Core team is prioritizing this work
Projects
Status: No status
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants