Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ You can read the docs in [Gitbook](https://onbloc.gitbook.io/gnoland-developer-p
* [Environment Setup](docs/environment-setup/)
* [Initial Setup](docs/environment-setup/initial-setup.md)
* [Build the Local Testnet](docs/environment-setup/build-the-local-testnet.md)
* [Read the Genesis again](docs/environment-setup/restart-on-block-1-to-read-the-genesis-again.md)
* [CLI](docs/cli/)
* [Common Parameters](docs/cli/common-parameters.md)
* [gnokey](docs/cli/gnokey.md)
Expand Down
1 change: 1 addition & 0 deletions docs/environment-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ This section guides on how to set up development environments.

* [Initial Setup](initial-setup.md)
* [Build the Local Testnet](build-the-local-testnet.md)
* [Read the genesis again](restart-on-block-1-to-read-the-genesis-again.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
In order to obtain GNOT tokens for your tests, it's often said you can **edit the genesis** file.

However if you launched `build/gnoland` locally already, you won't get any token.
That's because it starts again at whatever block it was, and at this point the genesis file isn't read anymore.

`$ gnokey query auth/accounts/g1fjh9y7ausp27dqsdq0qrcsnmgvwm6829v2au7d`

Response:
```
height: 0
data: null
```

In order to begin at the genesis again, just remove the testdir folder and start gnoland again:

1. edit `gnoland/genesis/genesis_balances.txt` adding your address
2. `mv testdir testdir.old`
3. `build/gnoland`

Now the blockchain restarts on block 1.

`$ gnokey query auth/accounts/g1fjh9y7ausp27dqsdq0qrcsnmgvwm6829v2au7d`

should work:
```
height: 0
data: {
"BaseAccount": {
"address": "g1fjh9y7ausp27dqsdq0qrcsnmgvwm6829v2au7d",
"coins": "10000000000ugnot",
"public_key": null,
"account_number": "5",
"sequence": "0"
}
}
```