Skip to content

Commit

Permalink
Merge branch 'dev' into devtooligan-suggestions/arbitrary-from-strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
TilakMaddy authored Oct 19, 2024
2 parents 5719621 + f855512 commit a0d87df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 3 additions & 1 deletion aderyn_core/src/detect/low/unsafe_erc20_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ pub struct UnsafeERC20FunctionsDetector {
impl IssueDetector for UnsafeERC20FunctionsDetector {
fn detect(&mut self, context: &WorkspaceContext) -> Result<bool, Box<dyn Error>> {
for member_access in context.member_accesses() {
if member_access.member_name == "transferFrom"
if member_access.expression.as_ref().type_descriptions().is_some_and(|desc| {
desc.type_string.as_ref().is_some_and(|type_string| type_string.contains("ERC20"))
}) && member_access.member_name == "transferFrom"
|| member_access.member_name == "approve"
|| member_access.member_name == "transfer"
{
Expand Down
8 changes: 1 addition & 7 deletions reports/templegold-report.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a0d87df

Please sign in to comment.