gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
839 stars 342 forks source link

feat: add the ability to add packages to genesis transactions #2327

Closed zivkovicmilos closed 2 weeks ago

zivkovicmilos commented 2 weeks ago

Description

This PR introduces the ability to specify a package directory that will recursively be added (deployed) to the genesis.json, utilizing the existing gnoland genesis txs add command.

It also separates out the logic from gnoland genesis txs add into:

sample

Related:

Contributors' checklist... - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
zivkovicmilos commented 2 weeks ago

@r3v4s @adr-sk We should probably incorporate this logic into the validator docs, as the initial examples folder should be preloaded 🙏

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 82.10526% with 17 lines in your changes missing coverage. Please review.

Project coverage is 54.62%. Comparing base (5541e35) to head (fb25fc1).

Files Patch % Lines
gno.land/cmd/gnoland/genesis_txs_add_packages.go 81.81% 3 Missing and 3 partials :warning:
gno.land/cmd/gnoland/genesis_txs_add_sheet.go 84.21% 3 Missing and 3 partials :warning:
gno.land/cmd/gnoland/genesis_txs.go 81.81% 1 Missing and 1 partial :warning:
gno.land/pkg/gnoland/genesis.go 0.00% 2 Missing :warning:
gno.land/pkg/integration/testing_node.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2327 +/- ## ========================================== + Coverage 54.60% 54.62% +0.01% ========================================== Files 579 581 +2 Lines 77899 77952 +53 ========================================== + Hits 42539 42582 +43 - Misses 32191 32196 +5 - Partials 3169 3174 +5 ``` | [Flag](https://app.codecov.io/gh/gnolang/gno/pull/2327/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | Coverage Δ | | |---|---|---| | [gno.land](https://app.codecov.io/gh/gnolang/gno/pull/2327/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `61.89% <82.10%> (+0.24%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.