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

Improve setup docs #146

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions docs/chain_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 13 additions & 3 deletions docs/running_locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,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:

Expand Down Expand Up @@ -110,3 +116,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)
Loading