From 216d0efc95145139730e04e7cf48176aa4c22d9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:45:21 +0200 Subject: [PATCH 01/78] Bump pillow from 10.3.0 to 10.4.0 (#1165) Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.3.0 to 10.4.0. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/10.3.0...10.4.0) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d5d8189c..d80c6a7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,6 @@ django-stubs-ext==5.0.2 drf-yasg[validation]==1.21.7 safe-eth-py[django]==5.8.0 gunicorn==22.0.0 -Pillow==10.3.0 +Pillow==10.4.0 psycopg2-binary==2.9.9 requests==2.32.3 From f9e5af859936680810e7c5e8171891e1e654d844 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:45:38 +0200 Subject: [PATCH 02/78] Bump faker from 25.9.1 to 26.0.0 (#1166) Bumps [faker](https://github.com/joke2k/faker) from 25.9.1 to 26.0.0. - [Release notes](https://github.com/joke2k/faker/releases) - [Changelog](https://github.com/joke2k/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/joke2k/faker/compare/v25.9.1...v26.0.0) --- updated-dependencies: - dependency-name: faker dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 74d0834d..4e92d71a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ black==24.4.2 coverage==7.5.4 factory-boy==3.3.0 -Faker==25.9.1 +Faker==26.0.0 flake8==7.1.0 isort==5.13.2 pre-commit==3.7.1 From 5aeb8a387906295a67dd065e3d242aae917e0f30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:45:55 +0200 Subject: [PATCH 03/78] Bump boto3 from 1.34.131 to 1.34.136 (#1167) Bumps [boto3](https://github.com/boto/boto3) from 1.34.131 to 1.34.136. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.34.131...1.34.136) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d80c6a7c..ec613334 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.34.131 +boto3==1.34.136 Django==5.0.6 django-cors-headers==4.4.0 djangorestframework==3.15.2 From 17c1a3b8fa09cb6a9767e1b04b737b83667a0eb6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:46:15 +0200 Subject: [PATCH 04/78] Bump mypy from 1.10.0 to 1.10.1 (#1168) Bumps [mypy](https://github.com/python/mypy) from 1.10.0 to 1.10.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.10.0...v1.10.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 4e92d71a..a3bf06c4 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,7 +10,7 @@ pytest-django==4.8.0 responses==0.25.3 # mypy and PEP 561 stubs -mypy==1.10.0 +mypy==1.10.1 django-stubs==5.0.2 djangorestframework-stubs==3.15.0 types-requests==2.32.0.20240602 From f4debcc2631cdcfa24d59929025c2db9e02bc429 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:46:37 +0200 Subject: [PATCH 05/78] Bump types-requests from 2.32.0.20240602 to 2.32.0.20240622 (#1169) Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240602 to 2.32.0.20240622. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index a3bf06c4..86844125 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -13,4 +13,4 @@ responses==0.25.3 mypy==1.10.1 django-stubs==5.0.2 djangorestframework-stubs==3.15.0 -types-requests==2.32.0.20240602 +types-requests==2.32.0.20240622 From ff74e49ab2e2846ff3d3479fb18eda0f5a1c7c6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:01:06 +0200 Subject: [PATCH 06/78] Bump docker/build-push-action from 6.1.0 to 6.2.0 (#1170) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.1.0 to 6.2.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.1.0...v6.2.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2aee5eec..10c7edc2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -165,7 +165,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.1.0 + uses: docker/build-push-action@v6.2.0 with: context: . platforms: linux/amd64,linux/arm64 @@ -213,7 +213,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.1.0 + uses: docker/build-push-action@v6.2.0 with: context: . platforms: linux/amd64,linux/arm64 From 335a921aa45abd5e0530d988963f4956c0ebe914 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:43:16 +0200 Subject: [PATCH 07/78] Bump docker/setup-qemu-action from 3.0.0 to 3.1.0 (#1171) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 10c7edc2..c0daef8a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -146,7 +146,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v3.0.0 + uses: docker/setup-qemu-action@v3.1.0 with: platforms: arm64 - name: Set up Docker Buildx @@ -194,7 +194,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v3.0.0 + uses: docker/setup-qemu-action@v3.1.0 with: platforms: arm64 - name: Set up Docker Buildx From 617be0c0024dc7c735dc635bc50c780370bc63a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:45:23 +0200 Subject: [PATCH 08/78] Bump docker/setup-buildx-action from 3.3.0 to 3.4.0 (#1172) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v3.3.0...v3.4.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c0daef8a..98b6588a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -150,7 +150,7 @@ jobs: with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.3.0 + uses: docker/setup-buildx-action@v3.4.0 - name: Cache Docker layers uses: actions/cache@v4 with: @@ -198,7 +198,7 @@ jobs: with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.3.0 + uses: docker/setup-buildx-action@v3.4.0 - name: Cache Docker layers uses: actions/cache@v4 with: From d976afa72393c72cbe8b3086f8f8988de48dbe77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:59:04 +0200 Subject: [PATCH 09/78] Bump docker/build-push-action from 6.2.0 to 6.3.0 (#1173) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.2.0 to 6.3.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.2.0...v6.3.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 98b6588a..26879a12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -165,7 +165,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.2.0 + uses: docker/build-push-action@v6.3.0 with: context: . platforms: linux/amd64,linux/arm64 @@ -213,7 +213,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.2.0 + uses: docker/build-push-action@v6.3.0 with: context: . platforms: linux/amd64,linux/arm64 From f50a2693536f8b16d9661ef7d50e99372eec27b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 10:00:44 +0200 Subject: [PATCH 10/78] Bump boto3 from 1.34.136 to 1.34.140 (#1174) Bumps [boto3](https://github.com/boto/boto3) from 1.34.136 to 1.34.140. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.34.136...1.34.140) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ec613334..5b8d68a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.34.136 +boto3==1.34.140 Django==5.0.6 django-cors-headers==4.4.0 djangorestframework==3.15.2 From 83075fc7e4f6bb1a0102bebcf642b2fb101637b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:09:25 +0200 Subject: [PATCH 11/78] Bump django from 5.0.6 to 5.0.7 (#1176) Bumps [django](https://github.com/django/django) from 5.0.6 to 5.0.7. - [Commits](https://github.com/django/django/compare/5.0.6...5.0.7) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5b8d68a7..7e969162 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ boto3==1.34.140 -Django==5.0.6 +Django==5.0.7 django-cors-headers==4.4.0 djangorestframework==3.15.2 djangorestframework-camel-case==1.4.2 From fcd40f15f227becf1c3ee5f9686121fd34c8c30c Mon Sep 17 00:00:00 2001 From: Aaron Cook Date: Mon, 15 Jul 2024 11:29:29 +0200 Subject: [PATCH 12/78] Add contract address configuration (#1175) This adds the fields from the`ContractNetworksConfig` of the `protocol-kit`](https://docs.safe.global/sdk/protocol-kit/reference/safe#init) in order to dynamically initialise it: - Add new fields to `Chain` model (and `ChainFactory`) for: - Safe singleton - Safe ProxyFactory - MultiSend - MultiSendCallOnly - FallbackHandler - SignMessageLib - CreateCall - SimulateTxAccessor - SafeWebAuthnSignerFactoryAddress - Serialise fields with a new `ContractAddressesSerializer` on the `ChainSerializer` - Add test for view - Generate and test respective migration --- ...0043_chain_create_call_address_and_more.py | 77 +++++++++++++++++++ .../migrations/tests/test_migration_0043.py | 54 +++++++++++++ src/chains/models.py | 11 +++ src/chains/serializers.py | 18 +++++ src/chains/tests/factories.py | 23 ++++++ src/chains/tests/test_views.py | 22 ++++++ 6 files changed, 205 insertions(+) create mode 100644 src/chains/migrations/0043_chain_create_call_address_and_more.py create mode 100644 src/chains/migrations/tests/test_migration_0043.py diff --git a/src/chains/migrations/0043_chain_create_call_address_and_more.py b/src/chains/migrations/0043_chain_create_call_address_and_more.py new file mode 100644 index 00000000..e8246085 --- /dev/null +++ b/src/chains/migrations/0043_chain_create_call_address_and_more.py @@ -0,0 +1,77 @@ +# Generated by Django 5.0.6 on 2024-07-10 14:14 + +import gnosis.eth.django.models +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("chains", "0042_chain_balances_provider_chain_name_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="chain", + name="create_call_address", + field=gnosis.eth.django.models.EthereumAddressField( + blank=True, null=True + ), # type: ignore[no-untyped-call] + ), + migrations.AddField( + model_name="chain", + name="fallback_handler_address", + field=gnosis.eth.django.models.EthereumAddressField( + blank=True, null=True + ), # type: ignore[no-untyped-call] + ), + migrations.AddField( + model_name="chain", + name="multi_send_address", + field=gnosis.eth.django.models.EthereumAddressField( + blank=True, null=True + ), # type: ignore[no-untyped-call] + ), + migrations.AddField( + model_name="chain", + name="multi_send_call_only_address", + field=gnosis.eth.django.models.EthereumAddressField( + blank=True, null=True + ), # type: ignore[no-untyped-call] + ), + migrations.AddField( + model_name="chain", + name="safe_proxy_factory_address", + field=gnosis.eth.django.models.EthereumAddressField( + blank=True, null=True + ), # type: ignore[no-untyped-call] + ), + migrations.AddField( + model_name="chain", + name="safe_singleton_address", + field=gnosis.eth.django.models.EthereumAddressField( + blank=True, null=True + ), # type: ignore[no-untyped-call] + ), + migrations.AddField( + model_name="chain", + name="sign_message_lib_address", + field=gnosis.eth.django.models.EthereumAddressField( + blank=True, null=True + ), # type: ignore[no-untyped-call] + ), + migrations.AddField( + model_name="chain", + name="simulate_tx_accessor_address", + field=gnosis.eth.django.models.EthereumAddressField( + blank=True, null=True + ), # type: ignore[no-untyped-call] + ), + migrations.AddField( + model_name="chain", + name="safe_web_authn_signer_factory_address", + field=gnosis.eth.django.models.EthereumAddressField( + blank=True, null=True + ), # type: ignore[no-untyped-call] + ), + ] diff --git a/src/chains/migrations/tests/test_migration_0043.py b/src/chains/migrations/tests/test_migration_0043.py new file mode 100644 index 00000000..ba45acef --- /dev/null +++ b/src/chains/migrations/tests/test_migration_0043.py @@ -0,0 +1,54 @@ +from django.db.migrations.state import StateApps + +from chains.migrations.tests.utils import TestMigrations + + +class Migration0043TestCase(TestMigrations): + migrate_from = "0042_chain_balances_provider_chain_name_and_more" + migrate_to = "0043_chain_create_call_address_and_more" + + def setUpBeforeMigration(self, apps: StateApps) -> None: + Chain = apps.get_model("chains", "Chain") + Chain.objects.create( + id=1, + name="Mainnet", + short_name="eth", + description="", + l2=False, + rpc_authentication="API_KEY_PATH", + rpc_uri="https://mainnet.infura.io/v3/", + safe_apps_rpc_authentication="API_KEY_PATH", + safe_apps_rpc_uri="https://mainnet.infura.io/v3/", + block_explorer_uri_address_template="https://etherscan.io/address/{{address}}", + block_explorer_uri_tx_hash_template="https://etherscan.io/tx/{{txHash}}", + currency_name="Ether", + currency_symbol="ETH", + currency_decimals=18, + currency_logo_uri="https://gnosis-safe-token-logos.s3.amazonaws.com/ethereum-eth-logo.png", + transaction_service_uri="http://mainnet-safe-transaction-web.safe.svc.cluster.local", + vpc_transaction_service_uri="", + theme_text_color="#001428", + theme_background_color="#E8E7E6", + ens_registry_address="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + recommended_master_copy_version="1.3.0", + prices_provider_native_coin="ethereum", + prices_provider_chain_name="ethereum", + hidden=False, + balances_provider_chain_name="ethereum", + balances_provider_enabled=True, + ) + + def test_new_fields(self) -> None: + Chain = self.apps_registry.get_model("chains", "Chain") + + chain = Chain.objects.get(id=1) + + self.assertEqual(chain.safe_singleton_address, None) + self.assertEqual(chain.safe_proxy_factory_address, None) + self.assertEqual(chain.multi_send_address, None) + self.assertEqual(chain.multi_send_call_only_address, None) + self.assertEqual(chain.fallback_handler_address, None) + self.assertEqual(chain.sign_message_lib_address, None) + self.assertEqual(chain.create_call_address, None) + self.assertEqual(chain.simulate_tx_accessor_address, None) + self.assertEqual(chain.safe_web_authn_signer_factory_address, None) diff --git a/src/chains/models.py b/src/chains/models.py index 42601a04..938fdadb 100644 --- a/src/chains/models.py +++ b/src/chains/models.py @@ -148,6 +148,17 @@ class RpcAuthentication(models.TextChoices): help_text="This flag informs API clients whether the balances provider is enabled for the chain", ) hidden = models.BooleanField(default=False) + safe_singleton_address = EthereumAddressField(null=True, blank=True) # type: ignore[no-untyped-call] + safe_proxy_factory_address = EthereumAddressField(null=True, blank=True) # type: ignore[no-untyped-call] + multi_send_address = EthereumAddressField(null=True, blank=True) # type: ignore[no-untyped-call] + multi_send_call_only_address = EthereumAddressField(null=True, blank=True) # type: ignore[no-untyped-call] + fallback_handler_address = EthereumAddressField(null=True, blank=True) # type: ignore[no-untyped-call] + sign_message_lib_address = EthereumAddressField(null=True, blank=True) # type: ignore[no-untyped-call] + create_call_address = EthereumAddressField(null=True, blank=True) # type: ignore[no-untyped-call] + simulate_tx_accessor_address = EthereumAddressField(null=True, blank=True) # type: ignore[no-untyped-call] + safe_web_authn_signer_factory_address = EthereumAddressField( + null=True, blank=True + ) # type: ignore[no-untyped-call] def get_disabled_wallets(self) -> QuerySet["Wallet"]: all_wallets = Wallet.objects.all() diff --git a/src/chains/serializers.py b/src/chains/serializers.py index d7f28e35..6f3ef944 100644 --- a/src/chains/serializers.py +++ b/src/chains/serializers.py @@ -91,6 +91,18 @@ class BalancesProviderSerializer(serializers.Serializer[Chain]): enabled = serializers.BooleanField(source="balances_provider_enabled") +class ContractAddressesSerializer(serializers.Serializer[Chain]): + safe_singleton_address = serializers.CharField() + safe_proxy_factory_address = serializers.CharField() + multi_send_address = serializers.CharField() + multi_send_call_only_address = serializers.CharField() + fallback_handler_address = serializers.CharField() + sign_message_lib_address = serializers.CharField() + create_call_address = serializers.CharField() + simulate_tx_accessor_address = serializers.CharField() + safe_web_authn_signer_factory_address = serializers.CharField() + + class BaseRpcUriSerializer(serializers.Serializer[Chain]): authentication = serializers.SerializerMethodField() value = serializers.SerializerMethodField(method_name="get_rpc_value") @@ -167,6 +179,7 @@ class ChainSerializer(serializers.ModelSerializer[Chain]): block_explorer_uri_template = serializers.SerializerMethodField() native_currency = serializers.SerializerMethodField() prices_provider = serializers.SerializerMethodField() + contract_addresses = serializers.SerializerMethodField() balances_provider = serializers.SerializerMethodField() transaction_service = serializers.URLField( source="transaction_service_uri", default=None @@ -195,6 +208,7 @@ class Meta: "native_currency", "prices_provider", "balances_provider", + "contract_addresses", "transaction_service", "vpc_transaction_service", "theme", @@ -258,3 +272,7 @@ def get_prices_provider(self, instance: Chain) -> ReturnDict[Any, Any]: @swagger_serializer_method(serializer_or_field=BalancesProviderSerializer) # type: ignore[misc] def get_balances_provider(self, instance: Chain) -> ReturnDict[Any, Any]: return BalancesProviderSerializer(instance).data + + @swagger_serializer_method(serializer_or_field=ContractAddressesSerializer) # type: ignore[misc] + def get_contract_addresses(self, instance: Chain) -> ReturnDict[Any, Any]: + return ContractAddressesSerializer(instance).data diff --git a/src/chains/tests/factories.py b/src/chains/tests/factories.py index 60153838..4c5c2366 100644 --- a/src/chains/tests/factories.py +++ b/src/chains/tests/factories.py @@ -51,6 +51,29 @@ class Meta: balances_provider_chain_name = factory.Faker("company") balances_provider_enabled = factory.Faker("pybool") hidden = False + safe_singleton_address = factory.LazyAttribute( + lambda o: web3.Account.create().address + ) + safe_proxy_factory_address = factory.LazyAttribute( + lambda o: web3.Account.create().address + ) + multi_send_address = factory.LazyAttribute(lambda o: web3.Account.create().address) + multi_send_call_only_address = factory.LazyAttribute( + lambda o: web3.Account.create().address + ) + fallback_handler_address = factory.LazyAttribute( + lambda o: web3.Account.create().address + ) + sign_message_lib_address = factory.LazyAttribute( + lambda o: web3.Account.create().address + ) + create_call_address = factory.LazyAttribute(lambda o: web3.Account.create().address) + simulate_tx_accessor_address = factory.LazyAttribute( + lambda o: web3.Account.create().address + ) + safe_web_authn_signer_factory_address = factory.LazyAttribute( + lambda o: web3.Account.create().address + ) class GasPriceFactory(DjangoModelFactory): # type: ignore[misc] diff --git a/src/chains/tests/test_views.py b/src/chains/tests/test_views.py index 9072f5be..e46288da 100644 --- a/src/chains/tests/test_views.py +++ b/src/chains/tests/test_views.py @@ -90,6 +90,17 @@ def test_json_payload_format(self) -> None: "recommendedMasterCopyVersion": chain.recommended_master_copy_version, "disabledWallets": [], "features": [], + "contractAddresses": { + "safeSingletonAddress": chain.safe_singleton_address, + "safeProxyFactoryAddress": chain.safe_proxy_factory_address, + "multiSendAddress": chain.multi_send_address, + "multiSendCallOnlyAddress": chain.multi_send_call_only_address, + "fallbackHandlerAddress": chain.fallback_handler_address, + "signMessageLibAddress": chain.sign_message_lib_address, + "createCallAddress": chain.create_call_address, + "simulateTxAccessorAddress": chain.simulate_tx_accessor_address, + "safeWebAuthnSignerFactoryAddress": chain.safe_web_authn_signer_factory_address, + }, } ], } @@ -217,6 +228,17 @@ def test_json_payload_format(self) -> None: "recommendedMasterCopyVersion": chain.recommended_master_copy_version, "disabledWallets": [], "features": [], + "contractAddresses": { + "safeSingletonAddress": chain.safe_singleton_address, + "safeProxyFactoryAddress": chain.safe_proxy_factory_address, + "multiSendAddress": chain.multi_send_address, + "multiSendCallOnlyAddress": chain.multi_send_call_only_address, + "fallbackHandlerAddress": chain.fallback_handler_address, + "signMessageLibAddress": chain.sign_message_lib_address, + "createCallAddress": chain.create_call_address, + "simulateTxAccessorAddress": chain.simulate_tx_accessor_address, + "safeWebAuthnSignerFactoryAddress": chain.safe_web_authn_signer_factory_address, + }, } response = self.client.get(path=url, data=None, format="json") From 2a6507f50822fadc94f987cdf3e9332920266a43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:51:02 +0200 Subject: [PATCH 13/78] Bump django-storages from 1.14.3 to 1.14.4 (#1178) Bumps [django-storages](https://github.com/jschneier/django-storages) from 1.14.3 to 1.14.4. - [Changelog](https://github.com/jschneier/django-storages/blob/master/CHANGELOG.rst) - [Commits](https://github.com/jschneier/django-storages/compare/1.14.3...1.14.4) --- updated-dependencies: - dependency-name: django-storages dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7e969162..22bcd51f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ Django==5.0.7 django-cors-headers==4.4.0 djangorestframework==3.15.2 djangorestframework-camel-case==1.4.2 -django-storages==1.14.3 +django-storages==1.14.4 django-stubs-ext==5.0.2 drf-yasg[validation]==1.21.7 safe-eth-py[django]==5.8.0 From d3512483721a66bdd5db85c5dd4c426d0ad4be61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:51:19 +0200 Subject: [PATCH 14/78] Bump types-requests from 2.32.0.20240622 to 2.32.0.20240712 (#1179) Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240622 to 2.32.0.20240712. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 86844125..f60f1169 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -13,4 +13,4 @@ responses==0.25.3 mypy==1.10.1 django-stubs==5.0.2 djangorestframework-stubs==3.15.0 -types-requests==2.32.0.20240622 +types-requests==2.32.0.20240712 From bb8d67515a0620f4233e468613e8c1e193fdf059 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:51:32 +0200 Subject: [PATCH 15/78] Bump boto3 from 1.34.140 to 1.34.144 (#1180) Bumps [boto3](https://github.com/boto/boto3) from 1.34.140 to 1.34.144. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.34.140...1.34.144) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 22bcd51f..d13556ae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.34.140 +boto3==1.34.144 Django==5.0.7 django-cors-headers==4.4.0 djangorestframework==3.15.2 From 5798075e50c41c019a9944583d2dfb61e237ce88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:51:48 +0200 Subject: [PATCH 16/78] Bump coverage from 7.5.4 to 7.6.0 (#1181) Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.5.4 to 7.6.0. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.5.4...7.6.0) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index f60f1169..6bd5a6f9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ -r requirements.txt black==24.4.2 -coverage==7.5.4 +coverage==7.6.0 factory-boy==3.3.0 Faker==26.0.0 flake8==7.1.0 From 609283506de42dd0cafe13b5bae885a98238e792 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:52:04 +0200 Subject: [PATCH 17/78] Bump docker/build-push-action from 6.3.0 to 6.4.0 (#1182) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.3.0 to 6.4.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.3.0...v6.4.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 26879a12..4f7b44c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -165,7 +165,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.3.0 + uses: docker/build-push-action@v6.4.0 with: context: . platforms: linux/amd64,linux/arm64 @@ -213,7 +213,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.3.0 + uses: docker/build-push-action@v6.4.0 with: context: . platforms: linux/amd64,linux/arm64 From 5341f94e60c7572e770ac1c57ed37853516ab702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20G=C3=B3mez?= Date: Mon, 22 Jul 2024 13:06:42 +0200 Subject: [PATCH 18/78] Allow URL paths on CGW_URL (#1183) --- src/clients/safe_client_gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clients/safe_client_gateway.py b/src/clients/safe_client_gateway.py index 9cc0ceb0..cf7ff750 100644 --- a/src/clients/safe_client_gateway.py +++ b/src/clients/safe_client_gateway.py @@ -43,7 +43,7 @@ def cgw_setup() -> tuple[str, str]: def hook_event(event: HookEvent) -> None: try: (url, token) = cgw_setup() - url = urljoin(url, "/v1/hooks/events") + url = urljoin(url.rstrip("/") + "/", "v1/hooks/events") post(url, token, json={"type": event.type, "chainId": str(event.chain_id)}) except Exception as error: logger.error(error) From d816ab456f05136a69fe616ffe2e252b9e36a165 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 08:55:03 +0200 Subject: [PATCH 19/78] Bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (#1186) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f7b44c2..c30fb36b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -146,7 +146,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v3.1.0 + uses: docker/setup-qemu-action@v3.2.0 with: platforms: arm64 - name: Set up Docker Buildx @@ -194,7 +194,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v3.1.0 + uses: docker/setup-qemu-action@v3.2.0 with: platforms: arm64 - name: Set up Docker Buildx From 24afe7a0323b404bca40e83f976172bb654be7c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 08:58:46 +0200 Subject: [PATCH 20/78] Bump docker/build-push-action from 6.4.0 to 6.5.0 (#1188) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.4.0 to 6.5.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.4.0...v6.5.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c30fb36b..9ac4ddee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -165,7 +165,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.4.0 + uses: docker/build-push-action@v6.5.0 with: context: . platforms: linux/amd64,linux/arm64 @@ -213,7 +213,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.4.0 + uses: docker/build-push-action@v6.5.0 with: context: . platforms: linux/amd64,linux/arm64 From ed6508c8b058551085e007cdb23c94182e6dfa32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 08:59:03 +0200 Subject: [PATCH 21/78] Bump docker/setup-buildx-action from 3.4.0 to 3.5.0 (#1189) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v3.4.0...v3.5.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ac4ddee..3e9a1a85 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -150,7 +150,7 @@ jobs: with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.4.0 + uses: docker/setup-buildx-action@v3.5.0 - name: Cache Docker layers uses: actions/cache@v4 with: @@ -198,7 +198,7 @@ jobs: with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.4.0 + uses: docker/setup-buildx-action@v3.5.0 - name: Cache Docker layers uses: actions/cache@v4 with: From 700e0a2cce4fdac11629a79ae59a3cfe9fbe62ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 08:59:24 +0200 Subject: [PATCH 22/78] Bump docker/login-action from 3.2.0 to 3.3.0 (#1187) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v3.2.0...v3.3.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e9a1a85..19df9de9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -159,7 +159,7 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- - name: Login to DockerHub - uses: docker/login-action@v3.2.0 + uses: docker/login-action@v3.3.0 with: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -207,7 +207,7 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- - name: Login to DockerHub - uses: docker/login-action@v3.2.0 + uses: docker/login-action@v3.3.0 with: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASSWORD }} From c81c60e02e8937ab9b5dde41c74a9a03f5e9d33a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:00:44 +0200 Subject: [PATCH 23/78] Bump boto3 from 1.34.144 to 1.34.145 (#1185) Bumps [boto3](https://github.com/boto/boto3) from 1.34.144 to 1.34.145. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.34.144...1.34.145) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d13556ae..a6bc23f8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.34.144 +boto3==1.34.145 Django==5.0.7 django-cors-headers==4.4.0 djangorestframework==3.15.2 From 9e2796f58f490345e5af0dac19ee65668e13a20d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:01:21 +0200 Subject: [PATCH 24/78] Bump mypy from 1.10.1 to 1.11.0 (#1184) Bumps [mypy](https://github.com/python/mypy) from 1.10.1 to 1.11.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.10.1...v1.11) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 6bd5a6f9..32d19ab3 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,7 +10,7 @@ pytest-django==4.8.0 responses==0.25.3 # mypy and PEP 561 stubs -mypy==1.10.1 +mypy==1.11.0 django-stubs==5.0.2 djangorestframework-stubs==3.15.0 types-requests==2.32.0.20240712 From 09e7efd3233d99cf0ebdaccdb94b14337e4697b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:42:07 +0200 Subject: [PATCH 25/78] Bump pre-commit from 3.7.1 to 3.8.0 (#1190) Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 3.7.1 to 3.8.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v3.7.1...v3.8.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 32d19ab3..3d2ec3d5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,7 +5,7 @@ factory-boy==3.3.0 Faker==26.0.0 flake8==7.1.0 isort==5.13.2 -pre-commit==3.7.1 +pre-commit==3.8.0 pytest-django==4.8.0 responses==0.25.3 From 2132e918a79c79fbfca9ee1beefd3f6861e159d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:42:48 +0200 Subject: [PATCH 26/78] Bump boto3 from 1.34.145 to 1.34.149 (#1191) Bumps [boto3](https://github.com/boto/boto3) from 1.34.145 to 1.34.149. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.34.145...1.34.149) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a6bc23f8..adfe3d44 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.34.145 +boto3==1.34.149 Django==5.0.7 django-cors-headers==4.4.0 djangorestframework==3.15.2 From f376a40251c0f7c299f34154ea0d9ceea0dc843d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:43:08 +0200 Subject: [PATCH 27/78] Bump django-stubs-ext from 5.0.2 to 5.0.4 (#1192) Bumps [django-stubs-ext](https://github.com/typeddjango/django-stubs) from 5.0.2 to 5.0.4. - [Release notes](https://github.com/typeddjango/django-stubs/releases) - [Commits](https://github.com/typeddjango/django-stubs/compare/5.0.2...5.0.4) --- updated-dependencies: - dependency-name: django-stubs-ext dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index adfe3d44..34d27780 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ django-cors-headers==4.4.0 djangorestframework==3.15.2 djangorestframework-camel-case==1.4.2 django-storages==1.14.4 -django-stubs-ext==5.0.2 +django-stubs-ext==5.0.4 drf-yasg[validation]==1.21.7 safe-eth-py[django]==5.8.0 gunicorn==22.0.0 From ed8952b0a34c1e71e38e0183e2223c9bc2f1e83c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:57:19 +0200 Subject: [PATCH 28/78] Bump docker/setup-buildx-action from 3.5.0 to 3.6.0 (#1194) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v3.5.0...v3.6.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 19df9de9..d47a2cf2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -150,7 +150,7 @@ jobs: with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.5.0 + uses: docker/setup-buildx-action@v3.6.0 - name: Cache Docker layers uses: actions/cache@v4 with: @@ -198,7 +198,7 @@ jobs: with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.5.0 + uses: docker/setup-buildx-action@v3.6.0 - name: Cache Docker layers uses: actions/cache@v4 with: From be7baec79a3cfdb2426e8c9d15e4537c483f622b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:55:58 +0200 Subject: [PATCH 29/78] Bump docker/setup-buildx-action from 3.6.0 to 3.6.1 (#1195) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.6.0 to 3.6.1. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v3.6.0...v3.6.1) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d47a2cf2..812af601 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -150,7 +150,7 @@ jobs: with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.6.0 + uses: docker/setup-buildx-action@v3.6.1 - name: Cache Docker layers uses: actions/cache@v4 with: @@ -198,7 +198,7 @@ jobs: with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.6.0 + uses: docker/setup-buildx-action@v3.6.1 - name: Cache Docker layers uses: actions/cache@v4 with: From 01806525ba3ea11e0f02b4d9a1c0ceecbdc4dcb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:56:17 +0200 Subject: [PATCH 30/78] Bump faker from 26.0.0 to 26.1.0 (#1199) Bumps [faker](https://github.com/joke2k/faker) from 26.0.0 to 26.1.0. - [Release notes](https://github.com/joke2k/faker/releases) - [Changelog](https://github.com/joke2k/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/joke2k/faker/compare/v26.0.0...v26.1.0) --- updated-dependencies: - dependency-name: faker dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 3d2ec3d5..d54decc8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ black==24.4.2 coverage==7.6.0 factory-boy==3.3.0 -Faker==26.0.0 +Faker==26.1.0 flake8==7.1.0 isort==5.13.2 pre-commit==3.8.0 From 97a7e841102bf3b229123a55164fe85425ba860a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:56:37 +0200 Subject: [PATCH 31/78] Bump django-stubs from 5.0.2 to 5.0.4 (#1193) * Bump django-stubs from 5.0.2 to 5.0.4 Bumps [django-stubs](https://github.com/typeddjango/django-stubs) from 5.0.2 to 5.0.4. - [Release notes](https://github.com/typeddjango/django-stubs/releases) - [Commits](https://github.com/typeddjango/django-stubs/compare/5.0.2...5.0.4) --- updated-dependencies: - dependency-name: django-stubs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Reduce type strictness * Remove lint --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: iamacook --- requirements-dev.txt | 2 +- src/safe_apps/admin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index d54decc8..61cdcc21 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -11,6 +11,6 @@ responses==0.25.3 # mypy and PEP 561 stubs mypy==1.11.0 -django-stubs==5.0.2 +django-stubs==5.0.4 djangorestframework-stubs==3.15.0 types-requests==2.32.0.20240712 diff --git a/src/safe_apps/admin.py b/src/safe_apps/admin.py index 84019b8a..93222a6c 100644 --- a/src/safe_apps/admin.py +++ b/src/safe_apps/admin.py @@ -10,7 +10,7 @@ class ChainIdFilter(admin.SimpleListFilter): title = "Chains" parameter_name = "chain_ids" - def lookups(self, request: Any, model_admin: Any) -> list[tuple[Any, str]]: + def lookups(self, request: Any, model_admin: Any) -> Any: values = SafeApp.objects.values_list("chain_ids", flat=True) # lookups requires a tuple to be returned – (value, verbose value) chains = [(chain, chain) for chains in values for chain in chains] From 34f333899d8c6b63eaacfcde231e170194ec87d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:57:29 +0200 Subject: [PATCH 32/78] Bump boto3 from 1.34.149 to 1.34.153 (#1198) Bumps [boto3](https://github.com/boto/boto3) from 1.34.149 to 1.34.153. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.34.149...1.34.153) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 34d27780..7523bb96 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.34.149 +boto3==1.34.153 Django==5.0.7 django-cors-headers==4.4.0 djangorestframework==3.15.2 From c20c4139f742f5e400accbebb7c195b12bca3247 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:05:38 +0200 Subject: [PATCH 33/78] Bump black from 24.4.2 to 24.8.0 (#1196) Bumps [black](https://github.com/psf/black) from 24.4.2 to 24.8.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/24.4.2...24.8.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 61cdcc21..232329d9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ -r requirements.txt -black==24.4.2 +black==24.8.0 coverage==7.6.0 factory-boy==3.3.0 Faker==26.1.0 From 198f778fcfa8ee2c5e35829aac0ff3bbb62a0ca3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:06:11 +0200 Subject: [PATCH 34/78] Bump mypy from 1.11.0 to 1.11.1 (#1197) Bumps [mypy](https://github.com/python/mypy) from 1.11.0 to 1.11.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11...v1.11.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 232329d9..051cc96b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,7 +10,7 @@ pytest-django==4.8.0 responses==0.25.3 # mypy and PEP 561 stubs -mypy==1.11.0 +mypy==1.11.1 django-stubs==5.0.4 djangorestframework-stubs==3.15.0 types-requests==2.32.0.20240712 From 733d2684738e2f6c09075bf8b687a30fcfc70cd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 09:31:32 +0200 Subject: [PATCH 35/78] Bump django from 5.0.7 to 5.0.8 (#1201) Bumps [django](https://github.com/django/django) from 5.0.7 to 5.0.8. - [Commits](https://github.com/django/django/compare/5.0.7...5.0.8) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7523bb96..1cef2795 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ boto3==1.34.153 -Django==5.0.7 +Django==5.0.8 django-cors-headers==4.4.0 djangorestframework==3.15.2 djangorestframework-camel-case==1.4.2 From 2018bd9934ae4c56bce10eb585b457ee6620130b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:17:19 +0200 Subject: [PATCH 36/78] Bump coverage from 7.6.0 to 7.6.1 (#1204) Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.6.0 to 7.6.1. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.6.0...7.6.1) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 051cc96b..5c632226 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ -r requirements.txt black==24.8.0 -coverage==7.6.0 +coverage==7.6.1 factory-boy==3.3.0 Faker==26.1.0 flake8==7.1.0 From bbff44348700a01b62186fe9a1918aca3aaad18a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:00:06 +0200 Subject: [PATCH 37/78] Bump docker/build-push-action from 6.5.0 to 6.6.1 (#1202) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.5.0 to 6.6.1. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.5.0...v6.6.1) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 812af601..4a31c4c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -165,7 +165,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.5.0 + uses: docker/build-push-action@v6.6.1 with: context: . platforms: linux/amd64,linux/arm64 @@ -213,7 +213,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.5.0 + uses: docker/build-push-action@v6.6.1 with: context: . platforms: linux/amd64,linux/arm64 From 4eef7951f8cd3775b8348fd2107504eae49bfc4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 13:47:15 +0200 Subject: [PATCH 38/78] Bump boto3 from 1.34.153 to 1.34.158 (#1206) Bumps [boto3](https://github.com/boto/boto3) from 1.34.153 to 1.34.158. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.34.153...1.34.158) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1cef2795..0ca99bda 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.34.153 +boto3==1.34.158 Django==5.0.8 django-cors-headers==4.4.0 djangorestframework==3.15.2 From 26678e282c4422c5a91f5cba995199f2235c6e43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 13:47:32 +0200 Subject: [PATCH 39/78] Bump faker from 26.1.0 to 27.0.0 (#1209) Bumps [faker](https://github.com/joke2k/faker) from 26.1.0 to 27.0.0. - [Release notes](https://github.com/joke2k/faker/releases) - [Changelog](https://github.com/joke2k/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/joke2k/faker/compare/v26.1.0...v27.0.0) --- updated-dependencies: - dependency-name: faker dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 5c632226..2ba99300 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ black==24.8.0 coverage==7.6.1 factory-boy==3.3.0 -Faker==26.1.0 +Faker==27.0.0 flake8==7.1.0 isort==5.13.2 pre-commit==3.8.0 From a398121aef3cdd0cbe94b8a8b386b4e5ba89f919 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 13:47:54 +0200 Subject: [PATCH 40/78] Bump gunicorn from 22.0.0 to 23.0.0 (#1205) Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 22.0.0 to 23.0.0. - [Release notes](https://github.com/benoitc/gunicorn/releases) - [Commits](https://github.com/benoitc/gunicorn/compare/22.0.0...23.0.0) --- updated-dependencies: - dependency-name: gunicorn dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0ca99bda..e645cf22 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ django-storages==1.14.4 django-stubs-ext==5.0.4 drf-yasg[validation]==1.21.7 safe-eth-py[django]==5.8.0 -gunicorn==22.0.0 +gunicorn==23.0.0 Pillow==10.4.0 psycopg2-binary==2.9.9 requests==2.32.3 From 36b8e1377699c8a1adf73b88094e623c41124065 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 09:16:22 +0200 Subject: [PATCH 41/78] Bump python from 3.12.4-slim to 3.12.5-slim (#1208) Bumps python from 3.12.4-slim to 3.12.5-slim. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 17001e25..905e3e0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12.4-slim +FROM python:3.12.5-slim # python ENV PYTHONUNBUFFERED=1 From 69f0627efe2a556301676c9f32d4e2ad074d622c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:12:58 +0200 Subject: [PATCH 42/78] Bump factory-boy from 3.3.0 to 3.3.1 (#1214) Bumps [factory-boy](https://github.com/FactoryBoy/factory_boy) from 3.3.0 to 3.3.1. - [Changelog](https://github.com/FactoryBoy/factory_boy/blob/master/docs/changelog.rst) - [Commits](https://github.com/FactoryBoy/factory_boy/compare/3.3.0...3.3.1) --- updated-dependencies: - dependency-name: factory-boy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 2ba99300..c9d21bf1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ -r requirements.txt black==24.8.0 coverage==7.6.1 -factory-boy==3.3.0 +factory-boy==3.3.1 Faker==27.0.0 flake8==7.1.0 isort==5.13.2 From d8a3c17e21a5e36038250e4a67a1773cd5244ff0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:13:17 +0200 Subject: [PATCH 43/78] Bump flake8 from 7.1.0 to 7.1.1 (#1213) Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.0 to 7.1.1. - [Commits](https://github.com/pycqa/flake8/compare/7.1.0...7.1.1) --- updated-dependencies: - dependency-name: flake8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index c9d21bf1..503b1670 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,7 +3,7 @@ black==24.8.0 coverage==7.6.1 factory-boy==3.3.1 Faker==27.0.0 -flake8==7.1.0 +flake8==7.1.1 isort==5.13.2 pre-commit==3.8.0 pytest-django==4.8.0 From a92c55971e7d2b1fb0177a6d6d9b1709abf04563 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:14:26 +0200 Subject: [PATCH 44/78] Bump boto3 from 1.34.158 to 1.35.0 (#1212) Bumps [boto3](https://github.com/boto/boto3) from 1.34.158 to 1.35.0. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.34.158...1.35.0) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e645cf22..f3c02e84 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.34.158 +boto3==1.35.0 Django==5.0.8 django-cors-headers==4.4.0 djangorestframework==3.15.2 From 2259ee676f3dc4fd46e632d3f7693d261486a7a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:14:57 +0200 Subject: [PATCH 45/78] Bump cla-assistant/github-action from 2.4.0 to 2.5.1 (#1211) Bumps [cla-assistant/github-action](https://github.com/cla-assistant/github-action) from 2.4.0 to 2.5.1. - [Release notes](https://github.com/cla-assistant/github-action/releases) - [Commits](https://github.com/cla-assistant/github-action/compare/v2.4.0...v2.5.1) --- updated-dependencies: - dependency-name: cla-assistant/github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cla.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index b18f59d7..4b585259 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -12,7 +12,7 @@ jobs: - name: "CLA Assistant" if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' # Beta Release - uses: cla-assistant/github-action@v2.4.0 + uses: cla-assistant/github-action@v2.5.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # the below token should have repo scope and must be manually added by you in the repository's secret From afba8774347b2bdf3cf5a089832f8b8b4190be7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:15:22 +0200 Subject: [PATCH 46/78] Bump docker/build-push-action from 6.6.1 to 6.7.0 (#1210) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.6.1 to 6.7.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.6.1...v6.7.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a31c4c0..d61ffce1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -165,7 +165,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.6.1 + uses: docker/build-push-action@v6.7.0 with: context: . platforms: linux/amd64,linux/arm64 @@ -213,7 +213,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.6.1 + uses: docker/build-push-action@v6.7.0 with: context: . platforms: linux/amd64,linux/arm64 From 67002cc9c3f90b6212129677a8fccda3853e73b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:19:25 +0200 Subject: [PATCH 47/78] Bump django from 5.0.8 to 5.1 (#1203) Bumps [django](https://github.com/django/django) from 5.0.8 to 5.1. - [Commits](https://github.com/django/django/compare/5.0.8...5.1) --- updated-dependencies: - dependency-name: django dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f3c02e84..806ac475 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ boto3==1.35.0 -Django==5.0.8 +Django==5.1 django-cors-headers==4.4.0 djangorestframework==3.15.2 djangorestframework-camel-case==1.4.2 From 8b9d1b4d34d97d220bdc68f01a1c8e117b5023ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20G=C3=B3mez?= Date: Wed, 21 Aug 2024 14:07:40 +0200 Subject: [PATCH 48/78] Revert boto3 upgrade to 1.34.158 (#1215) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 806ac475..7d852832 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.35.0 +boto3==1.34.158 Django==5.1 django-cors-headers==4.4.0 djangorestframework==3.15.2 From b135454fc33e8f0345ea84f16380772ae64ab64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20G=C3=B3mez?= Date: Wed, 21 Aug 2024 15:25:57 +0200 Subject: [PATCH 49/78] Revert django upgrade back to 5.0.8 (#1216) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7d852832..e645cf22 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ boto3==1.34.158 -Django==5.1 +Django==5.0.8 django-cors-headers==4.4.0 djangorestframework==3.15.2 djangorestframework-camel-case==1.4.2 From e6a985f051def244f86aac2c5e1268e48e88a48c Mon Sep 17 00:00:00 2001 From: Aaron Cook Date: Tue, 17 Sep 2024 17:44:06 +0200 Subject: [PATCH 50/78] Pin web3 to 6.20.2 (#1231) Pins the web3 package in accordance with the requirements of safe-eth-py. --- requirements.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/requirements.txt b/requirements.txt index e645cf22..c843c341 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,3 +11,9 @@ gunicorn==23.0.0 Pillow==10.4.0 psycopg2-binary==2.9.9 requests==2.32.3 + +# Without pin, safe-eth-py 5.8.0 installs >= 7 which breaks django-check job +# > ImportError: cannot import name 'geth_poa_middleware' from 'web3.middleware' +# TODO: Remove when safe-eth-py updates web3 to >= 7 +# https://github.com/safe-global/safe-eth-py/pull/1315 +web3==6.20.2 \ No newline at end of file From 3b0c1ac9b2a166d0365f09d1b3310a903e61383b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:13:58 +0200 Subject: [PATCH 51/78] Bump faker from 27.0.0 to 28.4.1 (#1226) Bumps [faker](https://github.com/joke2k/faker) from 27.0.0 to 28.4.1. - [Release notes](https://github.com/joke2k/faker/releases) - [Changelog](https://github.com/joke2k/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/joke2k/faker/compare/v27.0.0...v28.4.1) --- updated-dependencies: - dependency-name: faker dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 503b1670..a475b4a7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ black==24.8.0 coverage==7.6.1 factory-boy==3.3.1 -Faker==27.0.0 +Faker==28.4.1 flake8==7.1.1 isort==5.13.2 pre-commit==3.8.0 From f6567517d713142c3d5e0c8daf5ae7d681dfd88a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:25:02 +0200 Subject: [PATCH 52/78] Bump mypy from 1.11.1 to 1.11.2 (#1220) Bumps [mypy](https://github.com/python/mypy) from 1.11.1 to 1.11.2. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11.1...v1.11.2) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index a475b4a7..ffa5713b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,7 +10,7 @@ pytest-django==4.8.0 responses==0.25.3 # mypy and PEP 561 stubs -mypy==1.11.1 +mypy==1.11.2 django-stubs==5.0.4 djangorestframework-stubs==3.15.0 types-requests==2.32.0.20240712 From b1ea3e8bb622586fa1485fca04cd0e79eaf460fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:27:06 +0200 Subject: [PATCH 53/78] Bump python from 3.12.5-slim to 3.12.6-slim (#1228) Bumps python from 3.12.5-slim to 3.12.6-slim. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 905e3e0e..778c8caa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12.5-slim +FROM python:3.12.6-slim # python ENV PYTHONUNBUFFERED=1 From f0af89eed91c10d0e8f991c1c4bbd559e9b964e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:39:55 +0200 Subject: [PATCH 54/78] Bump pytest-django from 4.8.0 to 4.9.0 (#1227) Bumps [pytest-django](https://github.com/pytest-dev/pytest-django) from 4.8.0 to 4.9.0. - [Release notes](https://github.com/pytest-dev/pytest-django/releases) - [Changelog](https://github.com/pytest-dev/pytest-django/blob/main/docs/changelog.rst) - [Commits](https://github.com/pytest-dev/pytest-django/compare/v4.8.0...v4.9.0) --- updated-dependencies: - dependency-name: pytest-django dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index ffa5713b..ac1efd76 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,7 +6,7 @@ Faker==28.4.1 flake8==7.1.1 isort==5.13.2 pre-commit==3.8.0 -pytest-django==4.8.0 +pytest-django==4.9.0 responses==0.25.3 # mypy and PEP 561 stubs From 9209f3a2368959d2ec0738636388eedca836560b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:46:27 +0200 Subject: [PATCH 55/78] Bump boto3 from 1.34.158 to 1.35.20 (#1232) Bumps [boto3](https://github.com/boto/boto3) from 1.34.158 to 1.35.20. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.34.158...1.35.20) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c843c341..b213a171 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.34.158 +boto3==1.35.20 Django==5.0.8 django-cors-headers==4.4.0 djangorestframework==3.15.2 From 04dbd17a38a66cbfe6c0c17582e501369493bf6b Mon Sep 17 00:00:00 2001 From: katspaugh <381895+katspaugh@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:32:10 +0200 Subject: [PATCH 56/78] Feat(Safe Apps): admin chains with names (#1234) * Feat(Safe Apps): admin chains with names * Types --- src/safe_apps/admin.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/safe_apps/admin.py b/src/safe_apps/admin.py index 93222a6c..380d574d 100644 --- a/src/safe_apps/admin.py +++ b/src/safe_apps/admin.py @@ -1,11 +1,32 @@ -from typing import Any +from typing import Any, List +from django import forms from django.contrib import admin from django.db.models import Model, QuerySet +from chains.models import Chain + from .models import Client, Feature, Provider, SafeApp, SocialProfile, Tag +# Custom form for SafeApp to use Chain model in a multi-select field +class SafeAppForm(forms.ModelForm[SafeApp]): + chain_ids = forms.ModelMultipleChoiceField( + queryset=Chain.objects.all(), widget=forms.SelectMultiple, required=True + ) + + class Meta: + model = SafeApp + fields = "__all__" + + def clean_chain_ids(self) -> List[int]: + """ + Override clean_chain_ids to store the selected Chain IDs as a list of integers. + """ + chain_ids = self.cleaned_data["chain_ids"] + return [chain.id for chain in chain_ids] + + class ChainIdFilter(admin.SimpleListFilter): title = "Chains" parameter_name = "chain_ids" @@ -43,6 +64,7 @@ class SocialProfileInline(admin.TabularInline[Model, Model]): @admin.register(SafeApp) class SafeAppAdmin(admin.ModelAdmin[SafeApp]): + form = SafeAppForm # Use the custom form for SafeApp list_display = ("name", "url", "chain_ids", "listed") list_filter = (ChainIdFilter,) search_fields = ("name", "url") From 4045b87aa9c8aca7ce634ff71b4e31d901276f55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 10:02:51 +0200 Subject: [PATCH 57/78] Bump types-requests from 2.32.0.20240712 to 2.32.0.20240914 (#1236) Bumps [types-requests](https://github.com/python/typeshed) from 2.32.0.20240712 to 2.32.0.20240914. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index ac1efd76..66458981 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -13,4 +13,4 @@ responses==0.25.3 mypy==1.11.2 django-stubs==5.0.4 djangorestframework-stubs==3.15.0 -types-requests==2.32.0.20240712 +types-requests==2.32.0.20240914 From 2a96ab470de0e48419742ffd81a39b95247fb236 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 10:03:27 +0200 Subject: [PATCH 58/78] Bump faker from 28.4.1 to 30.0.0 (#1242) Bumps [faker](https://github.com/joke2k/faker) from 28.4.1 to 30.0.0. - [Release notes](https://github.com/joke2k/faker/releases) - [Changelog](https://github.com/joke2k/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/joke2k/faker/compare/v28.4.1...v30.0.0) --- updated-dependencies: - dependency-name: faker dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 66458981..4e12b8f1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ black==24.8.0 coverage==7.6.1 factory-boy==3.3.1 -Faker==28.4.1 +Faker==30.0.0 flake8==7.1.1 isort==5.13.2 pre-commit==3.8.0 From af635c5de112ba20b385393236fd604828d4c1a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:00:01 +0200 Subject: [PATCH 59/78] Bump djangorestframework-stubs from 3.15.0 to 3.15.1 (#1237) Bumps [djangorestframework-stubs](https://github.com/typeddjango/djangorestframework-stubs) from 3.15.0 to 3.15.1. - [Release notes](https://github.com/typeddjango/djangorestframework-stubs/releases) - [Commits](https://github.com/typeddjango/djangorestframework-stubs/compare/3.15.0...3.15.1) --- updated-dependencies: - dependency-name: djangorestframework-stubs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 4e12b8f1..5e296cac 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -12,5 +12,5 @@ responses==0.25.3 # mypy and PEP 561 stubs mypy==1.11.2 django-stubs==5.0.4 -djangorestframework-stubs==3.15.0 +djangorestframework-stubs==3.15.1 types-requests==2.32.0.20240914 From 8e9e3bcb1e4f51fa40f491e86fa1b290fb7d3bc6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:05:59 +0200 Subject: [PATCH 60/78] Bump cla-assistant/github-action from 2.5.1 to 2.6.1 (#1244) Bumps [cla-assistant/github-action](https://github.com/cla-assistant/github-action) from 2.5.1 to 2.6.1. - [Release notes](https://github.com/cla-assistant/github-action/releases) - [Commits](https://github.com/cla-assistant/github-action/compare/v2.5.1...v2.6.1) --- updated-dependencies: - dependency-name: cla-assistant/github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cla.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 4b585259..8f2eb897 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -12,7 +12,7 @@ jobs: - name: "CLA Assistant" if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' # Beta Release - uses: cla-assistant/github-action@v2.5.1 + uses: cla-assistant/github-action@v2.6.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # the below token should have repo scope and must be manually added by you in the repository's secret From d70363fdd6e68adcb44495b92de9c1bb1e318854 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:06:15 +0200 Subject: [PATCH 61/78] Bump docker/build-push-action from 6.7.0 to 6.9.0 (#1245) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.7.0 to 6.9.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.7.0...v6.9.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d61ffce1..15abd8a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -165,7 +165,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.7.0 + uses: docker/build-push-action@v6.9.0 with: context: . platforms: linux/amd64,linux/arm64 @@ -213,7 +213,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build - uses: docker/build-push-action@v6.7.0 + uses: docker/build-push-action@v6.9.0 with: context: . platforms: linux/amd64,linux/arm64 From 790fdc93d5ddf493050e77256ae9c27324043e71 Mon Sep 17 00:00:00 2001 From: Aaron Cook Date: Wed, 2 Oct 2024 11:38:20 +0200 Subject: [PATCH 62/78] Add `beaconChainExplorerUriTemplate` property (#1241) Adds a new `beaconChainExplorerUriTemplate` property, similar to `blockExplorerUriTemplate`: - Add nullable `beacon_chain_explorer_uri_public_key_template` property. - Add relevant serializer and map property - Add mock value for tests. - Generate migration and add relevant test. --- ..._chain_explorer_uri_public_key_template.py | 18 ++++++ .../migrations/tests/test_migration_044.py | 55 +++++++++++++++++++ src/chains/models.py | 3 + src/chains/serializers.py | 13 +++++ src/chains/tests/factories.py | 1 + src/chains/tests/test_views.py | 6 ++ 6 files changed, 96 insertions(+) create mode 100644 src/chains/migrations/0044_chain_beacon_chain_explorer_uri_public_key_template.py create mode 100644 src/chains/migrations/tests/test_migration_044.py diff --git a/src/chains/migrations/0044_chain_beacon_chain_explorer_uri_public_key_template.py b/src/chains/migrations/0044_chain_beacon_chain_explorer_uri_public_key_template.py new file mode 100644 index 00000000..fdd429f0 --- /dev/null +++ b/src/chains/migrations/0044_chain_beacon_chain_explorer_uri_public_key_template.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.8 on 2024-09-30 07:56 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("chains", "0043_chain_create_call_address_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="chain", + name="beacon_chain_explorer_uri_public_key_template", + field=models.URLField(blank=True, null=True), + ), + ] diff --git a/src/chains/migrations/tests/test_migration_044.py b/src/chains/migrations/tests/test_migration_044.py new file mode 100644 index 00000000..20c0b0f3 --- /dev/null +++ b/src/chains/migrations/tests/test_migration_044.py @@ -0,0 +1,55 @@ +from django.db.migrations.state import StateApps + +from chains.migrations.tests.utils import TestMigrations + + +class Migration0044TestCase(TestMigrations): + migrate_from = "0043_chain_create_call_address_and_more" + migrate_to = "0044_chain_beacon_chain_explorer_uri_public_key_template" + + def setUpBeforeMigration(self, apps: StateApps) -> None: + Chain = apps.get_model("chains", "Chain") + Chain.objects.create( + id=1, + name="Mainnet", + short_name="eth", + description="", + l2=False, + rpc_authentication="API_KEY_PATH", + rpc_uri="https://mainnet.infura.io/v3/", + safe_apps_rpc_authentication="API_KEY_PATH", + safe_apps_rpc_uri="https://mainnet.infura.io/v3/", + block_explorer_uri_address_template="https://etherscan.io/address/{{address}}", + block_explorer_uri_tx_hash_template="https://etherscan.io/tx/{{txHash}}", + currency_name="Ether", + currency_symbol="ETH", + currency_decimals=18, + currency_logo_uri="https://gnosis-safe-token-logos.s3.amazonaws.com/ethereum-eth-logo.png", + transaction_service_uri="http://mainnet-safe-transaction-web.safe.svc.cluster.local", + vpc_transaction_service_uri="", + theme_text_color="#001428", + theme_background_color="#E8E7E6", + ens_registry_address="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + recommended_master_copy_version="1.3.0", + prices_provider_native_coin="ethereum", + prices_provider_chain_name="ethereum", + hidden=False, + balances_provider_chain_name="ethereum", + balances_provider_enabled=True, + safe_singleton_address=None, + safe_proxy_factory_address=None, + multi_send_address=None, + multi_send_call_only_address=None, + fallback_handler_address=None, + sign_message_lib_address=None, + create_call_address=None, + simulate_tx_accessor_address=None, + safe_web_authn_signer_factory_address=None, + ) + + def test_new_fields(self) -> None: + Chain = self.apps_registry.get_model("chains", "Chain") + + chain = Chain.objects.get(id=1) + + self.assertEqual(chain.beacon_chain_explorer_uri_public_key_template, None) diff --git a/src/chains/models.py b/src/chains/models.py index 938fdadb..99d14fc5 100644 --- a/src/chains/models.py +++ b/src/chains/models.py @@ -106,6 +106,9 @@ class RpcAuthentication(models.TextChoices): block_explorer_uri_address_template = models.URLField() block_explorer_uri_tx_hash_template = models.URLField() block_explorer_uri_api_template = models.URLField() + beacon_chain_explorer_uri_public_key_template = models.URLField( + blank=True, null=True + ) currency_name = models.CharField(max_length=255) currency_symbol = models.CharField(max_length=255) currency_decimals = models.IntegerField(default=18) diff --git a/src/chains/serializers.py b/src/chains/serializers.py index 6f3ef944..12a618fb 100644 --- a/src/chains/serializers.py +++ b/src/chains/serializers.py @@ -146,6 +146,12 @@ class BlockExplorerUriTemplateSerializer(serializers.Serializer[Chain]): api = serializers.URLField(source="block_explorer_uri_api_template") +class BeaconChainExplorerUriTemplateSerializer(serializers.Serializer[Chain]): + public_key = serializers.URLField( + source="beacon_chain_explorer_uri_public_key_template" + ) + + class FeatureSerializer(serializers.ModelSerializer[Feature]): class Meta: fields = ["key"] @@ -177,6 +183,7 @@ class ChainSerializer(serializers.ModelSerializer[Chain]): safe_apps_rpc_uri = serializers.SerializerMethodField() public_rpc_uri = serializers.SerializerMethodField() block_explorer_uri_template = serializers.SerializerMethodField() + beacon_chain_explorer_uri_template = serializers.SerializerMethodField() native_currency = serializers.SerializerMethodField() prices_provider = serializers.SerializerMethodField() contract_addresses = serializers.SerializerMethodField() @@ -205,6 +212,7 @@ class Meta: "safe_apps_rpc_uri", "public_rpc_uri", "block_explorer_uri_template", + "beacon_chain_explorer_uri_template", "native_currency", "prices_provider", "balances_provider", @@ -250,6 +258,11 @@ def get_public_rpc_uri(obj: Chain) -> ReturnDict[Any, Any]: def get_block_explorer_uri_template(obj: Chain) -> ReturnDict[Any, Any]: return BlockExplorerUriTemplateSerializer(obj).data + @staticmethod + @swagger_serializer_method(serializer_or_field=BeaconChainExplorerUriTemplateSerializer) # type: ignore[misc] + def get_beacon_chain_explorer_uri_template(obj: Chain) -> ReturnDict[Any, Any]: + return BeaconChainExplorerUriTemplateSerializer(obj).data + @swagger_serializer_method(serializer_or_field=GasPriceSerializer) # type: ignore[misc] def get_gas_price(self, instance: Chain) -> ReturnDict[Any, Any]: ranked_gas_prices = instance.gasprice_set.all().order_by("rank") diff --git a/src/chains/tests/factories.py b/src/chains/tests/factories.py index 4c5c2366..7560297b 100644 --- a/src/chains/tests/factories.py +++ b/src/chains/tests/factories.py @@ -34,6 +34,7 @@ class Meta: block_explorer_uri_address_template = factory.Faker("url") block_explorer_uri_tx_hash_template = factory.Faker("url") block_explorer_uri_api_template = factory.Faker("url") + beacon_chain_explorer_uri_public_key_template = factory.Faker("url") currency_name = factory.Faker("cryptocurrency_name") currency_symbol = factory.Faker("cryptocurrency_code") currency_decimals = factory.Faker("pyint") diff --git a/src/chains/tests/test_views.py b/src/chains/tests/test_views.py index e46288da..2deddf2f 100644 --- a/src/chains/tests/test_views.py +++ b/src/chains/tests/test_views.py @@ -60,6 +60,9 @@ def test_json_payload_format(self) -> None: "txHash": chain.block_explorer_uri_tx_hash_template, "api": chain.block_explorer_uri_api_template, }, + "beaconChainExplorerUriTemplate": { + "publicKey": chain.beacon_chain_explorer_uri_public_key_template, + }, "nativeCurrency": { "name": chain.currency_name, "symbol": chain.currency_symbol, @@ -198,6 +201,9 @@ def test_json_payload_format(self) -> None: "txHash": chain.block_explorer_uri_tx_hash_template, "api": chain.block_explorer_uri_api_template, }, + "beaconChainExplorerUriTemplate": { + "publicKey": chain.beacon_chain_explorer_uri_public_key_template, + }, "nativeCurrency": { "name": chain.currency_name, "symbol": chain.currency_symbol, From a130b3ee62f4aba677e00bcc73047a1e366c5b8f Mon Sep 17 00:00:00 2001 From: nick8319 Date: Thu, 3 Oct 2024 12:41:42 +0200 Subject: [PATCH 63/78] feat: import default config beta --- docker-entrypoint.sh | 2 + .../commands/import_default_config.py | 253 ++++++++++++++++++ 2 files changed, 255 insertions(+) create mode 100644 src/chains/management/commands/import_default_config.py diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index b2ec012d..2c5ccd67 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -9,6 +9,8 @@ cp -r staticfiles/ ${DOCKER_NGINX_VOLUME_ROOT}/ echo "==> $(date +%H:%M:%S) ==> Migrating Django models..." python src/manage.py migrate --noinput +echo "==> $(date +%H:%M:%S) ==> Importing default config..." +python src/manage.py import_default_config echo "==> $(date +%H:%M:%S) ==> Running Gunicorn..." exec gunicorn -c /app/src/config/gunicorn.py config.wsgi -b ${GUNICORN_BIND_SOCKET} -b 0.0.0.0:${GUNICORN_BIND_PORT} --chdir /app/src/ diff --git a/src/chains/management/commands/import_default_config.py b/src/chains/management/commands/import_default_config.py new file mode 100644 index 00000000..3f67f54c --- /dev/null +++ b/src/chains/management/commands/import_default_config.py @@ -0,0 +1,253 @@ +import json +import os +import re +from typing import Any, List +from urllib.request import urlopen +from urllib.parse import urljoin + +from django.core.management.base import BaseCommand +from django.db import transaction +from django.core.files.base import ContentFile +from django.core.exceptions import ValidationError +from dotenv import load_dotenv + +from chains.models import Chain, Feature as ChainFeature, Wallet +from safe_apps.models import SafeApp, Tag, Feature as SafeAppFeature, validate_safe_app_icon_size +import requests + +load_dotenv() + +class Command(BaseCommand): + help = "Import chains, features, wallets and safeApps" + + def load_json_data(self, file_path: str) -> dict: + if file_path.startswith(('http://', 'https://')): + with urlopen(file_path) as response: + return json.loads(response.read()) + else: + with open(file_path, 'r') as f: + return json.load(f) + + def handle(self, *args: Any, **options: Any) -> None: + config_url = os.getenv('CONFIG_URL', 'https://raw.githubusercontent.com/protofire/safe-configs/refs/heads/main/') + is_url = config_url.startswith(('http://', 'https://')) + join_path = urljoin if is_url else os.path.join + + files = { + 'features': join_path(config_url, 'configs/features.json'), + 'wallets': join_path(config_url, 'configs/wallets.json'), + 'safe_apps': join_path(config_url, 'configs/safeApps.json'), + 'chains': join_path(config_url, 'configs/chains.json'), + } + + default_chain_ids_raw = os.getenv('DEFAULT_CHAIN_IDS', '59144,56') + if default_chain_ids_raw.upper() == 'ALL': + # Load all chain IDs from chains.json + chains_data = self.load_json_data(files['chains']) + default_chain_ids = [str(chain['chainId']) for chain in chains_data] + else: + default_chain_ids = [chain_id.strip() for chain_id in default_chain_ids_raw.split(',') if chain_id.strip()] + + print(default_chain_ids) + import_flags = { + 'features': os.getenv('IMPORT_FEATURES', '1').lower() == '1', + 'wallets': os.getenv('IMPORT_WALLETS', '1').lower() == '1', + 'safe_apps': os.getenv('IMPORT_SAFE_APPS', '1').lower() == '1', + 'chains': bool(default_chain_ids), + } + + with transaction.atomic(): + for item, flag in import_flags.items(): + if flag: + method = getattr(self, f'import_{item}') + if item == 'safe_apps': + method(files[item], default_chain_ids) + elif item == 'chains': + method(files[item], default_chain_ids) + else: + method(files[item]) + + self.stdout.write(self.style.SUCCESS("Import completed successfully")) + + def import_features(self, features_file: str, *args) -> None: + try: + features_data = self.load_json_data(features_file) + existing_features = set(ChainFeature.objects.values_list('key', flat=True)) + new_features = [feature for feature in features_data if feature not in existing_features] + + ChainFeature.objects.bulk_create([ChainFeature(key=feature) for feature in new_features]) + + self.stdout.write(self.style.SUCCESS(f"Imported {len(new_features)} new features")) + except Exception as e: + self.stdout.write(self.style.ERROR(f"Error importing features: {str(e)}")) + + def import_wallets(self, wallets_file: str, *args) -> None: + try: + wallets_data = self.load_json_data(wallets_file) + existing_wallets = set(Wallet.objects.values_list('key', flat=True)) + new_wallets = [wallet for wallet in wallets_data if wallet not in existing_wallets] + + Wallet.objects.bulk_create([Wallet(key=wallet) for wallet in new_wallets]) + + self.stdout.write(self.style.SUCCESS(f"Imported {len(new_wallets)} new wallets")) + except Exception as e: + self.stdout.write(self.style.ERROR(f"Error importing wallets: {str(e)}")) + + def import_safe_apps(self, safe_apps_file: str, default_chain_ids: List[str]) -> None: + try: + safe_apps_data = self.load_json_data(safe_apps_file) + imported_count = updated_count = 0 + + with transaction.atomic(): + for app_data in safe_apps_data: + chain_ids = app_data.get('chainIds') or default_chain_ids + chain_ids = [int(chain_id) for chain_id in chain_ids] + + safe_app, created = SafeApp.objects.update_or_create( + url=app_data['url'], + defaults={ + 'name': app_data['name'], + 'description': app_data.get('description', ''), + 'chain_ids': chain_ids, + 'listed': True, + } + ) + + self._handle_icon_upload(safe_app, app_data) + self._handle_tags(safe_app, app_data) + self._handle_features(safe_app, app_data) + + if created: + imported_count += 1 + else: + updated_count += 1 + + self.stdout.write(self.style.SUCCESS(f"Imported {imported_count} new safe apps, updated {updated_count} existing safe apps")) + except Exception as e: + self.stdout.write(self.style.ERROR(f"Error importing safe apps: {str(e)}")) + + def _handle_icon_upload(self, safe_app: SafeApp, app_data: dict) -> None: + if 'iconUrl' in app_data: + try: + response = requests.get(app_data['iconUrl'], timeout=10) + response.raise_for_status() + icon_content = ContentFile(response.content) + icon_name = f"{safe_app.app_id}.png" + + validate_safe_app_icon_size(icon_content) + safe_app.icon_url.save(icon_name, icon_content, save=True) + except requests.RequestException as e: + self.stdout.write(self.style.WARNING(f"Failed to download icon for {safe_app.name}: {str(e)}")) + except ValidationError as e: + self.stdout.write(self.style.WARNING(f"Skipping icon for {safe_app.name}: {str(e)}")) + + def _handle_tags(self, safe_app: SafeApp, app_data: dict) -> None: + tag_objects = [] + for tag_name in app_data.get('tags', []): + tag, _ = Tag.objects.get_or_create(name=tag_name) + tag_objects.append(tag) + safe_app.tag_set.set(tag_objects) + + def _handle_features(self, safe_app: SafeApp, app_data: dict) -> None: + feature_objects = [] + for feature_key in app_data.get('features', []): + feature, _ = SafeAppFeature.objects.get_or_create(key=feature_key) + feature_objects.append(feature) + safe_app.feature_set.set(feature_objects) + + def import_chains(self, chains_file: str, default_chain_ids: List[str]) -> None: + try: + chains_data = self.load_json_data(chains_file) + chains_to_import = [chain for chain in chains_data if str(chain["chainId"]) in default_chain_ids] + + if not chains_to_import: + self.stdout.write(self.style.WARNING("No chains found with the provided chain IDs")) + return + + default_wallets = ["metamask", "ledger", "trezor", "walletConnect_v2"] + default_features = [ + "EIP1271", "COUNTERFACTUAL", "DELETE_TX", "SAFE_141", + "SAFE_APPS", "SAFE_TX_GAS_OPTIONAL", "SPEED_UP_TX" + ] + + for chain_data in chains_to_import: + chain_id = int(chain_data["chainId"]) + chain_defaults = self._prepare_chain_defaults(chain_data) + + chain, created = Chain.objects.update_or_create(id=chain_id, defaults=chain_defaults) + + self._handle_chain_logo_upload(chain, chain_data) + self._handle_currency_logo_upload(chain, chain_data) + + # Add default wallets + for wallet_key in default_wallets: + wallet, _ = Wallet.objects.get_or_create(key=wallet_key) + chain.wallet_set.add(wallet) + + # Add features + features_to_add = chain_data.get("features", default_features) + for feature_key in features_to_add: + feature, _ = ChainFeature.objects.get_or_create(key=feature_key) + chain.feature_set.add(feature) + + action = "Created" if created else "Updated" + self.stdout.write(self.style.SUCCESS(f"{action} chain: {chain.name} (ID: {chain.id})")) + + self.stdout.write(self.style.SUCCESS("Chain import completed successfully")) + except Exception as e: + self.stdout.write(self.style.ERROR(f"Error importing chains: {str(e)}")) + + def _prepare_chain_defaults(self, chain_data: dict) -> dict: + if "blockExplorerUriTemplate" in chain_data: + block_explorer_uri_address_template = chain_data["blockExplorerUriTemplate"]["address"] + block_explorer_uri_tx_hash_template = chain_data["blockExplorerUriTemplate"]["txHash"] + block_explorer_uri_api_template = chain_data["blockExplorerUriTemplate"]["api"] + elif "blockExplorerUri" in chain_data: + block_explorer = chain_data.get("blockExplorerUri", "").rstrip("/") + block_explorer_uri_address_template = f"{block_explorer}/address/{{{{address}}}}" + block_explorer_uri_tx_hash_template = f"{block_explorer}/tx/{{{{txHash}}}}" + block_explorer_uri_api_template = f"{re.sub(r'^https?://', 'https://api.', block_explorer)}/api?module={{module}}&action={{action}}&address={{address}}&apiKey={{apiKey}}" + else: + self.stdout.write(self.style.WARNING("No block explorer found for chain")) + return + return { + "name": chain_data["chainName"], + "description": chain_data.get("description", ""), + "l2": chain_data.get("l2", False), + "is_testnet": chain_data.get("isTestnet", False), + "rpc_uri": chain_data.get("rpcUri", {}).get("value") or chain_data["rpcUri"], + "rpc_authentication": Chain.RpcAuthentication[chain_data.get("rpcUri", {}).get("authentication", "NO_AUTHENTICATION")], + "safe_apps_rpc_uri": chain_data.get("safeAppsRpcUri", {}).get("value") or chain_data["rpcUri"], + "safe_apps_rpc_authentication": Chain.RpcAuthentication[chain_data.get("safeAppsRpcUri", {}).get("authentication", "NO_AUTHENTICATION")], + "public_rpc_uri": chain_data.get("publicRpcUri", {}).get("value") or chain_data["rpcUri"], + "public_rpc_authentication": Chain.RpcAuthentication[chain_data.get("publicRpcUri", {}).get("authentication", "NO_AUTHENTICATION")], + "transaction_service_uri": chain_data["transactionService"], + "vpc_transaction_service_uri": chain_data["transactionService"], + "block_explorer_uri_address_template": block_explorer_uri_address_template, + "block_explorer_uri_tx_hash_template": block_explorer_uri_tx_hash_template, + "block_explorer_uri_api_template": block_explorer_uri_api_template, + "currency_name": chain_data["nativeCurrency"]["name"], + "currency_symbol": chain_data["nativeCurrency"]["symbol"], + "currency_decimals": chain_data["nativeCurrency"]["decimals"], + "ens_registry_address": chain_data.get("ensRegistryAddress", None), + "recommended_master_copy_version": chain_data.get("recommendedMasterCopyVersion", "1.3.0"), + "theme_text_color": chain_data.get("theme", {}).get("textColor", "#ffffff"), + "theme_background_color": chain_data.get("theme", {}).get("backgroundColor", "#000000"), + "short_name": chain_data.get("shortName", ""), + } + + def _handle_chain_logo_upload(self, chain: Chain, chain_data: dict) -> None: + if "chainLogoUri" in chain_data: + self._upload_image(chain, "chain_logo_uri", chain_data["chainLogoUri"], f"chain_logo_{chain.id}.png") + + def _handle_currency_logo_upload(self, chain: Chain, chain_data: dict) -> None: + if "logoUri" in chain_data["nativeCurrency"]: + self._upload_image(chain, "currency_logo_uri", chain_data["nativeCurrency"]["logoUri"], f"currency_logo_{chain.id}.png") + + def _upload_image(self, obj: Any, field_name: str, image_url: str, file_name: str) -> None: + config_url = os.getenv('CONFIG_URL', 'https://raw.githubusercontent.com/protofire/safe-configs/refs/heads/main/') + full_image_url = f"{config_url}{image_url}" + response = requests.get(full_image_url) + if response.status_code == 200: + content = ContentFile(response.content) + getattr(obj, field_name).save(file_name, content, save=True) \ No newline at end of file From 6e88464e93ccdddd213c447187b8dcccbb46901b Mon Sep 17 00:00:00 2001 From: nick8319 Date: Thu, 3 Oct 2024 12:47:24 +0200 Subject: [PATCH 64/78] fix: add dotenv dependency --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 715ced19..89a86d92 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,5 +10,6 @@ safe-eth-py[django]==5.8.0 gunicorn==22.0.0 Pillow==10.3.0 psycopg2-binary==2.9.9 +python-dotenv==1.0.1 requests==2.32.3 web3==6.11.4 \ No newline at end of file From e7f6d461abc998ec35dfb069949631630c81c9bd Mon Sep 17 00:00:00 2001 From: nick8319 Date: Thu, 3 Oct 2024 12:58:32 +0200 Subject: [PATCH 65/78] fix: remove dotenv --- src/chains/management/commands/import_default_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chains/management/commands/import_default_config.py b/src/chains/management/commands/import_default_config.py index 3f67f54c..dba57853 100644 --- a/src/chains/management/commands/import_default_config.py +++ b/src/chains/management/commands/import_default_config.py @@ -9,13 +9,13 @@ from django.db import transaction from django.core.files.base import ContentFile from django.core.exceptions import ValidationError -from dotenv import load_dotenv +#from dotenv import load_dotenv from chains.models import Chain, Feature as ChainFeature, Wallet from safe_apps.models import SafeApp, Tag, Feature as SafeAppFeature, validate_safe_app_icon_size import requests -load_dotenv() +#load_dotenv() class Command(BaseCommand): help = "Import chains, features, wallets and safeApps" From 6b5e2d5fa46ba25250d6dab4068323df3394d727 Mon Sep 17 00:00:00 2001 From: nick8319 Date: Thu, 3 Oct 2024 13:15:45 +0200 Subject: [PATCH 66/78] fix: safeApps icons download --- src/chains/management/commands/import_default_config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chains/management/commands/import_default_config.py b/src/chains/management/commands/import_default_config.py index dba57853..be35ef2a 100644 --- a/src/chains/management/commands/import_default_config.py +++ b/src/chains/management/commands/import_default_config.py @@ -16,6 +16,7 @@ import requests #load_dotenv() +config_url = os.getenv('CONFIG_URL', 'https://raw.githubusercontent.com/protofire/safe-configs/refs/heads/main/') class Command(BaseCommand): help = "Import chains, features, wallets and safeApps" @@ -29,7 +30,6 @@ def load_json_data(self, file_path: str) -> dict: return json.load(f) def handle(self, *args: Any, **options: Any) -> None: - config_url = os.getenv('CONFIG_URL', 'https://raw.githubusercontent.com/protofire/safe-configs/refs/heads/main/') is_url = config_url.startswith(('http://', 'https://')) join_path = urljoin if is_url else os.path.join @@ -40,7 +40,7 @@ def handle(self, *args: Any, **options: Any) -> None: 'chains': join_path(config_url, 'configs/chains.json'), } - default_chain_ids_raw = os.getenv('DEFAULT_CHAIN_IDS', '59144,56') + default_chain_ids_raw = os.getenv('DEFAULT_CHAIN_IDS', 'ALL') if default_chain_ids_raw.upper() == 'ALL': # Load all chain IDs from chains.json chains_data = self.load_json_data(files['chains']) @@ -129,7 +129,8 @@ def import_safe_apps(self, safe_apps_file: str, default_chain_ids: List[str]) -> def _handle_icon_upload(self, safe_app: SafeApp, app_data: dict) -> None: if 'iconUrl' in app_data: try: - response = requests.get(app_data['iconUrl'], timeout=10) + full_image_url = f"{config_url}{app_data['iconUrl']}" + response = requests.get(full_image_url, timeout=10) response.raise_for_status() icon_content = ContentFile(response.content) icon_name = f"{safe_app.app_id}.png" @@ -245,7 +246,6 @@ def _handle_currency_logo_upload(self, chain: Chain, chain_data: dict) -> None: self._upload_image(chain, "currency_logo_uri", chain_data["nativeCurrency"]["logoUri"], f"currency_logo_{chain.id}.png") def _upload_image(self, obj: Any, field_name: str, image_url: str, file_name: str) -> None: - config_url = os.getenv('CONFIG_URL', 'https://raw.githubusercontent.com/protofire/safe-configs/refs/heads/main/') full_image_url = f"{config_url}{image_url}" response = requests.get(full_image_url) if response.status_code == 200: From 8270fe2dde032e97c0fb8438599b58a2a58089a3 Mon Sep 17 00:00:00 2001 From: nick8319 Date: Thu, 3 Oct 2024 13:41:38 +0200 Subject: [PATCH 67/78] chore: disable import --- src/chains/management/commands/import_default_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chains/management/commands/import_default_config.py b/src/chains/management/commands/import_default_config.py index be35ef2a..e36a03c9 100644 --- a/src/chains/management/commands/import_default_config.py +++ b/src/chains/management/commands/import_default_config.py @@ -40,7 +40,7 @@ def handle(self, *args: Any, **options: Any) -> None: 'chains': join_path(config_url, 'configs/chains.json'), } - default_chain_ids_raw = os.getenv('DEFAULT_CHAIN_IDS', 'ALL') + default_chain_ids_raw = os.getenv('DEFAULT_CHAIN_IDS', '') if default_chain_ids_raw.upper() == 'ALL': # Load all chain IDs from chains.json chains_data = self.load_json_data(files['chains']) @@ -48,7 +48,7 @@ def handle(self, *args: Any, **options: Any) -> None: else: default_chain_ids = [chain_id.strip() for chain_id in default_chain_ids_raw.split(',') if chain_id.strip()] - print(default_chain_ids) + print('Chains to import:', default_chain_ids) import_flags = { 'features': os.getenv('IMPORT_FEATURES', '1').lower() == '1', 'wallets': os.getenv('IMPORT_WALLETS', '1').lower() == '1', From b0af227d1a72afa976f557352d820ccedd54d458 Mon Sep 17 00:00:00 2001 From: nick8319 Date: Thu, 3 Oct 2024 13:54:01 +0200 Subject: [PATCH 68/78] chore: disable all import --- docker-entrypoint.sh | 4 ++-- requirements.txt | 1 - src/chains/management/commands/import_default_config.py | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 2c5ccd67..b4f20d60 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -9,8 +9,8 @@ cp -r staticfiles/ ${DOCKER_NGINX_VOLUME_ROOT}/ echo "==> $(date +%H:%M:%S) ==> Migrating Django models..." python src/manage.py migrate --noinput -echo "==> $(date +%H:%M:%S) ==> Importing default config..." -python src/manage.py import_default_config +#echo "==> $(date +%H:%M:%S) ==> Importing default config..." +#python src/manage.py import_default_config echo "==> $(date +%H:%M:%S) ==> Running Gunicorn..." exec gunicorn -c /app/src/config/gunicorn.py config.wsgi -b ${GUNICORN_BIND_SOCKET} -b 0.0.0.0:${GUNICORN_BIND_PORT} --chdir /app/src/ diff --git a/requirements.txt b/requirements.txt index 89a86d92..715ced19 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,6 +10,5 @@ safe-eth-py[django]==5.8.0 gunicorn==22.0.0 Pillow==10.3.0 psycopg2-binary==2.9.9 -python-dotenv==1.0.1 requests==2.32.3 web3==6.11.4 \ No newline at end of file diff --git a/src/chains/management/commands/import_default_config.py b/src/chains/management/commands/import_default_config.py index e36a03c9..5aa78ff6 100644 --- a/src/chains/management/commands/import_default_config.py +++ b/src/chains/management/commands/import_default_config.py @@ -50,9 +50,9 @@ def handle(self, *args: Any, **options: Any) -> None: print('Chains to import:', default_chain_ids) import_flags = { - 'features': os.getenv('IMPORT_FEATURES', '1').lower() == '1', - 'wallets': os.getenv('IMPORT_WALLETS', '1').lower() == '1', - 'safe_apps': os.getenv('IMPORT_SAFE_APPS', '1').lower() == '1', + 'features': os.getenv('IMPORT_FEATURES', '0').lower() == '1', + 'wallets': os.getenv('IMPORT_WALLETS', '0').lower() == '1', + 'safe_apps': os.getenv('IMPORT_SAFE_APPS', '0').lower() == '1', 'chains': bool(default_chain_ids), } From 445ceca0e7d64bbf6e970bc4311fe61031414472 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:05:45 +0200 Subject: [PATCH 69/78] Bump docker/setup-buildx-action from 3.6.1 to 3.7.1 (#1248) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.6.1 to 3.7.1. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v3.6.1...v3.7.1) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15abd8a8..4556c9fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -150,7 +150,7 @@ jobs: with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.6.1 + uses: docker/setup-buildx-action@v3.7.1 - name: Cache Docker layers uses: actions/cache@v4 with: @@ -198,7 +198,7 @@ jobs: with: platforms: arm64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.6.1 + uses: docker/setup-buildx-action@v3.7.1 - name: Cache Docker layers uses: actions/cache@v4 with: From 98b30fa360372a47660a0515aaf6ed78c5f38aa4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:05:57 +0200 Subject: [PATCH 70/78] Bump python from 3.12.6-slim to 3.12.7-slim (#1247) Bumps python from 3.12.6-slim to 3.12.7-slim. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 778c8caa..c9794afd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12.6-slim +FROM python:3.12.7-slim # python ENV PYTHONUNBUFFERED=1 From c5f342edf61321c0e3a0b21a43c65ec3f3d3806a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:06:44 +0200 Subject: [PATCH 71/78] Bump django-stubs-ext from 5.0.4 to 5.1.0 (#1249) Bumps [django-stubs-ext](https://github.com/typeddjango/django-stubs) from 5.0.4 to 5.1.0. - [Release notes](https://github.com/typeddjango/django-stubs/releases) - [Commits](https://github.com/typeddjango/django-stubs/compare/5.0.4...5.1.0) --- updated-dependencies: - dependency-name: django-stubs-ext dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b213a171..0a3ce647 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ django-cors-headers==4.4.0 djangorestframework==3.15.2 djangorestframework-camel-case==1.4.2 django-storages==1.14.4 -django-stubs-ext==5.0.4 +django-stubs-ext==5.1.0 drf-yasg[validation]==1.21.7 safe-eth-py[django]==5.8.0 gunicorn==23.0.0 From 5cd2000556adf0579b799e96125cc909f61658ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:07:26 +0200 Subject: [PATCH 72/78] Bump faker from 30.0.0 to 30.1.0 (#1251) Bumps [faker](https://github.com/joke2k/faker) from 30.0.0 to 30.1.0. - [Release notes](https://github.com/joke2k/faker/releases) - [Changelog](https://github.com/joke2k/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/joke2k/faker/compare/v30.0.0...v30.1.0) --- updated-dependencies: - dependency-name: faker dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 5e296cac..c720ec84 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ black==24.8.0 coverage==7.6.1 factory-boy==3.3.1 -Faker==30.0.0 +Faker==30.1.0 flake8==7.1.1 isort==5.13.2 pre-commit==3.8.0 From 99ceacc150e034db8c3724d9cd85a327c6eedd03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:07:40 +0200 Subject: [PATCH 73/78] Bump boto3 from 1.35.20 to 1.35.34 (#1252) Bumps [boto3](https://github.com/boto/boto3) from 1.35.20 to 1.35.34. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.35.20...1.35.34) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0a3ce647..25636729 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -boto3==1.35.20 +boto3==1.35.34 Django==5.0.8 django-cors-headers==4.4.0 djangorestframework==3.15.2 From a5e7aa77334ad4d0090bd71f1c96c382aa2a4663 Mon Sep 17 00:00:00 2001 From: Aaron Cook Date: Mon, 7 Oct 2024 17:07:59 +0200 Subject: [PATCH 74/78] Add install command to README (#1246) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 04a1646c..a3b18922 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ In order to start the server application: python -m venv venv # creates a virtual environment venv in the local directory source venv/bin/activate pip install -r requirements-dev.txt +pip install setuptools ``` #### 2. Launch the Postgres database image From 74b50793621b4121507d401bc8f28aa349ce6eae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:16:34 +0200 Subject: [PATCH 75/78] Bump django-stubs from 5.0.4 to 5.1.0 (#1250) Bumps [django-stubs](https://github.com/typeddjango/django-stubs) from 5.0.4 to 5.1.0. - [Release notes](https://github.com/typeddjango/django-stubs/releases) - [Commits](https://github.com/typeddjango/django-stubs/compare/5.0.4...5.1.0) --- updated-dependencies: - dependency-name: django-stubs dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index c720ec84..25f83fc9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -11,6 +11,6 @@ responses==0.25.3 # mypy and PEP 561 stubs mypy==1.11.2 -django-stubs==5.0.4 +django-stubs==5.1.0 djangorestframework-stubs==3.15.1 types-requests==2.32.0.20240914 From 0c9b95806608f14fdf6e463abac898ab691ff43b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 13:17:17 +0200 Subject: [PATCH 76/78] Bump django from 5.0.8 to 5.1.1 (#1225) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump django from 5.0.8 to 5.1.1 Bumps [django](https://github.com/django/django) from 5.0.8 to 5.1.1. - [Commits](https://github.com/django/django/compare/5.0.8...5.1.1) --- updated-dependencies: - dependency-name: django dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Set `STORAGES` config * Fix `staticfiles` of `STORAGES` --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: iamacook Co-authored-by: Hector Gómez Varela --- requirements.txt | 2 +- src/chains/apps.py | 3 ++- src/chains/tests/test_apps.py | 9 ++++++++- src/config/settings.py | 17 ++++++++++++++--- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 25636729..75d3a73c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ boto3==1.35.34 -Django==5.0.8 +Django==5.1.1 django-cors-headers==4.4.0 djangorestframework==3.15.2 djangorestframework-camel-case==1.4.2 diff --git a/src/chains/apps.py b/src/chains/apps.py index 25f3b8cb..c3913ace 100644 --- a/src/chains/apps.py +++ b/src/chains/apps.py @@ -5,7 +5,8 @@ def _validate_storage_setup() -> None: if ( - settings.DEFAULT_FILE_STORAGE == "storages.backends.s3boto3.S3Boto3Storage" + settings.STORAGES["default"]["BACKEND"] + == "storages.backends.s3boto3.S3Boto3Storage" and settings.AWS_ACCESS_KEY_ID is None and settings.AWS_SECRET_ACCESS_KEY is None and settings.AWS_STORAGE_BUCKET_NAME is None diff --git a/src/chains/tests/test_apps.py b/src/chains/tests/test_apps.py index 84a242dc..5f652503 100644 --- a/src/chains/tests/test_apps.py +++ b/src/chains/tests/test_apps.py @@ -16,7 +16,14 @@ # https://stackoverflow.com/questions/31148172/django-override-setting-used-in-appconfig-ready-function # https://code.djangoproject.com/ticket/22002 def test_validate_storage_setup(settings) -> None: # type: ignore[no-untyped-def] - settings.DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" + settings.STORAGES = { + "default": { + "BACKEND": "storages.backends.s3boto3.S3Boto3Storage", + }, + "staticfiles": { + "BACKEND": "django.core.files.storage.FileSystemStorage", + }, + } settings.AWS_ACCESS_KEY_ID = None settings.AWS_SECRET_ACCESS_KEY = None settings.AWS_STORAGE_BUCKET_NAME = None diff --git a/src/config/settings.py b/src/config/settings.py index 1fbc4180..1733c036 100644 --- a/src/config/settings.py +++ b/src/config/settings.py @@ -223,9 +223,20 @@ # Setting AWS_QUERYSTRING_AUTH to False to remove query parameter authentication from generated URLs. # This can be useful if your S3 buckets are public. AWS_QUERYSTRING_AUTH = False -DEFAULT_FILE_STORAGE = os.getenv( - "DEFAULT_FILE_STORAGE", "django.core.files.storage.FileSystemStorage" -) +# In Django 4.2, STORAGES replaced DEFAULT_FILE_STORAGE. It was later removed removed in Django 5.1. +# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#configuration-settings +# https://docs.djangoproject.com/en/5.1/releases/5.1/ +STORAGES = { + "default": { + "BACKEND": os.getenv( + "DEFAULT_FILE_STORAGE", "django.core.files.storage.FileSystemStorage" + ), + }, + "staticfiles": { + # Following is default but must explicitly set if "default" is + "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage" + }, +} # SECURITY # https://docs.djangoproject.com/en/4.0/ref/settings/#csrf-trusted-origins From a2c2c31848b196a43b120d2a9e9fa57720c99f30 Mon Sep 17 00:00:00 2001 From: Aaron Cook Date: Tue, 8 Oct 2024 15:28:24 +0200 Subject: [PATCH 77/78] Double pagination of `Chains` (#1253) Doubles the `max_limit`/`default_limit` of `Chains` to 40: - Set `max_limit`/`default_limit` to 40 - Update tests accordingly --- src/chains/tests/test_views.py | 20 ++++++++++---------- src/chains/views.py | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/chains/tests/test_views.py b/src/chains/tests/test_views.py index 2deddf2f..3ce5fecc 100644 --- a/src/chains/tests/test_views.py +++ b/src/chains/tests/test_views.py @@ -117,21 +117,21 @@ def test_json_payload_format(self) -> None: class ChainPaginationViewTests(APITestCase): def test_pagination_next_page(self) -> None: - ChainFactory.create_batch(21) + ChainFactory.create_batch(41) url = reverse("v1:chains:list") response = self.client.get(path=url, data=None, format="json") self.assertEqual(response.status_code, 200) # number of items should be equal to the number of total items - self.assertEqual(response.json()["count"], 21) + self.assertEqual(response.json()["count"], 41) self.assertEqual( response.json()["next"], - "http://testserver/api/v1/chains/?limit=20&offset=20", + "http://testserver/api/v1/chains/?limit=40&offset=40", ) self.assertEqual(response.json()["previous"], None) # returned items should be equal to max_limit - self.assertEqual(len(response.json()["results"]), 20) + self.assertEqual(len(response.json()["results"]), 40) def test_request_more_than_max_limit_should_return_max_limit(self) -> None: ChainFactory.create_batch(101) @@ -145,25 +145,25 @@ def test_request_more_than_max_limit_should_return_max_limit(self) -> None: self.assertEqual(response.json()["count"], 101) self.assertEqual( response.json()["next"], - "http://testserver/api/v1/chains/?limit=20&offset=20", + "http://testserver/api/v1/chains/?limit=40&offset=40", ) self.assertEqual(response.json()["previous"], None) # returned items should still be equal to max_limit - self.assertEqual(len(response.json()["results"]), 20) + self.assertEqual(len(response.json()["results"]), 40) def test_offset_greater_than_count(self) -> None: - ChainFactory.create_batch(21) + ChainFactory.create_batch(41) # requesting offset of number of chains - url = reverse("v1:chains:list") + f'{"?offset=21"}' + url = reverse("v1:chains:list") + f'{"?offset=41"}' response = self.client.get(path=url, data=None, format="json") self.assertEqual(response.status_code, 200) - self.assertEqual(response.json()["count"], 21) + self.assertEqual(response.json()["count"], 41) self.assertEqual(response.json()["next"], None) self.assertEqual( response.json()["previous"], - "http://testserver/api/v1/chains/?limit=20&offset=1", + "http://testserver/api/v1/chains/?limit=40&offset=1", ) # returned items should still be zero self.assertEqual(len(response.json()["results"]), 0) diff --git a/src/chains/views.py b/src/chains/views.py index b502e03e..f6964900 100644 --- a/src/chains/views.py +++ b/src/chains/views.py @@ -12,8 +12,8 @@ class ChainsPagination(LimitOffsetPagination): - default_limit = 20 - max_limit = 20 + default_limit = 40 + max_limit = 40 class ChainsListView(ListAPIView): # type: ignore[type-arg] From f8a356f61bd3646dd89c9a537e5840963c3e0c4c Mon Sep 17 00:00:00 2001 From: dzianis smalonski Date: Wed, 16 Oct 2024 14:26:21 +0200 Subject: [PATCH 78/78] feat: update env --- .env.custom | 2 +- src/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.custom b/.env.custom index d19050b1..eb111368 100644 --- a/.env.custom +++ b/.env.custom @@ -1 +1 @@ -APPLICATION_VERSION=2.83.0 +APPLICATION_VERSION=2.87.0 diff --git a/src/version.py b/src/version.py index 5e83b33b..3d273c86 100644 --- a/src/version.py +++ b/src/version.py @@ -1,2 +1,2 @@ __name__ = "Safe Config Service" -__version__ = "2.83.0" +__version__ = "2.87.0"