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

feat(gnodev): add balances & keybase support #1938

Merged
merged 25 commits into from
Apr 25, 2024

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented Apr 16, 2024

Address #1935

This PR brings significant enhancements to gnodev. It adds features like customizing user balances, loading keybases, and specifying realm paths with query-like options. Here are the key changes:

  1. Customized Balances: Users can now set balances, load them from a file, or create temporary users for better fund management.
  2. Keybase Loading: gnodev now loads the user's home Keybase by default, providing premine for listed keys.
  3. Additional Accounts: Introduces the -add-account flag to add accounts easily in the format <account>[=<amount>]. The amount is optional and corresponds to the initial balance the user will have.
  4. Realm Path Options: Users can now load realms with specific creators and deposits using query-like paths: gnodev ./myrealm?creator=foo&deposit=42ugnot

Screenshot 2024-04-17 at 16 39 58

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.

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton self-assigned this Apr 16, 2024
@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Apr 16, 2024
Copy link

codecov bot commented Apr 16, 2024

Codecov Report

Attention: Patch coverage is 75.30864% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 48.23%. Comparing base (b2f12a9) to head (55b863f).
Report is 1 commits behind head on master.

Files Patch % Lines
gno.land/pkg/gnoland/balance.go 70.58% 18 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1938      +/-   ##
==========================================
- Coverage   48.25%   48.23%   -0.02%     
==========================================
  Files         408      409       +1     
  Lines       62338    62349      +11     
==========================================
- Hits        30081    30076       -5     
- Misses      29749    29765      +16     
  Partials     2508     2508              

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

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@leohhhn leohhhn self-requested a review April 16, 2024 16:18
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Apr 17, 2024
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton marked this pull request as ready for review April 17, 2024 14:32
@gfanton gfanton requested review from moul, a team and jaekwon as code owners April 17, 2024 14:32
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.

Reviewed the docs, left some comments. Thanks 🙏

docs/gno-tooling/cli/gnodev.md Outdated Show resolved Hide resolved
docs/gno-tooling/cli/gnodev.md Outdated Show resolved Hide resolved
docs/gno-tooling/cli/gnodev.md Outdated Show resolved Hide resolved
docs/gno-tooling/cli/gnodev.md Outdated Show resolved Hide resolved
docs/gno-tooling/cli/gnodev.md Outdated Show resolved Hide resolved
docs/gno-tooling/cli/gnodev.md Outdated Show resolved Hide resolved
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Looks good 💯

And works even better 👏

Super stoked for this feature, it's the one thing keeping me from switching to gnodev full time (well, also tx predeploying)

contribs/gnodev/cmd/gnodev/accounts.go Outdated Show resolved Hide resolved
contribs/gnodev/cmd/gnodev/accounts.go Outdated Show resolved Hide resolved
contribs/gnodev/cmd/gnodev/main.go Outdated Show resolved Hide resolved
contribs/gnodev/cmd/gnodev/main.go Show resolved Hide resolved
contribs/gnodev/pkg/dev/packages_test.go Show resolved Hide resolved
gno.land/pkg/gnoland/types.go Outdated Show resolved Hide resolved
contribs/gnodev/cmd/gnodev/main.go Outdated Show resolved Hide resolved
contribs/gnodev/cmd/gnodev/main.go Outdated Show resolved Hide resolved
@zivkovicmilos
Copy link
Member

@gfanton the CI is going bananas, please check it when you merge in master

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
contribs/gnodev/cmd/gnodev/accounts.go Outdated Show resolved Hide resolved
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton
Copy link
Member Author

gfanton commented Apr 24, 2024

@zivkovicmilos @leohhhn had to update some parts of the code related to Keybase because I had some misconceptions about how it was working. I've created a new package dedicated to storing address keys along with their names.
It should be good now, but it may need a second pass on it.

@gfanton gfanton merged commit cc207f8 into gnolang:master Apr 25, 2024
190 of 192 checks passed
@gfanton gfanton deleted the feat/gnodev-keybase branch April 25, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related
Projects
Status: No status
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants