From 2b229a8c9397f572ccb62dd24df3eef90a840658 Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:44:14 +0100 Subject: [PATCH 1/4] chore: refactor gnoland/home Signed-off-by: moul <94029+moul@users.noreply.github.com> --- examples/gno.land/r/gnoland/home/home.gno | 416 ++++++++++------------ 1 file changed, 190 insertions(+), 226 deletions(-) diff --git a/examples/gno.land/r/gnoland/home/home.gno b/examples/gno.land/r/gnoland/home/home.gno index 1264f5332e4..f745a3bc004 100644 --- a/examples/gno.land/r/gnoland/home/home.gno +++ b/examples/gno.land/r/gnoland/home/home.gno @@ -2,10 +2,11 @@ package home import ( "std" + "strconv" "gno.land/p/demo/ownable" - "gno.land/p/demo/ufmt" "gno.land/p/demo/ui" + "gno.land/p/moul/dynreplacer" blog "gno.land/r/gnoland/blog" events "gno.land/r/gnoland/events" "gno.land/r/leon/hof" @@ -17,234 +18,38 @@ import ( var ( override string - admin = ownable.NewWithAddress("g1manfred47kzduec920z88wfr64ylksmdcedlf5") // @moul + Admin = ownable.NewWithAddress("g1manfred47kzduec920z88wfr64ylksmdcedlf5") // @moul ) func Render(_ string) string { - if override != "" { - return override - } + r := dynreplacer.New() + r.RegisterCallback(":latest-blogposts:", func() string { + return blog.RenderLastPostsWidget(4) + }) + r.RegisterCallback(":upcoming-events:", func() string { + out, _ := events.RenderEventWidget(events.MaxWidgetSize) + return out + }) + r.RegisterCallback(":latest-hof:", func() string { + return hof.RenderExhibWidget(5) + }) + r.RegisterCallback(":qotb:", quoteOfTheBlock) + r.RegisterCallback(":chain-height:", func() string { + return strconv.Itoa(int(std.ChainHeight())) + }) - dom := ui.DOM{Prefix: "r/gnoland/home:"} - dom.Title = "Welcome to gno.land" - dom.Classes = []string{"gno-tmpl-section"} - - // body - dom.Body.Append(introSection()...) - - dom.Body.Append(ui.Jumbotron(discoverLinks())) - - dom.Body.Append( - ui.Columns{3, []ui.Element{ - lastBlogposts(4), - upcomingEvents(), - latestHOFItems(5), - }}, - ) - - dom.Body.Append(ui.HR{}) - dom.Body.Append(playgroundSection()...) - dom.Body.Append(ui.HR{}) - dom.Body.Append(packageStaffPicks()...) - dom.Body.Append(ui.HR{}) - dom.Body.Append(worxDAO()...) - dom.Body.Append(ui.HR{}) - // footer - dom.Footer.Append( - ui.Columns{2, []ui.Element{ - socialLinks(), - quoteOfTheBlock(), - }}, - ) - - // Testnet disclaimer - dom.Footer.Append( - ui.HR{}, - ui.Bold("This is a testnet."), - ui.Text("Package names are not guaranteed to be available for production."), - ) - - return dom.String() -} + template := `# Welcome to gno.land -func lastBlogposts(limit int) ui.Element { - posts := blog.RenderLastPostsWidget(limit) - return ui.Element{ - ui.H2("[Latest Blogposts](/r/gnoland/blog)"), - ui.Text(posts), - } -} +**We’re building gno.land, set to become the leading open-source smart contract platform, using Gno, an interpreted and fully deterministic variation of the Go programming language for succinct and composable smart contracts.** -func lastContributions(limit int) ui.Element { - return ui.Element{ - ui.H2("Latest Contributions"), - // TODO: import r/gh to - ui.Link{Text: "View latest contributions", URL: "https://github.com/gnolang/gno/pulls"}, - } -} +With transparent and timeless code, gno.land is the next generation of smart contract platforms, serving as the “GitHub” of the ecosystem, with realms built using fully transparent, auditable code that anyone can inspect and reuse. -func upcomingEvents() ui.Element { - out, _ := events.RenderEventWidget(events.MaxWidgetSize) - return ui.Element{ - ui.H2("[Latest Events](/r/gnoland/events)"), - ui.Text(out), - } -} -func latestHOFItems(num int) ui.Element { - submissions := hof.RenderExhibWidget(num) +Intuitive and easy to use, gno.land lowers the barrier to web3 and makes censorship-resistant platforms accessible to everyone. If you want to help lay the foundations of a fairer and freer world, join us today. - return ui.Element{ - ui.H2("[Hall of Fame](/r/leon/hof)"), - ui.Text(submissions), - } -} - -func introSection() ui.Element { - return ui.Element{ - ui.Text("**We’re building gno.land, set to become the leading open-source smart contract platform, using Gno, an interpreted and fully deterministic variation of the Go programming language for succinct and composable smart contracts.**"), - ui.Paragraph("With transparent and timeless code, gno.land is the next generation of smart contract platforms, serving as the “GitHub” of the ecosystem, with realms built using fully transparent, auditable code that anyone can inspect and reuse."), - ui.Paragraph("Intuitive and easy to use, gno.land lowers the barrier to web3 and makes censorship-resistant platforms accessible to everyone. If you want to help lay the foundations of a fairer and freer world, join us today."), - } -} - -func worxDAO() ui.Element { - // WorxDAO - // XXX(manfred): please, let me finish a v0, then we can iterate - // highest level == highest responsibility - // teams are responsible for components they don't owne - // flag : realm maintainers VS facilitators - // teams - // committee of trustees to create the directory - // each directory is a name, has a parent and have groups - // homepage team - blocks aggregating events - // XXX: TODO - /*` - # Directory - - * gno.land (owned by group) - * - * gnovm - * gnolang (language) - * gnovm - - current challenges / concerns / issues - * tm2 - * amino - * - - ## Contributors - ``*/ - return ui.Element{ - ui.H2("Contributions (WorxDAO & GoR)"), - // TODO: GoR dashboard + WorxDAO topics - ui.Text(`coming soon`), - } -} +
-func quoteOfTheBlock() ui.Element { - quotes := []string{ - "Gno is for Truth.", - "Gno is for Social Coordination.", - "Gno is _not only_ for DeFi.", - "Now, you Gno.", - "Come for the Go, Stay for the Gno.", - } - height := std.ChainHeight() - idx := int(height) % len(quotes) - qotb := quotes[idx] - - return ui.Element{ - ui.H2(ufmt.Sprintf("Quote of the ~Day~ Block#%d", height)), - ui.Quote(qotb), - } -} - -func socialLinks() ui.Element { - return ui.Element{ - ui.H2("Socials"), - ui.BulletList{ - // XXX: improve UI to support a nice GO api for such links - ui.Text("Check out our [community projects](https://github.com/gnolang/awesome-gno)"), - ui.Text("[Discord](https://discord.gg/S8nKUqwkPn)"), - ui.Text("[Twitter](https://twitter.com/_gnoland)"), - ui.Text("[Youtube](https://www.youtube.com/@_gnoland)"), - ui.Text("[Telegram](https://t.me/gnoland)"), - }, - } -} - -func playgroundSection() ui.Element { - return ui.Element{ - ui.H2("[Gno Playground](https://play.gno.land)"), - ui.Paragraph(`Gno Playground is a web application designed for building, running, testing, and interacting -with your Gno code, enhancing your understanding of the Gno language. With Gno Playground, you can share your code, -execute tests, deploy your realms and packages to gno.land, and explore a multitude of other features.`), - ui.Paragraph("Experience the convenience of code sharing and rapid experimentation with [Gno Playground](https://play.gno.land)."), - } -} - -func packageStaffPicks() ui.Element { - // XXX: make it modifiable from a DAO - return ui.Element{ - ui.H2("Explore New Packages and Realms"), - ui.Columns{ - 3, - []ui.Element{ - { - ui.H3("[r/gnoland](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/gnoland)"), - ui.BulletList{ - ui.Link{URL: "r/gnoland/blog"}, - ui.Link{URL: "r/gnoland/dao"}, - ui.Link{URL: "r/gnoland/faucet"}, - ui.Link{URL: "r/gnoland/home"}, - ui.Link{URL: "r/gnoland/pages"}, - }, - ui.H3("[r/sys](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/sys)"), - ui.BulletList{ - ui.Link{URL: "r/sys/names"}, - ui.Link{URL: "r/sys/rewards"}, - ui.Link{URL: "/r/sys/validators/v2"}, - }, - }, { - ui.H3("[r/demo](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/demo)"), - ui.BulletList{ - ui.Link{URL: "r/demo/boards"}, - ui.Link{URL: "r/demo/users"}, - ui.Link{URL: "r/demo/banktest"}, - ui.Link{URL: "r/demo/foo20"}, - ui.Link{URL: "r/demo/foo721"}, - ui.Link{URL: "r/demo/microblog"}, - ui.Link{URL: "r/demo/nft"}, - ui.Link{URL: "r/demo/types"}, - ui.Link{URL: "r/demo/art/gnoface"}, - ui.Link{URL: "r/demo/art/millipede"}, - ui.Link{URL: "r/demo/groups"}, - ui.Text("..."), - }, - }, { - ui.H3("[p/demo](https://github.com/gnolang/gno/tree/master/examples/gno.land/p/demo)"), - ui.BulletList{ - ui.Link{URL: "p/demo/avl"}, - ui.Link{URL: "p/demo/blog"}, - ui.Link{URL: "p/demo/ui"}, - ui.Link{URL: "p/demo/ufmt"}, - ui.Link{URL: "p/demo/merkle"}, - ui.Link{URL: "p/demo/bf"}, - ui.Link{URL: "p/demo/flow"}, - ui.Link{URL: "p/demo/gnode"}, - ui.Link{URL: "p/demo/grc/grc20"}, - ui.Link{URL: "p/demo/grc/grc721"}, - ui.Text("..."), - }, - }, - }, - }, - } -} - -func discoverLinks() ui.Element { - return ui.Element{ - ui.Text(`
+
## Learn about gno.land @@ -283,16 +88,175 @@ func discoverLinks() ui.Element { - [Faucet Hub](https://faucet.gno.land)
-
`), +
+
+ +
+
+ +## [Latest Blogposts](/r/gnoland/blog) + +:latest-blogposts: + +
+
+ +## [Latest Events](/r/gnoland/events) + +:upcoming-events: +
+
+ +## [Hall of Fame](/r/leon/hof) + + +
+
+ + +--- + +## [Gno Playground](https://play.gno.land) + + +Gno Playground is a web application designed for building, running, testing, and interacting +with your Gno code, enhancing your understanding of the Gno language. With Gno Playground, you can share your code, +execute tests, deploy your realms and packages to gno.land, and explore a multitude of other features. + + +Experience the convenience of code sharing and rapid experimentation with [Gno Playground](https://play.gno.land). + + +--- + +## Explore New Packages and Realms + +
+
+ +### [r/gnoland](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/gnoland) + +- [r/gnoland/blog](r/gnoland/blog) +- [r/gnoland/dao](r/gnoland/dao) +- [r/gnoland/faucet](r/gnoland/faucet) +- [r/gnoland/home](r/gnoland/home) +- [r/gnoland/pages](r/gnoland/pages) + +### [r/sys](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/sys) + +- [r/sys/names](r/sys/names) +- [r/sys/rewards](r/sys/rewards) +- [/r/sys/validators/v2](/r/sys/validators/v2) + +
+
+ +### [r/demo](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/demo) + +- [r/demo/boards](r/demo/boards) +- [r/demo/users](r/demo/users) +- [r/demo/banktest](r/demo/banktest) +- [r/demo/foo20](r/demo/foo20) +- [r/demo/foo721](r/demo/foo721) +- [r/demo/microblog](r/demo/microblog) +- [r/demo/nft](r/demo/nft) +- [r/demo/types](r/demo/types) +- [r/demo/art/gnoface](r/demo/art/gnoface) +- [r/demo/art/millipede](r/demo/art/millipede) +- [r/demo/groups](r/demo/groups) +- ... + +
+
+ +### [p/demo](https://github.com/gnolang/gno/tree/master/examples/gno.land/p/demo) + +- [p/demo/avl](p/demo/avl) +- [p/demo/blog](p/demo/blog) +- [p/demo/ui](p/demo/ui) +- [p/demo/ufmt](p/demo/ufmt) +- [p/demo/merkle](p/demo/merkle) +- [p/demo/bf](p/demo/bf) +- [p/demo/flow](p/demo/flow) +- [p/demo/gnode](p/demo/gnode) +- [p/demo/grc/grc20](p/demo/grc/grc20) +- [p/demo/grc/grc721](p/demo/grc/grc721) +- ... + +
+
+ + +--- + +## Contributions (WorxDAO & GoR) + +coming soon + +--- + + +
+
+ +## Socials + +- Check out our [community projects](https://github.com/gnolang/awesome-gno) +- [Discord](https://discord.gg/S8nKUqwkPn) +- [Twitter](https://twitter.com/_gnoland) +- [Youtube](https://www.youtube.com/@_gnoland) +- [Telegram](https://t.me/gnoland) + +
+
+ + +## Quote of the ~Day~ Block#:chain-height: + +> :qotb: + +
+
+ + +--- + +**This is a testnet.** +Package names are not guaranteed to be available for production. + +` + + if override != "" { + template = override } + result := r.Replace(template) + return result } -func AdminSetOverride(content string) { - admin.AssertCallerIsOwner() - override = content +func latestHOFItems(num int) ui.Element { + submissions := hof.RenderExhibWidget(num) + + return ui.Element{ + ui.H2("[Hall of Fame](/r/leon/hof)"), + ui.Text(submissions), + } } -func AdminTransferOwnership(newAdmin std.Address) { - admin.AssertCallerIsOwner() - admin.TransferOwnership(newAdmin) +func quoteOfTheBlock() string { + quotes := []string{ + "Gno is for Truth.", + "Gno is for Social Coordination.", + "Gno is _not only_ for DeFi.", + "Now, you Gno.", + "Come for the Go, Stay for the Gno.", + } + height := std.ChainHeight() + idx := int(height) % len(quotes) + qotb := quotes[idx] + return qotb +} + +func AdminSetOverride(content string) { + Admin.AssertCallerIsOwner() + override = content } From e4aba66a2886963f45737e52d4d611de49cdbfea Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Fri, 28 Feb 2025 17:32:49 +0100 Subject: [PATCH 2/4] chore: fixup Signed-off-by: moul <94029+moul@users.noreply.github.com> --- examples/gno.land/r/gnoland/home/home.gno | 90 +++++------------------ 1 file changed, 17 insertions(+), 73 deletions(-) diff --git a/examples/gno.land/r/gnoland/home/home.gno b/examples/gno.land/r/gnoland/home/home.gno index f745a3bc004..cfe4332e2b5 100644 --- a/examples/gno.land/r/gnoland/home/home.gno +++ b/examples/gno.land/r/gnoland/home/home.gno @@ -40,17 +40,17 @@ func Render(_ string) string { template := `# Welcome to gno.land -**We’re building gno.land, set to become the leading open-source smart contract platform, using Gno, an interpreted and fully deterministic variation of the Go programming language for succinct and composable smart contracts.** +**We’re building gno.land, set to become the leading open-source smart contract +**platform, using Gno, an interpreted and fully deterministic variation of the +**Go programming language for succinct and composable smart contracts.** -With transparent and timeless code, gno.land is the next generation of smart contract platforms, serving as the “GitHub” of the ecosystem, with realms built using fully transparent, auditable code that anyone can inspect and reuse. +With transparent and timeless code, gno.land is the next generation of smart +contract platforms, serving as the “GitHub” of the ecosystem, with realms built +using fully transparent, auditable code that anyone can inspect and reuse. - -Intuitive and easy to use, gno.land lowers the barrier to web3 and makes censorship-resistant platforms accessible to everyone. If you want to help lay the foundations of a fairer and freer world, join us today. - -
- -
-
+Intuitive and easy to use, gno.land lowers the barrier to web3 and makes +censorship-resistant platforms accessible to everyone. If you want to help lay +the foundations of a fairer and freer world, join us today. ## Learn about gno.land @@ -63,10 +63,6 @@ Intuitive and easy to use, gno.land lowers the barrier to web3 and makes censors - [Explore the Ecosystem](/ecosystem) - [Careers](https://jobs.ashbyhq.com/allinbits) -
- -
- ## Build with Gno - [Write Gno in the browser](https://play.gno.land) @@ -76,9 +72,6 @@ Intuitive and easy to use, gno.land lowers the barrier to web3 and makes censors - [Efficient local development for Gno](https://docs.gno.land/gno-tooling/cli/gno-tooling-gnodev) - [Get testnet GNOTs](https://faucet.gno.land) -
-
- ## Explore the universe - [Discover demo packages](https://github.com/gnolang/gno/tree/master/examples) @@ -87,53 +80,33 @@ Intuitive and easy to use, gno.land lowers the barrier to web3 and makes censors - [Testnet 4](https://test4.gno.land/) - [Faucet Hub](https://faucet.gno.land) -
-
-
- -
-
- ## [Latest Blogposts](/r/gnoland/blog) :latest-blogposts: -
-
- ## [Latest Events](/r/gnoland/events) :upcoming-events: -
-
## [Hall of Fame](/r/leon/hof) - -
-
- +:latest-hof: --- ## [Gno Playground](https://play.gno.land) -Gno Playground is a web application designed for building, running, testing, and interacting -with your Gno code, enhancing your understanding of the Gno language. With Gno Playground, you can share your code, -execute tests, deploy your realms and packages to gno.land, and explore a multitude of other features. - +Gno Playground is a web application designed for building, running, testing, and +interacting with your Gno code, enhancing your understanding of the Gno +language. With Gno Playground, you can share your code, execute tests, deploy +your realms and packages to gno.land, and explore a multitude of other features. -Experience the convenience of code sharing and rapid experimentation with [Gno Playground](https://play.gno.land). - - ---- +Experience the convenience of code sharing and rapid experimentation with +[Gno Playground](https://play.gno.land). ## Explore New Packages and Realms -
-
- ### [r/gnoland](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/gnoland) - [r/gnoland/blog](r/gnoland/blog) @@ -148,9 +121,6 @@ Experience the convenience of code sharing and rapid experimentation with [Gno P - [r/sys/rewards](r/sys/rewards) - [/r/sys/validators/v2](/r/sys/validators/v2) -
-
- ### [r/demo](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/demo) - [r/demo/boards](r/demo/boards) @@ -166,9 +136,6 @@ Experience the convenience of code sharing and rapid experimentation with [Gno P - [r/demo/groups](r/demo/groups) - ... -
-
- ### [p/demo](https://github.com/gnolang/gno/tree/master/examples/gno.land/p/demo) - [p/demo/avl](p/demo/avl) @@ -183,22 +150,8 @@ Experience the convenience of code sharing and rapid experimentation with [Gno P - [p/demo/grc/grc721](p/demo/grc/grc721) - ... -
-
- - ---- - -## Contributions (WorxDAO & GoR) - -coming soon - --- - -
-
- ## Socials - Check out our [community projects](https://github.com/gnolang/awesome-gno) @@ -207,24 +160,15 @@ coming soon - [Youtube](https://www.youtube.com/@_gnoland) - [Telegram](https://t.me/gnoland) -
-
- - ## Quote of the ~Day~ Block#:chain-height: > :qotb: -
-
- - --- **This is a testnet.** Package names are not guaranteed to be available for production. - -` +` if override != "" { template = override From 8f8d695a8db278bfd367107d0c3082bc16fcb44c Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Fri, 28 Feb 2025 17:35:52 +0100 Subject: [PATCH 3/4] chore: fixup Signed-off-by: moul <94029+moul@users.noreply.github.com> --- examples/gno.land/r/gnoland/home/home.gno | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/gno.land/r/gnoland/home/home.gno b/examples/gno.land/r/gnoland/home/home.gno index cfe4332e2b5..0e4c764709c 100644 --- a/examples/gno.land/r/gnoland/home/home.gno +++ b/examples/gno.land/r/gnoland/home/home.gno @@ -40,9 +40,9 @@ func Render(_ string) string { template := `# Welcome to gno.land -**We’re building gno.land, set to become the leading open-source smart contract -**platform, using Gno, an interpreted and fully deterministic variation of the -**Go programming language for succinct and composable smart contracts.** +We’re building gno.land, set to become the leading open-source smart contract +platform, using Gno, an interpreted and fully deterministic variation of the +Go programming language for succinct and composable smart contracts. With transparent and timeless code, gno.land is the next generation of smart contract platforms, serving as the “GitHub” of the ecosystem, with realms built From f0a9ce9024e89df892f80d2114a117d717c8591c Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Fri, 28 Feb 2025 17:40:28 +0100 Subject: [PATCH 4/4] chore: fixup Signed-off-by: moul <94029+moul@users.noreply.github.com> --- .../gno.land/r/gnoland/home/home_filetest.gno | 86 ++++--------------- ...ide_filetest.gno => override_filetest.gno} | 7 +- 2 files changed, 20 insertions(+), 73 deletions(-) rename examples/gno.land/r/gnoland/home/{overide_filetest.gno => override_filetest.gno} (65%) diff --git a/examples/gno.land/r/gnoland/home/home_filetest.gno b/examples/gno.land/r/gnoland/home/home_filetest.gno index 5b5ff5740c3..78b3fa54225 100644 --- a/examples/gno.land/r/gnoland/home/home_filetest.gno +++ b/examples/gno.land/r/gnoland/home/home_filetest.gno @@ -7,21 +7,19 @@ func main() { } // Output: -//
-// // # Welcome to gno.land // -// **We’re building gno.land, set to become the leading open-source smart contract platform, using Gno, an interpreted and fully deterministic variation of the Go programming language for succinct and composable smart contracts.** -// -// With transparent and timeless code, gno.land is the next generation of smart contract platforms, serving as the “GitHub” of the ecosystem, with realms built using fully transparent, auditable code that anyone can inspect and reuse. -// -// -// Intuitive and easy to use, gno.land lowers the barrier to web3 and makes censorship-resistant platforms accessible to everyone. If you want to help lay the foundations of a fairer and freer world, join us today. +// We’re building gno.land, set to become the leading open-source smart contract +// platform, using Gno, an interpreted and fully deterministic variation of the +// Go programming language for succinct and composable smart contracts. // -//
+// With transparent and timeless code, gno.land is the next generation of smart +// contract platforms, serving as the “GitHub” of the ecosystem, with realms built +// using fully transparent, auditable code that anyone can inspect and reuse. // -//
-//
+// Intuitive and easy to use, gno.land lowers the barrier to web3 and makes +// censorship-resistant platforms accessible to everyone. If you want to help lay +// the foundations of a fairer and freer world, join us today. // // ## Learn about gno.land // @@ -34,10 +32,6 @@ func main() { // - [Explore the Ecosystem](/ecosystem) // - [Careers](https://jobs.ashbyhq.com/allinbits) // -//
-// -//
-// // ## Build with Gno // // - [Write Gno in the browser](https://play.gno.land) @@ -47,9 +41,6 @@ func main() { // - [Efficient local development for Gno](https://docs.gno.land/gno-tooling/cli/gno-tooling-gnodev) // - [Get testnet GNOTs](https://faucet.gno.land) // -//
-//
-// // ## Explore the universe // // - [Discover demo packages](https://github.com/gnolang/gno/tree/master/examples) @@ -58,52 +49,33 @@ func main() { // - [Testnet 4](https://test4.gno.land/) // - [Faucet Hub](https://faucet.gno.land) // -//
-//
-//
-// -//
-//
-// // ## [Latest Blogposts](/r/gnoland/blog) // // No posts. -//
-//
// // ## [Latest Events](/r/gnoland/events) // // No events. -//
-//
// // ## [Hall of Fame](/r/leon/hof) // // -//
-//
-// // // --- // // ## [Gno Playground](https://play.gno.land) // // -// Gno Playground is a web application designed for building, running, testing, and interacting -// with your Gno code, enhancing your understanding of the Gno language. With Gno Playground, you can share your code, -// execute tests, deploy your realms and packages to gno.land, and explore a multitude of other features. -// +// Gno Playground is a web application designed for building, running, testing, and +// interacting with your Gno code, enhancing your understanding of the Gno +// language. With Gno Playground, you can share your code, execute tests, deploy +// your realms and packages to gno.land, and explore a multitude of other features. // -// Experience the convenience of code sharing and rapid experimentation with [Gno Playground](https://play.gno.land). -// -// -// --- +// Experience the convenience of code sharing and rapid experimentation with +// [Gno Playground](https://play.gno.land). // // ## Explore New Packages and Realms // -//
-//
-// // ### [r/gnoland](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/gnoland) // // - [r/gnoland/blog](r/gnoland/blog) @@ -118,9 +90,6 @@ func main() { // - [r/sys/rewards](r/sys/rewards) // - [/r/sys/validators/v2](/r/sys/validators/v2) // -//
-//
-// // ### [r/demo](https://github.com/gnolang/gno/tree/master/examples/gno.land/r/demo) // // - [r/demo/boards](r/demo/boards) @@ -136,9 +105,6 @@ func main() { // - [r/demo/groups](r/demo/groups) // - ... // -//
-//
-// // ### [p/demo](https://github.com/gnolang/gno/tree/master/examples/gno.land/p/demo) // // - [p/demo/avl](p/demo/avl) @@ -153,22 +119,8 @@ func main() { // - [p/demo/grc/grc721](p/demo/grc/grc721) // - ... // -//
-//
-// -// -// --- -// -// ## Contributions (WorxDAO & GoR) -// -// coming soon -// // --- // -// -//
-//
-// // ## Socials // // - Check out our [community projects](https://github.com/gnolang/awesome-gno) @@ -177,20 +129,12 @@ func main() { // - [Youtube](https://www.youtube.com/@_gnoland) // - [Telegram](https://t.me/gnoland) // -//
-//
-// // ## Quote of the ~Day~ Block#123 // // > Now, you Gno. // -//
-//
-// -// // --- // // **This is a testnet.** // Package names are not guaranteed to be available for production. // -//
diff --git a/examples/gno.land/r/gnoland/home/overide_filetest.gno b/examples/gno.land/r/gnoland/home/override_filetest.gno similarity index 65% rename from examples/gno.land/r/gnoland/home/overide_filetest.gno rename to examples/gno.land/r/gnoland/home/override_filetest.gno index 70c59cbaded..5d0bae2efcb 100644 --- a/examples/gno.land/r/gnoland/home/overide_filetest.gno +++ b/examples/gno.land/r/gnoland/home/override_filetest.gno @@ -8,10 +8,12 @@ import ( ) func main() { - std.TestSetOriginCaller("g1manfred47kzduec920z88wfr64ylksmdcedlf5") + var admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5") + std.TestSetOriginCaller(admin) home.AdminSetOverride("Hello World!") + println("---") println(home.Render("")) - home.AdminTransferOwnership(testutils.TestAddress("newAdmin")) + home.Admin.TransferOwnership(testutils.TestAddress("newAdmin")) defer func() { r := recover() println("r: ", r) @@ -20,5 +22,6 @@ func main() { } // Output: +// --- // Hello World! // r: ownable: caller is not owner