Skip to content

Commit 6d8a59c

Browse files
committed
[v1.5.0] Expect proxy factory v1.4.1 to be deployed in SafeTestCaseMixin
1 parent 99b263e commit 6d8a59c

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

safe_transaction_service/account_abstraction/tests/test_helpers.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,15 @@
11
from django.test import TestCase
22

33
from hexbytes import HexBytes
4-
from safe_eth.eth.contracts import get_proxy_factory_contract
5-
from safe_eth.eth.exceptions import ContractAlreadyDeployed
64
from safe_eth.eth.tests.mocks.mock_bundler import (
75
user_operation_mock,
86
)
9-
from safe_eth.safe.proxy_factory import ProxyFactoryV141
107
from safe_eth.safe.tests.safe_test_case import SafeTestCaseMixin
118

129
from ..helpers import DecodedInitCode, decode_init_code
1310

1411

1512
class TestAccountAbstractionHelpers(SafeTestCaseMixin, TestCase):
16-
@classmethod
17-
def setUpClass(cls):
18-
super().setUpClass()
19-
20-
# Deploy v1.4.1 proxy factory if not already deployed
21-
if "proxy_factory_V1_4_1" not in cls.contract_addresses:
22-
try:
23-
cls.contract_addresses["proxy_factory_V1_4_1"] = (
24-
ProxyFactoryV141.deploy_contract(
25-
cls.ethereum_client, cls.ethereum_test_account
26-
).contract_address
27-
)
28-
except ContractAlreadyDeployed as e:
29-
# Contract already deployed via Singleton Factory
30-
cls.contract_addresses["proxy_factory_V1_4_1"] = e.address
31-
32-
# Create proxy factory v1.4.1 instance
33-
cls.proxy_factory_contract_V1_4_1 = get_proxy_factory_contract(
34-
cls.w3, cls.contract_addresses["proxy_factory_V1_4_1"]
35-
)
36-
cls.proxy_factory_V1_4_1 = ProxyFactoryV141(
37-
cls.proxy_factory_contract_V1_4_1.address, cls.ethereum_client
38-
)
39-
4013
def test_decode_init_code_v141(self):
4114
with self.assertRaises(ValueError):
4215
decode_init_code(b"", self.ethereum_client)

0 commit comments

Comments
 (0)