Skip to content

Commit

Permalink
Merge branch 'master' into feat/gnolint-error
Browse files Browse the repository at this point in the history
  • Loading branch information
gfanton authored Jan 22, 2024
2 parents 845ab7c + 6112ffd commit 0e4dad1
Show file tree
Hide file tree
Showing 74 changed files with 1,686 additions and 863 deletions.
61 changes: 45 additions & 16 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,63 @@

# Tendermint2 (Gno version).
tm2/* @gnolang/tech-staff
tm2/pkg @jaekwon @moul
tm2/pkg @jaekwon @piux2 @moul @zivkovicmilos
tm2/pkg/crypto @jaekwon @moul @gnolang/security
# TODO: add per package exceptions

# ...

# Docs & Content.
docs/ @gnolang/devrels @gnolang/tech-staff
misc/docusaurus/ @gnolang/devrels @gnolang/tech-staff
# TODO: add non-tech people here.

docs/ @gnolang/devrels
misc/docusaurus/ @gnolang/devrels
README.md @gnolang/devrels
.gitpod.yml @gnolang/devrels

# Gno examples and default contracts.
examples/* @gnolang/tech-staff
examples/ @gnolang/tech-staff @gnolang/devrels
examples/gno.land/r/gnoland/ @moul
examples/gno.land/r/gov/ @moul
examples/gno.land/r/sys/ @moul
examples/gno.land/r/worx/ @moul
examples/gno.land/r/x @gnolang/devrels
# TODO: add people from the community here.

examples/gno.land/r/jaekwon/ @jaekwon
examples/gno.land/r/manfred/ @moul

# Gno.land.
gno.land/* @gnolang/tech-staff

gno.land/ @moul
gno.land/pkg/integration @gfanton
#...

# GnoVM/Gnolang.
gnovm/* @gnolang/tech-staff
gnovm/stdlibs @jaekwon @moul
gnovm/pkg/gnolang @jaekwon @moul
gnovm/ @gnolang/tech-staff
gnovm/stdlibs @jaekwon @thehowl
gnovm/tests @jaekwon @piux2 @thehowl @moul
gnovm/cmd/gno @jaekwon @thehowl @harry-hov @moul
gnovm/pkg/gnolang @jaekwon @piux2 @thehowl @moul
gnovm/pkg/doc @thehowl
gnovm/pkg/gnomod @harry-hov
gnovm/pkg/integration @gfanton
#gnovm/pkg/gnoenv
#gnovm/pkg/repl

# Contribs
contribs/ @gnolang/tech-staff
contribs/gnodev @gfanton
contribs/gnokeykc @moul
contribs/gnomd @moul
#...

# Misc
misc/ @gnolang/tech-staff
misc/loop @moul @gnolang/devops
misc/deployments @moul @gnolang/devops
misc/genstd @thehowl
#...

# Special files.
PLAN.md @jaekwon @moul
PHILOSOPHY.md @jaekwon @moul
CONTRIBUTING.md @jaekwon @moul
LICENSE.md @jaekwon @moul
PHILOSOPHY.md @jaekwon
CONTRIBUTING.md @jaekwon @moul @gnolang/tech-staff
LICENSE.md @jaekwon
.github/ @moul @gnolang/tech-staff
.github/CODEOWNERS @jaekwon @moul
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ updates:
interval: weekly
labels:
- "dependencies"
groups:
golang-x:
patterns:
- "golang.org/x/*"
dbs:
patterns:
- "github.com/linxGnu/grocksdb"
- "go.etcd.io/bbolt"
- "github.com/dgraph-io/badger/v3"
everything-else:
patterns:
- "*"
open-pull-requests-limit: 10
pull-request-branch-name:
separator: "-"
Expand Down
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@

":package: :mountain: gno.land":
- "gno.land/**/*"

":book: documentation":
- docs/**/*"
4 changes: 4 additions & 0 deletions .github/workflows/dependabot-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
tidy_go_mods:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -36,6 +38,8 @@ jobs:
- name: Commit changes, if any
uses: stefanzweifel/git-auto-commit-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
skip_dirty_check: false # Enable dirty check, and skip unnecessary committing
commit_message: "Run 'go mod tidy' via GitHub Actions"
6 changes: 5 additions & 1 deletion PHILOSOPHY.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
## CLI Philosophy

