Skip to content

Conversation

@newgnart
Copy link

@newgnart newgnart commented May 5, 2025

Refactor following #13

  • permission-scanner as a python project that can be installed with pip install -e . or via git
  • move example run to example/run_scanner.py
  • BlockExplorer object can be initiate by specifying chain_name and it will find the right base_url based on src/permission_scanner/utils/block_explorer_config.json
block_explorer = BlockExplorer(api_key, chain_name)
  • Then ContractScanner can be initiated
contract_scanner = ContractScanner(
        rpc_url,
        block_explorer,
        export_dir=f"results/{project_name}",
)
  • For simplicity, I removed the parse.py and used all default values

@newgnart
Copy link
Author

newgnart commented May 9, 2025

@yvesbou
I think the PR is in a good shape. ContractScanner take chain name add address, scan then return results that is require for reports.
It can be fairly straight forward to scan local contracts.

@yvesbou
Copy link
Collaborator

yvesbou commented May 12, 2025

can you please add .DS_Store to the .gitignore file @gnart33

@yvesbou
Copy link
Collaborator

yvesbou commented May 13, 2025

and add also __pycache__/ to the gitignore @gnart33

@newgnart
Copy link
Author

I also add some of common python gitignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants