|
1 | 1 | from django.test import TestCase |
2 | 2 |
|
3 | 3 | from hexbytes import HexBytes |
4 | | -from safe_eth.eth.contracts import get_proxy_factory_contract |
5 | | -from safe_eth.eth.exceptions import ContractAlreadyDeployed |
6 | 4 | from safe_eth.eth.tests.mocks.mock_bundler import ( |
7 | 5 | user_operation_mock, |
8 | 6 | ) |
9 | | -from safe_eth.safe.proxy_factory import ProxyFactoryV141 |
10 | 7 | from safe_eth.safe.tests.safe_test_case import SafeTestCaseMixin |
11 | 8 |
|
12 | 9 | from ..helpers import DecodedInitCode, decode_init_code |
13 | 10 |
|
14 | 11 |
|
15 | 12 | 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 | | - |
40 | 13 | def test_decode_init_code_v141(self): |
41 | 14 | with self.assertRaises(ValueError): |
42 | 15 | decode_init_code(b"", self.ethereum_client) |
|
0 commit comments