Skip to content

Commit

Permalink
feat: pre-register test1 user to make interaction with boards easier
Browse files Browse the repository at this point in the history
  • Loading branch information
hthieu1110 committed Sep 21, 2024
1 parent 5503cca commit b61933e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/gno.land/r/demo/users/preregister.gno
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ var preRegisteredUsers = []struct {
{"nt", "g15ge0ae9077eh40erwrn2eq0xw6wupwqthpv34l"}, // -> @r_nt
{"sys", "g1r929wt2qplfawe4lvqv9zuwfdcz4vxdun7qh8l"}, // -> @r_sys
{"x", "g164sdpew3c2t3rvxj3kmfv7c7ujlvcw2punzzuz"}, // -> @r_x

// test1 user
{"test1", "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"}, // -> @test1
}

func init() {
Expand Down
23 changes: 23 additions & 0 deletions examples/gno.land/r/demo/users/z_13_filetest.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package main

// SEND: 200000000ugnot

import (
"strconv"

"gno.land/r/demo/users"
)

func main() {
{
// Verify pre-registered test1 user
names := users.ListUsersByPrefix("test1", 1)
println("# names: " + strconv.Itoa(len(names)))
println("name: " + names[0])
}
}

// Output:
// # names: 1
// name: test1

1 change: 1 addition & 0 deletions examples/gno.land/r/demo/users/z_5_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func main() {
// * [nt](/r/demo/users:nt)
// * [satoshi](/r/demo/users:satoshi)
// * [sys](/r/demo/users:sys)
// * [test1](/r/demo/users:test1)
// * [x](/r/demo/users:x)
//
// ========================================
Expand Down

0 comments on commit b61933e

Please sign in to comment.