Skip to content

[Bug]: Solidity: calls on a typed receiver (token.transfer(), IERC20(a).f()) get no calls edge #5059

Open

Description

@rohit-jsfreaky

Pre-flight checks

  • I have checked the Troubleshooting section in the README

What happened?

A Solidity call on a typed value gets no calls edge: token.transfer(to, v) where IERC20 token, a cast like IERC20(addr).transfer(..), or Ownable(x).owner(). This is the usual way contracts talk to each other. The compiler resolves 74 such calls in OpenZeppelin Contracts v5.4.0 and 725 in solmate (its tests call the contracts under test this way). graphify links 0.

Steps to reproduce

IERC20.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IERC20 { function transfer(address to, uint256 value) external returns (bool); }

Ownable.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract Ownable { address private _owner; function owner() public view returns (address) { return _owner; } }

Vault.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {Ownable} from "./Ownable.sol";
contract Vault {
    IERC20 public token;
    function pay(address to, uint256 v) external { token.transfer(to, v); }
    function payFrom(address t, address to) external { IERC20(t).transfer(to, 1); }
    function ownerOf(address x) external view returns (address) { return Ownable(x).owner(); }
}

Then graphify update .

Error output or graph output

No calls edges. Expected:

pay()     -> transfer()   (IERC20)
payFrom() -> transfer()   (IERC20)
ownerOf() -> owner()      (Ownable)

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