pub fn apply_upgrade(
        &self,
        upgrade: ProtocolUpgrade,
        new_snark_wrapper_vk_hash: Option<H256>,
        new_fflonk_snark_wrapper_vk_hash: Option<H256>,
    ) -> ProtocolVersion {
        ProtocolVersion {
            version: upgrade.version,
            timestamp: upgrade.timestamp,
            l1_verifier_config: L1VerifierConfig {
                snark_wrapper_vk_hash: new_snark_wrapper_vk_hash
                    .unwrap_or(self.l1_verifier_config.snark_wrapper_vk_hash),
                fflonk_snark_wrapper_vk_hash: new_fflonk_snark_wrapper_vk_hash
                    .or(self.l1_verifier_config.fflonk_snark_wrapper_vk_hash),
            },
            base_system_contracts_hashes: BaseSystemContractsHashes {
                bootloader: upgrade
                    .bootloader_code_hash
                    .unwrap_or(self.base_system_contracts_hashes.bootloader),
                default_aa: upgrade
                    .default_account_code_hash
                    .unwrap_or(self.base_system_contracts_hashes.default_aa),
                evm_emulator: upgrade
                    .evm_emulator_code_hash
                    .or(self.base_system_contracts_hashes.evm_emulator),
            },
            tx: upgrade.tx,
        }
    }
Returns new protocol version parameters after applying provided upgrade.
core/lib/types/src/protocol_upgrade.rs