* No envs.
* No short flags.
* No short flags, with the following exceptions:
* `-h` for showing help
* `-v` for being verbose
* mimicking the short flags of Go commands
* after software maturity
* No /bin/ calls.
* No process forks.
* Struct-based command options.
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ You can discover additional details about current tools and Gno documentation on
our [official documentation](https://docs.gno.land). Additionally, the [awesome-gno](https://github.com/gnolang/awesome-gno)
repository offers more resources to dig into. We are eager to see your first PR!

## Gno Playground
<a href="https://play.gno.land/p/VxDC6AmKmK6?run.expr=println(Render(%22%22))">
<img alt="play.gno.land" src="https://img.shields.io/badge/Play-Hello_World-691a00.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAxNTggMTU4Ij48cGF0aCBkPSJtMTU2IDItNiA1LTIgMmE1NCA1NCAwIDAgMS0yNCAxMmwtMyAxaC00Yy02IDAtOS0xLTE1LTNhNjIgNjIgMCAwIDAtMzUtNmgtMWwtNCAxYTYzIDYzIDAgMCAwLTUwIDY4bDEgMmEyNyAyNyAwIDAgMCAwIDRsNiAxNWEzMyAzMyAwIDAgMSAyIDIxIDYyIDYyIDAgMCAxLTMgOCA2MSA2MSAwIDAgMS0xMyAyMGwtMyA0LTEgMWgxbDEtMmEyMDYgMjA2IDAgMCAxIDYtNWwyLTJhODggODggMCAwIDAgOC03bDEtMSAyLTIgMy0zYTY2MSA2NjEgMCAwIDEgMjYtMjRsNjItNjIgNC00IDMtMyAyLTMgOS05IDMtMyAyLTMgNi02IDExLTEzIDMtMyAxLTEtMSAxWk03OSAyNWM5IDEgMTcgNCAyMyA4IDQgMiA1IDQgNSA3bC0xIDMtMSAydjFsLTItMmE0MSA0MSAwIDAgMC0zNC0xMCA0MyA0MyAwIDAgMC0zMyAyNyA0OSA0OSAwIDAgMC0zIDIwIDMxIDMxIDAgMCAwIDEgNWwyIDRjMSA1IDQgOSA3IDEzbDIgMnYxbC01IDEtNC0xYy0yLTEtNS01LTctMTBsLTEtMmE2MSA2MSAwIDAgMS0zLTEzIDY2IDY2IDAgMCAxIDAtMTRjMS01IDMtMTEgNi0xNmE1MyA1MyAwIDAgMSA0MC0yNmg4Wm0yIDEzaDFsMTEgMyAxMCA4djRMNzkgNzhsLTI2IDI1Yy0yIDEtNCAxLTYtMWwtNS03YTQwIDQwIDAgMCAxLTUtMTljMC04IDMtMTYgOC0yM2w5LThhNDEgNDEgMCAwIDEgMTktOGw4IDFabTQ0IDEzLTMgNnY3YTIyMSAyMjEgMCAwIDEgMiAxNGwtMSAxMGE0NiA0NiAwIDAgMS01NyAzNWgtOWMtMyAwLTcgMi03IDNsNCAyYTU3IDU3IDAgMCAwIDMyIDVoM2wzLTFhNTUgNTUgMCAwIDAgMzQtODJsLTEgMVoiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTEzIDU5Yy0xIDItMiA0LTEgNmwxIDNhMzggMzggMCAwIDEtNDggNDRoLTRsLTMgMmE0NCA0NCAwIDAgMCAxMCAzaDE1YTQyIDQyIDAgMCAwIDMxLTU4aC0xWiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==" />
</a>
</br></br>

[Gno Playground](https://play.gno.land), available at [play.gno.land](https://play.gno.land), is a web app that allows users to write, share, and deploy Gno code. Developers can seamlessly test, debug, and deploy realms and packages on Gno.land, while being able to collaborate with peers to work on projects together and seek assistance. A key feature of Gno Playground is the ability to get started without the need to install any tools or manage any services, offering immediate access and convenience for users.

## Repository structure

* [examples](./examples) - Smart-contract examples and guides for new Gno developers.
Expand Down
4 changes: 2 additions & 2 deletions contribs/gnodev/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace github.com/gnolang/gno => ../..
require (
github.com/fsnotify/fsnotify v1.7.0
github.com/gnolang/gno v0.0.0-00010101000000-000000000000
golang.org/x/term v0.15.0
golang.org/x/term v0.16.0
)

require (
Expand Down Expand Up @@ -53,7 +53,7 @@ require (
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions contribs/gnodev/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions contribs/gnokeykc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ require (
github.com/btcsuite/btcd/btcutil v1.1.3 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/dgraph-io/badger/v3 v3.2103.4 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
Expand All @@ -43,13 +41,10 @@ require (
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
go.etcd.io/bbolt v1.3.8 // indirect
go.opencensus.io v0.22.5 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/term v0.14.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)
18 changes: 4 additions & 14 deletions contribs/gnokeykc/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion contribs/gnokeykc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"os"

"github.com/gnolang/gno/gnovm/pkg/gnoenv"
"github.com/gnolang/gno/tm2/pkg/commands"
"github.com/gnolang/gno/tm2/pkg/crypto/keys/client"
"github.com/zalando/go-keyring"
Expand All @@ -12,7 +13,9 @@ import (
func main() {
stdio := commands.NewDefaultIO()
wrappedio := &wrappedIO{IO: stdio}
cmd := client.NewRootCmd(wrappedio)
baseCfg := client.DefaultBaseOptions
baseCfg.Home = gnoenv.HomeDir()
cmd := client.NewRootCmdWithBaseConfig(wrappedio, baseCfg)
cmd.AddSubCommands(newKcCmd(stdio))

cmd.Execute(context.Background(), os.Args[1:])
Expand Down
6 changes: 4 additions & 2 deletions docs/assets/how-to-guides/simple-contract/counter.gno
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package counter

import "fmt"
import (
"gno.land/p/demo/ufmt"
)

var count int

Expand All @@ -13,5 +15,5 @@ func Decrement() {
}

func Render(_ string) string {
return fmt.Sprintf("Count: %d", count)
return ufmt.Sprintf("Count: %d", count)
}
6 changes: 4 additions & 2 deletions docs/assets/how-to-guides/testing-gno/counter-1.gno
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

package counter

import "fmt"
import (
"gno.land/p/demo/ufmt"
)

var count int

Expand All @@ -15,5 +17,5 @@ func Decrement() {
}

func Render(_ string) string {
return fmt.Sprintf("Count: %d", count)
return ufmt.Sprintf("Count: %d", count)
}
2 changes: 1 addition & 1 deletion docs/concepts/gno-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ While the first method is recommended for its accuracy and similarity to the act

This section will teach you how to use the second method.

Writing test cases in Gnolang is similar to that of Golang, with general rules as the following:
Writing test cases in Gno is similar to that of Go, with general rules as the following:

* Test file naming conventions must be adhered to (ex: `xxx_test.gno`).
* Test functions must start with `Test`.
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/gnovm.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ id: gnovm

# GnoVM

GnoVM is a virtual machine that interprets Gnolang, a custom version of Golang optimized for blockchains, featuring automatic state management, full determinism, and idiomatic Go.
GnoVM is a virtual machine that interprets Gno, a custom version of Go optimized for blockchains, featuring automatic state management, full determinism, and idiomatic Go.
It works with Tendermint2 and enables smarter, more modular, and transparent appchains with embedded smart-contracts.
It can be adapted for use in TendermintCore, forks, and non-Cosmos blockchains.

Expand All @@ -24,4 +24,4 @@ This enables non-web3 developers to contribute without requiring an understandin

Install [`gno`](../getting-started/local-setup.md) and refer to the [`examples`](https://github.com/gnolang/gno/tree/master/examples) folder to start developing contracts.

Check the [Makefile](https://github.com/gnolang/gno/blob/master/gnovm/Makefile) to enhance GnoVM, Gnolang, and stdlibs.
Check the [Makefile](https://github.com/gnolang/gno/blob/master/gnovm/Makefile) to enhance GnoVM, Gno, and stdlibs.
8 changes: 4 additions & 4 deletions docs/concepts/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ The full list of pre-deployed available packages can be found under the [demo pa

## `avl`

In Golang, the classic key/value data type is represented by the `map` construct. However, while Gnolang also supports the use of `map`, it is not a viable option as it lacks determinism due to its non-sequential nature.
In Go, the classic key/value data type is represented by the `map` construct. However, while Gno also supports the use of `map`, it is not a viable option as it lacks determinism due to its non-sequential nature.

To address this issue, Gnolang implements the [AVL Tree](https://en.wikipedia.org/wiki/AVL\_tree) (Adelson-Velsky-Landis Tree) as a solution. The AVL Tree is a self-balancing binary search tree.
To address this issue, Gno implements the [AVL Tree](https://en.wikipedia.org/wiki/AVL\_tree) (Adelson-Velsky-Landis Tree) as a solution. The AVL Tree is a self-balancing binary search tree.

The `avl` package comprises a set of functions that can manipulate the leaves and nodes of the AVL Tree.

## `grc20`

Gnolang includes an implementation of the `erc20` fungible token standard referred to as `grc20`. The interfaces of `grc20` are as follows:
Gno includes an implementation of the `erc20` fungible token standard referred to as `grc20`. The interfaces of `grc20` are as follows:

[embedmd]:# (../assets/explanation/packages/pkg-1.gno go)
```go
Expand Down Expand Up @@ -50,7 +50,7 @@ Two types of contracts exist in`grc20`:

## `grc721`

Gnolang includes an implementation of the `erc721` non-fungible token standard referred to as `grc721`. The interfaces of `grc721` are as follows:
Gno includes an implementation of the `erc721` non-fungible token standard referred to as `grc721`. The interfaces of `grc721` are as follows:

[embedmd]:# (../assets/explanation/packages/pkg-2.gno go)
```go
Expand Down
Loading

0 comments on commit 0e4dad1

Please sign in to comment.