Skip to content

Commit

Permalink
Merge branch 'master' into ci/docker-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
albttx authored Jun 20, 2024
2 parents f56c0af + d2d34eb commit 858891d
Show file tree
Hide file tree
Showing 468 changed files with 10,021 additions and 2,926 deletions.
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
/examples/gno.land/p/demo/seqid/ @thehowl
/examples/gno.land/p/demo/ownable/ @leohhhn
/examples/gno.land/p/demo/pausable/ @leohhhn
/examples/gno.land/p/demo/stack/ @harry-hov
/examples/gno.land/p/demo/svg/ @moul
/examples/gno.land/p/demo/tamagotchi/ @moul
/examples/gno.land/p/demo/ui/ @moul
Expand Down Expand Up @@ -64,11 +63,11 @@
/gnovm/ @jaekwon @moul @piux2 @thehowl
/gnovm/stdlibs/ @thehowl
/gnovm/tests/ @jaekwon @deelawn @thehowl @mvertes
/gnovm/cmd/gno/ @moul @thehowl @harry-hov
/gnovm/cmd/gno/ @moul @thehowl
/gnovm/pkg/gnolang/ @jaekwon @moul @piux2 @deelawn
/gnovm/pkg/doc/ @thehowl
/gnovm/pkg/repl/ @mvertes @ajnavarro
/gnovm/pkg/gnomod/ @harry-hov
/gnovm/pkg/gnomod/ @thehowl
/gnovm/pkg/gnoenv/ @gfanton
/gnovm/pkg/transpiler/ @thehowl
/gnovm/pkg/integration/ @gfanton
Expand All @@ -91,5 +90,6 @@
/CONTRIBUTING.md @jaekwon @moul @gnolang/tech-staff
/LICENSE.md @jaekwon
/.github/ @moul @gnolang/tech-staff
/.github/workflows @ajnavarro @moul
/.github/CODEOWNERS @jaekwon @moul
/go.mod @gnolang/tech-staff # no unnecessary dependencies
31 changes: 31 additions & 0 deletions .github/workflows/docs-404-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "docs / 404 checker"

on:
push:
paths:
- master
pull_request:
paths:
- "docs/**"

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.21'

- name: Install dependencies
run: go mod download

- name: Build docs
run: make -C docs/ build

- name: Run linter
run: make -C docs/ lint
6 changes: 4 additions & 2 deletions .github/workflows/gnoland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
branches:
- master
workflow_dispatch:
pull_request:
pull_request:
paths:
- "gno.land/**"
- "tm2/**.go"
- "gnovm/**.go"
- ".github/**"

jobs:
Expand All @@ -17,4 +19,4 @@ jobs:
with:
modulepath: "gno.land"
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
codecov-token: ${{ secrets.CODECOV_TOKEN }}
26 changes: 13 additions & 13 deletions contribs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@ install:
@echo 'To install a tool, go to the subdirectory, then run `make install`.'
@echo 'To do a full installation, run `make install_all`.'

install_all: $(addsuffix .install,$(programs))
%.install:
@echo "[+] make -C $(basename $@) install"
$(MAKE) --no-print-directory -C $(basename $@) install
install_all: $(addprefix install.,$(programs))
install.%:
@echo "[+] make -C $(subst install.,,$@) install"
$(MAKE) --no-print-directory -C $(subst install.,,$@) install
.PHONY: install_all

########################################
# Test suite
test: $(addsuffix .test,$(programs))
%.test:
@echo "[+] make -C $(basename $@) install"
$(MAKE) --no-print-directory -C $(basename $@) test
.PHONY: test
test: $(addprefix test.,$(programs))
test.%:
@echo "[+] make -C $(subst test.,,$@) install"
$(MAKE) --no-print-directory -C $(subst test.,,$@) test
.PHONY: test

########################################
# Lint
.PHONY: lint
lint: $(addsuffix .lint,$(programs))
%.lint:
@echo "[+] make -C $(basename $@) install"
$(MAKE) --no-print-directory -C $(basename $@) lint
lint: $(addprefix lint.,$(programs))
lint.%:
@echo "[+] make -C $(subst lint.,,$@) install"
$(MAKE) --no-print-directory -C $(subst lint.,,$@) lint

########################################
# Dev tools
Expand Down
2 changes: 1 addition & 1 deletion contribs/gnodev/pkg/dev/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (n *Node) updatePackages(paths ...string) error {
pkgsUpdated += len(pkgslist)
}

n.logger.Info(fmt.Sprintf("updated %d pacakges", pkgsUpdated))
n.logger.Info(fmt.Sprintf("updated %d packages", pkgsUpdated))
return nil
}

Expand Down
12 changes: 12 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
all: build lint

# Build the linter
build:
cd ../misc/docs-linter && go build -o ./build/

# Run the linter for the docs/ folder
lint:
../misc/docs-linter/build/linter -path .

clean:
rm -rf ../misc/docs-linter/build
2 changes: 2 additions & 0 deletions docs/assets/how-to-guides/write-simple-dapp/poll-1.gno
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ func (p Poll) VoteCount() (int, int) {
if vote == true {
yay = yay + 1
}

return false
})
return yay, p.Voters().Size() - yay
}
2 changes: 1 addition & 1 deletion docs/concepts/effective-gno.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ For example, if you're creating a coin for cross-chain transfers, Coins
are your best bet. They're IBC-ready and their strict rules offer top-notch
security.

Read about how to use the Banker module [here](stdlibs/banker).
Read about how to use the Banker module [here](stdlibs/banker.md).

