diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4456a1..161f598 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} @@ -43,7 +43,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} @@ -68,7 +68,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} @@ -111,7 +111,7 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} @@ -152,7 +152,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3.0.0 - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} @@ -197,7 +197,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3.0.0 - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} diff --git a/requirements-dev.txt b/requirements-dev.txt index 206c1ee..d59afc2 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,8 +1,8 @@ -r requirements.txt black==23.12.1 -coverage==7.4.0 +coverage==7.4.1 factory-boy==3.3.0 -Faker==22.2.0 +Faker==22.5.1 flake8==7.0.0 isort==5.13.2 pre-commit==3.6.0 @@ -13,4 +13,4 @@ responses==0.24.1 mypy==1.8.0 django-stubs==4.2.7 djangorestframework-stubs==3.14.2 -types-requests==2.31.0.20240106 +types-requests==2.31.0.20240125 diff --git a/requirements.txt b/requirements.txt index 7ca6e2c..433d060 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.34.19 +boto3==1.34.29 Django==5.0.1 django-cors-headers==4.3.1 djangorestframework==3.14.0 diff --git a/src/about/tests/test_views.py b/src/about/tests/test_views.py index e25bb13..18c127b 100644 --- a/src/about/tests/test_views.py +++ b/src/about/tests/test_views.py @@ -8,7 +8,7 @@ def test_json_payload_format(self): url = reverse("v1:about:detail") expected_json_response = { "name": "Safe Config Service", - "version": "2.66.0", + "version": "2.69.0", "apiVersion": "v1", "secure": False, } @@ -24,7 +24,7 @@ def test_https_request(self): url = reverse("v1:about:detail") expected_json_response = { "name": "Safe Config Service", - "version": "2.66.0", + "version": "2.69.0", "api_version": "v1", "secure": True, } @@ -38,7 +38,7 @@ def test_http_request(self): url = reverse("v1:about:detail") expected_json_response = { "name": "Safe Config Service", - "version": "2.66.0", + "version": "2.69.0", "api_version": "v1", "secure": False, } diff --git a/src/chains/migrations/0039_chain_is_testnet.py b/src/chains/migrations/0039_chain_is_testnet.py new file mode 100644 index 0000000..d220309 --- /dev/null +++ b/src/chains/migrations/0039_chain_is_testnet.py @@ -0,0 +1,17 @@ +# Generated by Django 5.0.1 on 2024-01-29 15:22 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("chains", "0038_gasprice_max_fee_per_gas_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="chain", + name="is_testnet", + field=models.BooleanField(default=False), + ), + ] diff --git a/src/chains/models.py b/src/chains/models.py index 667eee5..73ba3f9 100644 --- a/src/chains/models.py +++ b/src/chains/models.py @@ -69,6 +69,7 @@ class RpcAuthentication(models.TextChoices): ) description = models.CharField(max_length=255, blank=True) l2 = models.BooleanField() + is_testnet = models.BooleanField(default=False) rpc_authentication = models.CharField( max_length=255, choices=RpcAuthentication.choices ) diff --git a/src/chains/serializers.py b/src/chains/serializers.py index 794b455..14ad54b 100644 --- a/src/chains/serializers.py +++ b/src/chains/serializers.py @@ -153,6 +153,7 @@ class Meta: "short_name", "description", "l2", + "is_testnet", "rpc_uri", "safe_apps_rpc_uri", "public_rpc_uri", diff --git a/src/chains/tests/factories.py b/src/chains/tests/factories.py index 60df864..32449fa 100644 --- a/src/chains/tests/factories.py +++ b/src/chains/tests/factories.py @@ -17,6 +17,7 @@ class Meta: short_name = factory.Faker("pystr", max_chars=255) description = factory.Faker("pystr", max_chars=255) l2 = factory.Faker("pybool") + is_testnet = factory.Faker("pybool") rpc_authentication = factory.lazy_attribute( lambda o: random.choice(list(Chain.RpcAuthentication)) ) diff --git a/src/chains/tests/test_views.py b/src/chains/tests/test_views.py index 9b76f6b..de10fee 100644 --- a/src/chains/tests/test_views.py +++ b/src/chains/tests/test_views.py @@ -41,6 +41,7 @@ def test_json_payload_format(self) -> None: "shortName": chain.short_name, "description": chain.description, "l2": chain.l2, + "isTestnet": chain.is_testnet, "rpcUri": { "authentication": chain.rpc_authentication, "value": chain.rpc_uri, @@ -156,6 +157,7 @@ def test_json_payload_format(self) -> None: "shortName": chain.short_name, "description": chain.description, "l2": chain.l2, + "isTestnet": chain.is_testnet, "rpcUri": { "authentication": chain.rpc_authentication, "value": chain.rpc_uri, diff --git a/src/safe_apps/tests/test_signals.py b/src/safe_apps/tests/test_signals.py index 1d85f38..a6959b0 100644 --- a/src/safe_apps/tests/test_signals.py +++ b/src/safe_apps/tests/test_signals.py @@ -522,6 +522,8 @@ def test_on_feature_delete_with_safe_app(self) -> None: "utf-8" ) + # Otherwise fails when testing with all suites - above tests somehow leak + @responses.stop # type: ignore @responses.activate def test_on_feature_update_with_multiple_safe_apps(self) -> None: chain_id_1 = fake.pyint() diff --git a/src/version.py b/src/version.py index 543e4cf..22c52aa 100644 --- a/src/version.py +++ b/src/version.py @@ -1,2 +1,2 @@ __name__ = "Safe Config Service" -__version__ = "2.66.0" +__version__ = "2.69.0"