let abi: ProgramABI = serde_json::from_str(&abi_file_contents)?;
let type_lookup = abi
.types
.into_iter()
.map(|a_type| (a_type.type_id, a_type))
.collect::<HashMap<_, _>>();
let a_fun = abi
.functions
.into_iter()
.find(|fun| fun.name == "array_of_structs")
.unwrap();
let inputs = a_fun
.inputs
.into_iter()
.map(|type_appl| ParamType::try_from_type_application(&type_appl, &type_lookup))
.collect::<Result<Vec<_>>>()?;
let selector = resolve_fn_selector(&a_fun.name, &inputs);
assert_eq!(selector, [0, 0, 0, 0, 39, 152, 108, 146,]);