• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-eth-py / 19742766507

27 Nov 2025 04:31PM UTC coverage: 93.96% (+0.1%) from 93.86%
19742766507

push

github

web-flow
feat: Support safe contracts v1.5.0 (#2179)

* Add v1.5.0 to new addresses github issue

* Add safe deployments v1.5.0

* Add v1.5.0 contract abis

* Add contacts classes

* Update tests

* Rafactor test with minimun supported version 1.3.0

* Add compatibility for signatures before to v1.3.0

* Add PR suggestions

* Fix isValidSignature validation arguments

* Add ModuleGuard support to safe class. Rename existing Guard to TransactionGuard

* Add support to ExtensibleFallbackHandler

* Add test for safe V1.4.1

* Add MultiSend and MultiSendCallOnly v1.5.0 contracts

* Add missing multisend addresses

* Improve typing

* Update Safe_v1_5_0.json file

* Fix module_guard init value

339 of 351 new or added lines in 15 files covered. (96.58%)

1 existing line in 1 file now uncovered.

10282 of 10943 relevant lines covered (93.96%)

1.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.92
/safe_eth/safe/extensible_fallback_handler.py
1
from abc import ABCMeta
2✔
2
from typing import Callable, Optional
2✔
3

4
from eth_account.signers.local import LocalAccount
2✔
5
from eth_typing import ChecksumAddress
2✔
6
from web3 import Web3
2✔
7
from web3.contract.contract import Contract
2✔
8

9
from safe_eth.eth import EthereumClient, EthereumTxSent
2✔
10
from safe_eth.eth.contracts import (
2✔
11
    ContractBase,
12
    get_extensible_fallback_handler_V1_5_0_contract,
13
)
14
from safe_eth.eth.utils import get_empty_tx_params
2✔
15

16

17
class ExtensibleFallbackHandler(ContractBase, metaclass=ABCMeta):
2✔
18
    def __new__(
2✔
19
        cls, *args, version: str = "1.5.0", **kwargs
20
    ) -> "ExtensibleFallbackHandler":
NEW
21
        if cls is not ExtensibleFallbackHandler:
×
NEW
22
            return super().__new__(cls)
×
23

NEW
24
        versions = {
×
25
            "1.5.0": ExtensibleFallbackHandlerV150,
26
        }
NEW
27
        instance_class = versions[version]
×
NEW
28
        instance = super().__new__(instance_class)
×
NEW
29
        return instance
×
30

31
    @classmethod
2✔
32
    def deploy_contract(
2✔
33
        cls, ethereum_client: EthereumClient, deployer_account: LocalAccount
34
    ) -> EthereumTxSent:
35
        """
36
        Deploy Extensible Fallback Handler contract
37

38
        :param ethereum_client:
39
        :param deployer_account: Ethereum Account
40
        :return: ``EthereumTxSent`` with the deployed contract address
41
        """
42
        contract_fn = cls.get_contract_fn(cls)  # type: ignore[arg-type]
2✔
43
        contract = contract_fn(ethereum_client.w3, None)
2✔
44
        constructor_data = contract.constructor().build_transaction(
2✔
45
            get_empty_tx_params()
46
        )["data"]
47
        return ethereum_client.deploy_and_initialize_contract(
2✔
48
            deployer_account, constructor_data
49
        )
50

51

52
class ExtensibleFallbackHandlerV150(ExtensibleFallbackHandler):
2✔
53
    def get_contract_fn(self) -> Callable[[Web3, Optional[ChecksumAddress]], Contract]:
2✔
54
        return get_extensible_fallback_handler_V1_5_0_contract
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc