-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1412 from OneOf-Inc/docs/tezos_tutorial
Documentation for working with the Tezos Blockchain
- Loading branch information
Showing
9 changed files
with
725 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
layout: i18n_page | ||
title: pages.tezos_testnet | ||
parent: pages.chains | ||
grand_parent: pages.tutorials | ||
nav_order: 6 | ||
--- | ||
|
||
# {%t pages.tezos_testnet %} | ||
{: .no_toc } | ||
|
||
1. TOC | ||
{:toc} | ||
|
||
--- | ||
|
||
This guide will walk you through the steps to create a local FireFly development environment and connect it to the public Tezos Ghostnet testnet. | ||
|
||
## Previous steps: Install the FireFly CLI | ||
|
||
If you haven't set up the FireFly CLI already, please go back to the Getting Started guide and read the section on how to [Install the FireFly CLI](../../gettingstarted/firefly_cli.md). | ||
|
||
[← ① Install the FireFly CLI](../../gettingstarted/firefly_cli.md){: .btn .btn-purple .mb-5} | ||
|
||
## Set up the transaction signing service <a name="signatory"></a> | ||
|
||
[Signatory](https://signatory.io/) service allows to work with many different key-management systems. | ||
You should choose and set up an appropriate one. | ||
For development/prototyping purposes the easiest way is to use the [local signing](https://signatory.io/docs/file_based) option. | ||
Note: Tezos accounts (private/public keys) should be generated by chosen KMS. | ||
|
||
## Create a `tezosconnect.yml` config file | ||
|
||
In order to connect to the Tezos testnet, you will need to set a few configuration options for the tezosconnect blockchain connector. Create a text file called `tezosconnect.yml` with the following contents: | ||
|
||
```yml | ||
connector: | ||
blockchain: | ||
rpc: https://rpc.ghost.tzstats.com | ||
network: ghostnet | ||
signatory: http://127.0.0.1:6732 # tx signing service address | ||
``` | ||
For this tutorial, we will assume this file is saved at `~/Desktop/tezosconnect.yml`. If your path is different, you will need to adjust the path in the next command below. | ||
|
||
## Creating a new stack | ||
|
||
To create a local FireFly development stack and connect it to the Tezos Ghostnet testnet, we will use command line flags to customize the following settings: | ||
|
||
- Create a new Tezos based stack named `tezos` with `1` member | ||
- Disable `multiparty` mode. We are going to be using this FireFly node as a Web3 gateway, and we don't need to communicate with a consortium here | ||
- Merge the custom config created above with the generated `tezosconnect.yml` config file | ||
|
||
To do this, run the following command: | ||
|
||
``` | ||
ff init ethereum tezos 1 \ | ||
--multiparty=false \ | ||
--connector-config ~/Desktop/tezosonnect.yml | ||
``` | ||
|
||
## Start the stack | ||
|
||
Now you should be able to start your stack by running: | ||
|
||
``` | ||
ff start tezos | ||
``` | ||
|
||
After some time it should print out the following: | ||
|
||
``` | ||
Web UI for member '0': http://127.0.0.1:5000/ui | ||
Sandbox UI for member '0': http://127.0.0.1:5109 | ||
To see logs for your stack run: | ||
ff logs tezos | ||
``` | ||
|
||
## Get some XTZ | ||
|
||
At this point you should have a working FireFly stack, talking to a public chain. However, you won't be able to run any transactions just yet, because you don't have any way to pay transaction fee. A testnet faucet can give us some XTZ, the native token for Tezos. | ||
|
||
First, you need to get an account address, which was created during [signer set up](#signatory) step. | ||
|
||
After that, go to [Tezos Ghostnet Faucet](https://faucet.ghostnet.teztnets.xyz/) and paste the address in the form and click the **Request** button. | ||
|
||
![Tezos Faucet](images/tezos_faucet.png) | ||
|
||
### Confirm the transaction on TzStats | ||
You should be able to go lookup your account on [TzStats for the Ghostnet testnet](https://ghost.tzstats.com/) and see that you now have a balance of 100 XTZ (or 2001 XTZ accordingly). Simply paste in your account address to search for it. | ||
|
||
On the **Transfers** tab from you account page you will see the actual transfer of the XTZ from the faucet. | ||
|
||
![TzStats](images/tezos_explorer.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.