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

Documentation for working with the Tezos Blockchain #1412

Merged
merged 15 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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 docs/_i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ pages:
xdc_testnet: XDC Testnet
zksync_testnet: zkSync Testnet
rotate_dx_certs: Rotate Data Exchange Certificates
tezos_testnet: Tezos Testnet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorials/chains/images/tezos_faucet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
97 changes: 97 additions & 0 deletions docs/tutorials/chains/tezos_testnet.md
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 [local signing](https://signatory.io/docs/file_based) option.
denisandreenko marked this conversation as resolved.
Show resolved Hide resolved
Note: tezos accounts (private/public keys) should be generated by chosen KMS.
denisandreenko marked this conversation as resolved.
Show resolved Hide resolved

## 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 tezosonnect blockchain connector. Create a text file called `tezosconnect.yml` with the following contents:
denisandreenko marked this conversation as resolved.
Show resolved Hide resolved

```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/tezosonnect.yml`. If your path is different, you will need to adjust the path in the next command below.
denisandreenko marked this conversation as resolved.
Show resolved Hide resolved

## 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 `tezosonnect` config file
denisandreenko marked this conversation as resolved.
Show resolved Hide resolved

To do this, run the following command:

```
ff init ethereum tezos 1 \
--multiparty=false \
--connector-config ~/Desktop/tezosonnect.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--connector-config ~/Desktop/tezosonnect.yml
--connector-config ~/Desktop/tezosconnect.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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
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 the 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
First, you need to get an account address, which was created during [signer set up](#signatory) step.
First, you need to get an account address, which was created during the [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.
2 changes: 1 addition & 1 deletion docs/tutorials/custom_contracts/pinning.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: default
title: Pinning Data
parent: pages.custom_smart_contracts
grand_parent: pages.tutorials
nav_order: 3
nav_order: 4
---

# Pin off-chain data to a custom blockchain transaction
Expand Down
Loading