From 5ac522835d8d62da6e8ddf1bef8d9d951f16d0bd Mon Sep 17 00:00:00 2001 From: Rory Neithinger Date: Tue, 30 Jul 2024 18:11:25 -0700 Subject: [PATCH] Allow struct references within sol_interface macro fixes #74 --- stylus-proc/src/types.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stylus-proc/src/types.rs b/stylus-proc/src/types.rs index 0907483..9e79400 100644 --- a/stylus-proc/src/types.rs +++ b/stylus-proc/src/types.rs @@ -135,6 +135,10 @@ pub fn solidity_type_info(ty: &Type) -> (Cow<'static, str>, Cow<'static, str>) { (path.into(), abi.into()) } } + Type::Custom(path) => { + let path: Cow<'static, str> = path.to_string().into(); + (path.clone(), path) + } _ => todo!("Solidity type {ty} is not yet implemented in sol_interface!"), } }