You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working on #3540, I noticed a lot of the code that was cleaned up there can ideally be removed from the contract.py and async_contract.py into base_contract.py since the code is nearly identical. The biggest issue I can see to resolve may be the typing, which is why this warrants a separate issue since it's out of the scope of that PR.
Investigate the following, and perhaps other cases:
refactor __call__() in ContractFunction (+ respective async code) to BaseContractFunction
refactor __getattr__(), __getitem__() and __iter__() in ContractEvents and ContractFunctions (+ respective async code) to BaseContractEvents and BaseContractFunctions, respectively.
The text was updated successfully, but these errors were encountered:
fselmo
changed the title
Clean up common code in contract classes
DRY up common code in contract classes
Dec 16, 2024
Working on #3540, I noticed a lot of the code that was cleaned up there can ideally be removed from the
contract.py
andasync_contract.py
intobase_contract.py
since the code is nearly identical. The biggest issue I can see to resolve may be the typing, which is why this warrants a separate issue since it's out of the scope of that PR.Investigate the following, and perhaps other cases:
__call__()
inContractFunction
(+ respective async code) toBaseContractFunction
__getattr__()
,__getitem__()
and__iter__()
inContractEvents
andContractFunctions
(+ respective async code) toBaseContractEvents
andBaseContractFunctions
, respectively.The text was updated successfully, but these errors were encountered: