Consensys / surya

A set of utilities for exploring Solidity contracts
Apache License 2.0
1.08k stars 119 forks source link

graph is setting "super" calls as external #196

Open vittominacori opened 4 months ago

vittominacori commented 4 months ago

I noticed that calls to super methods, are referred as external in graph as explained in Legend. Is external in legend referred to solidity "external" methods or it refers to methods that are not into the contract itself?

If method is called only by name, instead, it is represented as internal but link to a method that seems to be inside the contract instead of referring the inherited one.

To reproduce check that contract.

abstract contract Inherited {
    function _print() internal pure returns(string memory str) {
        str = 'Returned from Inherited';
    }
}
  1. User super to call _print.
contract Derived is Inherited {
    function print() public pure returns(string memory str) {
        str = super._print();
    }
}

Example

  1. Use the method name.
contract Derived is Inherited {
    function print() public pure returns(string memory str) {
        str = _print();
    }
}

Example2

vittominacori commented 4 months ago

@GNSPS have you had a chance to check that issue? If it is.