From 454ae2d5297ab26e0cef1d9f5d661d44987fc73e Mon Sep 17 00:00:00 2001 From: Thox <90353329+DIGIX666@users.noreply.github.com> Date: Thu, 30 May 2024 19:30:19 +0200 Subject: [PATCH] docs: fix code in creating-grc20.md (#2246) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Co-authored-by: Morgan --- docs/how-to-guides/creating-grc20.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/how-to-guides/creating-grc20.md b/docs/how-to-guides/creating-grc20.md index 8b950074f81..eec2faad140 100644 --- a/docs/how-to-guides/creating-grc20.md +++ b/docs/how-to-guides/creating-grc20.md @@ -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) } } @@ -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 🎉