Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

nativeify: wugnot, backwards

wugnot takes a native coin and issues a GRC20, because a GRC20 can be pulled by a contract and a native coin cannot. This realm does the other one: escrow a GRC20, issue a native denom against it 1:1, and hand back something that moves with no realm call, rides the -send envelope of a transaction, and shows up beside GNOT on an account page.

What you give up is everything downstream of Approve. A native coin has no allowance, so nothing can pull it: not an AMM, not an escrow, not a subscription. And its issuer can always delete a balance.

Escrow account to approve: g1k5sgqx2a7rrs6znje6yjt7pje5phahrzfd7ptd

Pairs

Nothing wrapped yet.

Try it

Claim play money, let this realm pull it, wrap, then send the result around like any other coin:

# 1. get RED
maketx call -pkgpath gno.land/r/moul/x/grc20faucet/v0 -func Claim

# 2. let this realm pull your RED
maketx call -pkgpath gno.land/r/moul/x/grc20faucet/v0 -func Approve \
  -args RED -args g1k5sgqx2a7rrs6znje6yjt7pje5phahrzfd7ptd -args 1000000

# 3. create the pair once, then wrap into it
maketx call -pkgpath gno.land/r/moul/x/nativeify/v0 -func Nativeify \
  -args gno.land/r/moul/x/grc20faucet/v0.RED -args nred
maketx call -pkgpath gno.land/r/moul/x/nativeify/v0 -func Wrap -args nred -args 500000

# 4. it is an ordinary coin now: no realm call, no approval
maketx send -to <address> -send 1000/gno.land/r/moul/x/nativeify/v0:nred

# 5. redeem, by sending the coins back
maketx call -pkgpath gno.land/r/moul/x/nativeify/v0 -func Unwrap -args nred \
  -send 1000/gno.land/r/moul/x/nativeify/v0:nred

Every denom here is described in nativereg, which is where a native coin says what it is, since the chain stores no name for it.