-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcli.py
More file actions
23 lines (18 loc) · 675 Bytes
/
cli.py
File metadata and controls
23 lines (18 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import typer
from fuzzer.runner import fuzz_contract
app = typer.Typer()
@app.command()
def fuzzthat(
contract: str = typer.Argument(..., help="Path to the Solidity contract file"),
method: str = typer.Argument(..., help="Method to fuzz"),
rpc_url: str = typer.Option(
"http://localhost:8545", help="EVM RPC endpoint (e.g., Anvil or Hardhat)"
),
times: int = typer.Option(10, help="Number of fuzz iterations"),
):
"""Fuzz a Solidity contract function using state-aware input generation."""
fuzz_contract(
contract_path=contract, method_name=method, rpc_url=rpc_url, iterations=times
)
if __name__ == "__main__":
app()