argotorg / argotorg/solidity

Function in a library is not listed in the ABI output

Open
#15,964 2 comments 0 reactions 0 assignees View on GitHub
bug :bug:
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

Solc version: 0.8.29
Description:Why does the function **integer** have ABI information, but the function **stru** does not?

```solidity
library L {
struct S { uint x; }
function integer(uint t, bool b) public view returns (uint) {
if (b) {
return t;
} else {
revert("failure");
}
}
function stru(S storage t, bool b) public view returns (uint) {
if (b) {
return t.x;
} else {
revert("failure");
}
}
}
```
```
[
{
"inputs": [
{
"internalType": "uint256",
"name": "t",
"type": "uint256"
},
{
"internalType": "bool",
"name": "b",
"type": "bool"
}
],
"name": "integer",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
]
```

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is named. Reproduce the supplied library with solc 0.8.29, then trace ABI generation for public library functions with storage-struct parameters and compare it with integer; done means the missing stru ABI behavior is explained and corrected, with coverage for this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
blockchain, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.