Skip to content

Commit

Permalink
fix(portal-loop): hotfix revert "chore: rename r/manfred -> r/moul (g…
Browse files Browse the repository at this point in the history
…nolang#2820)" (gnolang#2865)

This reverts commit bdc9d0e.

Waiting for the portal loop to be backed up on a repository that we can
patch before applying this commit again.
  • Loading branch information
moul authored Sep 27, 2024
1 parent 1e27785 commit 69400d4
Show file tree
Hide file tree
Showing 45 changed files with 109 additions and 117 deletions.
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
/examples/gno.land/p/demo/svg/ @moul
/examples/gno.land/p/demo/tamagotchi/ @moul
/examples/gno.land/p/demo/ui/ @moul
/examples/gno.land/p/moul/ @moul
/examples/gno.land/r/demo/ @gnolang/tech-staff @gnolang/devrels
/examples/gno.land/r/demo/art/ @moul
/examples/gno.land/r/demo/memeland/ @leohhhn
Expand All @@ -43,7 +42,7 @@
/examples/gno.land/r/gnoland/ @moul
/examples/gno.land/r/sys/ @moul
/examples/gno.land/r/jaekwon/ @jaekwon
/examples/gno.land/r/moul/ @moul
/examples/gno.land/r/manfred/ @moul

# Gno.land.
/gno.land/ @moul @zivkovicmilos
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/foo20/foo20.gno
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
)

