Skip to content

Commit

Permalink
docs: fix code in creating-grc20.md (#2246)
Browse files Browse the repository at this point in the history
Description:
While helping someone on Discord who had an `issue` with the [gcr20
tutorial](https://docs.gno.land/how-to-guides/creating-grc20), I took
the liberty of suggesting modifications to fix the problem for future
users

![SCR-20240530-puwl](https://github.com/gnolang/gno/assets/90353329/b5009774-0d35-4d33-ae05-267e33d6009d)

---------

Co-authored-by: théo dub <theodub@MacThox.local>
Co-authored-by: Morgan <git@howl.moe>
  • Loading branch information
3 people authored May 30, 2024
1 parent 705f0e0 commit 454ae2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/how-to-guides/creating-grc20.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TransferFrom(sender, recipient std.Address, amount uint64) {
panic("transfer amount must be greater than zero")
}

if err := mytoken.TransferFrom(caller, from, to, amount); err != nil {
if err := mytoken.TransferFrom(caller, sender, recipient, amount); err != nil {
panic(err)
}
}
Expand Down Expand Up @@ -220,6 +220,7 @@ Calling the `Render` method returns a general render of the GRC20 realm, or
if given a specific address, the user's `balance` as a formatted string.

You can view the full code on [this Playground link](https://play.gno.land/p/km7Ja6WDQoL).
If you want to deploy it, do so on the [Portal Loop](../concepts/portal-loop.md).

## Conclusion
That's it 🎉
Expand Down

0 comments on commit 454ae2d

Please sign in to comment.