Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: official documentation #1046

Merged
merged 74 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
d8f1599
Add base Docusaurus setup
zivkovicmilos Aug 9, 2023
0c84b03
Remove docs README
zivkovicmilos Aug 9, 2023
b473202
Add content for the Overview
zivkovicmilos Aug 10, 2023
b4e3f7c
Update Installation doc
zivkovicmilos Aug 10, 2023
57a9e7b
Update the Create a private key section
zivkovicmilos Aug 10, 2023
a10d126
Update the Create a private key section
zivkovicmilos Aug 10, 2023
955042a
Update the Premining Balances tutorial
zivkovicmilos Aug 11, 2023
630be8f
Update the Running a Faucet tutorial
zivkovicmilos Aug 11, 2023
badb5d9
Update the Setting up a Local Chain doc
zivkovicmilos Aug 15, 2023
c7f611d
Update the Browsing Gno Source code doc
zivkovicmilos Aug 15, 2023
8845314
Add guide on creating a simple Realm
zivkovicmilos Sep 4, 2023
e93b74b
Add guide on creating a simple Package
zivkovicmilos Sep 4, 2023
019650a
Add guide on running tests
zivkovicmilos Sep 4, 2023
3a40dd4
Merge branch 'master' into feature/official-docs
zivkovicmilos Oct 3, 2023
da1fe7b
feat: add grc20 + grc721 guides (#16)
waymobetta Oct 8, 2023
c940c2c
feat: index from dev portal (#18)
r3v4s Oct 10, 2023
e2343c6
feat: add contents from portal (#19)
dongwon8247 Oct 10, 2023
a324ce5
feat: add howto - deploy & write-simple-dapp (#17)
leohhhn Oct 10, 2023
ab9c39a
initial explaination doc for gno modules (#20)
harry-hov Oct 11, 2023
db983b9
style: customize doc styles (#21)
alexiscolin Oct 12, 2023
22c0cde
Drop some docs temporarily
zivkovicmilos Oct 12, 2023
23a747f
Reorganize the docs, so they are framework agnostic
zivkovicmilos Oct 12, 2023
cfc4459
Clean up config
zivkovicmilos Oct 12, 2023
38d9a12
Merge branch 'master' into feature/official-docs
zivkovicmilos Oct 12, 2023
679fa08
Update docs/explanation/gno-language.md
zivkovicmilos Oct 17, 2023
7842672
Update docs/explanation/gno-language.md
zivkovicmilos Oct 17, 2023
4ec69ee
Update docs/explanation/gno-modules.md
zivkovicmilos Oct 17, 2023
7ae2920
Update docs/explanation/gno-modules.md
zivkovicmilos Oct 17, 2023
9f7ab77
Update docs/explanation/gno-test.md
zivkovicmilos Oct 17, 2023
4ba996d
Update docs/explanation/gno-tooling/cli/gnofaucet.md
zivkovicmilos Oct 17, 2023
67f73b8
Update docs/how-to-guides/Interact-with-gnoland.md
zivkovicmilos Oct 17, 2023
21283a8
Update docs/explanation/realms.md
zivkovicmilos Oct 17, 2023
35942e6
Update docs/explanation/realms.md
zivkovicmilos Oct 17, 2023
cd33a9c
Update docs/getting-started/working-with-key-pairs.md
zivkovicmilos Oct 17, 2023
ee0a7ff
Update docs/explanation/tendermint2.md
zivkovicmilos Oct 17, 2023
acaf2aa
Update docs/explanation/realms.md
zivkovicmilos Oct 17, 2023
d004bb1
Merge branch 'master' into feature/official-docs
zivkovicmilos Oct 21, 2023
6d3e57c
Rephrase sentence
zivkovicmilos Oct 21, 2023
531642c
Rephase Ethereum section
zivkovicmilos Oct 21, 2023
db5eda0
Fix typo
zivkovicmilos Oct 21, 2023
e4ee8a0
Update docs/explanation/gno-language.md
leohhhn Oct 31, 2023
43384c5
Update docs/explanation/gno-language.md
leohhhn Oct 31, 2023
b6089ba
Update docs/explanation/gno-language.md
leohhhn Oct 31, 2023
458598d
Update docs/explanation/gno-modules.md
leohhhn Oct 31, 2023
40fa990
Rephrase gno-language.md sentence
zivkovicmilos Nov 8, 2023
00cbe6d
Drop common params doc
zivkovicmilos Nov 8, 2023
6bf83af
Improve gnofaucet.md
zivkovicmilos Nov 8, 2023
3603681
Add disclaimer for Adena
zivkovicmilos Nov 8, 2023
7254544
Swap test3 for staging
zivkovicmilos Nov 8, 2023
72e20b1
Update docs/getting-started/setting-up-a-local-chain.md
zivkovicmilos Nov 8, 2023
ecdb870
Merge branch 'feature/official-docs' of https://github.com/zivkovicmi…
zivkovicmilos Nov 8, 2023
969e914
Add form GUI explanation
zivkovicmilos Nov 8, 2023
e89d450
Rename file
zivkovicmilos Nov 8, 2023
1e627ef
Rename installation to local setup
zivkovicmilos Nov 8, 2023
fba2029
Add link to Gnolang
zivkovicmilos Nov 8, 2023
824816e
Rename Packages to Pure Packages
zivkovicmilos Nov 8, 2023
ef941e0
Add disclaimer for chain id
zivkovicmilos Nov 8, 2023
e8f1460
Update tm2 doc
zivkovicmilos Nov 8, 2023
d6ee4da
Add code embed support
zivkovicmilos Nov 8, 2023
43d4dba
Rename lang shorthand
zivkovicmilos Nov 8, 2023
b949947
Update docs/explanation/gno-modules.md
zivkovicmilos Nov 8, 2023
7da892e
Update docs/explanation/gno-modules.md
zivkovicmilos Nov 8, 2023
2206eac
Rephrase
zivkovicmilos Nov 8, 2023
4b6fa24
Update docs/explanation/gno-modules.md
zivkovicmilos Nov 8, 2023
3c67978
Update docs/explanation/gno-modules.md
zivkovicmilos Nov 8, 2023
f888653
Update docs/explanation/gno-modules.md
zivkovicmilos Nov 8, 2023
b1ac173
Remove duplicate compatibility doc
zivkovicmilos Nov 8, 2023
6b68949
Merge branch 'master' into feature/official-docs
zivkovicmilos Nov 8, 2023
8ba08b8
Add devrels to own the docs
zivkovicmilos Nov 8, 2023
90922f5
Fix hanging references
zivkovicmilos Nov 9, 2023
408f0fa
Update docs/explanation/gnovm.md
zivkovicmilos Nov 9, 2023
9073308
Update docs/explanation/gnovm.md
zivkovicmilos Nov 9, 2023
34de86c
Merge branch 'master' into feature/official-docs
zivkovicmilos Nov 9, 2023
5e9b9d2
Merge branch 'feature/official-docs' of https://github.com/zivkovicmi…
zivkovicmilos Nov 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/gno-docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
3 changes: 3 additions & 0 deletions docs/gno-docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/gno-doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: gno-doc
---

# Gno Doc

TODO
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/gno-language.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: gno-language
---

# The Gno Language

TODO
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/gno-modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: gno-modules
---

# Gno Modules

TODO
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/gno-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: gno-test
---

# Gno Test

TODO
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/gno-tooling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: gno-tooling
---

# Gno Tooling

TODO
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/gnovm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: gnovm
---

# GnoVM

TODO
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/ibc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: ibc
---

# IBC

TODO
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: packages
---

# Packages

TODO
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/realms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: realms
---

# Realms

TODO
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/standard-library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: explain-standard-library
---

# Gno Standard Library

TODO
7 changes: 7 additions & 0 deletions docs/gno-docs/docs/explanation/tendermint2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: tendermint2
---

# Tendermint2

TODO
96 changes: 96 additions & 0 deletions docs/gno-docs/docs/getting-started/browsing-gno-source-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
id: browsing-gno-source-code
---

# 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
to achieve Realm state visibility.

## Prerequisites

- **`gnoweb` set up. Reference the [Installation](installation.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.

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

```bash
gnoland start
```

## 2. Start `gnoweb`

Now that the chain is running, we can start the `gnoweb` tool:

```bash
gnoweb
```

:::info Different JSON-RPC URL

In case you are running a node on a different JSON-RPC URL from the default one (`http://127.0.0.1:26657`),
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](../../static/img/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.

Using `gnoweb`, we can browse the source code in our browser.
For example, the `avl` package is deployed at `gno.land/p/demo/avl`.

To access the source code of the `avl` package, we can append the `/p/demo/avl` to our browser URL (from the homepage).

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](../../static/img/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.

## 4. Browse Realm source code

In contrast to Packages, Realms in Gno.land usually have names resembling `gno.land/r/<name>`.

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.

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

To view the internal Realm state of the `boards` package, we can append the `/r/demo/boards` to our browser URL (from
the homepage).

The final URL for the `boards` Realm internal state could be viewable at http://127.0.0.1:8888/r/demo/boards, if we
followed
default setup params, as we did in this guide.

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

:::info Render() is not required

Internal Realm state does not have to be exposed through the `Render()` method of the realm, as it is
not a requirement for deploying a Realm.

:::

Additionally, to view the source code for the realm, we simply need to append the `/` to the full realm path:

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

![gnoweb boards source](../../static/img/getting-started/browsing-gno-source-code/gnoweb-boards-source.png)
111 changes: 111 additions & 0 deletions docs/gno-docs/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
id: installation
---

# Installation

## Overview

In this tutorial, you will learn how to set up the Gno development environment locally, so you
can get up and running writing Gno code. You will download and install all the necessary tooling,
and validate that they are correctly configured to run on your machine.

## Prerequisites

- **Git**
- **`make` (for running Makefiles)**
- **Go 19+**

## 1. Cloning the repository

To get started with a local Gno.land development environment, you must clone the GitHub repository
somewhere on disk:

```bash
git clone https://github.com/gnolang/gno.git
```

## 2. Installing the `gno` development toolkit

Next, we are going to build and install the `gno` development toolkit.
`gno` provides ample functionality to the user, among which is running, precompiling, testing and building `.gno` files.

To install the toolkit, navigate to the `gnovm` folder from the repository root, and run the `build` make directive:

```bash
cd gnovm
make build
```

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

![gno tool build](../../static/img/getting-started/installation/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:

```bash
make install
```

To verify the `gno` binary is installed system-wide, you can run:

```bash
gno --help
```

You should get the help output from the command:

![gno help](../../static/img/getting-started/installation/gno-help.gif)

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

```bash
go run ./cmd/gno --help
```

## 3. Installing other `gno` tools

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](creating-a-key-pair.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)

To build these tools, from the root directory navigate to the `gno.land` sub-folder, and run the `build` make
directive:

```bash
cd gno.land
make build
```

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

![gno tools build](../../static/img/getting-started/installation/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:

```bash
make install
```

To verify that, for example, the `gnokey` binary is installed system-wide, you can run:

```bash
gnokey --help
```

You should get the help output from the command:

![gnokey help](../../static/img/getting-started/installation/gnokey-help.gif)

## Conclusion

That's it 🎉

You have successfully built out and installed the necessary tools for Gno development!

In further documents, you will gain a better understanding on how they are used to make Gno work.
Loading
Loading