From e5cf5138301d9dfb71e36bf9a75fd866baea533e Mon Sep 17 00:00:00 2001 From: gfanton Date: Fri, 24 May 2024 01:30:54 +0000 Subject: [PATCH] chore: update test3.gno.land backup --- test3.gno.land/README.md | 2 +- test3.gno.land/backup_0404996-0406441.jsonl | 19 ++ .../extracted/p/demo2/hello/pkg_metadata.json | 2 +- .../extracted/p/test2/hello/package.gno | 12 +- .../extracted/p/test2/hello/pkg_metadata.json | 2 +- .../r/bluehoneybadger/person/person.gno | 12 +- .../extracted/r/demo/apple/GRC20.gno | 2 +- .../extracted/r/demo/apple/pkg_metadata.json | 2 +- test3.gno.land/extracted/r/demo/asa/GRC20.gno | 2 +- .../extracted/r/demo/asa/pkg_metadata.json | 2 +- .../extracted/r/demo/gemcoin/GRC20.gno | 28 +-- .../extracted/r/demo/grass/GRC20.gno | 4 +- .../extracted/r/demo/grass/pkg_metadata.json | 2 +- .../extracted/r/demo/harambe/GRC20.gno | 2 +- .../r/demo/harambe/pkg_metadata.json | 2 +- .../extracted/r/demo/hello/hello.gno | 18 +- .../extracted/r/demo/hello3/pkg_metadata.json | 2 +- .../extracted/r/demo/test/package.gno | 4 - .../extracted/r/demo/test/pkg_metadata.json | 2 +- .../extracted/r/demo/yep/pkg_metadata.json | 2 +- .../r/enkianknight/helping/package.gno | 14 +- .../extracted/r/hello/hello/package.gno | 2 +- .../extracted/r/hello/hello/pkg_metadata.json | 2 +- .../extracted/r/hello15/hello/package.gno | 6 +- .../r/hello15/hello/pkg_metadata.json | 2 +- .../extracted/r/test/test/pkg_metadata.json | 2 +- .../extracted/r/test22/hello/package.gno | 4 +- .../r/test22/hello/pkg_metadata.json | 2 +- .../extracted/r/x1unix/feedback/v10/gno.mod | 2 +- .../r/x1unix/feedback/v10/pkg_metadata.json | 2 +- .../extracted/r/x1unix/feedback/v3/gno.mod | 3 +- .../r/x1unix/feedback/v3/package.gno | 169 +++++------------- .../r/x1unix/feedback/v3/pkg_metadata.json | 2 +- test3.gno.land/metadata.json | 2 +- 34 files changed, 137 insertions(+), 200 deletions(-) create mode 100755 test3.gno.land/backup_0404996-0406441.jsonl diff --git a/test3.gno.land/README.md b/test3.gno.land/README.md index 2e11d2d6..4502c786 100644 --- a/test3.gno.land/README.md +++ b/test3.gno.land/README.md @@ -2,7 +2,7 @@ ## TXs ``` -6837 +6856 ``` ## addpkgs diff --git a/test3.gno.land/backup_0404996-0406441.jsonl b/test3.gno.land/backup_0404996-0406441.jsonl new file mode 100755 index 00000000..468493e3 --- /dev/null +++ b/test3.gno.land/backup_0404996-0406441.jsonl @@ -0,0 +1,19 @@ +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1zuy4mj3p725k82eentww0e5vg00t6yg47h7adz","to_address":"g1lhmtfz3f9nms0q6ujn74f68wszvm6zrz6rsvnz","amount":"12000000ugnot"}],"fee":{"gas_wanted":"1000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A1x07iXg/zN1UwmViPyUx87iEFXwAA5BzEP6jqWK62Hm"},"signature":"QXBhrAUU95ATthpZjeKPZwoCGk8hXyC3RzYrl770wTUXDgdHf0p94mKxcWRjvZA54XTDncfV/BZ6OK6Gj3G5zA=="}],"memo":""},"blockNum":"405062"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1lhmtfz3f9nms0q6ujn74f68wszvm6zrz6rsvnz","to_address":"g1zuy4mj3p725k82eentww0e5vg00t6yg47h7adz","amount":"1000000ugnot"}],"fee":{"gas_wanted":"1000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A8M1ufTQEk4aEVUBiI9oSpt/S2/Gq9Ww7jA2XnM7I85/"},"signature":"qW4ikeYcjDBLJMWogVptSCM02KyiCtAJOOx7fY/qOngNychLR7ZNyMlydtvfkQ2aU4C6jjYjmXRsjyNKvqhLiQ=="}],"memo":""},"blockNum":"405156"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1zuy4mj3p725k82eentww0e5vg00t6yg47h7adz","to_address":"g1lhmtfz3f9nms0q6ujn74f68wszvm6zrz6rsvnz","amount":"1000000ugnot"}],"fee":{"gas_wanted":"1000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A1x07iXg/zN1UwmViPyUx87iEFXwAA5BzEP6jqWK62Hm"},"signature":"U8Jm2YFp+2t31VM+exjV89Pkedt1tYlcVaUOJ4iXpxtmeDZvvnNzyPfkcjyu+53gxwgO7iGxMdMspn+0zXUFZQ=="}],"memo":""},"blockNum":"405202"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1lhmtfz3f9nms0q6ujn74f68wszvm6zrz6rsvnz","to_address":"g1zuy4mj3p725k82eentww0e5vg00t6yg47h7adz","amount":"1000000ugnot"}],"fee":{"gas_wanted":"1000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A8M1ufTQEk4aEVUBiI9oSpt/S2/Gq9Ww7jA2XnM7I85/"},"signature":"4BCki7yNpA1Viu7/cy+TgaziF/dhqMNtElD0WTun1ugq8hdHrrZKFbvEdDm2NPMEHUyzwIRON3beVHD8MNOX1Q=="}],"memo":""},"blockNum":"405307"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1zuy4mj3p725k82eentww0e5vg00t6yg47h7adz","to_address":"g1lhmtfz3f9nms0q6ujn74f68wszvm6zrz6rsvnz","amount":"1000000ugnot"}],"fee":{"gas_wanted":"1000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A1x07iXg/zN1UwmViPyUx87iEFXwAA5BzEP6jqWK62Hm"},"signature":"p1hDic7zsOqG4+F74EQUK4x9u+xD8liWzBrb9G9Mw4NU/TeqQzdoXJmEjl0VIjRB+y2GSvR8mMnScMBuq6rTig=="}],"memo":""},"blockNum":"405326"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g17vcfytv9st4ydy7mxywerhw0yjkcxjt23k8vxp","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"HcYmVxDY05yYsnkMmGtErDm0MrdQudHVaE3XzRnwwpg67ocZmj5REsve6cRXQN8gy0INHM3uTgNcQQPthk05jg=="}],"memo":""},"blockNum":"405449"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g19kxd33qkmp5pmn4dtt60l79n8watk7d33xzq45","to_address":"g14uq66y6jn5l0m2wqn4lacwa6gacc7enumkug7n","amount":"10000000ugnot"}],"fee":{"gas_wanted":"1000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"AubLvndFsvt0ItmBjF95ARQQg7paon/WiHxY+YfL/mR+"},"signature":"wCa7Qa1Egi4jXF+XZ9TW1/drNWJLCn4u6rQ+ph4dzqV0jYr2v6Fz/+bXNH+i7KCxQ3p7M0qJy8lRpKGDNwCkxA=="}],"memo":""},"blockNum":"405496"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g1mvtswhwd4khhm2muq45htqx7hc23n6gxpu2gu0","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"VlaBdi9Dj0v/yTB28vTkeQZ2fVFKnEGQqU6jGhRuoO4EjKNNGGSXPVBrnNQohcKFwT3906CF2QeQxbx+ovWHQA=="}],"memo":""},"blockNum":"405510"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g1l79xpxufn3048qqdh8lg2h23pjx6vg6cxkustf","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"5F2hfHHF2Li5iPISKITwuCloYOT/6k8g4Ub+x/gjCtYnqO3Qf/hwibpfKS+qOnu++iW9XtloO78Gy5wmPsU08w=="}],"memo":""},"blockNum":"405516"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g176e652s5ta5ctnqfscsew98ruhycdk0xwkn9v6","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"NZEgut5KYzwTfr8jFWIA07pcxb6vEr0y7v9klERUHz4xVdYAfml4r7BImFsFi0LCOcbtR96bKBLuAcMDWDdhyg=="}],"memo":""},"blockNum":"405518"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g1jz40q8t2lvlcau9vtenul87pa2jnx90dhlklnl","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"zcrAraMt4GkNKHVjdXTFOeYj0CDdPnWF6ibtFv0p+VU1xYEpAjCTPyCUvA0cecZuyyl4hg6+YFqDMnFwl1Vnnw=="}],"memo":""},"blockNum":"405526"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g1a8x87l602duw6vhsqjr57y4e6ne063nxpx8m65","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"UsidLEMyj2RcbrOjYn2N9jZQHIf1eJ0iGGWw8VqBlfkCTar94w4XbRivBvTeasAxoHlg0etAwFvlMT44o5pOWw=="}],"memo":""},"blockNum":"405532"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g1nqde2tctgw4mdu204dt46waxuaqg7nglfyjkm7","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"JNBqzxN1eLHtotMKzPpGeJsfzsq5QRrIeEKoB7eS/6g2iYoCkLRaISVDY3D6A+98iA0PD5IAM8OK9IhZWnv4xQ=="}],"memo":""},"blockNum":"405535"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g1pw783delflgw4jmv2flh2783uh4uq4yhn546j9","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"Esnzmi82hxXM8WkaZF0+edUUSoweqvhwmlqguguC/GZPoobXRCoG/JD57DUOi88TvZYWaJlxejvSLVYhfLUIfQ=="}],"memo":""},"blockNum":"405540"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g19ulk6k68jc0u4e6kg5j6k0fs2l0mvxvu4dg2sz","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"QT+RzX1LQXkCNKwoACnd44zer2Ag1znxeICl7SXEILM5ys77rA3lYJp7zzkaJ0AunQdx5XNHtjdOnyLP/QzZlg=="}],"memo":""},"blockNum":"405543"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g19tvh5gardr70zcgwk3wxzdaxnajmrd4p6d86uw","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"A2t31Lucg38z0Nh8z0Y3dKJ+RZ2KL1NZobot0G5h9d9vZmHE36s55a3tPjLjt4Z28kF2L/qpNYku+gQy5idodA=="}],"memo":""},"blockNum":"405547"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","to_address":"g1qa28mylr7sxd56qqa7zclrqnnl4y3qlt8d0f4j","amount":"2ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A+FhNtsXHjLfSJk1lB8FbiL4mGPjc50Kt81J7EKDnJ2y"},"signature":"l8UGHANwrFP7FWMe9Z/2/P7jji2RK45eq2Yjp4GafQUVmR2E1UA0khEDbIF9Qd88qFbXerJqmAX5AQAVY87qOw=="}],"memo":""},"blockNum":"405549"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1urt7pdmwg2m6z3rsgu4e8peppm4027fvpwkmj8","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"V7pN/7sYmWT+qeE7GRk/b4xEI9pdeY4RX5xy7d7uUN99q3MQUe2yxTk+JNyjHMci/22wYGuKnls/p9YTlfvdOA=="}],"memo":""},"blockNum":"405676"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1urt7pdmwg2m6z3rsgu4e8peppm4027fvpwkmj8","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"H562laICE4VtImYTCHhl75mqSIA7jd6OxudrCZyXAB4oEO6fDDHposxip0X+ruzbU1Hx+cSCxvdESG6srC4k/w=="}],"memo":""},"blockNum":"405704"} diff --git a/test3.gno.land/extracted/p/demo2/hello/pkg_metadata.json b/test3.gno.land/extracted/p/demo2/hello/pkg_metadata.json index ae588b94..18bf8ca3 100644 --- a/test3.gno.land/extracted/p/demo2/hello/pkg_metadata.json +++ b/test3.gno.land/extracted/p/demo2/hello/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1at4q8pkwwll82azmxek7enpvyhh2c94mmk2c67","deposit":""} \ No newline at end of file +{"creator":"g100xslzk674xuv3s0q8yp44cr63l26z2y4n7ycg","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/p/test2/hello/package.gno b/test3.gno.land/extracted/p/test2/hello/package.gno index ad068318..d36874bc 100644 --- a/test3.gno.land/extracted/p/test2/hello/package.gno +++ b/test3.gno.land/extracted/p/test2/hello/package.gno @@ -1,13 +1,5 @@ package hello -var { - hello string -} - -func SetHello(msg string){ - hello = msg -} - -func GetHello() string { - return hello +func Render(path string) string { + return "Hello World!" } diff --git a/test3.gno.land/extracted/p/test2/hello/pkg_metadata.json b/test3.gno.land/extracted/p/test2/hello/pkg_metadata.json index b8bb6355..18bf8ca3 100644 --- a/test3.gno.land/extracted/p/test2/hello/pkg_metadata.json +++ b/test3.gno.land/extracted/p/test2/hello/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1v4e0gv2m6gpqh6mx0auu6x6gmep9yt6cxj6q5f","deposit":""} \ No newline at end of file +{"creator":"g100xslzk674xuv3s0q8yp44cr63l26z2y4n7ycg","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/bluehoneybadger/person/person.gno b/test3.gno.land/extracted/r/bluehoneybadger/person/person.gno index ef1273a1..d0c2e3b7 100644 --- a/test3.gno.land/extracted/r/bluehoneybadger/person/person.gno +++ b/test3.gno.land/extracted/r/bluehoneybadger/person/person.gno @@ -1,16 +1,22 @@ package person +// Importing `strconv` to be able to cast the age to string so it can be concatenated +import "strconv" + var ( myName = "John Smith" myAge = 42 myAddress = "123 Main Street" ) -function Render(path string) string { - return "My name is: " + myName "my Age is: " + myAge "& my Address is: " myAddress +func Render(path string) string { + // You could also use "gno.land/p/demo/ufmt" package, check `ufmt.Sprintf()` + // See: https://test3.gno.land/p/demo/ufmt/ufmt.gno + // It works like standard Go's "Sprintf" but it only support "%s" and "%d" it think + return "My name is: " + myName + "my Age is: " + strconv.Itoa(myAge) + "& my Address is: " + myAddress } -function UpdateAdddress(NewAddress string) string { +func updateAddress(NewAddress string) string { myAddress = NewAddress return "Your address has been updated" } \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/apple/GRC20.gno b/test3.gno.land/extracted/r/demo/apple/GRC20.gno index cd273623..c3867609 100644 --- a/test3.gno.land/extracted/r/demo/apple/GRC20.gno +++ b/test3.gno.land/extracted/r/demo/apple/GRC20.gno @@ -11,7 +11,7 @@ import ( var ( apple *grc20.AdminToken - admin std.Address = "g1hqzeju0p0eup9rgxa0pxvyc0y7wnzjrdvppsy5" + admin std.Address = "g1sycj68ur0n7xytglx0me3f207ktudm80aqpysm" ) func init() { diff --git a/test3.gno.land/extracted/r/demo/apple/pkg_metadata.json b/test3.gno.land/extracted/r/demo/apple/pkg_metadata.json index 59b3c1cc..8a00c6df 100644 --- a/test3.gno.land/extracted/r/demo/apple/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/apple/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1098kpwkwv3r08cat9ssucrq4mznxyv855jgqvx","deposit":""} \ No newline at end of file +{"creator":"g1sycj68ur0n7xytglx0me3f207ktudm80aqpysm","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/asa/GRC20.gno b/test3.gno.land/extracted/r/demo/asa/GRC20.gno index fe596451..d6787497 100644 --- a/test3.gno.land/extracted/r/demo/asa/GRC20.gno +++ b/test3.gno.land/extracted/r/demo/asa/GRC20.gno @@ -11,7 +11,7 @@ import ( var ( asa *grc20.AdminToken - admin std.Address = "g1hqzeju0p0eup9rgxa0pxvyc0y7wnzjrdvppsy5" + admin std.Address = "g19xw9uzlcr3jefwx6dpmr6c0erg5kc65zlj8r4e" ) func init() { diff --git a/test3.gno.land/extracted/r/demo/asa/pkg_metadata.json b/test3.gno.land/extracted/r/demo/asa/pkg_metadata.json index 1ef53319..bd42be48 100644 --- a/test3.gno.land/extracted/r/demo/asa/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/asa/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g15gsy3nlxxjn0knd3xkucg4f6gf79tfwhg426sw","deposit":""} \ No newline at end of file +{"creator":"g19xw9uzlcr3jefwx6dpmr6c0erg5kc65zlj8r4e","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/gemcoin/GRC20.gno b/test3.gno.land/extracted/r/demo/gemcoin/GRC20.gno index 6f224995..61adf14d 100644 --- a/test3.gno.land/extracted/r/demo/gemcoin/GRC20.gno +++ b/test3.gno.land/extracted/r/demo/gemcoin/GRC20.gno @@ -1,4 +1,4 @@ -package GemCoin +package gemcoin import ( "std" @@ -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. @@ -25,11 +25,11 @@ 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) } @@ -37,7 +37,7 @@ func BalanceOf(owner users.AddressOrName) uint64 { } 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) } @@ -48,17 +48,17 @@ 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. @@ -66,13 +66,13 @@ func TransferFrom(from, to users.AddressOrName, amount uint64) { 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. @@ -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" diff --git a/test3.gno.land/extracted/r/demo/grass/GRC20.gno b/test3.gno.land/extracted/r/demo/grass/GRC20.gno index b2f318d6..73cd23d1 100644 --- a/test3.gno.land/extracted/r/demo/grass/GRC20.gno +++ b/test3.gno.land/extracted/r/demo/grass/GRC20.gno @@ -11,12 +11,12 @@ import ( var ( grass *grc20.AdminToken - admin std.Address = "g10jtus48tdlp93l9jw9q0tws5jh7gmpjdtyqkxh" + admin std.Address = "g148vmqxzgp4yc996pasredy3v9sw8sxzsgem0qv" ) func init() { grass = grc20.NewAdminToken("grassToken", "grass", 6) - grass.Mint(admin, 1000000000) // @administrator + grass.Mint(admin, 2443000) // @administrator } // method proxies as public functions. diff --git a/test3.gno.land/extracted/r/demo/grass/pkg_metadata.json b/test3.gno.land/extracted/r/demo/grass/pkg_metadata.json index 10baacc2..ce87b5bb 100644 --- a/test3.gno.land/extracted/r/demo/grass/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/grass/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g10jtus48tdlp93l9jw9q0tws5jh7gmpjdtyqkxh","deposit":""} \ No newline at end of file +{"creator":"g148vmqxzgp4yc996pasredy3v9sw8sxzsgem0qv","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/harambe/GRC20.gno b/test3.gno.land/extracted/r/demo/harambe/GRC20.gno index 94992a7d..17e4a290 100644 --- a/test3.gno.land/extracted/r/demo/harambe/GRC20.gno +++ b/test3.gno.land/extracted/r/demo/harambe/GRC20.gno @@ -11,7 +11,7 @@ import ( var ( harambe *grc20.AdminToken - admin std.Address = "g1lk45335udge6nefk733e852rmexrc94m52tdt9" + admin std.Address = "g1h6n749m920lvaef2qrpsa2vmssr4sq60ykqks3" ) func init() { diff --git a/test3.gno.land/extracted/r/demo/harambe/pkg_metadata.json b/test3.gno.land/extracted/r/demo/harambe/pkg_metadata.json index 93356881..445b8033 100644 --- a/test3.gno.land/extracted/r/demo/harambe/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/harambe/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1lk45335udge6nefk733e852rmexrc94m52tdt9","deposit":""} \ No newline at end of file +{"creator":"g1h6n749m920lvaef2qrpsa2vmssr4sq60ykqks3","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/hello/hello.gno b/test3.gno.land/extracted/r/demo/hello/hello.gno index 8f618807..957da241 100644 --- a/test3.gno.land/extracted/r/demo/hello/hello.gno +++ b/test3.gno.land/extracted/r/demo/hello/hello.gno @@ -1,9 +1,13 @@ -package main +package hello -import ( - "fmt" -) - -func main() { - fmt.Println("Hello, world!") +func Hello() string { + return "Hello() called" } + +// func Render() string { +// return "Render() called" +// } + +func Render(path string) string { + return "Render(path string) called with\n# " + path +} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/hello3/pkg_metadata.json b/test3.gno.land/extracted/r/demo/hello3/pkg_metadata.json index 24c455f9..92e977de 100644 --- a/test3.gno.land/extracted/r/demo/hello3/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/hello3/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1ayxdpq5jzqrkedjp57xvdhvf9g6jjwhxt5wn2f","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/test/package.gno b/test3.gno.land/extracted/r/demo/test/package.gno index d36874bc..8b137891 100644 --- a/test3.gno.land/extracted/r/demo/test/package.gno +++ b/test3.gno.land/extracted/r/demo/test/package.gno @@ -1,5 +1 @@ -package hello -func Render(path string) string { - return "Hello World!" -} diff --git a/test3.gno.land/extracted/r/demo/test/pkg_metadata.json b/test3.gno.land/extracted/r/demo/test/pkg_metadata.json index ac780b46..a420d9f5 100644 --- a/test3.gno.land/extracted/r/demo/test/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/test/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1at2h7kdhz2m9lv6azn54mwu4wl95k94wu90uwj","deposit":""} \ No newline at end of file +{"creator":"g1eussptehceyrtzw69kek72qy8d40rjrf654rrt","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/yep/pkg_metadata.json b/test3.gno.land/extracted/r/demo/yep/pkg_metadata.json index 213b87e5..6794c070 100644 --- a/test3.gno.land/extracted/r/demo/yep/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/yep/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g140pvdhzwxtg8yazp5zfqtmshqnt2mefs764yrw","deposit":""} \ No newline at end of file +{"creator":"g1p809wnm9glgxu8lauaeattqlwh92gd0vcrlm46","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/enkianknight/helping/package.gno b/test3.gno.land/extracted/r/enkianknight/helping/package.gno index 64c6d4bc..d36874bc 100644 --- a/test3.gno.land/extracted/r/enkianknight/helping/package.gno +++ b/test3.gno.land/extracted/r/enkianknight/helping/package.gno @@ -1,13 +1,5 @@ -package helping +package hello -var ( - helping string -) - - func SetHelping(msg string) { - helping=msg +func Render(path string) string { + return "Hello World!" } - -func GetHelping() string { - return helping -} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/hello/hello/package.gno b/test3.gno.land/extracted/r/hello/hello/package.gno index 74191b52..d36874bc 100644 --- a/test3.gno.land/extracted/r/hello/hello/package.gno +++ b/test3.gno.land/extracted/r/hello/hello/package.gno @@ -1,5 +1,5 @@ package hello -func Render() { +func Render(path string) string { return "Hello World!" } diff --git a/test3.gno.land/extracted/r/hello/hello/pkg_metadata.json b/test3.gno.land/extracted/r/hello/hello/pkg_metadata.json index 1f3db57c..0812c2e9 100644 --- a/test3.gno.land/extracted/r/hello/hello/pkg_metadata.json +++ b/test3.gno.land/extracted/r/hello/hello/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g130qplr2dny02smprqcypk4t9fd3ahnjuf08yax","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g15wmukt79xymnnu6c4de32trnufudqum60yrxu8","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/hello15/hello/package.gno b/test3.gno.land/extracted/r/hello15/hello/package.gno index d36874bc..32b4fc2d 100644 --- a/test3.gno.land/extracted/r/hello15/hello/package.gno +++ b/test3.gno.land/extracted/r/hello15/hello/package.gno @@ -1,5 +1,9 @@ package hello -func Render(path string) string { +func B(path []string) string { + return "Hello World!" +} + +func A(path string) string { return "Hello World!" } diff --git a/test3.gno.land/extracted/r/hello15/hello/pkg_metadata.json b/test3.gno.land/extracted/r/hello15/hello/pkg_metadata.json index fe835b60..292c561e 100644 --- a/test3.gno.land/extracted/r/hello15/hello/pkg_metadata.json +++ b/test3.gno.land/extracted/r/hello15/hello/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1uf8u5jf2m9l80g0zsfq7tufl3qufqc4393jtkl","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g1ejrxf88yp390dr48a0wxyaed3vxj0243at292p","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/test/test/pkg_metadata.json b/test3.gno.land/extracted/r/test/test/pkg_metadata.json index 83c18727..5235ccf7 100644 --- a/test3.gno.land/extracted/r/test/test/pkg_metadata.json +++ b/test3.gno.land/extracted/r/test/test/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g17ec6vfn5w5lzs9s5cxqjuy3xd9kqpkhg6zd4an","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g1fsu3z335h5qngf7t3lmakvpmpwg9ae76tqwh7c","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/test22/hello/package.gno b/test3.gno.land/extracted/r/test22/hello/package.gno index a0c2f9ce..723d6d20 100644 --- a/test3.gno.land/extracted/r/test22/hello/package.gno +++ b/test3.gno.land/extracted/r/test22/hello/package.gno @@ -1,5 +1,5 @@ - package hello +package hello -func Render(path string) string { +func Test1(option1 []string) string { return "Hello World!" } diff --git a/test3.gno.land/extracted/r/test22/hello/pkg_metadata.json b/test3.gno.land/extracted/r/test22/hello/pkg_metadata.json index 11e3b6de..5235ccf7 100644 --- a/test3.gno.land/extracted/r/test22/hello/pkg_metadata.json +++ b/test3.gno.land/extracted/r/test22/hello/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1yc0x2kj67mj564zsjyp27t5zya5eynnrdqkpqv","deposit":""} \ No newline at end of file +{"creator":"g1fsu3z335h5qngf7t3lmakvpmpwg9ae76tqwh7c","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/x1unix/feedback/v10/gno.mod b/test3.gno.land/extracted/r/x1unix/feedback/v10/gno.mod index 1023eba5..a7cab217 100644 --- a/test3.gno.land/extracted/r/x1unix/feedback/v10/gno.mod +++ b/test3.gno.land/extracted/r/x1unix/feedback/v10/gno.mod @@ -3,4 +3,4 @@ module gno.land/r/x1unix/feedback/v10 require ( gno.land/p/demo/testutils v0.0.0-latest gno.land/p/demo/ufmt v0.0.0-latest -) +) \ No newline at end of file diff --git a/test3.gno.land/extracted/r/x1unix/feedback/v10/pkg_metadata.json b/test3.gno.land/extracted/r/x1unix/feedback/v10/pkg_metadata.json index a8bc39aa..d49bf393 100644 --- a/test3.gno.land/extracted/r/x1unix/feedback/v10/pkg_metadata.json +++ b/test3.gno.land/extracted/r/x1unix/feedback/v10/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g15ruzptpql4dpuyzej0wkt5rq6r26kw4nxu9fwd","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g1fdk37llu9sfu9mdupmzjx34v2nrrdnk2757e0j","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/x1unix/feedback/v3/gno.mod b/test3.gno.land/extracted/r/x1unix/feedback/v3/gno.mod index fa070f27..1ad09377 100644 --- a/test3.gno.land/extracted/r/x1unix/feedback/v3/gno.mod +++ b/test3.gno.land/extracted/r/x1unix/feedback/v3/gno.mod @@ -3,4 +3,5 @@ module gno.land/r/x1unix/feedback/v3 require ( gno.land/p/demo/testutils v0.0.0-latest gno.land/p/demo/ufmt v0.0.0-latest -) + gno.land/p/demo/seqid v0.0.0-latest +) \ No newline at end of file diff --git a/test3.gno.land/extracted/r/x1unix/feedback/v3/package.gno b/test3.gno.land/extracted/r/x1unix/feedback/v3/package.gno index 949196d7..b126311b 100644 --- a/test3.gno.land/extracted/r/x1unix/feedback/v3/package.gno +++ b/test3.gno.land/extracted/r/x1unix/feedback/v3/package.gno @@ -5,30 +5,14 @@ import ( "strings" "time" + "gno.land/p/demo/seqid" "gno.land/p/demo/ufmt" ) - -const ( - maxCharsCount = 256 - notFoundIndex = -1 - - // ownerAddr is wallet address of realm admin. - ownerAddr = std.Address("g15ruzptpql4dpuyzej0wkt5rq6r26kw4nxu9fwd") -) - -var ( - // HTML escaping. - htmlQuot = []byte(""") // shorter than """ - htmlApos = []byte("'") // shorter than "'" and apos was not in HTML until HTML5 - htmlAmp = []byte("&") - htmlLt = []byte("<") - htmlGt = []byte(">") - htmlNull = []byte("\uFFFD") -) +const maxCharsCount = 256 type Feedback struct { - ID int + ID seqid.ID User std.Address Content string Response string @@ -36,77 +20,37 @@ type Feedback struct { RespondAt time.Time } -var ( - nextID = 1 - isLocked = false - feedbacks = []Feedback{} - modAddrs = []std.Address{} -) - -func stripHtml(input string) string { - // Copy from Go's `template.HTMLEscape`. - // See: $GOROOT/src/text/template/funcs.go - - // Avoid allocation if we can. - if !strings.ContainsAny(input, "'\"&<>\000") { - return input - } - - b := []byte(input) - w := strings.Builder{} - last := 0 - for i, c := range b { - var html []byte - switch c { - case '\000': - html = htmlNull - case '"': - html = htmlQuot - case '\'': - html = htmlApos - case '&': - html = htmlAmp - case '<': - html = htmlLt - case '>': - html = htmlGt - default: - continue - } - w.Write(b[last:i]) - w.Write(html) - last = i + 1 - } - - w.Write(b[last:]) - return w.String() -} - -func findFeedback(id int) (int, bool) { - // TODO: use avl and seqid when will move to test4 - for i := range feedbacks { - if feedbacks[i].ID == id { - return i, true - } +func newAddrSet(items ...std.Address) map[std.Address]struct{} { + set := make(map[std.Address]struct{}, len(items)) + for _, v := range items { + set[v] = struct{}{} } - - return notFoundIndex, false + return set } -func findModerator(addr std.Address) int { - for i, modAddr := range modAddrs { - if modAddr == addr { - return i - } - } +var ( + nextID seqid.ID + isLocked = false + feedbacks map[seqid.ID]Feedback + ownerAddr = std.Address( + // TODO: put realm's owner address + "g1fdk37llu9sfu9mdupmzjx34v2nrrdnk2757e0j", + ) + modsAddrs = newAddrSet( + // TODO: add mod wallets + "g1fdk37llu9sfu9mdupmzjx34v2nrrdnk2757e0j", + ) +) - return notFoundIndex +func isModerator(addr std.Address) bool { + _, ok := modsAddrs[addr] + return ok } // assertIsModerator checks whether a current caller is owner or a moderator. func assertIsModerator() { actorId := std.GetOrigCaller() - isAllowed := actorId == ownerAddr || findModerator(actorId) != notFoundIndex + isAllowed := actorId == ownerAddr || isModerator(actorId) if !isAllowed { panic("Access Denied") } @@ -155,43 +99,43 @@ func SubmitFeedback(message string) string { panic("Message is too long") } - id := nextID - feedbacks = append(feedbacks, Feedback{ + id := nextID.Next() + feedbacks[id] = Feedback{ ID: id, User: std.GetOrigCaller(), - Content: stripHtml(message), + Content: message, CreatedAt: time.Now(), - }) + } - nextID++ return ufmt.Sprintf("Feedback submitted successfully with ID: %d", id) } // BanFeedback used by moderation team to remove feedbacks which violate code of conduct. -func BanFeedback(feedbackID int) string { +func BanFeedback(feedbackID seqid.ID) string { assertIsModerator() + assertNotLocked() - i, ok := findFeedback(feedbackID) + feedback, ok := feedbacks[feedbackID] if !ok { panic("Feedback not found") } // Still keep the record but remove a harmful message. - feedbacks[i].Content = "" + feedback.Content = "" + feedbacks[feedbackID] = feedback return "Feedback was removed by a moderator" } // RespondToFeedback allows any moderator or realm owner to leave a response to a feedback. -func RespondToFeedback(feedbackID int, response string) string { - assertNotLocked() +func RespondToFeedback(feedbackID seqid.ID, response string) string { assertIsModerator() + assertNotLocked() - i, ok := findFeedback(feedbackID) + feedback, ok := feedbacks[feedbackID] if !ok { panic("Feedback not found") } - feedback := feedbacks[i] if feedback.Response != "" { panic("Feedback already has a response") } @@ -206,40 +150,18 @@ func RespondToFeedback(feedbackID int, response string) string { } feedback.RespondAt = time.Now() - feedback.Response = stripHtml(response) - feedbacks[i] = feedback + feedback.Response = response + feedbacks[feedbackID] = feedback return "Response recorded successfully" } -// AddModerator adds a new wallet address to a list of moderators. -func AddModerator(addr std.Address) string { - i := findModerator(addr) - if i != notFoundIndex { - panic("Entry already exists") - } - - modAddrs = append(modAddrs, addr) - return "Success" -} - -// RemoveModerator removes a wallet address from a list of moderators. -func RemoveModerator(addr std.Address) string { - i := findModerator(addr) - if i == notFoundIndex { - panic("Entry not found") - } - - modAddrs = append(modAddrs[:i], modAddrs[i+1:]...) - return "Success" -} - // Render displays all feedback and responses. -func Render(_ string) string { +func Render(path string) string { sb := strings.Builder{} sb.WriteString("# Feedback Collection\n") - for _, fb := range feedbacks { - sb.WriteString(ufmt.Sprintf("## Feedback #%d\n", fb.ID)) + for id, fb := range feedbacks { + sb.WriteString(ufmt.Sprintf("## Feedback #%d\n", id)) sb.WriteString(ufmt.Sprintf("From `%s` at %s\n\n", fb.User, fb.CreatedAt.Format(time.RFC1123))) if fb.Content == "" { sb.WriteString("*Feedback was removed by a moderator*") @@ -252,10 +174,11 @@ func Render(_ string) string { continue } - sb.WriteString("### Response\n") - sb.WriteString(ufmt.Sprintf("At %s\n\n", fb.RespondAt.Format(time.RFC1123))) + sb.WriteString("### Response") + sb.WriteString(ufmt.Sprintf("At %s\n\n", fb.CreatedAt.Format(time.RFC1123))) sb.WriteString(fb.Response) sb.WriteString("\n\n") } return sb.String() -} \ No newline at end of file +} + diff --git a/test3.gno.land/extracted/r/x1unix/feedback/v3/pkg_metadata.json b/test3.gno.land/extracted/r/x1unix/feedback/v3/pkg_metadata.json index a8bc39aa..d49bf393 100644 --- a/test3.gno.land/extracted/r/x1unix/feedback/v3/pkg_metadata.json +++ b/test3.gno.land/extracted/r/x1unix/feedback/v3/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g15ruzptpql4dpuyzej0wkt5rq6r26kw4nxu9fwd","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g1fdk37llu9sfu9mdupmzjx34v2nrrdnk2757e0j","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/metadata.json b/test3.gno.land/metadata.json index 40efd28d..df05c964 100644 --- a/test3.gno.land/metadata.json +++ b/test3.gno.land/metadata.json @@ -1,3 +1,3 @@ { - "latest_block_height": 404996 + "latest_block_height": 406441 }