github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/docs/assets/how-to-guides/creating-grc20/mytoken-1.gno (about) 1 import ( 2 "std" 3 "strings" 4 5 "gno.land/p/demo/grc/grc20" 6 "gno.land/p/demo/ufmt" 7 ) 8 9 var ( 10 mytoken *grc20.AdminToken 11 admin std.Address 12 ) 13 14 // init is called once at time of deployment 15 func init() { 16 // Set deployer of Realm to admin 17 admin = std.PrevRealm().Addr() 18 19 // Set token name, symbol and number of decimals 20 mytoken = grc20.NewAdminToken("My Token", "TKN", 4) 21 22 // Mint 1 million tokens to admin 23 mytoken.Mint(admin, 1000000*10000) 24 } 25