{"id":21820163,"url":"https://github.com/5afe/safe-relay-service","last_synced_at":"2025-07-04T12:32:46.236Z","repository":{"id":37825037,"uuid":"134711860","full_name":"5afe/safe-relay-service","owner":"5afe","description":"Relay Tx Service for Gnosis Safe","archived":false,"fork":false,"pushed_at":"2023-08-04T10:38:20.000Z","size":1503,"stargazers_count":59,"open_issues_count":8,"forks_count":33,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-14T02:48:26.296Z","etag":null,"topics":["blockchain","ethereum","gnosis","gnosis-safe","relay"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/5afe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-24T12:24:57.000Z","updated_at":"2024-07-09T09:50:48.000Z","dependencies_parsed_at":"2024-11-27T16:35:24.632Z","dependency_job_id":"fd870545-1e1c-4710-aedb-3f94df6fd2a0","html_url":"https://github.com/5afe/safe-relay-service","commit_stats":null,"previous_names":[],"tags_count":131,"template":false,"template_full_name":null,"purl":"pkg:github/5afe/safe-relay-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5afe%2Fsafe-relay-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5afe%2Fsafe-relay-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5afe%2Fsafe-relay-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5afe%2Fsafe-relay-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5afe","download_url":"https://codeload.github.com/5afe/safe-relay-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5afe%2Fsafe-relay-service/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263541701,"owners_count":23477454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","ethereum","gnosis","gnosis-safe","relay"],"created_at":"2024-11-27T16:28:59.290Z","updated_at":"2025-07-04T12:32:46.216Z","avatar_url":"https://github.com/5afe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/5afe/safe-relay-service/actions/workflows/python.yml/badge.svg)](https://github.com/5afe/safe-relay-service/actions/workflows/python.yml)\n[![Coverage Status](https://coveralls.io/repos/github/5afe/safe-relay-service/badge.svg?branch=master)](https://coveralls.io/github/5afe/safe-relay-service?branch=master)\n![Python 3.10](https://img.shields.io/badge/Python-3.10-blue.svg)\n![Django 4](https://img.shields.io/badge/Django-4-blue.svg)\n[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/safeglobal/safe-relay-service?label=Docker\u0026sort=semver)](https://hub.docker.com/r/safeglobal/safe-relay-service)\n\n# Disclaimer\nRelay is no longer actively maintained by the Safe team and will only get dependency updates when possible.\n\n# Safe Relay Service\nThis service allows us to have owners of the Safe contract that don’t need to hold any ETH on those owner addresses.\nHow is this possible? The **Transaction Relay Service** acts as a proxy, paying for the transaction fees and getting it\nback due to the transaction architecture we use. It also enables the user to pay for ethereum transactions\nusing **ERC20 tokens**.\n\nSetup for development (using ganache)\n-------------------------------------\nThis is the recommended configuration for developing and testing the Relay service. `docker-compose` is required for\nrunning the project.\n\nConfigure the parameters needed on `.env_ganache`. By default the private keys of the accounts are the ones from\nGanache, and the contract addresses are calculated to be the ones deployed by the Relay when the application starts,\nso there's no need to configure anything.\n\nMore parameters can be added to that file like:\n- `SAFE_FIXED_CREATION_COST`: For fixed price in wei for deploying a Safe. If you set `0` you allow Safes to be\ndeployed for free.\n- `SAFE_CONTRACT_ADDRESS` to change the Safe's master copy address.\n- For more parameters check `base.py` file.\n\nThen:\n```bash\ndocker-compose -f docker-compose.yml -f docker-compose.dev.yml build --force-rm\ndocker-compose -f docker-compose.yml -f docker-compose.dev.yml up\n```\n\nThe service should be running in `localhost:8000`\n\nSetup for production\n--------------------\nThis is the recommended configuration for running a production Relay. `docker-compose` is required\nfor running the project.\n\nConfigure the parameters needed on `.env`. These parameters **need to be changed**:\n- `ETHEREUM_NODE_URL`: Http/s address of a ethereum node.\n- `SAFE_FUNDER_PRIVATE_KEY`: Use a private key for an account with ether on that network. It's used to deploy new Safes.\n- `SAFE_TX_SENDER_PRIVATE_KEY`: Same as the `SAFE_FUNDER_PRIVATE_KEY`, but it's used to relay all transactions.\n\nAnother parameters can be configured like:\n- `SAFE_CONTRACT_ADDRESS`: If you are not using default Safe Master Copy.\n- `SAFE_FIXED_CREATION_COST`: For fixed price in wei for deploying a Safe. If you set `0` you allow Safes to be\ndeployed for free.\n- For more parameters check `base.py` file.\n\nThen:\n```bash\ndocker-compose build --force-rm\ndocker-compose up\n```\n\nThe service should be running in `localhost:8000`\n\nFor example, to set up a **Göerli** node:\n- Set `ETHEREUM_NODE_URL` to `https://goerli.infura.io/v3/YOUR-PROJECT-ID` (if using INFURA)\n- Set `SAFE_FUNDER_PRIVATE_KEY` and `SAFE_TX_SENDER_PRIVATE_KEY` to accounts that have Göerli ether. **Don't use\nthe same account for both**\n\nRun:\n```bash\ndocker-compose build --force-rm\ndocker-compose up\n```\n\nYou can test everything is set up:\n\n```bash\ncurl 'http://localhost:8000/api/v1/about/'\n```\n\n## Use admin interface\nServices come with a basic administration web ui (provided by Django). A user must be created first to\nget access:\n```bash\ndocker exec -it safe-relay-service_worker_1 bash\npython manage.py createsuperuser\n```\n\nThen go to the web browser and navigate to http://localhost:8000/admin/\n\n\n## Add your custom gas token\nCustom tokens can be added as a payment option for the Relay Service from the **admin interface**:\n- Navigate to `Tokens` and click `Add`.\n- Configure your token and set `Fixed eth conversion` if your token has a fixed price (related to ETH price).\nFor example, `WETH` token has a `fixed eth conversion` equal to `1`. If not, leave it blank.\n- If you want to set up a dynamic oracle after adding your `Token` you need to add a `Price Oracle Ticker`.\nYou can choose multiple oracle sources. Go back to your `Token` and check if `Eth value` is correct.\n- Price is always shown as a reference to Ethereum, so for example `WETH` will have a `eth value` of `1`\n\nContributors\n------------\n- Stefan George (stefan@gnosis.pm)\n- Denís Graña (denis@gnosis.pm)\n- Giacomo Licari (giacomo.licari@gnosis.pm)\n- Uxío Fuentefría (uxio@gnosis.pm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5afe%2Fsafe-relay-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5afe%2Fsafe-relay-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5afe%2Fsafe-relay-service/lists"}