Skip to content

Commit

Permalink
update docs links
Browse files Browse the repository at this point in the history
  • Loading branch information
leohhhn committed Nov 10, 2023
1 parent 98f384e commit 46e3b48
Show file tree
Hide file tree
Showing 25 changed files with 68 additions and 67 deletions.
2 changes: 1 addition & 1 deletion contribs/gnokeykc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/rs/cors v1.10.1 // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
go.etcd.io/bbolt v1.3.7 // 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
Expand Down
1 change: 1 addition & 0 deletions contribs/gnokeykc/go.sum

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

2 changes: 1 addition & 1 deletion docs/explanation/from-go-to-gno.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ TODO

## See also

- [go-gno-compatibility.md](../reference/go-gno-compatibility.md)
- [go-gno-compatibility.md](/docs/reference/go-gno-compatibility.md)
- ["go -> gno" presentation by Zack Scholl](https://github.com/gnolang/workshops/tree/main/presentations/2023-06-26--go-to-gno--schollz)
2 changes: 1 addition & 1 deletion docs/explanation/gno-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ id: gno-test
There are two methods for testing a realm or package during the development phase:

1. Calling the realm/package after deploying it on a local network (or testnet).
2. Using the `test` option within the [`gno`](./gno-tooling/cli/gno.md) CLI.
2. Using the `test` option within the [`gno`](/docs/explanation/gno-tooling/cli/gno.md) CLI.

While the first method is recommended for its accuracy and similarity to the actual deployment environment, it is more efficient to initially utilize the second method for composing test cases and then proceed to the first method if no errors are detected.

Expand Down
2 changes: 1 addition & 1 deletion docs/explanation/gnovm.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ This enables non-web3 developers to contribute without requiring an understandin

## Getting started

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.
Install [`gno`](/docs/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.
2 changes: 1 addition & 1 deletion docs/explanation/realms.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ id: realms
# Realms

A realm refers to a specific instance of a smart contract that can be written
in [Gnolang](./gno-language.md). The potentials of realms are endless - you can create virtually any
in [Gnolang](/docs/explanation/gno-language.md). The potentials of realms are endless - you can create virtually any
application in your mind with built-in composability,
transparency, and censorship resistance. Here are some ideas of what you can build with realms:

Expand Down
20 changes: 10 additions & 10 deletions docs/getting-started/browsing-gno-source-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ id: browsing-gno-source-code

## Overview

In this tutorial, you will learn how to browse deployed Gno [Realms](../explanation/realms.md)
and [Packages](../explanation/packages.md). Additionally, you will understand how the `Render` method is utilized
In this tutorial, you will learn how to browse deployed Gno [Realms](/docs/explanation/realms.md)
and [Packages](/docs/explanation/packages.md). Additionally, you will understand how the `Render` method is utilized
to achieve Realm state visibility.

## Prerequisites

- **`gnoweb` set up. Reference the [Local Setup](local-setup.md#3-installing-other-gno-tools) guide for steps**
- **`gnoweb` set up. Reference the [Local Setup](/docs/getting-started/local-setup.md#3-installing-other-gno-tools) guide for steps**

## 1. Start the local chain

In order for `gnoweb` to fetch realm and package source code, it needs to connect a running Gno node. For a better
overview on running a local node, please reference the [Starting a Local Chain](setting-up-a-local-chain.md) guide.
overview on running a local node, please reference the [Starting a Local Chain](/docs/getting-started/setting-up-a-local-chain.md) guide.

In this guide, we will start a local node with the default configuration. Navigate to the `gno.land` sub-folder and run:

Expand All @@ -42,13 +42,13 @@ you can specify the remote URL with the `gnoweb` flag named `--remote`

We should be able to access the website locally on http://127.0.0.1:8888/.

![gnoweb screen](../assets/getting-started/browsing-gno-source-code/gnoweb.png)
![gnoweb screen](/docs/assets/getting-started/browsing-gno-source-code/gnoweb.png)

## 3. Browse Package source code

Packages in Gno.land usually have names resembling `gno.land/p/<name>`. Since packages do not contain state, we can only
view their source code on-chain. To learn more about Packages, please check out
the [Packages](../explanation/packages.md) explanation document.
the [Packages](/docs/explanation/packages.md) explanation document.

Using `gnoweb`, we can browse the source code in our browser.
For example, the `avl` package is deployed at `gno.land/p/demo/avl`.
Expand All @@ -58,7 +58,7 @@ To access the source code of the `avl` package, we can append the `/p/demo/avl`
The final URL for the `avl` package source could be viewable at http://127.0.0.1:8888/p/demo/avl, if we followed
default setup params, as we did in this guide.

![gnoweb avl](../assets/getting-started/browsing-gno-source-code/gnoweb-avl.png)
![gnoweb avl](/docs/assets/getting-started/browsing-gno-source-code/gnoweb-avl.png)

From here, we can open any source code file of the deployed on-chain package and inspect its API.

Expand All @@ -68,7 +68,7 @@ In contrast to Packages, Realms in Gno.land usually have names resembling `gno.l

Realms _do_ contain state, and in addition to being able to view their source code on-chain, users can also view their
internal state representation in the form of the `Render()` output. To learn more about Realms, please
check out the [Realms](../explanation/realms.md) explanation document.
check out the [Realms](/docs/explanation/realms.md) explanation document.

Using `gnoweb`, we can browse the Realm `Render()` method output and source code in our browser.
For example, the `boards` Realm is deployed at `gno.land/r/demo/boards`.
Expand All @@ -80,7 +80,7 @@ The final URL for the `boards` Realm internal state could be viewable at http://
followed
default setup params, as we did in this guide.

![gnoweb boards](../assets/getting-started/browsing-gno-source-code/gnoweb-boards.png)
![gnoweb boards](/docs/assets/getting-started/browsing-gno-source-code/gnoweb-boards.png)

:::info Render() is not required

Expand All @@ -93,4 +93,4 @@ Additionally, to view the source code for the realm, we simply need to append th

http://127.0.0.1:8888/r/demo/boards/

![gnoweb boards source](../assets/getting-started/browsing-gno-source-code/gnoweb-boards-source.png)
![gnoweb boards source](/docs/assets/getting-started/browsing-gno-source-code/gnoweb-boards-source.png)
16 changes: 8 additions & 8 deletions docs/getting-started/local-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ make build

This will build out the necessary `gno` binary into the `gnovm/cmd` sub-folder:

![gno tool build](../assets/getting-started/local-setup/make-build-gnovm.gif)
![gno tool build](/docs/assets/getting-started/local-setup/make-build-gnovm.gif)

Next, to make development easier, we need to make the binary available system-wide.
From the same `gnovm` sub-folder, you can run:
Expand All @@ -56,7 +56,7 @@ gno --help

You should get the help output from the command:

![gno help](../assets/getting-started/local-setup/gno-help.gif)
![gno help](/docs/assets/getting-started/local-setup/gno-help.gif)

Alternatively, if you don't want to have the binary callable system-wide, you can run the binary directly:

Expand All @@ -68,10 +68,10 @@ go run ./cmd/gno --help

The next step is to install several other tools that are required for the Gno development environment, like

- `gnoland` - the Gno [blockchain node](setting-up-a-local-chain.md)
- `gnokey` - the Gno [private key manager](working-with-key-pairs.md)
- `gnoweb` - the Gno [source code viewer](browsing-gno-source-code.md)
- `gnofaucet` - the Gno [native currency faucet](setting-up-funds/running-a-faucet.md)
- `gnoland` - the Gno [blockchain node](/docs/getting-started/setting-up-a-local-chain.md)
- `gnokey` - the Gno [private key manager](/docs/getting-started/working-with-key-pairs.md)
- `gnoweb` - the Gno [source code viewer](/docs/getting-started/browsing-gno-source-code.md)
- `gnofaucet` - the Gno [native currency faucet](/docs/getting-started/setting-up-funds/running-a-faucet.md)

To build these tools, from the root directory navigate to the `gno.land` sub-folder, and run the `build` make
directive:
Expand All @@ -83,7 +83,7 @@ make build

This will build out the necessary binaries into the `gno.land/cmd` sub-folder:

![gno tools build](../assets/getting-started/local-setup/make-build-gnoland.gif)
![gno tools build](/docs/assets/getting-started/local-setup/make-build-gnoland.gif)

Same as with the `gno` tool, we can make these binaries available system-wide.
From the same `gno.land` sub-folder, you can run:
Expand All @@ -100,7 +100,7 @@ gnokey --help

You should get the help output from the command:

![gnokey help](../assets/getting-started/local-setup/gnokey-help.gif)
![gnokey help](/docs/assets/getting-started/local-setup/gnokey-help.gif)

## Conclusion

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/setting-up-a-local-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gnoland start
The command will trigger a chain initialization process (if you haven't run the node before), and start the Gno node,
which is ready to accept transactions and interact with other Gno nodes.

![gnoland start](../assets/getting-started/setting-up-a-local-chain/gnoland-start.gif)
![gnoland start](/docs/assets/getting-started/setting-up-a-local-chain/gnoland-start.gif)

To view the command defaults, simply run the `help` command:

Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/setting-up-funds/premining-balances.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ have ample funds to interact with the chain and facilitate contract deployments.

## Prerequisites

- **`gnoland` and `gnokey` set up. Reference the [Installation](../local-setup.md#3-installing-other-gno-tools) guide
- **`gnoland` and `gnokey` set up. Reference the [Installation](/docs/getting-started/local-setup.md#3-installing-other-gno-tools) guide
for steps**

## 1. Clean chain data
Expand Down Expand Up @@ -78,7 +78,7 @@ gnoland start
This command will initialize the Gno node, generate the `genesis.json` with our newly added premine information, and
start the chain.
![gnoland start](../../assets/getting-started/setting-up-funds/gnoland-start.gif)
![gnoland start](/docs/assets/getting-started/setting-up-funds/gnoland-start.gif)
## 3. Check the account balance
Expand All @@ -95,7 +95,7 @@ Let's break down this command:
- **`bank/balances/g1qpymzwx4l4cy6cerdyajp9ksvjsf20rk5y9rtt`** - the ABCI query targets the `bank` module to find
the `balances` for address `g1qpymzwx4l4cy6cerdyajp9ksvjsf20rk5y9rtt`. Replace the address with your desired address
![gnokey query](../../assets/getting-started/setting-up-funds/gnokey-query.gif)
![gnokey query](/docs/assets/getting-started/setting-up-funds/gnokey-query.gif)
## Conclusion
Expand Down
14 changes: 7 additions & 7 deletions docs/getting-started/setting-up-funds/running-a-faucet.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ haven't [premined a balance beforehand](premining-balances.md).
## Prerequisites

- **`gnoland`, `gnofaucet` and `gnoweb` set up. Reference
the [Installation](../local-setup.md#3-installing-other-gno-tools) guide for steps**
the [Installation](/docs/getting-started/local-setup.md#3-installing-other-gno-tools) guide for steps**

## 1. Ensure a topped-up faucet address

The Gno faucet works by designating a single address as a faucet address that will distribute funds.

Ensure the faucet account will have enough funds by [premining its balance](premining-balances.md) to a high value.
Ensure the faucet account will have enough funds by [premining its balance](/docs/getting-started/setting-up-funds/premining-balances.md) to a high value.
In case you do not have an existing address added to `gnokey`, you can consult
the [Working with Key Pairs](../working-with-key-pairs.md) guide.
the [Working with Key Pairs](/docs/getting-started/working-with-key-pairs.md) guide.

## 2. Start the local chain

After ensuring the faucet address will have enough funds in the premine, we
can [run the local blockchain node](../setting-up-a-local-chain.md).
can [run the local blockchain node](/docs/getting-started/setting-up-a-local-chain.md).
Navigate to the `gno.land` sub-folder and run the appropriate make command:

```bash
Expand All @@ -50,7 +50,7 @@ The command will prompt you to enter the decryption password for the key you've

This will initialize the faucet to listen on port `5050`, by default.

![gnofaucet serve](../../assets/getting-started/setting-up-funds/gnofaucet-serve.gif)
![gnofaucet serve](/docs/assets/getting-started/setting-up-funds/gnofaucet-serve.gif)

## 4. Start the `gnoweb` interface

Expand All @@ -65,15 +65,15 @@ gnoweb

This will initialize the `gnoweb` interface on `http://127.0.0.1:8888`.

![gnoweb](../../assets/getting-started/setting-up-funds/gnoweb.gif)
![gnoweb](/docs/assets/getting-started/setting-up-funds/gnoweb.gif)

## 5. Use the deployed faucet

Once `gnoweb` has been started, you can navigate to http://127.0.0.1:8888/faucet.

Simply input the desired address you wish to receive funds on (`1 GNOT` by default), and press the `GO` button.

![gnofaucet page](../../assets/getting-started/setting-up-funds/faucet-page.png)
![gnofaucet page](/docs/assets/getting-started/setting-up-funds/faucet-page.png)

After you've added the address, you should see a success message in the browser:

Expand Down
14 changes: 7 additions & 7 deletions docs/getting-started/working-with-key-pairs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gno.

## Prerequisites

- **`gnokey` set up. Reference the [Local Setup](local-setup.md#3-installing-other-gno-tools) guide for steps**
- **`gnokey` set up. Reference the [Local Setup](/docs/getting-started/local-setup.md#3-installing-other-gno-tools) guide for steps**

## Listing available keys

Expand Down Expand Up @@ -94,7 +94,7 @@ To generate the mnemonic phrase in the console, you can run:
gnokey generate
```

![gnokey generate](../assets/getting-started/creating-a-key-pair/gnokey-generate.gif)
![gnokey generate](/docs/assets/getting-started/creating-a-key-pair/gnokey-generate.gif)

## Adding a random private key

Expand All @@ -111,15 +111,15 @@ After you enter the password, the `gnokey` tool will add the key to the keystore
phrase](https://en.bitcoin.it/wiki/Seed_phrase), which you should remember somewhere if you want to recover the key at a
future point in time.

![gnokey add random](../assets/getting-started/creating-a-key-pair/gnokey-add-random.gif)
![gnokey add random](/docs/assets/getting-started/creating-a-key-pair/gnokey-add-random.gif)

You can check that the key was indeed added to the keystore, by listing available keys:

```bash
gnokey list
```

![gnokey list](../assets/getting-started/creating-a-key-pair/gnokey-list.gif)
![gnokey list](/docs/assets/getting-started/creating-a-key-pair/gnokey-list.gif)

## Adding a private key using a mnemonic

Expand All @@ -136,7 +136,7 @@ Of course, you can replace `MyKey` with whatever name you want for your key.
By following the prompts to encrypt the key on disk, and providing a BIP39 mnemonic, we can successfully add
the key to the keystore.

![gnokey add mnemonic](../assets/getting-started/creating-a-key-pair/gnokey-add-mnemonic.gif)
![gnokey add mnemonic](/docs/assets/getting-started/creating-a-key-pair/gnokey-add-mnemonic.gif)

## Deleting a private key

Expand Down Expand Up @@ -171,7 +171,7 @@ Follow the prompts presented in the terminal. Namely, you will be asked to decry
and later to encrypt the armor file on disk. It is worth noting that you can also export unencrypted key armor, using
the `--unsafe` flag.

![gnokey export](../assets/getting-started/creating-a-key-pair/gnokey-export.gif)
![gnokey export](/docs/assets/getting-started/creating-a-key-pair/gnokey-export.gif)

## Importing a private key

Expand All @@ -188,4 +188,4 @@ flag), and then to provide an encryption password for storing the key in the key

After executing the previous command, the `gnokey` keystore will have imported `ImportedKey`.

![gnokey import](../assets/getting-started/creating-a-key-pair/gnokey-import.gif)
![gnokey import](/docs/assets/getting-started/creating-a-key-pair/gnokey-import.gif)
4 changes: 2 additions & 2 deletions docs/how-to-guides/creating-grc20.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ id: creating-grc20

## Overview

This guide shows you how to write a simple _GRC20_ Smart Contract, or rather a [Realm](../explanation/realms.md), in [Gno (Gnolang)](../explanation/gno-language.md). For actually deploying the Realm, please see the [deployment](deploy.md) guide.
This guide shows you how to write a simple _GRC20_ Smart Contract, or rather a [Realm](/docs/explanation/realms.md), in [Gno (Gnolang)](/docs/explanation/gno-language.md). For actually deploying the Realm, please see the [deployment](deploy.md) guide.

Our _GRC20_ Realm will have the following functionality:

Expand Down Expand Up @@ -153,7 +153,7 @@ Detailing what is happening in the above code:
- Calling the `Mint` method would create a configurable number of tokens by the administrator.
- Calling the `Burn` method would destroy a configurable number of tokens by the administrator.
- Calling the `Render` method would return a user's `balance` as a formatted string. Learn more about the `Render`
method and how it's used [here](../explanation/realms.md).
method and how it's used [here](/docs/explanation/realms.md).
- Finally, we provide a local function to assert that the calling account is in fact the owner, otherwise panic. This is a very important function that serves to prevent abuse by non-administrators.

## Conclusion
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to-guides/creating-grc721.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ id: creating-grc721

## Overview

This guide shows you how to write a simple _GRC721_ Smart Contract, or rather a [Realm](../explanation/realms.md),
in [Gno (Gnolang)](../explanation/gno-language.md). For actually deploying the Realm, please see
This guide shows you how to write a simple _GRC721_ Smart Contract, or rather a [Realm](/docs/explanation/realms.md),
in [Gno (Gnolang)](/docs/explanation/gno-language.md). For actually deploying the Realm, please see
the [deployment](deploy.md) guide.

Our _GRC721_ Realm will have the following functionality:
Expand Down Expand Up @@ -186,7 +186,7 @@ Detailing what is happening in the above code:
method on the `grc721` instance we instantiated at the top of the file; this method returns a formatted string that
includes the token: symbol, supply and account balances (`balances avl.Tree`) which is a mapping denoted
as: `OwnerAddress -> TokenCount`; otherwise returns false and renders a `404`; you can find more information about
this `Render` method and how it's used [here](../explanation/realms.md).
this `Render` method and how it's used [here](/docs/explanation/realms.md).
- Finally, we provide a local function to assert that the calling account is in fact the owner, otherwise panic. This is
a very important function that serves to prevent abuse by non-administrators.

Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-guides/interact-with-gnoland.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This tutorial will teach you how to interact with the gno.land blockchain by cre

## Prerequisites

- [Installation](../getting-started/local-setup.md)
- [Installation](/docs/getting-started/local-setup.md)

## Create an Account

Expand Down
Loading

0 comments on commit 46e3b48

Please sign in to comment.