The corpus clean command validates the call sequences stored in your corpus and removes any sequences that are no
longer executable:
medusa corpus clean [flags]This is useful after contract refactors or ABI changes, when older corpus entries may no longer match the current project state.
medusa reads your project configuration, initializes the fuzzer, deploys the
target contracts, and then replays each saved sequence against a test chain. Any sequence that fails validation is
removed from disk.
fuzzing.corpusDirectorymust be configured in your project config.- If
--configis not provided,medusalooks formedusa.jsonin the current working directory.
# Clean the corpus configured in ./medusa.json
medusa corpus clean
# Clean the corpus for a specific project config
medusa corpus clean --config ./configs/medusa.jsonThe --config flag allows you to specify the path for your project configuration
file. If the --config flag is not used, medusa will look for a medusa.json file in the
current working directory.
# Set config file path
medusa corpus clean --config myConfig.json