1package grc20
23import(4"chain/runtime/unsafe"56 tokens "gno.land/p/nt/grc20/v0"7)89// test1 receives the initial mint at construction.10var test1 =address("g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5")1112// Token is exported. Other contracts can read it (balances, metadata).13// privateLedger stays unexported: it grants unrestricted mint/burn/transfer.14var(15 Token *tokens.Token
16 privateLedger *tokens.PrivateLedger
17)1819funcinit(cur realm){20// generate the token and mint some tokens to test1.21 Token, privateLedger = tokens.NewToken("Foo Token","FOO",4,0, cur)22 privateLedger.Mint(test1,100000000)23}2425funcMyBalance()int64{26return Token.BalanceOf(unsafe.OriginCaller())27}28