from neocore.IO.Mixins import SerializableMixin
import mmh3
from neocore.BigInteger import BigInteger


class StorageKey(SerializableMixin):
    ScriptHash = None
    Key = None

    def __init__(self, script_hash=None, key=None):
        """
        Create an instance.

        Args:
            script_hash (UInt160):
            key (bytes):
        """
        self.ScriptHash = script_hash
        self.Key = key

    def _murmur(self):
        """
        Get the murmur hash of the key.

        Returns:
            int: 32-bit
        """
        return mmh3.hash(bytes(self.Key))

    def GetHashCode(self):
        """
        Get the hash code of the key.

        Returns:
            int:
        """
        return abs(self.ScriptHash.GetHashCode() + self._murmur())

    def GetHashCodeBytes(self):
        """
        Get the hash code in bytes.

        Returns:
            bytes:
        """
        bigint = BigInteger(self.GetHashCode())
        return bigint.ToByteArray()

    def Deserialize(self, reader):
        """
        Deserialize full object.

        Args:
            reader (neocore.IO.BinaryReader):
        """
        self.ScriptHash = reader.ReadUInt160()
        self.Key = reader.ReadBytes()

    def Serialize(self, writer):
        """
        Serialize full object.

        Args:
            writer (neo.IO.BinaryWriter):
        """
        writer.WriteUInt160(self.ScriptHash)
        writer.WriteVarBytes(self.Key)

    def __eq__(self, other):
        if other is None:
            return False
        if other is self:
            return True

        return self.ScriptHash == other.ScriptHash and self.Key == other.Key

    def ToArray(self):
        """
        Convert object members to bytes and a concatenate them.

        Returns:
            bytes:
        """
        return bytes(self.ScriptHash.ToArray()) + bytes(self.Key)

@@ -114,33 +114,16 @@
 rageKey(
-SerializableMixin
 ):%0A    S
@@ -978,477 +978,8 @@
 ()%0A%0A
-    def Deserialize(self, reader):%0A        %22%22%22%0A        Deserialize full object.%0A%0A        Args:%0A            reader (neocore.IO.BinaryReader):%0A        %22%22%22%0A        self.ScriptHash = reader.ReadUInt160()%0A        self.Key = reader.ReadBytes()%0A%0A    def Serialize(self, writer):%0A        %22%22%22%0A        Serialize full object.%0A%0A        Args:%0A            writer (neo.IO.BinaryWriter):%0A        %22%22%22%0A        writer.WriteUInt160(self.ScriptHash)%0A        writer.WriteVarBytes(self.Key)%0A%0A
     

Remove SerialiazbleMixin from StorageKey as per PR feedback