pub(super) fn execute_internal_transfer_test() -> u32 {
    let raw_storage = InMemoryStorage::with_system_contracts();
    let mut storage_view = StorageView::new(raw_storage);
    let bootloader_balance_key = storage_key_for_eth_balance(&BOOTLOADER_ADDRESS);
    storage_view.set_value(bootloader_balance_key, u256_to_h256(U256([0, 0, 1, 0])));
    let bytecode = read_bootloader_test_code("transfer_test");
    let hash = BytecodeHash::for_bytecode(&bytecode).value();
    let bootloader = SystemContractCode {
        code: bytecode,
        hash,
    };

    let l1_batch = default_l1_batch();

    let bytecode = read_sys_contract_bytecode("", "DefaultAccount", ContractLanguage::Sol);
    let hash = BytecodeHash::for_bytecode(&bytecode).value();
    let default_aa = SystemContractCode {
        code: bytecode,
        hash,
    };

    let base_system_smart_contracts = BaseSystemContracts {
        bootloader,
        default_aa,
        evm_emulator: None,
    };

    let system_env = SystemEnv {
        zk_porter_available: ZKPORTER_IS_AVAILABLE,
        version: ProtocolVersionId::latest(),
        base_system_smart_contracts,
        bootloader_gas_limit: BATCH_COMPUTATIONAL_GAS_LIMIT,
        execution_mode: TxExecutionMode::VerifyExecute,
        default_validation_computational_gas_limit: BATCH_COMPUTATIONAL_GAS_LIMIT,
        chain_id: L2ChainId::default(),
    };

    let eth_token_sys_contract = load_sys_contract("L2BaseToken");
    let transfer_from_to = &eth_token_sys_contract
        .functions
        .get("transferFromTo")
        .unwrap()[0];
    let input = {
        let mut input = transfer_from_to
            .encode_input(&[
                Token::Address(BOOTLOADER_ADDRESS),
                Token::Address(Address::random()),
                Token::Uint(U256::from(1u32)),
            ])
            .expect("Failed to encode the calldata");

        // Padding input to be divisible by 32
        while input.len() % 32 != 0 {
            input.push(0);
        }
        input
    };
    let input: Vec<_> = input
        .chunks(32)
        .map(U256::from_big_endian)
        .enumerate()
        .collect();

    let tracer_result = Rc::new(RefCell::new(0));
    let tracer = SpecialBootloaderTracer {
        input,
        output: tracer_result.clone(),
    }
    .into_tracer_pointer();

    let mut vm: Vm<_, HistoryEnabled> = Vm::new(l1_batch, system_env, storage_view.to_rc_ptr());
    let result = vm.inspect(&mut tracer.into(), InspectExecutionMode::Bootloader);

    assert!(!result.result.is_failed(), "The internal call has reverted");
    tracer_result.take()
}
Executes the "internal transfer test" of the bootloader -- the test that
returns the amount of gas needed to perform and internal transfer, assuming no gas price
per pubdata, i.e. under assumption that the refund will not touch any new slots.
core/bin/system-constants-generator/src/utils.rs