#### GRC20 tokens

Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The full list of pre-deployed available packages can be found under the [demo pa

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, 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.
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.

Expand Down Expand Up @@ -72,7 +72,7 @@ func IsApprovedForAll(owner, operator std.Address) bool
* `OwnerOf`: Returns the `owner`'s address of a token specified by its `TokenID`.
* `SafeTransferFrom`: Equivalent to the `TransferFrom` function of `grc20`.
* The `Safe` prefix indicates that the function runs a check to ensure that the `to` address is a valid address that can receive tokens.
* As you can see from the [code](https://github.com/gnolang/gno/blob/master/examples/gno.land/p/demo/grc/grc721/basic\_nft.gno#L341), the concept of `Safe` has yet to be implemented.
* As you can see from the [code](https://github.com/gnolang/gno/blob/master/examples/gno.land/p/demo/grc/grc721/basic_nft.gno#L341), the concept of `Safe` has yet to be implemented.
* `SetApprovalForAll`: Approves all tokens owned by the `owner` to an `operator`.
* You may not set multiple `operator`s.
* `GetApproved`: Returns the `address` of the `operator` for a token, specified with its `ID`.
Expand Down
4 changes: 1 addition & 3 deletions docs/concepts/tendermint2.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ on https://github.com/tendermint/tendermint2.**
proto3 for encoding/decoding optimization through protoc.
- MISSION: be the basis for improving the encoding standard from proto3, because
proto3 length-prefixing is slow, and we need "proto4" or "amino2".
- LOOK at the auto-generated proto files!
https://github.com/gnolang/gno/blob/master/pkgs/bft/consensus/types/cstypes.proto
for example.
- LOOK at the [auto-generated proto files](https://github.com/gnolang/gno/blob/master/tm2/pkg/bft/consensus/consensus.proto)!
- There was work to remove this from the CosmosSDK because
Amino wasn't ready, but now that it is, it makes sense to incorporate it into
Tendermint2.
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/testnets.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ id: testnets

This page documents all Gno.land testnets, what their properties are, and how
they are meant to be used. For testnet configuration, visit the
[reference section](../reference/network-config).
[reference section](../reference/network-config.md).

Gno.land testnets are categorized by 4 main points:
- **Persistence of state**
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/local-setup/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ to run on your machine.
## Prerequisites
- **Git**
- **`make` (for running Makefiles)**
- **Go 1.19+**
- **Go 1.21+**
- **Go Environment Setup**:
- Make sure `$GOPATH` is well-defined, and `$GOPATH/bin` is added to your `$PATH` variable.
- To do this, you can add the following line to your `.bashrc`, `.zshrc` or other config file:
Expand Down
17 changes: 15 additions & 2 deletions docs/how-to-guides/connecting-from-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ A few things to note:
You can initialize the RPC Client used to connect to the Gno.land network with
the following line:
```go
rpc := rpcclient.NewHTTPClient("<gno_chain_endpoint>")
rpc, err := rpcclient.NewHTTPClient("<gno.land_remote_endpoint>")
if err != nil {
panic(err)
}
```

A list of Gno.land network endpoints & chain IDs can be found in the [Gno RPC
Expand Down Expand Up @@ -139,7 +142,10 @@ func main() {
}

// Initialize the RPC client
rpc := rpcclient.NewHTTPClient("<gno.land_remote_endpoint>")
rpc, err := rpcclient.NewHTTPClient("<gno.land_remote_endpoint>")
if err != nil {
panic(err)
}

// Initialize the gnoclient
client := gnoclient.Client{
Expand All @@ -158,6 +164,13 @@ To send transactions to the chain, we need to know the account number (ID) and
sequence (nonce). We can get this information by querying the chain with the
`QueryAccount` function:

```go
import (
...
"github.com/gnolang/gno/tm2/pkg/crypto"
)
```

```go
// Convert Gno address string to `crypto.Address`
addr, err := crypto.AddressFromBech32("g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5") // your Gno address
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-guides/simple-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ and [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=har
:::

We discussed Gno folder structures more in detail in
the [simple Smart Contract guide](simple-contract.md#1-setting-up-the-work-directory).
the [simple Smart Contract guide](simple-contract.md#local-setup).
For now, we will just follow some rules outlined there.

Create the main working directory for our Package:
Expand Down
2 changes: 2 additions & 0 deletions docs/how-to-guides/write-simple-dapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ func (p Poll) VoteCount() (int, int) {
if vote == true {
yay = yay + 1
}

return false
})
return yay, p.Voters().Size() - yay
}
Expand Down
12 changes: 6 additions & 6 deletions docs/reference/network-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ id: network-config

# Network configurations

| Network | RPC Endpoint | Chain ID |
|-------------|------------------------------------|---------------|
| Portal Loop | https://rpc.gno.land:443 | `portal-loop` |
| Testnet 4 | upcoming | upcoming |
| Testnet 3 | https://rpc.test3.gno.land:443 | `test3` |
| Staging | https://rpc.staging.gno.land:26657 | `test3` |
| Network | RPC Endpoint | Chain ID |
|-------------|-----------------------------------|---------------|
| Portal Loop | https://rpc.gno.land:443 | `portal-loop` |
| Testnet 4 | upcoming | upcoming |
| Testnet 3 | https://rpc.test3.gno.land:443 | `test3` |
| Staging | http://rpc.staging.gno.land:26657 | `staging` |

### WebSocket endpoints
All networks follow the same pattern for websocket connections:
Expand Down
Loading

0 comments on commit 858891d

Please sign in to comment.