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(examples): grc20 refactor #2983

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

moul
Copy link
Member

@moul moul commented Oct 19, 2024

This PR extracts the grc20 refactor from #2551, which is a meta PR containing several contract improvements and additions that depend on new Gnovm features that haven't been merged yet.

Please review this grc20 refactor with a focus on its API. Several valuable comments can be found in #2551. Additionally, you can discover new contracts using grc20 in #2551, such as minidex, atomicswap, grc20reg, test20, and vault.

Addresses #1832

@moul moul self-assigned this Oct 19, 2024
@moul moul mentioned this pull request Oct 19, 2024
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Oct 19, 2024
Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.36%. Comparing base (850182c) to head (2f83308).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2983      +/-   ##
==========================================
+ Coverage   63.11%   63.36%   +0.24%     
==========================================
  Files         548      548              
  Lines       78509    78878     +369     
==========================================
+ Hits        49550    49979     +429     
+ Misses      25612    25534      -78     
- Partials     3347     3365      +18     
Flag Coverage Δ
contribs/gnodev 59.94% <ø> (ø)
contribs/gnofaucet 14.82% <ø> (ø)
gno.land 67.18% <ø> (+3.35%) ⬆️
gnovm 67.88% <ø> (+<0.01%) ⬆️
tm2 62.38% <ø> (ø)

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.

Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
@moul moul marked this pull request as ready for review October 19, 2024 01:32
@moul moul requested review from a team as code owners October 19, 2024 01:32
@moul moul requested review from jaekwon and gfanton and removed request for a team October 19, 2024 01:32
@leohhhn
Copy link
Contributor

leohhhn commented Oct 19, 2024

cc @MikaelVallenet @n0izn0iz, any thoughts?

@MikaelVallenet
Copy link
Contributor

cc @MikaelVallenet @n0izn0iz, any thoughts?

looks good to me, i like the teller pattern & add metadata in token level instead of ledger/bank
i'm just thinking if it should take another pkg as an extension of primitive grc20 pkg

Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

Still mostly naming considerations.

examples/gno.land/p/demo/grc/grc20/tellers.gno Outdated Show resolved Hide resolved
examples/gno.land/p/demo/grc/grc20/tellers.gno Outdated Show resolved Hide resolved
examples/gno.land/p/demo/grc/grc20/tellers.gno Outdated Show resolved Hide resolved
examples/gno.land/p/demo/grc/grc20/types.gno Outdated Show resolved Hide resolved
examples/gno.land/p/demo/grc/grc20/types.gno Outdated Show resolved Hide resolved
examples/gno.land/p/demo/grc/grc20/types.gno Outdated Show resolved Hide resolved
examples/gno.land/p/demo/grc/grc20/token.gno Outdated Show resolved Hide resolved
@Kouteki Kouteki added this to the 🚀 Mainnet launch milestone Oct 29, 2024
@Kouteki Kouteki removed the request for review from a team October 29, 2024 16:16
@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Oct 29, 2024
@moul
Copy link
Member Author

moul commented Oct 29, 2024

Merged #3046 over this one to make the CI green.

Depends on #3046.

Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

Overall implementation and naming LGTM.

examples/gno.land/p/demo/grc/grc20/tellers.gno Outdated Show resolved Hide resolved
examples/gno.land/p/demo/grc/grc20/tellers.gno Outdated Show resolved Hide resolved
examples/gno.land/r/demo/bar20/bar20.gno Outdated Show resolved Hide resolved
examples/gno.land/p/demo/grc/grc20/types.gno Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should have an issue to move the entirety of grc20 to use math/overflow, maybe after #2905.

Copy link
Contributor

@n0izn0iz n0izn0iz left a comment

Choose a reason for hiding this comment

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

@moul
Copy link
Member Author

moul commented Oct 31, 2024

@leohhhn do you want to update the doc in this PR or in your big refactor?

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 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: In Progress
Status: 🎯 Current Topics
Status: In Review
Development

Successfully merging this pull request may close these issues.

6 participants