gnosis/eth/utils.py
def compare_byte_code(code_1: bytes, code_2: bytes) -> bool:
    """
    Compare code, removing swarm metadata if necessary

    :param code_1:
    :param code_2:
    :return: True if same code, False otherwise
    """
    if code_1 == code_2:
        return True
    else:
        codes = []
        for code in (code_1, code_2):
            try:
                codes.append(remove_swarm_metadata(code))
            except ValueError:
                codes.append(code)

        return codes[0] == codes[1]

    Compare code, removing swarm metadata if necessary

    :param code_1:
    :param code_2:
    :return: True if same code, False otherwise
    
Compare code, removing swarm metadata if necessary
Compare code removing swarm metadata if necessary
def compare_byte_code(code_1: bytes, code_2: bytes) -> bool:
    if code_1 == code_2:
        return True
    else:
        codes = []
        for code in (code_1, code_2):
            try:
                codes.append(remove_swarm_metadata(code))
            except ValueError:
                codes.append(code)
        return codes[0] == codes[1]
def compare_byte_code ( code_1 : bytes , code_2 : bytes ) -> bool : if code_1 == code_2 : return True else : codes = [ ] for code in ( code_1 , code_2 ) : try : codes . append ( remove_swarm_metadata ( code ) ) except ValueError : codes . append ( code ) return codes [ 0 ] == codes [ 1 ]
Compare code, removing swarm metadata if necessary
Compare code removing swarm metadata if necessary
"""
    Compare code, removing swarm metadata if necessary

    :param code_1:
    :param code_2:
    :return: True if same code, False otherwise
    """
True if same code, False otherwise
True if same code False otherwise
code_1
bytes
None
code_2
bytes
None