diff --git a/examples/gno.land/r/demo/boards2/example_post.md b/examples/gno.land/r/demo/boards2/example_post.md deleted file mode 100644 index a452ad4c245..00000000000 --- a/examples/gno.land/r/demo/boards2/example_post.md +++ /dev/null @@ -1,3 +0,0 @@ -Hey all! 👋 - -This is my first post in this land! \ No newline at end of file diff --git a/examples/gno.land/r/demo/boards2/z_0_a_filetest.gno b/examples/gno.land/r/demo/boards2/z_0_a_filetest.gno deleted file mode 100644 index 5e8ff520a54..00000000000 --- a/examples/gno.land/r/demo/boards2/z_0_a_filetest.gno +++ /dev/null @@ -1,22 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -import ( - "gno.land/r/demo/boards" -) - -var bid boards.BoardID - -func init() { - bid = boards.CreateBoard("test_board") - boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - pid := boards.CreateThread(bid, "Second Post (title)", "Body of the second post. (body)") - boards.CreateReply(bid, pid, pid, "Reply of the second post") -} - -func main() { - println(boards.Render("test_board")) -} - -// Error: -// unauthorized diff --git a/examples/gno.land/r/demo/boards2/z_0_b_filetest.gno b/examples/gno.land/r/demo/boards2/z_0_b_filetest.gno deleted file mode 100644 index 9bcbe9ffafa..00000000000 --- a/examples/gno.land/r/demo/boards2/z_0_b_filetest.gno +++ /dev/null @@ -1,23 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 19900000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var bid boards.BoardID - -func init() { - users.Register("", "gnouser", "my profile") - bid = boards.CreateBoard("test_board") -} - -func main() { - println(boards.Render("test_board")) -} - -// Error: -// payment must not be less than 20000000 diff --git a/examples/gno.land/r/demo/boards2/z_0_c_filetest.gno b/examples/gno.land/r/demo/boards2/z_0_c_filetest.gno deleted file mode 100644 index 99fd339aed8..00000000000 --- a/examples/gno.land/r/demo/boards2/z_0_c_filetest.gno +++ /dev/null @@ -1,23 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var bid boards.BoardID - -func init() { - users.Register("", "gnouser", "my profile") - boards.CreateThread(1, "First Post (title)", "Body of the first post. (body)") -} - -func main() { - println(boards.Render("test_board")) -} - -// Error: -// board not exist diff --git a/examples/gno.land/r/demo/boards2/z_0_d_filetest.gno b/examples/gno.land/r/demo/boards2/z_0_d_filetest.gno deleted file mode 100644 index c77e60e3f3a..00000000000 --- a/examples/gno.land/r/demo/boards2/z_0_d_filetest.gno +++ /dev/null @@ -1,24 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var bid boards.BoardID - -func init() { - users.Register("", "gnouser", "my profile") - bid = boards.CreateBoard("test_board") - boards.CreateReply(bid, 0, 0, "Reply of the second post") -} - -func main() { - println(boards.Render("test_board")) -} - -// Error: -// thread not exist diff --git a/examples/gno.land/r/demo/boards2/z_0_e_filetest.gno b/examples/gno.land/r/demo/boards2/z_0_e_filetest.gno deleted file mode 100644 index 6db036e87ba..00000000000 --- a/examples/gno.land/r/demo/boards2/z_0_e_filetest.gno +++ /dev/null @@ -1,23 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var bid boards.BoardID - -func init() { - users.Register("", "gnouser", "my profile") - boards.CreateReply(bid, 0, 0, "Reply of the second post") -} - -func main() { - println(boards.Render("test_board")) -} - -// Error: -// board not exist diff --git a/examples/gno.land/r/demo/boards2/z_0_filetest.gno b/examples/gno.land/r/demo/boards2/z_0_filetest.gno deleted file mode 100644 index 4fc224da9b2..00000000000 --- a/examples/gno.land/r/demo/boards2/z_0_filetest.gno +++ /dev/null @@ -1,39 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 20000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var bid boards.BoardID - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - pid := boards.CreateThread(bid, "Second Post (title)", "Body of the second post. (body)") - boards.CreateReply(bid, pid, pid, "Reply of the second post") -} - -func main() { - println(boards.Render("test_board")) -} - -// Output: -// \[[post](/r/demo/boards$help&func=CreateThread&bid=1)] -// -// ---------------------------------------- -// ## [First Post (title)](/r/demo/boards:test_board/1) -// -// Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm UTC](/r/demo/boards:test_board/1) \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] (0 replies) (0 reposts) -// -// ---------------------------------------- -// ## [Second Post (title)](/r/demo/boards:test_board/2) -// -// Body of the second post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm UTC](/r/demo/boards:test_board/2) \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=2)] (1 replies) (0 reposts) diff --git a/examples/gno.land/r/demo/boards2/z_10_a_filetest.gno b/examples/gno.land/r/demo/boards2/z_10_a_filetest.gno deleted file mode 100644 index ad57283bfcf..00000000000 --- a/examples/gno.land/r/demo/boards2/z_10_a_filetest.gno +++ /dev/null @@ -1,34 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - pid = boards.CreateThread(bid, "First Post in (title)", "Body of the first post. (body)") -} - -func main() { - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) - // boardId 2 not exist - boards.DeletePost(2, pid, pid, "") - println("----------------------------------------------------") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Error: -// board not exist diff --git a/examples/gno.land/r/demo/boards2/z_10_b_filetest.gno b/examples/gno.land/r/demo/boards2/z_10_b_filetest.gno deleted file mode 100644 index cf8a332174f..00000000000 --- a/examples/gno.land/r/demo/boards2/z_10_b_filetest.gno +++ /dev/null @@ -1,34 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - pid = boards.CreateThread(bid, "First Post in (title)", "Body of the first post. (body)") -} - -func main() { - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) - // pid of 2 not exist - boards.DeletePost(bid, 2, 2, "") - println("----------------------------------------------------") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Error: -// thread not exist diff --git a/examples/gno.land/r/demo/boards2/z_10_c_filetest.gno b/examples/gno.land/r/demo/boards2/z_10_c_filetest.gno deleted file mode 100644 index f746877b5c7..00000000000 --- a/examples/gno.land/r/demo/boards2/z_10_c_filetest.gno +++ /dev/null @@ -1,48 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID - rid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - pid = boards.CreateThread(bid, "First Post in (title)", "Body of the first post. (body)") - rid = boards.CreateReply(bid, pid, pid, "First reply of the First post\n") -} - -func main() { - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) - boards.DeletePost(bid, pid, rid, "") - println("----------------------------------------------------") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// # First Post in (title) -// -// Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=1)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=1)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] -// -// > First reply of the First post -// > -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1/2) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=2)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=2)] -// -// ---------------------------------------------------- -// # First Post in (title) -// -// Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=1)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=1)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] diff --git a/examples/gno.land/r/demo/boards2/z_10_filetest.gno b/examples/gno.land/r/demo/boards2/z_10_filetest.gno deleted file mode 100644 index 8a6d11c79cf..00000000000 --- a/examples/gno.land/r/demo/boards2/z_10_filetest.gno +++ /dev/null @@ -1,39 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - pid = boards.CreateThread(bid, "First Post in (title)", "Body of the first post. (body)") -} - -func main() { - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) - boards.DeletePost(bid, pid, pid, "") - println("----------------------------------------------------") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// # First Post in (title) -// -// Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=1)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=1)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] -// -// ---------------------------------------------------- -// thread does not exist with id: 1 diff --git a/examples/gno.land/r/demo/boards2/z_11_a_filetest.gno b/examples/gno.land/r/demo/boards2/z_11_a_filetest.gno deleted file mode 100644 index d7dc7b90782..00000000000 --- a/examples/gno.land/r/demo/boards2/z_11_a_filetest.gno +++ /dev/null @@ -1,34 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - pid = boards.CreateThread(bid, "First Post in (title)", "Body of the first post. (body)") -} - -func main() { - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) - // board 2 not exist - boards.EditPost(2, pid, pid, "Edited: First Post in (title)", "Edited: Body of the first post. (body)") - println("----------------------------------------------------") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Error: -// board not exist diff --git a/examples/gno.land/r/demo/boards2/z_11_b_filetest.gno b/examples/gno.land/r/demo/boards2/z_11_b_filetest.gno deleted file mode 100644 index 3aa28095502..00000000000 --- a/examples/gno.land/r/demo/boards2/z_11_b_filetest.gno +++ /dev/null @@ -1,34 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - pid = boards.CreateThread(bid, "First Post in (title)", "Body of the first post. (body)") -} - -func main() { - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) - // thread 2 not exist - boards.EditPost(bid, 2, pid, "Edited: First Post in (title)", "Edited: Body of the first post. (body)") - println("----------------------------------------------------") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Error: -// thread not exist diff --git a/examples/gno.land/r/demo/boards2/z_11_c_filetest.gno b/examples/gno.land/r/demo/boards2/z_11_c_filetest.gno deleted file mode 100644 index df764303562..00000000000 --- a/examples/gno.land/r/demo/boards2/z_11_c_filetest.gno +++ /dev/null @@ -1,34 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - pid = boards.CreateThread(bid, "First Post in (title)", "Body of the first post. (body)") -} - -func main() { - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) - // post 2 not exist - boards.EditPost(bid, pid, 2, "Edited: First Post in (title)", "Edited: Body of the first post. (body)") - println("----------------------------------------------------") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Error: -// post not exist diff --git a/examples/gno.land/r/demo/boards2/z_11_d_filetest.gno b/examples/gno.land/r/demo/boards2/z_11_d_filetest.gno deleted file mode 100644 index de2b6aa463b..00000000000 --- a/examples/gno.land/r/demo/boards2/z_11_d_filetest.gno +++ /dev/null @@ -1,52 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID - rid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - pid = boards.CreateThread(bid, "First Post in (title)", "Body of the first post. (body)") - rid = boards.CreateReply(bid, pid, pid, "First reply of the First post\n") -} - -func main() { - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) - boards.EditPost(bid, pid, rid, "", "Edited: First reply of the First post\n") - println("----------------------------------------------------") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// # First Post in (title) -// -// Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=1)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=1)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] -// -// > First reply of the First post -// > -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1/2) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=2)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=2)] -// -// ---------------------------------------------------- -// # First Post in (title) -// -// Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=1)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=1)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] -// -// > Edited: First reply of the First post -// > -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1/2) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=2)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=2)] diff --git a/examples/gno.land/r/demo/boards2/z_11_filetest.gno b/examples/gno.land/r/demo/boards2/z_11_filetest.gno deleted file mode 100644 index 49ee0ee0273..00000000000 --- a/examples/gno.land/r/demo/boards2/z_11_filetest.gno +++ /dev/null @@ -1,42 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - pid = boards.CreateThread(bid, "First Post in (title)", "Body of the first post. (body)") -} - -func main() { - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) - boards.EditPost(bid, pid, pid, "Edited: First Post in (title)", "Edited: Body of the first post. (body)") - println("----------------------------------------------------") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// # First Post in (title) -// -// Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=1)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=1)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] -// -// ---------------------------------------------------- -// # Edited: First Post in (title) -// -// Edited: Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=1)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=1)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] diff --git a/examples/gno.land/r/demo/boards2/z_12_a_filetest.gno b/examples/gno.land/r/demo/boards2/z_12_a_filetest.gno deleted file mode 100644 index 909be880efa..00000000000 --- a/examples/gno.land/r/demo/boards2/z_12_a_filetest.gno +++ /dev/null @@ -1,32 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "std" - - "gno.land/p/demo/testutils" - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -func main() { - users.Register("", "gnouser", "my profile") - // create a post via registered user - bid1 := boards.CreateBoard("test_board1") - pid := boards.CreateThread(bid1, "First Post (title)", "Body of the first post. (body)") - bid2 := boards.CreateBoard("test_board2") - - // create a repost via anon user - test2 := testutils.TestAddress("test2") - std.TestSetOrigCaller(test2) - std.TestSetOrigSend(std.Coins{{"ugnot", 9000000}}, nil) - - rid := boards.CreateRepost(bid1, pid, "", "Check this out", bid2) - println(rid) - println(boards.Render("test_board1")) -} - -// Error: -// please register, otherwise minimum fee 100000000 is required if anonymous diff --git a/examples/gno.land/r/demo/boards2/z_12_b_filetest.gno b/examples/gno.land/r/demo/boards2/z_12_b_filetest.gno deleted file mode 100644 index 6b2166895c0..00000000000 --- a/examples/gno.land/r/demo/boards2/z_12_b_filetest.gno +++ /dev/null @@ -1,24 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -func main() { - users.Register("", "gnouser", "my profile") - bid1 := boards.CreateBoard("test_board1") - pid := boards.CreateThread(bid1, "First Post (title)", "Body of the first post. (body)") - bid2 := boards.CreateBoard("test_board2") - - // create a repost to a non-existing board - rid := boards.CreateRepost(5, pid, "", "Check this out", bid2) - println(rid) - println(boards.Render("test_board1")) -} - -// Error: -// src board not exist diff --git a/examples/gno.land/r/demo/boards2/z_12_c_filetest.gno b/examples/gno.land/r/demo/boards2/z_12_c_filetest.gno deleted file mode 100644 index 7397c487d7d..00000000000 --- a/examples/gno.land/r/demo/boards2/z_12_c_filetest.gno +++ /dev/null @@ -1,24 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -func main() { - users.Register("", "gnouser", "my profile") - bid1 := boards.CreateBoard("test_board1") - boards.CreateThread(bid1, "First Post (title)", "Body of the first post. (body)") - bid2 := boards.CreateBoard("test_board2") - - // create a repost to a non-existing thread - rid := boards.CreateRepost(bid1, 5, "", "Check this out", bid2) - println(rid) - println(boards.Render("test_board1")) -} - -// Error: -// thread not exist diff --git a/examples/gno.land/r/demo/boards2/z_12_d_filetest.gno b/examples/gno.land/r/demo/boards2/z_12_d_filetest.gno deleted file mode 100644 index 37b6473f7ac..00000000000 --- a/examples/gno.land/r/demo/boards2/z_12_d_filetest.gno +++ /dev/null @@ -1,24 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -func main() { - users.Register("", "gnouser", "my profile") - bid1 := boards.CreateBoard("test_board1") - pid := boards.CreateThread(bid1, "First Post (title)", "Body of the first post. (body)") - boards.CreateBoard("test_board2") - - // create a repost to a non-existing destination board - rid := boards.CreateRepost(bid1, pid, "", "Check this out", 5) - println(rid) - println(boards.Render("test_board1")) -} - -// Error: -// dst board not exist diff --git a/examples/gno.land/r/demo/boards2/z_12_filetest.gno b/examples/gno.land/r/demo/boards2/z_12_filetest.gno deleted file mode 100644 index 02953352dd2..00000000000 --- a/examples/gno.land/r/demo/boards2/z_12_filetest.gno +++ /dev/null @@ -1,40 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid1 boards.BoardID - bid2 boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid1 = boards.CreateBoard("test_board1") - pid = boards.CreateThread(bid1, "First Post (title)", "Body of the first post. (body)") - bid2 = boards.CreateBoard("test_board2") -} - -func main() { - rid := boards.CreateRepost(bid1, pid, "", "Check this out", bid2) - println(rid) - println(boards.Render("test_board2")) -} - -// Output: -// 1 -// \[[post](/r/demo/boards$help&func=CreateThread&bid=2)] -// -// ---------------------------------------- -// Repost: Check this out -// ## [First Post (title)](/r/demo/boards:test_board1/1) -// -// Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm UTC](/r/demo/boards:test_board1/1) \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] (0 replies) (1 reposts) diff --git a/examples/gno.land/r/demo/boards2/z_1_filetest.gno b/examples/gno.land/r/demo/boards2/z_1_filetest.gno deleted file mode 100644 index ba0a277e2f1..00000000000 --- a/examples/gno.land/r/demo/boards2/z_1_filetest.gno +++ /dev/null @@ -1,28 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var board *boards.Board - -func init() { - users.Register("", "gnouser", "my profile") - - _ = boards.CreateBoard("test_board_1") - _ = boards.CreateBoard("test_board_2") -} - -func main() { - println(boards.Render("")) -} - -// Output: -// These are all the boards of this realm: -// -// * [/r/demo/boards:test_board_1](/r/demo/boards:test_board_1) -// * [/r/demo/boards:test_board_2](/r/demo/boards:test_board_2) diff --git a/examples/gno.land/r/demo/boards2/z_2_filetest.gno b/examples/gno.land/r/demo/boards2/z_2_filetest.gno deleted file mode 100644 index 53c0a1965da..00000000000 --- a/examples/gno.land/r/demo/boards2/z_2_filetest.gno +++ /dev/null @@ -1,38 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - pid = boards.CreateThread(bid, "Second Post (title)", "Body of the second post. (body)") - boards.CreateReply(bid, pid, pid, "Reply of the second post") -} - -func main() { - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// # Second Post (title) -// -// Body of the second post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=2)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=2)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=2)] -// -// > Reply of the second post -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/3) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=3)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=3)] diff --git a/examples/gno.land/r/demo/boards2/z_3_filetest.gno b/examples/gno.land/r/demo/boards2/z_3_filetest.gno deleted file mode 100644 index 89e5a3f12ff..00000000000 --- a/examples/gno.land/r/demo/boards2/z_3_filetest.gno +++ /dev/null @@ -1,40 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - pid = boards.CreateThread(bid, "Second Post (title)", "Body of the second post. (body)") -} - -func main() { - rid := boards.CreateReply(bid, pid, pid, "Reply of the second post") - println(rid) - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// 3 -// # Second Post (title) -// -// Body of the second post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=2)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=2)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=2)] -// -// > Reply of the second post -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/3) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=3)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=3)] diff --git a/examples/gno.land/r/demo/boards2/z_4_filetest.gno b/examples/gno.land/r/demo/boards2/z_4_filetest.gno deleted file mode 100644 index fa0b9e20be5..00000000000 --- a/examples/gno.land/r/demo/boards2/z_4_filetest.gno +++ /dev/null @@ -1,892 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - pid = boards.CreateThread(bid, "Second Post (title)", "Body of the second post. (body)") - rid := boards.CreateReply(bid, pid, pid, "Reply of the second post") - println(rid) -} - -func main() { - rid2 := boards.CreateReply(bid, pid, pid, "Second reply of the second post") - println(rid2) - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// 3 -// 4 -// # Second Post (title) -// -// Body of the second post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=2)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=2)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=2)] -// -// > Reply of the second post -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/3) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=3)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=3)] -// -// > Second reply of the second post -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/4) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=4)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=4)] - -// Realm: -// switchrealm["gno.land/r/demo/users"] -// switchrealm["gno.land/r/demo/boards"] -// u[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:111]={ -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:111", -// "ModTime": "123", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:123", -// "RefCount": "1" -// }, -// "Value": { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "68663c8895d37d479e417c11e21badfe21345c61", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:112" -// } -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:125]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "16" -// }, -// "V": { -// "@type": "/gno.StringValue", -// "value": "0000000004" -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/r/demo/boards.Post" -// } -// }, -// "V": { -// "@type": "/gno.PointerValue", -// "Base": { -// "@type": "/gno.RefValue", -// "Escaped": true, -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:126" -// }, -// "Index": "0", -// "TV": null -// } -// }, -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "64" -// } -// }, -// { -// "N": "AQAAAAAAAAA=", -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "32" -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:125", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:124", -// "RefCount": "1" -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:124]={ -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:124", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:123", -// "RefCount": "1" -// }, -// "Value": { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "3f34ac77289aa1d5f9a2f8b6d083138325816fb0", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:125" -// } -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:123]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "16" -// }, -// "V": { -// "@type": "/gno.StringValue", -// "value": "0000000004" -// } -// }, -// {}, -// { -// "N": "AQAAAAAAAAA=", -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "64" -// } -// }, -// { -// "N": "AgAAAAAAAAA=", -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "32" -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// }, -// "V": { -// "@type": "/gno.PointerValue", -// "Base": { -// "@type": "/gno.RefValue", -// "Hash": "94a6665a44bac6ede7f3e3b87173e537b12f9532", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:111" -// }, -// "Index": "0", -// "TV": null -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// }, -// "V": { -// "@type": "/gno.PointerValue", -// "Base": { -// "@type": "/gno.RefValue", -// "Hash": "bc8e5b4e782a0bbc4ac9689681f119beb7b34d59", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:124" -// }, -// "Index": "0", -// "TV": null -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:123", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:122", -// "RefCount": "1" -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:122]={ -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:122", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:106", -// "RefCount": "1" -// }, -// "Value": { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "9957eadbc91dd32f33b0d815e041a32dbdea0671", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:123" -// } -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:128]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:128", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:127", -// "RefCount": "1" -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:129]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:129", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:127", -// "RefCount": "1" -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:130]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:130", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:127", -// "RefCount": "1" -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:131]={ -// "Fields": [ -// { -// "N": "AAAAgJSeXbo=", -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "65536" -// } -// }, -// { -// "N": "AbSNdvQQIhE=", -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "1024" -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "time.Location" -// } -// }, -// "V": { -// "@type": "/gno.PointerValue", -// "Base": { -// "@type": "/gno.RefValue", -// "Escaped": true, -// "ObjectID": "336074805fc853987abe6f7fe3ad97a6a6f3077a:2" -// }, -// "Index": "182", -// "TV": null -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:131", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:127", -// "RefCount": "1" -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:132]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "65536" -// } -// }, -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "1024" -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "time.Location" -// } -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:132", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:127", -// "RefCount": "1" -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:127]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/r/demo/boards.Board" -// } -// }, -// "V": { -// "@type": "/gno.PointerValue", -// "Base": { -// "@type": "/gno.RefValue", -// "Escaped": true, -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:84" -// }, -// "Index": "0", -// "TV": null -// } -// }, -// { -// "N": "BAAAAAAAAAA=", -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/r/demo/boards.PostID" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "std.Address" -// }, -// "V": { -// "@type": "/gno.StringValue", -// "value": "g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm" -// } -// }, -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "16" -// }, -// "V": { -// "@type": "/gno.StringValue", -// "value": "" -// } -// }, -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "16" -// }, -// "V": { -// "@type": "/gno.StringValue", -// "value": "Second reply of the second post" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Tree" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "f91e355bd19240f0f3350a7fa0e6a82b72225916", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:128" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Tree" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "9ee9c4117be283fc51ffcc5ecd65b75ecef5a9dd", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:129" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Tree" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "eb768b0140a5fe95f9c58747f0960d647dacfd42", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:130" -// } -// }, -// { -// "N": "AgAAAAAAAAA=", -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/r/demo/boards.PostID" -// } -// }, -// { -// "N": "AgAAAAAAAAA=", -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/r/demo/boards.PostID" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/r/demo/boards.BoardID" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "time.Time" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "0fd3352422af0a56a77ef2c9e88f479054e3d51f", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:131" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "time.Time" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "bed4afa8ffdbbf775451c947fc68b27a345ce32a", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:132" -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:127", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:126", -// "RefCount": "1" -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:126]={ -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:126", -// "IsEscaped": true, -// "ModTime": "0", -// "RefCount": "2" -// }, -// "Value": { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/r/demo/boards.Post" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "c45bbd47a46681a63af973db0ec2180922e4a8ae", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:127" -// } -// } -// } -// u[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:120]={ -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:120", -// "ModTime": "134", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:134", -// "RefCount": "1" -// }, -// "Value": { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "dc1f011553dc53e7a846049e08cc77fa35ea6a51", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:121" -// } -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:136]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "16" -// }, -// "V": { -// "@type": "/gno.StringValue", -// "value": "0000000004" -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/r/demo/boards.Post" -// } -// }, -// "V": { -// "@type": "/gno.PointerValue", -// "Base": { -// "@type": "/gno.RefValue", -// "Escaped": true, -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:126" -// }, -// "Index": "0", -// "TV": null -// } -// }, -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "64" -// } -// }, -// { -// "N": "AQAAAAAAAAA=", -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "32" -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:136", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:135", -// "RefCount": "1" -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:135]={ -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:135", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:134", -// "RefCount": "1" -// }, -// "Value": { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "96b86b4585c7f1075d7794180a5581f72733a7ab", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:136" -// } -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:134]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "16" -// }, -// "V": { -// "@type": "/gno.StringValue", -// "value": "0000000004" -// } -// }, -// {}, -// { -// "N": "AQAAAAAAAAA=", -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "64" -// } -// }, -// { -// "N": "AgAAAAAAAAA=", -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "32" -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// }, -// "V": { -// "@type": "/gno.PointerValue", -// "Base": { -// "@type": "/gno.RefValue", -// "Hash": "32274e1f28fb2b97d67a1262afd362d370de7faa", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:120" -// }, -// "Index": "0", -// "TV": null -// } -// }, -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// }, -// "V": { -// "@type": "/gno.PointerValue", -// "Base": { -// "@type": "/gno.RefValue", -// "Hash": "c2cfd6aec36a462f35bf02e5bf4a127aa1bb7ac2", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:135" -// }, -// "Index": "0", -// "TV": null -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:134", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:133", -// "RefCount": "1" -// } -// } -// c[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:133]={ -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:133", -// "ModTime": "0", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:107", -// "RefCount": "1" -// }, -// "Value": { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "5cb875179e86d32c517322af7a323b2a5f3e6cc5", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:134" -// } -// } -// } -// u[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:85]={ -// "Fields": [ -// { -// "N": "AQAAAAAAAAA=", -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/r/demo/boards.BoardID" -// } -// }, -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "16" -// }, -// "V": { -// "@type": "/gno.StringValue", -// "value": "/r/demo/boards:test_board" -// } -// }, -// { -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "16" -// }, -// "V": { -// "@type": "/gno.StringValue", -// "value": "test_board" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "std.Address" -// }, -// "V": { -// "@type": "/gno.StringValue", -// "value": "g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Tree" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "a416a751c3a45a1e5cba11e737c51340b081e372", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:86" -// } -// }, -// { -// "N": "BAAAAAAAAAA=", -// "T": { -// "@type": "/gno.PrimitiveType", -// "value": "65536" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "time.Time" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "36299fccbc13f2a84c4629fad4cb940f0bd4b1c6", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:87" -// } -// }, -// { -// "T": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Tree" -// }, -// "V": { -// "@type": "/gno.RefValue", -// "Hash": "af6ed0268f99b7f369329094eb6dfaea7812708b", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:88" -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:85", -// "ModTime": "121", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:84", -// "RefCount": "1" -// } -// } -// u[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:106]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// }, -// "V": { -// "@type": "/gno.PointerValue", -// "Base": { -// "@type": "/gno.RefValue", -// "Hash": "9809329dc1ddc5d3556f7a8fa3c2cebcbf65560b", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:122" -// }, -// "Index": "0", -// "TV": null -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:106", -// "ModTime": "121", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:105", -// "RefCount": "1" -// } -// } -// u[f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:107]={ -// "Fields": [ -// { -// "T": { -// "@type": "/gno.PointerType", -// "Elt": { -// "@type": "/gno.RefType", -// "ID": "gno.land/p/demo/avl.Node" -// } -// }, -// "V": { -// "@type": "/gno.PointerValue", -// "Base": { -// "@type": "/gno.RefValue", -// "Hash": "ceae9a1c4ed28bb51062e6ccdccfad0caafd1c4f", -// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:133" -// }, -// "Index": "0", -// "TV": null -// } -// } -// ], -// "ObjectInfo": { -// "ID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:107", -// "ModTime": "121", -// "OwnerID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:105", -// "RefCount": "1" -// } -// } -// switchrealm["gno.land/r/demo/boards"] -// switchrealm["gno.land/r/demo/users"] -// switchrealm["gno.land/r/demo/users"] -// switchrealm["gno.land/r/demo/users"] -// switchrealm["gno.land/r/demo/boards"] -// switchrealm["gno.land/r/demo/boards_test"] diff --git a/examples/gno.land/r/demo/boards2/z_5_b_filetest.gno b/examples/gno.land/r/demo/boards2/z_5_b_filetest.gno deleted file mode 100644 index e79da5c3677..00000000000 --- a/examples/gno.land/r/demo/boards2/z_5_b_filetest.gno +++ /dev/null @@ -1,31 +0,0 @@ -package main - -// SEND: 200000000ugnot - -import ( - "std" - "strconv" - - "gno.land/p/demo/testutils" - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -const admin = std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj") - -func main() { - users.Register("", "gnouser", "my profile") - // create board via registered user - bid := boards.CreateBoard("test_board") - - // create post via anon user - test2 := testutils.TestAddress("test2") - std.TestSetOrigCaller(test2) - std.TestSetOrigSend(std.Coins{{"ugnot", 9000000}}, nil) - - pid := boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Error: -// please register, otherwise minimum fee 100000000 is required if anonymous diff --git a/examples/gno.land/r/demo/boards2/z_5_c_filetest.gno b/examples/gno.land/r/demo/boards2/z_5_c_filetest.gno deleted file mode 100644 index b20d8cdfed8..00000000000 --- a/examples/gno.land/r/demo/boards2/z_5_c_filetest.gno +++ /dev/null @@ -1,39 +0,0 @@ -package main - -// SEND: 200000000ugnot - -import ( - "std" - "strconv" - - "gno.land/p/demo/testutils" - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -const admin = std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj") - -func main() { - users.Register("", "gnouser", "my profile") - // create board via registered user - bid := boards.CreateBoard("test_board") - - // create post via anon user - test2 := testutils.TestAddress("test2") - std.TestSetOrigCaller(test2) - std.TestSetOrigSend(std.Coins{{"ugnot", 101000000}}, nil) - - pid := boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - boards.CreateReply(bid, pid, pid, "Reply of the first post") - - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// # First Post (title) -// -// Body of the first post. (body) -// \- [g1w3jhxapjta047h6lta047h6lta047h6laqcyu4](/r/demo/users:g1w3jhxapjta047h6lta047h6lta047h6laqcyu4), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=1)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=1)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] -// -// > Reply of the first post -// > \- [g1w3jhxapjta047h6lta047h6lta047h6laqcyu4](/r/demo/users:g1w3jhxapjta047h6lta047h6lta047h6laqcyu4), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/1/2) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=1&postid=2)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=2)] diff --git a/examples/gno.land/r/demo/boards2/z_5_d_filetest.gno b/examples/gno.land/r/demo/boards2/z_5_d_filetest.gno deleted file mode 100644 index 54cfe49eec6..00000000000 --- a/examples/gno.land/r/demo/boards2/z_5_d_filetest.gno +++ /dev/null @@ -1,32 +0,0 @@ -package main - -// SEND: 200000000ugnot - -import ( - "std" - "strconv" - - "gno.land/p/demo/testutils" - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -const admin = std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj") - -func main() { - users.Register("", "gnouser", "my profile") - // create board via registered user - bid := boards.CreateBoard("test_board") - pid := boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - - // create reply via anon user - test2 := testutils.TestAddress("test2") - std.TestSetOrigCaller(test2) - std.TestSetOrigSend(std.Coins{{"ugnot", 9000000}}, nil) - boards.CreateReply(bid, pid, pid, "Reply of the first post") - - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Error: -// please register, otherwise minimum fee 100000000 is required if anonymous diff --git a/examples/gno.land/r/demo/boards2/z_5_filetest.gno b/examples/gno.land/r/demo/boards2/z_5_filetest.gno deleted file mode 100644 index c0614bb9da3..00000000000 --- a/examples/gno.land/r/demo/boards2/z_5_filetest.gno +++ /dev/null @@ -1,43 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - pid = boards.CreateThread(bid, "Second Post (title)", "Body of the second post. (body)") - rid := boards.CreateReply(bid, pid, pid, "Reply of the second post") -} - -func main() { - rid2 := boards.CreateReply(bid, pid, pid, "Second reply of the second post\n") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// # Second Post (title) -// -// Body of the second post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=2)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=2)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=2)] -// -// > Reply of the second post -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/3) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=3)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=3)] -// -// > Second reply of the second post -// > -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/4) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=4)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=4)] diff --git a/examples/gno.land/r/demo/boards2/z_6_filetest.gno b/examples/gno.land/r/demo/boards2/z_6_filetest.gno deleted file mode 100644 index 6ddd8b9cf3f..00000000000 --- a/examples/gno.land/r/demo/boards2/z_6_filetest.gno +++ /dev/null @@ -1,49 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID - rid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - pid = boards.CreateThread(bid, "Second Post (title)", "Body of the second post. (body)") - rid = boards.CreateReply(bid, pid, pid, "Reply of the second post") -} - -func main() { - boards.CreateReply(bid, pid, pid, "Second reply of the second post\n") - boards.CreateReply(bid, pid, rid, "First reply of the first reply\n") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// # Second Post (title) -// -// Body of the second post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=2)] \[[repost](/r/demo/boards$help&func=CreateRepost&bid=1&postid=2)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=2)] -// -// > Reply of the second post -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/3) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=3)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=3)] -// > -// > > First reply of the first reply -// > > -// > > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/5) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=5)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=5)] -// -// > Second reply of the second post -// > -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/4) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=4)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=4)] diff --git a/examples/gno.land/r/demo/boards2/z_7_filetest.gno b/examples/gno.land/r/demo/boards2/z_7_filetest.gno deleted file mode 100644 index 534095b99cf..00000000000 --- a/examples/gno.land/r/demo/boards2/z_7_filetest.gno +++ /dev/null @@ -1,31 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -func init() { - // register - users.Register("", "gnouser", "my profile") - - // create board and post - bid := boards.CreateBoard("test_board") - boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") -} - -func main() { - println(boards.Render("test_board")) -} - -// Output: -// \[[post](/r/demo/boards$help&func=CreateThread&bid=1)] -// -// ---------------------------------------- -// ## [First Post (title)](/r/demo/boards:test_board/1) -// -// Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm UTC](/r/demo/boards:test_board/1) \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=1&postid=1)] (0 replies) (0 reposts) diff --git a/examples/gno.land/r/demo/boards2/z_8_filetest.gno b/examples/gno.land/r/demo/boards2/z_8_filetest.gno deleted file mode 100644 index f5477026805..00000000000 --- a/examples/gno.land/r/demo/boards2/z_8_filetest.gno +++ /dev/null @@ -1,44 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - bid boards.BoardID - pid boards.PostID - rid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - bid = boards.CreateBoard("test_board") - boards.CreateThread(bid, "First Post (title)", "Body of the first post. (body)") - pid = boards.CreateThread(bid, "Second Post (title)", "Body of the second post. (body)") - rid = boards.CreateReply(bid, pid, pid, "Reply of the second post") -} - -func main() { - boards.CreateReply(bid, pid, pid, "Second reply of the second post\n") - rid2 := boards.CreateReply(bid, pid, rid, "First reply of the first reply\n") - println(boards.Render("test_board/" + strconv.Itoa(int(pid)) + "/" + strconv.Itoa(int(rid2)))) -} - -// Output: -// _[see thread](/r/demo/boards:test_board/2)_ -// -// Reply of the second post -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/3) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=3)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=3)] -// -// _[see all 1 replies](/r/demo/boards:test_board/2/3)_ -// -// > First reply of the first reply -// > -// > \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:test_board/2/5) \[[reply](/r/demo/boards$help&func=CreateReply&bid=1&threadid=2&postid=5)] \[[x](/r/demo/boards$help&func=DeletePost&bid=1&threadid=2&postid=5)] diff --git a/examples/gno.land/r/demo/boards2/z_9_a_filetest.gno b/examples/gno.land/r/demo/boards2/z_9_a_filetest.gno deleted file mode 100644 index 8d07ba0e710..00000000000 --- a/examples/gno.land/r/demo/boards2/z_9_a_filetest.gno +++ /dev/null @@ -1,25 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var dstBoard boards.BoardID - -func init() { - users.Register("", "gnouser", "my profile") - - dstBoard = boards.CreateBoard("dst_board") - - boards.CreateRepost(0, 0, "First Post in (title)", "Body of the first post. (body)", dstBoard) -} - -func main() { -} - -// Error: -// src board not exist diff --git a/examples/gno.land/r/demo/boards2/z_9_b_filetest.gno b/examples/gno.land/r/demo/boards2/z_9_b_filetest.gno deleted file mode 100644 index 68daf770b4f..00000000000 --- a/examples/gno.land/r/demo/boards2/z_9_b_filetest.gno +++ /dev/null @@ -1,29 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - srcBoard boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - srcBoard = boards.CreateBoard("first_board") - pid = boards.CreateThread(srcBoard, "First Post in (title)", "Body of the first post. (body)") - - boards.CreateRepost(srcBoard, pid, "First Post in (title)", "Body of the first post. (body)", 0) -} - -func main() { -} - -// Error: -// dst board not exist diff --git a/examples/gno.land/r/demo/boards2/z_9_filetest.gno b/examples/gno.land/r/demo/boards2/z_9_filetest.gno deleted file mode 100644 index 4be9d2bdfa6..00000000000 --- a/examples/gno.land/r/demo/boards2/z_9_filetest.gno +++ /dev/null @@ -1,37 +0,0 @@ -// PKGPATH: gno.land/r/demo/boards_test -package boards_test - -// SEND: 200000000ugnot - -import ( - "strconv" - - "gno.land/r/demo/boards" - "gno.land/r/demo/users" -) - -var ( - firstBoard boards.BoardID - secondBoard boards.BoardID - pid boards.PostID -) - -func init() { - users.Register("", "gnouser", "my profile") - - firstBoard = boards.CreateBoard("first_board") - secondBoard = boards.CreateBoard("second_board") - pid = boards.CreateThread(firstBoard, "First Post in (title)", "Body of the first post. (body)") - - boards.CreateRepost(firstBoard, pid, "First Post in (title)", "Body of the first post. (body)", secondBoard) -} - -func main() { - println(boards.Render("second_board/" + strconv.Itoa(int(pid)))) -} - -// Output: -// # First Post in (title) -// -// Body of the first post. (body) -// \- [@gnouser](/r/demo/users:gnouser), [2009-02-13 11:31pm (UTC)](/r/demo/boards:second_board/1/1) \[[reply](/r/demo/boards$help&func=CreateReply&bid=2&threadid=1&postid=1)] \[[x](/r/demo/boards$help&func=DeletePost&bid=2&threadid=1&postid=1)]