Skip to content

Commit

Permalink
Refactor command name (#2227)
Browse files Browse the repository at this point in the history
Add MultiSend contract to enable for trusted delegate call
  • Loading branch information
moisses89 authored Sep 27, 2024
1 parent a5c3cac commit 01870d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/web/celery/worker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ ${RUN_MIGRATIONS:-0} = 1 ]; then
python manage.py setup_service

echo "==> $(date +%H:%M:%S) ==> Setting contracts... "
python manage.py update_safe_contracts_logo
python manage.py setup_safe_contracts
fi

echo "==> $(date +%H:%M:%S) ==> Check RPC connected matches previously used RPC... "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from config.settings.base import STATICFILES_DIRS
from safe_transaction_service.contracts.models import Contract

TRUSTED_FOR_DELEGATE_CALL = ["MultiSendCallOnly"]
TRUSTED_FOR_DELEGATE_CALL = ["MultiSendCallOnly", "MultiSend"]


def generate_safe_contract_display_name(contract_name: str, version: str) -> str:
Expand All @@ -28,7 +28,7 @@ def generate_safe_contract_display_name(contract_name: str, version: str) -> str


class Command(BaseCommand):
help = "Update or create Safe contracts with provided logo"
help = "Create or update the Safe contracts with default data. A different logo can be provided"

def add_arguments(self, parser):
parser.add_argument(
Expand All @@ -50,7 +50,7 @@ def add_arguments(self, parser):

def handle(self, *args, **options):
"""
Command to create or update Safe contracts with provided logo.
Command to create or update Safe contracts with default data. A different contract logo can be provided.
:param args:
:param options: Safe version and logo path
Expand Down
2 changes: 1 addition & 1 deletion safe_transaction_service/contracts/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_index_contracts_with_metadata(self):

@patch.object(EthereumClient, "get_chain_id", autospec=True, return_value=137)
def test_update_safe_contracts_logo(self, mock_chain_id: MagicMock):
command = "update_safe_contracts_logo"
command = "setup_safe_contracts"
buf = StringIO()
random_contract = ContractFactory()
previous_random_contract_logo = random_contract.logo.read()
Expand Down

0 comments on commit 01870d9

Please sign in to comment.