You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: otterscan.rs
    path of file: ./repos/foundry/crates/anvil/tests/it
    
    the code of the file until where you have to start completion: //! tests for otterscan endpoints
use crate::{
    abi::MulticallContract,
    utils::{ethers_http_provider, ethers_ws_provider},
};
use alloy_primitives::U256 as rU256;
use alloy_rpc_types::{BlockNumberOrTag, BlockTransactions};
use alloy_signer::Signer as AlloySigner;
use anvil::{
    eth::otterscan::types::{
        OtsInternalOperation, OtsInternalOperationType, OtsTrace, OtsTraceType,
    },
    spawn, NodeConfig,
};
use ethers::{
    abi::Addr
    
async fn can_call_ots_has_code() {
    let (api, handle) = spawn(NodeConfig::test()).await;
    let provider = ethers_http_provider(&handle.http_endpoint());

    let wallet = handle.dev_wallets().next().unwrap().to_ethers();
    let sender = wallet.address();
    let client = Arc::new(SignerMiddleware::new(provider, wallet));
    api.mine_one().await;

    let mut deploy_tx = MulticallContract::deploy(Arc::clone(&client), ()).unwrap().deployer.tx;
    deploy_tx.set_nonce(0);

    let pending_contract_address = get_contract_address(sender, deploy_tx.nonce().unwrap());

    // no code in the address before deploying
    assert!(!api
        .ots_has_code(pending_contract_address.to_alloy(), BlockNumberOrTag::Number(1))
        .await
        .unwrap());

    let pending = client.send_transaction(deploy_tx, None).await.unwrap();
    let receipt = pending.await.unwrap().unwrap();

    let num = client.get_block_number().await.unwrap();
    assert_eq!(num, receipt.block_number.unwrap());

    // code is detected after deploying
    assert!(api
        .ots_has_code(pending_contract_address.to_alloy(), BlockNumberOrTag::Number(num.as_u64()))
        .await
        .unwrap());

    // code is not detected for the previous block
    assert!(!api
        .ots_has_code(
            pending_contract_address.to_alloy(),
            BlockNumberOrTag::Number(num.as_u64() - 1)
        )
        .await
        .unwrap());
}