You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interfaces in structs in libraries compile to the wrong type. The scope of the issue may be larger than illustrated but the following is a simple example.
Environment
Compiler version: 0.8.23+
Steps to Reproduce
// SPDX-License-Identifier: MITpragma solidity^0.8.24;
interfaceI {
function f() externalpurereturns (uint256);
}
struct S {
I i;
}
libraryL {
function g(S memorys) externalpurereturns (uint256) {
return s.i.f();
}
}
contractC {
function h() externalpurereturns (uint256) {
S memory s;
return L.g(s);
}
}
This is the correct type in the library ABI. Libraries (unfortunately) don't use the same ABI as contracts - primarily since they support more types not expressible in the ABI like passing storage pointers to recursive structs. See https://docs.soliditylang.org/en/latest/contracts.html#library-selectors
Description
Interfaces in structs in libraries compile to the wrong type. The scope of the issue may be larger than illustrated but the following is a simple example.
Environment
Steps to Reproduce
ABI of L
The text was updated successfully, but these errors were encountered: