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): refactor grc20 #2529

Merged
merged 21 commits into from
Jul 7, 2024
Merged

Conversation

moul
Copy link
Member

@moul moul commented Jul 7, 2024

Main changes:

  • rename AdminToken -> Banker
  • rename GRC20 -> Token
  • remove unused helpers
  • remove vault (temporarily, will be reimplemented)
  • remove the returner ˋerror` when unnecessary
  • use std.Emit
  • use uassert for testing
  • better file naming and organization for improved readability

Fixes #2294
Replaces #2314 (h/t @leohhhn)
Depends on #2534
BREAKING CHANGE

moul added 7 commits July 6, 2024 14:55
BREAKING CHANGE

Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
@moul moul self-assigned this Jul 7, 2024
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Jul 7, 2024
@moul moul changed the title dev/moul/refactor grc20 feat(examples): refactor grc20 Jul 7, 2024
Signed-off-by: moul <94029+moul@users.noreply.github.com>
This was referenced Jul 7, 2024
@moul moul marked this pull request as ready for review July 7, 2024 01:10
@moul moul requested review from a team as code owners July 7, 2024 01:10
@moul moul requested review from gfanton, petar-dambovaliev, leohhhn and r3v4s and removed request for a team July 7, 2024 01:10
@r3v4s
Copy link
Contributor

r3v4s commented Jul 7, 2024

Seems like docs needs to be changed too.
https://docs.gno.land/how-to-guides/creating-grc20

Copy link

codecov bot commented Jul 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.91%. Comparing base (b5560e2) to head (15f13ef).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2529      +/-   ##
==========================================
- Coverage   54.92%   54.91%   -0.01%     
==========================================
  Files         594      594              
  Lines       79297    79297              
==========================================
- Hits        43550    43546       -4     
- Misses      32456    32459       +3     
- Partials     3291     3292       +1     
Flag Coverage Δ
contribs/gnodev 23.53% <ø> (ø)
contribs/gnofaucet 14.46% <ø> (ø)
contribs/gnokeykc 0.00% <ø> (ø)
contribs/gnomd 0.00% <ø> (ø)
gnovm 60.21% <ø> (ø)
misc/autocounterd 0.00% <ø> (ø)
misc/genproto 0.00% <ø> (ø)
misc/genstd 80.54% <ø> (ø)
misc/goscan 0.00% <ø> (ø)
misc/logos 17.38% <ø> (ø)
misc/loop 0.00% <ø> (ø)
tm2 54.43% <ø> (-0.03%) ⬇️

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.

moul added 2 commits July 7, 2024 09:31
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
moul added 3 commits July 7, 2024 09:43
Signed-off-by: moul <94029+moul@users.noreply.github.com>
Signed-off-by: moul <94029+moul@users.noreply.github.com>
moul added a commit that referenced this pull request Jul 7, 2024
- add 'make build' (embedmd)
- refactor Makefile (simplified)
- check on CI that docs/ is "built" (no diff)

Related (but not closing) #2532
Part of #2529

---------

Signed-off-by: moul <94029+moul@users.noreply.github.com>
moul added 2 commits July 7, 2024 10:35
Signed-off-by: moul <94029+moul@users.noreply.github.com>
@moul
Copy link
Member Author

moul commented Jul 7, 2024

Seems like docs needs to be changed too.
docs.gno.land/how-to-guides/creating-grc20

@r3v4s fixed, thank you.

Signed-off-by: moul <94029+moul@users.noreply.github.com>
@irreverentsimplicity
Copy link
Contributor

lgtm

@moul moul mentioned this pull request Jul 7, 2024
5 tasks
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.

Approving, will play around with it after merge. I'll also update the tutorial to be more informative.

@leohhhn
Copy link
Contributor

leohhhn commented Jul 7, 2024

I also want to implement the banker/safetoken stuff in my PR - don't want to scrape that one. Do you think we can have a grc/spec/grc20 or something similar to indicate exact-by-spec implementations?

@moul moul merged commit 3affd95 into gnolang:master Jul 7, 2024
10 checks passed
@moul moul deleted the dev/moul/refactor-grc20 branch July 7, 2024 23:05
This was referenced Jul 8, 2024
gfanton pushed a commit to gfanton/gno that referenced this pull request Jul 23, 2024
- add 'make build' (embedmd)
- refactor Makefile (simplified)
- check on CI that docs/ is "built" (no diff)

Related (but not closing) gnolang#2532
Part of gnolang#2529

---------

Signed-off-by: moul <94029+moul@users.noreply.github.com>
gfanton pushed a commit to gfanton/gno that referenced this pull request Jul 23, 2024
Main changes:
- rename `AdminToken` -> `Banker`
- rename `GRC20` -> `Token`
- remove unused helpers
- remove vault (temporarily, will be reimplemented)
- remove the returner ˋerror` when unnecessary
- use `std.Emit`
- use uassert for testing
- better file naming and organization for improved readability

Fixes gnolang#2294
Replaces gnolang#2314 (h/t @leohhhn)
~Depends on gnolang#2534~
BREAKING CHANGE

---------

Signed-off-by: moul <94029+moul@users.noreply.github.com>
Co-authored-by: Leon Hudak <33522493+leohhhn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Status: ✅ Done
Status: Done
Development

Successfully merging this pull request may close these issues.

[GRC] Refactor GRC20
4 participants