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

WIP feat: improve grc20/foo20 APIs #952

Closed
wants to merge 5 commits into from

Conversation

moul
Copy link
Member

@moul moul commented Jul 6, 2023

Context: from a live discussion when reviewing #938.

Goals:

  • better names
  • better API (around the banker)
  • support for "Local banker" for realms
Checklists...

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.

Maintainers Checklist

  • Checked that the author followed the guidelines in CONTRIBUTING.md
  • Checked the conventional-commit (especially PR title and verb, presence of BREAKING CHANGE: in the body)
  • Ensured that this PR is not a significant change or confirmed that the review/consideration process was appropriate for the change

@moul moul self-assigned this Jul 6, 2023
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Jul 6, 2023
@moul moul changed the title dev/moul/foo20 updates WIP feat: improve grc20/foo20 API Jul 6, 2023
@moul moul changed the title WIP feat: improve grc20/foo20 API WIP feat: improve grc20/foo20 APIs Jul 6, 2023
// expose a safe instance to the endusers.
type AdminToken struct {
type Banker20 struct {
Copy link
Member

Choose a reason for hiding this comment

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

NOTE: Banker20 should have a caller variable (set to nil by default) for example which when you call GRC20() that return a IGRC20. force to use the caller variable.

This fix when you call from a realm the external method, or the internal method when you get the struct

myfoo20 := foo20.SafeGRC20()
myfoo20.Transfer() // <-- std.PrevRealm could lead to error

@moul
Copy link
Member Author

moul commented Oct 17, 2024

Closed in favor of #2551

@moul moul closed this Oct 17, 2024
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: 🚀 Needed for Launch
Development

Successfully merging this pull request may close these issues.

grc20.Token doesn't implement IGRC20 interface
3 participants