All Projects → gnosis → safe-transaction-service

gnosis / safe-transaction-service

Licence: MIT license
Keeps track of transactions sent via Gnosis Safe contacts and confirmed transactions. It also keeps track of Ether and ERC20 token transfers to Safe contracts.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to safe-transaction-service

gnosis-py
Gnosis-py includes a set of libraries to work with Ethereum and Gnosis projects
Stars: ✭ 68 (-5.56%)
Mutual labels:  multisig, gnosis, gnosis-safe
safe-relay-service
Relay Tx Service for Gnosis Safe
Stars: ✭ 48 (-33.33%)
Mutual labels:  gnosis, gnosis-safe
admin-sticky-widget-areas
A simple WordPress plugin to make the widget areas on the right side at /wp-admin/widgets.php sticky.
Stars: ✭ 22 (-69.44%)
Mutual labels:  backend
get hired training
A set of videos and tips to help our students to be hired as developers 💯
Stars: ✭ 18 (-75%)
Mutual labels:  backend
woliveiras.github.io
My personal Blog
Stars: ✭ 25 (-65.28%)
Mutual labels:  backend
umbrella
Umbrella framework
Stars: ✭ 98 (+36.11%)
Mutual labels:  backend
multi-projects-architecture-with-Ktor
A Ktor real world example built on multi-projects architecture
Stars: ✭ 29 (-59.72%)
Mutual labels:  backend
bad-cards-game
Bad Cards Game
Stars: ✭ 23 (-68.06%)
Mutual labels:  backend
framework
Typetron is a modern Node.js framework for building backend web apps with Typescript
Stars: ✭ 28 (-61.11%)
Mutual labels:  backend
next-api-decorators
Collection of decorators to create typed Next.js API routes, with easy request validation and transformation.
Stars: ✭ 187 (+159.72%)
Mutual labels:  backend
fastapi-framework
A FastAPI Framework for things like Database, Redis, Logging, JWT Authentication, Rate Limits and Sessions
Stars: ✭ 26 (-63.89%)
Mutual labels:  backend
issue-wanted
🏷 Web application to help beginners to start contributing into Haskell projects
Stars: ✭ 61 (-15.28%)
Mutual labels:  backend
sisyphus
Sisyphus is the way how we provide backend services.
Stars: ✭ 59 (-18.06%)
Mutual labels:  backend
Mastering-PHP7
📚 PinterCoding University. Author : Gun Gun Febrianza
Stars: ✭ 92 (+27.78%)
Mutual labels:  backend
nextjs-graphql-adminpanel
Admin panel built with NextJS(Typescript), Material UI, Apollo Client & GraphQL. In the backend, Prisma 2 with Nexus and Mysql is used.
Stars: ✭ 119 (+65.28%)
Mutual labels:  backend
hrms-project-backend
N-Layer Architecture human resource management system project with Java.
Stars: ✭ 74 (+2.78%)
Mutual labels:  backend
laravel-realworld-example-app
Exemplary RealWorld backend API built with Laravel PHP framework.
Stars: ✭ 34 (-52.78%)
Mutual labels:  backend
media manager plus
Ermöglicht das Gruppieren von Media-Manager-Typen und stellt eine Frontend-API (PictureTag) bereit.
Stars: ✭ 21 (-70.83%)
Mutual labels:  backend
paperclip
A DSL for web UI builders
Stars: ✭ 197 (+173.61%)
Mutual labels:  backend
mojo.js
🦄 The Mojolicious real-time web framework for Node.js
Stars: ✭ 145 (+101.39%)
Mutual labels:  backend

Build Status Coverage Status pre-commit Python 3.10 Django 3

Gnosis Transaction Service

Keeps track of transactions sent via Gnosis Safe contracts. It uses events and tracing to index the txs.

Transactions are detected in an automatic way, so there is no need of informing the service about the transactions as in previous versions of the Transaction Service.

