Closed Troublor closed 2 years ago
In its current implementation, Sailfish can do inter-contract analysis only when the callee contract address is present within the source, and performs backward data dependence analysis to infer the contract address explained in the paper.
Also, while invoking Sailfish with --inter-contract-call
, one needs to provide a file that contains the mapping between the contract address and the file name (where the contract is defined) to analyze. An example file is in the code/test_cases
. Please note that the callee contract should be in the same directory as that of the caller contract.
I noticed that there are options
--inter-contract-call
and--contracts-mapping-file-path
to support inter-contract analysis. Could you please give some instructions about how to set the structure of--contract-dir
and the--contracts-mapping-file-path
? I am quite confused trying to read source code.As an example, if I want to analyze UniswapV2Router, which will invoke UniswapV2Pair. How can I analyze this case?