Skip to content

Commit

Permalink
Merge pull request #1426 from OneOf-Inc/docs/tezos
Browse files Browse the repository at this point in the history
DA-539 Update tezos docs
  • Loading branch information
nguyer authored Nov 15, 2023
2 parents 951e655 + 56ef4f2 commit e0e9e34
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
30 changes: 21 additions & 9 deletions docs/tutorials/chains/tezos_testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ If you haven't set up the FireFly CLI already, please go back to the Getting Sta

## 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.
[Signatory](https://signatory.io/) service allows to work with many different key-management systems.\
By default, FF uses [local signing](https://signatory.io/docs/file_based) option.\
However, it is also possible to configure the transaction signing service using key management systems such as: AWS/Google/Azure KMS, HCP Vault, etc.
> **NOTE**: The default option is not secure and is mainly used for development and demo purposes. Therefore, for the production, use the selected KMS.\
The full list can be found [here](https://github.com/ecadlabs/signatory#backend-kmshsm-support-status).

## Create a `tezosconnect.yml` config file

Expand All @@ -36,7 +37,7 @@ In order to connect to the Tezos testnet, you will need to set a few configurati
```yml
connector:
blockchain:
rpc: https://rpc.ghost.tzstats.com
rpc: https://ghostnet.ecadinfra.com
network: ghostnet
signatory: http://127.0.0.1:6732 # tx signing service address
```
Expand All @@ -54,7 +55,7 @@ To create a local FireFly development stack and connect it to the Tezos Ghostnet
To do this, run the following command:

```
ff init ethereum tezos 1 \
ff init tezos dev 1 \
--multiparty=false \
--connector-config ~/Desktop/tezosonnect.yml
```
Expand All @@ -64,7 +65,7 @@ ff init ethereum tezos 1 \
Now you should be able to start your stack by running:

```
ff start tezos
ff start dev
```

After some time it should print out the following:
Expand All @@ -76,14 +77,25 @@ Sandbox UI for member '0': http://127.0.0.1:5109
To see logs for your stack run:
ff logs tezos
ff logs dev
```

## 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.
First, you need to get an account address, which was created during [signer set up](#signatory) step.\
To check that, you can run:
```
ff accounts list dev
[
{
"address": "tz1cuFw1E2Mn2bVS8q8d7QoCb6FXC18JivSp",
"privateKey": "..."
}
]
```


After that, go to [Tezos Ghostnet Faucet](https://faucet.ghostnet.teztnets.xyz/) and paste the address in the form and click the **Request** button.

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/custom_contracts/tezos.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Smart contracts on Tezos can be programmed using familiar, developer-friendly la

First let's look at a simple contract smart contract called `SimpleStorage`, which we will be using on a Tezos blockchain. Here we have one state variable called 'storedValue' and initialized with the value 12. During initialization the type of the variable was defined as 'int'. You can see more at [SmartPy types](https://smartpy.io/manual/syntax/integers-and-mutez). And then we added a simple test, which set the storage value to 15 and checks that the value was changed as expected.

> **NOTE:** Tests are used to verify the validity of contract entrypoints and do not affect the state of the contract during deployment.
> **NOTE:** Smart contract's tests (marked with `@sp.add_test` annotation) are used to verify the validity of contract entrypoints and do not affect the state of the contract during deployment.
Here is the source for this contract:

Expand Down Expand Up @@ -475,7 +475,7 @@ Now that we've got everything set up, it's time to use our smart contract! We're
}
```

> **NOTE**: The `key` field is the Tezos account address, which will be used for signing our transactions.
> **NOTE**: The `key` field (optional) is the tezos account's address, which is used to sign blockchain transactions.\
See more at [transaction signing service set up](../chains/tezos_testnet.md#signatory).

### Response
Expand Down

0 comments on commit e0e9e34

Please sign in to comment.