Skip to content

Commit 012a22f

Browse files
feat(orc-483): add Web3.to_checksum_address to delegation contract
1 parent c44b1bb commit 012a22f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/providers/execution/contracts/delegation_contract.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from eth_abi.abi import encode
55
from eth_typing import ChecksumAddress
6+
from web3 import Web3
67
from web3.contract.contract import ContractFunction
78
from web3.types import BlockIdentifier
89

@@ -45,7 +46,7 @@ def get_admin(self, block_identifier: BlockIdentifier = 'latest') -> ChecksumAdd
4546
'block_identifier': repr(block_identifier),
4647
'to': self.address
4748
})
48-
return cast(ChecksumAddress, response)
49+
return Web3.to_checksum_address(response)
4950

5051
def get_delegatee(self, block_identifier: BlockIdentifier = 'latest') -> ChecksumAddress:
5152
"""Get current delegatee address"""
@@ -56,5 +57,5 @@ def get_delegatee(self, block_identifier: BlockIdentifier = 'latest') -> Checksu
5657
'block_identifier': repr(block_identifier),
5758
'to': self.address
5859
})
59-
return cast(ChecksumAddress, response)
60+
return Web3.to_checksum_address(response)
6061

0 commit comments

Comments
 (0)