alloy-rs / alloy-rs/core

[Bug] Solidity type alias yields `unresolved custom type:`

Aperta
#744 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Rust
Stelle
966
Fork
274
Merge medio
1g 21h
PR unite (30g)
15

Descrizione

### 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](https://github.com/user-attachments/files/17109326/DelegationManager.json)

along with the following code

```rust
mod core {
alloy::sol!(
#[allow(missing_docs)]
#[sol(rpc)]
DelegationManager,
"../abis/DelegationManager.json"
);
}
```

```rust
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`.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.