From 56ef4f22ce3170e506e796ea31b10bbcf891ce52 Mon Sep 17 00:00:00 2001 From: Dzianis Andreyenka Date: Mon, 13 Nov 2023 15:16:41 +0800 Subject: [PATCH] DA-539 Update tezos docs Signed-off-by: Dzianis Andreyenka --- docs/tutorials/chains/tezos_testnet.md | 30 +++++++++++++++++------- docs/tutorials/custom_contracts/tezos.md | 4 ++-- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/docs/tutorials/chains/tezos_testnet.md b/docs/tutorials/chains/tezos_testnet.md index 0ced204c0..930dda238 100644 --- a/docs/tutorials/chains/tezos_testnet.md +++ b/docs/tutorials/chains/tezos_testnet.md @@ -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 -[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 @@ -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 ``` @@ -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 ``` @@ -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: @@ -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. diff --git a/docs/tutorials/custom_contracts/tezos.md b/docs/tutorials/custom_contracts/tezos.md index 0ee18deb3..01754366d 100644 --- a/docs/tutorials/custom_contracts/tezos.md +++ b/docs/tutorials/custom_contracts/tezos.md @@ -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: @@ -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