diff --git a/ethers-contract/ethers-contract-abigen/src/contract/structs.rs b/ethers-contract/ethers-contract-abigen/src/contract/structs.rs index 4002e7b6..b2b3dbeb 100644 --- a/ethers-contract/ethers-contract-abigen/src/contract/structs.rs +++ b/ethers-contract/ethers-contract-abigen/src/contract/structs.rs @@ -596,7 +596,7 @@ fn struct_type_projections(name: &str) -> Vec { fn expand_struct_type(struct_ty: &StructFieldType) -> TokenStream { match struct_ty { StructFieldType::Type(ty) => { - let ty = util::ident(ty.name()); + let ty = util::ident(&ty.name().to_pascal_case()); quote! {#ty} } StructFieldType::Array(ty) => {