Closed antazoey closed 1 year ago
I don't think the
isinstance
check would actually fail with a re-import
You are correct, I just tried:
In [1]: from hexbytes import HexBytes
In [2]: from ethpm_types import HexBytes as EthPMHexBytes
...
In [6]: b2 = EthPMHexBytes(0)
In [7]: isinstance(b2, HexBytes)
Out[7]: True
So if they had isinstance(b2, HexBytes)
before, it will still work when we switch to our new type.
It doesn't work in reverse, but that isn't surprising.
What I did
noticed we were not using our own hexbytes class for contract bytescode. seems like we can? shouldnt be a breaking change since the classes are supposed to be the same, unless it breaks someone
isinstance
check ... hmmmm.How I did it
How to verify it
Checklist