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
842 stars 343 forks source link

refactor: GRC20 #2314

Open leohhhn opened 3 weeks ago

leohhhn commented 3 weeks ago

Description

Closes: #2294

This PR refactors the GRC20 folder to follow the ERC20 spec as close as possibly.

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).
leohhhn commented 3 weeks ago

Interesting discussion point: https://github.com/gnolang/gno/issues/2316

leohhhn commented 2 weeks ago

Opening up for reviews - grc20 package, foo20, wugnot & grc20 factory realms have been refactored, need to fix up some other stuff that is failing due to the changed API, awaiting a reply from @moul

zivkovicmilos commented 2 weeks ago

Please fix the CI before opening the PR 🙏

leohhhn commented 2 weeks ago

@tbruyelle I think both have valid use cases. People can choose to use the factory, or simply write their own realm importing the GRC20 package.