func init() {
admin = ownable.NewWithAddress("g1manfred47kzduec920z88wfr64ylksmdcedlf5") // @moul
admin = ownable.NewWithAddress("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq") // @manfred
banker = grc20.NewBanker("Foo", "FOO", 4)
banker.Mint(admin.Owner(), 1000000*10000) // @administrator (1M)
token = banker.Token()
Expand Down
4 changes: 2 additions & 2 deletions examples/gno.land/r/demo/foo20/foo20_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func TestReadOnlyPublicMethods(t *testing.T) {
var (
admin = pusers.AddressOrName("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
admin = pusers.AddressOrName("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")
alice = pusers.AddressOrName(testutils.TestAddress("alice"))
bob = pusers.AddressOrName(testutils.TestAddress("bob"))
)
Expand Down Expand Up @@ -60,7 +60,7 @@ func TestReadOnlyPublicMethods(t *testing.T) {

func TestErrConditions(t *testing.T) {
var (
admin = pusers.AddressOrName("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
admin = pusers.AddressOrName("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")
alice = pusers.AddressOrName(testutils.TestAddress("alice"))
empty = pusers.AddressOrName("")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestReadOnlyPublicMethods(t *testing.T) {
admin := std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj")
manfred := std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
manfred := std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")
unknown := std.Address("g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5") // valid but never used.
NewWithAdmin("Foo", "FOO", 4, 10_000*1_000_000, 0, admin)
NewWithAdmin("Bar", "BAR", 4, 10_000*1_000, 0, admin)
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/groups/z_1_a_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

var gid groups.GroupID

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/groups/z_2_a_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

var gid groups.GroupID

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/users.gno
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// State

var (
admin std.Address = "g1manfred47kzduec920z88wfr64ylksmdcedlf5" // @moul
admin std.Address = "g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq" // @moul

restricted avl.Tree // Name -> true - restricted name
name2User avl.Tree // Name -> *users.User
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_10_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func init() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_11_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_11b_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_2_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_3_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_4_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_5_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_6_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller()
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_7_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_7b_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_8_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/users/z_9_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"gno.land/r/demo/users"
)

const admin = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
const admin = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func main() {
caller := std.GetOrigCaller() // main
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/gnoland/blog/admin.gno
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (

func init() {
// adminAddr = std.GetOrigCaller() // FIXME: find a way to use this from the main's genesis.
adminAddr = "g1manfred47kzduec920z88wfr64ylksmdcedlf5" // @moul
adminAddr = "g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq"
}

func AdminSetAdminAddr(addr std.Address) {
Expand Down
16 changes: 8 additions & 8 deletions examples/gno.land/r/gnoland/blog/gnoblog_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func TestPackage(t *testing.T) {
std.TestSetOrigCaller(std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5"))
std.TestSetOrigCaller(std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq"))

author := std.GetOrigCaller()

Expand Down Expand Up @@ -59,7 +59,7 @@ Tags: [#tag1](/r/gnoland/blog:t/tag1) [#tag3](/r/gnoland/blog:t/tag3)
Written by moul on 20 May 2022
Published by g1manfred47kzduec920z88wfr64ylksmdcedlf5 to Gnoland's Blog
Published by g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq to Gnoland's Blog
---
<details><summary>Comment section</summary>
Expand Down Expand Up @@ -110,20 +110,20 @@ Tags: [#tag1](/r/gnoland/blog:t/tag1) [#tag3](/r/gnoland/blog:t/tag3)
Written by moul on 20 May 2022
Published by g1manfred47kzduec920z88wfr64ylksmdcedlf5 to Gnoland's Blog
Published by g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq to Gnoland's Blog
---
<details><summary>Comment section</summary>
<h5>comment4
</h5><h6>by g1manfred47kzduec920z88wfr64ylksmdcedlf5 on 13 Feb 09 23:31 UTC</h6>
</h5><h6>by g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq on 13 Feb 09 23:31 UTC</h6>
---
<h5>comment2
</h5><h6>by g1manfred47kzduec920z88wfr64ylksmdcedlf5 on 13 Feb 09 23:31 UTC</h6>
</h5><h6>by g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq on 13 Feb 09 23:31 UTC</h6>
---
Expand Down Expand Up @@ -152,20 +152,20 @@ Tags: [#tag1](/r/gnoland/blog:t/tag1) [#tag4](/r/gnoland/blog:t/tag4)
Written by manfred on 20 May 2022
Published by g1manfred47kzduec920z88wfr64ylksmdcedlf5 to Gnoland's Blog
Published by g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq to Gnoland's Blog
---
<details><summary>Comment section</summary>
<h5>comment4
</h5><h6>by g1manfred47kzduec920z88wfr64ylksmdcedlf5 on 13 Feb 09 23:31 UTC</h6>
</h5><h6>by g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq on 13 Feb 09 23:31 UTC</h6>
---
<h5>comment2
</h5><h6>by g1manfred47kzduec920z88wfr64ylksmdcedlf5 on 13 Feb 09 23:31 UTC</h6>
</h5><h6>by g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq on 13 Feb 09 23:31 UTC</h6>
---
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/gnoland/home/home.gno
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

var (
override string
admin = ownable.NewWithAddress("g1manfred47kzduec920z88wfr64ylksmdcedlf5") // @moul
admin = ownable.NewWithAddress("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq") // @manfred by default
)

func Render(_ string) string {
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/gnoland/home/overide_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func main() {
std.TestSetOrigCaller("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
std.TestSetOrigCaller("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")
home.AdminSetOverride("Hello World!")
println(home.Render(""))
home.AdminTransferOwnership(testutils.TestAddress("newAdmin"))
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/gnoland/pages/admin.gno
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (

func init() {
// adminAddr = std.GetOrigCaller() // FIXME: find a way to use this from the main's genesis.
adminAddr = "g1manfred47kzduec920z88wfr64ylksmdcedlf5" // @moul
adminAddr = "g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq"
}

func AdminSetAdminAddr(addr std.Address) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package config

import "std"

var addr = std.Address("g1manfred47kzduec920z88wfr64ylksmdcedlf5") // @moul
var addr = std.Address("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")

func Addr() std.Address {
return addr
Expand Down
1 change: 1 addition & 0 deletions examples/gno.land/r/manfred/config/gno.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module gno.land/r/manfred/config
2 changes: 2 additions & 0 deletions examples/gno.land/r/manfred/home/gno.mod
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module gno.land/r/manfred/home

require gno.land/r/manfred/config v0.0.0-latest
53 changes: 52 additions & 1 deletion examples/gno.land/r/manfred/home/home.gno
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
package home

import "gno.land/r/manfred/config"

var (
todos []string
status string
memeImgURL string
)

func init() {
todos = append(todos, "fill this todo list...")
status = "Online" // Initial status set to "Online"
memeImgURL = "https://i.imgflip.com/7ze8dc.jpg"
}

func Render(path string) string {
return "Moved to r/moul"
content := "# Manfred's (gn)home Dashboard\n\n"

content += "## Meme\n"
content += "![](" + memeImgURL + ")\n\n"

content += "## Status\n"
content += status + "\n\n"

content += "## Personal ToDo List\n"
for _, todo := range todos {
content += "- [ ] " + todo + "\n"
}
content += "\n"

// TODO: Implement a feature to list replies on r/boards on my posts
// TODO: Maybe integrate a calendar feature for upcoming events?

return content
}

func AddNewTodo(todo string) {
config.AssertIsAdmin()
todos = append(todos, todo)
}

func DeleteTodo(todoIndex int) {
config.AssertIsAdmin()
if todoIndex >= 0 && todoIndex < len(todos) {
// Remove the todo from the list by merging slices from before and after the todo
todos = append(todos[:todoIndex], todos[todoIndex+1:]...)
} else {
panic("Invalid todo index")
}
}

func UpdateStatus(newStatus string) {
config.AssertIsAdmin()
status = newStatus
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "gno.land/r/moul/home"
import "gno.land/r/manfred/home"

func main() {
println(home.Render(""))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package main
import (
"std"

"gno.land/r/moul/home"
"gno.land/r/manfred/home"
)

func main() {
std.TestSetOrigCaller("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
std.TestSetOrigCaller("g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq")
home.AddNewTodo("aaa")
home.AddNewTodo("bbb")
home.AddNewTodo("ccc")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (

func init() {
// adminAddr = std.GetOrigCaller() // FIXME: find a way to use this from the main's genesis.
adminAddr = "g1manfred47kzduec920z88wfr64ylksmdcedlf5"
adminAddr = "g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq"
}

func AdminSetAdminAddr(addr std.Address) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module gno.land/r/moul/present
module gno.land/r/manfred/present

require (
gno.land/p/demo/avl v0.0.0-latest
Expand Down
Loading

0 comments on commit 69400d4

Please sign in to comment.