Skip to content

Commit

Permalink
chore: update test3.gno.land backup
Browse files Browse the repository at this point in the history
  • Loading branch information
gfanton authored and github-actions[bot] committed Apr 7, 2024
1 parent 1ff8d93 commit f17e4ea
Show file tree
Hide file tree
Showing 17 changed files with 98 additions and 70 deletions.
Empty file.
35 changes: 32 additions & 3 deletions test3.gno.land/extracted/p/demo/hyperborea/package.gno
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
package hello
package foo

import (
"std
"strings

"gno.land/p/demo/grc/grc20
"gno.land/p/demo/ufmt
"gno.land/r/demo/users"
)

var (
foo *grc20.AdminToken
admin std.address = "g1zakcnjtwj0rs9ejtr5c0gqlnus50xny8frar5n"
)

func init() {
hyperborea = grc20.NewAdminToken("Hyperborea","HYPERBOREA", 6)
hyperborea.Mint(admin,8888888) // @administrator
}

// method proxies as public functions.
//

// getters.

func TotalSupply() uint64 {
return hyperborea.TotalSupply/()
}

func BalanceOf(owner users.AddressOrName) uint64 {
balance, err := hyperborea.BalanceOf(owner.Resolve())

func Render(path string) string {
return "Hello World!"
}
12 changes: 10 additions & 2 deletions test3.gno.land/extracted/p/test2/hello/package.gno
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
package hello

func Render(path string) string {
return "Hello World!"
var {
hello string
}

func SetHello(msg string){
hello = msg
}

func GetHello() string {
return hello
}
2 changes: 1 addition & 1 deletion test3.gno.land/extracted/p/test2/hello/pkg_metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"creator":"g100xslzk674xuv3s0q8yp44cr63l26z2y4n7ycg","deposit":""}
{"creator":"g1v4e0gv2m6gpqh6mx0auu6x6gmep9yt6cxj6q5f","deposit":""}
2 changes: 1 addition & 1 deletion test3.gno.land/extracted/r/demo/apple/GRC20.gno
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

var (
apple *grc20.AdminToken
admin std.Address = "g1sycj68ur0n7xytglx0me3f207ktudm80aqpysm"
admin std.Address = "g1hqzeju0p0eup9rgxa0pxvyc0y7wnzjrdvppsy5"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion test3.gno.land/extracted/r/demo/apple/pkg_metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"creator":"g1sycj68ur0n7xytglx0me3f207ktudm80aqpysm","deposit":""}
{"creator":"g1098kpwkwv3r08cat9ssucrq4mznxyv855jgqvx","deposit":""}
30 changes: 15 additions & 15 deletions test3.gno.land/extracted/r/demo/demo/GRC20.gno
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pup
package PERL

import (
"std"
Expand All @@ -10,13 +10,13 @@ import (
)

var (
pup *grc20.AdminToken
admin std.Address = "g1j8jwsce3vcry6s8qmmkxuwuhzww0j8396n3rgm"
PERL *grc20.AdminToken
admin std.Address = "g14gde7f5qnku3pdur5te5r78rq4cues86ftxml7"
)

func init() {
pup = grc20.NewAdminToken("pupToken", "pup", 6)
pup.Mint(admin, 1000000000) // @administrator
PERL = grc20.NewAdminToken("PERLToken", "PERL", 6)
PERL.Mint(admin, 1000000000) // @administrator
}

// method proxies as public functions.
Expand All @@ -25,19 +25,19 @@ func init() {
// getters.

func TotalSupply() uint64 {
return pup.TotalSupply()
return foo.TotalSupply()
}

func BalanceOf(owner users.AddressOrName) uint64 {
balance, err := pup.BalanceOf(owner.Resolve())
balance, err := PERL.BalanceOf(owner.Resolve())
if err != nil {
panic(err)
}
return balance
}

func Allowance(owner, spender users.AddressOrName) uint64 {
allowance, err := pup.Allowance(owner.Resolve(), spender.Resolve())
allowance, err := PERL.Allowance(owner.Resolve(), spender.Resolve())
if err != nil {
panic(err)
}
Expand All @@ -48,31 +48,31 @@ func Allowance(owner, spender users.AddressOrName) uint64 {

func Transfer(to users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
pup.Transfer(caller, to.Resolve(), amount)
PERL.Transfer(caller, to.Resolve(), amount)
}

func Approve(spender users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
pup.Approve(caller, spender.Resolve(), amount)
PERL.Approve(caller, spender.Resolve(), amount)
}

func TransferFrom(from, to users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
pup.TransferFrom(caller, from.Resolve(), to.Resolve(), amount)
PERL.TransferFrom(caller, from.Resolve(), to.Resolve(), amount)
}

// administration.

func Mint(address users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
assertIsAdmin(caller)
pup.Mint(address.Resolve(), amount)
PERL.Mint(address.Resolve(), amount)
}

func Burn(address users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
assertIsAdmin(caller)
pup.Burn(address.Resolve(), amount)
PERL.Burn(address.Resolve(), amount)
}

// render.
Expand All @@ -84,10 +84,10 @@ func Render(path string) string {

switch {
case path == "":
return pup.RenderHome()
return PERL.RenderHome()
case c == 2 && parts[0] == "balance":
owner := users.AddressOrName(parts[1])
balance, _ := pup.BalanceOf(owner.Resolve())
balance, _ := PERL.BalanceOf(owner.Resolve())
return ufmt.Sprintf("%d\n", balance)
default:
return "404\n"
Expand Down
2 changes: 1 addition & 1 deletion test3.gno.land/extracted/r/demo/demo/pkg_metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"creator":"g1j8jwsce3vcry6s8qmmkxuwuhzww0j8396n3rgm","deposit":""}
{"creator":"g14gde7f5qnku3pdur5te5r78rq4cues86ftxml7","deposit":""}
28 changes: 14 additions & 14 deletions test3.gno.land/extracted/r/demo/gemcoin/GRC20.gno
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package GemCoin
package gemcoin

import (
"std"
Expand All @@ -10,13 +10,13 @@ import (
)

var (
GemCoin *grc20.AdminToken
gemcoin *grc20.AdminToken
admin std.Address = "g17np07gtd7nj5rh4x582srdhd8247xa3s3us3y3"
)

func init() {
GemCoin = grc20.NewAdminToken("GemCoin", "Gem", 6)
GemCoin.Mint(admin, 1000000000) // @administrator
gemcoin = grc20.NewAdminToken("gemcoinToken", "GEM", 6)
gemcoin.Mint(admin, 1000000000) // @administrator
}

// method proxies as public functions.
Expand All @@ -25,19 +25,19 @@ func init() {
// getters.

func TotalSupply() uint64 {
return GemCoin.TotalSupply()
return gemcoin.TotalSupply()
}

func BalanceOf(owner users.AddressOrName) uint64 {
balance, err := GemCoin.BalanceOf(owner.Resolve())
balance, err := gemcoin.BalanceOf(owner.Resolve())
if err != nil {
panic(err)
}
return balance
}

func Allowance(owner, spender users.AddressOrName) uint64 {
allowance, err := GemCoin.Allowance(owner.Resolve(), spender.Resolve())
allowance, err := gemcoin.Allowance(owner.Resolve(), spender.Resolve())
if err != nil {
panic(err)
}
Expand All @@ -48,31 +48,31 @@ func Allowance(owner, spender users.AddressOrName) uint64 {

func Transfer(to users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
GemCoin.Transfer(caller, to.Resolve(), amount)
gemcoin.Transfer(caller, to.Resolve(), amount)
}

func Approve(spender users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
GemCoin.Approve(caller, spender.Resolve(), amount)
gemcoin.Approve(caller, spender.Resolve(), amount)
}

func TransferFrom(from, to users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
GemCoin.TransferFrom(caller, from.Resolve(), to.Resolve(), amount)
gemcoin.TransferFrom(caller, from.Resolve(), to.Resolve(), amount)
}

// administration.

func Mint(address users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
assertIsAdmin(caller)
GemCoin.Mint(address.Resolve(), amount)
gemcoin.Mint(address.Resolve(), amount)
}

func Burn(address users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
assertIsAdmin(caller)
GemCoin.Burn(address.Resolve(), amount)
gemcoin.Burn(address.Resolve(), amount)
}

// render.
Expand All @@ -84,10 +84,10 @@ func Render(path string) string {

switch {
case path == "":
return GemCoin.RenderHome()
return gemcoin.RenderHome()
case c == 2 && parts[0] == "balance":
owner := users.AddressOrName(parts[1])
balance, _ := GemCoin.BalanceOf(owner.Resolve())
balance, _ := gemcoin.BalanceOf(owner.Resolve())
return ufmt.Sprintf("%d\n", balance)
default:
return "404\n"
Expand Down
2 changes: 1 addition & 1 deletion test3.gno.land/extracted/r/demo/harambe/GRC20.gno
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

var (
harambe *grc20.AdminToken
admin std.Address = "g1lk45335udge6nefk733e852rmexrc94m52tdt9"
admin std.Address = "g1h6n749m920lvaef2qrpsa2vmssr4sq60ykqks3"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion test3.gno.land/extracted/r/demo/harambe/pkg_metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"creator":"g1lk45335udge6nefk733e852rmexrc94m52tdt9","deposit":""}
{"creator":"g1h6n749m920lvaef2qrpsa2vmssr4sq60ykqks3","deposit":""}
30 changes: 15 additions & 15 deletions test3.gno.land/extracted/r/demo/users/GRC20.gno
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test
package foo

import (
"std"
Expand All @@ -10,13 +10,13 @@ import (
)

var (
test *grc20.AdminToken
admin std.Address = "g1fq4akfudp3aenz9kmkvh4pf6sr0yvxcr3eq703"
foo *grc20.AdminToken
admin std.Address = "g14nddjdkaqh3r84rs69txay6vqt8e4mf730v5ym"
)

func init() {
test = grc20.NewAdminToken("testToken", "test", 6)
test.Mint(admin, 55555555555555) // @administrator
foo = grc20.NewAdminToken("FooToken", "FOO", 6)
foo.Mint(admin, 1000000000) // @administrator
}

// method proxies as public functions.
Expand All @@ -25,19 +25,19 @@ func init() {
// getters.

func TotalSupply() uint64 {
return test.TotalSupply()
return foo.TotalSupply()
}

func BalanceOf(owner users.AddressOrName) uint64 {
balance, err := test.BalanceOf(owner.Resolve())
balance, err := foo.BalanceOf(owner.Resolve())
if err != nil {
panic(err)
}
return balance
}

func Allowance(owner, spender users.AddressOrName) uint64 {
allowance, err := test.Allowance(owner.Resolve(), spender.Resolve())
allowance, err := foo.Allowance(owner.Resolve(), spender.Resolve())
if err != nil {
panic(err)
}
Expand All @@ -48,31 +48,31 @@ func Allowance(owner, spender users.AddressOrName) uint64 {

func Transfer(to users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
test.Transfer(caller, to.Resolve(), amount)
foo.Transfer(caller, to.Resolve(), amount)
}

func Approve(spender users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
test.Approve(caller, spender.Resolve(), amount)
foo.Approve(caller, spender.Resolve(), amount)
}

func TransferFrom(from, to users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
test.TransferFrom(caller, from.Resolve(), to.Resolve(), amount)
foo.TransferFrom(caller, from.Resolve(), to.Resolve(), amount)
}

// administration.

func Mint(address users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
assertIsAdmin(caller)
test.Mint(address.Resolve(), amount)
foo.Mint(address.Resolve(), amount)
}

func Burn(address users.AddressOrName, amount uint64) {
caller := std.GetOrigCaller()
assertIsAdmin(caller)
test.Burn(address.Resolve(), amount)
foo.Burn(address.Resolve(), amount)
}

// render.
Expand All @@ -84,10 +84,10 @@ func Render(path string) string {

switch {
case path == "":
return test.RenderHome()
return foo.RenderHome()
case c == 2 && parts[0] == "balance":
owner := users.AddressOrName(parts[1])
balance, _ := test.BalanceOf(owner.Resolve())
balance, _ := foo.BalanceOf(owner.Resolve())
return ufmt.Sprintf("%d\n", balance)
default:
return "404\n"
Expand Down
2 changes: 1 addition & 1 deletion test3.gno.land/extracted/r/demo/users/pkg_metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"creator":"g1fq4akfudp3aenz9kmkvh4pf6sr0yvxcr3eq703","deposit":""}
{"creator":"g14nddjdkaqh3r84rs69txay6vqt8e4mf730v5ym","deposit":""}
Loading

0 comments on commit f17e4ea

Please sign in to comment.