From e68b3ccbf560329c10cad03c8eaa3d4f3e361bac Mon Sep 17 00:00:00 2001 From: Uxio Fuentefria Date: Fri, 5 Jul 2024 13:02:45 +0200 Subject: [PATCH] Improve setup docs - Add missing information about chainInfo - Add missing information about MasterCopies and Proxy Factories --- docs/chain_info.md | 4 ++++ docs/running_locally.md | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/chain_info.md b/docs/chain_info.md index 010d84e..23c5b71 100644 --- a/docs/chain_info.md +++ b/docs/chain_info.md @@ -12,6 +12,10 @@ At any point, if you see a value that you are unsure how to supply, just look at These values are meant to be provided in the admin panel `http://localhost:8000/cfg/admin` of the Safe Config Service (CFG) +## EIP-3779 Shortnames + +They must match the ones in the [Safe SDK repo](https://github.com/safe-global/safe-core-sdk/blob/main/packages/protocol-kit/src/utils/eip-3770/config.ts). + ## Connecting the Safe Client Gateway (CGW) to the Safe Transaction Service (TXS) The CGW can forward requests to many independently running TXS instances pointing to different chains. The CFG has to keep a registry of every available instance of the TXS. diff --git a/docs/running_locally.md b/docs/running_locally.md index f725567..92fb7b0 100644 --- a/docs/running_locally.md +++ b/docs/running_locally.md @@ -6,6 +6,7 @@ - [Brief Docker Crash Course](docker_cheatsheet.md) **Important Note:** If you followed the guide some time ago, it's recommended to clean the existing data: + - Remove docker volumes: `docker-compose rm -f -v`. - Remove `./data` folder, that holds the database. @@ -62,15 +63,21 @@ Note 1: note that the path to `manage.py` is different. In case you need to run We need to be able to define a `ChainInfo` object in the Safe Config service so that the Client Gateway knows the URL of the Safe Transaction service instance it needs to request against for a given safe. -You can do this in the admin interface of the Safe Config service: `http://localhost:8000/cfg/admin/chains/chain/add/` +Check this [section](chain_info.md) for a guide on the fields for `ChainInfo`. + +You can do this in the admin interface of the Safe Config service: `http://localhost:8000/cfg/admin/chains/chain/add/`. You can verify that your `ChainInfo` was successfully added by going to `http://localhost:8000/cfg/api/v1/chains`. Remember to edit your `ChainInfo` json fields `transaction_service_uri` and `vpc_transaction_service_uri` to point to your local instance of the transaction service. The values should be `http://nginx:8000/txs` -Check this [section](chain_info.md) for a more complete guide on the fields for `ChainInfo`. +## Step 4: Add your `MasterCopies` and `ProxyFactories` + +By default, tx service will auto setup `MasterCopies` and `Proxy Factories` for +[a of networks](https://github.com/safe-global/safe-eth-py/blob/main/gnosis/safe/addresses.py). +If your network is not supported you have to add the addresses manually in http://localhost:8000/txs/admin/ -## Step 4: Add your webhooks +## Step 5: Add your webhooks Our services invalidate the caches of the client gateway using webhooks. Both the Config and Events service need to be configured. For the Config service, unless you've changed the values in `cgw.env` and `cfg.env` then you don't need to do anything, otherwise: @@ -106,3 +113,7 @@ The Safe Web app will be available at at http://localhost:8000/ although check t Add your `NEXT_PUBLIC_INFURA_TOKEN` value if its required for the chain RCP uri in the [container_env_files/ui.env](../container_env_files/ui.env) file. Additionally, the Safe Web app itself, defines which instance of the Safe CGW to use in this [container_env_files/ui.env](../container_env_files/ui.env) file. The value of `NEXT_PUBLIC_GATEWAY_URL_PRODUCTION` defines the URL where the Safe CGW can be reached. The default in this repo, points to the instance running as part of the `docker-compose.yml` file, but can be adjusted to point to our production instances, or your own hosted instance. + +## Video tutorial + +Not recorded by the Safe team, but [here you can find an example of setting up Avalanche Fuji C-Chain](https://www.youtube.com/watch?v=FUytj_xStDI)