neojsonrpc/client.py
def get_storage(self, script_hash, key, **kwargs):
        """ Returns the value stored in the storage of a contract script hash for a given key.

        :param script_hash: contract script hash
        :param key: key to look up in the storage
        :type script_hash: str
        :type key: str
        :return: value associated with the storage key
        :rtype: bytearray

        """
        hexkey = binascii.hexlify(key.encode('utf-8')).decode('utf-8')
        hexresult = self._call(
            JSONRPCMethods.GET_STORAGE.value, params=[script_hash, hexkey, ], **kwargs)
        try:
            assert hexresult
            result = bytearray(binascii.unhexlify(hexresult.encode('utf-8')))
        except AssertionError:
            result = hexresult
        return result
def get_storage(self, script_hash, key, **kwargs):
        """ Returns the value stored in the storage of a contract script hash for a given key.

        :param script_hash: contract script hash
        :param key: key to look up in the storage
        :type script_hash: str
        :type key: str
        :return: value associated with the storage key
        :rtype: bytearray

        """
        hexkey = binascii.hexlify(key.encode('utf-8')).decode('utf-8')
        hexresult = self._call(
            JSONRPCMethods.GET_STORAGE.value, params=[script_hash, hexkey, ], **kwargs)
        try:
            assert hexresult
            result = bytearray(binascii.unhexlify(hexresult.encode('utf-8')))
        except AssertionError:
            result = hexresult
        return result
def get_storage ( self , script_hash , key , * * kwargs ) : hexkey = binascii . hexlify ( key . encode ( 'utf-8' ) ) . decode ( 'utf-8' ) hexresult = self . _call ( JSONRPCMethods . GET_STORAGE . value , params = [ script_hash , hexkey , ] , * * kwargs ) try : assert hexresult result = bytearray ( binascii . unhexlify ( hexresult . encode ( 'utf-8' ) ) ) except AssertionError : result = hexresult return result
Returns the value stored in the storage of a contract script hash for a given key.

        :param script_hash: contract script hash
        :param key: key to look up in the storage
        :type script_hash: str
        :type key: str
        :return: value associated with the storage key
        :rtype: bytearray
Returns the value stored in the storage of a contract script hash for a given key .