Repository: safe-global/safe-config-service

Issue:
Add public Transaction Service URL
In addition to the current chain information, in order for the client gateway and the clients to use the services provided by the Safe Transaction Service, the transaction service url should also be returned:

```javascript
{
   "chainId": <stringified-int>,
   ...
   "transactionService" : <url-string> // optional 
}
``` 


Discussion:

Resolving patch:
diff --git a/src/chains/migrations/0002_chain_transaction_service_url.py b/src/chains/migrations/0002_chain_transaction_service_url.py
new file mode 100644
--- /dev/null
+++ b/src/chains/migrations/0002_chain_transaction_service_url.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.2.4 on 2021-06-14 13:09
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ("chains", "0001_initial"),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name="chain",
+            name="transaction_service_url",
+            field=models.URLField(null=True),
+        ),
+    ]
diff --git a/src/chains/models.py b/src/chains/models.py
--- a/src/chains/models.py
+++ b/src/chains/models.py
@@ -9,6 +9,7 @@ class Chain(models.Model):
     currency_name = models.CharField(null=True, max_length=255)
     currency_symbol = models.CharField(max_length=255)
     currency_decimals = models.IntegerField(default=18)
+    transaction_service_url = models.URLField(null=True)
 
     def __str__(self):
         return f"{self.name} | chain_id={self.id}"
diff --git a/src/chains/serializers.py b/src/chains/serializers.py
--- a/src/chains/serializers.py
+++ b/src/chains/serializers.py
@@ -14,6 +14,9 @@ class ChainSerializer(serializers.ModelSerializer):
     chain_id = serializers.CharField(source="id")
     chain_name = serializers.CharField(source="name")
     native_currency = serializers.SerializerMethodField()
+    transaction_service = serializers.URLField(
+        source="transaction_service_url", default=None
+    )
 
     class Meta:
         model = Chain
@@ -23,6 +26,7 @@ class Meta:
             "rpc_url",
             "block_explorer_url",
             "native_currency",
+            "transaction_service",
         ]
 
     @staticmethod


Test patch:
diff --git a/src/chains/tests/factories.py b/src/chains/tests/factories.py
--- a/src/chains/tests/factories.py
+++ b/src/chains/tests/factories.py
@@ -15,3 +15,4 @@ class Meta:
     currency_name = factory.Faker("cryptocurrency_name")
     currency_symbol = factory.Faker("cryptocurrency_code")
     currency_decimals = factory.Faker("pyint")
+    transaction_service_url = factory.Faker("url")
diff --git a/src/chains/tests/test_views.py b/src/chains/tests/test_views.py
--- a/src/chains/tests/test_views.py
+++ b/src/chains/tests/test_views.py
@@ -33,6 +33,7 @@ def test_json_payload_format(self):
                         "symbol": chain.currency_symbol,
                         "decimals": chain.currency_decimals,
                     },
+                    "transactionService": chain.transaction_service_url,
                 }
             ],
         }
@@ -112,6 +113,7 @@ def test_json_payload_format(self):
                 "symbol": chain.currency_symbol,
                 "decimals": chain.currency_decimals,
             },
+            "transactionService": chain.transaction_service_url,
         }
 
         response = self.client.get(path=url, data=None, format="json")
@@ -140,6 +142,7 @@ def test_match(self):
                 "symbol": chain.currency_symbol,
                 "decimals": chain.currency_decimals,
             },
+            "transaction_service": chain.transaction_service_url,
         }
 
         response = self.client.get(path=url, data=None, format="json")