Hi there,
I'm trying to define an interface using the sol_interface! macro, in which a function returns a custom type (struct).
Ideally, I would like to be able to use the sol! macro from alloy-sol-types to define my struct.
When I try this, for example:
use stylus_sdk::prelude::*;
use alloy_sol_types::sol;
sol! {
struct MyStruct {
uint256 myNum;
}
}
sol_interface! {
interface IMyInterface {
function doThing() returns (MyStruct);
}
}
I get the error:
proc macro panicked
message: not yet implemented: Solidity type SolChallenges is not yet implemented in sol_interface!
I dug around in the code a bit, and it seems that sol_interface! can't interpret any struct types.
The ability to do so (particularly in tandem with the sol! macro) would be amazing, as currently, I believe my only option is to return a tuple type and manually deserialize it.
Hi there, I'm trying to define an interface using the
sol_interface!
macro, in which a function returns a custom type (struct). Ideally, I would like to be able to use thesol!
macro fromalloy-sol-types
to define my struct. When I try this, for example:I get the error:
I dug around in the code a bit, and it seems that
sol_interface!
can't interpret anystruct
types.The ability to do so (particularly in tandem with the
sol!
macro) would be amazing, as currently, I believe my only option is to return a tuple type and manually deserialize it.