Closed DaniPopes closed 3 months ago
just tested locally and it seems that derives aren't applied to generated libraries in json abi input causing compilation issues
e.g. this would cause Lib::Struct doesn't implement Debug
because Lib::Struct
is used in some of the Contract
types
sol!(
#[derive(Debug)]
Contract,
r#"[
{
"type": "function",
"name": "f",
"inputs": [
{
"name": "s",
"type": "tuple",
"internalType": "struct Lib.Struct",
"components": [
{
"name": "a",
"type": "uint256",
"internalType": "uint256"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
}
]"#
);
And would also be a pretty big breaking change
This is broken now, marking as draft again:
sol! {
contract Vm {
struct Wallet {
uint stuff;
}
/// Gets the nonce of an account.
function getNonce(address account) external view returns (uint64 nonce);
/// Get the nonce of a `Wallet`.
function getNonce(Wallet calldata wallet) external returns (uint64 nonce);
}
}
Updated in 8fe0df0, we didn't apply namespaces when resolving overloads
Closes https://github.com/alloy-rs/core/issues/660 Closes https://github.com/alloy-rs/core/issues/599