diff --git a/eth_abi/codec.py b/eth_abi/codec.py index ca606920..de04c0d5 100644 --- a/eth_abi/codec.py +++ b/eth_abi/codec.py @@ -30,6 +30,9 @@ class BaseABICodecEncoder(): def __init__(self, registry): + if registry is None: + raise ValueError("`registry` may not be None") + self._registry = registry def encode_single(self, typ: TypeStr, arg: Any) -> bytes: diff --git a/tests/test_codec/test_base_abi_codec_encoder.py b/tests/test_codec/test_base_abi_codec_encoder.py new file mode 100644 index 00000000..98aaf9d0 --- /dev/null +++ b/tests/test_codec/test_base_abi_codec_encoder.py @@ -0,0 +1,4 @@ +from eth_abi.codec import ( + BaseABICodecEncoder, +) +