Giter Club home page Giter Club logo

safe-client-gateway's Introduction

Safe Client Gateway

Actions Status Coverage Status

Motivation

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.

Documentation

Quickstart

This project requires rustup and redis

rustup default nightly # (Rocket currently requires a nightly version)
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

Configuration

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.

Environment

Place a .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)

Tests

To run all tests use the cargo test command. If you want to run a specific subset of tests, then add additionally any info regarding the path of the tests and cargo will match it.

Example: cargo test converters will run every tests under the converters module. Matching occurs also at a test name level, so by writing the full name of a test, that single test can be run.

Additionally, for cache testing, we have included a script that fills up the cache as it would happen in production. You can find the script in ./scripts/load_tester/start.py. To run the script, use the following commands:

python3 -m venv venv
source venv/bin/activate && pip install -r scripts/cache_warmer/requirements.txt
python scripts/cache_warmer/start.py
# once you are done testing
deactivate

safe-client-gateway's People

Contributors

jpalvarezl avatar rmeissner avatar dependabot[bot] avatar fmrsabino avatar uxio0 avatar antomor avatar biafra23 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.