crytic / crytic/slither

[Feature Request]: Printer to report all external calls in a contract

Open
#2,074 2 comments 1 reaction 0 assignees View on GitHub
enhancement High Priority
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

### Describe the desired feature

It's valuable to have a list of all external calls for various reasons. A rough workaround for this is to run `slither . --print function-summary` and review the "External calls" column, but this currently has a bug (https://github.com/crytic/slither/issues/2073) and there's also a lot of noise in the output.

I'd like to see something like `slither . --print external-call-summary` that returns (1) a list of all external calls in a contract, and (2) the contract and method containing that external call.

For example:
```solidity
contract A {
IERC20 token;

function foo() internal {
token.balanceOf(address(this));
}
}

contract B is A {
function bar() public {
foo()
}
}
```

For this example the printer should report that `B.bar()` makes an external call of `token.balanceOf(address(this))`. If it can report the fact that the call is because of `A.foo()` that would be even better

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.