Transactions can also be sent to the service to allow offchain collecting of signatures or informing the owners about a transaction that is pending to be sent to the blockchain.

Swagger (Mainnet version) Swagger (Rinkeby version)

Index of contents

Setup for development

Use a virtualenv if possible:

python -m venv venv

Then enter the virtualenv and install the dependencies:

source venv/bin/activate
pip install -r requirements-dev.txt
pre-commit install -f
cp .env.dev .env
./run_tests.sh

Setup for development using docker

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

Setup for production (event indexing)

Since version 3.0.0 transaction service can be configured to rely on event indexing when SafeL2 version is used. Only contracts from v1.3.0 onwards with L2 events will be indexed.

An example environment file can be used for the L2 setup:

cp .env.l2.sample .env

Edit .env file to add ETHEREUM_NODE_URL (on the example a Polygon public node is used) and remember to modify DJANGO_SECRET_KEY to use a strong key. The rest of the configuration does not need to be modified. Then:

docker-compose build --force-rm
docker-compose up

If the network is not supported yet contracts can be deployed using the deployment instructions and then a PR should be provided to this service adding the deployment block number and the address (address will be the same for every network). Only ProxyFactory and GnosisSafeL2 must be configured. +L2 must be added to the Safe contract versions, so the service knows the contract can be indexed using events.

For more parameters check base.py file.

Setup for production (tracing mode)

This is the recommended configuration for running a production Transaction service. docker-compose is required for running the project.

bash cp .env.tracing.sample .env

Configure the parameters needed on .env. These parameters need to be changed:

  • DJANGO_SECRET_KEY: Use a strong key.
  • ETHEREUM_NODE_URL: Http/s address of a ethereum node. It can be the same than ETHEREUM_TRACING_NODE_URL.
  • ETHEREUM_TRACING_NODE_URL: Http/s address of an OpenEthereum node with tracing enabled.

If you don't want to use trace_filter for the internal tx indexing and just rely on trace_block, set:

  • ETH_INTERNAL_NO_FILTER=1

For more parameters check base.py file.

Then:

docker-compose build --force-rm
docker-compose up

The service should be running in localhost:8000. You can test everything is set up:

curl 'http://localhost:8000/api/v1/about/'

You can go to http://localhost:5555/ to check the status of the task queue, also you can configure prometheus metrics.

For example, to set up a Göerli node:

Run an OpenEthereum node in your local computer:

openethereum --chain goerli --tracing on --db-path=/media/ethereum/openethereum --unsafe-expose

Edit .env so docker points to the host OpenEthereum node:

ETHEREUM_NODE_URL=http://172.17.0.1:8545
ETHEREUM_TRACING_NODE_URL=http://172.17.0.1:8545

Then:

docker-compose build --force-rm
docker-compose up

Setup for private network

Instructions for production still apply, but some additional steps are required:

  • Deploy the last version of the Safe Contracts on your private network.
  • Add their addresses and the number of the block they were deployed (to optimize initial indexing). Service is currently configured to support Mainnet, Rinkeby, Goerli, Kovan, xDai, Polygon, EWC...
  • If you have a custom network id you can change this line ethereum_network = ethereum_client.get_network() to ethereum_network_id = ethereum_client.w3.net.version and use the network id instead of the Enum.
  • Only contracts that need to be configured are the ProxyFactory that will be used to deploy the contracts and the GnosisSafe/GnosisSafeL2.

Use admin interface

Services come with a basic administration web ui (provided by Django) by default on http://localhost:8000/admin/

A user must be created to get access:

docker exec -it safe-transaction-service-web-1 python manage.py createsuperuser

Safe Contract ABIs and addresses

Troubleshooting

Issues installing grpc on a Mac M1

If you face issues installing the grpc dependency locally (required by this project) on a M1 chip, set GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 and GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 and then try to install the dependency again.

Contributors

See contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].