def test_event_signature_to_log_topic(event_signature, expected): bytes_topic = event_signature_to_log_topic(event_signature) hex_topic = encode_hex(bytes_topic) assert hex_topic == expected
def test_event_abi_to_log_topic(event_abi, expected): bytes_topic = event_abi_to_log_topic(event_abi) hex_topic = encode_hex(bytes_topic) assert hex_topic == expected
def test_fn_abi_to_4byte_selector(fn_abi, expected): bytes_selector = function_abi_to_4byte_selector(fn_abi) hex_selector = encode_hex(bytes_selector) assert hex_selector == expected
def test_fn_signature_to_4byte_selector(signature, expected): bytes_selector = function_signature_to_4byte_selector(signature) hex_selector = encode_hex(bytes_selector) assert hex_selector == expected
def hex(self): return hexidecimal.encode_hex(self)