Skip to content

Commit

Permalink
chore(effective-gno): replace "native tokens" with "coins" (#1853)
Browse files Browse the repository at this point in the history
<!-- please provide a detailed description of the changes made in this
pull request. -->

Following [this
discussion](#1623 (comment)),
this PR changes the reference from native tokens to coins in Effective
Gno.

Closes: #1623 

<details><summary>Contributors' checklist...</summary>

- [ ] 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](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
  • Loading branch information
leohhhn authored Mar 29, 2024
1 parent 613a2aa commit c9e05dc
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions docs/concepts/effective-gno.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ other intermediary realm. and then checks if the caller is the admin. If not, it
panics and stops the execution.

The goal of this approach is to allow a contract to own assets (like grc20 or
native tokens), so that you can create contracts that can be called by another
coins), so that you can create contracts that can be called by another
contract, reducing the risk of stealing money from the original caller. This is
the behavior of the default grc20 implementation.

Expand Down Expand Up @@ -596,18 +596,19 @@ func init() {
// the object.
```

### Choosing between native tokens and GRC20 tokens
### Choosing between Coins and GRC20 tokens

In Gno, you've got two main choices for tokens: Native or GRC20. Each has its
own pros and cons, and the best fit depends on your needs.
In Gno, you've got two primary options: Coins or GRC20. Each option
has its unique advantages and disadvantages, and the ideal choice varies based
on individual requirements.

#### Native tokens
#### Coins

Native tokens are managed by the banker module, separate from GnoVM. They're
Coins are managed by the banker module, separate from GnoVM. They're
simple, strict, and secure. You can create, transfer, and check balances with an
RPC call, no GnoVM needed.

For example, if you're creating a coin for cross-chain transfers, native tokens
For example, if you're creating a coin for cross-chain transfers, Coins
are your best bet. They're IBC-ready and their strict rules offer top-notch
security.

Expand All @@ -627,9 +628,8 @@ Remember, GRC20 tokens are more gas-intensive and aren't IBC-ready yet. They
also come with shared ownership, meaning the contract retains some control.

In the end, your choice depends on your needs: simplicity and security with
Native tokens, or flexibility and control with GRC20 tokens. And if you want the
best of both worlds, you can wrap a native token into a GRC20 compatible
token.
Coins, or flexibility and control with GRC20 tokens. And if you want the
best of both worlds, you can wrap a Coins into a GRC20 compatible token.

```go
import "gno.land/p/demo/grc/grc20"
Expand All @@ -645,11 +645,11 @@ func MyBalance() uint64 {

See also: https://gno.land/r/demo/foo20

#### Wrapping native tokens
#### Wrapping Coins

Want the best of both worlds? Consider wrapping your Native tokens. This gives
your tokens the flexibility of GRC20 while keeping the security of Native
tokens. It's a bit more complex, but it's a powerful option that offers great
Want the best of both worlds? Consider wrapping your Coins. This gives
your coins the flexibility of GRC20 while keeping the security of Coins.
It's a bit more complex, but it's a powerful option that offers great
versatility.

See also: https://github.com/gnolang/gno/tree/master/examples/gno.land/r/demo/wugnot
Expand Down

0 comments on commit c9e05dc

Please sign in to comment.