From 223c11e642a0dd71d2bda6979cab7b95c67d3341 Mon Sep 17 00:00:00 2001 From: gfanton Date: Fri, 12 Jul 2024 01:32:07 +0000 Subject: [PATCH] chore: update test3.gno.land backup --- test3.gno.land/README.md | 6 +- test3.gno.land/backup_0478747-0480197.jsonl | 22 +++ .../extracted/p/demo/hello/pkg_metadata.json | 2 +- .../extracted/p/stuyk/test/package.gno | 21 +-- .../extracted/p/test/test/package.gno | 120 ++----------- .../extracted/p/test/test/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 +- .../extracted/r/demo/demo/GRC20.gno | 30 ++-- .../extracted/r/demo/demo/pkg_metadata.json | 2 +- .../extracted/r/demo/doge/GRC20.gno | 6 +- .../extracted/r/demo/doge/pkg_metadata.json | 2 +- .../extracted/r/demo/harambe/GRC20.gno | 2 +- .../r/demo/harambe/pkg_metadata.json | 2 +- .../extracted/r/demo/ripl/GRC20.gno | 30 ++-- .../extracted/r/demo/ripl/pkg_metadata.json | 2 +- .../extracted/r/demo/users/GRC20.gno | 30 ++-- .../extracted/r/demo/users/pkg_metadata.json | 2 +- .../extracted/r/demo/yep/pkg_metadata.json | 2 +- .../extracted/r/demo2/greeting/package.gno | 13 +- .../r/enkianknight/helping/package.gno | 14 +- .../extracted/r/hello/hello/pkg_metadata.json | 2 +- .../extracted/r/hello15/hello/package.gno | 6 +- .../r/hello15/hello/pkg_metadata.json | 2 +- .../extracted/r/michelle/hello/package.gno | 5 + .../r/michelle/hello/pkg_metadata.json | 1 + .../extracted/r/michelle22/hello/package.gno | 5 + .../r/michelle22/hello/pkg_metadata.json | 1 + .../extracted/r/test/hello/pkg_metadata.json | 2 +- .../extracted/r/test/test/package.gno | 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 +- 40 files changed, 273 insertions(+), 267 deletions(-) create mode 100755 test3.gno.land/backup_0478747-0480197.jsonl create mode 100644 test3.gno.land/extracted/r/michelle/hello/package.gno create mode 100644 test3.gno.land/extracted/r/michelle/hello/pkg_metadata.json create mode 100644 test3.gno.land/extracted/r/michelle22/hello/package.gno create mode 100644 test3.gno.land/extracted/r/michelle22/hello/pkg_metadata.json diff --git a/test3.gno.land/README.md b/test3.gno.land/README.md index ef2bb377..47d62379 100644 --- a/test3.gno.land/README.md +++ b/test3.gno.land/README.md @@ -2,7 +2,7 @@ ## TXs ``` -9594 +9616 ``` ## addpkgs @@ -109,6 +109,7 @@ 3 "gno.land/r/michelle22/testpoll" 3 "gno.land/r/michelle22/mood1" 3 "gno.land/r/michelle/mood" + 3 "gno.land/r/michelle/hello" 3 "gno.land/r/lolz2/raffle" 3 "gno.land/r/lololabs/llb" 3 "gno.land/r/leon/pollr" @@ -560,6 +561,7 @@ 1 "gno.land/r/michelle22/valopertest" 1 "gno.land/r/michelle22/moodv2" 1 "gno.land/r/michelle22/main" + 1 "gno.land/r/michelle22/hello" 1 "gno.land/r/michelle22/gnosocial" 1 "gno.land/r/michelle/testpoll" 1 "gno.land/r/michelle/mymoodtest" @@ -1542,10 +1544,10 @@ 37 "gno.land/r/hello144/hello" 34 "gno.land/r/jeronimoalbi/poll_v1" 26 "gno.land/r/demo/foo20" + 23 "gno.land/r/sdm/somedudefeedbacktest_8" 22 "gno.land/r/gnostudio/feedback_v1" 21 "gno.land/r/duysygame/test19" 20 "gno.land/r/duysyland/erc20" - 19 "gno.land/r/sdm/somedudefeedbacktest_8" 19 "gno.land/r/position" 19 "gno.land/r/demo/foo" 16 "gno.land/r/demo/gnoph" diff --git a/test3.gno.land/backup_0478747-0480197.jsonl b/test3.gno.land/backup_0478747-0480197.jsonl new file mode 100755 index 00000000..817641b8 --- /dev/null +++ b/test3.gno.land/backup_0478747-0480197.jsonl @@ -0,0 +1,22 @@ +{"tx":{"msg":[{"@type":"/vm.m_addpkg","creator":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","package":{"Name":"hello","Path":"gno.land/r/michelle22/hello","Files":[{"Name":"package.gno","Body":"package hello\n\nfunc Render(path string) string {\n return \"Hello World!\"\n}\n"}]},"deposit":"1ugnot"}],"fee":{"gas_wanted":"10000000","gas_fee":"50000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A7MWSLkjf+z/CYfMh6KVHEaHLDWpnfGBRDqFO81j1FRN"},"signature":"dOMUROPz1oWKOCft12E5J98GT/jhY6L1Y541p+UuNgseBiF2dQ2Vmvo2NRpbfAc79Y+PejHD+yC0rEoClH6wrw=="}],"memo":"Deployed through play.gno.land"},"blockNum":"479237"} +{"tx":{"msg":[{"@type":"/vm.m_addpkg","creator":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","package":{"Name":"hello","Path":"gno.land/r/michelle/hello","Files":[{"Name":"package.gno","Body":"package hello\n\nfunc Render(path string) string {\n return \"Hello World!\"\n}\n"}]},"deposit":"1ugnot"}],"fee":{"gas_wanted":"10000000","gas_fee":"50000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A7MWSLkjf+z/CYfMh6KVHEaHLDWpnfGBRDqFO81j1FRN"},"signature":"ZGeTduj51oTfhUycTopHX8G6mHbdYXlf7Q6q7Pn6dxlt7BjJjfIKHBpPPdVxKw6VwFSZ1KZA73MCs7eS4g6prg=="}],"memo":"Deployed through play.gno.land"},"blockNum":"479251"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"w/86MH/meaQ5L3kX/0RBB/auVg3f/LaBSH9Uf4bBh8FO4aFZ9eUUrTrcxPk/xRasLwB52PGpEXqbGtj4xJvYDg=="}],"memo":""},"blockNum":"479253"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"iyu3bDBe+1YyKbo6mP0uV+0pACiPW7QkKA1QNPn9uvwGT7mV0WivbGchbAdQRVby5dAnx6QpW6WII/koNH0gtA=="}],"memo":""},"blockNum":"479255"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"nxDSmtRBlIuh3LcuRuEuYrJtEoSrsHtugGo9WrFxYSlQ0YW8Ht4lH+fiRVo3K3ZXXGPWfc8xkZ4R8k26lgA9qQ=="}],"memo":""},"blockNum":"479257"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"7aCRTQY9KM5SGln4wwGfW51fCTFSbYrwQdgscjiy7IJ1bZJzMnmt61HfNLWGOCok1M/pNyXiR8UVfjJLFTz3aw=="}],"memo":""},"blockNum":"479259"} +{"tx":{"msg":[{"@type":"/vm.m_addpkg","creator":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","package":{"Name":"hello","Path":"gno.land/r/michelle/hello","Files":[{"Name":"package.gno","Body":"package hello\n\nfunc Render(path string) string {\n return \"Hello World!\"\n}\n"}]},"deposit":"1ugnot"}],"fee":{"gas_wanted":"10000000","gas_fee":"50000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A7MWSLkjf+z/CYfMh6KVHEaHLDWpnfGBRDqFO81j1FRN"},"signature":"0R27hOx2Bbqvqq0LlMjy1lY1hWeUyxesHh9NprPuMWBn8ZvlcmSJY6V4B2l8hcoSD2NqIRfDKi5bismZN/Wv7Q=="}],"memo":"Deployed through play.gno.land"},"blockNum":"479261"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"A6yW1XHO5gC71+h/hyo8x6Bo+Z9ZoIF/b/FcjNb07WtvGbFxVE49uwNEVQ4MjZm1vJ3UIw8KwkixCaCC5Qtv2w=="}],"memo":""},"blockNum":"479264"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"gHN2Nq6kqEvMb+VskMr251KXhiCI5eOYUSQjmxb8hSpxpG21lO/x52m92SOObPtsoBoOzRLIxR/35ERiy6Wzig=="}],"memo":""},"blockNum":"479332"} +{"tx":{"msg":[{"@type":"/vm.m_addpkg","creator":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","package":{"Name":"hello","Path":"gno.land/r/michelle/hello","Files":[{"Name":"package.gno","Body":"package hello\n\nfunc Render(path string) string {\n return \"Hello World!\"\n}\n"}]},"deposit":"1ugnot"}],"fee":{"gas_wanted":"10000000","gas_fee":"50000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A7MWSLkjf+z/CYfMh6KVHEaHLDWpnfGBRDqFO81j1FRN"},"signature":"KNDI/nc7LlKIiIb0EPjw1tlmKrtHRLThSrwyzOcj5ol2dMbXY/Mg4TKbfGY1sYBpGBNoj8ONa6lOfPt7qh67AA=="}],"memo":"Deployed through play.gno.land"},"blockNum":"479335"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1qgdjh6zvzzc8gv3fzk0mu9mezh6gan9hdpx04h","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"SFAASk5CIpNa6yfFLqFuUZhoG8w/t0dzs1a0KwsJsxYkKIP4F37BIJcvJdFJMpuyOKzMTDe7hVqWma/5dSKJJA=="}],"memo":""},"blockNum":"479343"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1qgdjh6zvzzc8gv3fzk0mu9mezh6gan9hdpx04h","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"NiiRt8/Jakht6s5fzWpJymKNnaZFmWYkHAHR5OkQpGUND7Brm3om2ooS3gf2zLN9XU21DcAWTfweAoJYQcTeWw=="}],"memo":""},"blockNum":"479345"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1qgdjh6zvzzc8gv3fzk0mu9mezh6gan9hdpx04h","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"Sln7DgiuQKMoGFNpNfIBXYqwxOdfbsC84S+CsIKOaf1cKhrl5T29iXXUfDpi/my/k80B0gl/45nJ8kqBJd6ikg=="}],"memo":""},"blockNum":"479347"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1qgdjh6zvzzc8gv3fzk0mu9mezh6gan9hdpx04h","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"LyuN1a0GHUTL7CZoAdzhfw8h06upNr2DphLhEv7M2PgFpVjV3NxXNnU5oGLJAVewPVNjJ95jIfq4iomXWdvPHw=="}],"memo":""},"blockNum":"479349"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1qgdjh6zvzzc8gv3fzk0mu9mezh6gan9hdpx04h","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"XnEPlvdE782z6cosIh0ye15uT8H25vh4EeWuNo1ywJMS2U+L8msX+BAkJaZ60cPoIbyzwphTKDdjqcVKFV9/5Q=="}],"memo":""},"blockNum":"479352"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1qgdjh6zvzzc8gv3fzk0mu9mezh6gan9hdpx04h","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"lmsusqdv0kHrio0yeo3El+ME37Qe5QNOxrh/VNNk8VNYCvbjvscoFME21RH4w2NKffQ8acPRtCg+oMOLPPl0GA=="}],"memo":""},"blockNum":"479357"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1qgdjh6zvzzc8gv3fzk0mu9mezh6gan9hdpx04h","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"2JH8AG7rJYMjNFW9Q9i/zJrat6kjmcwysvsXgyT17k5SbCnsjIMw4kGryHy+cKnv5We6uFVt6sxN/l9qDBD9wA=="}],"memo":""},"blockNum":"479359"} +{"tx":{"msg":[{"@type":"/bank.MsgSend","from_address":"g13d7jc32adhc39erm5me38w5v7ej7lpvlnqjk73","to_address":"g1qgdjh6zvzzc8gv3fzk0mu9mezh6gan9hdpx04h","amount":"20000000ugnot"}],"fee":{"gas_wanted":"2000000","gas_fee":"1ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"A/+cjV0/gZkWzMqCul8aP5hC7M3yliIs17uinn/+66uR"},"signature":"hT0i5YdxwQuXnAvGwX07R/L24cLC/iAv9S56dVubpRdIZIorxlj7sLy+8OCNKSVhkXs1K6i1ydd51ljucZAw7A=="}],"memo":""},"blockNum":"479361"} +{"tx":{"msg":[{"@type":"/vm.m_call","caller":"g15ruzptpql4dpuyzej0wkt5rq6r26kw4nxu9fwd","send":"","pkg_path":"gno.land/r/sdm/somedudefeedbacktest_8","func":"GetRole","args":null}],"fee":{"gas_wanted":"10000000","gas_fee":"50000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"Ax8dMlyeZTx7/5c7upbCj/sMsgJdjajg4b8kgHZ+d1mV"},"signature":"aQSj/aTl4BvZazzxKJVGnHJMVeMOJk0d1UMvvW++wRB2YsIYco2Ir5sKr90+EE6Y9iYNWgXKt969Hw+Wct0F8w=="}],"memo":"Called through gno.studio"},"blockNum":"479836"} +{"tx":{"msg":[{"@type":"/vm.m_call","caller":"g15ruzptpql4dpuyzej0wkt5rq6r26kw4nxu9fwd","send":"","pkg_path":"gno.land/r/sdm/somedudefeedbacktest_8","func":"GetRole","args":null}],"fee":{"gas_wanted":"10000000","gas_fee":"50000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"Ax8dMlyeZTx7/5c7upbCj/sMsgJdjajg4b8kgHZ+d1mV"},"signature":"9VDNjesZ4+92T7L5bO3HBk58M5JJEsZXNV1EhGPhpYoQJCHTmHoR6VJkA6fSLmGvPolrgdNHuqy/aWUD2MqLiA=="}],"memo":"Called through gno.studio"},"blockNum":"479839"} +{"tx":{"msg":[{"@type":"/vm.m_call","caller":"g15ruzptpql4dpuyzej0wkt5rq6r26kw4nxu9fwd","send":"","pkg_path":"gno.land/r/sdm/somedudefeedbacktest_8","func":"GetRole","args":null}],"fee":{"gas_wanted":"10000000","gas_fee":"50000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"Ax8dMlyeZTx7/5c7upbCj/sMsgJdjajg4b8kgHZ+d1mV"},"signature":"JchZbmOTVaCQ37p+lfUS15tSUwhYX07p+ZX+RZR7fDEEAW1LX898UwVQggmtyTFKjfw5OAD4CeY4PsFBQJL6eA=="}],"memo":"Called through gno.studio"},"blockNum":"479842"} +{"tx":{"msg":[{"@type":"/vm.m_call","caller":"g15ruzptpql4dpuyzej0wkt5rq6r26kw4nxu9fwd","send":"","pkg_path":"gno.land/r/sdm/somedudefeedbacktest_8","func":"GetRole","args":null}],"fee":{"gas_wanted":"10000000","gas_fee":"50000ugnot"},"signatures":[{"pub_key":{"@type":"/tm.PubKeySecp256k1","value":"Ax8dMlyeZTx7/5c7upbCj/sMsgJdjajg4b8kgHZ+d1mV"},"signature":"S5tjnyv6p2cDFUwz1+qwNBfDH06JAdiVX7nWADqeG4UU+LPuLx+sIClzOXieOX54XdDu8YlAD32TJjLhPjnPHA=="}],"memo":"Called through gno.studio"},"blockNum":"479845"} diff --git a/test3.gno.land/extracted/p/demo/hello/pkg_metadata.json b/test3.gno.land/extracted/p/demo/hello/pkg_metadata.json index 92e977de..9f6c0a85 100644 --- a/test3.gno.land/extracted/p/demo/hello/pkg_metadata.json +++ b/test3.gno.land/extracted/p/demo/hello/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","deposit":""} \ No newline at end of file +{"creator":"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/extracted/p/stuyk/test/package.gno b/test3.gno.land/extracted/p/stuyk/test/package.gno index 9ac46482..d36874bc 100644 --- a/test3.gno.land/extracted/p/stuyk/test/package.gno +++ b/test3.gno.land/extracted/p/stuyk/test/package.gno @@ -1,20 +1,5 @@ -package userinvokes +package hello -import "fmt" - -var user_invokes map[string]int - -func Render(name string) string { - if (!user_invokes) { - user_invokes = make(map[string]int) - } - - - if (!user_invokes[name]) { - user_invokes[name] += 1 - } else { - user_invokes = 1 - } - - return fmt.Println("Total user invokes %d", user_invokes[name]) +func Render(path string) string { + return "Hello World!" } diff --git a/test3.gno.land/extracted/p/test/test/package.gno b/test3.gno.land/extracted/p/test/test/package.gno index 3abe3591..deb91233 100644 --- a/test3.gno.land/extracted/p/test/test/package.gno +++ b/test3.gno.land/extracted/p/test/test/package.gno @@ -1,117 +1,17 @@ -package mynonfungibletoken +package counter -import ( - "std" - "gno.land/p/demo/grc/grc721" - "gno.land/p/demo/users" - "gno.land/p/demo/ufmt" -) +import "fmt" -var ( - admin std.Address = "g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj" // set admin account - mynonfungibletoken = grc721.NewBasicNFT("mynonfungibletoken", "MNFT") -) +var count int -func init() { - mintNNFT(admin, 10) // @administrator (initial supply = 10 NFTs) +func Increment() { + count++ } -func mintNNFT(owner std.Address, n uint64) { - count := mynonfungibletoken.TokenCount() - for i := count; i < count+n; i++ { - tid := grc721.TokenID(ufmt.Sprintf("%d", i)) - mynonfungibletoken.Mint(owner, tid) - } +func Decrement() { + count-- } -// Getters - -func BalanceOf(user users.AddressOrName) uint64 { - balance, err := mynonfungibletoken.BalanceOf(user.Resolve()) - if err != nil { - panic(err) - } - return balance -} - -func OwnerOf(tid grc721.TokenID) std.Address { - owner, err := mynonfungibletoken.OwnerOf(tid) - if err != nil { - panic(err) - } - return owner -} - -func IsApprovedForAll(owner, user users.AddressOrName) bool { - return mynonfungibletoken.IsApprovedForAll(owner.Resolve(), user.Resolve()) -} - -func GetApproved(tid grc721.TokenID) std.Address { - addr, err := mynonfungibletoken.GetApproved(tid) - if err != nil { - panic(err) - } - return addr -} - -// Setters - -func Approve(user users.AddressOrName, tid grc721.TokenID) { - err := mynonfungibletoken.Approve(user.Resolve(), tid) - if err != nil { - panic(err) - } -} - -func SetApprovalForAll(user users.AddressOrName, approved bool) { - err := mynonfungibletoken.SetApprovalForAll(user.Resolve(), approved) - if err != nil { - panic(err) - } -} - -func TransferFrom(from, to users.AddressOrName, tid grc721.TokenID) { - err := mynonfungibletoken.TransferFrom(from.Resolve(), to.Resolve(), tid) - if err != nil { - panic(err) - } -} - -// Admin - -func Mint(to users.AddressOrName, tid grc721.TokenID) { - caller := std.PrevRealm().Addr() - assertIsAdmin(caller) - err := mynonfungibletoken.Mint(to.Resolve(), tid) - if err != nil { - panic(err) - } -} - -func Burn(tid grc721.TokenID) { - caller := std.PrevRealm().Addr() - assertIsAdmin(caller) - err := mynonfungibletoken.Burn(tid) - if err != nil { - panic(err) - } -} - -// Render - -func Render(path string) string { - switch { - case path == "": - return mynonfungibletoken.RenderHome() - default: - return "404\n" - } -} - -// Util - -func assertIsAdmin(address std.Address) { - if address != admin { - panic("restricted access") - } -} +func Render(_ string) string { + return fmt.Sprintf("Count: %d", count) +} \ No newline at end of file diff --git a/test3.gno.land/extracted/p/test/test/pkg_metadata.json b/test3.gno.land/extracted/p/test/test/pkg_metadata.json index b48daadc..5a212ab8 100644 --- a/test3.gno.land/extracted/p/test/test/pkg_metadata.json +++ b/test3.gno.land/extracted/p/test/test/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1dnllrdzwfhxv3evyk09y48mgn5phfjvtyrlzm7","deposit":""} \ No newline at end of file +{"creator":"g1ghfakgzr6q77etpg8jtas6llg4uvqnfl8skxxq","deposit":"1ugnot"} \ 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 c3867609..cd273623 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 = "g1sycj68ur0n7xytglx0me3f207ktudm80aqpysm" + admin std.Address = "g1hqzeju0p0eup9rgxa0pxvyc0y7wnzjrdvppsy5" ) 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 8a00c6df..59b3c1cc 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":"g1sycj68ur0n7xytglx0me3f207ktudm80aqpysm","deposit":""} \ No newline at end of file +{"creator":"g1098kpwkwv3r08cat9ssucrq4mznxyv855jgqvx","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/demo/GRC20.gno b/test3.gno.land/extracted/r/demo/demo/GRC20.gno index 1991ebc4..798e81cf 100644 --- a/test3.gno.land/extracted/r/demo/demo/GRC20.gno +++ b/test3.gno.land/extracted/r/demo/demo/GRC20.gno @@ -1,4 +1,4 @@ -package pup +package PERL import ( "std" @@ -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. @@ -25,11 +25,11 @@ 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) } @@ -37,7 +37,7 @@ func BalanceOf(owner users.AddressOrName) uint64 { } 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) } @@ -48,17 +48,17 @@ 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. @@ -66,13 +66,13 @@ func TransferFrom(from, to users.AddressOrName, amount uint64) { 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. @@ -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" diff --git a/test3.gno.land/extracted/r/demo/demo/pkg_metadata.json b/test3.gno.land/extracted/r/demo/demo/pkg_metadata.json index 048a0559..e0db475f 100644 --- a/test3.gno.land/extracted/r/demo/demo/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/demo/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1j8jwsce3vcry6s8qmmkxuwuhzww0j8396n3rgm","deposit":""} \ No newline at end of file +{"creator":"g10y2y4l4g7cx23tkl9jy5u638lw5aykvx7upqaz","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/doge/GRC20.gno b/test3.gno.land/extracted/r/demo/doge/GRC20.gno index 704c650b..b46d2617 100644 --- a/test3.gno.land/extracted/r/demo/doge/GRC20.gno +++ b/test3.gno.land/extracted/r/demo/doge/GRC20.gno @@ -11,12 +11,12 @@ import ( var ( doge *grc20.AdminToken - admin std.Address = "g16q43q86hleg3ggavtv08rnh5nytahpkga7ts7r" + admin std.Address = "g1dgztjqjvaa6fh7qqwewhqsnc9ny2dz33yllk8d" ) func init() { - doge = grc20.NewAdminToken("dogeToken", "doge", 6) - doge.Mint(admin, 1000000000) // @administrator + doge = grc20.NewAdminToken("doge", "doge", 6) + doge.Mint(admin, 4200000000) // @administrator } // method proxies as public functions. diff --git a/test3.gno.land/extracted/r/demo/doge/pkg_metadata.json b/test3.gno.land/extracted/r/demo/doge/pkg_metadata.json index eaf56e3f..47ece5ee 100644 --- a/test3.gno.land/extracted/r/demo/doge/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/doge/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g16q43q86hleg3ggavtv08rnh5nytahpkga7ts7r","deposit":""} \ No newline at end of file +{"creator":"g1dgztjqjvaa6fh7qqwewhqsnc9ny2dz33yllk8d","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 17e4a290..94992a7d 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 = "g1h6n749m920lvaef2qrpsa2vmssr4sq60ykqks3" + admin std.Address = "g1lk45335udge6nefk733e852rmexrc94m52tdt9" ) 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 445b8033..93356881 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":"g1h6n749m920lvaef2qrpsa2vmssr4sq60ykqks3","deposit":""} \ No newline at end of file +{"creator":"g1lk45335udge6nefk733e852rmexrc94m52tdt9","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/ripl/GRC20.gno b/test3.gno.land/extracted/r/demo/ripl/GRC20.gno index cc31f72e..5af2d5ef 100644 --- a/test3.gno.land/extracted/r/demo/ripl/GRC20.gno +++ b/test3.gno.land/extracted/r/demo/ripl/GRC20.gno @@ -1,4 +1,4 @@ -package RIPL +package ripl import ( "std" @@ -10,13 +10,13 @@ import ( ) var ( - RIPL *grc20.AdminToken - admin std.Address = "g1mdgdlen0nzzcycl7fq6dwyqq9qvlnm06gx5h9p" + ripl *grc20.AdminToken + admin std.Address = "g1jcsmkq74jr6uxfpfcytjvruyuqje7lqk2zfxxp" ) func init() { - RIPL = grc20.NewAdminToken("RIPLToken", "RIPL", 6) - RIPL.Mint(admin, 1000000000) // @administrator + ripl = grc20.NewAdminToken("RiplToken", "RIPL", 6) + ripl.Mint(admin, 1000000000) // @administrator } // method proxies as public functions. @@ -25,11 +25,11 @@ func init() { // getters. func TotalSupply() uint64 { - return RIPL.TotalSupply() + return ripl.TotalSupply() } func BalanceOf(owner users.AddressOrName) uint64 { - balance, err := RIPL.BalanceOf(owner.Resolve()) + balance, err := ripl.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 := RIPL.Allowance(owner.Resolve(), spender.Resolve()) + allowance, err := ripl.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() - RIPL.Transfer(caller, to.Resolve(), amount) + ripl.Transfer(caller, to.Resolve(), amount) } func Approve(spender users.AddressOrName, amount uint64) { caller := std.GetOrigCaller() - RIPL.Approve(caller, spender.Resolve(), amount) + ripl.Approve(caller, spender.Resolve(), amount) } func TransferFrom(from, to users.AddressOrName, amount uint64) { caller := std.GetOrigCaller() - RIPL.TransferFrom(caller, from.Resolve(), to.Resolve(), amount) + ripl.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) - RIPL.Mint(address.Resolve(), amount) + ripl.Mint(address.Resolve(), amount) } func Burn(address users.AddressOrName, amount uint64) { caller := std.GetOrigCaller() assertIsAdmin(caller) - RIPL.Burn(address.Resolve(), amount) + ripl.Burn(address.Resolve(), amount) } // render. @@ -84,10 +84,10 @@ func Render(path string) string { switch { case path == "": - return RIPL.RenderHome() + return ripl.RenderHome() case c == 2 && parts[0] == "balance": owner := users.AddressOrName(parts[1]) - balance, _ := RIPL.BalanceOf(owner.Resolve()) + balance, _ := ripl.BalanceOf(owner.Resolve()) return ufmt.Sprintf("%d\n", balance) default: return "404\n" diff --git a/test3.gno.land/extracted/r/demo/ripl/pkg_metadata.json b/test3.gno.land/extracted/r/demo/ripl/pkg_metadata.json index 7db432c4..d9b539e5 100644 --- a/test3.gno.land/extracted/r/demo/ripl/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/ripl/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1mdgdlen0nzzcycl7fq6dwyqq9qvlnm06gx5h9p","deposit":""} \ No newline at end of file +{"creator":"g1jcsmkq74jr6uxfpfcytjvruyuqje7lqk2zfxxp","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo/users/GRC20.gno b/test3.gno.land/extracted/r/demo/users/GRC20.gno index 2a59b550..8108381a 100644 --- a/test3.gno.land/extracted/r/demo/users/GRC20.gno +++ b/test3.gno.land/extracted/r/demo/users/GRC20.gno @@ -1,4 +1,4 @@ -package test +package foo import ( "std" @@ -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. @@ -25,11 +25,11 @@ 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) } @@ -37,7 +37,7 @@ func BalanceOf(owner users.AddressOrName) uint64 { } 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) } @@ -48,17 +48,17 @@ 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. @@ -66,13 +66,13 @@ func TransferFrom(from, to users.AddressOrName, amount uint64) { 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. @@ -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" diff --git a/test3.gno.land/extracted/r/demo/users/pkg_metadata.json b/test3.gno.land/extracted/r/demo/users/pkg_metadata.json index bd33f568..bc1c081a 100644 --- a/test3.gno.land/extracted/r/demo/users/pkg_metadata.json +++ b/test3.gno.land/extracted/r/demo/users/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g1fq4akfudp3aenz9kmkvh4pf6sr0yvxcr3eq703","deposit":""} \ No newline at end of file +{"creator":"g14nddjdkaqh3r84rs69txay6vqt8e4mf730v5ym","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 6794c070..213b87e5 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":"g1p809wnm9glgxu8lauaeattqlwh92gd0vcrlm46","deposit":""} \ No newline at end of file +{"creator":"g140pvdhzwxtg8yazp5zfqtmshqnt2mefs764yrw","deposit":""} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/demo2/greeting/package.gno b/test3.gno.land/extracted/r/demo2/greeting/package.gno index 5e90a08c..d36874bc 100644 --- a/test3.gno.land/extracted/r/demo2/greeting/package.gno +++ b/test3.gno.land/extracted/r/demo2/greeting/package.gno @@ -1,14 +1,5 @@ package hello -var ( - greeting string -) - -func SetGreeting(msg string) { - greeting = msg -} - -func GetGreeting()) string { - return "greeting" +func Render(path string) string { + return "Hello World!" } - \ 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 d36874bc..64c6d4bc 100644 --- a/test3.gno.land/extracted/r/enkianknight/helping/package.gno +++ b/test3.gno.land/extracted/r/enkianknight/helping/package.gno @@ -1,5 +1,13 @@ -package hello +package helping -func Render(path string) string { - return "Hello World!" +var ( + helping string +) + + func SetHelping(msg string) { + helping=msg } + +func GetHelping() string { + return helping +} \ No newline at end of file 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 ab25f738..e0db475f 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":"g15wmukt79xymnnu6c4de32trnufudqum60yrxu8","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g10y2y4l4g7cx23tkl9jy5u638lw5aykvx7upqaz","deposit":"1ugnot"} \ 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/michelle/hello/package.gno b/test3.gno.land/extracted/r/michelle/hello/package.gno new file mode 100644 index 00000000..d36874bc --- /dev/null +++ b/test3.gno.land/extracted/r/michelle/hello/package.gno @@ -0,0 +1,5 @@ +package hello + +func Render(path string) string { + return "Hello World!" +} diff --git a/test3.gno.land/extracted/r/michelle/hello/pkg_metadata.json b/test3.gno.land/extracted/r/michelle/hello/pkg_metadata.json new file mode 100644 index 00000000..35b0ec65 --- /dev/null +++ b/test3.gno.land/extracted/r/michelle/hello/pkg_metadata.json @@ -0,0 +1 @@ +{"creator":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/michelle22/hello/package.gno b/test3.gno.land/extracted/r/michelle22/hello/package.gno new file mode 100644 index 00000000..d36874bc --- /dev/null +++ b/test3.gno.land/extracted/r/michelle22/hello/package.gno @@ -0,0 +1,5 @@ +package hello + +func Render(path string) string { + return "Hello World!" +} diff --git a/test3.gno.land/extracted/r/michelle22/hello/pkg_metadata.json b/test3.gno.land/extracted/r/michelle22/hello/pkg_metadata.json new file mode 100644 index 00000000..35b0ec65 --- /dev/null +++ b/test3.gno.land/extracted/r/michelle22/hello/pkg_metadata.json @@ -0,0 +1 @@ +{"creator":"g1778y2yphxs2wpuaflsy5y9qwcd4gttn4g5yjx5","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/test/hello/pkg_metadata.json b/test3.gno.land/extracted/r/test/hello/pkg_metadata.json index ab25f738..e0db475f 100644 --- a/test3.gno.land/extracted/r/test/hello/pkg_metadata.json +++ b/test3.gno.land/extracted/r/test/hello/pkg_metadata.json @@ -1 +1 @@ -{"creator":"g15wmukt79xymnnu6c4de32trnufudqum60yrxu8","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g10y2y4l4g7cx23tkl9jy5u638lw5aykvx7upqaz","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/extracted/r/test/test/package.gno b/test3.gno.land/extracted/r/test/test/package.gno index d36874bc..7dab608c 100644 --- a/test3.gno.land/extracted/r/test/test/package.gno +++ b/test3.gno.land/extracted/r/test/test/package.gno @@ -1,4 +1,4 @@ -package hello +package main func Render(path string) string { return "Hello World!" 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 5235ccf7..ce8c5e6e 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":"g1fsu3z335h5qngf7t3lmakvpmpwg9ae76tqwh7c","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g1c74t34ukg2lq39nxx5cddlkvjtfrm3zchnzvk6","deposit":""} \ 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 723d6d20..a0c2f9ce 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 Test1(option1 []string) string { +func Render(path 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 5235ccf7..11e3b6de 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":"g1fsu3z335h5qngf7t3lmakvpmpwg9ae76tqwh7c","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g1yc0x2kj67mj564zsjyp27t5zya5eynnrdqkpqv","deposit":""} \ 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 a7cab217..1023eba5 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 d49bf393..a8bc39aa 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":"g1fdk37llu9sfu9mdupmzjx34v2nrrdnk2757e0j","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g15ruzptpql4dpuyzej0wkt5rq6r26kw4nxu9fwd","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 1ad09377..fa070f27 100644 --- a/test3.gno.land/extracted/r/x1unix/feedback/v3/gno.mod +++ b/test3.gno.land/extracted/r/x1unix/feedback/v3/gno.mod @@ -3,5 +3,4 @@ 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 b126311b..949196d7 100644 --- a/test3.gno.land/extracted/r/x1unix/feedback/v3/package.gno +++ b/test3.gno.land/extracted/r/x1unix/feedback/v3/package.gno @@ -5,14 +5,30 @@ import ( "strings" "time" - "gno.land/p/demo/seqid" "gno.land/p/demo/ufmt" ) -const maxCharsCount = 256 + +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") +) type Feedback struct { - ID seqid.ID + ID int User std.Address Content string Response string @@ -20,37 +36,77 @@ type Feedback struct { RespondAt time.Time } -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 set -} - var ( - nextID seqid.ID + nextID = 1 isLocked = false - feedbacks map[seqid.ID]Feedback - ownerAddr = std.Address( - // TODO: put realm's owner address - "g1fdk37llu9sfu9mdupmzjx34v2nrrdnk2757e0j", - ) - modsAddrs = newAddrSet( - // TODO: add mod wallets - "g1fdk37llu9sfu9mdupmzjx34v2nrrdnk2757e0j", - ) + feedbacks = []Feedback{} + modAddrs = []std.Address{} ) -func isModerator(addr std.Address) bool { - _, ok := modsAddrs[addr] - return ok +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 + } + } + + return notFoundIndex, false +} + +func findModerator(addr std.Address) int { + for i, modAddr := range modAddrs { + if modAddr == addr { + return i + } + } + + return notFoundIndex } // assertIsModerator checks whether a current caller is owner or a moderator. func assertIsModerator() { actorId := std.GetOrigCaller() - isAllowed := actorId == ownerAddr || isModerator(actorId) + isAllowed := actorId == ownerAddr || findModerator(actorId) != notFoundIndex if !isAllowed { panic("Access Denied") } @@ -99,43 +155,43 @@ func SubmitFeedback(message string) string { panic("Message is too long") } - id := nextID.Next() - feedbacks[id] = Feedback{ + id := nextID + feedbacks = append(feedbacks, Feedback{ ID: id, User: std.GetOrigCaller(), - Content: message, + Content: stripHtml(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 seqid.ID) string { +func BanFeedback(feedbackID int) string { assertIsModerator() - assertNotLocked() - feedback, ok := feedbacks[feedbackID] + i, ok := findFeedback(feedbackID) if !ok { panic("Feedback not found") } // Still keep the record but remove a harmful message. - feedback.Content = "" - feedbacks[feedbackID] = feedback + feedbacks[i].Content = "" return "Feedback was removed by a moderator" } // RespondToFeedback allows any moderator or realm owner to leave a response to a feedback. -func RespondToFeedback(feedbackID seqid.ID, response string) string { - assertIsModerator() +func RespondToFeedback(feedbackID int, response string) string { assertNotLocked() + assertIsModerator() - feedback, ok := feedbacks[feedbackID] + i, ok := findFeedback(feedbackID) if !ok { panic("Feedback not found") } + feedback := feedbacks[i] if feedback.Response != "" { panic("Feedback already has a response") } @@ -150,18 +206,40 @@ func RespondToFeedback(feedbackID seqid.ID, response string) string { } feedback.RespondAt = time.Now() - feedback.Response = response - feedbacks[feedbackID] = feedback + feedback.Response = stripHtml(response) + feedbacks[i] = 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(path string) string { +func Render(_ string) string { sb := strings.Builder{} sb.WriteString("# Feedback Collection\n") - for id, fb := range feedbacks { - sb.WriteString(ufmt.Sprintf("## Feedback #%d\n", id)) + for _, fb := range feedbacks { + sb.WriteString(ufmt.Sprintf("## Feedback #%d\n", fb.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*") @@ -174,11 +252,10 @@ func Render(path string) string { continue } - sb.WriteString("### Response") - sb.WriteString(ufmt.Sprintf("At %s\n\n", fb.CreatedAt.Format(time.RFC1123))) + sb.WriteString("### Response\n") + sb.WriteString(ufmt.Sprintf("At %s\n\n", fb.RespondAt.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 d49bf393..a8bc39aa 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":"g1fdk37llu9sfu9mdupmzjx34v2nrrdnk2757e0j","deposit":"1ugnot"} \ No newline at end of file +{"creator":"g15ruzptpql4dpuyzej0wkt5rq6r26kw4nxu9fwd","deposit":"1ugnot"} \ No newline at end of file diff --git a/test3.gno.land/metadata.json b/test3.gno.land/metadata.json index 892cbeda..52d4b7ce 100644 --- a/test3.gno.land/metadata.json +++ b/test3.gno.land/metadata.json @@ -1,3 +1,3 @@ { - "latest_block_height": 478747 + "latest_block_height": 480197 }