Open gpsanant opened 2 months ago
yeah this looks like an issue with type aliases
{
"name": "delegatedShares",
"type": "uint256[]",
"internalType": "DelegatedShares[]"
}
There's 2 issues here:
Thanks for the prompt response.
For now, I'm actually not using the functions with the custom types so I'll just redefine interfaces.
If I included the types inside of the library contract in which they're defined, would that address (2)?
Yes I think so, if you were to move the type DelegatedShares is uint256;
inside of one of the interfaces or libraries referenced by the ABI
Cool, confirming that
Made the contract get imported correctly.
Unfortunately, that makes the solidity syntax quite gross, so I'm temporarily going with
sed -i '' 's/DelegatedShares/uint256/g' out/DelegationManager.sol/DelegationManager.json
which seems to work? :)
@DaniPopes Any solutions for using the entrypoint.sol contract from the account abstraction lib found here?
Importing PackedUserOperation is an issue
I believe I have a similar issue here when using the sol
macro. I defined an interface which inherits and used types from its parent. When not using the sol
macro, yet my own expander which outputs to a file (I need a preprocessor per #602), I get a distinct error of:
proc-macro-error2 API cannot be used outside of
entry_point
invocation, perhaps you forgot to annotate your #[proc_macro] function with #[proc_macro_error]
I'm unsure exactly how that became my error yet wanted to log it here.
Component
sol! macro
What version of Alloy are you on?
v0.8.3
Operating System
macOS (Apple Silicon)
Describe the bug
The following abi
DelegationManager.json
along with the following code
If you prefer to build the contracts yourself:
See
out/DelegationManager.sol/DelegationManager.json
.I'm using a type alias
DelegatedShares
foruint256
.