convert_solidity_bytes_to_string

Documentation for eth_defi.event_reader.conversion.convert_solidity_bytes_to_string function.

convert_solidity_bytes_to_string(byte_data, max_length, errors='ignore')

Load string from contract function call.

  • Decodes UTF-8, sanitise input and chops to max length

Returns

Empty string if the string cannot be decoded

Parameters
  • byte_data (bytes) –

  • max_length (int) –

Return type

str