fn encode_function_call(
    name: &str,
    types: &[ParamType],
    params: &[Token],
) -> Result<String, ethabi::Error> {
    let short_sig = ethabi::short_signature(name, types);

    // Check if the provided number of parameters matches the function's expected inputs
    if types.len() != params.len() {
        return Err(ethabi::Error::InvalidData);
    }

    // Encode the function call with the provided parameters
    let encoded_data = ethabi::encode(params);

    Ok(VmRevertReason::Unknown {
        function_selector: short_sig.to_vec(),
        data: [short_sig.to_vec(), encoded_data].concat(),
    }
    .to_string())
}
Encodes a Solidity function call with parameters into a Vec<u8>.
core/lib/multivm/src/versions/testonly/l2_blocks.rs