Skip to content

[Bug] Solidity type alias yields unresolved custom type: #744

Open
@gpsanant

Description

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

mod core {
    alloy::sol!(
        #[allow(missing_docs)]
        #[sol(rpc)]
        DelegationManager,
        "../abis/DelegationManager.json"
    );
}
error: unresolved custom type: DelegatedShares
  --> scenario-generator/src/bin/populate_src.rs:63:5
   |
63 | /     alloy::sol!(
64 | |         #[allow(missing_docs)]
65 | |         #[sol(rpc)]
66 | |         DelegationManager,
67 | |         "../abis/DelegationManager.json"
68 | |     );
   | |_____^
   |
   = note: this error originates in the macro `$crate::sol_types::sol` which comes from the expansion of the macro `alloy::sol` (in Nightly builds, run with -Z macro-backtrace for more info)

If you prefer to build the contracts yourself:

git clone git@github.com:Layr-Labs/eigenlayer-contracts.git
git checkout slashing-magnitues
forge b -C src/contracts

See out/DelegationManager.sol/DelegationManager.json.

I'm using a type alias DelegatedShares for uint256.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions