Skip to content

Commit a8d28ce

Browse files
committed
chore: move tendermint2 pkgs into tendermint2/pkgs
Signed-off-by: Manfred Touron <[email protected]>
1 parent bb58088 commit a8d28ce

File tree

2,259 files changed

+2001
-1852
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,259 files changed

+2001
-1852
lines changed

LICENSE.md

Lines changed: 2 additions & 2 deletions

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ examples.build: install_gnodev examples.precompile
8484
.PHONY: fmt
8585
fmt:
8686
go run -modfile ./misc/devdeps/go.mod mvdan.cc/gofumpt -w .
87-
go run -modfile ./misc/devdeps/go.mod mvdan.cc/gofumpt -w `find stdlibs examples -name "*.gno"`
87+
go run -modfile ./misc/devdeps/go.mod mvdan.cc/gofumpt -w `find gnovm/pkg/stdlibs examples -name "*.gno"`
8888

8989
.PHONY: lint
9090
lint:

README.md

Lines changed: 20 additions & 0 deletions

cmd/README

Lines changed: 0 additions & 16 deletions
This file was deleted.

examples/gno.land/r/demo/groups/group.gno

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package groups
22

33
import (
4-
"gno.land/p/demo/avl"
54
"std"
65
"strconv"
76
"time"
7+
8+
"gno.land/p/demo/avl"
89
)
910

10-
type GroupID uint64
11+
type GroupID uint64
1112

1213
func (gid GroupID) String() string {
1314
return strconv.Itoa(int(gid))
@@ -54,10 +55,10 @@ func (group *Group) newMember(id MemberID, address std.Address, weight int, meta
5455
}
5556

5657
func (group *Group) HasPermission(addr std.Address, perm Permission) bool {
57-
if group.creator != addr {
58-
return false
59-
}
60-
return isValidPermission(perm)
58+
if group.creator != addr {
59+
return false
60+
}
61+
return isValidPermission(perm)
6162
}
6263

6364
func (group *Group) RenderGroup() string {
@@ -83,7 +84,6 @@ func (group *Group) deleteGroup() {
8384
panic("group does not exist with id " + group.id.String())
8485
}
8586
gGroupsByName.Remove(group.name)
86-
8787
}
8888

8989
func (group *Group) deleteMember(mid MemberID) {

examples/gno.land/r/demo/groups/member.gno

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ func (member *Member) getMemberStr() string {
2424
memberDataStr := ""
2525
memberDataStr += "\t\t\t[" + memberIDKey(member.id) + ", " + member.address.String() + ", " + strconv.Itoa(member.weight) + ", " + member.metadata + ", " + member.createdAt.String() + "],\n\n"
2626
return memberDataStr
27-
}
27+
}

examples/gno.land/r/demo/groups/misc.gno

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"std"
55
"strconv"
66
"strings"
7+
78
"gno.land/r/demo/users"
89
)
910

@@ -15,7 +16,7 @@ func getGroup(gid GroupID) *Group {
1516
gidkey := groupIDKey(gid)
1617
group_, exists := gGroups.Get(gidkey)
1718
if !exists {
18-
panic("group id ("+gid.String()+") does not exists")
19+
panic("group id (" + gid.String() + ") does not exists")
1920
}
2021
group := group_.(*Group)
2122
return group
@@ -29,17 +30,16 @@ func incGetGroupID() GroupID {
2930
func padLeft(str string, length int) string {
3031
if len(str) >= length {
3132
return str
32-
}
33+
}
3334
return strings.Repeat(" ", length-len(str)) + str
3435
}
3536

3637
func padZero(u64 uint64, length int) string {
3738
str := strconv.Itoa(int(u64))
3839
if len(str) >= length {
3940
return str
40-
}
41+
}
4142
return strings.Repeat("0", length-len(str)) + str
42-
4343
}
4444

4545
func groupIDKey(gid GroupID) string {
@@ -79,19 +79,18 @@ func displayAddressMD(addr std.Address) string {
7979
user := users.GetUserByAddress(addr)
8080
if user == nil {
8181
return "[" + addr.String() + "](/r/users:" + addr.String() + ")"
82-
}
82+
}
8383
return "[@" + user.Name() + "](/r/users:" + user.Name() + ")"
8484
}
8585

8686
func usernameOf(addr std.Address) string {
8787
user := users.GetUserByAddress(addr)
8888
if user == nil {
8989
panic("user not found")
90-
}
90+
}
9191
return user.Name()
92-
9392
}
9493

9594
func isValidPermission(perm Permission) bool {
9695
return perm == EditPermission || perm == DeletePermission
97-
}
96+
}

examples/gno.land/r/demo/groups/z_1_a_filetest.gno

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ var gid groups.GroupID
1717
const admin = std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj")
1818

1919
func main() {
20-
2120
caller := std.GetOrigCaller() // main
2221
users.Register("", "gnouser0", "my profile 1")
2322

examples/gno.land/r/demo/groups/z_2_a_filetest.gno

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ var gid groups.GroupID
1717
const admin = std.Address("g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj")
1818

1919
func main() {
20-
2120
caller := std.GetOrigCaller() // main
2221
users.Register("", "gnouser0", "my profile 1")
2322

0 commit comments

Comments
 (0)