diff --git a/multicall/call.py b/multicall/call.py index 565c87ad..600b6296 100644 --- a/multicall/call.py +++ b/multicall/call.py @@ -18,6 +18,7 @@ AnyAddress = Union[str,Address,ChecksumAddress,HexAddress] class Call: + __slots__ = "target", "returns", "block_id", "gas_limit", "state_override_code", "w3", "args", "function", "signature" def __init__( self, target: AnyAddress, diff --git a/multicall/multicall.py b/multicall/multicall.py index c70abeb6..c42827f8 100644 --- a/multicall/multicall.py +++ b/multicall/multicall.py @@ -31,6 +31,7 @@ def unpack_batch_results(batch_results: List[List[CallResponse]]) -> List[CallRe class Multicall: + __slots__ = "calls", "block_id", "require_success", "gas_limit", "w3", "chainid", "multicall_sig", "multicall_address" def __init__( self, calls: List[Call], @@ -138,6 +139,7 @@ class NotSoBrightBatcher: This class helps with processing a large volume of large multicalls. It's not so bright, but should quickly bring the batch size down to something reasonable for your node. """ + __slots__ = "step", def __init__(self) -> None: self.step = 10000 diff --git a/multicall/signature.py b/multicall/signature.py index f8de5374..00d2b143 100644 --- a/multicall/signature.py +++ b/multicall/signature.py @@ -58,6 +58,7 @@ def parse_typestring(typestring: str) -> Optional[List[TypeStr]]: class Signature: + __slots__ = "signature", "function", "input_types", "output_types" def __init__(self, signature: str) -> None: self.signature = signature self.function, self.input_types, self.output_types = parse_signature(signature) diff --git a/pyproject.toml b/pyproject.toml index 6129fb5f..a51e386c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "multicall" -version = "0.7.5" +version = "0.7.6" description = "aggregate results from multiple ethereum contract calls" authors = ["banteg"]