Skip to content

[Bug]: Solidity: calls attached with 'using A for T' get no calls edge #5061

Open

Description

@rohit-jsfreaky

Pre-flight checks

  • I have checked the Troubleshooting section in the README

What happened?

A call attached with using A for T gets no calls edge: x.toUint48() after using SafeCast for uint256, or _set.add(a) after using EnumerableSet for EnumerableSet.AddressSet. The call runs A.f(x, ...), but graphify sees only a member call on a value and drops it. The compiler resolves 228 of these in OpenZeppelin Contracts v5.4.0. graphify links 0.

Steps to reproduce

SafeCast.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
library SafeCast { function toUint48(uint256 value) internal pure returns (uint48) { return uint48(value); } }

EnumerableSet.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
library EnumerableSet {
    struct AddressSet { address[] values; }
    function add(AddressSet storage set, address value) internal returns (bool) { set.values.push(value); return true; }
}

Vault.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {SafeCast} from "./SafeCast.sol";
import {EnumerableSet} from "./EnumerableSet.sol";
contract Vault {
    using SafeCast for uint256;
    using EnumerableSet for EnumerableSet.AddressSet;
    EnumerableSet.AddressSet private _members;
    uint48 public updatedAt;
    function join(address who, uint256 at) external { _members.add(who); updatedAt = at.toUint48(); }
}

Then graphify update .

Error output or graph output

No calls edges. Expected:

join() -> add()        (EnumerableSet)
join() -> toUint48()   (SafeCast)

Graphify version

0.9.103

Operating System

Windows

Python Version

3.12

Installation Method

uv tool install (recommended)

Activity

  1. github-actions commented on Nov 6, 2026

    @github-actions

    Thanks for opening this issue, @rohit-jsfreaky. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions