Previously, the chosen buildObj (from a json file) might have had way too much extraneous information, as we were choosing the first one we saw, which could very easily have been a very large contract that imported the one we desire to analyze 3 imports in. This change ensures that the correct buildObj is analyzed; the one directly from the compilation of the file in which the contract was declared in.
The other change this PR makes is fixing the mismatch between the sourceList and the keys of sources. They should be the same, but we had previously used the basepath (contract.sol) for the keys of sources, and the full path (/home/user/truffleproject/contracts/contract.sol) for the sourceList. This switches everything over to the full path. This also fixes potential issues with different subdirectories that contain files with the same name.
This changes usage from
to either
or
Previously, the chosen buildObj (from a json file) might have had way too much extraneous information, as we were choosing the first one we saw, which could very easily have been a very large contract that imported the one we desire to analyze 3 imports in. This change ensures that the correct buildObj is analyzed; the one directly from the compilation of the file in which the contract was declared in.
The other change this PR makes is fixing the mismatch between the sourceList and the keys of
sources
. They should be the same, but we had previously used the basepath (contract.sol
) for the keys ofsources
, and the full path (/home/user/truffleproject/contracts/contract.sol
) for the sourceList. This switches everything over to the full path. This also fixes potential issues with different subdirectories that contain files with the same name.Things that still need to happen:
UpdateREADME.md
and other documentationImprove commenting and inline documentationRewrite & fix test cases