crytic / amarna

Amarna is a static-analyzer and linter for the Cairo programming language.
https://blog.trailofbits.com/2022/04/20/amarna-static-analysis-for-cairo-programs/
GNU Affero General Public License v3.0
149 stars 7 forks source link

False positives in @contract_interface #83

Closed milancermak closed 1 year ago

milancermak commented 1 year ago

Consider this interface declaration (a simplified version of this one):


@contract_interface
namespace IModuleController {
    func set_write_access(module_id_doing_writing: felt, module_id_being_written_to: felt) {
    }
}

Amarna produces 2 false positives - unused argument (for both arguments) and function never called.

Screenshot 2022-10-11 at 21 15 42

Of course, neither make sense in a @contract_interface declaration.

fcasal commented 1 year ago

Thanks for reporting this, namespace decorators weren't being propagated