code: def AddrStrToScriptHash(address):
          
          data = b58decode(address)
          if len(data) != 25:
              raise ValueError('Not correct Address, wrong length.')
          if data[0] != settings.ADDRESS_VERSION:
              raise ValueError('Not correct Coin Version')
  
          checksum = Crypto.Default().Hash256(data[:21])[:4]
          if checksum != data[21:]:
              raise Exception('Address format error')
          return UInt160(data=data[1:21])
docs: Convert a public address to a script hash.
  
          Args:
              address (str): base 58 check encoded public address.
  
          Raises:
              ValueError: if the address length of address version is incorrect.
              Exception: if the address checksum fails.
  
          Returns:
              UInt160: