From b08c1e29b8b9526b4ed66ae7e2ea0247dfb0b3f5 Mon Sep 17 00:00:00 2001 From: Jacob Turner Date: Fri, 10 Feb 2023 20:50:09 +0100 Subject: [PATCH] [fix]: Use pascal casing for type names in structs generated by abigen (#2130) * [fix]: Use pascal casing for type names in structs generated by abigen * [fix]: Revert the downversioning changes --- ethers-contract/ethers-contract-abigen/src/contract/structs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) => {