pub fn matches(&self, other: &Self) -> Match {
        if self.bytecode_keccak256 == other.bytecode_keccak256 {
            return Match::Full;
        }

        // Check if metadata is different.
        // Note that here we do not handle "complex" cases, e.g. lack of metadata in one contract
        // and presence in another, or different kinds of metadata. This is OK: partial
        // match is needed mostly when you cannot reproduce the original metadata, but one always
        // can submit the contract with the same metadata kind.
        if self.bytecode_without_metadata_keccak256 == other.bytecode_without_metadata_keccak256 {
            return Match::Partial;
        }

        Match::None
    }
Checks the kind of match between identifier and other bytecode.
core/lib/types/src/contract_verification/contract_identifier.rs