Gateway service for Safe apps that serve transaction data conforming with the UI of our mobile apps
This project is a gateway between the Safe clients (Android/ iOS/ web) and the Safe backend services (transaction service and Ethereum nodes). It is providing a more UI-oriented mapping and multi-sourced data structures for ease of integration and rendering.
This project requires
git clone https://github.com/gnosis/safe-client-gateway.git cd safe-client-gateway cp .env.sample .env redis-server cargo run ./add_rustfmt_git_hook.sh # It installs a git precommit hook that will autoformat the code on every commit
After doing any change code must be formatted using Rustfmt
cargo fmt --allAuto formatting can also be configured in the most common code editors
Rocket specific configurations (including databases) can be configured via the
Rocket.toml for local development (see https://rocket.rs/v0.4/guide/configuration/#rockettoml).
For configurations specific to this service the
.env file can be used. See next section.
.env file in the root of the project containing URL pointing to the environment in which you want the gateway to run.
The contents of the file should be the following (see
.env.sample for an example)
In order to run the test suite of the project:
REDIS_URIis set and points to the current Redis instance (assuming Redis is runnning on the default port
cargo test -- --test-threads 1
cargo test will execute the tests in the test suite in parallel. Because some of the tests update some shared local state (eg.: environment variables) the tests should be executed on a single thread – thus