Showing preview only (3,468K chars total). Download the full file or copy to clipboard to get everything.
Repository: ConsenSys/mythril-classic
Branch: develop
Commit: 125914a6eae8
Files: 989
Total size: 3.1 MB
Directory structure:
gitextract_g8fg3qrk/
├── .circleci/
│ └── config.yml
├── .dockerignore
├── .drone.yml
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── analysis-module.md
│ │ ├── bug-report.md
│ │ └── feature-request.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── container.yml
│ ├── pre-commit-hooks-test.yml
│ └── pre-commit.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .pre-commit-hooks.yaml
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── MANIFEST.in
├── README.md
├── all_tests.sh
├── coverage_report.sh
├── docker/
│ ├── docker-entrypoint.sh
│ └── sync-svm-solc-versions-with-solcx.sh
├── docker-bake.hcl
├── docker_build_and_deploy.sh
├── docs/
│ ├── Makefile
│ ├── make.bat
│ └── source/
│ ├── about.rst
│ ├── analysis-modules.rst
│ ├── conf.py
│ ├── create-module.rst
│ ├── index.rst
│ ├── installation.rst
│ ├── module-list.rst
│ ├── modules.rst
│ ├── mythril.analysis.module.modules.rst
│ ├── mythril.analysis.module.rst
│ ├── mythril.analysis.rst
│ ├── mythril.concolic.rst
│ ├── mythril.disassembler.rst
│ ├── mythril.ethereum.interface.rpc.rst
│ ├── mythril.ethereum.interface.rst
│ ├── mythril.ethereum.rst
│ ├── mythril.interfaces.rst
│ ├── mythril.laser.ethereum.function_managers.rst
│ ├── mythril.laser.ethereum.rst
│ ├── mythril.laser.ethereum.state.rst
│ ├── mythril.laser.ethereum.strategy.extensions.rst
│ ├── mythril.laser.ethereum.strategy.rst
│ ├── mythril.laser.ethereum.transaction.rst
│ ├── mythril.laser.plugin.plugins.coverage.rst
│ ├── mythril.laser.plugin.plugins.rst
│ ├── mythril.laser.plugin.plugins.summary_backup.rst
│ ├── mythril.laser.plugin.rst
│ ├── mythril.laser.rst
│ ├── mythril.laser.smt.rst
│ ├── mythril.laser.smt.solver.rst
│ ├── mythril.mythril.rst
│ ├── mythril.plugin.rst
│ ├── mythril.rst
│ ├── mythril.solidity.rst
│ ├── mythril.support.rst
│ ├── security-analysis.rst
│ └── tutorial.rst
├── mypy-stubs/
│ └── z3/
│ ├── __init__.pyi
│ ├── z3core.pyi
│ └── z3types.pyi
├── myth
├── mythril/
│ ├── __init__.py
│ ├── __main__.py
│ ├── __version__.py
│ ├── analysis/
│ │ ├── __init__.py
│ │ ├── analysis_args.py
│ │ ├── call_helpers.py
│ │ ├── callgraph.py
│ │ ├── issue_annotation.py
│ │ ├── module/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── loader.py
│ │ │ ├── module_helpers.py
│ │ │ ├── modules/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── arbitrary_jump.py
│ │ │ │ ├── arbitrary_write.py
│ │ │ │ ├── delegatecall.py
│ │ │ │ ├── dependence_on_origin.py
│ │ │ │ ├── dependence_on_predictable_vars.py
│ │ │ │ ├── ether_thief.py
│ │ │ │ ├── exceptions.py
│ │ │ │ ├── external_calls.py
│ │ │ │ ├── integer.py
│ │ │ │ ├── multiple_sends.py
│ │ │ │ ├── requirements_violation.py
│ │ │ │ ├── state_change_external_calls.py
│ │ │ │ ├── suicide.py
│ │ │ │ ├── transaction_order_dependence.py
│ │ │ │ ├── unchecked_retval.py
│ │ │ │ ├── unexpected_ether.py
│ │ │ │ └── user_assertions.py
│ │ │ └── util.py
│ │ ├── ops.py
│ │ ├── potential_issues.py
│ │ ├── report.py
│ │ ├── security.py
│ │ ├── solver.py
│ │ ├── swc_data.py
│ │ ├── symbolic.py
│ │ ├── templates/
│ │ │ ├── callgraph.html
│ │ │ ├── report_as_markdown.jinja2
│ │ │ └── report_as_text.jinja2
│ │ └── traceexplore.py
│ ├── concolic/
│ │ ├── __init__.py
│ │ ├── concolic_execution.py
│ │ ├── concrete_data.py
│ │ └── find_trace.py
│ ├── config.ini
│ ├── disassembler/
│ │ ├── __init__.py
│ │ ├── asm.py
│ │ └── disassembly.py
│ ├── ethereum/
│ │ ├── __init__.py
│ │ ├── evmcontract.py
│ │ ├── interface/
│ │ │ ├── __init__.py
│ │ │ └── rpc/
│ │ │ ├── __init__.py
│ │ │ ├── base_client.py
│ │ │ ├── client.py
│ │ │ ├── constants.py
│ │ │ ├── exceptions.py
│ │ │ └── utils.py
│ │ └── util.py
│ ├── exceptions.py
│ ├── interfaces/
│ │ ├── __init__.py
│ │ ├── cli.py
│ │ └── epic.py
│ ├── laser/
│ │ ├── __init__.py
│ │ ├── ethereum/
│ │ │ ├── __init__.py
│ │ │ ├── call.py
│ │ │ ├── cfg.py
│ │ │ ├── cheat_code.py
│ │ │ ├── evm_exceptions.py
│ │ │ ├── function_managers/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── exponent_function_manager.py
│ │ │ │ └── keccak_function_manager.py
│ │ │ ├── instruction_data.py
│ │ │ ├── instructions.py
│ │ │ ├── natives.py
│ │ │ ├── state/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── account.py
│ │ │ │ ├── annotation.py
│ │ │ │ ├── calldata.py
│ │ │ │ ├── constraints.py
│ │ │ │ ├── environment.py
│ │ │ │ ├── global_state.py
│ │ │ │ ├── machine_state.py
│ │ │ │ ├── memory.py
│ │ │ │ ├── return_data.py
│ │ │ │ ├── transient_storage.py
│ │ │ │ └── world_state.py
│ │ │ ├── strategy/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── basic.py
│ │ │ │ ├── beam.py
│ │ │ │ ├── concolic.py
│ │ │ │ ├── constraint_strategy.py
│ │ │ │ └── extensions/
│ │ │ │ ├── __init__.py
│ │ │ │ └── bounded_loops.py
│ │ │ ├── svm.py
│ │ │ ├── time_handler.py
│ │ │ ├── transaction/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── concolic.py
│ │ │ │ ├── symbolic.py
│ │ │ │ └── transaction_models.py
│ │ │ ├── tx_prioritiser/
│ │ │ │ ├── __init__.py
│ │ │ │ └── rf_prioritiser.py
│ │ │ └── util.py
│ │ ├── execution_info.py
│ │ ├── plugin/
│ │ │ ├── __init__.py
│ │ │ ├── builder.py
│ │ │ ├── interface.py
│ │ │ ├── loader.py
│ │ │ ├── plugins/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── benchmark.py
│ │ │ │ ├── call_depth_limiter.py
│ │ │ │ ├── coverage/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── coverage_plugin.py
│ │ │ │ │ └── coverage_strategy.py
│ │ │ │ ├── coverage_metrics/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── constants.py
│ │ │ │ │ ├── coverage_data.py
│ │ │ │ │ └── metrics_plugin.py
│ │ │ │ ├── dependency_pruner.py
│ │ │ │ ├── instruction_profiler.py
│ │ │ │ ├── mutation_pruner.py
│ │ │ │ ├── plugin_annotations.py
│ │ │ │ ├── state_merge/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── check_mergeability.py
│ │ │ │ │ ├── merge_states.py
│ │ │ │ │ └── state_merge_plugin.py
│ │ │ │ ├── summary/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── annotations.py
│ │ │ │ │ ├── core.py
│ │ │ │ │ └── summary.py
│ │ │ │ ├── summary_backup/
│ │ │ │ │ └── __init__.py
│ │ │ │ └── trace.py
│ │ │ └── signals.py
│ │ └── smt/
│ │ ├── __init__.py
│ │ ├── array.py
│ │ ├── bitvec.py
│ │ ├── bitvec_helper.py
│ │ ├── bool.py
│ │ ├── expression.py
│ │ ├── function.py
│ │ ├── model.py
│ │ └── solver/
│ │ ├── __init__.py
│ │ ├── independence_solver.py
│ │ ├── solver.py
│ │ └── solver_statistics.py
│ ├── mythril/
│ │ ├── __init__.py
│ │ ├── mythril_analyzer.py
│ │ ├── mythril_config.py
│ │ └── mythril_disassembler.py
│ ├── plugin/
│ │ ├── __init__.py
│ │ ├── discovery.py
│ │ ├── interface.py
│ │ └── loader.py
│ ├── solidity/
│ │ ├── __init__.py
│ │ ├── features.py
│ │ └── soliditycontract.py
│ └── support/
│ ├── __init__.py
│ ├── loader.py
│ ├── lock.py
│ ├── model.py
│ ├── opcodes.py
│ ├── signatures.py
│ ├── source_support.py
│ ├── start_time.py
│ ├── support_args.py
│ └── support_utils.py
├── pyproject.toml
├── requirements.txt
├── setup.py
├── solidity_examples/
│ ├── BECToken.sol
│ ├── WalletLibrary.sol
│ ├── calls.sol
│ ├── etherstore.sol
│ ├── exceptions.sol
│ ├── hashforether.sol
│ ├── killbilly.sol
│ ├── origin.sol
│ ├── returnvalue.sol
│ ├── rubixi.sol
│ ├── suicide.sol
│ ├── timelock.sol
│ ├── token.sol
│ └── weak_random.sol
├── static/
│ ├── Ownable.html
│ ├── assertions.html
│ ├── mythril.html
│ └── sample_report.md
├── tests/
│ ├── __init__.py
│ ├── analysis/
│ │ ├── abi_decode_test.py
│ │ └── arbitrary_jump_test.py
│ ├── cli_tests/
│ │ └── cli_opts_test.py
│ ├── cmd_line_test.py
│ ├── concolic/
│ │ └── concolic_tests.py
│ ├── disassembler/
│ │ ├── __init__.py
│ │ ├── asm_test.py
│ │ └── disassembly_test.py
│ ├── disassembler_test.py
│ ├── evmcontract_test.py
│ ├── features_test.py
│ ├── graph_test.py
│ ├── instructions/
│ │ ├── __init__.py
│ │ ├── basefee_test.py
│ │ ├── codecopy_test.py
│ │ ├── create2_test.py
│ │ ├── create_test.py
│ │ ├── extcodecopy_test.py
│ │ ├── extcodehash_test.py
│ │ ├── push_test.py
│ │ ├── sar_test.py
│ │ ├── shl_test.py
│ │ ├── shr_test.py
│ │ └── static_call_test.py
│ ├── integration_tests/
│ │ ├── analysis_tests.py
│ │ ├── coverage_metrics_test.py
│ │ ├── old_version_test.py
│ │ ├── safe_functions_test.py
│ │ ├── solc_settings_test.py
│ │ ├── src_mapping_test.py
│ │ ├── state_merge_tests.py
│ │ ├── summary_test.py
│ │ ├── transient_storage_test.py
│ │ ├── utils.py
│ │ └── version_test.py
│ ├── laser/
│ │ ├── Precompiles/
│ │ │ ├── blake2_test.py
│ │ │ ├── ec_add_test.py
│ │ │ ├── ecrecover_test.py
│ │ │ ├── elliptic_curves_test.py
│ │ │ ├── elliptic_mul_test.py
│ │ │ ├── identity_test.py
│ │ │ ├── mod_exp_test.py
│ │ │ ├── ripemd_test.py
│ │ │ └── sha256_test.py
│ │ ├── __init__.py
│ │ ├── evm_testsuite/
│ │ │ ├── VMTests/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── vmArithmeticTest/
│ │ │ │ │ ├── add0.json
│ │ │ │ │ ├── add1.json
│ │ │ │ │ ├── add2.json
│ │ │ │ │ ├── add3.json
│ │ │ │ │ ├── add4.json
│ │ │ │ │ ├── addmod0.json
│ │ │ │ │ ├── addmod1.json
│ │ │ │ │ ├── addmod1_overflow2.json
│ │ │ │ │ ├── addmod1_overflow3.json
│ │ │ │ │ ├── addmod1_overflow4.json
│ │ │ │ │ ├── addmod1_overflowDiff.json
│ │ │ │ │ ├── addmod2.json
│ │ │ │ │ ├── addmod2_0.json
│ │ │ │ │ ├── addmod2_1.json
│ │ │ │ │ ├── addmod3.json
│ │ │ │ │ ├── addmod3_0.json
│ │ │ │ │ ├── addmodBigIntCast.json
│ │ │ │ │ ├── addmodDivByZero.json
│ │ │ │ │ ├── addmodDivByZero1.json
│ │ │ │ │ ├── addmodDivByZero2.json
│ │ │ │ │ ├── addmodDivByZero3.json
│ │ │ │ │ ├── arith1.json
│ │ │ │ │ ├── div1.json
│ │ │ │ │ ├── divBoostBug.json
│ │ │ │ │ ├── divByNonZero0.json
│ │ │ │ │ ├── divByNonZero1.json
│ │ │ │ │ ├── divByNonZero2.json
│ │ │ │ │ ├── divByNonZero3.json
│ │ │ │ │ ├── divByZero.json
│ │ │ │ │ ├── divByZero_2.json
│ │ │ │ │ ├── exp0.json
│ │ │ │ │ ├── exp1.json
│ │ │ │ │ ├── exp2.json
│ │ │ │ │ ├── exp3.json
│ │ │ │ │ ├── exp4.json
│ │ │ │ │ ├── exp5.json
│ │ │ │ │ ├── exp6.json
│ │ │ │ │ ├── exp7.json
│ │ │ │ │ ├── exp8.json
│ │ │ │ │ ├── expPowerOf256Of256_0.json
│ │ │ │ │ ├── expPowerOf256Of256_1.json
│ │ │ │ │ ├── expPowerOf256Of256_10.json
│ │ │ │ │ ├── expPowerOf256Of256_11.json
│ │ │ │ │ ├── expPowerOf256Of256_12.json
│ │ │ │ │ ├── expPowerOf256Of256_13.json
│ │ │ │ │ ├── expPowerOf256Of256_14.json
│ │ │ │ │ ├── expPowerOf256Of256_15.json
│ │ │ │ │ ├── expPowerOf256Of256_16.json
│ │ │ │ │ ├── expPowerOf256Of256_17.json
│ │ │ │ │ ├── expPowerOf256Of256_18.json
│ │ │ │ │ ├── expPowerOf256Of256_19.json
│ │ │ │ │ ├── expPowerOf256Of256_2.json
│ │ │ │ │ ├── expPowerOf256Of256_20.json
│ │ │ │ │ ├── expPowerOf256Of256_21.json
│ │ │ │ │ ├── expPowerOf256Of256_22.json
│ │ │ │ │ ├── expPowerOf256Of256_23.json
│ │ │ │ │ ├── expPowerOf256Of256_24.json
│ │ │ │ │ ├── expPowerOf256Of256_25.json
│ │ │ │ │ ├── expPowerOf256Of256_26.json
│ │ │ │ │ ├── expPowerOf256Of256_27.json
│ │ │ │ │ ├── expPowerOf256Of256_28.json
│ │ │ │ │ ├── expPowerOf256Of256_29.json
│ │ │ │ │ ├── expPowerOf256Of256_3.json
│ │ │ │ │ ├── expPowerOf256Of256_30.json
│ │ │ │ │ ├── expPowerOf256Of256_31.json
│ │ │ │ │ ├── expPowerOf256Of256_32.json
│ │ │ │ │ ├── expPowerOf256Of256_33.json
│ │ │ │ │ ├── expPowerOf256Of256_4.json
│ │ │ │ │ ├── expPowerOf256Of256_5.json
│ │ │ │ │ ├── expPowerOf256Of256_6.json
│ │ │ │ │ ├── expPowerOf256Of256_7.json
│ │ │ │ │ ├── expPowerOf256Of256_8.json
│ │ │ │ │ ├── expPowerOf256Of256_9.json
│ │ │ │ │ ├── expPowerOf256_1.json
│ │ │ │ │ ├── expPowerOf256_10.json
│ │ │ │ │ ├── expPowerOf256_11.json
│ │ │ │ │ ├── expPowerOf256_12.json
│ │ │ │ │ ├── expPowerOf256_13.json
│ │ │ │ │ ├── expPowerOf256_14.json
│ │ │ │ │ ├── expPowerOf256_15.json
│ │ │ │ │ ├── expPowerOf256_16.json
│ │ │ │ │ ├── expPowerOf256_17.json
│ │ │ │ │ ├── expPowerOf256_18.json
│ │ │ │ │ ├── expPowerOf256_19.json
│ │ │ │ │ ├── expPowerOf256_2.json
│ │ │ │ │ ├── expPowerOf256_20.json
│ │ │ │ │ ├── expPowerOf256_21.json
│ │ │ │ │ ├── expPowerOf256_22.json
│ │ │ │ │ ├── expPowerOf256_23.json
│ │ │ │ │ ├── expPowerOf256_24.json
│ │ │ │ │ ├── expPowerOf256_25.json
│ │ │ │ │ ├── expPowerOf256_26.json
│ │ │ │ │ ├── expPowerOf256_27.json
│ │ │ │ │ ├── expPowerOf256_28.json
│ │ │ │ │ ├── expPowerOf256_29.json
│ │ │ │ │ ├── expPowerOf256_3.json
│ │ │ │ │ ├── expPowerOf256_30.json
│ │ │ │ │ ├── expPowerOf256_31.json
│ │ │ │ │ ├── expPowerOf256_32.json
│ │ │ │ │ ├── expPowerOf256_33.json
│ │ │ │ │ ├── expPowerOf256_4.json
│ │ │ │ │ ├── expPowerOf256_5.json
│ │ │ │ │ ├── expPowerOf256_6.json
│ │ │ │ │ ├── expPowerOf256_7.json
│ │ │ │ │ ├── expPowerOf256_8.json
│ │ │ │ │ ├── expPowerOf256_9.json
│ │ │ │ │ ├── expPowerOf2_128.json
│ │ │ │ │ ├── expPowerOf2_16.json
│ │ │ │ │ ├── expPowerOf2_2.json
│ │ │ │ │ ├── expPowerOf2_256.json
│ │ │ │ │ ├── expPowerOf2_32.json
│ │ │ │ │ ├── expPowerOf2_4.json
│ │ │ │ │ ├── expPowerOf2_64.json
│ │ │ │ │ ├── expPowerOf2_8.json
│ │ │ │ │ ├── expXY.json
│ │ │ │ │ ├── expXY_success.json
│ │ │ │ │ ├── fibbonacci_unrolled.json
│ │ │ │ │ ├── mod0.json
│ │ │ │ │ ├── mod1.json
│ │ │ │ │ ├── mod2.json
│ │ │ │ │ ├── mod3.json
│ │ │ │ │ ├── mod4.json
│ │ │ │ │ ├── modByZero.json
│ │ │ │ │ ├── mul0.json
│ │ │ │ │ ├── mul1.json
│ │ │ │ │ ├── mul2.json
│ │ │ │ │ ├── mul3.json
│ │ │ │ │ ├── mul4.json
│ │ │ │ │ ├── mul5.json
│ │ │ │ │ ├── mul6.json
│ │ │ │ │ ├── mul7.json
│ │ │ │ │ ├── mulmod0.json
│ │ │ │ │ ├── mulmod1.json
│ │ │ │ │ ├── mulmod1_overflow.json
│ │ │ │ │ ├── mulmod1_overflow2.json
│ │ │ │ │ ├── mulmod1_overflow3.json
│ │ │ │ │ ├── mulmod1_overflow4.json
│ │ │ │ │ ├── mulmod2.json
│ │ │ │ │ ├── mulmod2_0.json
│ │ │ │ │ ├── mulmod2_1.json
│ │ │ │ │ ├── mulmod3.json
│ │ │ │ │ ├── mulmod3_0.json
│ │ │ │ │ ├── mulmod4.json
│ │ │ │ │ ├── mulmoddivByZero.json
│ │ │ │ │ ├── mulmoddivByZero1.json
│ │ │ │ │ ├── mulmoddivByZero2.json
│ │ │ │ │ ├── mulmoddivByZero3.json
│ │ │ │ │ ├── not1.json
│ │ │ │ │ ├── sdiv0.json
│ │ │ │ │ ├── sdiv1.json
│ │ │ │ │ ├── sdiv2.json
│ │ │ │ │ ├── sdiv3.json
│ │ │ │ │ ├── sdiv4.json
│ │ │ │ │ ├── sdiv5.json
│ │ │ │ │ ├── sdiv6.json
│ │ │ │ │ ├── sdiv7.json
│ │ │ │ │ ├── sdiv8.json
│ │ │ │ │ ├── sdiv9.json
│ │ │ │ │ ├── sdivByZero0.json
│ │ │ │ │ ├── sdivByZero1.json
│ │ │ │ │ ├── sdivByZero2.json
│ │ │ │ │ ├── sdiv_dejavu.json
│ │ │ │ │ ├── sdiv_i256min.json
│ │ │ │ │ ├── sdiv_i256min2.json
│ │ │ │ │ ├── sdiv_i256min3.json
│ │ │ │ │ ├── signextendInvalidByteNumber.json
│ │ │ │ │ ├── signextend_00.json
│ │ │ │ │ ├── signextend_0_BigByte.json
│ │ │ │ │ ├── signextend_AlmostBiggestByte.json
│ │ │ │ │ ├── signextend_BigByteBigByte.json
│ │ │ │ │ ├── signextend_BigBytePlus1_2.json
│ │ │ │ │ ├── signextend_BigByte_0.json
│ │ │ │ │ ├── signextend_BitIsNotSet.json
│ │ │ │ │ ├── signextend_BitIsNotSetInHigherByte.json
│ │ │ │ │ ├── signextend_BitIsSetInHigherByte.json
│ │ │ │ │ ├── signextend_Overflow_dj42.json
│ │ │ │ │ ├── signextend_bigBytePlus1.json
│ │ │ │ │ ├── signextend_bitIsSet.json
│ │ │ │ │ ├── smod0.json
│ │ │ │ │ ├── smod1.json
│ │ │ │ │ ├── smod2.json
│ │ │ │ │ ├── smod3.json
│ │ │ │ │ ├── smod4.json
│ │ │ │ │ ├── smod5.json
│ │ │ │ │ ├── smod6.json
│ │ │ │ │ ├── smod7.json
│ │ │ │ │ ├── smod8_byZero.json
│ │ │ │ │ ├── smod_i256min1.json
│ │ │ │ │ ├── smod_i256min2.json
│ │ │ │ │ ├── stop.json
│ │ │ │ │ ├── sub0.json
│ │ │ │ │ ├── sub1.json
│ │ │ │ │ ├── sub2.json
│ │ │ │ │ ├── sub3.json
│ │ │ │ │ └── sub4.json
│ │ │ │ ├── vmBitwiseLogicOperation/
│ │ │ │ │ ├── and0.json
│ │ │ │ │ ├── and1.json
│ │ │ │ │ ├── and2.json
│ │ │ │ │ ├── and3.json
│ │ │ │ │ ├── and4.json
│ │ │ │ │ ├── and5.json
│ │ │ │ │ ├── byte0.json
│ │ │ │ │ ├── byte1.json
│ │ │ │ │ ├── byte10.json
│ │ │ │ │ ├── byte11.json
│ │ │ │ │ ├── byte2.json
│ │ │ │ │ ├── byte3.json
│ │ │ │ │ ├── byte4.json
│ │ │ │ │ ├── byte5.json
│ │ │ │ │ ├── byte6.json
│ │ │ │ │ ├── byte7.json
│ │ │ │ │ ├── byte8.json
│ │ │ │ │ ├── byte9.json
│ │ │ │ │ ├── eq0.json
│ │ │ │ │ ├── eq1.json
│ │ │ │ │ ├── eq2.json
│ │ │ │ │ ├── gt0.json
│ │ │ │ │ ├── gt1.json
│ │ │ │ │ ├── gt2.json
│ │ │ │ │ ├── gt3.json
│ │ │ │ │ ├── iszeo2.json
│ │ │ │ │ ├── iszero0.json
│ │ │ │ │ ├── iszero1.json
│ │ │ │ │ ├── lt0.json
│ │ │ │ │ ├── lt1.json
│ │ │ │ │ ├── lt2.json
│ │ │ │ │ ├── lt3.json
│ │ │ │ │ ├── not0.json
│ │ │ │ │ ├── not1.json
│ │ │ │ │ ├── not2.json
│ │ │ │ │ ├── not3.json
│ │ │ │ │ ├── not4.json
│ │ │ │ │ ├── not5.json
│ │ │ │ │ ├── or0.json
│ │ │ │ │ ├── or1.json
│ │ │ │ │ ├── or2.json
│ │ │ │ │ ├── or3.json
│ │ │ │ │ ├── or4.json
│ │ │ │ │ ├── or5.json
│ │ │ │ │ ├── sgt0.json
│ │ │ │ │ ├── sgt1.json
│ │ │ │ │ ├── sgt2.json
│ │ │ │ │ ├── sgt3.json
│ │ │ │ │ ├── sgt4.json
│ │ │ │ │ ├── slt0.json
│ │ │ │ │ ├── slt1.json
│ │ │ │ │ ├── slt2.json
│ │ │ │ │ ├── slt3.json
│ │ │ │ │ ├── slt4.json
│ │ │ │ │ ├── xor0.json
│ │ │ │ │ ├── xor1.json
│ │ │ │ │ ├── xor2.json
│ │ │ │ │ ├── xor3.json
│ │ │ │ │ ├── xor4.json
│ │ │ │ │ └── xor5.json
│ │ │ │ ├── vmEnvironmentalInfo/
│ │ │ │ │ ├── address0.json
│ │ │ │ │ ├── address1.json
│ │ │ │ │ ├── calldatacopy0.json
│ │ │ │ │ ├── calldatacopy0_return.json
│ │ │ │ │ ├── calldatacopy1.json
│ │ │ │ │ ├── calldatacopy1_return.json
│ │ │ │ │ ├── calldatacopy2.json
│ │ │ │ │ ├── calldatacopy2_return.json
│ │ │ │ │ ├── calldatacopyUnderFlowerror.json
│ │ │ │ │ ├── calldatacopyZeroMemExpansion.json
│ │ │ │ │ ├── calldatacopyZeroMemExpansion_return.json
│ │ │ │ │ ├── calldatacopy_DataIndexTooHigh.json
│ │ │ │ │ ├── calldatacopy_DataIndexTooHigh2.json
│ │ │ │ │ ├── calldatacopy_DataIndexTooHigh2_return.json
│ │ │ │ │ ├── calldatacopy_DataIndexTooHigh_return.json
│ │ │ │ │ ├── calldatacopy_sec.json
│ │ │ │ │ ├── calldataload0.json
│ │ │ │ │ ├── calldataload1.json
│ │ │ │ │ ├── calldataload2.json
│ │ │ │ │ ├── calldataloadSizeTooHigh.json
│ │ │ │ │ ├── calldataloadSizeTooHighPartial.json
│ │ │ │ │ ├── calldataload_BigOffset.json
│ │ │ │ │ ├── calldatasize0.json
│ │ │ │ │ ├── calldatasize1.json
│ │ │ │ │ ├── calldatasize2.json
│ │ │ │ │ ├── caller.json
│ │ │ │ │ ├── callvalue.json
│ │ │ │ │ ├── codecopy0.json
│ │ │ │ │ ├── codecopyZeroMemExpansion.json
│ │ │ │ │ ├── codecopy_DataIndexTooHigh.json
│ │ │ │ │ ├── codesize.json
│ │ │ │ │ ├── gasprice.json
│ │ │ │ │ └── origin.json
│ │ │ │ ├── vmIOandFlowOperations/
│ │ │ │ │ ├── BlockNumberDynamicJump0_AfterJumpdest.json
│ │ │ │ │ ├── BlockNumberDynamicJump0_AfterJumpdest3.json
│ │ │ │ │ ├── BlockNumberDynamicJump0_foreverOutOfGas.json
│ │ │ │ │ ├── BlockNumberDynamicJump0_jumpdest0.json
│ │ │ │ │ ├── BlockNumberDynamicJump0_jumpdest2.json
│ │ │ │ │ ├── BlockNumberDynamicJump0_withoutJumpdest.json
│ │ │ │ │ ├── BlockNumberDynamicJump1.json
│ │ │ │ │ ├── BlockNumberDynamicJumpInsidePushWithJumpDest.json
│ │ │ │ │ ├── BlockNumberDynamicJumpInsidePushWithoutJumpDest.json
│ │ │ │ │ ├── BlockNumberDynamicJumpi0.json
│ │ │ │ │ ├── BlockNumberDynamicJumpi1.json
│ │ │ │ │ ├── BlockNumberDynamicJumpi1_jumpdest.json
│ │ │ │ │ ├── BlockNumberDynamicJumpiAfterStop.json
│ │ │ │ │ ├── BlockNumberDynamicJumpiOutsideBoundary.json
│ │ │ │ │ ├── BlockNumberDynamicJumpifInsidePushWithJumpDest.json
│ │ │ │ │ ├── BlockNumberDynamicJumpifInsidePushWithoutJumpDest.json
│ │ │ │ │ ├── DyanmicJump0_outOfBoundary.json
│ │ │ │ │ ├── DynamicJump0_AfterJumpdest.json
│ │ │ │ │ ├── DynamicJump0_AfterJumpdest3.json
│ │ │ │ │ ├── DynamicJump0_foreverOutOfGas.json
│ │ │ │ │ ├── DynamicJump0_jumpdest0.json
│ │ │ │ │ ├── DynamicJump0_jumpdest2.json
│ │ │ │ │ ├── DynamicJump0_withoutJumpdest.json
│ │ │ │ │ ├── DynamicJump1.json
│ │ │ │ │ ├── DynamicJumpAfterStop.json
│ │ │ │ │ ├── DynamicJumpInsidePushWithJumpDest.json
│ │ │ │ │ ├── DynamicJumpInsidePushWithoutJumpDest.json
│ │ │ │ │ ├── DynamicJumpJD_DependsOnJumps0.json
│ │ │ │ │ ├── DynamicJumpJD_DependsOnJumps1.json
│ │ │ │ │ ├── DynamicJumpPathologicalTest0.json
│ │ │ │ │ ├── DynamicJumpPathologicalTest1.json
│ │ │ │ │ ├── DynamicJumpPathologicalTest2.json
│ │ │ │ │ ├── DynamicJumpPathologicalTest3.json
│ │ │ │ │ ├── DynamicJumpStartWithJumpDest.json
│ │ │ │ │ ├── DynamicJump_value1.json
│ │ │ │ │ ├── DynamicJump_value2.json
│ │ │ │ │ ├── DynamicJump_value3.json
│ │ │ │ │ ├── DynamicJump_valueUnderflow.json
│ │ │ │ │ ├── DynamicJumpi0.json
│ │ │ │ │ ├── DynamicJumpi1.json
│ │ │ │ │ ├── DynamicJumpi1_jumpdest.json
│ │ │ │ │ ├── DynamicJumpiAfterStop.json
│ │ │ │ │ ├── DynamicJumpiOutsideBoundary.json
│ │ │ │ │ ├── DynamicJumpifInsidePushWithJumpDest.json
│ │ │ │ │ ├── DynamicJumpifInsidePushWithoutJumpDest.json
│ │ │ │ │ ├── JDfromStorageDynamicJump0_AfterJumpdest.json
│ │ │ │ │ ├── JDfromStorageDynamicJump0_AfterJumpdest3.json
│ │ │ │ │ ├── JDfromStorageDynamicJump0_foreverOutOfGas.json
│ │ │ │ │ ├── JDfromStorageDynamicJump0_jumpdest0.json
│ │ │ │ │ ├── JDfromStorageDynamicJump0_jumpdest2.json
│ │ │ │ │ ├── JDfromStorageDynamicJump0_withoutJumpdest.json
│ │ │ │ │ ├── JDfromStorageDynamicJump1.json
│ │ │ │ │ ├── JDfromStorageDynamicJumpInsidePushWithJumpDest.json
│ │ │ │ │ ├── JDfromStorageDynamicJumpInsidePushWithoutJumpDest.json
│ │ │ │ │ ├── JDfromStorageDynamicJumpi0.json
│ │ │ │ │ ├── JDfromStorageDynamicJumpi1.json
│ │ │ │ │ ├── JDfromStorageDynamicJumpi1_jumpdest.json
│ │ │ │ │ ├── JDfromStorageDynamicJumpiAfterStop.json
│ │ │ │ │ ├── JDfromStorageDynamicJumpiOutsideBoundary.json
│ │ │ │ │ ├── JDfromStorageDynamicJumpifInsidePushWithJumpDest.json
│ │ │ │ │ ├── JDfromStorageDynamicJumpifInsidePushWithoutJumpDest.json
│ │ │ │ │ ├── bad_indirect_jump1.json
│ │ │ │ │ ├── bad_indirect_jump2.json
│ │ │ │ │ ├── byte1.json
│ │ │ │ │ ├── calldatacopyMemExp.json
│ │ │ │ │ ├── codecopyMemExp.json
│ │ │ │ │ ├── deadCode_1.json
│ │ │ │ │ ├── dupAt51becameMload.json
│ │ │ │ │ ├── for_loop1.json
│ │ │ │ │ ├── for_loop2.json
│ │ │ │ │ ├── gas0.json
│ │ │ │ │ ├── gas1.json
│ │ │ │ │ ├── gasOverFlow.json
│ │ │ │ │ ├── indirect_jump1.json
│ │ │ │ │ ├── indirect_jump2.json
│ │ │ │ │ ├── indirect_jump3.json
│ │ │ │ │ ├── indirect_jump4.json
│ │ │ │ │ ├── jump0_AfterJumpdest.json
│ │ │ │ │ ├── jump0_AfterJumpdest3.json
│ │ │ │ │ ├── jump0_foreverOutOfGas.json
│ │ │ │ │ ├── jump0_jumpdest0.json
│ │ │ │ │ ├── jump0_jumpdest2.json
│ │ │ │ │ ├── jump0_outOfBoundary.json
│ │ │ │ │ ├── jump0_withoutJumpdest.json
│ │ │ │ │ ├── jump1.json
│ │ │ │ │ ├── jumpAfterStop.json
│ │ │ │ │ ├── jumpDynamicJumpSameDest.json
│ │ │ │ │ ├── jumpHigh.json
│ │ │ │ │ ├── jumpInsidePushWithJumpDest.json
│ │ │ │ │ ├── jumpInsidePushWithoutJumpDest.json
│ │ │ │ │ ├── jumpOntoJump.json
│ │ │ │ │ ├── jumpTo1InstructionafterJump.json
│ │ │ │ │ ├── jumpTo1InstructionafterJump_jumpdestFirstInstruction.json
│ │ │ │ │ ├── jumpTo1InstructionafterJump_noJumpDest.json
│ │ │ │ │ ├── jumpToUint64maxPlus1.json
│ │ │ │ │ ├── jumpToUintmaxPlus1.json
│ │ │ │ │ ├── jumpdestBigList.json
│ │ │ │ │ ├── jumpi0.json
│ │ │ │ │ ├── jumpi1.json
│ │ │ │ │ ├── jumpi1_jumpdest.json
│ │ │ │ │ ├── jumpiAfterStop.json
│ │ │ │ │ ├── jumpiOutsideBoundary.json
│ │ │ │ │ ├── jumpiToUint64maxPlus1.json
│ │ │ │ │ ├── jumpiToUintmaxPlus1.json
│ │ │ │ │ ├── jumpi_at_the_end.json
│ │ │ │ │ ├── jumpifInsidePushWithJumpDest.json
│ │ │ │ │ ├── jumpifInsidePushWithoutJumpDest.json
│ │ │ │ │ ├── kv1.json
│ │ │ │ │ ├── log1MemExp.json
│ │ │ │ │ ├── loop_stacklimit_1020.json
│ │ │ │ │ ├── loop_stacklimit_1021.json
│ │ │ │ │ ├── memory1.json
│ │ │ │ │ ├── mloadError0.json
│ │ │ │ │ ├── mloadError1.json
│ │ │ │ │ ├── mloadMemExp.json
│ │ │ │ │ ├── mloadOutOfGasError2.json
│ │ │ │ │ ├── msize0.json
│ │ │ │ │ ├── msize1.json
│ │ │ │ │ ├── msize2.json
│ │ │ │ │ ├── msize3.json
│ │ │ │ │ ├── mstore0.json
│ │ │ │ │ ├── mstore1.json
│ │ │ │ │ ├── mstore8MemExp.json
│ │ │ │ │ ├── mstore8WordToBigError.json
│ │ │ │ │ ├── mstore8_0.json
│ │ │ │ │ ├── mstore8_1.json
│ │ │ │ │ ├── mstoreMemExp.json
│ │ │ │ │ ├── mstoreWordToBigError.json
│ │ │ │ │ ├── mstore_mload0.json
│ │ │ │ │ ├── pc0.json
│ │ │ │ │ ├── pc1.json
│ │ │ │ │ ├── pop0.json
│ │ │ │ │ ├── pop1.json
│ │ │ │ │ ├── return1.json
│ │ │ │ │ ├── return2.json
│ │ │ │ │ ├── sha3MemExp.json
│ │ │ │ │ ├── sstore_load_0.json
│ │ │ │ │ ├── sstore_load_1.json
│ │ │ │ │ ├── sstore_load_2.json
│ │ │ │ │ ├── sstore_underflow.json
│ │ │ │ │ ├── stack_loop.json
│ │ │ │ │ ├── stackjump1.json
│ │ │ │ │ ├── swapAt52becameMstore.json
│ │ │ │ │ └── when.json
│ │ │ │ ├── vmPushDupSwapTest/
│ │ │ │ │ ├── dup1.json
│ │ │ │ │ ├── dup10.json
│ │ │ │ │ ├── dup11.json
│ │ │ │ │ ├── dup12.json
│ │ │ │ │ ├── dup13.json
│ │ │ │ │ ├── dup14.json
│ │ │ │ │ ├── dup15.json
│ │ │ │ │ ├── dup16.json
│ │ │ │ │ ├── dup2.json
│ │ │ │ │ ├── dup2error.json
│ │ │ │ │ ├── dup3.json
│ │ │ │ │ ├── dup4.json
│ │ │ │ │ ├── dup5.json
│ │ │ │ │ ├── dup6.json
│ │ │ │ │ ├── dup7.json
│ │ │ │ │ ├── dup8.json
│ │ │ │ │ ├── dup9.json
│ │ │ │ │ ├── push1.json
│ │ │ │ │ ├── push10.json
│ │ │ │ │ ├── push11.json
│ │ │ │ │ ├── push12.json
│ │ │ │ │ ├── push13.json
│ │ │ │ │ ├── push14.json
│ │ │ │ │ ├── push15.json
│ │ │ │ │ ├── push16.json
│ │ │ │ │ ├── push17.json
│ │ │ │ │ ├── push18.json
│ │ │ │ │ ├── push19.json
│ │ │ │ │ ├── push1_missingStack.json
│ │ │ │ │ ├── push2.json
│ │ │ │ │ ├── push20.json
│ │ │ │ │ ├── push21.json
│ │ │ │ │ ├── push22.json
│ │ │ │ │ ├── push23.json
│ │ │ │ │ ├── push24.json
│ │ │ │ │ ├── push25.json
│ │ │ │ │ ├── push26.json
│ │ │ │ │ ├── push27.json
│ │ │ │ │ ├── push28.json
│ │ │ │ │ ├── push29.json
│ │ │ │ │ ├── push3.json
│ │ │ │ │ ├── push30.json
│ │ │ │ │ ├── push31.json
│ │ │ │ │ ├── push32.json
│ │ │ │ │ ├── push32AndSuicide.json
│ │ │ │ │ ├── push32FillUpInputWithZerosAtTheEnd.json
│ │ │ │ │ ├── push32Undefined.json
│ │ │ │ │ ├── push32Undefined2.json
│ │ │ │ │ ├── push32Undefined3.json
│ │ │ │ │ ├── push33.json
│ │ │ │ │ ├── push4.json
│ │ │ │ │ ├── push5.json
│ │ │ │ │ ├── push6.json
│ │ │ │ │ ├── push7.json
│ │ │ │ │ ├── push8.json
│ │ │ │ │ ├── push9.json
│ │ │ │ │ ├── swap1.json
│ │ │ │ │ ├── swap10.json
│ │ │ │ │ ├── swap11.json
│ │ │ │ │ ├── swap12.json
│ │ │ │ │ ├── swap13.json
│ │ │ │ │ ├── swap14.json
│ │ │ │ │ ├── swap15.json
│ │ │ │ │ ├── swap16.json
│ │ │ │ │ ├── swap2.json
│ │ │ │ │ ├── swap2error.json
│ │ │ │ │ ├── swap3.json
│ │ │ │ │ ├── swap4.json
│ │ │ │ │ ├── swap5.json
│ │ │ │ │ ├── swap6.json
│ │ │ │ │ ├── swap7.json
│ │ │ │ │ ├── swap8.json
│ │ │ │ │ ├── swap9.json
│ │ │ │ │ └── swapjump1.json
│ │ │ │ ├── vmRandomTest/
│ │ │ │ │ ├── 201503102320PYTHON.json
│ │ │ │ │ ├── 201503110206PYTHON.json
│ │ │ │ │ ├── 201503110219PYTHON.json
│ │ │ │ │ ├── 201503110346PYTHON_PUSH24.json
│ │ │ │ │ ├── 201503111844PYTHON.json
│ │ │ │ │ └── 201503112218PYTHON.json
│ │ │ │ ├── vmSha3Test/
│ │ │ │ │ ├── sha3_0.json
│ │ │ │ │ ├── sha3_1.json
│ │ │ │ │ ├── sha3_2.json
│ │ │ │ │ ├── sha3_3oog.json
│ │ │ │ │ ├── sha3_4oog.json
│ │ │ │ │ ├── sha3_5oog.json
│ │ │ │ │ ├── sha3_6oog.json
│ │ │ │ │ ├── sha3_bigOffset2.json
│ │ │ │ │ ├── sha3_bigOffsetoog.json
│ │ │ │ │ ├── sha3_bigSizeoog.json
│ │ │ │ │ ├── sha3_memSizeNoQuadraticCost31.json
│ │ │ │ │ ├── sha3_memSizeQuadraticCost32.json
│ │ │ │ │ ├── sha3_memSizeQuadraticCost32_zeroSize.json
│ │ │ │ │ ├── sha3_memSizeQuadraticCost33.json
│ │ │ │ │ ├── sha3_memSizeQuadraticCost63.json
│ │ │ │ │ ├── sha3_memSizeQuadraticCost64.json
│ │ │ │ │ ├── sha3_memSizeQuadraticCost64_2.json
│ │ │ │ │ └── sha3_memSizeQuadraticCost65.json
│ │ │ │ ├── vmSystemOperations/
│ │ │ │ │ ├── TestNameRegistrator.json
│ │ │ │ │ ├── return0.json
│ │ │ │ │ ├── return1.json
│ │ │ │ │ ├── return2.json
│ │ │ │ │ ├── suicide0.json
│ │ │ │ │ ├── suicideNotExistingAccount.json
│ │ │ │ │ └── suicideSendEtherToMe.json
│ │ │ │ └── vmTests/
│ │ │ │ └── suicide.json
│ │ │ └── evm_test.py
│ │ ├── keccak_tests.py
│ │ ├── smt/
│ │ │ ├── __init__.py
│ │ │ ├── independece_solver_test.py
│ │ │ └── model_test.py
│ │ ├── state/
│ │ │ ├── __init__.py
│ │ │ ├── calldata_test.py
│ │ │ ├── mstack_test.py
│ │ │ ├── mstate_test.py
│ │ │ ├── storage_test.py
│ │ │ └── world_state_account_exist_load_test.py
│ │ ├── strategy/
│ │ │ ├── beam_test.py
│ │ │ └── loop_bound_test.py
│ │ ├── transaction/
│ │ │ ├── __init__.py
│ │ │ ├── create_transaction_test.py
│ │ │ └── symbolic_test.py
│ │ ├── transaction_test.py
│ │ └── tx_prioritisation_test.py
│ ├── mythril/
│ │ ├── mythril_analyzer_test.py
│ │ ├── mythril_config_test.py
│ │ └── mythril_disassembler_test.py
│ ├── plugin/
│ │ ├── interface_test.py
│ │ └── loader_test.py
│ ├── pre-commit-hooks/
│ │ ├── Counter.sol
│ │ └── test.sh
│ ├── rpc_test.py
│ ├── solidity_contract_test.py
│ ├── statespace_test.py
│ ├── testdata/
│ │ ├── __init__.py
│ │ ├── compile.py
│ │ ├── concolic_io/
│ │ │ ├── multi_contract_example.sol
│ │ │ ├── multi_contract_example_input.json
│ │ │ ├── multiple_example.sol
│ │ │ ├── multiple_example_input.json
│ │ │ ├── simple_example.sol
│ │ │ ├── simple_example_input.json
│ │ │ ├── two_contract.sol
│ │ │ └── two_contract_input.json
│ │ ├── input_contracts/
│ │ │ ├── SecureVault.sol
│ │ │ ├── SimpleModifier.sol
│ │ │ ├── WalletLibrary.sol
│ │ │ ├── base_case.sol
│ │ │ ├── calls.sol
│ │ │ ├── complex.sol
│ │ │ ├── constructor_assert.sol
│ │ │ ├── destruct.sol
│ │ │ ├── destruct_crlf.sol
│ │ │ ├── environments.sol
│ │ │ ├── ether_send.sol
│ │ │ ├── exceptions.sol
│ │ │ ├── exceptions_0.8.0.sol
│ │ │ ├── extcall.sol
│ │ │ ├── flag_array.sol
│ │ │ ├── hash_test.sol
│ │ │ ├── integer_edge_case.sol
│ │ │ ├── kcalls.sol
│ │ │ ├── large.sol
│ │ │ ├── metacoin.sol
│ │ │ ├── multi_contracts.sol
│ │ │ ├── nonascii.sol
│ │ │ ├── old_origin.sol
│ │ │ ├── old_version.sol
│ │ │ ├── origin.sol
│ │ │ ├── overflow.sol
│ │ │ ├── regression_1.sol
│ │ │ ├── requirements_violation_neg.sol
│ │ │ ├── requirements_violation_pos.sol
│ │ │ ├── returnvalue.sol
│ │ │ ├── rubixi.sol
│ │ │ ├── safe_funcs.sol
│ │ │ ├── simple_theft.sol
│ │ │ ├── suicide.sol
│ │ │ ├── symbolic_exec_bytecode.sol
│ │ │ ├── theft.sol
│ │ │ ├── transient.sol
│ │ │ ├── transient_bug.sol
│ │ │ ├── transient_bug_2.sol
│ │ │ ├── transient_recursive.sol
│ │ │ ├── tx.sol
│ │ │ ├── underflow.sol
│ │ │ ├── unexpected_ether_neg.sol
│ │ │ ├── unexpected_ether_pos.sol
│ │ │ ├── version_2.sol
│ │ │ ├── version_3.sol
│ │ │ ├── version_4.sol
│ │ │ ├── version_chaos.sol
│ │ │ ├── version_contract.sol
│ │ │ ├── version_contract_0.7.0.sol
│ │ │ ├── version_contract_0.8.0.sol
│ │ │ ├── version_patch.sol
│ │ │ └── weak_random.sol
│ │ ├── inputs/
│ │ │ ├── calls.sol.o
│ │ │ ├── coverage.sol.o
│ │ │ ├── environments.sol.o
│ │ │ ├── ether_send.sol.o
│ │ │ ├── exceptions.sol.o
│ │ │ ├── exceptions_0.8.0.sol.o
│ │ │ ├── extcall.sol.o
│ │ │ ├── flag_array.sol.o
│ │ │ ├── kinds_of_calls.sol.o
│ │ │ ├── metacoin.sol.o
│ │ │ ├── multi_contracts.sol.o
│ │ │ ├── nonascii.sol.o
│ │ │ ├── origin.sol.o
│ │ │ ├── overflow.sol.o
│ │ │ ├── returnvalue.sol.o
│ │ │ ├── safe_funcs.sol.o
│ │ │ ├── suicide.sol.o
│ │ │ ├── symbolic_exec_bytecode.sol.o
│ │ │ └── underflow.sol.o
│ │ ├── json_test_dir/
│ │ │ ├── PRC20.sol
│ │ │ ├── dir_a/
│ │ │ │ ├── input_file.sol
│ │ │ │ └── input_file_args.sol
│ │ │ ├── test_file.json
│ │ │ └── test_file_disable.json
│ │ └── outputs_expected/
│ │ ├── calls.sol.o.easm
│ │ ├── calls.sol.o.graph.html
│ │ ├── environments.sol.o.easm
│ │ ├── environments.sol.o.graph.html
│ │ ├── ether_send.sol.o.easm
│ │ ├── ether_send.sol.o.graph.html
│ │ ├── exceptions.sol.o.easm
│ │ ├── exceptions.sol.o.graph.html
│ │ ├── kinds_of_calls.sol.o.easm
│ │ ├── kinds_of_calls.sol.o.graph.html
│ │ ├── metacoin.sol.o.easm
│ │ ├── metacoin.sol.o.graph.html
│ │ ├── multi_contracts.sol.o.easm
│ │ ├── multi_contracts.sol.o.graph.html
│ │ ├── nonascii.sol.o.easm
│ │ ├── nonascii.sol.o.graph.html
│ │ ├── origin.sol.o.easm
│ │ ├── origin.sol.o.graph.html
│ │ ├── overflow.sol.o.easm
│ │ ├── overflow.sol.o.graph.html
│ │ ├── returnvalue.sol.o.easm
│ │ ├── returnvalue.sol.o.graph.html
│ │ ├── suicide.sol.o.easm
│ │ ├── suicide.sol.o.graph.html
│ │ ├── underflow.sol.o.easm
│ │ └── underflow.sol.o.graph.html
│ ├── teststorage/
│ │ ├── contractstorage.fs
│ │ ├── contractstorage.fs.index
│ │ └── contractstorage.fs.tmp
│ └── util_tests.py
└── tox.ini
================================================
FILE CONTENTS
================================================
================================================
FILE: .circleci/config.yml
================================================
defaults:
&defaults
docker:
# TODO: Try to replace this with `mythril/mythx-ci` image. That image is
# used for new integration testing, and it is build on top of the previous
# `mythril/dev_test_environment:0.0.43`, though a bit newer versions, thus
# there is a chance that it breaks some small things.
- image: norhh/mythril-ci
version: 2
jobs:
# Basic testing of a new commit to any branch.
test:
<<: *defaults
parallelism: 4
steps:
- checkout:
path: /home/mythril
# Uncomment, for local testing with circleci command, as it ignores
# path param in checkout command, and this symlink compenstates for that.
# - run: ln -s /root/project /home/mythril
- restore-cache:
keys:
- tox-env-{{ checksum "/home/mythril/setup.py" }}
- run:
name: Install tox envs
command: tox -vv --notest
working_directory: /home/mythril
environment:
LC_ALL: en_US.ASCII
LANG: en_US.ASCII
- save_cache:
key: tox-env-{{ checksum "/home/mythril/setup.py" }}
paths:
- .tox/py*
- /root/.cache/pip/wheels/
- run:
background: true
name: Launch of background geth instance
command: geth --syncmode full --http --http.api="db,eth,net,web3,personal"
- run:
name: Unit-testing
command: |
TESTFILES=$(circleci tests glob tests/**/*test.py | circleci tests split --split-by=timings)
tox -- $TESTFILES
working_directory: /home/mythril
no_output_timeout: 10m
environment:
LANG: en_US.ASCII
MYTHRIL_DIR: '/home/mythril'
INFURA_ID: $INFURA_ID
- store_test_results:
path: /home/mythril/.tox/output
- store_artifacts:
path: /home/mythril/.tox/output
- run:
name: Ensuring that setup script is functional
command: python3 -m build
working_directory: /home/mythril
#- run:
# name: Sonar analysis
# command: if [ -z "$CIRCLE_PR_NUMBER" ]; then if [ -z "$CIRCLE_TAG" ]; then
# sonar-scanner -Dsonar.projectKey=$SONAR_PROJECT_KEY
# -Dsonar.organization=$SONAR_ORGANIZATION
# -Dsonar.branch.name=$CIRCLE_BRANCH
# -Dsonar.projectBaseDir=/home/mythril -Dsonar.sources=mythril
# -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.tests=/home/mythril/tests
# -Dsonar.login=$SONAR_LOGIN; fi; fi
# - run:
# name: Integration tests
# command: if [ -z "$CIRCLE_PR_NUMBER" ]; then ./run-integration-tests.sh; fi
# working_directory: /home
# The resource_class feature allows configuring CPU and RAM resources for each job. Different resource classes are available for different executors. https://circleci.com/docs/2.0/configuration-reference/#resourceclass
resource_class: large
# integration_tests:
# docker:
# - image: circleci/python:3.6.4
# working_directory: ~/project
# steps:
# - checkout
# - setup_remote_docker
# - run:
# name: Clone Edelweiss
# command: git clone --recurse-submodules https://$GITHUB_TOKEN@github.com/Consensys/Edelweiss.git
# - run:
# name: Update SWC-registry
# working_directory: ~/project/Edelweiss
# command: git submodule update --recursive --remote
# - run:
# name: Build Edelweiss
# command: |
# docker build \
# --build-arg AWS_ACCESS_KEY_ID=$S3_AWS_ACCESS_KEY_ID \
# --build-arg AWS_SECRET_ACCESS_KEY=$S3_AWS_SECRET_ACCESS_KEY \
# --build-arg AWS_DEFAULT_REGION=us-east-1 --rm -t "edelweiss-mythril:latest" . -f Edelweiss/dockerfiles/mythril/Dockerfile
# - run:
# name: Run Edelweiss
# command: |
# docker run \
# -e CIRCLE_BRANCH=$CIRCLE_BRANCH \
# -e CIRCLE_SHA1=$CIRCLE_SHA1 \
# -e CIRCLE_BUILD_NUM=$CIRCLE_BUILD_NUM \
# -e CIRCLE_BUILD_URL=$CIRCLE_BUILD_URL \
# -e CIRCLE_WEBHOOK_URL=$CIRCLE_WEBHOOK_URL \
# -e MONGO_URL=$MONGO_URL \
# --rm edelweiss-mythril:latest \
# --timeout 90 \
# --output-dir /opt/edelweiss \
# --s3 \
# --dynamodb \
# --circle-ci CircleCI/mythril.csv \
# --ignore-false-positives $IGNORE_FALSE_POSITIVES \
# --ignore-regressions $IGNORE_REGRESSIONS
pypi_release:
<<: *defaults
steps:
- checkout:
path: /home/mythril
- run:
name: Verify Git tag vs. version
command: python3 setup.py verify
working_directory: /home/mythril
- run:
name: Build
command: python3 setup.py sdist
working_directory: /home/mythril
- run:
name: Deploy
command: twine upload dist/*
working_directory: /home/mythril
# Release of the mainstream (current stable) version as mythril/myth
# container.
dockerhub_release:
docker:
- image: docker:latest
steps:
- checkout
- setup_remote_docker
- run:
name: Install bash
command: apk add --no-cache bash
- run:
name: Building Docker Image
command: ./docker_build_and_deploy.sh mythril/myth
resource_class: arm.large
# Release of the latest development version as mythril/myth-dev container.
dockerhub_dev_release:
docker:
- image: docker:latest
steps:
- checkout
- setup_remote_docker
- run:
name: Install bash
command: apk add --no-cache bash
- run:
name: Building Docker Image
command: ./docker_build_and_deploy.sh mythril/myth-dev
# The resource_class feature allows configuring CPU and RAM resources for each job. Different resource classes are available for different executors. https://circleci.com/docs/2.0/configuration-reference/#resourceclass
resource_class: arm.xlarge
workflows:
version: 2
build:
jobs:
- test:
filters:
tags:
only: /.*/
- pypi_release:
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*/
requires:
- test
- dockerhub_dev_release:
filters:
branches:
only: develop
requires:
- test
- dockerhub_release:
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*/
requires:
- test
================================================
FILE: .dockerignore
================================================
/.*
/build
/docker-bake.hcl
/Dockerfile
================================================
FILE: .drone.yml
================================================
kind: pipeline
name: default
platform:
os: linux
arch: amd64
steps:
- name: edelweiss_swc
image: mythx.azurecr.io/tools/edelweiss
environment:
IGNORE_FALSE_POSITIVES:
from_secret: IGNORE_FALSE_POSITIVES
IGNORE_REGRESSIONS:
from_secret: IGNORE_REGRESSIONS
AWS_DEFAULT_REGION:
from_secret: AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID:
from_secret: AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: AWS_SECRET_ACCESS_KEY
MONGO_URL:
from_secret: MONGO_URL
commands:
# CIRCLE_* env vars is used by edelweiss cli to generate
# the reports storage directory structure
- export CIRCLE_BUILD_NUM=$DRONE_BUILD_NUMBER
- export CIRCLE_BUILD_URL=$DRONE_BUILD_LINK
- export CIRCLE_BRANCH=$DRONE_BRANCH
- export CIRCLE_SHA1=$DRONE_COMMIT_SHA
# install pip module from current dir
- pip3 install $(pwd)
# update SWC-registry
- cd /edelweiss
- git submodule update --init --recursive
- git submodule update --remote --recursive
# run edelewiss tests
# Temporarily stop Edelweiss drone
#- edelweiss-cli
# -p mythril
# --timeout 90
# --output-dir $(pwd)
# --s3
# --dynamodb
# --circle-ci CircleCI/mythril.csv
# --ignore-false-positives $IGNORE_FALSE_POSITIVES
# --ignore-regressions $IGNORE_REGRESSIONS
when:
branch:
- develop
- master
event:
- push
- tag
image_pull_secrets:
- DOCKER_CONFIG_JSON
================================================
FILE: .editorconfig
================================================
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.py]
indent_style = space
indent_size = 4
charset = utf-8
[*.jinja2]
insert_final_newline = false
================================================
FILE: .gitattributes
================================================
tests/testdata/* linguist-detectable=false
static/* linguist-documentation
# Solidity
*.sol linguist-language=Solidity
================================================
FILE: .github/ISSUE_TEMPLATE/analysis-module.md
================================================
---
name: Analysis module
about: Create an analysis module feature request
---
<!-- Please remove any of the optional sections if they are not applicable. -->
## Description
<!-- Add a description of an vulnerability that should be
detected by a Mythril analysis module. -->
## Tests
<!-- This section is optional.
Suggest how to test the feature, if it is not obvious. This might
require certain Solidity source, bytecode, or a Truffle project. You
can also provide links to existing code. -->
## Implementation details
<!-- This section is optional.
If you have thoughts about how to implement the analysis, add
this here. -->
## Links
<!-- This section is optional.
Add links describing the issue or pointing to resources that can help
in implementing the analysis.
Thanks for helping! -->
================================================
FILE: .github/ISSUE_TEMPLATE/bug-report.md
================================================
---
name: Bug report
about: Tell us about Mythril bugs to help us improve
---
<!-- Note: did you notice that there is now a template for requesting new features?
Please remove any of the optional sections if they are not applicable. -->
## Description
<!-- Replace this text with a clear and concise description of the bug. -->
## How to Reproduce
<!-- Please show both the input you gave and the
output you got in describing how to reproduce the bug.
For example:
```console
$ myth <command-line-options>
==== Exception state ====
Type: ...
Contract: ...
Function name: ...
...
$
```
or perhaps:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
If there is a Solidity source code or a bytecode
that is involved, please provide that or links to it.
-->
## Expected behavior
<!-- A clear and concise description of what you expected to happen. -->
## Screenshots
<!-- This section is optional.
If applicable, add screenshots to help explain your problem.
-->
## Environment
<!-- This section sometimes is optional but helpful to us.
Please modify for your setup
- Mythril version: output from `myth version` or `pip show mythril`
- Solidity compiler and version: `solc --version`
- Python version: `python -V`
- OS and Version: [e.g. Mac OS High Sierra]
-->
## Additional Environment or Context
<!-- This section is optional.
Add any other context about the problem here or special environment setup.
Thanks for helping!
-->
================================================
FILE: .github/ISSUE_TEMPLATE/feature-request.md
================================================
---
name: Feature Request
about: Tell us about a new feature that would make Mythril better
---
## Description
<!-- Give a short description of the feature. -->
## Background
<! -- Replace this text with any additional background for the
feature, for example: user scenarios, or the value of the feature. -->
## Tests
<!-- This section is optional.
Suggestion how to test the feature, if it is not obvious.
This might require certain Solidity source, bytecode, or a Truffle
project. You can also provide links to existing code.
Thanks for helping!
-->
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
workflows:
patterns:
- '*'
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
================================================
FILE: .github/workflows/container.yml
================================================
on:
pull_request:
paths:
- .github/workflows/container.yml
- Dockerfile
- docker_build_and_deploy.sh
- requirements.txt
- setup.py
name: container
concurrency:
# Concurrency group that uses the workflow name and PR number if available
# or commit SHA as a fallback. If a new build is triggered under that
# concurrency group while a previous build is running it will be canceled.
# Repeated pushes to a PR will cancel all previous builds, while multiple
# merges to a branch will not cancel.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: build and test
run: |
# when no DOCKERHUB_USERNAME is set, this only builds the
# container and runs the myth-smoke-test
./docker_build_and_deploy.sh mythril/myth-dev
================================================
FILE: .github/workflows/pre-commit-hooks-test.yml
================================================
name: pre-commit
on:
push:
branches:
- master
- develop
tags:
- '*'
pull_request:
paths:
- .github/workflows/pre-commit-hooks-test.yml
- .pre-commit-hooks.yaml
- tests/pre-commit-hooks/*
- requirements.txt
- setup.py
jobs:
hooks-test:
runs-on: ubuntu-latest
name: test hooks
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install pre-commit
run: |
python -m pip install pre-commit
- name: Test hooks
run: |
./tests/pre-commit-hooks/test.sh
================================================
FILE: .github/workflows/pre-commit.yml
================================================
on:
push:
branches:
- master
- develop
tags:
- '*'
pull_request:
name: pre-commit
concurrency:
# Concurrency group that uses the workflow name and PR number if available
# or commit SHA as a fallback. If a new build is triggered under that
# concurrency group while a previous build is running it will be canceled.
# Repeated pushes to a PR will cancel all previous builds, while multiple
# merges to a branch will not cancel.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: pre-commit/action@v3.0.1
================================================
FILE: .gitignore
================================================
# Created by https://www.gitignore.io/api/linux,macos,python,windows
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
.pytest_cache/
nosetests.xml
coverage.xml
*.cover
.hypothesis/
# Translations
*.mo
*.pot
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule.*
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# End of https://www.gitignore.io/api/linux,macos,python,windows
*.asm
*.lock
*.svg
lol*
.idea*
coverage_html_report/
tests/testdata/outputs_current/
tests/testdata/outputs_current_laser_result/
tests/testdata/mythril_config_inputs/config.ini
# VSCode
.vscode
================================================
FILE: .pre-commit-config.yaml
================================================
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# Apply to all files without commiting:
# pre-commit run --all-files
# Update this file:
# pre-commit autoupdate
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
hooks:
# lint & attempt to correct failures
- id: ruff
args: [--fix, --show-fixes]
# compatible replacement for black
- id: ruff-format
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.10.0-2
hooks:
- id: shfmt
args: [--write, --indent, '4']
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint-docker
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.0
hooks:
- id: check-circle-ci
- id: check-github-workflows
- id: check-dependabot
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
================================================
FILE: .pre-commit-hooks.yaml
================================================
- id: mythril
name: Mythril
description: Analyze EVM bytecode with Mythril
entry: myth
args:
- analyze
language: python
types: ["solidity"]
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Mythril
Hi, if you are reading this that means that you probably want to contribute to Mythril, awesome! If not, then this file might not contain much useful information for you.
## Creating an issue
If you have found a problem with Mythril or want to propose a new feature then you can do this using GitHub issues.
We already created some templates to make this process easier, but if your issue/feature request does not fit within the template then feel free to deviate.
If you have a small question or aren't sure if you should create an issue for your problem/suggestion then you can always hop by on our [Discord server](https://discord.gg/FGMkcU2).
# Coding
If you want to help out with the development of Mythril then you can take a look at our issues or [Waffle board](https://waffle.io/ConsenSys/mythril).
Before you start working on an issue please stop by on Discord to message a collaborator, this way we can assign you to the issue making sure nobody does double work. We can also provide you with support through Discord if there are any questions during the development process.
## New ideas
Before you start working on a new idea, it's useful to create an issue on GitHub, that way we know what you want to implement and that you are working on it. Additionally, it might happen that your feature does not fit with our roadmap, in which case it would be unfortunate if you have already spent some time working on it.
================================================
FILE: Dockerfile
================================================
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.10
ARG INSTALLED_SOLC_VERSIONS
FROM python:${PYTHON_VERSION} AS mythril-wheels
WORKDIR /wheels
# Enable cargo sparse-registry to prevent it using large amounts of memory in
# docker builds, and speed up builds by downloading less.
# https://github.com/rust-lang/cargo/issues/10781#issuecomment-1163819998
ENV CARGO_UNSTABLE_SPARSE_REGISTRY=true
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH=/root/.cargo/bin:$PATH
RUN --mount=source=requirements.txt,target=/run/requirements.txt \
pip wheel -r /run/requirements.txt
COPY . /mythril
RUN pip wheel --no-deps /mythril
# Solidity Compiler Version Manager. This provides cross-platform solc builds.
# It's used by foundry to provide solc. https://github.com/alloy-rs/svm-rs
FROM rust:slim-bookworm AS solidity-compiler-version-manager
RUN mkdir -p /svm-rs/bin && \
cargo install svm-rs --root /svm-rs
FROM python:${PYTHON_VERSION}-slim AS myth
ARG PYTHON_VERSION
# Space-separated version string without leading 'v' (e.g. "0.4.21 0.4.22")
ARG INSTALLED_SOLC_VERSIONS
COPY --from=solidity-compiler-version-manager /svm-rs/bin/* /usr/local/bin/
RUN --mount=from=mythril-wheels,source=/wheels,target=/wheels \
export PYTHONDONTWRITEBYTECODE=1 && pip install --no-cache-dir /wheels/*.whl
RUN adduser --disabled-password mythril
USER mythril
WORKDIR /home/mythril
# pre-install solc versions
RUN set -x; [ -z "${INSTALLED_SOLC_VERSIONS}" ] || svm install ${INSTALLED_SOLC_VERSIONS}
COPY --chown=mythril:mythril \
./mythril/support/assets/signatures.db \
/home/mythril/.mythril/signatures.db
COPY --chown=root:root --chmod=755 ./docker/docker-entrypoint.sh /
COPY --chown=root:root --chmod=755 \
./docker/sync-svm-solc-versions-with-solcx.sh \
/usr/local/bin/sync-svm-solc-versions-with-solcx
ENTRYPOINT ["/docker-entrypoint.sh"]
# Basic sanity checks to make sure the build is functional
FROM myth AS myth-smoke-test-execution
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
WORKDIR /smoke-test
COPY --chmod=755 <<"EOT" /smoke-test.sh
#!/usr/bin/env bash
set -x -euo pipefail
# Check solcx knows about svm solc versions
svm install 0.5.0
sync-svm-solc-versions-with-solcx
python -c '
import solcx
print("\n".join(str(v) for v in solcx.get_installed_solc_versions()))
' | grep -P '^0\.5\.0$' || {
echo "solcx did not report svm-installed solc version";
exit 1
}
# Show installed packages and versions
pip list
# Check myth can run
myth version
myth function-to-hash 'function transfer(address _to, uint256 _value) public returns (bool success)'
myth analyze /solidity_examples/origin.sol -t 1 > origin.log || true
grep 'SWC ID: 115' origin.log || {
error "Failed to detect SWC ID: 115 in origin.sol";
exit 1
}
# Check that the entrypoint works
[[ $(/docker-entrypoint.sh version) == $(myth version) ]]
[[ $(/docker-entrypoint.sh echo hi) == hi ]]
[[ $(/docker-entrypoint.sh bash -c "printf '>%s<' 'foo bar'") == ">foo bar<" ]]
EOT
RUN --mount=source=./solidity_examples,target=/solidity_examples \
/smoke-test.sh 2>&1 | tee smoke-test.log
FROM scratch AS myth-smoke-test
COPY --from=myth-smoke-test-execution /smoke-test/* /
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) since 2017 Bernhard Mueller
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: MANIFEST.in
================================================
include mythril/support/assets/*
include mythril/analysis/templates/*
include requirements.txt
================================================
FILE: README.md
================================================
# Mythril
<p align="center">
<img src="/static/mythril_new.png" height="320px"/>
</p>
[](https://discord.com/invite/consensys)
[](https://pypi.python.org/pypi/mythril)
[](https://mythril-classic.readthedocs.io/en/develop/)
[](https://dl.circleci.com/status-badge/redirect/gh/Consensys/mythril/tree/develop)
[](https://sonarcloud.io/dashboard?id=mythril)
[](https://pepy.tech/project/mythril)
[](https://cloud.docker.com/u/mythril/repository/docker/mythril/myth)
Mythril is a symbolic-execution-based security analysis tool for EVM bytecode. It detects security vulnerabilities in smart contracts built for Ethereum and other EVM-compatible blockchains.
Whether you want to contribute, need support, or want to learn what we have cooking for the future, you can checkout diligence-mythx channel in [ConsenSys Discord server](https://discord.gg/consensys).
## Installation and setup
Get it with [Docker](https://www.docker.com):
```bash
$ docker pull mythril/myth
```
Install from Pypi (Python 3.7-3.10):
```bash
$ pip3 install mythril
```
Use it via pre-commit hook (replace `$GIT_TAG` with real tag):
```YAML
- repo: https://github.com/Consensys/mythril
rev: $GIT_TAG
hooks:
- id: mythril
```
Additionally, set `args: [disassemble]` or `args: [read-storage]` to use a different command than `analyze`.
See the [docs](https://mythril-classic.readthedocs.io/en/master/installation.html) for more detailed instructions.
## Usage
Run:
```
$ myth analyze <solidity-file>
```
Or:
```
$ myth analyze -a <contract-address>
```
Specify the maximum number of transactions to explore with `-t <number>`. You can also set a timeout with `--execution-timeout <seconds>`.
Here is an example of running Mythril on the file `killbilly.sol` which is in the `solidity_examples` directory for `3` transactions:
```
> myth a killbilly.sol -t 3
==== Unprotected Selfdestruct ====
SWC ID: 106
Severity: High
Contract: KillBilly
Function name: commencekilling()
PC address: 354
Estimated Gas Usage: 974 - 1399
Any sender can cause the contract to self-destruct.
Any sender can trigger execution of the SELFDESTRUCT instruction to destroy this contract account and withdraw its balance to an arbitrary address. Review the transaction trace generated for this issue and make sure that appropriate security controls are in place to prevent unrestricted access.
--------------------
In file: killbilly.sol:22
selfdestruct(msg.sender)
--------------------
Initial State:
Account: [CREATOR], balance: 0x2, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x1001, nonce:0, storage:{}
Transaction Sequence:
Caller: [CREATOR], calldata: , decoded_data: , value: 0x0
Caller: [ATTACKER], function: killerize(address), txdata: 0x9fa299cc000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeef, decoded_data: ('0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',), value: 0x0
Caller: [ATTACKER], function: activatekillability(), txdata: 0x84057065, value: 0x0
Caller: [ATTACKER], function: commencekilling(), txdata: 0x7c11da20, value: 0x0
```
Instructions for using Mythril are found on the [docs](https://mythril-classic.readthedocs.io/en/develop/).
For support or general discussions please checkout [diligence-mythx channel](https://discord.com/channels/697535391594446898/712829485350649886) in [ConsenSys Discord server](https://discord.gg/consensys)..
## Building the Documentation
Mythril's documentation is contained in the `docs` folder and is published to [Read the Docs](https://mythril-classic.readthedocs.io/en/develop/). It is based on Sphinx and can be built using the Makefile contained in the subdirectory:
```
cd docs
make html
```
This will create a `build` output directory containing the HTML output. Alternatively, PDF documentation can be built with `make latexpdf`. The available output format options can be seen with `make help`.
## Vulnerability Remediation
Visit the [Smart Contract Vulnerability Classification Registry](https://swcregistry.io/) to find detailed information and remediation guidance for the vulnerabilities reported.
================================================
FILE: all_tests.sh
================================================
#!/bin/bash
set -euo pipefail
echo -n "Checking Python version... "
python -c 'import sys
print(sys.version)
assert sys.version_info[0:2] >= (3,5), \
"""Please make sure you are using Python 3.5 or later.
You ran with {}""".format(sys.version)' || exit $?
rm -rf ./tests/testdata/outputs_current/
mkdir -p ./tests/testdata/outputs_current/
rm -rf ./tests/testdata/outputs_current_laser_result/
mkdir -p ./tests/testdata/outputs_current_laser_result/
mkdir -p /tmp/test-reports
pytest --junitxml=/tmp/test-reports/junit.xml
================================================
FILE: coverage_report.sh
================================================
#!/bin/sh
python --version
echo "Please make sure you are using python 3.6.x"
rm -rf ./tests/testdata/outputs_current/
mkdir -p ./tests/testdata/outputs_current/
rm -rf ./tests/testdata/outputs_current_laser_result/
mkdir -p ./tests/testdata/outputs_current_laser_result/
rm -rf coverage_html_report
py.test \
--cov=mythril \
--cov-config=tox.ini \
--cov-report=html:coverage_reports/coverage_html_report \
--cov-report=xml:coverage_reports/coverage_xml_report.xml
================================================
FILE: docker/docker-entrypoint.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
# Install extra solc versions if SOLC is set
if [[ ${SOLC:-} != "" ]]; then
read -ra solc_versions <<<"${SOLC:?}"
svm install "${solc_versions[@]}"
fi
# Always sync versions, as the should be at least one solc version installed
# in the base image, and we may be running as root rather than the mythril user.
sync-svm-solc-versions-with-solcx
# By default we run myth with options from arguments we received. But if the
# first argument is a valid program, we execute that instead so that people can
# run other commands without overriding the entrypoint (e.g. bash).
if command -v "${1:-}" >/dev/null; then
exec -- "$@"
fi
exec -- myth "$@"
================================================
FILE: docker/sync-svm-solc-versions-with-solcx.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
# Let solcx know about the solc versions installed by svm.
# We do this by symlinking svm's solc binaries into solcx's solc dir.
[[ -e ~/.svm ]] || exit 0
mkdir -p ~/.solcx
readarray -t svm_solc_bins <<<"$(find ~/.svm -type f -name 'solc-*')"
[[ ${svm_solc_bins[0]} != "" ]] || exit 0
for svm_solc in "${svm_solc_bins[@]}"; do
name=$(basename "${svm_solc:?}")
version="${name#"solc-"}" # strip solc- prefix
solcx_solc=~/.solcx/"solc-v${version:?}"
if [[ ! -e $solcx_solc ]]; then
ln -s "${svm_solc:?}" "${solcx_solc:?}"
fi
done
================================================
FILE: docker-bake.hcl
================================================
variable "REGISTRY" {
default = "docker.io"
}
variable "VERSION" {
default = "dev"
}
variable "PYTHON_VERSION" {
default = "3.10"
}
variable "INSTALLED_SOLC_VERSIONS" {
default = "0.8.19"
}
function "myth-tags" {
params = [NAME]
result = formatlist("${REGISTRY}/${NAME}:%s", split(",", VERSION))
}
group "default" {
targets = ["myth", "myth-smoke-test"]
}
target "_myth-base" {
target = "myth"
args = {
PYTHON_VERSION = PYTHON_VERSION
INSTALLED_SOLC_VERSIONS = INSTALLED_SOLC_VERSIONS
}
platforms = [
"linux/amd64",
"linux/arm64"
]
}
target "myth" {
inherits = ["_myth-base"]
tags = myth-tags("mythril/myth")
}
target "myth-dev" {
inherits = ["_myth-base"]
tags = myth-tags("mythril/myth-dev")
}
target "myth-smoke-test" {
inherits = ["_myth-base"]
target = "myth-smoke-test"
output = ["build/docker/smoke-test"]
}
================================================
FILE: docker_build_and_deploy.sh
================================================
#!/bin/bash
set -eo pipefail
NAME=$1
if [[ ! $NAME =~ ^mythril/myth(-dev)?$ ]]; then
echo "Error: unknown image name: $NAME" >&2
exit 1
fi
if [ -n "$CIRCLE_TAG" ]; then
GIT_VERSION=${CIRCLE_TAG#?}
else
GIT_VERSION=${CIRCLE_SHA1}
fi
export DOCKER_BUILDKIT=1
docker buildx create --use
# Build and test all versions of the image. (The result will stay in the cache,
# so the next build should be almost instant.)
docker buildx bake myth-smoke-test
if [ -z "$DOCKERHUB_USERNAME" ]; then
echo "Finishing without pushing to dockerhub"
exit 0
fi
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
# strip mythril/ from NAME, e.g. myth or myth-dev
BAKE_TARGET="${NAME#mythril/}"
VERSION="${GIT_VERSION:?},latest" docker buildx bake --push "${BAKE_TARGET:?}"
================================================
FILE: docs/Makefile
================================================
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
================================================
FILE: docs/make.bat
================================================
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
:end
popd
================================================
FILE: docs/source/about.rst
================================================
What is Mythril?
========================
Mythril is a security analysis tool for Ethereum smart contracts. It was `introduced at HITBSecConf 2018 <https://github.com/b-mueller/smashing-smart-contracts/blob/master/smashing-smart-contracts-1of1.pdf>`_.
Mythril detects a range of security issues, including integer underflows, owner-overwrite-to-Ether-withdrawal, and others. Note that Mythril is targeted at finding common vulnerabilities, and is not able to discover issues in the business logic of an application. Furthermore, Mythril and symbolic executors are generally unsound, as they are often unable to explore all possible states of a program.
================================================
FILE: docs/source/analysis-modules.rst
================================================
Analysis Modules
================
Mythril's detection capabilities are written in modules in the `/analysis/module/modules <https://github.com/ConsenSys/mythril/tree/master/mythril/analysis/module/modules>`_ directory.
.. toctree::
:maxdepth: 2
module-list.rst
create-module.rst
================================================
FILE: docs/source/conf.py
================================================
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
import os
import sys
sys.path.insert(0, os.path.abspath("../../"))
# -- Project information -----------------------------------------------------
project = "Mythril"
copyright = "2019, ConsenSys Diligence"
author = "ConsenSys Dilligence"
# The short X.Y version
version = ""
# The full version, including alpha/beta/rc tags
from mythril.__version__ import __version__ as VERSION
release = VERSION
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"
# The master toctree document.
master_doc = "index"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = "Mythrildoc"
# -- Options for LaTeX output ------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(
master_doc,
"Mythril.tex",
"Mythril Documentation",
"ConsenSys Dilligence",
"manual",
)
]
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "mythril", "Mythril Documentation", [author], 1)]
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
master_doc,
"Mythril",
"Mythril Documentation",
author,
"Mythril",
"One line description of project.",
"Miscellaneous",
)
]
# -- Options for Epub output -------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''
# A unique identification for the text.
#
# epub_uid = ''
# A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"]
# -- Extension configuration -------------------------------------------------
================================================
FILE: docs/source/create-module.rst
================================================
Creating a Module
=================
Create a module in the :code:`analysis/modules` directory, and create an instance of a class that inherits :code:`DetectionModule` named :code:`detector`. Take a look at the `suicide module <https://github.com/Consensys/mythril/blob/develop/mythril/analysis/module/modules/suicide.py>`_ as an example.
================================================
FILE: docs/source/index.rst
================================================
Welcome to Mythril's documentation!
===========================================
.. toctree::
:maxdepth: 1
:caption: Table of Contents:
about
installation
tutorial
security-analysis
analysis-modules
mythril
Indices and Tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
================================================
FILE: docs/source/installation.rst
================================================
Installation and Setup
======================
Mythril can be setup using different methods.
**************
PyPI on Mac OS
**************
.. code-block:: bash
brew update
brew upgrade
brew tap ethereum/ethereum
brew install solidity
pip3 install mythril
**************
PyPI on Ubuntu
**************
.. code-block:: bash
# Update
sudo apt update
# Install solc
sudo apt install software-properties-common
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt install solc
# Install libssl-dev, python3-dev, and python3-pip
sudo apt install libssl-dev python3-dev python3-pip
# Install mythril
pip3 install mythril
myth version
******
Docker
******
All Mythril releases, starting from v0.18.3, are published to DockerHub as Docker images under the :code:`mythril/myth` name.
After installing `Docker CE <https://docs.docker.com/install/>`_:
.. code-block:: bash
# Pull the latest release of mythril/myth
$ docker pull mythril/myth
Use :code:`docker run mythril/myth` the same way you would use the :code:`myth` command
.. code-block:: bash
docker run mythril/myth --help
docker run mythril/myth disassemble -c "0x6060"
To pass a file from your host machine to the dockerized Mythril, you must mount its containing folder to the container properly. For :code:`contract.sol` in the current working directory, do:
.. code-block:: bash
docker run -v $(pwd):/tmp mythril/myth analyze /tmp/contract.sol
================================================
FILE: docs/source/module-list.rst
================================================
Modules
=======
***********************************
Delegate Call To Untrusted Contract
***********************************
The `delegatecall module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/delegatecall.py>`_ detects `SWC-112 (DELEGATECALL to Untrusted Callee) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-112>`_.
***********************************
Dependence on Predictable Variables
***********************************
The `predictable variables module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/dependence_on_predictable_vars.py>`_ detects `SWC-120 (Weak Randomness) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-120>`_ and `SWC-116 (Timestamp Dependence) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-116>`_.
***********
Ether Thief
***********
The `Ether Thief module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/ether_thief.py>`_ detects `SWC-105 (Unprotected Ether Withdrawal) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-105>`_.
**********
Exceptions
**********
The `exceptions module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/exceptions.py>`_ detects `SWC-110 (Assert Violation) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-110>`_.
**************
External Calls
**************
The `external calls module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/external_calls.py>`_ warns about `SWC-107 (Reentrancy) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-107>`_ by detecting calls to external contracts.
*******
Integer
*******
The `integer module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/integer.py>`_ detects `SWC-101 (Integer Overflow and Underflow) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-101>`_.
**************
Multiple Sends
**************
The `multiple sends module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/multiple_sends.py>`_ detects `SWC-113 (Denial of Service with Failed Call) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-113>`_ by checking for multiple calls or sends in a single transaction.
*******
Suicide
*******
The `suicide module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/suicide.py>`_ detects `SWC-106 (Unprotected SELFDESTRUCT) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-106>`_.
****************************
State Change External Calls
****************************
The `state change external calls module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/state_change_external_calls.py>`_ detects `SWC-107 (Reentrancy) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-107>`_ by detecting state change after calls to an external contract.
****************
Unchecked Retval
****************
The `unchecked retval module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/unchecked_retval.py>`_ detects `SWC-104 (Unchecked Call Return Value) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-104>`_.
************************
User Supplied assertion
************************
The `user supplied assertion module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/user_assertions.py>`_ detects `SWC-110 (Assert Violation) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-110>`_ for user-supplied assertions. User supplied assertions should be log messages of the form: :code:`emit AssertionFailed(string)`.
************************
Arbitrary Storage Write
************************
The `arbitrary storage write module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/arbitrary_write.py>`_ detects `SWC-124 (Write to Arbitrary Storage Location) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-124>`_.
****************
Arbitrary Jump
****************
The `arbitrary jump module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/arbitrary_jump.py>`_ detects `SWC-127 (Arbitrary Jump with Function Type Variable) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-127>`_.
****************************
Transaction Order Dependence
****************************
The `transaction order dependence module <https://github.com/Consensys/mythril/blob/develop/mythril/analysis/module/modules/transaction_order_dependence.py>`_ detects `SWC-114 (Transaction Order Dependence) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-114>`_.
****************************
Requirement Violation
****************************
The `Requirement Violation module <https://github.com/Consensys/mythril/blob/develop/mythril/analysis/module/modules/requirements_violation.py>`_ detects `SWC-123 (Requirement Violation) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-123>`_.
****************************
Unexpected Ether balance
****************************
The `Unexpected Ether balance module <https://github.com/Consensys/mythril/blob/develop/mythril/analysis/module/modules/unexpected_ether.py>`_ detects `SWC-132 (Unexpected Ether balance) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-132>`_.
================================================
FILE: docs/source/modules.rst
================================================
mythril
=======
.. toctree::
:maxdepth: 4
mythril
================================================
FILE: docs/source/mythril.analysis.module.modules.rst
================================================
mythril.analysis.module.modules package
=======================================
Submodules
----------
mythril.analysis.module.modules.arbitrary\_jump module
------------------------------------------------------
.. automodule:: mythril.analysis.module.modules.arbitrary_jump
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.arbitrary\_write module
-------------------------------------------------------
.. automodule:: mythril.analysis.module.modules.arbitrary_write
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.delegatecall module
---------------------------------------------------
.. automodule:: mythril.analysis.module.modules.delegatecall
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.dependence\_on\_origin module
-------------------------------------------------------------
.. automodule:: mythril.analysis.module.modules.dependence_on_origin
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.dependence\_on\_predictable\_vars module
------------------------------------------------------------------------
.. automodule:: mythril.analysis.module.modules.dependence_on_predictable_vars
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.ether\_thief module
---------------------------------------------------
.. automodule:: mythril.analysis.module.modules.ether_thief
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.exceptions module
-------------------------------------------------
.. automodule:: mythril.analysis.module.modules.exceptions
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.external\_calls module
------------------------------------------------------
.. automodule:: mythril.analysis.module.modules.external_calls
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.integer module
----------------------------------------------
.. automodule:: mythril.analysis.module.modules.integer
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.multiple\_sends module
------------------------------------------------------
.. automodule:: mythril.analysis.module.modules.multiple_sends
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.state\_change\_external\_calls module
---------------------------------------------------------------------
.. automodule:: mythril.analysis.module.modules.state_change_external_calls
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.suicide module
----------------------------------------------
.. automodule:: mythril.analysis.module.modules.suicide
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.unchecked\_retval module
--------------------------------------------------------
.. automodule:: mythril.analysis.module.modules.unchecked_retval
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.modules.user\_assertions module
-------------------------------------------------------
.. automodule:: mythril.analysis.module.modules.user_assertions
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.analysis.module.modules
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.analysis.module.rst
================================================
mythril.analysis.module package
===============================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.analysis.module.modules
Submodules
----------
mythril.analysis.module.base module
-----------------------------------
.. automodule:: mythril.analysis.module.base
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.loader module
-------------------------------------
.. automodule:: mythril.analysis.module.loader
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.module\_helpers module
----------------------------------------------
.. automodule:: mythril.analysis.module.module_helpers
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.module.util module
-----------------------------------
.. automodule:: mythril.analysis.module.util
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.analysis.module
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.analysis.rst
================================================
mythril.analysis package
========================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.analysis.module
Submodules
----------
mythril.analysis.analysis\_args module
--------------------------------------
.. automodule:: mythril.analysis.analysis_args
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.call\_helpers module
-------------------------------------
.. automodule:: mythril.analysis.call_helpers
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.callgraph module
---------------------------------
.. automodule:: mythril.analysis.callgraph
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.issue\_annotation module
-----------------------------------------
.. automodule:: mythril.analysis.issue_annotation
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.ops module
---------------------------
.. automodule:: mythril.analysis.ops
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.potential\_issues module
-----------------------------------------
.. automodule:: mythril.analysis.potential_issues
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.report module
------------------------------
.. automodule:: mythril.analysis.report
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.security module
--------------------------------
.. automodule:: mythril.analysis.security
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.solver module
------------------------------
.. automodule:: mythril.analysis.solver
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.swc\_data module
---------------------------------
.. automodule:: mythril.analysis.swc_data
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.symbolic module
--------------------------------
.. automodule:: mythril.analysis.symbolic
:members:
:undoc-members:
:show-inheritance:
mythril.analysis.traceexplore module
------------------------------------
.. automodule:: mythril.analysis.traceexplore
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.analysis
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.concolic.rst
================================================
mythril.concolic package
========================
Submodules
----------
mythril.concolic.concolic\_execution module
-------------------------------------------
.. automodule:: mythril.concolic.concolic_execution
:members:
:undoc-members:
:show-inheritance:
mythril.concolic.concrete\_data module
--------------------------------------
.. automodule:: mythril.concolic.concrete_data
:members:
:undoc-members:
:show-inheritance:
mythril.concolic.find\_trace module
-----------------------------------
.. automodule:: mythril.concolic.find_trace
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.concolic
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.disassembler.rst
================================================
mythril.disassembler package
============================
Submodules
----------
mythril.disassembler.asm module
-------------------------------
.. automodule:: mythril.disassembler.asm
:members:
:undoc-members:
:show-inheritance:
mythril.disassembler.disassembly module
---------------------------------------
.. automodule:: mythril.disassembler.disassembly
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.disassembler
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.ethereum.interface.rpc.rst
================================================
mythril.ethereum.interface.rpc package
======================================
Submodules
----------
mythril.ethereum.interface.rpc.base\_client module
--------------------------------------------------
.. automodule:: mythril.ethereum.interface.rpc.base_client
:members:
:undoc-members:
:show-inheritance:
mythril.ethereum.interface.rpc.client module
--------------------------------------------
.. automodule:: mythril.ethereum.interface.rpc.client
:members:
:undoc-members:
:show-inheritance:
mythril.ethereum.interface.rpc.constants module
-----------------------------------------------
.. automodule:: mythril.ethereum.interface.rpc.constants
:members:
:undoc-members:
:show-inheritance:
mythril.ethereum.interface.rpc.exceptions module
------------------------------------------------
.. automodule:: mythril.ethereum.interface.rpc.exceptions
:members:
:undoc-members:
:show-inheritance:
mythril.ethereum.interface.rpc.utils module
-------------------------------------------
.. automodule:: mythril.ethereum.interface.rpc.utils
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.ethereum.interface.rpc
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.ethereum.interface.rst
================================================
mythril.ethereum.interface package
==================================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.ethereum.interface.rpc
Module contents
---------------
.. automodule:: mythril.ethereum.interface
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.ethereum.rst
================================================
mythril.ethereum package
========================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.ethereum.interface
Submodules
----------
mythril.ethereum.evmcontract module
-----------------------------------
.. automodule:: mythril.ethereum.evmcontract
:members:
:undoc-members:
:show-inheritance:
mythril.ethereum.util module
----------------------------
.. automodule:: mythril.ethereum.util
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.ethereum
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.interfaces.rst
================================================
mythril.interfaces package
==========================
Submodules
----------
mythril.interfaces.cli module
-----------------------------
.. automodule:: mythril.interfaces.cli
:members:
:undoc-members:
:show-inheritance:
mythril.interfaces.epic module
------------------------------
.. automodule:: mythril.interfaces.epic
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.interfaces
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.ethereum.function_managers.rst
================================================
mythril.laser.ethereum.function\_managers package
=================================================
Submodules
----------
mythril.laser.ethereum.function\_managers.exponent\_function\_manager module
----------------------------------------------------------------------------
.. automodule:: mythril.laser.ethereum.function_managers.exponent_function_manager
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.function\_managers.keccak\_function\_manager module
--------------------------------------------------------------------------
.. automodule:: mythril.laser.ethereum.function_managers.keccak_function_manager
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.ethereum.function_managers
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.ethereum.rst
================================================
mythril.laser.ethereum package
==============================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.laser.ethereum.function_managers
mythril.laser.ethereum.state
mythril.laser.ethereum.strategy
mythril.laser.ethereum.transaction
Submodules
----------
mythril.laser.ethereum.call module
----------------------------------
.. automodule:: mythril.laser.ethereum.call
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.cfg module
---------------------------------
.. automodule:: mythril.laser.ethereum.cfg
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.evm\_exceptions module
---------------------------------------------
.. automodule:: mythril.laser.ethereum.evm_exceptions
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.instruction\_data module
-----------------------------------------------
.. automodule:: mythril.laser.ethereum.instruction_data
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.instructions module
------------------------------------------
.. automodule:: mythril.laser.ethereum.instructions
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.natives module
-------------------------------------
.. automodule:: mythril.laser.ethereum.natives
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.svm module
---------------------------------
.. automodule:: mythril.laser.ethereum.svm
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.time\_handler module
-------------------------------------------
.. automodule:: mythril.laser.ethereum.time_handler
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.util module
----------------------------------
.. automodule:: mythril.laser.ethereum.util
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.ethereum
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.ethereum.state.rst
================================================
mythril.laser.ethereum.state package
====================================
Submodules
----------
mythril.laser.ethereum.state.account module
-------------------------------------------
.. automodule:: mythril.laser.ethereum.state.account
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.state.annotation module
----------------------------------------------
.. automodule:: mythril.laser.ethereum.state.annotation
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.state.calldata module
--------------------------------------------
.. automodule:: mythril.laser.ethereum.state.calldata
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.state.constraints module
-----------------------------------------------
.. automodule:: mythril.laser.ethereum.state.constraints
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.state.environment module
-----------------------------------------------
.. automodule:: mythril.laser.ethereum.state.environment
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.state.global\_state module
-------------------------------------------------
.. automodule:: mythril.laser.ethereum.state.global_state
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.state.machine\_state module
--------------------------------------------------
.. automodule:: mythril.laser.ethereum.state.machine_state
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.state.memory module
------------------------------------------
.. automodule:: mythril.laser.ethereum.state.memory
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.state.return\_data module
------------------------------------------------
.. automodule:: mythril.laser.ethereum.state.return_data
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.state.world\_state module
------------------------------------------------
.. automodule:: mythril.laser.ethereum.state.world_state
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.ethereum.state
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.ethereum.strategy.extensions.rst
================================================
mythril.laser.ethereum.strategy.extensions package
==================================================
Submodules
----------
mythril.laser.ethereum.strategy.extensions.bounded\_loops module
----------------------------------------------------------------
.. automodule:: mythril.laser.ethereum.strategy.extensions.bounded_loops
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.ethereum.strategy.extensions
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.ethereum.strategy.rst
================================================
mythril.laser.ethereum.strategy package
=======================================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.laser.ethereum.strategy.extensions
Submodules
----------
mythril.laser.ethereum.strategy.basic module
--------------------------------------------
.. automodule:: mythril.laser.ethereum.strategy.basic
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.strategy.beam module
-------------------------------------------
.. automodule:: mythril.laser.ethereum.strategy.beam
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.strategy.concolic module
-----------------------------------------------
.. automodule:: mythril.laser.ethereum.strategy.concolic
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.ethereum.strategy
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.ethereum.transaction.rst
================================================
mythril.laser.ethereum.transaction package
==========================================
Submodules
----------
mythril.laser.ethereum.transaction.concolic module
--------------------------------------------------
.. automodule:: mythril.laser.ethereum.transaction.concolic
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.transaction.symbolic module
--------------------------------------------------
.. automodule:: mythril.laser.ethereum.transaction.symbolic
:members:
:undoc-members:
:show-inheritance:
mythril.laser.ethereum.transaction.transaction\_models module
-------------------------------------------------------------
.. automodule:: mythril.laser.ethereum.transaction.transaction_models
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.ethereum.transaction
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.plugin.plugins.coverage.rst
================================================
mythril.laser.plugin.plugins.coverage package
=============================================
Submodules
----------
mythril.laser.plugin.plugins.coverage.coverage\_plugin module
-------------------------------------------------------------
.. automodule:: mythril.laser.plugin.plugins.coverage.coverage_plugin
:members:
:undoc-members:
:show-inheritance:
mythril.laser.plugin.plugins.coverage.coverage\_strategy module
---------------------------------------------------------------
.. automodule:: mythril.laser.plugin.plugins.coverage.coverage_strategy
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.plugin.plugins.coverage
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.plugin.plugins.rst
================================================
mythril.laser.plugin.plugins package
====================================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.laser.plugin.plugins.coverage
mythril.laser.plugin.plugins.summary_backup
Submodules
----------
mythril.laser.plugin.plugins.benchmark module
---------------------------------------------
.. automodule:: mythril.laser.plugin.plugins.benchmark
:members:
:undoc-members:
:show-inheritance:
mythril.laser.plugin.plugins.call\_depth\_limiter module
--------------------------------------------------------
.. automodule:: mythril.laser.plugin.plugins.call_depth_limiter
:members:
:undoc-members:
:show-inheritance:
mythril.laser.plugin.plugins.dependency\_pruner module
------------------------------------------------------
.. automodule:: mythril.laser.plugin.plugins.dependency_pruner
:members:
:undoc-members:
:show-inheritance:
mythril.laser.plugin.plugins.instruction\_profiler module
---------------------------------------------------------
.. automodule:: mythril.laser.plugin.plugins.instruction_profiler
:members:
:undoc-members:
:show-inheritance:
mythril.laser.plugin.plugins.mutation\_pruner module
----------------------------------------------------
.. automodule:: mythril.laser.plugin.plugins.mutation_pruner
:members:
:undoc-members:
:show-inheritance:
mythril.laser.plugin.plugins.plugin\_annotations module
-------------------------------------------------------
.. automodule:: mythril.laser.plugin.plugins.plugin_annotations
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.plugin.plugins
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.plugin.plugins.summary_backup.rst
================================================
mythril.laser.plugin.plugins.summary\_backup package
====================================================
Module contents
---------------
.. automodule:: mythril.laser.plugin.plugins.summary_backup
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.plugin.rst
================================================
mythril.laser.plugin package
============================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.laser.plugin.plugins
Submodules
----------
mythril.laser.plugin.builder module
-----------------------------------
.. automodule:: mythril.laser.plugin.builder
:members:
:undoc-members:
:show-inheritance:
mythril.laser.plugin.interface module
-------------------------------------
.. automodule:: mythril.laser.plugin.interface
:members:
:undoc-members:
:show-inheritance:
mythril.laser.plugin.loader module
----------------------------------
.. automodule:: mythril.laser.plugin.loader
:members:
:undoc-members:
:show-inheritance:
mythril.laser.plugin.signals module
-----------------------------------
.. automodule:: mythril.laser.plugin.signals
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.plugin
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.rst
================================================
mythril.laser package
=====================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.laser.ethereum
mythril.laser.plugin
mythril.laser.smt
Submodules
----------
mythril.laser.execution\_info module
------------------------------------
.. automodule:: mythril.laser.execution_info
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.smt.rst
================================================
mythril.laser.smt package
=========================
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.laser.smt.solver
Submodules
----------
mythril.laser.smt.array module
------------------------------
.. automodule:: mythril.laser.smt.array
:members:
:undoc-members:
:show-inheritance:
mythril.laser.smt.bitvec module
-------------------------------
.. automodule:: mythril.laser.smt.bitvec
:members:
:undoc-members:
:show-inheritance:
mythril.laser.smt.bitvec\_helper module
---------------------------------------
.. automodule:: mythril.laser.smt.bitvec_helper
:members:
:undoc-members:
:show-inheritance:
mythril.laser.smt.bool module
-----------------------------
.. automodule:: mythril.laser.smt.bool
:members:
:undoc-members:
:show-inheritance:
mythril.laser.smt.expression module
-----------------------------------
.. automodule:: mythril.laser.smt.expression
:members:
:undoc-members:
:show-inheritance:
mythril.laser.smt.function module
---------------------------------
.. automodule:: mythril.laser.smt.function
:members:
:undoc-members:
:show-inheritance:
mythril.laser.smt.model module
------------------------------
.. automodule:: mythril.laser.smt.model
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.smt
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.laser.smt.solver.rst
================================================
mythril.laser.smt.solver package
================================
Submodules
----------
mythril.laser.smt.solver.independence\_solver module
----------------------------------------------------
.. automodule:: mythril.laser.smt.solver.independence_solver
:members:
:undoc-members:
:show-inheritance:
mythril.laser.smt.solver.solver module
--------------------------------------
.. automodule:: mythril.laser.smt.solver.solver
:members:
:undoc-members:
:show-inheritance:
mythril.laser.smt.solver.solver\_statistics module
--------------------------------------------------
.. automodule:: mythril.laser.smt.solver.solver_statistics
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.laser.smt.solver
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.mythril.rst
================================================
mythril.mythril package
=======================
Submodules
----------
mythril.mythril.mythril\_analyzer module
----------------------------------------
.. automodule:: mythril.mythril.mythril_analyzer
:members:
:undoc-members:
:show-inheritance:
mythril.mythril.mythril\_config module
--------------------------------------
.. automodule:: mythril.mythril.mythril_config
:members:
:undoc-members:
:show-inheritance:
mythril.mythril.mythril\_disassembler module
--------------------------------------------
.. automodule:: mythril.mythril.mythril_disassembler
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.mythril
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.plugin.rst
================================================
mythril.plugin package
======================
Submodules
----------
mythril.plugin.discovery module
-------------------------------
.. automodule:: mythril.plugin.discovery
:members:
:undoc-members:
:show-inheritance:
mythril.plugin.interface module
-------------------------------
.. automodule:: mythril.plugin.interface
:members:
:undoc-members:
:show-inheritance:
mythril.plugin.loader module
----------------------------
.. automodule:: mythril.plugin.loader
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.plugin
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.rst
================================================
mythril package
===============
Subpackages
-----------
.. toctree::
:maxdepth: 4
mythril.analysis
mythril.concolic
mythril.disassembler
mythril.ethereum
mythril.interfaces
mythril.laser
mythril.mythril
mythril.plugin
mythril.solidity
mythril.support
Submodules
----------
mythril.exceptions module
-------------------------
.. automodule:: mythril.exceptions
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.solidity.rst
================================================
mythril.solidity package
========================
Submodules
----------
mythril.solidity.soliditycontract module
----------------------------------------
.. automodule:: mythril.solidity.soliditycontract
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.solidity
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/mythril.support.rst
================================================
mythril.support package
=======================
Submodules
----------
mythril.support.loader module
-----------------------------
.. automodule:: mythril.support.loader
:members:
:undoc-members:
:show-inheritance:
mythril.support.lock module
---------------------------
.. automodule:: mythril.support.lock
:members:
:undoc-members:
:show-inheritance:
mythril.support.model module
----------------------------
.. automodule:: mythril.support.model
:members:
:undoc-members:
:show-inheritance:
mythril.support.opcodes module
------------------------------
.. automodule:: mythril.support.opcodes
:members:
:undoc-members:
:show-inheritance:
mythril.support.signatures module
---------------------------------
.. automodule:: mythril.support.signatures
:members:
:undoc-members:
:show-inheritance:
mythril.support.source\_support module
--------------------------------------
.. automodule:: mythril.support.source_support
:members:
:undoc-members:
:show-inheritance:
mythril.support.start\_time module
----------------------------------
.. automodule:: mythril.support.start_time
:members:
:undoc-members:
:show-inheritance:
mythril.support.support\_args module
------------------------------------
.. automodule:: mythril.support.support_args
:members:
:undoc-members:
:show-inheritance:
mythril.support.support\_utils module
-------------------------------------
.. automodule:: mythril.support.support_utils
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: mythril.support
:members:
:undoc-members:
:show-inheritance:
================================================
FILE: docs/source/security-analysis.rst
================================================
Security Analysis
=================
Running :code:`myth analyze` with one of the input options described below will run the analysis modules in the `/analysis/modules <https://github.com/ConsenSys/mythril/tree/master/mythril/analysis/modules>`_ directory.
***********************
Analyzing Solidity Code
***********************
In order to work with Solidity source code files, the `solc command line compiler <https://solidity.readthedocs.io/en/develop/using-the-compiler.html>`_ needs to be installed and in PATH. You can then provide the source file(s) as positional arguments.
.. code-block:: bash
$ myth analyze ether_send.sol
==== Unprotected Ether Withdrawal ====
SWC ID: 105
Severity: High
Contract: Crowdfunding
Function name: withdrawfunds()
PC address: 730
Estimated Gas Usage: 1132 - 1743
Anyone can withdraw ETH from the contract account.
Arbitrary senders other than the contract creator can withdraw ETH from the contract account without previously having sent an equivalent amount of ETH to it. This is likely to be a vulnerability.
--------------------
In file: tests/testdata/input_contracts/ether_send.sol:21
msg.sender.transfer(address(this).balance)
--------------------
If an input file contains multiple contract definitions, Mythril analyzes the *last* bytecode output produced by solc. You can override this by specifying the contract name explicitly:
.. code-block:: bash
myth analyze OmiseGo.sol:OMGToken
Specifying Solc Versions
########################
You can specify a version of the solidity compiler to be used with :code:`--solv <version number>`. Please be aware that this uses `py-solc <https://github.com/ethereum/py-solc>`_ and will only work on Linux and macOS. It will check the version of solc in your path, and if this is not what is specified, it will download binaries on Linux or try to compile from source on macOS.
Output Formats
##############
By default, analysis results are printed to the terminal in text format. You can change the output format with the :code:`-o` argument:
.. code-block:: bash
myth analyze underflow.sol -o jsonv2
Available formats are :code:`text`, :code:`markdown`, :code:`json`, and :code:`jsonv2`. For integration with other tools, :code:`jsonv2` is generally preferred over :code:`json` because it is consistent with other `MythX <https://mythx.io>`_ tools.
****************************
Analyzing On-Chain Contracts
****************************
When analyzing contracts on the blockchain, Mythril will by default attempt to query INFURA. You can use the built-in INFURA support or manually configure the RPC settings with the :code:`--rpc` argument.
+-------------------------------------------------+-------------------------------------------------+
| :code:`--rpc ganache` | Connect to local Ganache |
+-------------------------------------------------+-------------------------------------------------+
| :code:`--rpc infura-[netname] --infura-id <ID>` | Connect to mainnet, rinkeby, kovan, or ropsten. |
+-------------------------------------------------+-------------------------------------------------+
| :code:`--rpc host:port` | Connect to custom rpc |
+-------------------------------------------------+-------------------------------------------------+
| :code:`--rpctls <True/False>` | RPC connection over TLS (default: False) |
+-------------------------------------------------+-------------------------------------------------+
To specify a contract address, use :code:`-a <address>`
Analyze mainnet contract via INFURA:
.. code-block:: bash
myth analyze -a 0x5c436ff914c458983414019195e0f4ecbef9e6dd --infura-id <ID>
You can also use the environment variable `INFURA_ID` instead of the cmd line argument or set it in ~/.mythril/config.ini.
.. code-block:: bash
myth -v4 analyze -a 0xEbFD99838cb0c132016B9E117563CB41f2B02264 --infura-id <ID>
******************
Speed vs. Coverage
******************
The execution timeout can be specified with the :code:`--execution-timeout <seconds>` argument. When the timeout is reached, mythril will stop analysis and print out all currently found issues.
The maximum recursion depth for the symbolic execution engine can be controlled with the :code:`--max-depth` argument. The default value is 22. Lowering this value will decrease the number of explored states and analysis time, while increasing this number will increase the number of explored states and increase analysis time. For some contracts, it helps to fine tune this number to get the best analysis results.
-
================================================
FILE: docs/source/tutorial.rst
================================================
Tutorial
======================
******************************************
Introduction
******************************************
Mythril is a popular security analysis tool for smart contracts. It is an open-source tool that can analyze Ethereum smart contracts and report potential security vulnerabilities in them. By analyzing the bytecode of a smart contract, Mythril can identify and report on possible security vulnerabilities, such as reentrancy attacks, integer overflows, and other common smart contract vulnerabilities.
This tutorial explains how to use Mythril to analyze simple Solidity contracts for security vulnerabilities. A simple contract is one that does not have any imports.
******************************************
Executing Mythril on Simple Contracts
******************************************
To start, we consider this simple contract, ``Exceptions``, which has a number of functions, including ``assert1()``, ``assert2()``, and ``assert3()``, that contain Solidity ``assert()`` statements. We will use Mythril to analyze this contract and report any potential vulnerabilities.
.. code-block:: solidity
contract Exceptions {
uint256[8] myarray;
uint counter = 0;
function assert1() public pure {
uint256 i = 1;
assert(i == 0);
}
function counter_increase() public {
counter+=1;
}
function assert5(uint input_x) public view{
require(counter>2);
assert(input_x > 10);
}
function assert2() public pure {
uint256 i = 1;
assert(i > 0);
}
function assert3(uint256 input) public pure {
assert(input != 23);
}
function require_is_fine(uint256 input) public pure {
require(input != 23);
}
function this_is_fine(uint256 input) public pure {
if (input > 0) {
uint256 i = 1/input;
}
}
function this_is_find_2(uint256 index) public view {
if (index < 8) {
uint256 i = myarray[index];
}
}
}
The sample contract has several functions, some of which contain vulnerabilities. For instance, the ``assert1()`` function contains an assertion violation. To analyze the contract using Mythril, the following command can be used:
.. code-block:: bash
$ myth analyze <file_path>
The output will show the vulnerabilities in the contract. In the case of the "Exceptions" contract, Mythril detected two instances of assertion violations.
.. code-block:: none
==== Exception State ====
SWC ID: 110
Severity: Medium
Contract: Exceptions
Function name: assert1()
PC address: 708
Estimated Gas Usage: 207 - 492
An assertion violation was triggered.
It is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).
--------------------
In file: solidity_examples/exceptions.sol:7
assert(i == 0)
--------------------
Initial State:
Account: [CREATOR], balance: 0x2, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
Transaction Sequence:
Caller: [CREATOR], calldata: , value: 0x0
Caller: [ATTACKER], function: assert1(), txdata: 0xb34c3610, value: 0x0
==== Exception State ====
SWC ID: 110
Severity: Medium
Contract: Exceptions
Function name: assert3(uint256)
PC address: 708
Estimated Gas Usage: 482 - 767
An assertion violation was triggered.
It is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).
--------------------
In file: solidity_examples/exceptions.sol:20
assert(input != 23)
--------------------
Initial State:
Account: [CREATOR], balance: 0x40207f9b0, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
Transaction Sequence:
Caller: [CREATOR], calldata: , value: 0x0
Caller: [SOMEGUY], function: assert3(uint256), txdata: 0x546455b50000000000000000000000000000000000000000000000000000000000000017, value: 0x0
One of the functions, ``assert5(uint256)``, should also have an assertion failure, but it is not detected because Mythril's default configuration is to run three transactions.
To detect this vulnerability, the transaction count can be increased to four using the ``-t`` option, as shown below:
.. code-block:: bash
$ myth analyze <file_path> -t 4
This gives the following execution output:
.. code-block:: none
==== Exception State ====
SWC ID: 110
Severity: Medium
Contract: Exceptions
Function name: assert1()
PC address: 731
Estimated Gas Usage: 207 - 492
An assertion violation was triggered.
It is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).
--------------------
In file: solidity_examples/exceptions.sol:7
assert(i == 0)
--------------------
Initial State:
Account: [CREATOR], balance: 0x2, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
Transaction Sequence:
Caller: [CREATOR], calldata: , value: 0x0
Caller: [ATTACKER], function: assert1(), txdata: 0xb34c3610, value: 0x0
==== Exception State ====
SWC ID: 110
Severity: Medium
Contract: Exceptions
Function name: assert3(uint256)
PC address: 731
Estimated Gas Usage: 504 - 789
An assertion violation was triggered.
It is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).
--------------------
In file: solidity_examples/exceptions.sol:22
assert(input != 23)
--------------------
Initial State:
Account: [CREATOR], balance: 0x3, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
Transaction Sequence:
Caller: [CREATOR], calldata: , value: 0x0
Caller: [ATTACKER], function: assert3(uint256), txdata: 0x546455b50000000000000000000000000000000000000000000000000000000000000017, value: 0x0
==== Exception State ====
SWC ID: 110
Severity: Medium
Contract: Exceptions
Function name: assert5(uint256)
PC address: 731
Estimated Gas Usage: 1302 - 1587
An assertion violation was triggered.
It is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).
--------------------
In file: solidity_examples/exceptions.sol:14
assert(input_x > 10)
--------------------
Initial State:
Account: [CREATOR], balance: 0x20000000, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x1000000, nonce:0, storage:{}
Transaction Sequence:
Caller: [CREATOR], calldata: , value: 0x0
Caller: [ATTACKER], function: counter_increase(), txdata: 0xe47b0253, value: 0x0
Caller: [CREATOR], function: counter_increase(), txdata: 0xe47b0253, value: 0x0
Caller: [CREATOR], function: counter_increase(), txdata: 0xe47b0253, value: 0x0
Caller: [ATTACKER], function: assert5(uint256), txdata: 0x1d5d53dd0000000000000000000000000000000000000000000000000000000000000003, value: 0x0
For the violation in the 4th transaction, the input value should be less than 10. The transaction data generated by Mythril for the
4th transaction is ``0x1d5d53dd0000000000000000000000000000000000000000000000000000000000000003``, the first 4 bytes ``1d5d53dd``
correspond to the function signature hence the input generated by Mythril is ``0000000000000000000000000000000000000000000000000000000000000003``
in hex, which is 3. For automated resolution of the input try using a different output format such as JSON.
.. code-block:: bash
$ myth analyze <file_path> -o json
This leads to the following output:
.. code-block:: json
{
"error": null,
"issues": [{
"address": 731,
"code": "assert(i == 0)",
"contract": "Exceptions",
"description": "An assertion violation was triggered.\nIt is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).",
"filename": "solidity_examples/exceptions.sol",
"function": "assert1()",
"lineno": 7,
"max_gas_used": 492,
"min_gas_used": 207,
"severity": "Medium",
"sourceMap": ":::i",
"swc-id": "110",
"title": "Exception State",
"tx_sequence": {
"initialState": {
"accounts": {
"0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe": {
"balance": "0x2",
"code": "",
"nonce": 0,
"storage": "{}"
},
"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef": {
"balance": "0x0",
"code": "",
"nonce": 0,
"storage": "{}"
}
}
},
"steps": [{
"address": "",
"calldata": "",
"input": "0x6080604052600060085534801561001557600080fd5b506103f7806100256000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063b34c36101161005b578063b34c3610146100fd578063b630d70614610107578063e47b025314610123578063f44f13d81461012d57610088565b806301d4277c1461008d5780631d5d53dd146100a9578063546455b5146100c557806378375f14146100e1575b600080fd5b6100a760048036038101906100a29190610251565b610137565b005b6100c360048036038101906100be9190610251565b61015e565b005b6100df60048036038101906100da9190610251565b610181565b005b6100fb60048036038101906100f69190610251565b610196565b005b6101056101a7565b005b610121600480360381019061011c9190610251565b6101c1565b005b61012b6101e0565b005b6101356101fc565b005b600881101561015b5760008082600881106101555761015461027e565b5b01549050505b50565b60026008541161016d57600080fd5b600a811161017e5761017d6102ad565b5b50565b6017811415610193576101926102ad565b5b50565b60178114156101a457600080fd5b50565b600060019050600081146101be576101bd6102ad565b5b50565b60008111156101dd5760008160016101d9919061033a565b9050505b50565b6001600860008282546101f3919061036b565b92505081905550565b60006001905060008111610213576102126102ad565b5b50565b600080fd5b6000819050919050565b61022e8161021b565b811461023957600080fd5b50565b60008135905061024b81610225565b92915050565b60006020828403121561026757610266610216565b5b60006102758482850161023c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006103458261021b565b91506103508361021b565b9250826103605761035f6102dc565b5b828204905092915050565b60006103768261021b565b91506103818361021b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156103b6576103b561030b565b5b82820190509291505056fea2646970667358221220b474c01fa60d997027e1ceb779bcb2b34b6752282e0ea3a038a08b889fe0163f64736f6c634300080c0033",
"name": "unknown",
"origin": "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe",
"value": "0x0"
}, {
"address": "0x901d12ebe1b195e5aa8748e62bd7734ae19b51f",
"calldata": "0xb34c3610",
"input": "0xb34c3610",
"name": "assert1()",
"origin": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"resolved_input": null,
"value": "0x0"
}]
}
}, {
"address": 731,
"code": "assert(input != 23)",
"contract": "Exceptions",
"description": "An assertion violation was triggered.\nIt is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).",
"filename": "solidity_examples/exceptions.sol",
"function": "assert3(uint256)",
"lineno": 22,
"max_gas_used": 789,
"min_gas_used": 504,
"severity": "Medium",
"sourceMap": ":::i",
"swc-id": "110",
"title": "Exception State",
"tx_sequence": {
"initialState": {
"accounts": {
"0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe": {
"balance": "0x3",
"code": "",
"nonce": 0,
"storage": "{}"
},
"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef": {
"balance": "0x0",
"code": "",
"nonce": 0,
"storage": "{}"
}
}
},
"steps": [{
"address": "",
"calldata": "",
"input": "0x6080604052600060085534801561001557600080fd5b506103f7806100256000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063b34c36101161005b578063b34c3610146100fd578063b630d70614610107578063e47b025314610123578063f44f13d81461012d57610088565b806301d4277c1461008d5780631d5d53dd146100a9578063546455b5146100c557806378375f14146100e1575b600080fd5b6100a760048036038101906100a29190610251565b610137565b005b6100c360048036038101906100be9190610251565b61015e565b005b6100df60048036038101906100da9190610251565b610181565b005b6100fb60048036038101906100f69190610251565b610196565b005b6101056101a7565b005b610121600480360381019061011c9190610251565b6101c1565b005b61012b6101e0565b005b6101356101fc565b005b600881101561015b5760008082600881106101555761015461027e565b5b01549050505b50565b60026008541161016d57600080fd5b600a811161017e5761017d6102ad565b5b50565b6017811415610193576101926102ad565b5b50565b60178114156101a457600080fd5b50565b600060019050600081146101be576101bd6102ad565b5b50565b60008111156101dd5760008160016101d9919061033a565b9050505b50565b6001600860008282546101f3919061036b565b92505081905550565b60006001905060008111610213576102126102ad565b5b50565b600080fd5b6000819050919050565b61022e8161021b565b811461023957600080fd5b50565b60008135905061024b81610225565b92915050565b60006020828403121561026757610266610216565b5b60006102758482850161023c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006103458261021b565b91506103508361021b565b9250826103605761035f6102dc565b5b828204905092915050565b60006103768261021b565b91506103818361021b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156103b6576103b561030b565b5b82820190509291505056fea2646970667358221220b474c01fa60d997027e1ceb779bcb2b34b6752282e0ea3a038a08b889fe0163f64736f6c634300080c0033",
"name": "unknown",
"origin": "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe",
"value": "0x0"
}, {
"address": "0x901d12ebe1b195e5aa8748e62bd7734ae19b51f",
"calldata": "0x546455b50000000000000000000000000000000000000000000000000000000000000017",
"input": "0x546455b50000000000000000000000000000000000000000000000000000000000000017",
"name": "assert3(uint256)",
"origin": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"resolved_input": [23],
"value": "0x0"
}]
}
}, {
"address": 731,
"code": "assert(input_x > 10)",
"contract": "Exceptions",
"description": "An assertion violation was triggered.\nIt is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).",
"filename": "solidity_examples/exceptions.sol",
"function": "assert5(uint256)",
"lineno": 14,
"max_gas_used": 1587,
"min_gas_used": 1302,
"severity": "Medium",
"sourceMap": ":::i",
"swc-id": "110",
"title": "Exception State",
"tx_sequence": {
"initialState": {
"accounts": {
"0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe": {
"balance": "0x0",
"code": "",
"nonce": 0,
"storage": "{}"
},
"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef": {
"balance": "0x0",
"code": "",
"nonce": 0,
"storage": "{}"
}
}
},
"steps": [{
"address": "",
"calldata": "",
"input": "0x6080604052600060085534801561001557600080fd5b506103f7806100256000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063b34c36101161005b578063b34c3610146100fd578063b630d70614610107578063e47b025314610123578063f44f13d81461012d57610088565b806301d4277c1461008d5780631d5d53dd146100a9578063546455b5146100c557806378375f14146100e1575b600080fd5b6100a760048036038101906100a29190610251565b610137565b005b6100c360048036038101906100be9190610251565b61015e565b005b6100df60048036038101906100da9190610251565b610181565b005b6100fb60048036038101906100f69190610251565b610196565b005b6101056101a7565b005b610121600480360381019061011c9190610251565b6101c1565b005b61012b6101e0565b005b6101356101fc565b005b600881101561015b5760008082600881106101555761015461027e565b5b01549050505b50565b60026008541161016d57600080fd5b600a811161017e5761017d6102ad565b5b50565b6017811415610193576101926102ad565b5b50565b60178114156101a457600080fd5b50565b600060019050600081146101be576101bd6102ad565b5b50565b60008111156101dd5760008160016101d9919061033a565b9050505b50565b6001600860008282546101f3919061036b565b92505081905550565b60006001905060008111610213576102126102ad565b5b50565b600080fd5b6000819050919050565b61022e8161021b565b811461023957600080fd5b50565b60008135905061024b81610225565b92915050565b60006020828403121561026757610266610216565b5b60006102758482850161023c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006103458261021b565b91506103508361021b565b9250826103605761035f6102dc565b5b828204905092915050565b60006103768261021b565b91506103818361021b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156103b6576103b561030b565b5b82820190509291505056fea2646970667358221220b474c01fa60d997027e1ceb779bcb2b34b6752282e0ea3a038a08b889fe0163f64736f6c634300080c0033",
"name": "unknown",
"origin": "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe",
"value": "0x0"
}, {
"address": "0x901d12ebe1b195e5aa8748e62bd7734ae19b51f",
"calldata": "0xe47b0253",
"input": "0xe47b0253",
"name": "counter_increase()",
"origin": "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe",
"resolved_input": null,
"value": "0x0"
}, {
"address": "0x901d12ebe1b195e5aa8748e62bd7734ae19b51f",
"calldata": "0xe47b0253",
"input": "0xe47b0253",
"name": "counter_increase()",
"origin": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"resolved_input": null,
"value": "0x0"
}, {
"address": "0x901d12ebe1b195e5aa8748e62bd7734ae19b51f",
"calldata": "0xe47b0253",
"input": "0xe47b0253",
"name": "counter_increase()",
"origin": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"resolved_input": null,
"value": "0x0"
}, {
"address": "0x901d12ebe1b195e5aa8748e62bd7734ae19b51f",
"calldata": "0x1d5d53dd0000000000000000000000000000000000000000000000000000000000000003",
"input": "0x1d5d53dd0000000000000000000000000000000000000000000000000000000000000003",
"name": "assert5(uint256)",
"origin": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"resolved_input": [3],
"value": "0x0"
}]
}
}],
"success": true
}
We can observe that the "resolved_input" field for the final transaction resolves to ``[3]``. Although this resolution
fails in some circumstances where output generated by Mythril is although executable on the bytecode, it cannot be decoded due
to not being a valid ABI.
There are interesting options such as ``--execution-timeout <seconds>`` and ``--solver-timeout <milliseconds>``
which can be increased for better results. The default execution-timeout and solver-timeout are 86400 seconds and
25000 milliseconds respectively.
********************************************************
Executing Mythril on Contracts with Imports
********************************************************
When using Mythril to analyze a Solidity contract, you may encounter issues related to import statements. Solidity does not have access to the import locations, which can result in errors when compiling the program. In order to provide import information to Solidity, you can use the remappings option in Mythril.
Consider the following Solidity contract, which imports the PRC20 contract from the ``@openzeppelin/contracts/token/PRC20/PRC20.sol`` file:
.. code-block:: solidity
import "@openzeppelin/contracts/token/PRC20/PRC20.sol";
contract Nothing is PRC20{
string x_0 = "";
bytes3 x_1 = "A";
bytes5 x_2 = "E";
bytes5 x_3 = "";
bytes3 x_4 = "I";
bytes3 x_5 = "U";
bytes3 x_6 = "O";
bytes3 x_7 = "0";
bytes3 x_8 = "U";
bytes3 x_9 = "U";
function stringCompare(string memory a, string memory b) internal pure returns (bool) {
if(bytes(a).length != bytes(b).length) {
return false;
} else {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}
function nothing(string memory g_0, bytes3 g_5, bytes3 g_6, bytes3 g_7, bytes3 g_8, bytes3 g_9, bytes3 g_10, bytes3 g_11) public view returns (bool){
if (!stringCompare(g_0, x_0)) return false;
if (g_5 != x_5) return false;
if (g_6 != x_6) return false;
if (g_7 != x_7) return false;
if (g_8 != x_8) return false;
if (g_9 != x_9) return false;
if (g_10 != x_9) return false;
if (g_11 != x_9) return false;
return true;
}
}
When this contract is directly executed by using the following command:
.. code-block:: bash
$ myth analyze <file_path>
We encounter the following error:
.. code-block:: none
mythril.interfaces.cli [ERROR]: Solc experienced a fatal error.
ParserError: Source "@openzeppelin/contracts/token/PRC20/PRC20.sol" not found: File not found. Searched the following locations: "".
--> <file_path>:1:1:
|
1 | import "@openzeppelin/contracts/token/PRC20/PRC20.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This error occurs because Solidity cannot locate the ``PRC20.sol`` file.
To solve this issue, you need to provide remapping information to Mythril, which will relay it to the Solidity compiler.
Remapping involves mapping an import statement to the path that contains the corresponding file.
In this example, we can map the import statement ``@openzeppelin/contracts/token/PRC20/`` to the path that contains ``PRC20.sol``. Let's assume that the file is located at ``node_modules/PRC20/PRC20.sol``. We can provide the remapping information to Mythril in a JSON file like this:
.. code-block:: json
{
"remappings": [ "@openzeppelin/contracts/token/PRC20/=node_modules/PRC20/"]
}
This JSON file maps the prefix ``@openzeppelin/contracts/token/PRC20/`` to the path ``node_modules/PRC20/`` in the file system.
When you run Mythril, you can use the ``--solc-json`` option to provide the remapping file:
.. code-block:: bash
$ myth analyze {file_path} --solc-json {json_file_path}
With this command, Mythril will be able to locate the ``PRC20.sol`` file, and the analysis should proceed without errors.
For more information on remappings, you can refer to the `Solidity documentation <https://docs.soliditylang.org/en/v0.8.14/using-the-compiler.html#base-path-and-import-remapping>`_.
********************************************************
Executing Mythril by Restricting Transaction Sequences
********************************************************
Mythril is a security analysis tool that can be used to search certain transaction sequences.
The `--transaction-sequences` argument can be used to direct the search.
You should provide a list of transactions that are sequenced in the same order that they will be executed in the contract.
For example, suppose you want to find vulnerabilities in a contract that executes three transactions, where the first transaction is constrained with ``func_hash1`` and ``func_hash2``,
the second transaction is constrained with ``func_hash2`` and ``func_hash3``, and the final transaction is unconstrained on any function. You would provide ``--transaction-sequences [[func_hash1,func_hash2], [func_hash2,func_hash3],[]]`` as an argument to Mythril.
You can use ``-1`` as a proxy for the hash of the `fallback()` function and ``-2`` as a proxy for the hash of the ``receive()`` function.
Here is an example contract that demonstrates how to use Mythril with ``--transaction-sequences``.
Consider the following contract:
.. code-block:: solidity
pragma solidity ^0.5.0;
contract Rubixi {
//Declare variables for storage critical to contract
uint private balance = 0;
uint private collectedFees = 0;
uint private feePercent = 10;
uint private pyramidMultiplier = 300;
uint private payoutOrder = 0;
address payable private creator;
modifier onlyowner {
if (msg.sender == creator) _;
}
struct Participant {
address payable etherAddress;
uint payout;
}
//Fallback function
function() external payable {
init();
}
//Sets creator
function dynamicPyramid() public {
creator = msg.sender;
}
Participant[] private participants;
//Fee functions for creator
function collectAllFees() public onlyowner {
require(collectedFees > 0);
creator.transfer(collectedFees);
collectedFees = 0;
}
function collectFeesInEther(uint _amt) public onlyowner {
_amt *= 1 ether;
if (_amt > collectedFees) collectAllFees();
require(collectedFees > 0);
creator.transfer(_amt);
collectedFees -= _amt;
}
function collectPercentOfFees(uint _pcent) public onlyowner {
require(collectedFees > 0 && _pcent <= 100);
uint feesToCollect = collectedFees / 100 * _pcent;
creator.transfer(feesToCollect);
collectedFees -= feesToCollect;
}
//Functions for changing variables related to the contract
function changeOwner(address payable _owner) public onlyowner {
creator = _owner;
}
function changeMultiplier(uint _mult) public onlyowner {
require(_mult <= 300 && _mult >= 120);
pyramidMultiplier = _mult;
}
function changeFeePercentage(uint _fee) public onlyowner {
require(_fee <= 10);
feePercent = _fee;
}
//Functions to provide information to end-user using JSON interface or other interfaces
function currentMultiplier() public view returns (uint multiplier, string memory info) {
multiplier = pyramidMultiplier;
info = "This multiplier applies to you as soon as transaction is received, may be lowered to hasten payouts or increased if payouts are fast enough. Due to no float or decimals, multiplier is x100 for a fractional multiplier e.g. 250 is actually a 2.5x multiplier. Capped at 3x max and 1.2x min.";
}
function currentFeePercentage() public view returns (uint fee, string memory info) {
fee = feePercent;
info = "Shown in % form. Fee is halved(50%) for amounts equal or greater than 50 ethers. (Fee may change, but is capped to a maximum of 10%)";
}
function currentPyramidBalanceApproximately() public view returns (uint pyramidBalance, string memory info) {
pyramidBalance = balance / 1 ether;
info = "All balance values are measured in Ethers, note that due to no decimal placing, these values show up as integers only, within the contract itself you will get the exact decimal value you are supposed to";
}
function nextPayoutWhenPyramidBalanceTotalsApproximately() public view returns (uint balancePayout) {
balancePayout = participants[payoutOrder].payout / 1 ether;
}
function feesSeperateFromBalanceApproximately() public view returns (uint fees) {
fees = collectedFees / 1 ether;
}
function totalParticipants() public view returns (uint count) {
count = participants.length;
}
function numberOfParticipantsWaitingForPayout() public view returns (uint count) {
count = participants.length - payoutOrder;
}
function participantDetails(uint orderInPyramid) public view returns (address addr, uint payout) {
if (orderInPyramid <= participants.length) {
addr = participants[orderInPyramid].etherAddress;
payout = participants[orderInPyramid].payout / 1 ether;
}
}
//init function run on fallback
function init() private {
//Ensures only tx with value of 1 ether or greater are processed and added to pyramid
if (msg.value < 1 ether) {
collectedFees += msg.value;
return;
}
uint _fee = feePercent;
// 50% fee rebate on any ether value of 50 or greater
if (msg.value >= 50 ether) _fee /= 2;
addPayout(_fee);
}
//Function called for valid tx to the contract
function addPayout(uint _fee) private {
//Adds new address to participant array
participants.push(Participant(msg.sender, (msg.value * pyramidMultiplier) / 100));
// These statements ensure a quicker payout system to
// later pyramid entrants, so the pyramid has a longer lifespan
if (participants.length == 10) pyramidMultiplier = 200;
else if (participants.length == 25) pyramidMultiplier = 150;
// collect fees and update contract balance
balance += (msg.value * (100 - _fee)) / 100;
collectedFees += (msg.value * _fee) / 100;
//Pays earlier participiants if balance sufficient
while (balance > participants[payoutOrder].payout) {
uint payoutToSend = participants[payoutOrder].payout;
participants[payoutOrder].etherAddress.transfer(payoutToSend);
balance -= participants[payoutOrder].payout;
payoutOrder += 1;
}
}
}
Since this contract has ``16`` functions, it is infeasible to execute uninteresting functions such as ``feesSeperateFromBalanceApproximately()``.
To successfully explore useful transaction sequences we can use Mythril's ``--transaction-sequences`` argument.
.. code-block:: bash
$ myth analyze rubixi.sol -t 3 --transaction-sequences [["0x89b8ae9b"],[-1],["0x686f2c90","0xb4022950","0x4229616d"]]
The first transaction is constrained to the function ``dynamicPyramid()``, the second one to the ``fallback()`` function, and finally, the third transaction is constrained to``collectAllFees()``, ``collectFeesInEther(uint256)`` and ``collectPercentOfFees(uint256)``.
Make sure to use ``-t 3`` argument, since the length of the transaction sequence should match with the transaction count argument.
================================================
FILE: mypy-stubs/z3/__init__.pyi
================================================
from typing import (
Any,
Iterable,
Iterator,
List,
Optional,
Sequence,
Tuple,
TypeVar,
Union,
overload,
)
from .z3types import Ast, ContextObj
class Context: ...
class Z3PPObject: ...
class AstRef(Z3PPObject):
@overload
def __init__(self, ast: Ast, ctx: Context) -> None:
self.ast: Ast = ...
self.ctx: Context = ...
@overload
def __init__(self, ast: Ast) -> None:
self.ast: Ast = ...
self.ctx: Context = ...
def ctx_ref(self) -> ContextObj: ...
def as_ast(self) -> Ast: ...
def children(self) -> List[AstRef]: ...
def eq(self, other: AstRef) -> bool: ...
# TODO: Cannot add __eq__ currently: mypy complains conflict with
# object.__eq__ signature
# def __eq__(self, other: object) -> ArithRef: ...
class SortRef(AstRef): ...
class FuncDeclRef(AstRef):
def arity(self) -> int: ...
def name(self) -> str: ...
def __call__(self, *args: ExprRef) -> ExprRef: ...
class ExprRef(AstRef):
def sort(self) -> SortRef: ...
def decl(self) -> FuncDeclRef: ...
class BoolSortRef(SortRef): ...
class ArraySortRef(SortRef): ...
class BoolRef(ExprRef): ...
def is_true(a: BoolRef) -> bool: ...
def is_false(a: BoolRef) -> bool: ...
def is_int_value(a: AstRef) -> bool: ...
def substitute(a: AstRef, *m: Tuple[AstRef, AstRef]) -> AstRef: ...
def simplify(a: AstRef, *args: Any, **kwargs: Any) -> AstRef: ...
class ArithSortRef(SortRef): ...
class ArithRef(ExprRef):
def __neg__(self) -> ExprRef: ...
def __le__(self, other: ArithRef) -> BoolRef: ...
def __lt__(self, other: ArithRef) -> BoolRef: ...
def __ge__(self, other: ArithRef) -> BoolRef: ...
def __gt__(self, other: ArithRef) -> BoolRef: ...
def __add__(self, other: ArithRef) -> ArithRef: ...
def __sub__(self, other: ArithRef) -> ArithRef: ...
def __mul__(self, other: ArithRef) -> ArithRef: ...
def __div__(self, other: ArithRef) -> ArithRef: ...
def __truediv__(self, other: ArithRef) -> ArithRef: ...
def __mod__(self, other: ArithRef) -> ArithRef: ...
class BitVecSortRef(SortRef): ...
class BitVecRef(ExprRef):
def size(self) -> int: ...
def __add__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __radd__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __mul__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __rmul__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __sub__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __rsub__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __or__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __ror__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __and__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __rand__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __xor__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __rxor__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
def __pos__(self) -> BitVecRef: ...
def __neg__(self) -> BitVecRef: ...
def __invert__(self) -> BitVecRef: ...
def __div__(self, other: BitVecRef) -> BitVecRef: ...
def __rdiv__(self, other: BitVecRef) -> BitVecRef: ...
def __truediv__(self, other: BitVecRef) -> BitVecRef: ...
def __rtruediv__(self, other: BitVecRef) -> BitVecRef: ...
def __mod__(self, other: BitVecRef) -> BitVecRef: ...
def __rmod__(self, other: BitVecRef) -> BitVecRef: ...
def __le__(self, other: BitVecRef) -> BoolRef: ...
def __lt__(self, other: BitVecRef) -> BoolRef: ...
def __ge__(self, other: BitVecRef) -> BoolRef: ...
def __gt__(self, other: BitVecRef) -> BoolRef: ...
def __rshift__(self, other: BitVecRef) -> BitVecRef: ...
def __lshift__(self, other: BitVecRef) -> BitVecRef: ...
def __rrshift__(self, other: BitVecRef) -> BitVecRef: ...
def __rlshift__(self, other: BitVecRef) -> BitVecRef: ...
class BitVecNumRef(BitVecRef):
def as_long(self) -> int: ...
def as_signed_long(self) -> int: ...
def as_string(self) -> str: ...
class IntNumRef(ArithRef):
def as_long(self) -> int: ...
def as_string(self) -> str: ...
class SeqSortRef(ExprRef): ...
class SeqRef(ExprRef): ...
class ReSortRef(ExprRef): ...
class ReRef(ExprRef): ...
class ArrayRef(ExprRef): ...
class CheckSatResult: ...
class ModelRef(Z3PPObject):
def __getitem__(self, k: FuncDeclRef) -> IntNumRef: ...
def decls(self) -> Iterable[FuncDeclRef]: ...
def __iter__(self) -> Iterator[FuncDeclRef]: ...
class FuncEntry:
def num_args(self) -> int: ...
def arg_value(self, idx: int) -> ExprRef: ...
def value(self) -> ExprRef: ...
class FuncInterp(Z3PPObject):
def else_value(self) -> ExprRef: ...
def num_entries(self) -> int: ...
def arity(self) -> int: ...
def entry(self, idx: int) -> FuncEntry: ...
class Goal(Z3PPObject): ...
class Solver(Z3PPObject):
ctx: Context
def __init__(self, ctx: Optional[Context] = None) -> None: ...
def to_smt2(self) -> str: ...
def check(self) -> CheckSatResult: ...
def push(self) -> None: ...
def pop(self, num: Optional[int] = 1) -> None: ...
def model(self) -> ModelRef: ...
def set(self, *args: Any, **kwargs: Any) -> None: ...
@overload
def add(self, *args: Union[BoolRef, Goal]) -> None: ...
@overload
def add(self, args: Sequence[Union[BoolRef, Goal]]) -> None: ...
def reset(self) -> None: ...
class Optimize(Z3PPObject):
ctx: Context
def __init__(self, ctx: Optional[Context] = None) -> None: ...
def check(self) -> CheckSatResult: ...
def push(self) -> None: ...
def pop(self) -> None: ...
def model(self) -> ModelRef: ...
def set(self, *args: Any, **kwargs: Any) -> None: ...
@overload
def add(self, *args: Union[BoolRef, Goal]) -> None: ...
@overload
def add(self, args: Sequence[Union[BoolRef, Goal]]) -> None: ...
def minimize(self, element: ExprRef) -> None: ...
def maximize(self, element: ExprRef) -> None: ...
sat: CheckSatResult = ...
unsat: CheckSatResult = ...
@overload
def Int(name: str) -> ArithRef: ...
@overload
def Int(name: str, ctx: Context) -> ArithRef: ...
@overload
def Bool(name: str) -> BoolRef: ...
@overload
def Bool(name: str, ctx: Context) -> BoolRef: ...
@overload
def parse_smt2_string(s: str) -> ExprRef: ...
@overload
def parse_smt2_string(s: str, ctx: Context) -> ExprRef: ...
def Array(name: str, domain: SortRef, range: SortRef) -> ArrayRef: ...
def K(domain: SortRef, v: Union[ExprRef, int, bool, str]) -> ArrayRef: ...
# Can't give more precise types here since func signature is
# a vararg list of ExprRef optionally followed by a Context
def Or(*args: Any) -> BoolRef: ...
def And(*args: Any) -> BoolRef: ...
def Not(p: BoolRef, ctx: Optional[Context] = None) -> BoolRef: ...
def Implies(a: BoolRef, b: BoolRef, ctx: Context) -> BoolRef: ...
T = TypeVar("T", bound=ExprRef)
def If(a: BoolRef, b: T, c: T, ctx: Optional[Context] = None) -> T: ...
def ULE(a: T, b: T) -> BoolRef: ...
def ULT(a: T, b: T) -> BoolRef: ...
def UGE(a: T, b: T) -> BoolRef: ...
def UGT(a: T, b: T) -> BoolRef: ...
def UDiv(a: T, b: T) -> T: ...
def URem(a: T, b: T) -> T: ...
def SRem(a: T, b: T) -> T: ...
def LShR(a: T, b: T) -> T: ...
def RotateLeft(a: T, b: T) -> T: ...
def RotateRight(a: T, b: T) -> T: ...
def SignExt(n: int, a: BitVecRef) -> BitVecRef: ...
def ZeroExt(n: int, a: BitVecRef) -> BitVecRef: ...
@overload
def Concat(args: List[Union[SeqRef, str]]) -> SeqRef: ...
@overload
def Concat(*args: Union[SeqRef, str]) -> SeqRef: ...
@overload
def Concat(args: List[ReRef]) -> ReRef: ...
@overload
def Concat(*args: ReRef) -> ReRef: ...
@overload
def Concat(args: List[BitVecRef]) -> BitVecRef: ...
@overload
def Concat(*args: BitVecRef) -> BitVecRef: ...
@overload
def Extract(
high: Union[SeqRef], lo: Union[int, ArithRef], a: Union[int, ArithRef]
) -> SeqRef: ...
@overload
def Extract(
high: Union[int, ArithRef], lo: Union[int, ArithRef], a: BitVecRef
) -> BitVecRef: ...
@overload
def Sum(arg: BitVecRef, *args: Union[BitVecRef, int]) -> BitVecRef: ...
@overload
def Sum(arg: Union[List[BitVecRef], int]) -> BitVecRef: ...
@overload
def Sum(arg: ArithRef, *args: Union[ArithRef, int]) -> ArithRef: ...
# Can't include this overload as it overlaps with the second overload.
# @overload
# def Sum(arg: Union[List[ArithRef], int]) -> ArithRef: ...
def Function(name: str, *sig: SortRef) -> FuncDeclRef: ...
def IntVal(val: int, ctx: Optional[Context] = None) -> IntNumRef: ...
def BoolVal(val: bool, ctx: Optional[Context] = None) -> BoolRef: ...
def BitVecVal(
val: int, bv: Union[int, BitVecSortRef], ctx: Optional[Context] = None
) -> BitVecRef: ...
def BitVec(
val: str, bv: Union[int, BitVecSortRef], ctx: Optional[Context] = None
) -> BitVecRef: ...
def IntSort(ctx: Optional[Context] = None) -> ArithSortRef: ...
def BoolSort(ctx: Optional[Context] = None) -> BoolSortRef: ...
def ArraySort(domain: SortRef, range: SortRef) -> ArraySortRef: ...
def BitVecSort(domain: int, ctx: Optional[Context] = None) -> BoolSortRef: ...
def ForAll(vs: List[ExprRef], expr: ExprRef) -> ExprRef: ...
def Select(arr: ExprRef, ind: ExprRef) -> ExprRef: ...
def Update(arr: ArrayRef, ind: ExprRef, newVal: ExprRef) -> ArrayRef: ...
def Store(arr: ArrayRef, ind: ExprRef, newVal: ExprRef) -> ArrayRef: ...
def BVAddNoOverflow(a: BitVecRef, b: BitVecRef, signed: bool) -> BoolRef: ...
def BVAddNoUnderflow(a: BitVecRef, b: BitVecRef) -> BoolRef: ...
def BVSubNoOverflow(a: BitVecRef, b: BitVecRef) -> BoolRef: ...
def BVSubNoUnderflow(a: BitVecRef, b: BitVecRef, signed: bool) -> BoolRef: ...
def BVSDivNoOverflow(a: BitVecRef, b: BitVecRef) -> BoolRef: ...
def BVSNegNoOverflow(a: BitVecRef) -> BoolRef: ...
def BVMulNoOverflow(a: BitVecRef, b: BitVecRef, signed: bool) -> BoolRef: ...
def BVMulNoUnderflow(a: BitVecRef, b: BitVecRef) -> BoolRef: ...
================================================
FILE: mypy-stubs/z3/z3core.pyi
================================================
from .z3types import Ast, ContextObj
def Z3_mk_eq(ctx: ContextObj, a: Ast, b: Ast) -> Ast: ...
def Z3_mk_div(ctx: ContextObj, a: Ast, b: Ast) -> Ast: ...
================================================
FILE: mypy-stubs/z3/z3types.pyi
================================================
from typing import Any
class Z3Exception(Exception):
def __init__(self, a: Any) -> None:
self.value = a
...
class ContextObj: ...
class Ast: ...
================================================
FILE: myth
================================================
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""mythril.py: Bug hunting on the Ethereum blockchain
http://www.github.com/ConsenSys/mythril
"""
from sys import exit
import mythril.interfaces.cli
if __name__ == "__main__":
mythril.interfaces.cli.main()
exit()
================================================
FILE: mythril/__init__.py
================================================
# We use RsT document formatting in docstring. For example :param to mark parameters.
# See PEP 287
__docformat__ = "restructuredtext"
import logging
from mythril.plugin.loader import MythrilPluginLoader
# Accept mythril.VERSION to get mythril's current version number
from .__version__ import __version__ as VERSION
log = logging.getLogger(__name__)
================================================
FILE: mythril/__main__.py
================================================
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import mythril.interfaces.cli
if __name__ == "__main__":
mythril.interfaces.cli.main()
================================================
FILE: mythril/__version__.py
================================================
"""This file contains the current Mythril version.
This file is suitable for sourcing inside POSIX shell, e.g. bash as well
as for importing into Python.
"""
__version__ = "v0.24.8"
================================================
FILE: mythril/analysis/__init__.py
================================================
================================================
FILE: mythril/analysis/analysis_args.py
================================================
================================================
FILE: mythril/analysis/call_helpers.py
================================================
"""This module provides helper functions for the analysis modules to deal with
call functionality."""
from typing import Union
from mythril.analysis.ops import Call, VarType, get_variable
from mythril.laser.ethereum.natives import PRECOMPILE_COUNT
from mythril.laser.ethereum.state.global_state import GlobalState
def get_call_from_state(state: GlobalState) -> Union[Call, None]:
"""
:param state:
:return:
"""
instruction = state.get_current_instruction()
op = instruction["opcode"]
stack = state.mstate.stack
if op in ("CALL", "CALLCODE"):
gas, to, value, meminstart, meminsz, _, _ = (
get_variable(stack[-1]),
get_variable(stack[-2]),
get_variable(stack[-3]),
get_variable(stack[-4]),
get_variable(stack[-5]),
get_variable(stack[-6]),
get_variable(stack[-7]),
)
if to.type == VarType.CONCRETE and 0 < to.val <= PRECOMPILE_COUNT:
return None
if meminstart.type == VarType.CONCRETE and meminsz.type == VarType.CONCRETE:
return Call(
state.node,
state,
None,
op,
to,
gas,
value,
state.mstate.memory[meminstart.val : meminsz.val * 4],
)
else:
return Call(state.node, state, None, op, to, gas, value)
else:
gas, to, meminstart, meminsz, _, _ = (
get_variable(stack[-1]),
get_variable(stack[-2]),
get_variable(stack[-3]),
get_variable(stack[-4]),
get_variable(stack[-5]),
get_variable(stack[-6]),
)
return Call(state.node, state, None, op, to, gas)
================================================
FILE: mythril/analysis/callgraph.py
================================================
"""This module contains the configuration and functions to create call
graphs."""
import re
from typing import Dict, List
from jinja2 import Environment, PackageLoader, select_autoescape
from z3 import Z3Exception
from mythril.laser.ethereum.svm import NodeFlags
from mythril.laser.smt import simplify
default_opts = {
"autoResize": True,
"height": "100%",
"width": "100%",
"manipulation": False,
"layout": {
"improvedLayout": True,
"hierarchical": {
"enabled": True,
"levelSeparation": 450,
"nodeSpacing": 200,
"treeSpacing": 100,
"blockShifting": True,
"edgeMinimization": True,
"parentCentralization": False,
"direction": "LR",
"sortMethod": "directed",
},
},
"nodes": {
"color": "#000000",
"borderWidth": 1,
"borderWidthSelected": 2,
"chosen": True,
"shape": "box",
"font": {"align": "left", "color": "#FFFFFF"},
},
"edges": {
"font": {
"color": "#FFFFFF",
"face": "arial",
"background": "none",
"strokeWidth": 0,
"strokeColor": "#ffffff",
"align": "horizontal",
"multi": False,
"vadjust": 0,
}
},
"physics": {"enabled": False},
}
phrack_opts = {
"nodes": {
"color": "#000000",
"borderWidth": 1,
"borderWidthSelected": 1,
"shapeProperties": {"borderDashes": False, "borderRadius": 0},
"chosen": True,
"shape": "box",
"font": {"face": "courier new", "align": "left", "color": "#000000"},
},
"edges": {
"font": {
"color": "#000000",
"face": "courier new",
"background": "none",
"strokeWidth": 0,
"strokeColor": "#ffffff",
"align": "horizontal",
"multi": False,
"vadjust": 0,
}
},
}
default_colors = [
{
"border": "#26996f",
"background": "#2f7e5b",
"highlight": {"border": "#26996f", "background": "#28a16f"},
},
{
"border": "#9e42b3",
"background": "#842899",
"highlight": {"border": "#9e42b3", "background": "#933da6"},
},
{
"border": "#b82323",
"background": "#991d1d",
"highlight": {"border": "#b82323", "background": "#a61f1f"},
},
{
"border": "#4753bf",
"background": "#3b46a1",
"highlight": {"border": "#4753bf", "background": "#424db3"},
},
{
"border": "#26996f",
"background": "#2f7e5b",
"highlight": {"border": "#26996f", "background": "#28a16f"},
},
{
"border": "#9e42b3",
"background": "#842899",
"highlight": {"border": "#9e42b3", "background": "#933da6"},
},
{
"border": "#b82323",
"background": "#991d1d",
"highlight": {"border": "#b82323", "background": "#a61f1f"},
},
{
"border": "#4753bf",
"background": "#3b46a1",
"highlight": {"border": "#4753bf", "background": "#424db3"},
},
]
phrack_color = {
"border": "#000000",
"background": "#ffffff",
"highlight": {"border": "#000000", "background": "#ffffff"},
}
def extract_nodes(statespace) -> List[Dict]:
"""
Extract nodes from the given statespace and create a list of node dictionaries
with visual attributes for graph representation.
:param statespace: The statespace object containing nodes and states information.
:return: A list of dictionaries representing each node with its attributes.
"""
nodes = []
color_map = {}
for node_key, node in statespace.nodes.items():
instructions = [state.get_current_instruction() for state in node.states]
code_split = []
for instruction in instructions:
address = instruction["address"]
opcode = instruction["opcode"]
if opcode.startswith("PUSH"):
code_line = f"{address} {opcode} {instruction.get('argument', '')}"
elif (
opcode.startswith("JUMPDEST")
and NodeFlags.FUNC_ENTRY in node.flags
and address == node.start_addr
):
code_line = node.function_name
else:
code_line = f"{address} {opcode}"
code_line = re.sub(r"([0-9a-f]{8})[0-9a-f]+", r"\1(...)", code_line)
code_split.append(code_line)
truncated_code = (
"\n".join(code_split)
if len(code_split) < 7
else "\n".join(code_split[:6]) + "\n(click to expand +)"
)
contract_name = node.get_cfg_dict()["contract_name"]
if contract_name not in color_map:
color = default_colors[len(color_map) % len(default_colors)]
color_map[contract_name] = color
nodes.append(
{
"id": str(node_key),
"color": color_map.get(contract_name, default_colors[0]),
"size": 150,
"fullLabel": "\n".join(code_split),
"label": truncated_code,
"truncLabel": truncated_code,
"isExpanded": False,
}
)
return nodes
def extract_edges(statespace):
"""
:param statespace:
:return:
"""
edges = []
for edge in statespace.edges:
if edge.condition is None:
label = ""
else:
try:
label = str(simplify(edge.condition)).replace("\n", "")
except Z3Exception:
label = str(edge.condition).replace("\n", "")
label = re.sub(
r"([^_])([\d]{2}\d+)", lambda m: m.group(1) + hex(int(m.group(2))), label
)
edges.append(
{
"from": str(edge.as_dict["from"]),
"to": str(edge.as_dict["to"]),
"arrows": "to",
"label": label,
"smooth": {"type": "cubicBezier"},
}
)
return edges
def generate_graph(
statespace,
title="Mythril / Ethereum LASER Symbolic VM",
physics=False,
phrackify=False,
):
"""
:param statespace:
:param title:
:param physics:
:param phrackify:
:return:
"""
env = Environment(
loader=PackageLoader("mythril.analysis"),
autoescape=select_autoescape(["html", "xml"]),
)
template = env.get_template("callgraph.html")
graph_opts = default_opts
graph_opts["physics"]["enabled"] = physics
return template.render(
title=title,
nodes=extract_nodes(statespace),
edges=extract_edges(statespace),
phrackify=phrackify,
opts=graph_opts,
)
================================================
FILE: mythril/analysis/issue_annotation.py
================================================
from copy import deepcopy
from typing import List
from mythril.analysis.report import Issue
from mythril.laser.ethereum.state.annotation import StateAnnotation
from mythril.laser.smt import SMTBool as Bool
class IssueAnnotation(StateAnnotation):
def __init__(self, conditions: List[Bool], issue: Issue, detector):
"""
Issue Annotation to propagate issues
- conditions: A list of independent conditions [a, b, c, ...]
Each of these have to be independently be satisfied
- issue: The issue of the annotation
- detector: The detection module
"""
self.conditions = conditions
self.issue = issue
self.detector = detector
def persist_to_world_state(self) -> bool:
return True
@property
def persist_over_calls(self) -> bool:
return True
def __copy__(self):
return IssueAnnotation(
conditions=deepcopy(self.conditions),
issue=self.issue,
detector=self.detector,
)
def check_merge_annotation(self, annotation: "IssueAnnotation") -> bool:
if self.conditions == annotation.conditions:
return False
if self.issue.address != annotation.issue.address:
return False
if type(self.detector) != type(annotation.detector):
return False
return True
def merge_annotation(self, annotation: "IssueAnnotation") -> "IssueAnnotation":
return self
================================================
FILE: mythril/analysis/module/__init__.py
================================================
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.analysis.module.loader import ModuleLoader
from mythril.analysis.module.util import (
get_detection_module_hooks,
reset_callback_modules,
)
================================================
FILE: mythril/analysis/module/base.py
================================================
"""Mythril Detection Modules
This module includes an definition of the DetectionModule interface.
DetectionModules implement different analysis rules to find weaknesses and vulnerabilities.
"""
import logging
from abc import ABC, abstractmethod
from enum import Enum
from typing import List, Optional, Set, Tuple
from mythril.analysis.report import Issue
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.support.support_args import args
from mythril.support.support_utils import get_code_hash
# Get logger instance
log = logging.getLogger(__name__)
class EntryPoint(Enum):
"""EntryPoint Enum
This enum is used to signify the entry_point of detection modules.
See also the class documentation of DetectionModule
"""
POST = 1
CALLBACK = 2
class DetectionModule(ABC):
"""The base detection module.
All custom-built detection modules must inherit from this class.
There are several class properties that expose information about the detection modules
:param name: The name of the detection module
:param swc_id: The SWC ID associated with the weakness that the module detects
:param description: A description of the detection module, and what it detects
:param entry_point: Mythril can run callback style detection modules, or modules that search the statespace.
[IMPORTANT] POST entry points severely slow down the analysis, try to always use callback style modules
:param pre_hooks: A list of instructions to hook the laser vm for (pre execution of the instruction)
:param post_hooks: A list of instructions to hook the laser vm for (post execution of the instruction)
"""
name = "Detection Module Name / Title"
swc_id = "SWC-000"
description = "Detection module description"
entry_point: EntryPoint = EntryPoint.CALLBACK
pre_hooks: List[str] = []
post_hooks: List[str] = []
def __init__(self) -> None:
self.issues: List[Issue] = []
self.cache: Set[Tuple[int, str]] = set()
self.auto_cache = True
def reset_module(self):
"""Resets the storage of this module"""
self.issues = []
def update_cache(self, issues=None):
"""
Updates cache with param issues, updates against self.issues, if the param is None
:param issues: The issues used to update the cache
"""
issues = issues or self.issues
for issue in issues:
self.cache.add((issue.address, issue.bytecode_hash))
def execute(self, target: GlobalState) -> Optional[List[Issue]]:
"""The entry point for execution, which is being called by Mythril.
:param target: The target of the analysis, either a global state (callback) or the entire statespace (post)
:return: List of encountered issues
"""
log.debug("Entering analysis module: {}".format(self.__class__.__name__))
if (
target.get_current_instruction()["address"],
get_code_hash(target.environment.code.bytecode),
) in self.cache and self.auto_cache:
log.debug(
f"Issue in cache for the analysis module: {self.__class__.__name__}, address: {target.get_current_instruction()['address']}"
)
return []
result = self._execute(target)
log.debug("Exiting analysis module: {}".format(self.__class__.__name__))
if result and not args.use_issue_annotations:
if self.auto_cache:
self.update_cache(result)
self.issues += result
return result
@abstractmethod
def _execute(self, target) -> Optional[List[Issue]]:
"""Module main method (override this)
:param target: The target of the analysis, either a global state (callback) or the entire statespace (post)
:return: List of encountered issues
"""
pass
def __repr__(self) -> str:
return (
"<"
"DetectionModule "
"name={0.name} "
"swc_id={0.swc_id} "
"pre_hooks={0.pre_hooks} "
"post_hooks={0.post_hooks} "
"description={0.description}"
">"
).format(self)
================================================
FILE: mythril/analysis/module/loader.py
================================================
from typing import List, Optional
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.analysis.module.modules.arbitrary_jump import ArbitraryJump
from mythril.analysis.module.modules.arbitrary_write import ArbitraryStorage
from mythril.analysis.module.modules.delegatecall import ArbitraryDelegateCall
from mythril.analysis.module.modules.dependence_on_origin import TxOrigin
from mythril.analysis.module.modules.dependence_on_predictable_vars import (
PredictableVariables,
)
from mythril.analysis.module.modules.ether_thief import EtherThief
from mythril.analysis.module.modules.exceptions import Exceptions
from mythril.analysis.module.modules.external_calls import ExternalCalls
from mythril.analysis.module.modules.integer import IntegerArithmetics
from mythril.analysis.module.modules.multiple_sends import MultipleSends
from mythril.analysis.module.modules.requirements_violation import RequirementsViolation
from mythril.analysis.module.modules.state_change_external_calls import (
StateChangeAfterCall,
)
from mythril.analysis.module.modules.suicide import AccidentallyKillable
from mythril.analysis.module.modules.transaction_order_dependence import (
TransactionOrderDependence,
)
from mythril.analysis.module.modules.unchecked_retval import UncheckedRetval
from mythril.analysis.module.modules.unexpected_ether import UnexpectedEther
from mythril.analysis.module.modules.user_assertions import UserAssertions
from mythril.exceptions import DetectorNotFoundError
from mythril.support.support_args import args
from mythril.support.support_utils import Singleton
class ModuleLoader(object, metaclass=Singleton):
"""ModuleLoader
The module loader class implements a singleton loader for detection modules.
By default it will load the detection modules in the mythril package.
Additional detection modules can be loaded using the register_module function call implemented by the ModuleLoader
"""
def __init__(self):
self._modules = []
self._register_mythril_modules()
def register_module(self, detection_module: DetectionModule):
"""Registers a detection module with the module loader"""
if not isinstance(detection_module, DetectionModule):
raise ValueError("The passed variable is not a valid detection module")
self._modules.append(detection_module)
def get_detection_modules(
self,
entry_point: Optional[EntryPoint] = None,
white_list: Optional[List[str]] = None,
) -> List[DetectionModule]:
"""Gets registered detection modules
:param entry_point: If specified: only return detection modules with this entry point
:param white_list: If specified: only return whitelisted detection modules
:return: The selected detection modules
"""
result = self._modules[:]
if white_list:
# Sanity check
available_names = [type(module).__name__ for module in result]
for name in white_list:
if name not in available_names:
raise DetectorNotFoundError(
"Invalid detection module: {}".format(name)
)
result = [
module for module in result if type(module).__name__ in white_list
]
if args.use_integer_module is False:
result = [
module
for module in result
if type(module).__name__ != "IntegerArithmetics"
]
if entry_point:
result = [module for module in result if module.entry_point == entry_point]
return result
def _register_mythril_modules(self):
self._modules.extend(
[
AccidentallyKillable(),
ArbitraryJump(),
ArbitraryStorage(),
ArbitraryDelegateCall(),
EtherThief(),
Exceptions(),
ExternalCalls(),
IntegerArithmetics(),
MultipleSends(),
PredictableVariables(),
RequirementsViolation(),
StateChangeAfterCall(),
TransactionOrderDependence(),
TxOrigin(),
UncheckedRetval(),
UnexpectedEther(),
UserAssertions(),
]
)
================================================
FILE: mythril/analysis/module/module_helpers.py
================================================
import traceback
def is_prehook() -> bool:
"""Check if we are in prehook. One of Bernhard's trademark hacks!
Let's leave it to this for now, unless we need to check prehook for
a lot more modules.
"""
assert ("pre_hook" in traceback.format_stack()[-5]) or (
"post_hook" in traceback.format_stack()[-5]
)
return "pre_hook" in traceback.format_stack()[-5]
================================================
FILE: mythril/analysis/module/modules/__init__.py
================================================
================================================
FILE: mythril/analysis/module/modules/arbitrary_jump.py
================================================
"""This module contains the detection code for Arbitrary jumps."""
import logging
from mythril.analysis.issue_annotation import IssueAnnotation
from mythril.analysis.module.base import DetectionModule, EntryPoint, Issue
from mythril.analysis.solver import UnsatError, get_transaction_sequence
from mythril.analysis.swc_data import ARBITRARY_JUMP
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.smt import And, BitVec, symbol_factory
from mythril.support.model import get_model
log = logging.getLogger(__name__)
DESCRIPTION = """
Search for jumps to arbitrary locations in the bytecode
"""
def is_unique_jumpdest(jump_dest: BitVec, state: GlobalState) -> bool:
"""
Handles cases where jump_dest evaluates to a single concrete value
"""
try:
model = get_model(state.world_state.constraints)
except UnsatError:
return True
concrete_jump_dest = model.eval(jump_dest.raw, model_completion=True)
try:
model = get_model(
state.world_state.constraints
+ [symbol_factory.BitVecVal(concrete_jump_dest.as_long(), 256) != jump_dest]
)
except UnsatError:
return True
return False
class ArbitraryJump(DetectionModule):
"""This module searches for JUMPs to a user-specified location."""
name = "Caller can redirect execution to arbitrary bytecode locations"
swc_id = ARBITRARY_JUMP
description = DESCRIPTION
entry_point = EntryPoint.CALLBACK
pre_hooks = ["JUMP", "JUMPI"]
def reset_module(self):
"""
Resets the module by clearing everything
:return:
"""
super().reset_module()
def _execute(self, state: GlobalState) -> None:
"""
:param state:
:return:
"""
return self._analyze_state(state)
def _analyze_state(self, state):
"""
:param state:
:return:
"""
jump_dest = state.mstate.stack[-1]
if jump_dest.symbolic is False:
return []
if is_unique_jumpdest(jump_dest, state) is True:
return []
try:
transaction_sequence = get_transaction_sequence(
state, state.world_state.constraints
)
except UnsatError:
return []
log.info("Detected arbitrary jump dest")
issue = Issue(
contract=state.environment.active_account.contract_name,
function_name=state.environment.active_function_name,
address=state.get_current_instruction()["address"],
swc_id=ARBITRARY_JUMP,
title="Jump to an arbitrary instruction",
severity="High",
bytecode=state.environment.code.bytecode,
description_head="The caller can redirect execution to arbitrary bytecode locations.",
description_tail="It is possible to redirect the control flow to arbitrary locations in the code. "
"This may allow an attacker to bypass security controls or manipulate the business logic of the "
"smart contract. Avoid using low-level-operations and assembly to prevent this issue.",
gas_used=(state.mstate.min_gas_used, state.mstate.max_gas_used),
transaction_sequence=transaction_sequence,
)
state.annotate(
IssueAnnotation(
conditions=[And(*state.world_state.constraints)],
issue=issue,
detector=self,
)
)
return [issue]
detector = ArbitraryJump()
================================================
FILE: mythril/analysis/module/modules/arbitrary_write.py
================================================
"""This module contains the detection code for arbitrary storage write."""
import logging
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.analysis.potential_issues import (
PotentialIssue,
get_potential_issues_annotation,
)
from mythril.analysis.swc_data import WRITE_TO_ARBITRARY_STORAGE
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.smt import symbol_factory
log = logging.getLogger(__name__)
DESCRIPTION = """
Search for any writes to an arbitrary storage slot
"""
class ArbitraryStorage(DetectionModule):
"""This module searches for a feasible write to an arbitrary storage slot."""
name = "Caller can write to arbitrary storage locations"
swc_id = WRITE_TO_ARBITRARY_STORAGE
description = DESCRIPTION
entry_point = EntryPoint.CALLBACK
pre_hooks = ["SSTORE"]
def reset_module(self):
"""
Resets the module by clearing everything
:return:
"""
super().reset_module()
def _execute(self, state: GlobalState) -> None:
"""
:param state:
:return:
"""
potential_issues = self._analyze_state(state)
annotation = get_potential_issues_annotation(state)
annotation.potential_issues.extend(potential_issues)
def _analyze_state(self, state):
"""
:param state:
:return:
"""
write_slot = state.mstate.stack[-1]
constraints = state.world_state.constraints + [
write_slot == symbol_factory.BitVecVal(324345425435, 256)
]
potential_issue = PotentialIssue(
contract=state.environment.active_account.contract_name,
function_name=state.environment.active_function_name,
address=state.get_current_instruction()["address"],
swc_id=WRITE_TO_ARBITRARY_STORAGE,
title="Write to an arbitrary storage location",
severity="High",
bytecode=state.environment.code.bytecode,
description_head="The caller can write to arbitrary storage locations.",
description_tail="It is possible to write to arbitrary storage locations. By modifying the values of "
"storage variables, attackers may bypass security controls or manipulate the business logic of "
"the smart contract.",
detector=self,
constraints=constraints,
)
return [potential_issue]
detector = ArbitraryStorage()
================================================
FILE: mythril/analysis/module/modules/delegatecall.py
================================================
"""This module contains the detection code for insecure delegate call usage."""
import logging
from typing import List
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.analysis.potential_issues import (
PotentialIssue,
get_potential_issues_annotation,
)
from mythril.analysis.swc_data import DELEGATECALL_TO_UNTRUSTED_CONTRACT
from mythril.exceptions import UnsatError
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.ethereum.transaction.symbolic import ACTORS
from mythril.laser.ethereum.transaction.transaction_models import (
ContractCreationTransaction,
)
from mythril.laser.smt import UGT, symbol_factory
log = logging.getLogger(__name__)
class ArbitraryDelegateCall(DetectionModule):
"""This module detects delegatecall to a user-supplied address."""
name = "Delegatecall to a user-specified address"
swc_id = DELEGATECALL_TO_UNTRUSTED_CONTRACT
description = "Check for invocations of delegatecall to a user-supplied address."
entry_point = EntryPoint.CALLBACK
pre_hooks = ["DELEGATECALL"]
def _execute(self, state: GlobalState) -> None:
"""
:param state:
:return:
"""
potential_issues = self._analyze_state(state)
annotation = get_potential_issues_annotation(state)
annotation.potential_issues.extend(potential_issues)
def _analyze_state(self, state: GlobalState) -> List[PotentialIssue]:
"""
:param state: the current state
:return: returns the issues for that corresponding state
"""
gas = state.mstate.stack[-1]
to = state.mstate.stack[-2]
constraints = [
to == ACTORS.attacker,
UGT(gas, symbol_factory.BitVecVal(2300, 256)),
state.new_bitvec(
"retval_{}".format(state.get_current_instruction()["address"]), 256
)
== 1,
]
for tx in state.world_state.transaction_sequence:
if not isinstance(tx, ContractCreationTransaction):
constraints.append(tx.caller == ACTORS.attacker)
try:
address = state.get_current_instruction()["address"]
logging.debug(
"[DELEGATECALL] Detected potential delegatecall to a user-supplied address : {}".format(
address
)
)
description_head = "The contract delegates execution to another contract with a user-supplied address."
description_tail = (
"The smart contract delegates execution to a user-supplied address.This could allow an attacker to "
"execute arbitrary code in the context of this contract account and manipulate the state of the "
"contract account or execute actions on its behalf."
)
return [
PotentialIssue(
contract=state.environment.active_account.contract_name,
function_name=state.environment.active_function_name,
address=address,
swc_id=DELEGATECALL_TO_UNTRUSTED_CONTRACT,
bytecode=state.environment.code.bytecode,
title="Delegatecall to user-supplied address",
severity="High",
description_head=description_head,
description_tail=description_tail,
constraints=constraints,
detector=self,
)
]
except UnsatError:
return []
detector = ArbitraryDelegateCall()
================================================
FILE: mythril/analysis/module/modules/dependence_on_origin.py
================================================
"""This module contains the detection code for predictable variable
dependence."""
import logging
from copy import copy
from typing import List
from mythril.analysis import solver
from mythril.analysis.issue_annotation import IssueAnnotation
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.analysis.report import Issue
from mythril.analysis.swc_data import TX_ORIGIN_USAGE
from mythril.exceptions import UnsatError
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.smt import And
log = logging.getLogger(__name__)
class TxOriginAnnotation:
"""Symbol annotation added to a variable that is initialized with a call to the ORIGIN instruction."""
def __init__(self) -> None:
pass
class TxOrigin(DetectionModule):
"""This module detects whether control flow decisions are made based on the transaction origin."""
name = "Control flow depends on tx.origin"
swc_id = TX_ORIGIN_USAGE
description = "Check whether control flow decisions are influenced by tx.origin"
entry_point = EntryPoint.CALLBACK
pre_hooks = ["JUMPI"]
post_hooks = ["ORIGIN"]
def _execute(self, state: GlobalState) -> List[Issue]:
"""
:param state:
:return:
"""
return self._analyze_state(state)
def _analyze_state(self, state: GlobalState) -> List[Issue]:
"""
:param state:
:return:
"""
issues = []
if state.get_current_instruction()["opcode"] == "JUMPI":
# We're in JUMPI prehook
for annotation in state.mstate.stack[-2].annotations:
if isinstance(annotation, TxOriginAnnotation):
constraints = copy(state.world_state.constraints)
try:
transaction_sequence = solver.get_transaction_sequence(
state, constraints
)
except UnsatError:
continue
description = (
"The tx.origin environment variable has been found to influence a control flow decision. "
"Note that using tx.origin as a security control might cause a situation where a user "
"inadvertently authorizes a smart contract to perform an action on their behalf. It is "
"recommended to use msg.sender instead."
)
severity = "Low"
"""
Note: We report the location of the JUMPI instruction. Usually this maps to an if or
require statement.
"""
issue = Issue(
contract=state.environment.active_account.contract_name,
function_name=state.environment.active_function_name,
address=state.get_current_instruction()["address"],
swc_id=TX_ORIGIN_USAGE,
bytecode=state.environment.code.bytecode,
title="Dependence on tx.origin",
severity=severity,
description_head="Use of tx.origin as a part of authorization control.",
description_tail=description,
gas_used=(state.mstate.min_gas_used, state.mstate.max_gas_used),
transaction_sequence=transaction_sequence,
)
state.annotate(
IssueAnnotation(
conditions=[And(*constraints)], issue=issue, detector=self
)
)
issues.append(issue)
else:
# In ORIGIN posthook
state.mstate.stack[-1].annotate(TxOriginAnnotation())
return issues
detector = TxOrigin()
================================================
FILE: mythril/analysis/module/modules/dependence_on_predictable_vars.py
================================================
"""This module contains the detection code for predictable variable
dependence."""
import logging
from typing import List, cast
from mythril.analysis import solver
from mythril.analysis.issue_annotation import IssueAnnotation
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.analysis.module.module_helpers import is_prehook
from mythril.analysis.report import Issue
from mythril.analysis.swc_data import TIMESTAMP_DEPENDENCE, WEAK_RANDOMNESS
from mythril.exceptions import UnsatError
from mythril.laser.ethereum.state.annotation import StateAnnotation
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.smt import ULT, And, symbol_factory
log = logging.getLogger(__name__)
predictable_ops = ["COINBASE", "GASLIMIT", "TIMESTAMP", "NUMBER"]
class PredictableValueAnnotation:
"""Symbol annotation used if a variable is initialized from a predictable environment variable."""
def __init__(self, operation: str) -> None:
self.operation = operation
class OldBlockNumberUsedAnnotation(StateAnnotation):
"""Symbol annotation used if a variable is initialized from a predictable environment variable."""
def __init__(self) -> None:
pass
class PredictableVariables(DetectionModule):
"""This module detects whether control flow decisions are made using predictable
parameters."""
name = "Control flow depends on a predictable environment variable"
swc_id = "{} {}".format(TIMESTAMP_DEPENDENCE, WEAK_RANDOMNESS)
description = (
"Check whether control flow decisions are influenced by block.coinbase,"
"block.gaslimit, block.timestamp or block.number."
)
entry_point = EntryPoint.CALLBACK
pre_hooks = ["JUMPI", "BLOCKHASH"]
post_hooks = ["BLOCKHASH"] + predictable_ops
def _execute(self, state: GlobalState) -> List[Issue]:
"""
:param state:
:return:
"""
return self._analyze_state(state)
def _analyze_state(self, state: GlobalState) -> List[Issue]:
"""
:param state:
:return:
"""
issues = []
if is_prehook():
opcode = state.get_current_instruction()["opcode"]
if opcode == "JUMPI":
# Look for predictable state variables in jump condition
for annotation in state.mstate.stack[-2].annotations:
if isinstance(annotation, PredictableValueAnnotation):
constraints = state.world_state.constraints
try:
transaction_sequence = solver.get_transaction_sequence(
state, constraints
)
except UnsatError:
continue
description = (
annotation.operation
+ " is used to determine a control flow decision. "
)
description += (
"Note that the values of variables like coinbase, gaslimit, block number and timestamp are "
"predictable and can be manipulated by a malicious miner. Also keep in mind that "
"attackers know hashes of earlier blocks. Don't use any of those environment variables "
"as sources of randomness and be aware that use of these variables introduces "
"a certain level of trust into miners."
)
"""
Usually report low severity except in cases where the hash of a previous block is used to
determine control flow.
"""
severity = "Low"
swc_id = (
TIMESTAMP_DEPENDENCE
if "timestamp" in annotation.operation
else WEAK_RANDOMNESS
)
issue = Issue(
contract=state.environment.active_account.contract_name,
function_name=state.environment.active_function_name,
address=state.get_current_instruction()["address"],
swc_id=swc_id,
bytecode=state.environment.code.bytecode,
title="Dependence on predictable environment variable",
severity=severity,
description_head="A control flow decision is made based on {}.".format(
annotation.operation
),
description_tail=description,
gas_used=(
state.mstate.min_gas_used,
state.mstate.max_gas_used,
),
transaction_sequence=transaction_sequence,
)
state.annotate(
IssueAnnotation(
conditions=[And(*constraints)],
issue=issue,
detector=self,
)
)
issues.append(issue)
elif opcode == "BLOCKHASH":
param = state.mstate.stack[-1]
constraint = [
ULT(param, state.environment.block_number),
ULT(
state.environment.block_number,
symbol_factory.BitVecVal(2**255, 256),
),
]
# Why the second constraint? Because without it Z3 returns a solution where param overflows.
try:
solver.get_model(
state.world_state.constraints + constraint # type: ignore
)
state.annotate(OldBlockNumberUsedAnnotation())
except UnsatError:
pass
else:
# we're in post hook
opcode = state.environment.code.instruction_list[state.mstate.pc - 1][
"opcode"
]
if opcode == "BLOCKHASH":
# if we're in the post hook of a BLOCKHASH op, check if an old block number was used to create it.
annotations = cast(
List[OldBlockNumberUsedAnnotation],
list(state.get_annotations(OldBlockNumberUsedAnnotation)),
)
if len(annotations):
# We can append any block constraint here
state.mstate.stack[-1].annotate(
PredictableValueAnnotation("The block hash of a previous block")
)
else:
# Always create an annotation when COINBASE, GASLIMIT, TIMESTAMP or NUMBER is executed.
state.mstate.stack[-1].annotate(
PredictableValueAnnotation(
"The block.{} environment variable".format(opcode.lower())
)
)
return issues
detector = PredictableVariables()
================================================
FILE: mythril/analysis/module/modules/ether_thief.py
================================================
"""This module contains the detection code for unauthorized ether
withdrawal."""
import logging
from copy import copy
from mythril.analysis import solver
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.analysis.potential_issues import (
PotentialIssue,
get_potential_issues_annotation,
)
from mythril.analysis.swc_data import UNPROTECTED_ETHER_WITHDRAWAL
from mythril.exceptions import UnsatError
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.ethereum.transaction.symbolic import ACTORS
from mythril.laser.smt import UGT
log = logging.getLogger(__name__)
DESCRIPTION = """
Search for cases where Ether can be withdrawn to a user-specified address.
An issue is reported if there is a valid end state where the attacker has successfully
increased their Ether balance.
"""
class EtherThief(DetectionModule):
"""This module search for cases where Ether can be withdrawn to a user-
specified address."""
name = "Any sender can withdraw ETH from the contract account"
swc_id = UNPROTECTED_ETHER_WITHDRAWAL
description = DESCRIPTION
entry_point = EntryPoint.CALLBACK
post_hooks = ["CALL", "STATICCALL"]
def reset_module(self):
"""
Resets the module by clearing everything
:return:
"""
super().reset_module()
def _execute(self, state: GlobalState) -> None:
"""
:param state:
:return:
"""
potential_issues = self._analyze_state(state)
annotation = get_potential_issues_annotation(state)
annotation.potential_issues.extend(potential_issues)
def _analyze_state(self, state):
"""
:param state:
:return:
"""
state = copy(state)
instruction = state.get_current_instruction()
constraints = copy(state.world_state.constraints)
constraints += [
UGT(
state.world_state.balances[ACTORS.attacker],
state.world_state.starting_balances[ACTORS.attacker],
),
state.environment.sender == ACTORS.attacker,
state.current_transaction.caller == state.current_transaction.origin,
]
try:
# Pre-solve so we only add potential issues if the attacker's balance is increased.
solver.get_model(constraints)
potential_issue = PotentialIssue(
contract=state.environment.active_account.contract_name,
function_name=state.environment.active_function_name,
address=instruction["address"]
- 1, # In post hook we use offset of previous instruction
swc_id=UNPROTECTED_ETHER_WITHDRAWAL,
title="Unprotected Ether Withdrawal",
severity="High",
bytecode=state.environment.code.bytecode,
description_head="Any sender can withdraw Ether from the contract account.",
description_tail="Arbitrary senders other than the contract creator can profitably extract Ether "
"from the contract account. Verify the business logic carefully and make sure that appropriate "
"security controls are in place to prevent unexpected loss of funds.",
detector=self,
constraints=constraints,
)
return [potential_issue]
except UnsatError:
return []
detector = EtherThief()
================================================
FILE: mythril/analysis/module/modules/exceptions.py
================================================
"""This module contains the detection code for reachable exceptions."""
import logging
from typing import List, Optional, cast
from mythril.analysis import solver
from mythril.analysis.issue_annotation import IssueAnnotation
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.analysis.report import Issue
from mythril.analysis.swc_data import ASSERT_VIOLATION
from mythril.exceptions import UnsatError
from mythril.laser.ethereum import util
from mythril.laser.ethereum.state.annotation import StateAnnotation
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.smt import And
from mythril.support.support_utils import get_code_hash
log = logging.getLogger(__name__)
# The function signature of Panic(uint256)
PANIC_SIGNATURE = [78, 72, 123, 113]
class LastJumpAnnotation(StateAnnotation):
"""State Annotation used if an overflow is both possible and used in the annotated path"""
def __init__(self, last_jump: Optional[int] = None) -> None:
self.last_jump: int = last_jump
def __copy__(self):
new_annotation = LastJumpAnnotation(self.last_jump)
return new_annotation
class Exceptions(DetectionModule):
""""""
name = "Assertion violation"
swc_id = ASSERT_VIOLATION
description = "Checks whether any exception states are reachable."
entry_point = EntryPoint.CALLBACK
pre_hooks = ["INVALID", "JUMP", "REVERT"]
def __init__(self):
super().__init__()
self.auto_cache = False
def _execute(self, state: GlobalState) -> List[Issue]:
"""
:param state:
:return:
"""
issues = self._analyze_state(state)
for issue in issues:
self.cache.add((issue.source_location, issue.bytecode_hash))
return issues
def _analyze_state(self, state) -> List[Issue]:
"""
:param state:
:return:
"""
opcode = state.get_current_instruction()["opcode"]
address = state.get_current_instruction()["address"]
annotations = cast(
List[LastJumpAnnotation],
[a for a in state.get_annotations(LastJumpAnnotation)],
)
if len(annotations) == 0:
state.annotate(LastJumpAnnotation())
annotations = cast(
List[LastJumpAnnotation],
[a for a in state.get_annotations(LastJumpAnnotation)],
)
if opcode == "JUMP":
annotations[0].last_jump = address
return []
if opcode == "REVERT" and not is_assertion_failure(state):
return []
cache_address = annotations[0].last_jump
if (
cache_address,
get_code_hash(state.environment.code.bytecode),
) in self.cache:
return []
log.debug(
"ASSERT_FAIL/REVERT in function " + state.environment.active_function_name
)
try:
description_tail = (
"It is possible to trigger an assertion violation. Note that Solidity assert() statements should "
"only be used to check invariants. Review the transaction trace generated for this issue and "
"either make sure your program logic is correct, or use require() instead of assert() if your goal "
"is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers "
"(for instance, via passed arguments) and callees (for instance, via return values)."
)
transaction_sequence = solver.get_transaction_sequence(
state, state.world_state.constraints
)
issue = Issue(
contract=state.environment.active_account.contract_name,
function_name=state.environment.active_function_name,
address=address,
swc_id=ASSERT_VIOLATION,
title="Exception State",
severity="Medium",
description_head="An assertion violation was triggered.",
description_tail=description_tail,
bytecode=state.environment.code.bytecode,
transaction_sequence=transaction_sequence,
gas_used=(state.mstate.min_gas_used, state.mstate.max_gas_used),
source_location=cache_address,
)
state.annotate(
IssueAnnotation(
conditions=[And(*state.world_state.constraints)],
issue=issue,
detector=self,
)
)
return [issue]
except UnsatError:
log.debug("no model found")
return []
def is_assertion_failure(global_state):
state = global_state.mstate
offset, length = state.stack[-1], state.stack[-2]
try:
return_data = state.memory[
util.get_concrete_int(offset) : util.get_concrete_int(offset + length)
]
except TypeError:
return False
return return_data[:4] == PANIC_SIGNATURE and return_data[-1] == 1
detector = Exceptions()
================================================
FILE: mythril/analysis/module/modules/external_calls.py
================================================
"""This module contains the detection code for potentially insecure low-level
calls."""
import logging
from copy import copy
from mythril.analysis import solver
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.analysis.potential_issues import (
PotentialIssue,
get_potential_issues_annotation,
)
from mythril.analysis.swc_data import REENTRANCY
from mythril.exceptions import UnsatError
from mythril.laser.ethereum.natives import PRECOMPILE_COUNT
from mythril.laser.ethereum.state.constraints import Constraints
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.ethereum.transaction.symbolic import ACTORS
from mythril.laser.smt import UGT, BitVec, Or, symbol_factory
log = logging.getLogger(__name__)
DESCRIPTION = """
Search for external calls with unrestricted gas to a user-specified address.
"""
def _is_precompile_call(global_state: GlobalState):
to: BitVec = global_state.mstate.stack[-2]
constraints: Constraints = copy(global_state.world_state.constraints)
constraints += [
Or(
to < symbol_factory.BitVecVal(1, 256),
to > symbol_factory.BitVecVal(PRECOMPILE_COUNT, 256),
)
]
try:
solver.get_model(constraints)
return False
except UnsatError:
return True
class ExternalCalls(DetectionModule):
"""This module searches for low level calls (e.g. call.value()) that
forward all gas to the callee."""
name = "External call to another contract"
swc_id = REENTRANCY
description = DESCRIPTION
entry_point = EntryPoint.CALLBACK
pre_hooks = ["CALL"]
def _execute(self, state: GlobalState) -> None:
"""
:param state:
:return:
"""
potential_issues = self._analyze_state(state)
annotation = get_potential_issues_annotation(state)
annotation.potential_issues.extend(potential_issues)
def _analyze_state(self, state: GlobalState):
"""
:param state:
:return:
"""
if state.environment.active_function_name == "constructor":
return []
gas = state.mstate.stack[-1]
to = state.mstate.stack[-2]
address = state.get_current_instruction()["address"]
try:
constraints = Constraints(
[UGT(gas, symbol_factory.BitVecVal(2300, 256)), to == ACTORS.attacker]
)
solver.get_transaction_sequence(
state, constraints + state.world_state.constraints
)
description_head = "A call to a user-supplied address is executed."
description_tail = (
"An external message call to an address specified by the caller is executed. Note that "
"the callee account might contain arbitrary code and could re-enter any function "
"within this contract. Reentering the contract in an intermediate state may lead to "
"unexpected behaviour. Make sure that no state modifications "
"are executed after this call and/or reentrancy guards are in place."
)
issue = PotentialIssue(
contract=state.environment.active_account.contract_name,
function_name=state.environment.active_function_name,
address=address,
swc_id=REENTRANCY,
title="External Call To User-Supplied Address",
bytecode=state.environment.code.bytecode,
severity="Low",
description_head=description_head,
description_tail=description_tail,
constraints=constraints,
detector=self,
)
except UnsatError:
log.debug("[EXTERNAL_CALLS] No model found.")
return []
return [issue]
detector = ExternalCalls()
================================================
FILE: mythril/analysis/module/modules/integer.py
================================================
"""This module contains the detection code for integer overflows and
underflows."""
import logging
from copy import copy
from math import ceil, log2
from typing import List, Set, cast
from mythril.analysis import solver
from mythril.analysis.issue_annotation import IssueAnnotation
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.analysis.report import Issue
from mythril.analysis.swc_data import INTEGER_OVERFLOW_AND_UNDERFLOW
from mythril.exceptions import UnsatError
from mythril.laser.ethereum.state.annotation import StateAnnotation
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.smt import (
And,
BitVec,
BVAddNoOverflow,
BVMulNoOverflow,
BVSubNoUnderflow,
Expression,
If,
Not,
symbol_factory,
)
from mythril.laser.smt import (
SMTBool as Bool,
)
log = logging.getLogger(__name__)
class OverUnderflowAnnotation:
"""Symbol Annotation used if a BitVector can overflow"""
def __init__(
self, overflowing_state: GlobalState, operator: str, constraint: Bool
) -> None:
self.overflowing_state = overflowing_state
self.operator = operator
self.constraint = constraint
def __deepcopy__(self, memodict={}):
new_annotation = copy(self)
return new_annotation
class OverUnderflowStateAnnotation(StateAnnotation):
"""State Annotation used if an overflow is both possible and used in the annotated path"""
def __init__(self) -> None:
self.overflowing_state_annotations: Set[OverUnderflowAnnotation] = set()
def __copy__(self):
new_annotation = OverUnderflowStateAnnotation()
new_annotation.overflowing_state_annotations = copy(
self.overflowing_state_annotations
)
return new_annotation
class IntegerArithmetics(DetectionModule):
"""This module searches for integer over- and underflows."""
name = "Integer overflow or underflow"
swc_id = INTEGER_OVERFLOW_AND_UNDERFLOW
description = (
"For
gitextract_g8fg3qrk/ ├── .circleci/ │ └── config.yml ├── .dockerignore ├── .drone.yml ├── .editorconfig ├── .gitattributes ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── analysis-module.md │ │ ├── bug-report.md │ │ └── feature-request.md │ ├── dependabot.yml │ └── workflows/ │ ├── container.yml │ ├── pre-commit-hooks-test.yml │ └── pre-commit.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .pre-commit-hooks.yaml ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── MANIFEST.in ├── README.md ├── all_tests.sh ├── coverage_report.sh ├── docker/ │ ├── docker-entrypoint.sh │ └── sync-svm-solc-versions-with-solcx.sh ├── docker-bake.hcl ├── docker_build_and_deploy.sh ├── docs/ │ ├── Makefile │ ├── make.bat │ └── source/ │ ├── about.rst │ ├── analysis-modules.rst │ ├── conf.py │ ├── create-module.rst │ ├── index.rst │ ├── installation.rst │ ├── module-list.rst │ ├── modules.rst │ ├── mythril.analysis.module.modules.rst │ ├── mythril.analysis.module.rst │ ├── mythril.analysis.rst │ ├── mythril.concolic.rst │ ├── mythril.disassembler.rst │ ├── mythril.ethereum.interface.rpc.rst │ ├── mythril.ethereum.interface.rst │ ├── mythril.ethereum.rst │ ├── mythril.interfaces.rst │ ├── mythril.laser.ethereum.function_managers.rst │ ├── mythril.laser.ethereum.rst │ ├── mythril.laser.ethereum.state.rst │ ├── mythril.laser.ethereum.strategy.extensions.rst │ ├── mythril.laser.ethereum.strategy.rst │ ├── mythril.laser.ethereum.transaction.rst │ ├── mythril.laser.plugin.plugins.coverage.rst │ ├── mythril.laser.plugin.plugins.rst │ ├── mythril.laser.plugin.plugins.summary_backup.rst │ ├── mythril.laser.plugin.rst │ ├── mythril.laser.rst │ ├── mythril.laser.smt.rst │ ├── mythril.laser.smt.solver.rst │ ├── mythril.mythril.rst │ ├── mythril.plugin.rst │ ├── mythril.rst │ ├── mythril.solidity.rst │ ├── mythril.support.rst │ ├── security-analysis.rst │ └── tutorial.rst ├── mypy-stubs/ │ └── z3/ │ ├── __init__.pyi │ ├── z3core.pyi │ └── z3types.pyi ├── myth ├── mythril/ │ ├── __init__.py │ ├── __main__.py │ ├── __version__.py │ ├── analysis/ │ │ ├── __init__.py │ │ ├── analysis_args.py │ │ ├── call_helpers.py │ │ ├── callgraph.py │ │ ├── issue_annotation.py │ │ ├── module/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── loader.py │ │ │ ├── module_helpers.py │ │ │ ├── modules/ │ │ │ │ ├── __init__.py │ │ │ │ ├── arbitrary_jump.py │ │ │ │ ├── arbitrary_write.py │ │ │ │ ├── delegatecall.py │ │ │ │ ├── dependence_on_origin.py │ │ │ │ ├── dependence_on_predictable_vars.py │ │ │ │ ├── ether_thief.py │ │ │ │ ├── exceptions.py │ │ │ │ ├── external_calls.py │ │ │ │ ├── integer.py │ │ │ │ ├── multiple_sends.py │ │ │ │ ├── requirements_violation.py │ │ │ │ ├── state_change_external_calls.py │ │ │ │ ├── suicide.py │ │ │ │ ├── transaction_order_dependence.py │ │ │ │ ├── unchecked_retval.py │ │ │ │ ├── unexpected_ether.py │ │ │ │ └── user_assertions.py │ │ │ └── util.py │ │ ├── ops.py │ │ ├── potential_issues.py │ │ ├── report.py │ │ ├── security.py │ │ ├── solver.py │ │ ├── swc_data.py │ │ ├── symbolic.py │ │ ├── templates/ │ │ │ ├── callgraph.html │ │ │ ├── report_as_markdown.jinja2 │ │ │ └── report_as_text.jinja2 │ │ └── traceexplore.py │ ├── concolic/ │ │ ├── __init__.py │ │ ├── concolic_execution.py │ │ ├── concrete_data.py │ │ └── find_trace.py │ ├── config.ini │ ├── disassembler/ │ │ ├── __init__.py │ │ ├── asm.py │ │ └── disassembly.py │ ├── ethereum/ │ │ ├── __init__.py │ │ ├── evmcontract.py │ │ ├── interface/ │ │ │ ├── __init__.py │ │ │ └── rpc/ │ │ │ ├── __init__.py │ │ │ ├── base_client.py │ │ │ ├── client.py │ │ │ ├── constants.py │ │ │ ├── exceptions.py │ │ │ └── utils.py │ │ └── util.py │ ├── exceptions.py │ ├── interfaces/ │ │ ├── __init__.py │ │ ├── cli.py │ │ └── epic.py │ ├── laser/ │ │ ├── __init__.py │ │ ├── ethereum/ │ │ │ ├── __init__.py │ │ │ ├── call.py │ │ │ ├── cfg.py │ │ │ ├── cheat_code.py │ │ │ ├── evm_exceptions.py │ │ │ ├── function_managers/ │ │ │ │ ├── __init__.py │ │ │ │ ├── exponent_function_manager.py │ │ │ │ └── keccak_function_manager.py │ │ │ ├── instruction_data.py │ │ │ ├── instructions.py │ │ │ ├── natives.py │ │ │ ├── state/ │ │ │ │ ├── __init__.py │ │ │ │ ├── account.py │ │ │ │ ├── annotation.py │ │ │ │ ├── calldata.py │ │ │ │ ├── constraints.py │ │ │ │ ├── environment.py │ │ │ │ ├── global_state.py │ │ │ │ ├── machine_state.py │ │ │ │ ├── memory.py │ │ │ │ ├── return_data.py │ │ │ │ ├── transient_storage.py │ │ │ │ └── world_state.py │ │ │ ├── strategy/ │ │ │ │ ├── __init__.py │ │ │ │ ├── basic.py │ │ │ │ ├── beam.py │ │ │ │ ├── concolic.py │ │ │ │ ├── constraint_strategy.py │ │ │ │ └── extensions/ │ │ │ │ ├── __init__.py │ │ │ │ └── bounded_loops.py │ │ │ ├── svm.py │ │ │ ├── time_handler.py │ │ │ ├── transaction/ │ │ │ │ ├── __init__.py │ │ │ │ ├── concolic.py │ │ │ │ ├── symbolic.py │ │ │ │ └── transaction_models.py │ │ │ ├── tx_prioritiser/ │ │ │ │ ├── __init__.py │ │ │ │ └── rf_prioritiser.py │ │ │ └── util.py │ │ ├── execution_info.py │ │ ├── plugin/ │ │ │ ├── __init__.py │ │ │ ├── builder.py │ │ │ ├── interface.py │ │ │ ├── loader.py │ │ │ ├── plugins/ │ │ │ │ ├── __init__.py │ │ │ │ ├── benchmark.py │ │ │ │ ├── call_depth_limiter.py │ │ │ │ ├── coverage/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── coverage_plugin.py │ │ │ │ │ └── coverage_strategy.py │ │ │ │ ├── coverage_metrics/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── constants.py │ │ │ │ │ ├── coverage_data.py │ │ │ │ │ └── metrics_plugin.py │ │ │ │ ├── dependency_pruner.py │ │ │ │ ├── instruction_profiler.py │ │ │ │ ├── mutation_pruner.py │ │ │ │ ├── plugin_annotations.py │ │ │ │ ├── state_merge/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── check_mergeability.py │ │ │ │ │ ├── merge_states.py │ │ │ │ │ └── state_merge_plugin.py │ │ │ │ ├── summary/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── annotations.py │ │ │ │ │ ├── core.py │ │ │ │ │ └── summary.py │ │ │ │ ├── summary_backup/ │ │ │ │ │ └── __init__.py │ │ │ │ └── trace.py │ │ │ └── signals.py │ │ └── smt/ │ │ ├── __init__.py │ │ ├── array.py │ │ ├── bitvec.py │ │ ├── bitvec_helper.py │ │ ├── bool.py │ │ ├── expression.py │ │ ├── function.py │ │ ├── model.py │ │ └── solver/ │ │ ├── __init__.py │ │ ├── independence_solver.py │ │ ├── solver.py │ │ └── solver_statistics.py │ ├── mythril/ │ │ ├── __init__.py │ │ ├── mythril_analyzer.py │ │ ├── mythril_config.py │ │ └── mythril_disassembler.py │ ├── plugin/ │ │ ├── __init__.py │ │ ├── discovery.py │ │ ├── interface.py │ │ └── loader.py │ ├── solidity/ │ │ ├── __init__.py │ │ ├── features.py │ │ └── soliditycontract.py │ └── support/ │ ├── __init__.py │ ├── loader.py │ ├── lock.py │ ├── model.py │ ├── opcodes.py │ ├── signatures.py │ ├── source_support.py │ ├── start_time.py │ ├── support_args.py │ └── support_utils.py ├── pyproject.toml ├── requirements.txt ├── setup.py ├── solidity_examples/ │ ├── BECToken.sol │ ├── WalletLibrary.sol │ ├── calls.sol │ ├── etherstore.sol │ ├── exceptions.sol │ ├── hashforether.sol │ ├── killbilly.sol │ ├── origin.sol │ ├── returnvalue.sol │ ├── rubixi.sol │ ├── suicide.sol │ ├── timelock.sol │ ├── token.sol │ └── weak_random.sol ├── static/ │ ├── Ownable.html │ ├── assertions.html │ ├── mythril.html │ └── sample_report.md ├── tests/ │ ├── __init__.py │ ├── analysis/ │ │ ├── abi_decode_test.py │ │ └── arbitrary_jump_test.py │ ├── cli_tests/ │ │ └── cli_opts_test.py │ ├── cmd_line_test.py │ ├── concolic/ │ │ └── concolic_tests.py │ ├── disassembler/ │ │ ├── __init__.py │ │ ├── asm_test.py │ │ └── disassembly_test.py │ ├── disassembler_test.py │ ├── evmcontract_test.py │ ├── features_test.py │ ├── graph_test.py │ ├── instructions/ │ │ ├── __init__.py │ │ ├── basefee_test.py │ │ ├── codecopy_test.py │ │ ├── create2_test.py │ │ ├── create_test.py │ │ ├── extcodecopy_test.py │ │ ├── extcodehash_test.py │ │ ├── push_test.py │ │ ├── sar_test.py │ │ ├── shl_test.py │ │ ├── shr_test.py │ │ └── static_call_test.py │ ├── integration_tests/ │ │ ├── analysis_tests.py │ │ ├── coverage_metrics_test.py │ │ ├── old_version_test.py │ │ ├── safe_functions_test.py │ │ ├── solc_settings_test.py │ │ ├── src_mapping_test.py │ │ ├── state_merge_tests.py │ │ ├── summary_test.py │ │ ├── transient_storage_test.py │ │ ├── utils.py │ │ └── version_test.py │ ├── laser/ │ │ ├── Precompiles/ │ │ │ ├── blake2_test.py │ │ │ ├── ec_add_test.py │ │ │ ├── ecrecover_test.py │ │ │ ├── elliptic_curves_test.py │ │ │ ├── elliptic_mul_test.py │ │ │ ├── identity_test.py │ │ │ ├── mod_exp_test.py │ │ │ ├── ripemd_test.py │ │ │ └── sha256_test.py │ │ ├── __init__.py │ │ ├── evm_testsuite/ │ │ │ ├── VMTests/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── vmArithmeticTest/ │ │ │ │ │ ├── add0.json │ │ │ │ │ ├── add1.json │ │ │ │ │ ├── add2.json │ │ │ │ │ ├── add3.json │ │ │ │ │ ├── add4.json │ │ │ │ │ ├── addmod0.json │ │ │ │ │ ├── addmod1.json │ │ │ │ │ ├── addmod1_overflow2.json │ │ │ │ │ ├── addmod1_overflow3.json │ │ │ │ │ ├── addmod1_overflow4.json │ │ │ │ │ ├── addmod1_overflowDiff.json │ │ │ │ │ ├── addmod2.json │ │ │ │ │ ├── addmod2_0.json │ │ │ │ │ ├── addmod2_1.json │ │ │ │ │ ├── addmod3.json │ │ │ │ │ ├── addmod3_0.json │ │ │ │ │ ├── addmodBigIntCast.json │ │ │ │ │ ├── addmodDivByZero.json │ │ │ │ │ ├── addmodDivByZero1.json │ │ │ │ │ ├── addmodDivByZero2.json │ │ │ │ │ ├── addmodDivByZero3.json │ │ │ │ │ ├── arith1.json │ │ │ │ │ ├── div1.json │ │ │ │ │ ├── divBoostBug.json │ │ │ │ │ ├── divByNonZero0.json │ │ │ │ │ ├── divByNonZero1.json │ │ │ │ │ ├── divByNonZero2.json │ │ │ │ │ ├── divByNonZero3.json │ │ │ │ │ ├── divByZero.json │ │ │ │ │ ├── divByZero_2.json │ │ │ │ │ ├── exp0.json │ │ │ │ │ ├── exp1.json │ │ │ │ │ ├── exp2.json │ │ │ │ │ ├── exp3.json │ │ │ │ │ ├── exp4.json │ │ │ │ │ ├── exp5.json │ │ │ │ │ ├── exp6.json │ │ │ │ │ ├── exp7.json │ │ │ │ │ ├── exp8.json │ │ │ │ │ ├── expPowerOf256Of256_0.json │ │ │ │ │ ├── expPowerOf256Of256_1.json │ │ │ │ │ ├── expPowerOf256Of256_10.json │ │ │ │ │ ├── expPowerOf256Of256_11.json │ │ │ │ │ ├── expPowerOf256Of256_12.json │ │ │ │ │ ├── expPowerOf256Of256_13.json │ │ │ │ │ ├── expPowerOf256Of256_14.json │ │ │ │ │ ├── expPowerOf256Of256_15.json │ │ │ │ │ ├── expPowerOf256Of256_16.json │ │ │ │ │ ├── expPowerOf256Of256_17.json │ │ │ │ │ ├── expPowerOf256Of256_18.json │ │ │ │ │ ├── expPowerOf256Of256_19.json │ │ │ │ │ ├── expPowerOf256Of256_2.json │ │ │ │ │ ├── expPowerOf256Of256_20.json │ │ │ │ │ ├── expPowerOf256Of256_21.json │ │ │ │ │ ├── expPowerOf256Of256_22.json │ │ │ │ │ ├── expPowerOf256Of256_23.json │ │ │ │ │ ├── expPowerOf256Of256_24.json │ │ │ │ │ ├── expPowerOf256Of256_25.json │ │ │ │ │ ├── expPowerOf256Of256_26.json │ │ │ │ │ ├── expPowerOf256Of256_27.json │ │ │ │ │ ├── expPowerOf256Of256_28.json │ │ │ │ │ ├── expPowerOf256Of256_29.json │ │ │ │ │ ├── expPowerOf256Of256_3.json │ │ │ │ │ ├── expPowerOf256Of256_30.json │ │ │ │ │ ├── expPowerOf256Of256_31.json │ │ │ │ │ ├── expPowerOf256Of256_32.json │ │ │ │ │ ├── expPowerOf256Of256_33.json │ │ │ │ │ ├── expPowerOf256Of256_4.json │ │ │ │ │ ├── expPowerOf256Of256_5.json │ │ │ │ │ ├── expPowerOf256Of256_6.json │ │ │ │ │ ├── expPowerOf256Of256_7.json │ │ │ │ │ ├── expPowerOf256Of256_8.json │ │ │ │ │ ├── expPowerOf256Of256_9.json │ │ │ │ │ ├── expPowerOf256_1.json │ │ │ │ │ ├── expPowerOf256_10.json │ │ │ │ │ ├── expPowerOf256_11.json │ │ │ │ │ ├── expPowerOf256_12.json │ │ │ │ │ ├── expPowerOf256_13.json │ │ │ │ │ ├── expPowerOf256_14.json │ │ │ │ │ ├── expPowerOf256_15.json │ │ │ │ │ ├── expPowerOf256_16.json │ │ │ │ │ ├── expPowerOf256_17.json │ │ │ │ │ ├── expPowerOf256_18.json │ │ │ │ │ ├── expPowerOf256_19.json │ │ │ │ │ ├── expPowerOf256_2.json │ │ │ │ │ ├── expPowerOf256_20.json │ │ │ │ │ ├── expPowerOf256_21.json │ │ │ │ │ ├── expPowerOf256_22.json │ │ │ │ │ ├── expPowerOf256_23.json │ │ │ │ │ ├── expPowerOf256_24.json │ │ │ │ │ ├── expPowerOf256_25.json │ │ │ │ │ ├── expPowerOf256_26.json │ │ │ │ │ ├── expPowerOf256_27.json │ │ │ │ │ ├── expPowerOf256_28.json │ │ │ │ │ ├── expPowerOf256_29.json │ │ │ │ │ ├── expPowerOf256_3.json │ │ │ │ │ ├── expPowerOf256_30.json │ │ │ │ │ ├── expPowerOf256_31.json │ │ │ │ │ ├── expPowerOf256_32.json │ │ │ │ │ ├── expPowerOf256_33.json │ │ │ │ │ ├── expPowerOf256_4.json │ │ │ │ │ ├── expPowerOf256_5.json │ │ │ │ │ ├── expPowerOf256_6.json │ │ │ │ │ ├── expPowerOf256_7.json │ │ │ │ │ ├── expPowerOf256_8.json │ │ │ │ │ ├── expPowerOf256_9.json │ │ │ │ │ ├── expPowerOf2_128.json │ │ │ │ │ ├── expPowerOf2_16.json │ │ │ │ │ ├── expPowerOf2_2.json │ │ │ │ │ ├── expPowerOf2_256.json │ │ │ │ │ ├── expPowerOf2_32.json │ │ │ │ │ ├── expPowerOf2_4.json │ │ │ │ │ ├── expPowerOf2_64.json │ │ │ │ │ ├── expPowerOf2_8.json │ │ │ │ │ ├── expXY.json │ │ │ │ │ ├── expXY_success.json │ │ │ │ │ ├── fibbonacci_unrolled.json │ │ │ │ │ ├── mod0.json │ │ │ │ │ ├── mod1.json │ │ │ │ │ ├── mod2.json │ │ │ │ │ ├── mod3.json │ │ │ │ │ ├── mod4.json │ │ │ │ │ ├── modByZero.json │ │ │ │ │ ├── mul0.json │ │ │ │ │ ├── mul1.json │ │ │ │ │ ├── mul2.json │ │ │ │ │ ├── mul3.json │ │ │ │ │ ├── mul4.json │ │ │ │ │ ├── mul5.json │ │ │ │ │ ├── mul6.json │ │ │ │ │ ├── mul7.json │ │ │ │ │ ├── mulmod0.json │ │ │ │ │ ├── mulmod1.json │ │ │ │ │ ├── mulmod1_overflow.json │ │ │ │ │ ├── mulmod1_overflow2.json │ │ │ │ │ ├── mulmod1_overflow3.json │ │ │ │ │ ├── mulmod1_overflow4.json │ │ │ │ │ ├── mulmod2.json │ │ │ │ │ ├── mulmod2_0.json │ │ │ │ │ ├── mulmod2_1.json │ │ │ │ │ ├── mulmod3.json │ │ │ │ │ ├── mulmod3_0.json │ │ │ │ │ ├── mulmod4.json │ │ │ │ │ ├── mulmoddivByZero.json │ │ │ │ │ ├── mulmoddivByZero1.json │ │ │ │ │ ├── mulmoddivByZero2.json │ │ │ │ │ ├── mulmoddivByZero3.json │ │ │ │ │ ├── not1.json │ │ │ │ │ ├── sdiv0.json │ │ │ │ │ ├── sdiv1.json │ │ │ │ │ ├── sdiv2.json │ │ │ │ │ ├── sdiv3.json │ │ │ │ │ ├── sdiv4.json │ │ │ │ │ ├── sdiv5.json │ │ │ │ │ ├── sdiv6.json │ │ │ │ │ ├── sdiv7.json │ │ │ │ │ ├── sdiv8.json │ │ │ │ │ ├── sdiv9.json │ │ │ │ │ ├── sdivByZero0.json │ │ │ │ │ ├── sdivByZero1.json │ │ │ │ │ ├── sdivByZero2.json │ │ │ │ │ ├── sdiv_dejavu.json │ │ │ │ │ ├── sdiv_i256min.json │ │ │ │ │ ├── sdiv_i256min2.json │ │ │ │ │ ├── sdiv_i256min3.json │ │ │ │ │ ├── signextendInvalidByteNumber.json │ │ │ │ │ ├── signextend_00.json │ │ │ │ │ ├── signextend_0_BigByte.json │ │ │ │ │ ├── signextend_AlmostBiggestByte.json │ │ │ │ │ ├── signextend_BigByteBigByte.json │ │ │ │ │ ├── signextend_BigBytePlus1_2.json │ │ │ │ │ ├── signextend_BigByte_0.json │ │ │ │ │ ├── signextend_BitIsNotSet.json │ │ │ │ │ ├── signextend_BitIsNotSetInHigherByte.json │ │ │ │ │ ├── signextend_BitIsSetInHigherByte.json │ │ │ │ │ ├── signextend_Overflow_dj42.json │ │ │ │ │ ├── signextend_bigBytePlus1.json │ │ │ │ │ ├── signextend_bitIsSet.json │ │ │ │ │ ├── smod0.json │ │ │ │ │ ├── smod1.json │ │ │ │ │ ├── smod2.json │ │ │ │ │ ├── smod3.json │ │ │ │ │ ├── smod4.json │ │ │ │ │ ├── smod5.json │ │ │ │ │ ├── smod6.json │ │ │ │ │ ├── smod7.json │ │ │ │ │ ├── smod8_byZero.json │ │ │ │ │ ├── smod_i256min1.json │ │ │ │ │ ├── smod_i256min2.json │ │ │ │ │ ├── stop.json │ │ │ │ │ ├── sub0.json │ │ │ │ │ ├── sub1.json │ │ │ │ │ ├── sub2.json │ │ │ │ │ ├── sub3.json │ │ │ │ │ └── sub4.json │ │ │ │ ├── vmBitwiseLogicOperation/ │ │ │ │ │ ├── and0.json │ │ │ │ │ ├── and1.json │ │ │ │ │ ├── and2.json │ │ │ │ │ ├── and3.json │ │ │ │ │ ├── and4.json │ │ │ │ │ ├── and5.json │ │ │ │ │ ├── byte0.json │ │ │ │ │ ├── byte1.json │ │ │ │ │ ├── byte10.json │ │ │ │ │ ├── byte11.json │ │ │ │ │ ├── byte2.json │ │ │ │ │ ├── byte3.json │ │ │ │ │ ├── byte4.json │ │ │ │ │ ├── byte5.json │ │ │ │ │ ├── byte6.json │ │ │ │ │ ├── byte7.json │ │ │ │ │ ├── byte8.json │ │ │ │ │ ├── byte9.json │ │ │ │ │ ├── eq0.json │ │ │ │ │ ├── eq1.json │ │ │ │ │ ├── eq2.json │ │ │ │ │ ├── gt0.json │ │ │ │ │ ├── gt1.json │ │ │ │ │ ├── gt2.json │ │ │ │ │ ├── gt3.json │ │ │ │ │ ├── iszeo2.json │ │ │ │ │ ├── iszero0.json │ │ │ │ │ ├── iszero1.json │ │ │ │ │ ├── lt0.json │ │ │ │ │ ├── lt1.json │ │ │ │ │ ├── lt2.json │ │ │ │ │ ├── lt3.json │ │ │ │ │ ├── not0.json │ │ │ │ │ ├── not1.json │ │ │ │ │ ├── not2.json │ │ │ │ │ ├── not3.json │ │ │ │ │ ├── not4.json │ │ │ │ │ ├── not5.json │ │ │ │ │ ├── or0.json │ │ │ │ │ ├── or1.json │ │ │ │ │ ├── or2.json │ │ │ │ │ ├── or3.json │ │ │ │ │ ├── or4.json │ │ │ │ │ ├── or5.json │ │ │ │ │ ├── sgt0.json │ │ │ │ │ ├── sgt1.json │ │ │ │ │ ├── sgt2.json │ │ │ │ │ ├── sgt3.json │ │ │ │ │ ├── sgt4.json │ │ │ │ │ ├── slt0.json │ │ │ │ │ ├── slt1.json │ │ │ │ │ ├── slt2.json │ │ │ │ │ ├── slt3.json │ │ │ │ │ ├── slt4.json │ │ │ │ │ ├── xor0.json │ │ │ │ │ ├── xor1.json │ │ │ │ │ ├── xor2.json │ │ │ │ │ ├── xor3.json │ │ │ │ │ ├── xor4.json │ │ │ │ │ └── xor5.json │ │ │ │ ├── vmEnvironmentalInfo/ │ │ │ │ │ ├── address0.json │ │ │ │ │ ├── address1.json │ │ │ │ │ ├── calldatacopy0.json │ │ │ │ │ ├── calldatacopy0_return.json │ │ │ │ │ ├── calldatacopy1.json │ │ │ │ │ ├── calldatacopy1_return.json │ │ │ │ │ ├── calldatacopy2.json │ │ │ │ │ ├── calldatacopy2_return.json │ │ │ │ │ ├── calldatacopyUnderFlowerror.json │ │ │ │ │ ├── calldatacopyZeroMemExpansion.json │ │ │ │ │ ├── calldatacopyZeroMemExpansion_return.json │ │ │ │ │ ├── calldatacopy_DataIndexTooHigh.json │ │ │ │ │ ├── calldatacopy_DataIndexTooHigh2.json │ │ │ │ │ ├── calldatacopy_DataIndexTooHigh2_return.json │ │ │ │ │ ├── calldatacopy_DataIndexTooHigh_return.json │ │ │ │ │ ├── calldatacopy_sec.json │ │ │ │ │ ├── calldataload0.json │ │ │ │ │ ├── calldataload1.json │ │ │ │ │ ├── calldataload2.json │ │ │ │ │ ├── calldataloadSizeTooHigh.json │ │ │ │ │ ├── calldataloadSizeTooHighPartial.json │ │ │ │ │ ├── calldataload_BigOffset.json │ │ │ │ │ ├── calldatasize0.json │ │ │ │ │ ├── calldatasize1.json │ │ │ │ │ ├── calldatasize2.json │ │ │ │ │ ├── caller.json │ │ │ │ │ ├── callvalue.json │ │ │ │ │ ├── codecopy0.json │ │ │ │ │ ├── codecopyZeroMemExpansion.json │ │ │ │ │ ├── codecopy_DataIndexTooHigh.json │ │ │ │ │ ├── codesize.json │ │ │ │ │ ├── gasprice.json │ │ │ │ │ └── origin.json │ │ │ │ ├── vmIOandFlowOperations/ │ │ │ │ │ ├── BlockNumberDynamicJump0_AfterJumpdest.json │ │ │ │ │ ├── BlockNumberDynamicJump0_AfterJumpdest3.json │ │ │ │ │ ├── BlockNumberDynamicJump0_foreverOutOfGas.json │ │ │ │ │ ├── BlockNumberDynamicJump0_jumpdest0.json │ │ │ │ │ ├── BlockNumberDynamicJump0_jumpdest2.json │ │ │ │ │ ├── BlockNumberDynamicJump0_withoutJumpdest.json │ │ │ │ │ ├── BlockNumberDynamicJump1.json │ │ │ │ │ ├── BlockNumberDynamicJumpInsidePushWithJumpDest.json │ │ │ │ │ ├── BlockNumberDynamicJumpInsidePushWithoutJumpDest.json │ │ │ │ │ ├── BlockNumberDynamicJumpi0.json │ │ │ │ │ ├── BlockNumberDynamicJumpi1.json │ │ │ │ │ ├── BlockNumberDynamicJumpi1_jumpdest.json │ │ │ │ │ ├── BlockNumberDynamicJumpiAfterStop.json │ │ │ │ │ ├── BlockNumberDynamicJumpiOutsideBoundary.json │ │ │ │ │ ├── BlockNumberDynamicJumpifInsidePushWithJumpDest.json │ │ │ │ │ ├── BlockNumberDynamicJumpifInsidePushWithoutJumpDest.json │ │ │ │ │ ├── DyanmicJump0_outOfBoundary.json │ │ │ │ │ ├── DynamicJump0_AfterJumpdest.json │ │ │ │ │ ├── DynamicJump0_AfterJumpdest3.json │ │ │ │ │ ├── DynamicJump0_foreverOutOfGas.json │ │ │ │ │ ├── DynamicJump0_jumpdest0.json │ │ │ │ │ ├── DynamicJump0_jumpdest2.json │ │ │ │ │ ├── DynamicJump0_withoutJumpdest.json │ │ │ │ │ ├── DynamicJump1.json │ │ │ │ │ ├── DynamicJumpAfterStop.json │ │ │ │ │ ├── DynamicJumpInsidePushWithJumpDest.json │ │ │ │ │ ├── DynamicJumpInsidePushWithoutJumpDest.json │ │ │ │ │ ├── DynamicJumpJD_DependsOnJumps0.json │ │ │ │ │ ├── DynamicJumpJD_DependsOnJumps1.json │ │ │ │ │ ├── DynamicJumpPathologicalTest0.json │ │ │ │ │ ├── DynamicJumpPathologicalTest1.json │ │ │ │ │ ├── DynamicJumpPathologicalTest2.json │ │ │ │ │ ├── DynamicJumpPathologicalTest3.json │ │ │ │ │ ├── DynamicJumpStartWithJumpDest.json │ │ │ │ │ ├── DynamicJump_value1.json │ │ │ │ │ ├── DynamicJump_value2.json │ │ │ │ │ ├── DynamicJump_value3.json │ │ │ │ │ ├── DynamicJump_valueUnderflow.json │ │ │ │ │ ├── DynamicJumpi0.json │ │ │ │ │ ├── DynamicJumpi1.json │ │ │ │ │ ├── DynamicJumpi1_jumpdest.json │ │ │ │ │ ├── DynamicJumpiAfterStop.json │ │ │ │ │ ├── DynamicJumpiOutsideBoundary.json │ │ │ │ │ ├── DynamicJumpifInsidePushWithJumpDest.json │ │ │ │ │ ├── DynamicJumpifInsidePushWithoutJumpDest.json │ │ │ │ │ ├── JDfromStorageDynamicJump0_AfterJumpdest.json │ │ │ │ │ ├── JDfromStorageDynamicJump0_AfterJumpdest3.json │ │ │ │ │ ├── JDfromStorageDynamicJump0_foreverOutOfGas.json │ │ │ │ │ ├── JDfromStorageDynamicJump0_jumpdest0.json │ │ │ │ │ ├── JDfromStorageDynamicJump0_jumpdest2.json │ │ │ │ │ ├── JDfromStorageDynamicJump0_withoutJumpdest.json │ │ │ │ │ ├── JDfromStorageDynamicJump1.json │ │ │ │ │ ├── JDfromStorageDynamicJumpInsidePushWithJumpDest.json │ │ │ │ │ ├── JDfromStorageDynamicJumpInsidePushWithoutJumpDest.json │ │ │ │ │ ├── JDfromStorageDynamicJumpi0.json │ │ │ │ │ ├── JDfromStorageDynamicJumpi1.json │ │ │ │ │ ├── JDfromStorageDynamicJumpi1_jumpdest.json │ │ │ │ │ ├── JDfromStorageDynamicJumpiAfterStop.json │ │ │ │ │ ├── JDfromStorageDynamicJumpiOutsideBoundary.json │ │ │ │ │ ├── JDfromStorageDynamicJumpifInsidePushWithJumpDest.json │ │ │ │ │ ├── JDfromStorageDynamicJumpifInsidePushWithoutJumpDest.json │ │ │ │ │ ├── bad_indirect_jump1.json │ │ │ │ │ ├── bad_indirect_jump2.json │ │ │ │ │ ├── byte1.json │ │ │ │ │ ├── calldatacopyMemExp.json │ │ │ │ │ ├── codecopyMemExp.json │ │ │ │ │ ├── deadCode_1.json │ │ │ │ │ ├── dupAt51becameMload.json │ │ │ │ │ ├── for_loop1.json │ │ │ │ │ ├── for_loop2.json │ │ │ │ │ ├── gas0.json │ │ │ │ │ ├── gas1.json │ │ │ │ │ ├── gasOverFlow.json │ │ │ │ │ ├── indirect_jump1.json │ │ │ │ │ ├── indirect_jump2.json │ │ │ │ │ ├── indirect_jump3.json │ │ │ │ │ ├── indirect_jump4.json │ │ │ │ │ ├── jump0_AfterJumpdest.json │ │ │ │ │ ├── jump0_AfterJumpdest3.json │ │ │ │ │ ├── jump0_foreverOutOfGas.json │ │ │ │ │ ├── jump0_jumpdest0.json │ │ │ │ │ ├── jump0_jumpdest2.json │ │ │ │ │ ├── jump0_outOfBoundary.json │ │ │ │ │ ├── jump0_withoutJumpdest.json │ │ │ │ │ ├── jump1.json │ │ │ │ │ ├── jumpAfterStop.json │ │ │ │ │ ├── jumpDynamicJumpSameDest.json │ │ │ │ │ ├── jumpHigh.json │ │ │ │ │ ├── jumpInsidePushWithJumpDest.json │ │ │ │ │ ├── jumpInsidePushWithoutJumpDest.json │ │ │ │ │ ├── jumpOntoJump.json │ │ │ │ │ ├── jumpTo1InstructionafterJump.json │ │ │ │ │ ├── jumpTo1InstructionafterJump_jumpdestFirstInstruction.json │ │ │ │ │ ├── jumpTo1InstructionafterJump_noJumpDest.json │ │ │ │ │ ├── jumpToUint64maxPlus1.json │ │ │ │ │ ├── jumpToUintmaxPlus1.json │ │ │ │ │ ├── jumpdestBigList.json │ │ │ │ │ ├── jumpi0.json │ │ │ │ │ ├── jumpi1.json │ │ │ │ │ ├── jumpi1_jumpdest.json │ │ │ │ │ ├── jumpiAfterStop.json │ │ │ │ │ ├── jumpiOutsideBoundary.json │ │ │ │ │ ├── jumpiToUint64maxPlus1.json │ │ │ │ │ ├── jumpiToUintmaxPlus1.json │ │ │ │ │ ├── jumpi_at_the_end.json │ │ │ │ │ ├── jumpifInsidePushWithJumpDest.json │ │ │ │ │ ├── jumpifInsidePushWithoutJumpDest.json │ │ │ │ │ ├── kv1.json │ │ │ │ │ ├── log1MemExp.json │ │ │ │ │ ├── loop_stacklimit_1020.json │ │ │ │ │ ├── loop_stacklimit_1021.json │ │ │ │ │ ├── memory1.json │ │ │ │ │ ├── mloadError0.json │ │ │ │ │ ├── mloadError1.json │ │ │ │ │ ├── mloadMemExp.json │ │ │ │ │ ├── mloadOutOfGasError2.json │ │ │ │ │ ├── msize0.json │ │ │ │ │ ├── msize1.json │ │ │ │ │ ├── msize2.json │ │ │ │ │ ├── msize3.json │ │ │ │ │ ├── mstore0.json │ │ │ │ │ ├── mstore1.json │ │ │ │ │ ├── mstore8MemExp.json │ │ │ │ │ ├── mstore8WordToBigError.json │ │ │ │ │ ├── mstore8_0.json │ │ │ │ │ ├── mstore8_1.json │ │ │ │ │ ├── mstoreMemExp.json │ │ │ │ │ ├── mstoreWordToBigError.json │ │ │ │ │ ├── mstore_mload0.json │ │ │ │ │ ├── pc0.json │ │ │ │ │ ├── pc1.json │ │ │ │ │ ├── pop0.json │ │ │ │ │ ├── pop1.json │ │ │ │ │ ├── return1.json │ │ │ │ │ ├── return2.json │ │ │ │ │ ├── sha3MemExp.json │ │ │ │ │ ├── sstore_load_0.json │ │ │ │ │ ├── sstore_load_1.json │ │ │ │ │ ├── sstore_load_2.json │ │ │ │ │ ├── sstore_underflow.json │ │ │ │ │ ├── stack_loop.json │ │ │ │ │ ├── stackjump1.json │ │ │ │ │ ├── swapAt52becameMstore.json │ │ │ │ │ └── when.json │ │ │ │ ├── vmPushDupSwapTest/ │ │ │ │ │ ├── dup1.json │ │ │ │ │ ├── dup10.json │ │ │ │ │ ├── dup11.json │ │ │ │ │ ├── dup12.json │ │ │ │ │ ├── dup13.json │ │ │ │ │ ├── dup14.json │ │ │ │ │ ├── dup15.json │ │ │ │ │ ├── dup16.json │ │ │ │ │ ├── dup2.json │ │ │ │ │ ├── dup2error.json │ │ │ │ │ ├── dup3.json │ │ │ │ │ ├── dup4.json │ │ │ │ │ ├── dup5.json │ │ │ │ │ ├── dup6.json │ │ │ │ │ ├── dup7.json │ │ │ │ │ ├── dup8.json │ │ │ │ │ ├── dup9.json │ │ │ │ │ ├── push1.json │ │ │ │ │ ├── push10.json │ │ │ │ │ ├── push11.json │ │ │ │ │ ├── push12.json │ │ │ │ │ ├── push13.json │ │ │ │ │ ├── push14.json │ │ │ │ │ ├── push15.json │ │ │ │ │ ├── push16.json │ │ │ │ │ ├── push17.json │ │ │ │ │ ├── push18.json │ │ │ │ │ ├── push19.json │ │ │ │ │ ├── push1_missingStack.json │ │ │ │ │ ├── push2.json │ │ │ │ │ ├── push20.json │ │ │ │ │ ├── push21.json │ │ │ │ │ ├── push22.json │ │ │ │ │ ├── push23.json │ │ │ │ │ ├── push24.json │ │ │ │ │ ├── push25.json │ │ │ │ │ ├── push26.json │ │ │ │ │ ├── push27.json │ │ │ │ │ ├── push28.json │ │ │ │ │ ├── push29.json │ │ │ │ │ ├── push3.json │ │ │ │ │ ├── push30.json │ │ │ │ │ ├── push31.json │ │ │ │ │ ├── push32.json │ │ │ │ │ ├── push32AndSuicide.json │ │ │ │ │ ├── push32FillUpInputWithZerosAtTheEnd.json │ │ │ │ │ ├── push32Undefined.json │ │ │ │ │ ├── push32Undefined2.json │ │ │ │ │ ├── push32Undefined3.json │ │ │ │ │ ├── push33.json │ │ │ │ │ ├── push4.json │ │ │ │ │ ├── push5.json │ │ │ │ │ ├── push6.json │ │ │ │ │ ├── push7.json │ │ │ │ │ ├── push8.json │ │ │ │ │ ├── push9.json │ │ │ │ │ ├── swap1.json │ │ │ │ │ ├── swap10.json │ │ │ │ │ ├── swap11.json │ │ │ │ │ ├── swap12.json │ │ │ │ │ ├── swap13.json │ │ │ │ │ ├── swap14.json │ │ │ │ │ ├── swap15.json │ │ │ │ │ ├── swap16.json │ │ │ │ │ ├── swap2.json │ │ │ │ │ ├── swap2error.json │ │ │ │ │ ├── swap3.json │ │ │ │ │ ├── swap4.json │ │ │ │ │ ├── swap5.json │ │ │ │ │ ├── swap6.json │ │ │ │ │ ├── swap7.json │ │ │ │ │ ├── swap8.json │ │ │ │ │ ├── swap9.json │ │ │ │ │ └── swapjump1.json │ │ │ │ ├── vmRandomTest/ │ │ │ │ │ ├── 201503102320PYTHON.json │ │ │ │ │ ├── 201503110206PYTHON.json │ │ │ │ │ ├── 201503110219PYTHON.json │ │ │ │ │ ├── 201503110346PYTHON_PUSH24.json │ │ │ │ │ ├── 201503111844PYTHON.json │ │ │ │ │ └── 201503112218PYTHON.json │ │ │ │ ├── vmSha3Test/ │ │ │ │ │ ├── sha3_0.json │ │ │ │ │ ├── sha3_1.json │ │ │ │ │ ├── sha3_2.json │ │ │ │ │ ├── sha3_3oog.json │ │ │ │ │ ├── sha3_4oog.json │ │ │ │ │ ├── sha3_5oog.json │ │ │ │ │ ├── sha3_6oog.json │ │ │ │ │ ├── sha3_bigOffset2.json │ │ │ │ │ ├── sha3_bigOffsetoog.json │ │ │ │ │ ├── sha3_bigSizeoog.json │ │ │ │ │ ├── sha3_memSizeNoQuadraticCost31.json │ │ │ │ │ ├── sha3_memSizeQuadraticCost32.json │ │ │ │ │ ├── sha3_memSizeQuadraticCost32_zeroSize.json │ │ │ │ │ ├── sha3_memSizeQuadraticCost33.json │ │ │ │ │ ├── sha3_memSizeQuadraticCost63.json │ │ │ │ │ ├── sha3_memSizeQuadraticCost64.json │ │ │ │ │ ├── sha3_memSizeQuadraticCost64_2.json │ │ │ │ │ └── sha3_memSizeQuadraticCost65.json │ │ │ │ ├── vmSystemOperations/ │ │ │ │ │ ├── TestNameRegistrator.json │ │ │ │ │ ├── return0.json │ │ │ │ │ ├── return1.json │ │ │ │ │ ├── return2.json │ │ │ │ │ ├── suicide0.json │ │ │ │ │ ├── suicideNotExistingAccount.json │ │ │ │ │ └── suicideSendEtherToMe.json │ │ │ │ └── vmTests/ │ │ │ │ └── suicide.json │ │ │ └── evm_test.py │ │ ├── keccak_tests.py │ │ ├── smt/ │ │ │ ├── __init__.py │ │ │ ├── independece_solver_test.py │ │ │ └── model_test.py │ │ ├── state/ │ │ │ ├── __init__.py │ │ │ ├── calldata_test.py │ │ │ ├── mstack_test.py │ │ │ ├── mstate_test.py │ │ │ ├── storage_test.py │ │ │ └── world_state_account_exist_load_test.py │ │ ├── strategy/ │ │ │ ├── beam_test.py │ │ │ └── loop_bound_test.py │ │ ├── transaction/ │ │ │ ├── __init__.py │ │ │ ├── create_transaction_test.py │ │ │ └── symbolic_test.py │ │ ├── transaction_test.py │ │ └── tx_prioritisation_test.py │ ├── mythril/ │ │ ├── mythril_analyzer_test.py │ │ ├── mythril_config_test.py │ │ └── mythril_disassembler_test.py │ ├── plugin/ │ │ ├── interface_test.py │ │ └── loader_test.py │ ├── pre-commit-hooks/ │ │ ├── Counter.sol │ │ └── test.sh │ ├── rpc_test.py │ ├── solidity_contract_test.py │ ├── statespace_test.py │ ├── testdata/ │ │ ├── __init__.py │ │ ├── compile.py │ │ ├── concolic_io/ │ │ │ ├── multi_contract_example.sol │ │ │ ├── multi_contract_example_input.json │ │ │ ├── multiple_example.sol │ │ │ ├── multiple_example_input.json │ │ │ ├── simple_example.sol │ │ │ ├── simple_example_input.json │ │ │ ├── two_contract.sol │ │ │ └── two_contract_input.json │ │ ├── input_contracts/ │ │ │ ├── SecureVault.sol │ │ │ ├── SimpleModifier.sol │ │ │ ├── WalletLibrary.sol │ │ │ ├── base_case.sol │ │ │ ├── calls.sol │ │ │ ├── complex.sol │ │ │ ├── constructor_assert.sol │ │ │ ├── destruct.sol │ │ │ ├── destruct_crlf.sol │ │ │ ├── environments.sol │ │ │ ├── ether_send.sol │ │ │ ├── exceptions.sol │ │ │ ├── exceptions_0.8.0.sol │ │ │ ├── extcall.sol │ │ │ ├── flag_array.sol │ │ │ ├── hash_test.sol │ │ │ ├── integer_edge_case.sol │ │ │ ├── kcalls.sol │ │ │ ├── large.sol │ │ │ ├── metacoin.sol │ │ │ ├── multi_contracts.sol │ │ │ ├── nonascii.sol │ │ │ ├── old_origin.sol │ │ │ ├── old_version.sol │ │ │ ├── origin.sol │ │ │ ├── overflow.sol │ │ │ ├── regression_1.sol │ │ │ ├── requirements_violation_neg.sol │ │ │ ├── requirements_violation_pos.sol │ │ │ ├── returnvalue.sol │ │ │ ├── rubixi.sol │ │ │ ├── safe_funcs.sol │ │ │ ├── simple_theft.sol │ │ │ ├── suicide.sol │ │ │ ├── symbolic_exec_bytecode.sol │ │ │ ├── theft.sol │ │ │ ├── transient.sol │ │ │ ├── transient_bug.sol │ │ │ ├── transient_bug_2.sol │ │ │ ├── transient_recursive.sol │ │ │ ├── tx.sol │ │ │ ├── underflow.sol │ │ │ ├── unexpected_ether_neg.sol │ │ │ ├── unexpected_ether_pos.sol │ │ │ ├── version_2.sol │ │ │ ├── version_3.sol │ │ │ ├── version_4.sol │ │ │ ├── version_chaos.sol │ │ │ ├── version_contract.sol │ │ │ ├── version_contract_0.7.0.sol │ │ │ ├── version_contract_0.8.0.sol │ │ │ ├── version_patch.sol │ │ │ └── weak_random.sol │ │ ├── inputs/ │ │ │ ├── calls.sol.o │ │ │ ├── coverage.sol.o │ │ │ ├── environments.sol.o │ │ │ ├── ether_send.sol.o │ │ │ ├── exceptions.sol.o │ │ │ ├── exceptions_0.8.0.sol.o │ │ │ ├── extcall.sol.o │ │ │ ├── flag_array.sol.o │ │ │ ├── kinds_of_calls.sol.o │ │ │ ├── metacoin.sol.o │ │ │ ├── multi_contracts.sol.o │ │ │ ├── nonascii.sol.o │ │ │ ├── origin.sol.o │ │ │ ├── overflow.sol.o │ │ │ ├── returnvalue.sol.o │ │ │ ├── safe_funcs.sol.o │ │ │ ├── suicide.sol.o │ │ │ ├── symbolic_exec_bytecode.sol.o │ │ │ └── underflow.sol.o │ │ ├── json_test_dir/ │ │ │ ├── PRC20.sol │ │ │ ├── dir_a/ │ │ │ │ ├── input_file.sol │ │ │ │ └── input_file_args.sol │ │ │ ├── test_file.json │ │ │ └── test_file_disable.json │ │ └── outputs_expected/ │ │ ├── calls.sol.o.easm │ │ ├── calls.sol.o.graph.html │ │ ├── environments.sol.o.easm │ │ ├── environments.sol.o.graph.html │ │ ├── ether_send.sol.o.easm │ │ ├── ether_send.sol.o.graph.html │ │ ├── exceptions.sol.o.easm │ │ ├── exceptions.sol.o.graph.html │ │ ├── kinds_of_calls.sol.o.easm │ │ ├── kinds_of_calls.sol.o.graph.html │ │ ├── metacoin.sol.o.easm │ │ ├── metacoin.sol.o.graph.html │ │ ├── multi_contracts.sol.o.easm │ │ ├── multi_contracts.sol.o.graph.html │ │ ├── nonascii.sol.o.easm │ │ ├── nonascii.sol.o.graph.html │ │ ├── origin.sol.o.easm │ │ ├── origin.sol.o.graph.html │ │ ├── overflow.sol.o.easm │ │ ├── overflow.sol.o.graph.html │ │ ├── returnvalue.sol.o.easm │ │ ├── returnvalue.sol.o.graph.html │ │ ├── suicide.sol.o.easm │ │ ├── suicide.sol.o.graph.html │ │ ├── underflow.sol.o.easm │ │ └── underflow.sol.o.graph.html │ ├── teststorage/ │ │ ├── contractstorage.fs │ │ ├── contractstorage.fs.index │ │ └── contractstorage.fs.tmp │ └── util_tests.py └── tox.ini
SYMBOL INDEX (1562 symbols across 197 files)
FILE: mypy-stubs/z3/__init__.pyi
class Context (line 16) | class Context: ...
class Z3PPObject (line 17) | class Z3PPObject: ...
class AstRef (line 19) | class AstRef(Z3PPObject):
method __init__ (line 21) | def __init__(self, ast: Ast, ctx: Context) -> None:
method __init__ (line 26) | def __init__(self, ast: Ast) -> None:
method ctx_ref (line 30) | def ctx_ref(self) -> ContextObj: ...
method as_ast (line 31) | def as_ast(self) -> Ast: ...
method children (line 32) | def children(self) -> List[AstRef]: ...
method eq (line 33) | def eq(self, other: AstRef) -> bool: ...
class SortRef (line 38) | class SortRef(AstRef): ...
class FuncDeclRef (line 40) | class FuncDeclRef(AstRef):
method arity (line 41) | def arity(self) -> int: ...
method name (line 42) | def name(self) -> str: ...
method __call__ (line 43) | def __call__(self, *args: ExprRef) -> ExprRef: ...
class ExprRef (line 45) | class ExprRef(AstRef):
method sort (line 46) | def sort(self) -> SortRef: ...
method decl (line 47) | def decl(self) -> FuncDeclRef: ...
class BoolSortRef (line 49) | class BoolSortRef(SortRef): ...
class ArraySortRef (line 50) | class ArraySortRef(SortRef): ...
class BoolRef (line 51) | class BoolRef(ExprRef): ...
function is_true (line 53) | def is_true(a: BoolRef) -> bool: ...
function is_false (line 54) | def is_false(a: BoolRef) -> bool: ...
function is_int_value (line 55) | def is_int_value(a: AstRef) -> bool: ...
function substitute (line 56) | def substitute(a: AstRef, *m: Tuple[AstRef, AstRef]) -> AstRef: ...
function simplify (line 57) | def simplify(a: AstRef, *args: Any, **kwargs: Any) -> AstRef: ...
class ArithSortRef (line 59) | class ArithSortRef(SortRef): ...
class ArithRef (line 61) | class ArithRef(ExprRef):
method __neg__ (line 62) | def __neg__(self) -> ExprRef: ...
method __le__ (line 63) | def __le__(self, other: ArithRef) -> BoolRef: ...
method __lt__ (line 64) | def __lt__(self, other: ArithRef) -> BoolRef: ...
method __ge__ (line 65) | def __ge__(self, other: ArithRef) -> BoolRef: ...
method __gt__ (line 66) | def __gt__(self, other: ArithRef) -> BoolRef: ...
method __add__ (line 67) | def __add__(self, other: ArithRef) -> ArithRef: ...
method __sub__ (line 68) | def __sub__(self, other: ArithRef) -> ArithRef: ...
method __mul__ (line 69) | def __mul__(self, other: ArithRef) -> ArithRef: ...
method __div__ (line 70) | def __div__(self, other: ArithRef) -> ArithRef: ...
method __truediv__ (line 71) | def __truediv__(self, other: ArithRef) -> ArithRef: ...
method __mod__ (line 72) | def __mod__(self, other: ArithRef) -> ArithRef: ...
class BitVecSortRef (line 74) | class BitVecSortRef(SortRef): ...
class BitVecRef (line 76) | class BitVecRef(ExprRef):
method size (line 77) | def size(self) -> int: ...
method __add__ (line 78) | def __add__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __radd__ (line 79) | def __radd__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __mul__ (line 80) | def __mul__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __rmul__ (line 81) | def __rmul__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __sub__ (line 82) | def __sub__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __rsub__ (line 83) | def __rsub__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __or__ (line 84) | def __or__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __ror__ (line 85) | def __ror__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __and__ (line 86) | def __and__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __rand__ (line 87) | def __rand__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __xor__ (line 88) | def __xor__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __rxor__ (line 89) | def __rxor__(self, other: Union[BitVecRef, int]) -> BitVecRef: ...
method __pos__ (line 90) | def __pos__(self) -> BitVecRef: ...
method __neg__ (line 91) | def __neg__(self) -> BitVecRef: ...
method __invert__ (line 92) | def __invert__(self) -> BitVecRef: ...
method __div__ (line 93) | def __div__(self, other: BitVecRef) -> BitVecRef: ...
method __rdiv__ (line 94) | def __rdiv__(self, other: BitVecRef) -> BitVecRef: ...
method __truediv__ (line 95) | def __truediv__(self, other: BitVecRef) -> BitVecRef: ...
method __rtruediv__ (line 96) | def __rtruediv__(self, other: BitVecRef) -> BitVecRef: ...
method __mod__ (line 97) | def __mod__(self, other: BitVecRef) -> BitVecRef: ...
method __rmod__ (line 98) | def __rmod__(self, other: BitVecRef) -> BitVecRef: ...
method __le__ (line 99) | def __le__(self, other: BitVecRef) -> BoolRef: ...
method __lt__ (line 100) | def __lt__(self, other: BitVecRef) -> BoolRef: ...
method __ge__ (line 101) | def __ge__(self, other: BitVecRef) -> BoolRef: ...
method __gt__ (line 102) | def __gt__(self, other: BitVecRef) -> BoolRef: ...
method __rshift__ (line 103) | def __rshift__(self, other: BitVecRef) -> BitVecRef: ...
method __lshift__ (line 104) | def __lshift__(self, other: BitVecRef) -> BitVecRef: ...
method __rrshift__ (line 105) | def __rrshift__(self, other: BitVecRef) -> BitVecRef: ...
method __rlshift__ (line 106) | def __rlshift__(self, other: BitVecRef) -> BitVecRef: ...
class BitVecNumRef (line 108) | class BitVecNumRef(BitVecRef):
method as_long (line 109) | def as_long(self) -> int: ...
method as_signed_long (line 110) | def as_signed_long(self) -> int: ...
method as_string (line 111) | def as_string(self) -> str: ...
class IntNumRef (line 113) | class IntNumRef(ArithRef):
method as_long (line 114) | def as_long(self) -> int: ...
method as_string (line 115) | def as_string(self) -> str: ...
class SeqSortRef (line 117) | class SeqSortRef(ExprRef): ...
class SeqRef (line 118) | class SeqRef(ExprRef): ...
class ReSortRef (line 119) | class ReSortRef(ExprRef): ...
class ReRef (line 120) | class ReRef(ExprRef): ...
class ArrayRef (line 121) | class ArrayRef(ExprRef): ...
class CheckSatResult (line 122) | class CheckSatResult: ...
class ModelRef (line 124) | class ModelRef(Z3PPObject):
method __getitem__ (line 125) | def __getitem__(self, k: FuncDeclRef) -> IntNumRef: ...
method decls (line 126) | def decls(self) -> Iterable[FuncDeclRef]: ...
method __iter__ (line 127) | def __iter__(self) -> Iterator[FuncDeclRef]: ...
class FuncEntry (line 129) | class FuncEntry:
method num_args (line 130) | def num_args(self) -> int: ...
method arg_value (line 131) | def arg_value(self, idx: int) -> ExprRef: ...
method value (line 132) | def value(self) -> ExprRef: ...
class FuncInterp (line 134) | class FuncInterp(Z3PPObject):
method else_value (line 135) | def else_value(self) -> ExprRef: ...
method num_entries (line 136) | def num_entries(self) -> int: ...
method arity (line 137) | def arity(self) -> int: ...
method entry (line 138) | def entry(self, idx: int) -> FuncEntry: ...
class Goal (line 140) | class Goal(Z3PPObject): ...
class Solver (line 142) | class Solver(Z3PPObject):
method __init__ (line 144) | def __init__(self, ctx: Optional[Context] = None) -> None: ...
method to_smt2 (line 145) | def to_smt2(self) -> str: ...
method check (line 146) | def check(self) -> CheckSatResult: ...
method push (line 147) | def push(self) -> None: ...
method pop (line 148) | def pop(self, num: Optional[int] = 1) -> None: ...
method model (line 149) | def model(self) -> ModelRef: ...
method set (line 150) | def set(self, *args: Any, **kwargs: Any) -> None: ...
method add (line 152) | def add(self, *args: Union[BoolRef, Goal]) -> None: ...
method add (line 154) | def add(self, args: Sequence[Union[BoolRef, Goal]]) -> None: ...
method reset (line 155) | def reset(self) -> None: ...
class Optimize (line 157) | class Optimize(Z3PPObject):
method __init__ (line 159) | def __init__(self, ctx: Optional[Context] = None) -> None: ...
method check (line 160) | def check(self) -> CheckSatResult: ...
method push (line 161) | def push(self) -> None: ...
method pop (line 162) | def pop(self) -> None: ...
method model (line 163) | def model(self) -> ModelRef: ...
method set (line 164) | def set(self, *args: Any, **kwargs: Any) -> None: ...
method add (line 166) | def add(self, *args: Union[BoolRef, Goal]) -> None: ...
method add (line 168) | def add(self, args: Sequence[Union[BoolRef, Goal]]) -> None: ...
method minimize (line 169) | def minimize(self, element: ExprRef) -> None: ...
method maximize (line 170) | def maximize(self, element: ExprRef) -> None: ...
function Int (line 176) | def Int(name: str) -> ArithRef: ...
function Int (line 178) | def Int(name: str, ctx: Context) -> ArithRef: ...
function Bool (line 180) | def Bool(name: str) -> BoolRef: ...
function Bool (line 182) | def Bool(name: str, ctx: Context) -> BoolRef: ...
function parse_smt2_string (line 184) | def parse_smt2_string(s: str) -> ExprRef: ...
function parse_smt2_string (line 186) | def parse_smt2_string(s: str, ctx: Context) -> ExprRef: ...
function Array (line 187) | def Array(name: str, domain: SortRef, range: SortRef) -> ArrayRef: ...
function K (line 188) | def K(domain: SortRef, v: Union[ExprRef, int, bool, str]) -> ArrayRef: ...
function Or (line 192) | def Or(*args: Any) -> BoolRef: ...
function And (line 193) | def And(*args: Any) -> BoolRef: ...
function Not (line 194) | def Not(p: BoolRef, ctx: Optional[Context] = None) -> BoolRef: ...
function Implies (line 195) | def Implies(a: BoolRef, b: BoolRef, ctx: Context) -> BoolRef: ...
function If (line 199) | def If(a: BoolRef, b: T, c: T, ctx: Optional[Context] = None) -> T: ...
function ULE (line 200) | def ULE(a: T, b: T) -> BoolRef: ...
function ULT (line 201) | def ULT(a: T, b: T) -> BoolRef: ...
function UGE (line 202) | def UGE(a: T, b: T) -> BoolRef: ...
function UGT (line 203) | def UGT(a: T, b: T) -> BoolRef: ...
function UDiv (line 204) | def UDiv(a: T, b: T) -> T: ...
function URem (line 205) | def URem(a: T, b: T) -> T: ...
function SRem (line 206) | def SRem(a: T, b: T) -> T: ...
function LShR (line 207) | def LShR(a: T, b: T) -> T: ...
function RotateLeft (line 208) | def RotateLeft(a: T, b: T) -> T: ...
function RotateRight (line 209) | def RotateRight(a: T, b: T) -> T: ...
function SignExt (line 210) | def SignExt(n: int, a: BitVecRef) -> BitVecRef: ...
function ZeroExt (line 211) | def ZeroExt(n: int, a: BitVecRef) -> BitVecRef: ...
function Concat (line 213) | def Concat(args: List[Union[SeqRef, str]]) -> SeqRef: ...
function Concat (line 215) | def Concat(*args: Union[SeqRef, str]) -> SeqRef: ...
function Concat (line 217) | def Concat(args: List[ReRef]) -> ReRef: ...
function Concat (line 219) | def Concat(*args: ReRef) -> ReRef: ...
function Concat (line 221) | def Concat(args: List[BitVecRef]) -> BitVecRef: ...
function Concat (line 223) | def Concat(*args: BitVecRef) -> BitVecRef: ...
function Extract (line 225) | def Extract(
function Extract (line 229) | def Extract(
function Sum (line 233) | def Sum(arg: BitVecRef, *args: Union[BitVecRef, int]) -> BitVecRef: ...
function Sum (line 235) | def Sum(arg: Union[List[BitVecRef], int]) -> BitVecRef: ...
function Sum (line 237) | def Sum(arg: ArithRef, *args: Union[ArithRef, int]) -> ArithRef: ...
function Function (line 243) | def Function(name: str, *sig: SortRef) -> FuncDeclRef: ...
function IntVal (line 244) | def IntVal(val: int, ctx: Optional[Context] = None) -> IntNumRef: ...
function BoolVal (line 245) | def BoolVal(val: bool, ctx: Optional[Context] = None) -> BoolRef: ...
function BitVecVal (line 246) | def BitVecVal(
function BitVec (line 249) | def BitVec(
function IntSort (line 252) | def IntSort(ctx: Optional[Context] = None) -> ArithSortRef: ...
function BoolSort (line 253) | def BoolSort(ctx: Optional[Context] = None) -> BoolSortRef: ...
function ArraySort (line 254) | def ArraySort(domain: SortRef, range: SortRef) -> ArraySortRef: ...
function BitVecSort (line 255) | def BitVecSort(domain: int, ctx: Optional[Context] = None) -> BoolSortRe...
function ForAll (line 256) | def ForAll(vs: List[ExprRef], expr: ExprRef) -> ExprRef: ...
function Select (line 257) | def Select(arr: ExprRef, ind: ExprRef) -> ExprRef: ...
function Update (line 258) | def Update(arr: ArrayRef, ind: ExprRef, newVal: ExprRef) -> ArrayRef: ...
function Store (line 259) | def Store(arr: ArrayRef, ind: ExprRef, newVal: ExprRef) -> ArrayRef: ...
function BVAddNoOverflow (line 260) | def BVAddNoOverflow(a: BitVecRef, b: BitVecRef, signed: bool) -> BoolRef...
function BVAddNoUnderflow (line 261) | def BVAddNoUnderflow(a: BitVecRef, b: BitVecRef) -> BoolRef: ...
function BVSubNoOverflow (line 262) | def BVSubNoOverflow(a: BitVecRef, b: BitVecRef) -> BoolRef: ...
function BVSubNoUnderflow (line 263) | def BVSubNoUnderflow(a: BitVecRef, b: BitVecRef, signed: bool) -> BoolRe...
function BVSDivNoOverflow (line 264) | def BVSDivNoOverflow(a: BitVecRef, b: BitVecRef) -> BoolRef: ...
function BVSNegNoOverflow (line 265) | def BVSNegNoOverflow(a: BitVecRef) -> BoolRef: ...
function BVMulNoOverflow (line 266) | def BVMulNoOverflow(a: BitVecRef, b: BitVecRef, signed: bool) -> BoolRef...
function BVMulNoUnderflow (line 267) | def BVMulNoUnderflow(a: BitVecRef, b: BitVecRef) -> BoolRef: ...
FILE: mypy-stubs/z3/z3core.pyi
function Z3_mk_eq (line 3) | def Z3_mk_eq(ctx: ContextObj, a: Ast, b: Ast) -> Ast: ...
function Z3_mk_div (line 4) | def Z3_mk_div(ctx: ContextObj, a: Ast, b: Ast) -> Ast: ...
FILE: mypy-stubs/z3/z3types.pyi
class Z3Exception (line 3) | class Z3Exception(Exception):
method __init__ (line 4) | def __init__(self, a: Any) -> None:
class ContextObj (line 8) | class ContextObj: ...
class Ast (line 9) | class Ast: ...
FILE: mythril/analysis/call_helpers.py
function get_call_from_state (line 11) | def get_call_from_state(state: GlobalState) -> Union[Call, None]:
FILE: mythril/analysis/callgraph.py
function extract_nodes (line 129) | def extract_nodes(statespace) -> List[Dict]:
function extract_edges (line 186) | def extract_edges(statespace):
function generate_graph (line 218) | def generate_graph(
FILE: mythril/analysis/issue_annotation.py
class IssueAnnotation (line 9) | class IssueAnnotation(StateAnnotation):
method __init__ (line 10) | def __init__(self, conditions: List[Bool], issue: Issue, detector):
method persist_to_world_state (line 22) | def persist_to_world_state(self) -> bool:
method persist_over_calls (line 26) | def persist_over_calls(self) -> bool:
method __copy__ (line 29) | def __copy__(self):
method check_merge_annotation (line 36) | def check_merge_annotation(self, annotation: "IssueAnnotation") -> bool:
method merge_annotation (line 46) | def merge_annotation(self, annotation: "IssueAnnotation") -> "IssueAnn...
FILE: mythril/analysis/module/base.py
class EntryPoint (line 21) | class EntryPoint(Enum):
class DetectionModule (line 32) | class DetectionModule(ABC):
method __init__ (line 55) | def __init__(self) -> None:
method reset_module (line 60) | def reset_module(self):
method update_cache (line 64) | def update_cache(self, issues=None):
method execute (line 73) | def execute(self, target: GlobalState) -> Optional[List[Issue]]:
method _execute (line 102) | def _execute(self, target) -> Optional[List[Issue]]:
method __repr__ (line 110) | def __repr__(self) -> str:
FILE: mythril/analysis/module/loader.py
class ModuleLoader (line 32) | class ModuleLoader(object, metaclass=Singleton):
method __init__ (line 41) | def __init__(self):
method register_module (line 45) | def register_module(self, detection_module: DetectionModule):
method get_detection_modules (line 51) | def get_detection_modules(
method _register_mythril_modules (line 90) | def _register_mythril_modules(self):
FILE: mythril/analysis/module/module_helpers.py
function is_prehook (line 4) | def is_prehook() -> bool:
FILE: mythril/analysis/module/modules/arbitrary_jump.py
function is_unique_jumpdest (line 21) | def is_unique_jumpdest(jump_dest: BitVec, state: GlobalState) -> bool:
class ArbitraryJump (line 41) | class ArbitraryJump(DetectionModule):
method reset_module (line 50) | def reset_module(self):
method _execute (line 57) | def _execute(self, state: GlobalState) -> None:
method _analyze_state (line 65) | def _analyze_state(self, state):
FILE: mythril/analysis/module/modules/arbitrary_write.py
class ArbitraryStorage (line 22) | class ArbitraryStorage(DetectionModule):
method reset_module (line 31) | def reset_module(self):
method _execute (line 38) | def _execute(self, state: GlobalState) -> None:
method _analyze_state (line 49) | def _analyze_state(self, state):
FILE: mythril/analysis/module/modules/delegatecall.py
class ArbitraryDelegateCall (line 23) | class ArbitraryDelegateCall(DetectionModule):
method _execute (line 32) | def _execute(self, state: GlobalState) -> None:
method _analyze_state (line 43) | def _analyze_state(self, state: GlobalState) -> List[PotentialIssue]:
FILE: mythril/analysis/module/modules/dependence_on_origin.py
class TxOriginAnnotation (line 20) | class TxOriginAnnotation:
method __init__ (line 23) | def __init__(self) -> None:
class TxOrigin (line 27) | class TxOrigin(DetectionModule):
method _execute (line 38) | def _execute(self, state: GlobalState) -> List[Issue]:
method _analyze_state (line 46) | def _analyze_state(self, state: GlobalState) -> List[Issue]:
FILE: mythril/analysis/module/modules/dependence_on_predictable_vars.py
class PredictableValueAnnotation (line 23) | class PredictableValueAnnotation:
method __init__ (line 26) | def __init__(self, operation: str) -> None:
class OldBlockNumberUsedAnnotation (line 30) | class OldBlockNumberUsedAnnotation(StateAnnotation):
method __init__ (line 33) | def __init__(self) -> None:
class PredictableVariables (line 37) | class PredictableVariables(DetectionModule):
method _execute (line 51) | def _execute(self, state: GlobalState) -> List[Issue]:
method _analyze_state (line 59) | def _analyze_state(self, state: GlobalState) -> List[Issue]:
FILE: mythril/analysis/module/modules/ether_thief.py
class EtherThief (line 28) | class EtherThief(DetectionModule):
method reset_module (line 38) | def reset_module(self):
method _execute (line 45) | def _execute(self, state: GlobalState) -> None:
method _analyze_state (line 55) | def _analyze_state(self, state):
FILE: mythril/analysis/module/modules/exceptions.py
class LastJumpAnnotation (line 24) | class LastJumpAnnotation(StateAnnotation):
method __init__ (line 27) | def __init__(self, last_jump: Optional[int] = None) -> None:
method __copy__ (line 30) | def __copy__(self):
class Exceptions (line 35) | class Exceptions(DetectionModule):
method __init__ (line 44) | def __init__(self):
method _execute (line 48) | def _execute(self, state: GlobalState) -> List[Issue]:
method _analyze_state (line 59) | def _analyze_state(self, state) -> List[Issue]:
function is_assertion_failure (line 139) | def is_assertion_failure(global_state):
FILE: mythril/analysis/module/modules/external_calls.py
function _is_precompile_call (line 30) | def _is_precompile_call(global_state: GlobalState):
class ExternalCalls (line 47) | class ExternalCalls(DetectionModule):
method _execute (line 57) | def _execute(self, state: GlobalState) -> None:
method _analyze_state (line 69) | def _analyze_state(self, state: GlobalState):
FILE: mythril/analysis/module/modules/integer.py
class OverUnderflowAnnotation (line 35) | class OverUnderflowAnnotation:
method __init__ (line 38) | def __init__(
method __deepcopy__ (line 45) | def __deepcopy__(self, memodict={}):
class OverUnderflowStateAnnotation (line 50) | class OverUnderflowStateAnnotation(StateAnnotation):
method __init__ (line 53) | def __init__(self) -> None:
method __copy__ (line 56) | def __copy__(self):
class IntegerArithmetics (line 66) | class IntegerArithmetics(DetectionModule):
method __init__ (line 89) | def __init__(self) -> None:
method reset_module (line 98) | def reset_module(self):
method _execute (line 107) | def _execute(self, state: GlobalState) -> List[Issue]:
method _get_args (line 134) | def _get_args(self, state):
method _handle_add (line 142) | def _handle_add(self, state):
method _handle_mul (line 149) | def _handle_mul(self, state):
method _handle_sub (line 156) | def _handle_sub(self, state):
method _handle_exp (line 163) | def _handle_exp(self, state):
method _make_bitvec_if_not (line 188) | def _make_bitvec_if_not(stack, index):
method _get_title (line 198) | def _get_title(_type):
method _handle_sstore (line 202) | def _handle_sstore(state: GlobalState) -> None:
method _handle_jumpi (line 215) | def _handle_jumpi(state):
method _handle_call (line 226) | def _handle_call(state):
method _handle_return (line 237) | def _handle_return(state: GlobalState) -> None:
method _handle_transaction_end (line 257) | def _handle_transaction_end(self, state: GlobalState) -> List[Issue]:
function _get_address_from_state (line 326) | def _get_address_from_state(state):
function _get_overflowunderflow_state_annotation (line 330) | def _get_overflowunderflow_state_annotation(
FILE: mythril/analysis/module/modules/multiple_sends.py
class MultipleSendsAnnotation (line 20) | class MultipleSendsAnnotation(StateAnnotation):
method __init__ (line 21) | def __init__(self) -> None:
method __copy__ (line 24) | def __copy__(self):
class MultipleSends (line 30) | class MultipleSends(DetectionModule):
method _execute (line 39) | def _execute(self, state: GlobalState) -> None:
method _analyze_state (line 42) | def _analyze_state(self, state: GlobalState):
FILE: mythril/analysis/module/modules/requirements_violation.py
class RequirementsViolation (line 18) | class RequirementsViolation(DetectionModule):
method _execute (line 28) | def _execute(self, state: GlobalState) -> List[Issue]:
method _analyze_state (line 39) | def _analyze_state(self, state) -> List[Issue]:
FILE: mythril/analysis/module/modules/state_change_external_calls.py
class StateChangeCallsAnnotation (line 29) | class StateChangeCallsAnnotation(StateAnnotation):
method __init__ (line 30) | def __init__(self, call_state: GlobalState, user_defined_address: bool...
method __copy__ (line 35) | def __copy__(self):
method get_issue (line 42) | def get_issue(
class StateChangeAfterCall (line 103) | class StateChangeAfterCall(DetectionModule):
method _execute (line 113) | def _execute(self, state: GlobalState) -> None:
method _add_external_call (line 120) | def _add_external_call(global_state: GlobalState) -> None:
method _analyze_state (line 147) | def _analyze_state(self, global_state: GlobalState) -> List[PotentialI...
method _balance_change (line 186) | def _balance_change(value: BitVec, global_state: GlobalState) -> bool:
FILE: mythril/analysis/module/modules/suicide.py
class AccidentallyKillable (line 24) | class AccidentallyKillable(DetectionModule):
method __init__ (line 34) | def __init__(self):
method reset_module (line 38) | def reset_module(self):
method _execute (line 45) | def _execute(self, state: GlobalState) -> None:
method _analyze_state (line 53) | def _analyze_state(self, state):
FILE: mythril/analysis/module/modules/transaction_order_dependence.py
class BalanceAnnotation (line 27) | class BalanceAnnotation:
method __init__ (line 28) | def __init__(self, caller):
class StorageAnnotation (line 32) | class StorageAnnotation:
method __init__ (line 33) | def __init__(self, caller):
class TransactionOrderDependence (line 37) | class TransactionOrderDependence(DetectionModule):
method _execute (line 48) | def _execute(self, state: GlobalState) -> None:
method annotate_balance_storage_vals (line 60) | def annotate_balance_storage_vals(state, opcode):
method _analyze_state (line 70) | def _analyze_state(self, state: GlobalState):
FILE: mythril/analysis/module/modules/unchecked_retval.py
class RetVal (line 24) | class RetVal(TypedDict):
class UncheckedRetvalAnnotation (line 29) | class UncheckedRetvalAnnotation(StateAnnotation):
method __init__ (line 30) | def __init__(self) -> None:
method __copy__ (line 33) | def __copy__(self):
class UncheckedRetval (line 39) | class UncheckedRetval(DetectionModule):
method _execute (line 57) | def _execute(self, state: GlobalState) -> List[Issue]:
method _analyze_state (line 65) | def _analyze_state(self, state: GlobalState) -> list:
FILE: mythril/analysis/module/modules/unexpected_ether.py
class EtherBalanceCheckAnnotation (line 22) | class EtherBalanceCheckAnnotation(StateAnnotation):
method __init__ (line 25) | def __init__(self, balance: BitVec) -> None:
class BalanceConditionAnnotation (line 29) | class BalanceConditionAnnotation:
method __init__ (line 32) | def __init__(self, address=None) -> None:
class UnexpectedEther (line 36) | class UnexpectedEther(DetectionModule):
method _execute (line 51) | def _execute(self, state: GlobalState) -> None:
method _analyze_state (line 60) | def _analyze_state(self, state):
FILE: mythril/analysis/module/modules/user_assertions.py
class UserAssertions (line 33) | class UserAssertions(DetectionModule):
method _execute (line 42) | def _execute(self, state: GlobalState) -> None:
method _analyze_state (line 51) | def _analyze_state(self, state: GlobalState):
FILE: mythril/analysis/module/util.py
function get_detection_module_hooks (line 13) | def get_detection_module_hooks(
function reset_callback_modules (line 45) | def reset_callback_modules(module_names: Optional[List[str]] = None):
FILE: mythril/analysis/ops.py
class VarType (line 10) | class VarType(Enum):
class Variable (line 17) | class Variable:
method __init__ (line 20) | def __init__(self, val, _type):
method __str__ (line 29) | def __str__(self):
function get_variable (line 37) | def get_variable(i):
class Op (line 49) | class Op:
method __init__ (line 52) | def __init__(self, node, state, state_index):
class Call (line 64) | class Call(Op):
method __init__ (line 67) | def __init__(
FILE: mythril/analysis/potential_issues.py
class PotentialIssue (line 11) | class PotentialIssue:
method __init__ (line 14) | def __init__(
class PotentialIssuesAnnotation (line 56) | class PotentialIssuesAnnotation(StateAnnotation):
method __init__ (line 57) | def __init__(self):
method search_importance (line 61) | def search_importance(self):
function get_potential_issues_annotation (line 65) | def get_potential_issues_annotation(state: GlobalState) -> PotentialIssu...
function check_potential_issues (line 82) | def check_potential_issues(state: GlobalState) -> None:
FILE: mythril/analysis/report.py
class Issue (line 30) | class Issue:
method __init__ (line 33) | def __init__(
method transaction_sequence_users (line 82) | def transaction_sequence_users(self):
method transaction_sequence_jsonv2 (line 87) | def transaction_sequence_jsonv2(self):
method add_block_data (line 96) | def add_block_data(transaction_sequence: Dict):
method as_dict (line 109) | def as_dict(self):
method _set_internal_compiler_error (line 138) | def _set_internal_compiler_error(self):
method add_code_info (line 149) | def add_code_info(self, contract):
method decode_bytes (line 183) | def decode_bytes(val):
method resolve_function_names (line 191) | def resolve_function_names(self):
method resolve_input (line 226) | def resolve_input(data, function_name):
function convert_bytes (line 250) | def convert_bytes(item):
class Report (line 263) | class Report:
method __init__ (line 270) | def __init__(
method sorted_issues (line 289) | def sorted_issues(self):
method append_issue (line 297) | def append_issue(self, issue):
method as_text (line 311) | def as_text(self):
method as_json (line 321) | def as_json(self):
method _get_exception_data (line 330) | def _get_exception_data(self) -> dict:
method as_swc_standard_format (line 338) | def as_swc_standard_format(self):
method as_markdown (line 395) | def as_markdown(self):
method _file_name (line 404) | def _file_name(self):
FILE: mythril/analysis/security.py
function retrieve_callback_issues (line 14) | def retrieve_callback_issues(white_list: Optional[List[str]] = None) -> ...
function fire_lasers (line 28) | def fire_lasers(statespace, white_list: Optional[List[str]] = None) -> L...
FILE: mythril/analysis/solver.py
function pretty_print_model (line 28) | def pretty_print_model(model):
function get_transaction_sequence (line 52) | def get_transaction_sequence(
function _add_calldata_placeholder (line 105) | def _add_calldata_placeholder(
function _replace_with_actual_sha (line 129) | def _replace_with_actual_sha(
function _get_concrete_state (line 168) | def _get_concrete_state(
function _get_concrete_transaction (line 185) | def _get_concrete_transaction(model: z3.Model, transaction: BaseTransact...
function _set_minimisation_constraints (line 217) | def _set_minimisation_constraints(
FILE: mythril/analysis/symbolic.py
class SymExecWrapper (line 44) | class SymExecWrapper:
method __init__ (line 51) | def __init__(
method execution_info (line 330) | def execution_info(self) -> List[ExecutionInfo]:
FILE: mythril/analysis/traceexplore.py
function get_serializable_statespace (line 55) | def get_serializable_statespace(statespace):
FILE: mythril/concolic/concolic_execution.py
function flip_branches (line 17) | def flip_branches(
function concolic_execution (line 62) | def concolic_execution(
FILE: mythril/concolic/concrete_data.py
class AccountData (line 6) | class AccountData(TypedDict):
class InitialState (line 13) | class InitialState(TypedDict):
class TransactionData (line 17) | class TransactionData(TypedDict):
class ConcreteData (line 33) | class ConcreteData(TypedDict):
FILE: mythril/concolic/find_trace.py
function setup_concrete_initial_state (line 20) | def setup_concrete_initial_state(concrete_data: ConcreteData) -> WorldSt...
function concrete_execution (line 41) | def concrete_execution(concrete_data: ConcreteData) -> Tuple[WorldState,...
FILE: mythril/disassembler/asm.py
class EvmInstruction (line 19) | class EvmInstruction:
method __init__ (line 22) | def __init__(self, address, op_code, argument=None):
method to_dict (line 27) | def to_dict(self) -> dict:
function instruction_list_to_easm (line 38) | def instruction_list_to_easm(instruction_list: list) -> str:
function get_opcode_from_name (line 55) | def get_opcode_from_name(operation_name: str) -> int:
function find_op_code_sequence (line 66) | def find_op_code_sequence(pattern: list, instruction_list: list) -> Gene...
function is_sequence_match (line 79) | def is_sequence_match(pattern: list, instruction_list: list, index: int)...
function disassemble (line 99) | def disassemble(bytecode) -> list:
FILE: mythril/disassembler/disassembly.py
class Disassembly (line 10) | class Disassembly(object):
method __init__ (line 20) | def __init__(self, code: str) -> None:
method assign_bytecode (line 35) | def assign_bytecode(self, bytecode):
method get_easm (line 55) | def get_easm(self):
function get_function_info (line 63) | def get_function_info(
FILE: mythril/ethereum/evmcontract.py
class EVMContract (line 15) | class EVMContract(persistent.Persistent):
method __init__ (line 19) | def __init__(self, code="", creation_code="", name="Unknown"):
method bytecode_hash (line 40) | def bytecode_hash(self):
method creation_bytecode_hash (line 48) | def creation_bytecode_hash(self):
method as_dict (line 55) | def as_dict(self):
method get_easm (line 67) | def get_easm(self):
method get_creation_easm (line 74) | def get_creation_easm(self):
method matches_expression (line 81) | def matches_expression(self, expression):
FILE: mythril/ethereum/interface/rpc/base_client.py
class BaseClient (line 19) | class BaseClient(object):
method _call (line 23) | def _call(self, method, params=None, _id=1):
method eth_coinbase (line 34) | def eth_coinbase(self):
method eth_blockNumber (line 43) | def eth_blockNumber(self):
method eth_getBalance (line 52) | def eth_getBalance(self, address=None, block=BLOCK_TAG_LATEST):
method eth_getStorageAt (line 63) | def eth_getStorageAt(self, address=None, position=0, block=BLOCK_TAG_L...
method eth_getCode (line 73) | def eth_getCode(self, address, default_block=BLOCK_TAG_LATEST):
method eth_getBlockByNumber (line 85) | def eth_getBlockByNumber(self, block=BLOCK_TAG_LATEST, tx_objects=True):
method eth_getTransactionReceipt (line 95) | def eth_getTransactionReceipt(self, tx_hash):
FILE: mythril/ethereum/interface/rpc/client.py
class EthJsonRpc (line 31) | class EthJsonRpc(BaseClient):
method __init__ (line 34) | def __init__(self, host="localhost", port=GETH_DEFAULT_RPC_PORT, tls=F...
method _call (line 47) | def _call(self, method, params=None, _id=1):
method close (line 87) | def close(self):
FILE: mythril/ethereum/interface/rpc/exceptions.py
class EthJsonRpcError (line 4) | class EthJsonRpcError(Exception):
class ConnectionError (line 10) | class ConnectionError(EthJsonRpcError):
class BadStatusCodeError (line 17) | class BadStatusCodeError(EthJsonRpcError):
class BadJsonError (line 24) | class BadJsonError(EthJsonRpcError):
class BadResponseError (line 31) | class BadResponseError(EthJsonRpcError):
FILE: mythril/ethereum/interface/rpc/utils.py
function hex_to_dec (line 7) | def hex_to_dec(x):
function clean_hex (line 16) | def clean_hex(d):
function validate_block (line 26) | def validate_block(block):
function wei_to_ether (line 40) | def wei_to_ether(wei):
function ether_to_wei (line 49) | def ether_to_wei(ether):
FILE: mythril/ethereum/util.py
function safe_decode (line 26) | def safe_decode(hex_encoded_string):
function get_solc_json (line 38) | def get_solc_json(file, solc_binary="solc", solc_settings_json=None):
function get_random_address (line 108) | def get_random_address():
function get_indexed_address (line 116) | def get_indexed_address(index):
function solc_exists (line 125) | def solc_exists(version):
function parse_pragma (line 140) | def parse_pragma(solidity_code):
function remove_comments_strings (line 177) | def remove_comments_strings(program: str) -> str:
function extract_version_line (line 216) | def extract_version_line(program: typing.Optional[str]) -> typing.Option...
function extract_version (line 240) | def extract_version(program: typing.Optional[str]) -> typing.Optional[str]:
function extract_binary (line 276) | def extract_binary(file: str) -> Tuple[str, str]:
FILE: mythril/exceptions.py
class MythrilBaseException (line 4) | class MythrilBaseException(Exception):
class CompilerError (line 10) | class CompilerError(MythrilBaseException):
class UnsatError (line 16) | class UnsatError(MythrilBaseException):
class SolverTimeOutException (line 23) | class SolverTimeOutException(UnsatError):
class NoContractFoundError (line 30) | class NoContractFoundError(MythrilBaseException):
class CriticalError (line 37) | class CriticalError(MythrilBaseException):
class DetectorNotFoundError (line 44) | class DetectorNotFoundError(MythrilBaseException):
class IllegalArgumentError (line 51) | class IllegalArgumentError(ValueError):
FILE: mythril/interfaces/cli.py
function exit_with_error (line 66) | def exit_with_error(format_, message):
function get_runtime_input_parser (line 91) | def get_runtime_input_parser() -> ArgumentParser:
function get_creation_input_parser (line 111) | def get_creation_input_parser() -> ArgumentParser:
function get_safe_functions_parser (line 133) | def get_safe_functions_parser() -> ArgumentParser:
function get_output_parser (line 155) | def get_output_parser() -> ArgumentParser:
function get_rpc_parser (line 172) | def get_rpc_parser() -> ArgumentParser:
function get_utilities_parser (line 192) | def get_utilities_parser() -> ArgumentParser:
function create_concolic_parser (line 215) | def create_concolic_parser(parser: ArgumentParser) -> ArgumentParser:
function main (line 238) | def main() -> None:
function create_disassemble_parser (line 352) | def create_disassemble_parser(parser: ArgumentParser):
function create_read_storage_parser (line 367) | def create_read_storage_parser(read_storage_parser: ArgumentParser):
function create_func_to_hash_parser (line 384) | def create_func_to_hash_parser(parser: ArgumentParser):
function create_hash_to_addr_parser (line 395) | def create_hash_to_addr_parser(hash_parser: ArgumentParser):
function add_graph_commands (line 406) | def add_graph_commands(parser: ArgumentParser):
function create_safe_functions_parser (line 417) | def create_safe_functions_parser(parser: ArgumentParser):
function add_analysis_args (line 433) | def add_analysis_args(options):
function create_analyzer_parser (line 596) | def create_analyzer_parser(analyzer_parser: ArgumentParser):
function create_foundry_parser (line 613) | def create_foundry_parser(foundry_parser: ArgumentParser):
function validate_args (line 619) | def validate_args(args: Namespace):
function set_config (line 666) | def set_config(args: Namespace):
function load_code (line 687) | def load_code(disassembler: MythrilDisassembler, args: Namespace):
function print_function_report (line 728) | def print_function_report(myth_disassembler: MythrilDisassembler, report...
function execute_command (line 751) | def execute_command(
function contract_hash_to_address (line 889) | def contract_hash_to_address(args: Namespace):
function parse_args_and_execute (line 899) | def parse_args_and_execute(parser: ArgumentParser, args: Namespace) -> N...
FILE: mythril/interfaces/epic.py
function reset (line 26) | def reset():
class LolCat (line 56) | class LolCat(object):
method __init__ (line 59) | def __init__(self, mode=256, output=sys.stdout):
method _distance (line 63) | def _distance(self, rgb1, rgb2):
method ansi (line 66) | def ansi(self, rgb):
method wrap (line 107) | def wrap(self, *codes):
method rainbow (line 115) | def rainbow(self, freq, i):
method cat (line 127) | def cat(self, fd, options):
method println (line 143) | def println(self, s, options):
method println_ani (line 161) | def println_ani(self, s, options):
method println_plain (line 178) | def println_plain(self, s, options):
function detect_mode (line 196) | def detect_mode(term_hint="xterm-256color"):
function run (line 212) | def run():
FILE: mythril/laser/ethereum/call.py
function get_call_parameters (line 35) | def get_call_parameters(
function _get_padded_hex_address (line 80) | def _get_padded_hex_address(address: int) -> str:
function get_callee_address (line 85) | def get_callee_address(
function get_callee_account (line 129) | def get_callee_account(
function get_call_data (line 152) | def get_call_data(
function native_call (line 198) | def native_call(
FILE: mythril/laser/ethereum/cfg.py
class JumpType (line 14) | class JumpType(Enum):
class NodeFlags (line 24) | class NodeFlags(Flags):
method __or__ (line 27) | def __or__(self, other) -> "NodeFlags":
class Node (line 34) | class Node:
method __init__ (line 37) | def __init__(
method get_cfg_dict (line 60) | def get_cfg_dict(self) -> Dict:
class Edge (line 87) | class Edge:
method __init__ (line 90) | def __init__(
method __str__ (line 109) | def __str__(self) -> str:
method as_dict (line 117) | def as_dict(self) -> Dict[str, int]:
FILE: mythril/laser/ethereum/cheat_code.py
class hevm_cheat_code (line 11) | class hevm_cheat_code:
method is_cheat_address (line 27) | def is_cheat_address(address):
function handle_cheat_codes (line 35) | def handle_cheat_codes(
FILE: mythril/laser/ethereum/evm_exceptions.py
class VmException (line 4) | class VmException(Exception):
class StackUnderflowException (line 10) | class StackUnderflowException(IndexError, VmException):
class StackOverflowException (line 16) | class StackOverflowException(VmException):
class InvalidJumpDestination (line 22) | class InvalidJumpDestination(VmException):
class InvalidInstruction (line 28) | class InvalidInstruction(VmException):
class OutOfGasException (line 34) | class OutOfGasException(VmException):
class WriteProtection (line 40) | class WriteProtection(VmException):
FILE: mythril/laser/ethereum/function_managers/exponent_function_manager.py
class ExponentFunctionManager (line 18) | class ExponentFunctionManager:
method __init__ (line 29) | def __init__(self):
method create_condition (line 40) | def create_condition(self, base: BitVec, exponent: BitVec) -> Tuple[Bi...
FILE: mythril/laser/ethereum/function_managers/keccak_function_manager.py
class KeccakFunctionManager (line 25) | class KeccakFunctionManager:
method __init__ (line 38) | def __init__(self):
method reset (line 48) | def reset(self):
method find_concrete_keccak (line 57) | def find_concrete_keccak(data: BitVec) -> BitVec:
method get_function (line 71) | def get_function(self, length: int) -> Tuple[Function, Function]:
method get_empty_keccak_hash (line 87) | def get_empty_keccak_hash() -> BitVec:
method create_keccak (line 95) | def create_keccak(self, data: BitVec) -> BitVec:
method create_conditions (line 116) | def create_conditions(self) -> Bool:
method get_concrete_hash_data (line 132) | def get_concrete_hash_data(self, model) -> Dict[int, List[Optional[int...
method _create_condition (line 150) | def _create_condition(self, func_input: BitVec) -> Bool:
FILE: mythril/laser/ethereum/instruction_data.py
function calculate_sha3_gas (line 19) | def calculate_sha3_gas(length: int):
function calculate_native_gas (line 29) | def calculate_native_gas(size: int, contract: str):
function get_opcode_gas (line 53) | def get_opcode_gas(opcode: str) -> Tuple[int, int]:
function get_required_stack_elements (line 57) | def get_required_stack_elements(opcode: str) -> int:
FILE: mythril/laser/ethereum/instructions.py
function transfer_ether (line 71) | def transfer_ether(
class StateTransition (line 95) | class StateTransition(object):
method __init__ (line 104) | def __init__(
method call_on_state_copy (line 118) | def call_on_state_copy(func: Callable, func_obj: "Instruction", state:...
method increment_states_pc (line 129) | def increment_states_pc(self, states: List[GlobalState]) -> List[Globa...
method check_gas_usage_limit (line 141) | def check_gas_usage_limit(global_state: GlobalState):
method accumulate_gas (line 159) | def accumulate_gas(self, global_state: GlobalState):
method __call__ (line 175) | def __call__(self, func: Callable) -> Callable:
class Instruction (line 202) | class Instruction:
method __init__ (line 206) | def __init__(
method _execute_pre_hooks (line 224) | def _execute_pre_hooks(self, global_state: GlobalState):
method _execute_post_hooks (line 228) | def _execute_post_hooks(self, global_state: GlobalState):
method evaluate (line 232) | def evaluate(self, global_state: GlobalState, post=False) -> List[Glob...
method jumpdest_ (line 267) | def jumpdest_(self, global_state: GlobalState) -> List[GlobalState]:
method push_ (line 276) | def push_(self, global_state: GlobalState) -> List[GlobalState]:
method dup_ (line 323) | def dup_(self, global_state: GlobalState) -> List[GlobalState]:
method swap_ (line 334) | def swap_(self, global_state: GlobalState) -> List[GlobalState]:
method pop_ (line 346) | def pop_(self, global_state: GlobalState) -> List[GlobalState]:
method and_ (line 356) | def and_(self, global_state: GlobalState) -> List[GlobalState]:
method or_ (line 381) | def or_(self, global_state: GlobalState) -> List[GlobalState]:
method xor_ (line 405) | def xor_(self, global_state: GlobalState) -> List[GlobalState]:
method not_ (line 416) | def not_(self, global_state: GlobalState):
method byte_ (line 427) | def byte_(self, global_state: GlobalState) -> List[GlobalState]:
method add_ (line 460) | def add_(self, global_state: GlobalState) -> List[GlobalState]:
method sub_ (line 475) | def sub_(self, global_state: GlobalState) -> List[GlobalState]:
method mul_ (line 490) | def mul_(self, global_state: GlobalState) -> List[GlobalState]:
method div_ (line 506) | def div_(self, global_state: GlobalState) -> List[GlobalState]:
method sdiv_ (line 523) | def sdiv_(self, global_state: GlobalState) -> List[GlobalState]:
method mod_ (line 540) | def mod_(self, global_state: GlobalState) -> List[GlobalState]:
method shl_ (line 554) | def shl_(self, global_state: GlobalState) -> List[GlobalState]:
method shr_ (line 563) | def shr_(self, global_state: GlobalState) -> List[GlobalState]:
method sar_ (line 572) | def sar_(self, global_state: GlobalState) -> List[GlobalState]:
method smod_ (line 581) | def smod_(self, global_state: GlobalState) -> List[GlobalState]:
method addmod_ (line 595) | def addmod_(self, global_state: GlobalState) -> List[GlobalState]:
method mulmod_ (line 610) | def mulmod_(self, global_state: GlobalState) -> List[GlobalState]:
method exp_ (line 625) | def exp_(self, global_state: GlobalState) -> List[GlobalState]:
method signextend_ (line 641) | def signextend_(self, global_state: GlobalState) -> List[GlobalState]:
method lt_ (line 672) | def lt_(self, global_state: GlobalState) -> List[GlobalState]:
method gt_ (line 684) | def gt_(self, global_state: GlobalState) -> List[GlobalState]:
method slt_ (line 697) | def slt_(self, global_state: GlobalState) -> List[GlobalState]:
method sgt_ (line 709) | def sgt_(self, global_state: GlobalState) -> List[GlobalState]:
method eq_ (line 722) | def eq_(self, global_state: GlobalState) -> List[GlobalState]:
method iszero_ (line 748) | def iszero_(self, global_state: GlobalState) -> List[GlobalState]:
method callvalue_ (line 767) | def callvalue_(self, global_state: GlobalState) -> List[GlobalState]:
method calldataload_ (line 780) | def calldataload_(self, global_state: GlobalState) -> List[GlobalState]:
method calldatasize_ (line 797) | def calldatasize_(self, global_state: GlobalState) -> List[GlobalState]:
method _calldata_copy_helper (line 807) | def _calldata_copy_helper(global_state, mstate, mstart, dstart, size):
method calldatacopy_ (line 878) | def calldatacopy_(self, global_state: GlobalState) -> List[GlobalState]:
method address_ (line 895) | def address_(self, global_state: GlobalState) -> List[GlobalState]:
method balance_ (line 907) | def balance_(self, global_state: GlobalState) -> List[GlobalState]:
method origin_ (line 934) | def origin_(self, global_state: GlobalState) -> List[GlobalState]:
method caller_ (line 946) | def caller_(self, global_state: GlobalState) -> List[GlobalState]:
method chainid_ (line 958) | def chainid_(self, global_state: GlobalState) -> List[GlobalState]:
method selfbalance_ (line 968) | def selfbalance_(self, global_state: GlobalState) -> List[GlobalState]:
method codesize_ (line 979) | def codesize_(self, global_state: GlobalState) -> List[GlobalState]:
method _sha3_gas_helper (line 1006) | def _sha3_gas_helper(global_state, length):
method sha3_ (line 1014) | def sha3_(self, global_state: GlobalState) -> List[GlobalState]:
method gasprice_ (line 1054) | def gasprice_(self, global_state: GlobalState) -> List[GlobalState]:
method basefee_ (line 1064) | def basefee_(self, global_state: GlobalState) -> List[GlobalState]:
method codecopy_ (line 1074) | def codecopy_(self, global_state: GlobalState) -> List[GlobalState]:
method extcodesize_ (line 1155) | def extcodesize_(self, global_state: GlobalState) -> List[GlobalState]:
method _code_copy_helper (line 1183) | def _code_copy_helper(
method extcodecopy_ (line 1256) | def extcodecopy_(self, global_state: GlobalState) -> List[GlobalState]:
method extcodehash_ (line 1293) | def extcodehash_(self, global_state: GlobalState) -> List[GlobalState]:
method returndatacopy_ (line 1317) | def returndatacopy_(self, global_state: GlobalState) -> List[GlobalSta...
method returndatasize_ (line 1362) | def returndatasize_(self, global_state: GlobalState) -> List[GlobalSta...
method blockhash_ (line 1375) | def blockhash_(self, global_state: GlobalState) -> List[GlobalState]:
method coinbase_ (line 1389) | def coinbase_(self, global_state: GlobalState) -> List[GlobalState]:
method timestamp_ (line 1399) | def timestamp_(self, global_state: GlobalState) -> List[GlobalState]:
method number_ (line 1409) | def number_(self, global_state: GlobalState) -> List[GlobalState]:
method difficulty_ (line 1419) | def difficulty_(self, global_state: GlobalState) -> List[GlobalState]:
method gaslimit_ (line 1431) | def gaslimit_(self, global_state: GlobalState) -> List[GlobalState]:
method mload_ (line 1442) | def mload_(self, global_state: GlobalState) -> List[GlobalState]:
method mstore_ (line 1457) | def mstore_(self, global_state: GlobalState) -> List[GlobalState]:
method mstore8_ (line 1476) | def mstore8_(self, global_state: GlobalState) -> List[GlobalState]:
method sload_ (line 1497) | def sload_(self, global_state: GlobalState) -> List[GlobalState]:
method sstore_ (line 1510) | def sstore_(self, global_state: GlobalState) -> List[GlobalState]:
method tload_ (line 1522) | def tload_(self, global_state: GlobalState) -> List[GlobalState]:
method tstore_ (line 1537) | def tstore_(self, global_state: GlobalState) -> List[GlobalState]:
method jump_ (line 1550) | def jump_(self, global_state: GlobalState) -> List[GlobalState]:
method jumpi_ (line 1588) | def jumpi_(self, global_state: GlobalState) -> List[GlobalState]:
method pc_ (line 1668) | def pc_(self, global_state: GlobalState) -> List[GlobalState]:
method msize_ (line 1683) | def msize_(self, global_state: GlobalState) -> List[GlobalState]:
method gas_ (line 1693) | def gas_(self, global_state: GlobalState) -> List[GlobalState]:
method log_ (line 1704) | def log_(self, global_state: GlobalState) -> List[GlobalState]:
method _create_transaction_helper (line 1718) | def _create_transaction_helper(
method create_ (line 1814) | def create_(self, global_state: GlobalState) -> List[GlobalState]:
method create_post (line 1826) | def create_post(self, global_state: GlobalState) -> List[GlobalState]:
method create2_ (line 1830) | def create2_(self, global_state: GlobalState) -> List[GlobalState]:
method create2_post (line 1843) | def create2_post(self, global_state: GlobalState) -> List[GlobalState]:
method _handle_create_type_post (line 1847) | def _handle_create_type_post(global_state, opcode="create"):
method return_ (line 1862) | def return_(self, global_state: GlobalState):
method selfdestruct_ (line 1881) | def selfdestruct_(self, global_state: GlobalState):
method revert_ (line 1904) | def revert_(self, global_state: GlobalState) -> None:
method assert_fail_ (line 1941) | def assert_fail_(self, global_state: GlobalState):
method invalid_ (line 1950) | def invalid_(self, global_state: GlobalState):
method stop_ (line 1958) | def stop_(self, global_state: GlobalState):
method _write_symbolic_returndata (line 1966) | def _write_symbolic_returndata(
method call_ (line 2003) | def call_(self, global_state: GlobalState) -> List[GlobalState]:
method call_post (line 2088) | def call_post(self, global_state: GlobalState) -> List[GlobalState]:
method callcode_ (line 2098) | def callcode_(self, global_state: GlobalState) -> List[GlobalState]:
method callcode_post (line 2167) | def callcode_post(self, global_state: GlobalState) -> List[GlobalState]:
method delegatecall_ (line 2248) | def delegatecall_(self, global_state: GlobalState) -> List[GlobalState]:
method delegatecall_post (line 2317) | def delegatecall_post(self, global_state: GlobalState) -> List[GlobalS...
method staticcall_ (line 2396) | def staticcall_(self, global_state: GlobalState) -> List[GlobalState]:
method staticcall_post (line 2467) | def staticcall_post(self, global_state: GlobalState) -> List[GlobalSta...
method post_handler (line 2470) | def post_handler(self, global_state, function_name: str):
FILE: mythril/laser/ethereum/natives.py
function encode_int32 (line 24) | def encode_int32(v):
function safe_ord (line 28) | def safe_ord(value):
function int_to_32bytearray (line 35) | def int_to_32bytearray(i):
function ecrecover_to_pub (line 43) | def ecrecover_to_pub(rawhash, v, r, s):
class NativeContractException (line 67) | class NativeContractException(Exception):
function ecrecover (line 73) | def ecrecover(data: List[int]) -> List[int]:
function sha256 (line 100) | def sha256(data: List[int]) -> List[int]:
function ripemd160 (line 113) | def ripemd160(data: List[int]) -> List[int]:
function identity (line 128) | def identity(data: List[int]) -> List[int]:
function mod_exp (line 137) | def mod_exp(data: List[int]) -> List[int]:
function ec_add (line 169) | def ec_add(data: List[int]) -> List[int]:
function ec_mul (line 186) | def ec_mul(data: List[int]) -> List[int]:
function ec_pair (line 201) | def ec_pair(data: List[int]) -> List[int]:
function blake2b_fcompress (line 236) | def blake2b_fcompress(data: List[int]) -> List[int]:
function native_contracts (line 265) | def native_contracts(address: int, data: BaseCalldata) -> List[int]:
FILE: mythril/laser/ethereum/state/account.py
class Storage (line 18) | class Storage:
method __init__ (line 21) | def __init__(self, concrete=False, address=None, dynamic_loader=None) ...
method __getitem__ (line 43) | def __getitem__(self, item: BitVec) -> BitVec:
method __setitem__ (line 77) | def __setitem__(self, key, value: Any) -> None:
method __deepcopy__ (line 89) | def __deepcopy__(self, memodict=dict()):
method __str__ (line 101) | def __str__(self) -> str:
class Account (line 106) | class Account:
method __init__ (line 109) | def __init__(
method __str__ (line 155) | def __str__(self) -> str:
method set_balance (line 158) | def set_balance(self, balance: Union[int, BitVec]) -> None:
method set_storage (line 171) | def set_storage(self, storage: Dict):
method add_balance (line 181) | def add_balance(self, balance: Union[int, BitVec]) -> None:
method as_dict (line 194) | def as_dict(self) -> Dict:
method serialised_code (line 206) | def serialised_code(self):
method __copy__ (line 217) | def __copy__(self, memodict={}):
FILE: mythril/laser/ethereum/state/annotation.py
class StateAnnotation (line 10) | class StateAnnotation:
method persist_to_world_state (line 20) | def persist_to_world_state(self) -> bool:
method persist_over_calls (line 32) | def persist_over_calls(self) -> bool:
method search_importance (line 40) | def search_importance(self) -> int:
class MergeableStateAnnotation (line 48) | class MergeableStateAnnotation(StateAnnotation):
method check_merge_annotation (line 54) | def check_merge_annotation(self, annotation) -> bool:
method merge_annotation (line 58) | def merge_annotation(self, annotation):
class NoCopyAnnotation (line 62) | class NoCopyAnnotation(StateAnnotation):
method __copy__ (line 70) | def __copy__(self):
method __deepcopy__ (line 73) | def __deepcopy__(self, _):
FILE: mythril/laser/ethereum/state/calldata.py
class BaseCalldata (line 25) | class BaseCalldata:
method __init__ (line 29) | def __init__(self, tx_id: str) -> None:
method calldatasize (line 37) | def calldatasize(self) -> BitVec:
method get_word_at (line 47) | def get_word_at(self, offset: int) -> Expression:
method __getitem__ (line 56) | def __getitem__(self, item: Union[int, slice, BitVec]) -> Any:
method _load (line 97) | def _load(self, item: Union[int, BitVec]) -> Any:
method size (line 105) | def size(self) -> Union[BitVec, int]:
method concrete (line 112) | def concrete(self, model: Model) -> list:
class ConcreteCalldata (line 120) | class ConcreteCalldata(BaseCalldata):
method __init__ (line 123) | def __init__(self, tx_id: str, calldata: list) -> None:
method _load (line 141) | def _load(self, item: Union[int, BitVec]) -> BitVec:
method concrete (line 150) | def concrete(self, model: Model) -> list:
method size (line 159) | def size(self) -> int:
class BasicConcreteCalldata (line 167) | class BasicConcreteCalldata(BaseCalldata):
method __init__ (line 170) | def __init__(self, tx_id: str, calldata: list) -> None:
method _load (line 179) | def _load(self, item: Union[int, Expression]) -> Any:
method concrete (line 196) | def concrete(self, model: Model) -> list:
method size (line 213) | def size(self) -> int:
class SymbolicCalldata (line 221) | class SymbolicCalldata(BaseCalldata):
method __init__ (line 224) | def __init__(self, tx_id: str) -> None:
method _load (line 233) | def _load(self, item: Union[int, BitVec]) -> Any:
method concrete (line 248) | def concrete(self, model: Model) -> list:
method size (line 264) | def size(self) -> BitVec:
class BasicSymbolicCalldata (line 272) | class BasicSymbolicCalldata(BaseCalldata):
method __init__ (line 275) | def __init__(self, tx_id: str) -> None:
method _load (line 284) | def _load(self, item: Union[int, BitVec], clean=False) -> Any:
method concrete (line 305) | def concrete(self, model: Model) -> list:
method size (line 321) | def size(self) -> BitVec:
FILE: mythril/laser/ethereum/state/constraints.py
class Constraints (line 15) | class Constraints(list):
method __init__ (line 22) | def __init__(self, constraint_list: Optional[List[Bool]] = None) -> None:
method is_possible (line 31) | def is_possible(self, solver_timeout=None) -> bool:
method get_model (line 48) | def get_model(self, solver_timeout=None) -> Optional[Model]:
method append (line 60) | def append(self, constraint: Union[bool, Bool]) -> None:
method as_list (line 73) | def as_list(self) -> List[Bool]:
method __copy__ (line 79) | def __copy__(self) -> "Constraints":
method copy (line 87) | def copy(self) -> "Constraints":
method __deepcopy__ (line 90) | def __deepcopy__(self, memodict=None) -> "Constraints":
method __add__ (line 101) | def __add__(self, constraints: List[Union[bool, Bool]]) -> "Constraints":
method __iadd__ (line 111) | def __iadd__(self, constraints: Iterable[Union[bool, Bool]]) -> "Const...
method _get_smt_bool_list (line 122) | def _get_smt_bool_list(constraints: Iterable[Union[bool, Bool]]) -> Li...
method get_all_constraints (line 132) | def get_all_constraints(self):
method __hash__ (line 135) | def __hash__(self):
FILE: mythril/laser/ethereum/state/environment.py
class Environment (line 13) | class Environment:
method __init__ (line 17) | def __init__(
method __str__ (line 62) | def __str__(self) -> str:
method as_dict (line 70) | def as_dict(self) -> Dict:
FILE: mythril/laser/ethereum/state/global_state.py
class GlobalState (line 22) | class GlobalState:
method __init__ (line 25) | def __init__(
method add_annotations (line 56) | def add_annotations(self, annotations: List[StateAnnotation]):
method __copy__ (line 64) | def __copy__(self) -> "GlobalState":
method __deepcopy__ (line 85) | def __deepcopy__(self, _) -> "GlobalState":
method accounts (line 106) | def accounts(self) -> Dict:
method get_current_instruction (line 114) | def get_current_instruction(self) -> Dict:
method current_transaction (line 126) | def current_transaction(
method instruction (line 140) | def instruction(self) -> Dict:
method new_bitvec (line 147) | def new_bitvec(self, name: str, size=256, annotations=None) -> BitVec:
method annotate (line 159) | def annotate(self, annotation: StateAnnotation) -> None:
method annotations (line 170) | def annotations(self) -> List[StateAnnotation]:
method get_annotations (line 177) | def get_annotations(self, annotation_type: type) -> Iterable[StateAnno...
FILE: mythril/laser/ethereum/state/machine_state.py
class MachineStack (line 20) | class MachineStack(list):
method __init__ (line 25) | def __init__(self, default_list=None) -> None:
method append (line 32) | def append(self, element: Union[int, Expression]) -> None:
method pop (line 56) | def pop(self, index=-1) -> Union[int, Expression]:
method __getitem__ (line 69) | def __getitem__(self, item: Union[int, slice]) -> Any:
method __add__ (line 82) | def __add__(self, other):
method __iadd__ (line 89) | def __iadd__(self, other):
class MachineState (line 97) | class MachineState:
method __init__ (line 102) | def __init__(
method calculate_extension_size (line 132) | def calculate_extension_size(self, start: int, size: int) -> int:
method calculate_memory_gas (line 148) | def calculate_memory_gas(self, start: int, size: int):
method check_gas (line 166) | def check_gas(self):
method mem_extend (line 171) | def mem_extend(self, start: Union[int, BitVec], size: Union[int, BitVe...
method memory_write (line 193) | def memory_write(self, offset: int, data: List[Union[int, BitVec]]) ->...
method pop (line 202) | def pop(self, amount=1) -> Union[BitVec, List[BitVec]]:
method __deepcopy__ (line 215) | def __deepcopy__(self, memodict=None):
method __str__ (line 233) | def __str__(self):
method memory_size (line 241) | def memory_size(self) -> int:
method as_dict (line 249) | def as_dict(self) -> Dict:
FILE: mythril/laser/ethereum/state/memory.py
function convert_bv (line 22) | def convert_bv(val: Union[int, BitVec]) -> BitVec:
class Memory (line 32) | class Memory:
method __init__ (line 35) | def __init__(self):
method __len__ (line 40) | def __len__(self):
method __copy__ (line 47) | def __copy__(self):
method extend (line 53) | def extend(self, size: int):
method get_word_at (line 60) | def get_word_at(self, index: int) -> Union[int, BitVec]:
method write_word_at (line 88) | def write_word_at(self, index: int, value: Union[int, BitVec, bool, Bo...
method __getitem__ (line 122) | def __getitem__(self, item: BitVec) -> Union[int, BitVec]: ...
method __getitem__ (line 125) | def __getitem__(self, item: slice) -> List[Union[int, BitVec]]: ...
method __getitem__ (line 127) | def __getitem__(
method __setitem__ (line 163) | def __setitem__(
FILE: mythril/laser/ethereum/state/return_data.py
class ReturnData (line 10) | class ReturnData:
method __init__ (line 13) | def __init__(self, return_data: List[BitVec], return_data_size: BitVec...
method size (line 22) | def size(self) -> BitVec:
method __getitem__ (line 29) | def __getitem__(self, index):
FILE: mythril/laser/ethereum/state/transient_storage.py
class TransientStorage (line 6) | class TransientStorage:
method __init__ (line 12) | def __init__(self, journal=None):
method get (line 21) | def get(self, addr, index):
method set (line 41) | def set(self, addr, index, value):
method clear (line 53) | def clear(self):
method __copy__ (line 60) | def __copy__(self):
method __deepcopy__ (line 66) | def __deepcopy__(self):
FILE: mythril/laser/ethereum/state/world_state.py
class WorldState (line 20) | class WorldState:
method __init__ (line 24) | def __init__(
method accounts (line 47) | def accounts(self):
method __getitem__ (line 50) | def __getitem__(self, item: BitVec) -> Account:
method __copy__ (line 63) | def __copy__(self) -> "WorldState":
method __deepcopy__ (line 83) | def __deepcopy__(self, _) -> "WorldState":
method accounts_exist_or_load (line 102) | def accounts_exist_or_load(self, addr, dynamic_loader: DynLoader) -> A...
method create_account (line 150) | def create_account(
method create_initialized_contract_account (line 198) | def create_initialized_contract_account(self, contract_code, storage) ...
method annotate (line 214) | def annotate(self, annotation: StateAnnotation) -> None:
method annotations (line 222) | def annotations(self) -> List[StateAnnotation]:
method get_annotations (line 229) | def get_annotations(self, annotation_type: type) -> Iterator[StateAnno...
method _generate_new_address (line 239) | def _generate_new_address(self, creator=None, nonce=0) -> BitVec:
method put_account (line 253) | def put_account(self, account: Account) -> None:
FILE: mythril/laser/ethereum/strategy/__init__.py
class BasicSearchStrategy (line 7) | class BasicSearchStrategy(ABC):
method __init__ (line 12) | def __init__(self, work_list, max_depth, **kwargs):
method __iter__ (line 16) | def __iter__(self):
method get_strategic_global_state (line 20) | def get_strategic_global_state(self):
method run_check (line 24) | def run_check(self):
method __next__ (line 27) | def __next__(self):
class CriterionSearchStrategy (line 37) | class CriterionSearchStrategy(BasicSearchStrategy):
method __init__ (line 42) | def __init__(self, work_list, max_depth, **kwargs):
method get_strategic_global_state (line 46) | def get_strategic_global_state(self):
method set_criterion_satisfied (line 54) | def set_criterion_satisfied(self):
FILE: mythril/laser/ethereum/strategy/basic.py
class DepthFirstSearchStrategy (line 10) | class DepthFirstSearchStrategy(BasicSearchStrategy):
method get_strategic_global_state (line 16) | def get_strategic_global_state(self) -> GlobalState:
method view_strategic_global_state (line 23) | def view_strategic_global_state(self) -> GlobalState:
class BreadthFirstSearchStrategy (line 31) | class BreadthFirstSearchStrategy(BasicSearchStrategy):
method get_strategic_global_state (line 37) | def get_strategic_global_state(self) -> GlobalState:
method view_strategic_global_state (line 44) | def view_strategic_global_state(self) -> GlobalState:
class ReturnRandomNaivelyStrategy (line 52) | class ReturnRandomNaivelyStrategy(BasicSearchStrategy):
method __init__ (line 55) | def __init__(self, work_list, max_depth, **kwargs):
method get_strategic_global_state (line 59) | def get_strategic_global_state(self) -> GlobalState:
method view_strategic_global_state (line 74) | def view_strategic_global_state(self) -> GlobalState:
class ReturnWeightedRandomStrategy (line 86) | class ReturnWeightedRandomStrategy(BasicSearchStrategy):
method __init__ (line 90) | def __init__(self, work_list, max_depth, **kwargs):
method get_strategic_global_state (line 94) | def get_strategic_global_state(self) -> GlobalState:
method view_strategic_global_state (line 111) | def view_strategic_global_state(self) -> GlobalState:
FILE: mythril/laser/ethereum/strategy/beam.py
class BeamSearch (line 6) | class BeamSearch(BasicSearchStrategy):
method __init__ (line 9) | def __init__(self, work_list, max_depth, beam_width, **kwargs):
method beam_priority (line 14) | def beam_priority(state):
method sort_and_eliminate_states (line 17) | def sort_and_eliminate_states(self):
method view_strategic_global_state (line 21) | def view_strategic_global_state(self) -> GlobalState:
method get_strategic_global_state (line 32) | def get_strategic_global_state(self) -> GlobalState:
FILE: mythril/laser/ethereum/strategy/concolic.py
class TraceAnnotation (line 19) | class TraceAnnotation(StateAnnotation):
method __init__ (line 24) | def __init__(self, trace=None):
method persist_over_calls (line 28) | def persist_over_calls(self) -> bool:
method __copy__ (line 31) | def __copy__(self):
class ConcolicStrategy (line 35) | class ConcolicStrategy(CriterionSearchStrategy):
method __init__ (line 40) | def __init__(
method check_completion_criterion (line 60) | def check_completion_criterion(self):
method get_strategic_global_state (line 64) | def get_strategic_global_state(self) -> GlobalState:
FILE: mythril/laser/ethereum/strategy/constraint_strategy.py
class DelayConstraintStrategy (line 10) | class DelayConstraintStrategy(BasicSearchStrategy):
method __init__ (line 11) | def __init__(self, work_list, max_depth, **kwargs):
method get_strategic_global_state (line 17) | def get_strategic_global_state(self) -> GlobalState:
FILE: mythril/laser/ethereum/strategy/extensions/bounded_loops.py
class JumpdestCountAnnotation (line 13) | class JumpdestCountAnnotation(StateAnnotation):
method __init__ (line 16) | def __init__(self) -> None:
method __copy__ (line 20) | def __copy__(self):
class BoundedLoopsStrategy (line 27) | class BoundedLoopsStrategy(BasicSearchStrategy):
method __init__ (line 32) | def __init__(self, super_strategy: BasicSearchStrategy, **kwargs) -> N...
method calculate_hash (line 49) | def calculate_hash(i: int, j: int, trace: List[int]) -> int:
method count_key (line 66) | def count_key(trace: List[int], key: int, start: int, size: int) -> int:
method get_loop_count (line 84) | def get_loop_count(trace: List[int]) -> int:
method get_strategic_global_state (line 104) | def get_strategic_global_state(self) -> GlobalState:
FILE: mythril/laser/ethereum/svm.py
class SVMError (line 37) | class SVMError(Exception):
class LaserEVM (line 43) | class LaserEVM:
method __init__ (line 54) | def __init__(
method extend_strategy (line 148) | def extend_strategy(self, extension: ABCMeta, **kwargs) -> None:
method sym_exec (line 151) | def sym_exec(
method execute_transactions (line 220) | def execute_transactions(self, address) -> None:
method _execute_transactions_non_ordered (line 241) | def _execute_transactions_non_ordered(self, address):
method _execute_transactions_incremental (line 252) | def _execute_transactions_incremental(self, address, txs=None):
method _check_create_termination (line 311) | def _check_create_termination(self) -> bool:
method _check_execution_termination (line 319) | def _check_execution_termination(self) -> bool:
method exec (line 325) | def exec(self, create=False, track_gas=False) -> Optional[List[GlobalS...
method _add_world_state (line 370) | def _add_world_state(self, global_state: GlobalState):
method handle_vm_exception (line 381) | def handle_vm_exception(
method execute_state (line 400) | def execute_state(
method _end_message_call (line 523) | def _end_message_call(
method manage_cfg (line 579) | def manage_cfg(self, opcode: str, new_states: List[GlobalState]) -> None:
method _new_node_state (line 602) | def _new_node_state(
method register_hooks (line 667) | def register_hooks(self, hook_type: str, hook_dict: Dict[str, List[Cal...
method register_laser_hooks (line 685) | def register_laser_hooks(self, hook_type: str, hook: Callable):
method register_instr_hooks (line 693) | def register_instr_hooks(self, hook_type: str, opcode: str, hook: Call...
method instr_hook (line 708) | def instr_hook(self, hook_type, opcode) -> Callable:
method laser_hook (line 724) | def laser_hook(self, hook_type: str) -> Callable:
method _execute_pre_hook (line 741) | def _execute_pre_hook(self, op_code: str, global_state: GlobalState) -...
method _execute_post_hook (line 753) | def _execute_post_hook(
method pre_hook (line 772) | def pre_hook(self, op_code: str) -> Callable:
method post_hook (line 792) | def post_hook(self, op_code: str) -> Callable:
FILE: mythril/laser/ethereum/time_handler.py
class TimeHandler (line 6) | class TimeHandler(object, metaclass=Singleton):
method __init__ (line 7) | def __init__(self):
method start_execution (line 11) | def start_execution(self, execution_time):
method time_remaining (line 15) | def time_remaining(self):
FILE: mythril/laser/ethereum/transaction/concolic.py
function execute_contract_creation (line 21) | def execute_contract_creation(
function execute_message_call (line 73) | def execute_message_call(
function _setup_global_state_for_execution (line 123) | def _setup_global_state_for_execution(laser_evm, transaction) -> None:
function execute_transaction (line 157) | def execute_transaction(*args, **kwargs) -> Union[None, List[GlobalState]]:
FILE: mythril/laser/ethereum/transaction/symbolic.py
class Actors (line 26) | class Actors:
method __init__ (line 27) | def __init__(
method __setitem__ (line 39) | def __setitem__(self, actor: str, address: Optional[str]):
method __getitem__ (line 56) | def __getitem__(self, actor: str):
method creator (line 60) | def creator(self):
method attacker (line 64) | def attacker(self):
method __len__ (line 67) | def __len__(self):
function generate_function_constraints (line 74) | def generate_function_constraints(
function execute_message_call (line 103) | def execute_message_call(
function execute_contract_creation (line 151) | def execute_contract_creation(
function _setup_global_state_for_execution (line 199) | def _setup_global_state_for_execution(
function execute_transaction (line 243) | def execute_transaction(*args, **kwargs):
FILE: mythril/laser/ethereum/transaction/transaction_models.py
class TxIdManager (line 26) | class TxIdManager(object, metaclass=Singleton):
method __init__ (line 27) | def __init__(self):
method get_next_tx_id (line 30) | def get_next_tx_id(self):
method restart_counter (line 34) | def restart_counter(self):
method set_counter (line 37) | def set_counter(self, tx_id):
class TransactionEndSignal (line 44) | class TransactionEndSignal(Exception):
method __init__ (line 47) | def __init__(self, global_state: GlobalState, revert=False) -> None:
class TransactionStartSignal (line 52) | class TransactionStartSignal(Exception):
method __init__ (line 55) | def __init__(
class BaseTransaction (line 66) | class BaseTransaction:
method __init__ (line 69) | def __init__(
method initial_global_state_from_environment (line 129) | def initial_global_state_from_environment(self, environment, active_fu...
method initial_global_state (line 156) | def initial_global_state(self) -> GlobalState:
method __str__ (line 159) | def __str__(self) -> str:
class MessageCallTransaction (line 176) | class MessageCallTransaction(BaseTransaction):
method __init__ (line 179) | def __init__(self, *args, **kwargs) -> None:
method initial_global_state (line 182) | def initial_global_state(self) -> GlobalState:
method end (line 199) | def end(self, global_state: GlobalState, return_data=None, revert=Fals...
class ContractCreationTransaction (line 211) | class ContractCreationTransaction(BaseTransaction):
method __init__ (line 214) | def __init__(
method initial_global_state (line 255) | def initial_global_state(self) -> GlobalState:
method end (line 271) | def end(self, global_state: GlobalState, return_data=None, revert=False):
FILE: mythril/laser/ethereum/tx_prioritiser/rf_prioritiser.py
class RfTxPrioritiser (line 9) | class RfTxPrioritiser:
method __init__ (line 10) | def __init__(self, contract, depth=3, model_path=None):
method preprocess_features (line 25) | def preprocess_features(self, features_dict):
method __next__ (line 33) | def __next__(self, address):
FILE: mythril/laser/ethereum/util.py
function safe_decode (line 26) | def safe_decode(hex_encoded_string: str) -> bytes:
function insert_ret_val (line 38) | def insert_ret_val(global_state: "GlobalState"):
function to_signed (line 46) | def to_signed(i: int) -> int:
function get_instruction_index (line 55) | def get_instruction_index(
function get_trace_line (line 72) | def get_trace_line(instr: Dict, state: "MachineState") -> str:
function pop_bitvec (line 85) | def pop_bitvec(state: "MachineState") -> BitVec:
function get_concrete_int (line 109) | def get_concrete_int(item: Union[int, Expression]) -> int:
function concrete_int_from_bytes (line 130) | def concrete_int_from_bytes(
function concrete_int_to_bytes (line 149) | def concrete_int_to_bytes(val):
function bytearray_to_int (line 161) | def bytearray_to_int(arr):
function extract_copy (line 173) | def extract_copy(
function extract32 (line 183) | def extract32(data: bytearray, i: int) -> int:
FILE: mythril/laser/execution_info.py
class ExecutionInfo (line 4) | class ExecutionInfo(ABC):
method as_dict (line 6) | def as_dict(self):
FILE: mythril/laser/plugin/builder.py
class PluginBuilder (line 6) | class PluginBuilder(ABC):
method __init__ (line 14) | def __init__(self):
method __call__ (line 18) | def __call__(self, *args, **kwargs) -> LaserPlugin:
FILE: mythril/laser/plugin/interface.py
class LaserPlugin (line 4) | class LaserPlugin:
method initialize (line 18) | def initialize(self, symbolic_vm: LaserEVM) -> None:
FILE: mythril/laser/plugin/loader.py
class LaserPluginLoader (line 12) | class LaserPluginLoader(object, metaclass=Singleton):
method __init__ (line 18) | def __init__(self) -> None:
method add_args (line 24) | def add_args(self, plugin_name, **kwargs):
method load (line 27) | def load(self, plugin_builder: PluginBuilder) -> None:
method is_enabled (line 40) | def is_enabled(self, plugin_name: str) -> bool:
method enable (line 50) | def enable(self, plugin_name: str):
method instrument_virtual_machine (line 55) | def instrument_virtual_machine(
FILE: mythril/laser/plugin/plugins/benchmark.py
class BenchmarkPluginBuilder (line 13) | class BenchmarkPluginBuilder(PluginBuilder):
method __call__ (line 16) | def __call__(self, *args, **kwargs):
class BenchmarkPlugin (line 21) | class BenchmarkPlugin(LaserPlugin):
method __init__ (line 32) | def __init__(self, name=None):
method initialize (line 43) | def initialize(self, symbolic_vm: LaserEVM):
method _reset (line 74) | def _reset(self):
method _store_report (line 81) | def _store_report(self):
method _write_to_graph (line 85) | def _write_to_graph(self):
FILE: mythril/laser/plugin/plugins/call_depth_limiter.py
class CallDepthLimitBuilder (line 8) | class CallDepthLimitBuilder(PluginBuilder):
method __call__ (line 11) | def __call__(self, *args, **kwargs):
class CallDepthLimit (line 15) | class CallDepthLimit(LaserPlugin):
method __init__ (line 16) | def __init__(self, call_depth_limit: int):
method initialize (line 19) | def initialize(self, symbolic_vm: LaserEVM):
FILE: mythril/laser/plugin/plugins/coverage/coverage_plugin.py
class CoveragePluginBuilder (line 12) | class CoveragePluginBuilder(PluginBuilder):
method __call__ (line 15) | def __call__(self, *args, **kwargs):
class InstructionCoveragePlugin (line 19) | class InstructionCoveragePlugin(LaserPlugin):
method __init__ (line 31) | def __init__(self):
method initialize (line 36) | def initialize(self, symbolic_vm: LaserEVM):
method _get_covered_instructions (line 99) | def _get_covered_instructions(self) -> int:
method is_instruction_covered (line 109) | def is_instruction_covered(self, bytecode, index):
FILE: mythril/laser/plugin/plugins/coverage/coverage_strategy.py
class CoverageStrategy (line 6) | class CoverageStrategy(BasicSearchStrategy):
method __init__ (line 15) | def __init__(
method get_strategic_global_state (line 26) | def get_strategic_global_state(self) -> GlobalState:
method _is_covered (line 37) | def _is_covered(self, global_state: GlobalState) -> bool:
FILE: mythril/laser/plugin/plugins/coverage_metrics/coverage_data.py
class InstructionCoverageInfo (line 7) | class InstructionCoverageInfo(ExecutionInfo):
method __init__ (line 8) | def __init__(self):
method as_dict (line 11) | def as_dict(self):
method get_code_instr_hex (line 14) | def get_code_instr_hex(self, code: str, instruction: int):
method is_covered (line 19) | def is_covered(self, code: str, instruction: int):
method add_data (line 23) | def add_data(self, code: str, instruction: int, discovery_time: int):
method output (line 27) | def output(self, filename: str):
class CoverageData (line 34) | class CoverageData:
method __init__ (line 35) | def __init__(
method as_dict (line 55) | def as_dict(self):
class CoverageTimeSeries (line 59) | class CoverageTimeSeries(ExecutionInfo):
method __init__ (line 60) | def __init__(self):
method output (line 63) | def output(self, filename: str):
method as_dict (line 67) | def as_dict(self):
method add_data (line 70) | def add_data(self, *args, **kwargs):
FILE: mythril/laser/plugin/plugins/coverage_metrics/metrics_plugin.py
class CoverageMetricsPluginBuilder (line 18) | class CoverageMetricsPluginBuilder(PluginBuilder):
method __call__ (line 36) | def __call__(self, *args, **kwargs):
class LaserCoveragePlugin (line 41) | class LaserCoveragePlugin(LaserPlugin):
method __init__ (line 42) | def __init__(self):
method initialize (line 51) | def initialize(self, symbolic_vm: LaserEVM) -> None:
method _update_instruction_coverage_data (line 86) | def _update_instruction_coverage_data(self, global_state: GlobalState):
method _update_branch_coverage_data (line 99) | def _update_branch_coverage_data(self, global_state: GlobalState):
method _record_coverage (line 114) | def _record_coverage(self):
FILE: mythril/laser/plugin/plugins/dependency_pruner.py
function get_dependency_annotation (line 22) | def get_dependency_annotation(state: GlobalState) -> DependencyAnnotation:
function get_ws_dependency_annotation (line 52) | def get_ws_dependency_annotation(state: GlobalState) -> WSDependencyAnno...
class DependencyPrunerBuilder (line 72) | class DependencyPrunerBuilder(PluginBuilder):
method __call__ (line 75) | def __call__(self, *args, **kwargs):
class DependencyPruner (line 79) | class DependencyPruner(LaserPlugin):
method __init__ (line 91) | def __init__(self):
method _reset (line 95) | def _reset(self):
method update_sloads (line 102) | def update_sloads(self, path: List[int], target_location: object) -> N...
method update_sstores (line 116) | def update_sstores(self, path: List[int], target_location: object) -> ...
method update_calls (line 130) | def update_calls(self, path: List[int]) -> None:
method wanna_execute (line 141) | def wanna_execute(self, address: int, annotation: DependencyAnnotation...
method initialize (line 195) | def initialize(self, symbolic_vm: LaserEVM) -> None:
FILE: mythril/laser/plugin/plugins/instruction_profiler.py
class InstructionProfilerBuilder (line 34) | class InstructionProfilerBuilder(PluginBuilder):
method __call__ (line 37) | def __call__(self, *args, **kwargs):
class InstructionProfiler (line 41) | class InstructionProfiler(LaserPlugin):
method __init__ (line 44) | def __init__(self):
method _reset (line 47) | def _reset(self):
method initialize (line 51) | def initialize(self, symbolic_vm: LaserEVM) -> None:
method _make_stats (line 94) | def _make_stats(self) -> Tuple[float, _InstrExecStatistics]:
FILE: mythril/laser/plugin/plugins/mutation_pruner.py
class MutationPrunerBuilder (line 15) | class MutationPrunerBuilder(PluginBuilder):
method __call__ (line 18) | def __call__(self, *args, **kwargs):
class MutationPruner (line 22) | class MutationPruner(LaserPlugin):
method initialize (line 37) | def initialize(self, symbolic_vm: LaserEVM):
FILE: mythril/laser/plugin/plugins/plugin_annotations.py
class MutationAnnotation (line 13) | class MutationAnnotation(StateAnnotation):
method __init__ (line 19) | def __init__(self):
method persist_over_calls (line 23) | def persist_over_calls(self) -> bool:
class DependencyAnnotation (line 27) | class DependencyAnnotation(MergeableStateAnnotation):
method __init__ (line 33) | def __init__(self):
method __copy__ (line 40) | def __copy__(self):
method get_storage_write_cache (line 49) | def get_storage_write_cache(self, iteration: int):
method extend_storage_write_cache (line 52) | def extend_storage_write_cache(self, iteration: int, value: object):
method check_merge_annotation (line 57) | def check_merge_annotation(self, other: "DependencyAnnotation"):
method merge_annotation (line 62) | def merge_annotation(self, other: "DependencyAnnotation"):
class WSDependencyAnnotation (line 81) | class WSDependencyAnnotation(MergeableStateAnnotation):
method __init__ (line 88) | def __init__(self):
method __copy__ (line 91) | def __copy__(self):
method check_merge_annotation (line 96) | def check_merge_annotation(self, annotation: "WSDependencyAnnotation")...
method merge_annotation (line 115) | def merge_annotation(
FILE: mythril/laser/plugin/plugins/state_merge/check_mergeability.py
function check_node_merge_condition (line 14) | def check_node_merge_condition(node1: Node, node2: Node):
function check_account_merge_condition (line 30) | def check_account_merge_condition(account1: Account, account2: Account):
function check_ws_merge_condition (line 43) | def check_ws_merge_condition(state1: WorldState, state2: WorldState):
function _check_merge_annotations (line 63) | def _check_merge_annotations(state1: WorldState, state2: WorldState):
function _check_constraint_merge (line 89) | def _check_constraint_merge(
FILE: mythril/laser/plugin/plugins/state_merge/merge_states.py
function merge_states (line 14) | def merge_states(state1: WorldState, state2: WorldState):
function merge_nodes (line 49) | def merge_nodes(node1: Node, node2: Node, constraints: Constraints):
function merge_accounts (line 63) | def merge_accounts(
function merge_storage (line 88) | def merge_storage(storage1: Storage, storage2: Storage, path_condition: ...
function _merge_annotations (line 111) | def _merge_annotations(state1: "WorldState", state2: "WorldState"):
function _merge_constraints (line 129) | def _merge_constraints(
FILE: mythril/laser/plugin/plugins/state_merge/state_merge_plugin.py
class MergeAnnotation (line 16) | class MergeAnnotation(StateAnnotation):
class StateMergePluginBuilder (line 20) | class StateMergePluginBuilder(LaserPlugin):
method __call__ (line 31) | def __call__(self, *args, **kwargs):
class StateMergePlugin (line 35) | class StateMergePlugin(LaserPlugin):
method initialize (line 44) | def initialize(self, symbolic_vm: LaserEVM):
method _look_for_merges (line 77) | def _look_for_merges(
FILE: mythril/laser/plugin/plugins/summary/annotations.py
class SummaryTrackingAnnotation (line 11) | class SummaryTrackingAnnotation(StateAnnotation):
method __init__ (line 17) | def __init__(
method __copy__ (line 34) | def __copy__(self):
FILE: mythril/laser/plugin/plugins/summary/core.py
class SymbolicSummaryPluginBuilder (line 45) | class SymbolicSummaryPluginBuilder(PluginBuilder):
method __call__ (line 48) | def __call__(self, *args, **kwargs):
class SymbolicSummaryPlugin (line 52) | class SymbolicSummaryPlugin(LaserPlugin):
method __init__ (line 53) | def __init__(self):
method initialize (line 60) | def initialize(self, symbolic_vm: LaserEVM):
method _summary_entry (line 111) | def _summary_entry(self, global_state: GlobalState):
method _create_summary_environment (line 155) | def _create_summary_environment(self, base_environment: Environment) -...
method _restore_environment (line 177) | def _restore_environment(
method check_for_issues (line 200) | def check_for_issues(self, global_state):
method storage_dependent (line 205) | def storage_dependent(self, summary, global_state: GlobalState) -> bool:
method _apply_summaries (line 233) | def _apply_summaries(self, laser_evm: LaserEVM, global_state: GlobalSt...
method issue_in_cache (line 257) | def issue_in_cache(
method _check_issue (line 269) | def _check_issue(
method _translate_condition (line 308) | def _translate_condition(self, global_state: GlobalState, condition: L...
method _summary_exit (line 316) | def _summary_exit(
method _get_and_remove_summary_tracking_annotation (line 338) | def _get_and_remove_summary_tracking_annotation(
method _record_symbolic_summary (line 354) | def _record_symbolic_summary(
method _restore_previous_state (line 410) | def _restore_previous_state(
method _rewrite (line 425) | def _rewrite(global_state: GlobalState, original: Expression, new: Exp...
FILE: mythril/laser/plugin/plugins/summary/summary.py
class SymbolicSummary (line 14) | class SymbolicSummary:
method __init__ (line 20) | def __init__(
method as_csv (line 49) | def as_csv(self, delimiter=",", sub_array_delimiter=";", tuple_delimit...
method as_dict (line 75) | def as_dict(self):
method apply_summary (line 89) | def apply_summary(self, global_state: GlobalState):
function substitute_exprs (line 127) | def substitute_exprs(expression, account_id, account, global_state):
FILE: mythril/laser/plugin/plugins/trace.py
class TraceFinderBuilder (line 9) | class TraceFinderBuilder(PluginBuilder):
method __call__ (line 21) | def __call__(self, *args, **kwargs):
class TraceFinder (line 25) | class TraceFinder(LaserPlugin):
method __init__ (line 26) | def __init__(self):
method _reset (line 29) | def _reset(self):
method initialize (line 32) | def initialize(self, symbolic_vm: LaserEVM):
FILE: mythril/laser/plugin/signals.py
class PluginSignal (line 1) | class PluginSignal(Exception):
class PluginSkipWorldState (line 10) | class PluginSkipWorldState(PluginSignal):
class PluginSkipState (line 20) | class PluginSkipState(PluginSignal):
FILE: mythril/laser/smt/__init__.py
class SymbolFactory (line 36) | class SymbolFactory(Generic[T, U]):
method Bool (line 40) | def Bool(value: "__builtins__.bool", annotations: Annotations = None) ...
method BoolSym (line 50) | def BoolSym(name: str, annotations: Annotations = None) -> T:
method BitVecVal (line 60) | def BitVecVal(value: int, size: int, annotations: Annotations = None) ...
method BitVecSym (line 71) | def BitVecSym(name: str, size: int, annotations: Annotations = None) -...
class _SmtSymbolFactory (line 82) | class _SmtSymbolFactory(SymbolFactory[SMTBool, BitVec]):
method Bool (line 89) | def Bool(value: "__builtins__.bool", annotations: Annotations = None) ...
method BoolSym (line 100) | def BoolSym(name: str, annotations: Annotations = None) -> SMTBool:
method BitVecVal (line 111) | def BitVecVal(value: int, size: int, annotations: Annotations = None) ...
method BitVecSym (line 117) | def BitVecSym(name: str, size: int, annotations: Annotations = None) -...
class _Z3SymbolFactory (line 123) | class _Z3SymbolFactory(SymbolFactory[z3.BoolRef, z3.BitVecRef]):
method Bool (line 130) | def Bool(value: "__builtins__.bool", annotations: Annotations = None) ...
method BitVecVal (line 135) | def BitVecVal(
method BitVecSym (line 142) | def BitVecSym(
FILE: mythril/laser/smt/array.py
class BaseArray (line 15) | class BaseArray:
method __init__ (line 18) | def __init__(self, raw):
method __getitem__ (line 21) | def __getitem__(self, item: BitVec) -> BitVec:
method __setitem__ (line 29) | def __setitem__(self, key: BitVec, value: BitVec) -> None:
method substitute (line 33) | def substitute(self, original_expression, new_expression):
class Array (line 46) | class Array(BaseArray):
method __init__ (line 49) | def __init__(self, name: str, domain: int, value_range: int):
class K (line 61) | class K(BaseArray):
method __init__ (line 65) | def __init__(self, domain: int, value_range: int, value: int):
FILE: mythril/laser/smt/bitvec.py
function _padded_operation (line 16) | def _padded_operation(a: z3.BitVec, b: z3.BitVec, operator):
class BitVec (line 25) | class BitVec(Expression[z3.BitVecRef]):
method __init__ (line 28) | def __init__(self, raw: z3.BitVecRef, annotations: Optional[Annotation...
method size (line 36) | def size(self) -> int:
method symbolic (line 44) | def symbolic(self) -> bool:
method value (line 53) | def value(self) -> Optional[int]:
method __add__ (line 63) | def __add__(self, other: Union[int, "BitVec"]) -> "BitVec":
method __sub__ (line 75) | def __sub__(self, other: Union[int, "BitVec"]) -> "BitVec":
method __mul__ (line 87) | def __mul__(self, other: "BitVec") -> "BitVec":
method __truediv__ (line 96) | def __truediv__(self, other: "BitVec") -> "BitVec":
method __and__ (line 105) | def __and__(self, other: Union[int, "BitVec"]) -> "BitVec":
method __or__ (line 116) | def __or__(self, other: Union[int, "BitVec"]) -> "BitVec":
method __xor__ (line 127) | def __xor__(self, other: Union[int, "BitVec"]) -> "BitVec":
method __lt__ (line 138) | def __lt__(self, other: Union[int, "BitVec"]) -> Bool:
method __gt__ (line 149) | def __gt__(self, other: Union[int, "BitVec"]) -> Bool:
method __le__ (line 160) | def __le__(self, other: Union[int, "BitVec"]) -> Bool:
method __ge__ (line 171) | def __ge__(self, other: Union[int, "BitVec"]) -> Bool:
method __eq__ (line 183) | def __eq__(self, other: Union[int, "BitVec"]) -> Bool: # type: ignore
method __ne__ (line 201) | def __ne__(self, other: Union[int, "BitVec"]) -> Bool: # type: ignore
method _handle_shift (line 218) | def _handle_shift(self, other: Union[int, "BitVec"], operator: Callabl...
method __lshift__ (line 232) | def __lshift__(self, other: Union[int, "BitVec"]) -> "BitVec":
method __rshift__ (line 240) | def __rshift__(self, other: Union[int, "BitVec"]) -> "BitVec":
method __hash__ (line 248) | def __hash__(self) -> int:
FILE: mythril/laser/smt/bitvec_helper.py
function _z3_array_converter (line 12) | def _z3_array_converter(array: Union[z3.Array, z3.K]) -> Array:
function _comparison_helper (line 20) | def _comparison_helper(a: BitVec, b: BitVec, operation: Callable) -> Bool:
function _arithmetic_helper (line 25) | def _arithmetic_helper(a: BitVec, b: BitVec, operation: Callable) -> Bit...
function LShR (line 31) | def LShR(a: BitVec, b: BitVec):
function If (line 36) | def If(
function If (line 42) | def If(a: Union[Bool, bool], b: BaseArray, c: BaseArray) -> BaseArray: ...
function If (line 45) | def If(
function UGT (line 76) | def UGT(a: BitVec, b: BitVec) -> Bool:
function UGE (line 86) | def UGE(a: BitVec, b: BitVec) -> Bool:
function ULT (line 96) | def ULT(a: BitVec, b: BitVec) -> Bool:
function ULE (line 106) | def ULE(a: BitVec, b: BitVec) -> Bool:
function Concat (line 117) | def Concat(*args: List[BitVec]) -> BitVec: ...
function Concat (line 121) | def Concat(*args: BitVec) -> BitVec: ...
function Concat (line 124) | def Concat(*args: Union[BitVec, List[BitVec]]) -> BitVec:
function Extract (line 144) | def Extract(high: int, low: int, bv: BitVec) -> BitVec:
function URem (line 156) | def URem(a: BitVec, b: BitVec) -> BitVec:
function SRem (line 166) | def SRem(a: BitVec, b: BitVec) -> BitVec:
function UDiv (line 176) | def UDiv(a: BitVec, b: BitVec) -> BitVec:
function Sum (line 186) | def Sum(*args: BitVec) -> BitVec:
function BVAddNoOverflow (line 199) | def BVAddNoOverflow(a: Union[BitVec, int], b: Union[BitVec, int], signed...
function BVMulNoOverflow (line 214) | def BVMulNoOverflow(a: Union[BitVec, int], b: Union[BitVec, int], signed...
function BVSubNoUnderflow (line 230) | def BVSubNoUnderflow(
FILE: mythril/laser/smt/bool.py
class Bool (line 13) | class Bool(Expression[z3.BoolRef]):
method is_false (line 17) | def is_false(self) -> bool:
method is_true (line 26) | def is_true(self) -> bool:
method value (line 35) | def value(self) -> Union[bool, None]:
method __eq__ (line 49) | def __eq__(self, other: object) -> "Bool": # type: ignore
method __ne__ (line 61) | def __ne__(self, other: object) -> "Bool": # type: ignore
method __bool__ (line 72) | def __bool__(self) -> bool:
method substitute (line 82) | def substitute(self, original_expression, new_expression):
method __hash__ (line 94) | def __hash__(self) -> int:
function And (line 98) | def And(*args: Union[Bool, bool]) -> Bool:
function Xor (line 107) | def Xor(a: Bool, b: Bool) -> Bool:
function Or (line 114) | def Or(*args: Union[Bool, bool]) -> Bool:
function Not (line 128) | def Not(a: Bool) -> Bool:
function is_false (line 137) | def is_false(a: Bool) -> bool:
function is_true (line 146) | def is_true(a: Bool) -> bool:
FILE: mythril/laser/smt/expression.py
class Expression (line 11) | class Expression(Generic[T]):
method __init__ (line 15) | def __init__(self, raw: T, annotations: Optional[Annotations] = None):
method annotations (line 29) | def annotations(self) -> Annotations:
method annotate (line 37) | def annotate(self, annotation: Any) -> None:
method simplify (line 45) | def simplify(self) -> None:
method __repr__ (line 49) | def __repr__(self) -> str:
method size (line 52) | def size(self):
method __hash__ (line 55) | def __hash__(self) -> int:
method get_annotations (line 58) | def get_annotations(self, annotation: Any):
function simplify (line 65) | def simplify(expression: G) -> G:
FILE: mythril/laser/smt/function.py
class Function (line 8) | class Function:
method __init__ (line 11) | def __init__(self, name: str, domain: List[int], value_range: int):
method __call__ (line 24) | def __call__(self, *items) -> BitVec:
FILE: mythril/laser/smt/model.py
class Model (line 6) | class Model:
method __init__ (line 13) | def __init__(self, models: List[z3.ModelRef] = None):
method decls (line 20) | def decls(self) -> List[z3.ExprRef]:
method __getitem__ (line 27) | def __getitem__(self, item) -> Union[None, z3.ExprRef]:
method eval (line 45) | def eval(
FILE: mythril/laser/smt/solver/independence_solver.py
function _get_expr_variables (line 10) | def _get_expr_variables(expression: z3.ExprRef) -> List[z3.ExprRef]:
class DependenceBucket (line 25) | class DependenceBucket:
method __init__ (line 28) | def __init__(self, variables=None, conditions=None):
class DependenceMap (line 38) | class DependenceMap:
method __init__ (line 41) | def __init__(self):
method add_condition (line 46) | def add_condition(self, condition: z3.BoolRef) -> None:
method _merge_buckets (line 71) | def _merge_buckets(self, bucket_list: Set[DependenceBucket]) -> Depend...
class IndependenceSolver (line 86) | class IndependenceSolver:
method __init__ (line 89) | def __init__(self):
method set_timeout (line 95) | def set_timeout(self, timeout: int) -> None:
method add (line 103) | def add(self, *constraints: Bool) -> None:
method append (line 113) | def append(self, *constraints: Tuple[Bool]) -> None:
method check (line 124) | def check(self) -> z3.CheckSatResult:
method model (line 142) | def model(self) -> Model:
method reset (line 146) | def reset(self) -> None:
method pop (line 150) | def pop(self, num) -> None:
FILE: mythril/laser/smt/solver/solver.py
class BaseSolver (line 20) | class BaseSolver(Generic[T]):
method __init__ (line 21) | def __init__(self, raw: T) -> None:
method set_timeout (line 25) | def set_timeout(self, timeout: int) -> None:
method set_unsat_core (line 33) | def set_unsat_core(self) -> None:
method add (line 42) | def add(self, *constraints: Bool) -> None:
method assert_and_track (line 53) | def assert_and_track(self, constraints: Bool, name: str) -> None:
method append (line 64) | def append(self, *constraints: Bool) -> None:
method check (line 73) | def check(self, *args) -> z3.CheckSatResult:
method model (line 90) | def model(self) -> Model:
method sexpr (line 101) | def sexpr(self):
class Solver (line 105) | class Solver(BaseSolver[z3.Solver]):
method __init__ (line 108) | def __init__(self) -> None:
method reset (line 112) | def reset(self) -> None:
method pop (line 116) | def pop(self, num: int) -> None:
class Optimize (line 124) | class Optimize(BaseSolver[z3.Optimize]):
method __init__ (line 127) | def __init__(self) -> None:
method minimize (line 131) | def minimize(self, element: Expression[z3.ExprRef]) -> None:
method maximize (line 138) | def maximize(self, element: Expression[z3.ExprRef]) -> None:
FILE: mythril/laser/smt/solver/solver_statistics.py
function stat_smt_query (line 7) | def stat_smt_query(func: Callable):
class SolverStatistics (line 28) | class SolverStatistics(object, metaclass=Singleton):
method __init__ (line 34) | def __init__(self):
method __repr__ (line 39) | def __repr__(self):
FILE: mythril/mythril/mythril_analyzer.py
class MythrilAnalyzer (line 30) | class MythrilAnalyzer:
method __init__ (line 36) | def __init__(
method dump_statespace (line 84) | def dump_statespace(self, contract: EVMContract = None) -> str:
method graph_html (line 105) | def graph_html(
method fire_lasers (line 136) | def fire_lasers(
FILE: mythril/mythril/mythril_config.py
class MythrilConfig (line 16) | class MythrilConfig:
method __init__ (line 22) | def __init__(self):
method set_api_infura_id (line 29) | def set_api_infura_id(self, id):
method init_mythril_dir (line 33) | def init_mythril_dir() -> str:
method _init_config (line 58) | def _init_config(self):
method _add_default_options (line 90) | def _add_default_options(config: ConfigParser) -> None:
method _add_dynamic_loading_option (line 99) | def _add_dynamic_loading_option(config: ConfigParser) -> None:
method set_api_rpc_infura (line 119) | def set_api_rpc_infura(self) -> None:
method set_api_rpc (line 126) | def set_api_rpc(self, rpc: str = None, rpctls: bool = False) -> None:
method set_api_rpc_localhost (line 192) | def set_api_rpc_localhost(self) -> None:
method set_api_from_config_path (line 197) | def set_api_from_config_path(self) -> None:
method _set_rpc (line 208) | def _set_rpc(self, rpc_type: str) -> None:
FILE: mythril/mythril/mythril_disassembler.py
function format_warning (line 30) | def format_warning(message, category, filename, lineno, line=""):
class MythrilDisassembler (line 40) | class MythrilDisassembler:
method __init__ (line 48) | def __init__(
method _init_solc_binary (line 64) | def _init_solc_binary(version: str) -> Optional[str]:
method load_from_bytecode (line 98) | def load_from_bytecode(
method load_from_address (line 127) | def load_from_address(self, address: str) -> Tuple[str, EVMContract]:
method load_from_foundry (line 160) | def load_from_foundry(self):
method check_run_integer_module (line 218) | def check_run_integer_module(self, source_file):
method load_from_solidity (line 241) | def load_from_solidity(
method hash_for_function_signature (line 320) | def hash_for_function_signature(func: str) -> str:
method get_state_variable_from_storage (line 328) | def get_state_variable_from_storage(
FILE: mythril/plugin/discovery.py
class PluginDiscovery (line 13) | class PluginDiscovery(object, metaclass=Singleton):
method init_installed_plugins (line 22) | def init_installed_plugins(self):
method installed_plugins (line 39) | def installed_plugins(self):
method is_installed (line 44) | def is_installed(self, plugin_name: str) -> bool:
method build_plugin (line 48) | def build_plugin(self, plugin_name: str, plugin_args: Dict) -> Mythril...
method get_plugins (line 59) | def get_plugins(self, default_enabled=None) -> List[str]:
FILE: mythril/plugin/interface.py
class MythrilPlugin (line 6) | class MythrilPlugin:
method __init__ (line 23) | def __init__(self, **kwargs):
method __repr__ (line 26) | def __repr__(self):
class MythrilCLIPlugin (line 31) | class MythrilCLIPlugin(MythrilPlugin):
class MythrilLaserPlugin (line 40) | class MythrilLaserPlugin(MythrilPlugin, LaserPluginBuilder, ABC):
FILE: mythril/plugin/loader.py
class UnsupportedPluginType (line 14) | class UnsupportedPluginType(Exception):
class MythrilPluginLoader (line 20) | class MythrilPluginLoader(object, metaclass=Singleton):
method __init__ (line 26) | def __init__(self):
method set_args (line 32) | def set_args(self, plugin_name: str, **kwargs):
method load (line 35) | def load(self, plugin: MythrilPlugin):
method _load_detection_module (line 59) | def _load_detection_module(plugin: DetectionModule):
method _load_laser_plugin (line 65) | def _load_laser_plugin(plugin: MythrilLaserPlugin):
method _load_default_enabled (line 70) | def _load_default_enabled(self):
FILE: mythril/solidity/features.py
class SolidityFeatureExtractor (line 4) | class SolidityFeatureExtractor:
method __init__ (line 5) | def __init__(self, ast):
method extract_features (line 8) | def extract_features(self):
method find_function_nodes (line 54) | def find_function_nodes(self, node):
method find_modifier_nodes (line 62) | def find_modifier_nodes(self, node):
method get_function_name (line 70) | def get_function_name(self, node):
method contains_command (line 73) | def contains_command(self, node, command):
method contains_call (line 90) | def contains_call(self, node):
method is_function_payable (line 93) | def is_function_payable(self, node):
method has_isowner_modifier (line 96) | def has_isowner_modifier(self, node):
method contains_assert (line 103) | def contains_assert(self, node):
method contains_selfdestruct (line 106) | def contains_selfdestruct(self, node):
method contains_delegatecall (line 109) | def contains_delegatecall(self, node):
method contains_callcode (line 112) | def contains_callcode(self, node):
method contains_staticcall (line 115) | def contains_staticcall(self, node):
method contains_require (line 118) | def contains_require(self, node):
method extract_nodes (line 121) | def extract_nodes(self, node, command, parent=None):
method find_all_variables (line 135) | def find_all_variables(self, node):
method find_variables_in_require (line 153) | def find_variables_in_require(self, node):
method find_variables_in_if (line 163) | def find_variables_in_if(self, node):
method extract_address_variable (line 208) | def extract_address_variable(self, node):
FILE: mythril/solidity/soliditycontract.py
class SolcAST (line 16) | class SolcAST:
method __init__ (line 17) | def __init__(self, ast):
method node_type (line 21) | def node_type(self):
method abs_path (line 29) | def abs_path(self):
method nodes (line 36) | def nodes(self):
method __next__ (line 43) | def __next__(self):
method __getitem__ (line 46) | def __getitem__(self, item):
class SolcSource (line 50) | class SolcSource:
method __init__ (line 51) | def __init__(self, source):
method ast (line 55) | def ast(self):
method id (line 63) | def id(self):
method name (line 67) | def name(self):
method contents (line 71) | def contents(self):
class SourceMapping (line 75) | class SourceMapping:
method __init__ (line 76) | def __init__(self, solidity_file_idx, offset, length, lineno, mapping):
class SolidityFile (line 86) | class SolidityFile:
method __init__ (line 89) | def __init__(self, filename: str, data: str, full_contract_src_maps: S...
class SourceCodeInfo (line 101) | class SourceCodeInfo:
method __init__ (line 102) | def __init__(self, filename, lineno, code, mapping):
function get_contracts_from_file (line 111) | def get_contracts_from_file(input_file, solc_settings_json=None, solc_bi...
function get_contracts_from_foundry (line 141) | def get_contracts_from_foundry(input_file, foundry_json):
class SolidityContract (line 169) | class SolidityContract(EVMContract):
method __init__ (line 172) | def __init__(
method get_sources (line 242) | def get_sources(indices_data: Dict, source_data: Dict) -> None:
method get_solc_indices (line 259) | def get_solc_indices(input_file: str, data: Dict) -> Dict:
method get_full_contract_src_maps (line 290) | def get_full_contract_src_maps(ast: SolcAST) -> Set[str]:
method get_source_info (line 307) | def get_source_info(self, address, constructor=False):
method _is_autogenerated_code (line 341) | def _is_autogenerated_code(self, offset: int, length: int, file_index:...
method _get_solc_mappings (line 361) | def _get_solc_mappings(self, srcmap, constructor=False):
FILE: mythril/support/loader.py
class DynLoader (line 17) | class DynLoader:
method __init__ (line 20) | def __init__(self, eth: Optional[EthJsonRpc], active=True):
method read_storage (line 30) | def read_storage(self, contract_address: str, index: int) -> str:
method read_balance (line 50) | def read_balance(self, address: str) -> str:
method dynld (line 66) | def dynld(self, dependency_address: str) -> Optional[Disassembly]:
FILE: mythril/support/lock.py
class LockFileException (line 10) | class LockFileException(Exception):
class LockFile (line 14) | class LockFile(object):
method __init__ (line 19) | def __init__(self, file_name, timeout=100, delay=0.05):
method acquire (line 31) | def acquire(self):
method release (line 50) | def release(self):
method __enter__ (line 59) | def __enter__(self):
method __exit__ (line 67) | def __exit__(self, type, value, traceback):
method __del__ (line 74) | def __del__(self):
FILE: mythril/support/model.py
function solver_worker (line 23) | def solver_worker(
function get_model (line 64) | def get_model(
FILE: mythril/support/signatures.py
function synchronized (line 18) | def synchronized(sync_lock):
class Singleton (line 44) | class Singleton(type):
method __call__ (line 50) | def __call__(cls, *args, **kwargs):
class SQLiteDB (line 66) | class SQLiteDB(object):
method __init__ (line 72) | def __init__(self, path):
method __enter__ (line 81) | def __enter__(self):
method __exit__ (line 93) | def __exit__(self, exc_class, exc, traceback):
method __repr__ (line 103) | def __repr__(self):
class SignatureDB (line 107) | class SignatureDB(object, metaclass=Singleton):
method __init__ (line 110) | def __init__(self, path: str = None) -> None:
method __getitem__ (line 135) | def __getitem__(self, item: str) -> List[str]:
method _normalize_byte_sig (line 144) | def _normalize_byte_sig(byte_sig: str) -> str:
method add (line 158) | def add(self, byte_sig: str, text_sig: str) -> None:
method get (line 173) | def get(self, byte_sig: str, online_timeout: int = 2) -> List[str]:
method import_solidity_file (line 199) | def import_solidity_file(
method add_sigs (line 212) | def add_sigs(self, file_path: str, solc_json):
method __repr__ (line 224) | def __repr__(self):
FILE: mythril/support/source_support.py
class Source (line 5) | class Source:
method __init__ (line 8) | def __init__(self, source_type=None, source_format=None, source_list=N...
method get_source_from_contracts_list (line 20) | def get_source_from_contracts_list(self, contracts):
method get_source_index (line 54) | def get_source_index(self, bytecode_hash: str) -> int:
FILE: mythril/support/start_time.py
class StartTime (line 6) | class StartTime(metaclass=Singleton):
method __init__ (line 9) | def __init__(self):
FILE: mythril/support/support_args.py
class Args (line 6) | class Args(object, metaclass=Singleton):
method __init__ (line 12) | def __init__(self):
FILE: mythril/support/support_utils.py
class Singleton (line 15) | class Singleton(type):
method __call__ (line 20) | def __call__(cls, *args, **kwargs):
class LRUCache (line 35) | class LRUCache:
method __init__ (line 36) | def __init__(self, size):
method get (line 40) | def get(self, key):
method put (line 48) | def put(self, key, value):
class ModelCache (line 57) | class ModelCache:
method __init__ (line 58) | def __init__(self):
method check_quick_sat (line 62) | def check_quick_sat(self, constraints) -> bool:
method put (line 70) | def put(self, key, value):
function get_code_hash (line 75) | def get_code_hash(code) -> str:
function sha3 (line 93) | def sha3(value):
function zpad (line 104) | def zpad(x, l):
function rzpad (line 111) | def rzpad(value, total_length):
FILE: setup.py
function get_requirements (line 29) | def get_requirements():
class VerifyVersionCommand (line 86) | class VerifyVersionCommand(_install):
method run (line 91) | def run(self):
FILE: tests/__init__.py
class BaseTestCase (line 19) | class BaseTestCase(TestCase):
method setUp (line 20) | def setUp(self):
method compare_files_error_message (line 24) | def compare_files_error_message(self):
method found_changed_files (line 38) | def found_changed_files(self, input_file, output_expected, output_curr...
method assert_and_show_changed_files (line 47) | def assert_and_show_changed_files(self):
FILE: tests/analysis/abi_decode_test.py
function test_abi_decode (line 29) | def test_abi_decode(call_data, signature, expected):
FILE: tests/analysis/arbitrary_jump_test.py
function get_global_state (line 21) | def get_global_state(constraints):
function test_unique_jumpdest (line 74) | def test_unique_jumpdest(global_state, unique):
function test_module (line 92) | def test_module(global_state, has_issue):
FILE: tests/cli_tests/cli_opts_test.py
function test_version_opt (line 9) | def test_version_opt(capsys):
FILE: tests/cmd_line_test.py
function output_of (line 8) | def output_of(command):
function total_output (line 20) | def total_output(command):
class CommandLineToolTestCase (line 27) | class CommandLineToolTestCase(BaseTestCase):
method test_disassemble_code_correctly (line 28) | def test_disassemble_code_correctly(self):
method test_disassemble_solidity_file_correctly (line 32) | def test_disassemble_solidity_file_correctly(self):
method test_hash_a_function_correctly (line 37) | def test_hash_a_function_correctly(self):
method test_failure_json (line 41) | def test_failure_json(self):
method test_failure_text (line 46) | def test_failure_text(self):
method test_failure_jsonv2 (line 50) | def test_failure_jsonv2(self):
method test_analyze (line 54) | def test_analyze(self):
method test_analyze_bytecode (line 59) | def test_analyze_bytecode(self):
method test_invalid_args_iprof (line 64) | def test_invalid_args_iprof(self):
method test_only_epic (line 71) | def test_only_epic(self):
FILE: tests/concolic/concolic_tests.py
function output_of (line 24) | def output_of(command):
function validate_simple_example (line 34) | def validate_simple_example(output, branches):
function validate_multiple_example (line 45) | def validate_multiple_example(output, branches):
function validate_two_contract (line 70) | def validate_two_contract(output, branches):
function validate_multi_contract (line 102) | def validate_multi_contract(output, branches):
function test_concolic_conditions (line 144) | def test_concolic_conditions(input_file, validate_function, branches):
function test_concolic_error (line 154) | def test_concolic_error(input_file, branch):
function get_pc_from_disassembler (line 167) | def get_pc_from_disassembler(concrete_data, branches):
function run_concolic (line 205) | def run_concolic(input_path, output, branches):
function test_validate_concolic_output (line 226) | def test_validate_concolic_output(input_file, branches):
FILE: tests/disassembler/asm_test.py
function test_get_opcode (line 14) | def test_get_opcode(operation_name: str, hex_value: int):
function test_get_unknown_opcode (line 21) | def test_get_unknown_opcode():
function test_is_sequence_match (line 83) | def test_is_sequence_match(pattern, instruction_list, index, expected_re...
function test_find_op_code_sequence (line 115) | def test_find_op_code_sequence(pattern, instruction_list, expected_result):
function test_disassemble (line 123) | def test_disassemble():
FILE: tests/disassembler/disassembly_test.py
function test_get_function_info (line 11) | def test_get_function_info(mocker):
function test_get_function_info_multiple_names (line 30) | def test_get_function_info_multiple_names(mocker):
function test_get_function_info_no_names (line 50) | def test_get_function_info_no_names(mocker):
FILE: tests/disassembler_test.py
class DisassemblerTestCase (line 12) | class DisassemblerTestCase(BaseTestCase):
method test_instruction_list (line 13) | def test_instruction_list(self):
method test_easm_from_solidity_files (line 18) | def test_easm_from_solidity_files(self):
FILE: tests/evmcontract_test.py
class EVMContractTestCase (line 5) | class EVMContractTestCase(BaseTestCase):
method setUp (line 6) | def setUp(self):
class Getinstruction_listTestCase (line 13) | class Getinstruction_listTestCase(EVMContractTestCase):
method runTest (line 14) | def runTest(self):
class GetEASMTestCase (line 27) | class GetEASMTestCase(EVMContractTestCase):
method runTest (line 28) | def runTest(self):
class MatchesExpressionTestCase (line 40) | class MatchesExpressionTestCase(EVMContractTestCase):
method runTest (line 41) | def runTest(self):
FILE: tests/features_test.py
function test_features (line 123) | def test_features(file_name, num_funcs, func_name, field, expected_value...
FILE: tests/graph_test.py
function test_generate_graph (line 13) | def test_generate_graph():
FILE: tests/instructions/basefee_test.py
function test_basefee (line 11) | def test_basefee():
FILE: tests/instructions/codecopy_test.py
function test_codecopy_concrete (line 10) | def test_codecopy_concrete():
FILE: tests/instructions/create2_test.py
function generate_salted_address (line 22) | def generate_salted_address(code_str, salt, caller):
function test_create2 (line 35) | def test_create2():
FILE: tests/instructions/create_test.py
function test_create (line 20) | def test_create():
FILE: tests/instructions/extcodecopy_test.py
function test_extcodecopy (line 11) | def test_extcodecopy():
function test_extcodecopy_fail (line 36) | def test_extcodecopy_fail():
FILE: tests/instructions/extcodehash_test.py
function test_extcodehash_no_account (line 25) | def test_extcodehash_no_account():
function test_extcodehash_no_code (line 32) | def test_extcodehash_no_code():
function test_extcodehash_return_hash (line 39) | def test_extcodehash_return_hash():
FILE: tests/instructions/push_test.py
function get_state (line 13) | def get_state(input):
function test_push0 (line 38) | def test_push0(inputs, output):
FILE: tests/instructions/sar_test.py
function get_state (line 13) | def get_state():
function test_sar (line 38) | def test_sar(inputs, output):
function test_concrete_sar (line 138) | def test_concrete_sar(val1, val2, expected):
FILE: tests/instructions/shl_test.py
function get_state (line 13) | def get_state():
function test_shl (line 38) | def test_shl(inputs, output):
function test_concrete_shl (line 113) | def test_concrete_shl(val1, val2, expected):
FILE: tests/instructions/shr_test.py
function get_state (line 13) | def get_state():
function test_shr (line 41) | def test_shr(inputs, output):
function test_concrete_shr (line 116) | def test_concrete_shr(val1, val2, expected):
FILE: tests/instructions/static_call_test.py
function get_global_state (line 19) | def get_global_state():
function test_staticcall (line 45) | def test_staticcall(f1):
function test_staticness (line 72) | def test_staticness(input):
function test_staticness_call_concrete (line 89) | def test_staticness_call_concrete(f1, input, success):
function test_staticness_call_symbolic (line 109) | def test_staticness_call_symbolic(f1):
FILE: tests/integration_tests/analysis_tests.py
function test_analysis (line 58) | def test_analysis(file_name, tx_data, calldata):
function test_analysis_pending (line 72) | def test_analysis_pending(file_name, tx_data, calldata):
function test_analysis_code (line 95) | def test_analysis_code(swc, file_path, exists):
FILE: tests/integration_tests/coverage_metrics_test.py
function test_basic_coverage (line 15) | def test_basic_coverage(code, exists):
FILE: tests/integration_tests/old_version_test.py
function test_analysis_old (line 16) | def test_analysis_old(file_name, issues):
FILE: tests/integration_tests/safe_functions_test.py
function test_analysis (line 33) | def test_analysis(file_name, safe_funcs, version):
function test_bytecode_analysis (line 43) | def test_bytecode_analysis(file_name, safe_funcs):
FILE: tests/integration_tests/solc_settings_test.py
function test_positive_solc_settings (line 8) | def test_positive_solc_settings():
function test_positive_solc_args (line 18) | def test_positive_solc_args():
function test_neg_optimizer_solc_settings (line 28) | def test_neg_optimizer_solc_settings():
function test_negative_solc_settings (line 38) | def test_negative_solc_settings():
FILE: tests/integration_tests/src_mapping_test.py
function test_positive_solc_settings (line 10) | def test_positive_solc_settings():
FILE: tests/integration_tests/state_merge_tests.py
function output_with_stderr (line 11) | def output_with_stderr(command):
function test_merge (line 29) | def test_merge(swc, code, states_reduction):
FILE: tests/integration_tests/summary_test.py
function test_analysis (line 97) | def test_analysis(file_name, tx_data):
FILE: tests/integration_tests/transient_storage_test.py
function test_positive_solc_settings (line 17) | def test_positive_solc_settings(file_name, expected_has_bug):
FILE: tests/integration_tests/utils.py
function output_of (line 4) | def output_of(command, stderr=None):
FILE: tests/integration_tests/version_test.py
function test_analysis (line 23) | def test_analysis(file_name, version, has_overflow):
FILE: tests/laser/Precompiles/blake2_test.py
function test_blake2 (line 42) | def test_blake2(input_hex, expected_result):
FILE: tests/laser/Precompiles/ec_add_test.py
function test_ec_add_sanity (line 18) | def test_ec_add_sanity():
function test_ec_add (line 25) | def test_ec_add(f1, f2, f3):
FILE: tests/laser/Precompiles/ecrecover_test.py
function test_ecrecover (line 58) | def test_ecrecover(input_list, expected_result):
function test_ecrecover_symbol (line 62) | def test_ecrecover_symbol():
FILE: tests/laser/Precompiles/elliptic_curves_test.py
function test_ec_pair_192_check (line 8) | def test_ec_pair_192_check():
function test_ec_pair (line 17) | def test_ec_pair(f1, f2, f3, f4):
function test_ec_pair_point_validation_failure (line 26) | def test_ec_pair_point_validation_failure(f1):
function test_ec_pair_field_exceed_mod (line 32) | def test_ec_pair_field_exceed_mod(f1):
FILE: tests/laser/Precompiles/elliptic_mul_test.py
function test_ec_mul (line 21) | def test_ec_mul(f1, f2, f3):
function test_ec_mul_validation_failure (line 28) | def test_ec_mul_validation_failure():
FILE: tests/laser/Precompiles/identity_test.py
function test_identity (line 9) | def test_identity(input_list, expected_result):
FILE: tests/laser/Precompiles/mod_exp_test.py
function test_modexp_result (line 58) | def test_modexp_result(data, expected):
FILE: tests/laser/Precompiles/ripemd_test.py
function test_ripemd160 (line 86) | def test_ripemd160(input_list, expected_result):
function test_ripemd160_symbol (line 90) | def test_ripemd160_symbol():
FILE: tests/laser/Precompiles/sha256_test.py
function test_sha256 (line 86) | def test_sha256(input_list, expected_result):
function test_sha_symbol (line 90) | def test_sha_symbol():
FILE: tests/laser/evm_testsuite/evm_test.py
function load_test_data (line 62) | def load_test_data(designations):
function test_vmtest (line 107) | def test_vmtest(
FILE: tests/laser/keccak_tests.py
function test_keccak_basic (line 31) | def test_keccak_basic(input1, input2, expected):
function test_keccak_symbol_and_val (line 42) | def test_keccak_symbol_and_val():
function test_keccak_complex_eq (line 60) | def test_keccak_complex_eq():
function test_keccak_complex_eq2 (line 85) | def test_keccak_complex_eq2():
function test_keccak_simple_number (line 111) | def test_keccak_simple_number():
function test_keccak_other_num (line 128) | def test_keccak_other_num():
FILE: tests/laser/smt/independece_solver_test.py
function test_get_expr_variables (line 12) | def test_get_expr_variables():
function test_get_expr_variables_num (line 30) | def test_get_expr_variables_num():
function test_create_bucket (line 42) | def test_create_bucket():
function test_dependence_map (line 54) | def test_dependence_map():
function test_Independence_solver_unsat (line 88) | def test_Independence_solver_unsat():
function test_independence_solver_unsat_in_second_bucket (line 108) | def test_independence_solver_unsat_in_second_bucket():
function test_independence_solver_sat (line 128) | def test_independence_solver_sat():
FILE: tests/laser/smt/model_test.py
function test_decls (line 6) | def test_decls():
function test_get_item (line 24) | def test_get_item():
function test_as_long (line 42) | def test_as_long():
FILE: tests/laser/state/calldata_test.py
function test_concrete_calldata_uninitialized_index (line 14) | def test_concrete_calldata_uninitialized_index(starting_calldata):
function test_concrete_calldata_calldatasize (line 27) | def test_concrete_calldata_calldatasize():
function test_concrete_calldata_constrain_index (line 41) | def test_concrete_calldata_constrain_index():
function test_symbolic_calldata_constrain_index (line 57) | def test_symbolic_calldata_constrain_index():
function test_symbolic_calldata_equal_indices (line 75) | def test_symbolic_calldata_equal_indices():
FILE: tests/laser/state/mstack_test.py
class MachineStackTest (line 11) | class MachineStackTest(BaseTestCase):
method test_mstack_constructor (line 13) | def test_mstack_constructor():
method test_mstack_append_single_element (line 18) | def test_mstack_append_single_element():
method test_mstack_append_multiple_elements (line 26) | def test_mstack_append_multiple_elements():
method test_mstack_pop (line 36) | def test_mstack_pop():
method test_mstack_no_support_add (line 45) | def test_mstack_no_support_add():
method test_mstack_no_support_iadd (line 52) | def test_mstack_no_support_iadd():
FILE: tests/laser/state/mstate_test.py
function test_memory_extension (line 15) | def test_memory_extension(initial_size, start, extension_size):
function test_stack_pop_too_many (line 35) | def test_stack_pop_too_many(initial_size, overflow):
function test_stack_multiple_pop (line 52) | def test_stack_multiple_pop(initial_stack, amount, expected):
function test_stack_multiple_pop_ (line 66) | def test_stack_multiple_pop_():
function test_stack_single_pop (line 79) | def test_stack_single_pop():
function test_memory_zeroed (line 91) | def test_memory_zeroed():
function test_memory_write (line 106) | def test_memory_write():
function test_memory_symbolic (line 129) | def test_memory_symbolic():
FILE: tests/laser/state/storage_test.py
function test_concrete_storage_uninitialized_index (line 13) | def test_concrete_storage_uninitialized_index(initial_storage, key):
function test_symbolic_storage_uninitialized_index (line 28) | def test_symbolic_storage_uninitialized_index(initial_storage, key):
function test_storage_set_item (line 41) | def test_storage_set_item():
function test_storage_change_item (line 52) | def test_storage_change_item():
FILE: tests/laser/strategy/beam_test.py
function test_priority_sum (line 47) | def test_priority_sum(state, priority):
function test_elimination (line 101) | def test_elimination(states, width):
FILE: tests/laser/strategy/loop_bound_test.py
function test_loop_count (line 20) | def test_loop_count(trace, count):
FILE: tests/laser/transaction/create_transaction_test.py
function test_create (line 16) | def test_create():
function test_sym_exec (line 39) | def test_sym_exec():
FILE: tests/laser/transaction/symbolic_test.py
function _is_message_call (line 18) | def _is_message_call(_, transaction, transaction_sequences):
function _is_contract_creation (line 22) | def _is_contract_creation(_, transaction):
function test_execute_message_call (line 29) | def test_execute_message_call(mocked_setup: MagicMock):
function test_execute_contract_creation (line 56) | def test_execute_contract_creation(mocked_setup: MagicMock):
FILE: tests/laser/transaction_test.py
function test_intercontract_call (line 8) | def test_intercontract_call():
FILE: tests/laser/tx_prioritisation_test.py
function mock_predict_proba (line 9) | def mock_predict_proba(X):
class MockSolidityContract (line 18) | class MockSolidityContract:
method __init__ (line 19) | def __init__(self, features):
function rftp_instance (line 24) | def rftp_instance():
function test_preprocess_features (line 39) | def test_preprocess_features(rftp_instance):
function test_next_method (line 55) | def test_next_method(rftp_instance, address, previous_predictions, expec...
FILE: tests/mythril/mythril_analyzer_test.py
function test_fire_lasers (line 15) | def test_fire_lasers(mock_sym, mock_fire_lasers, mock_code_info):
FILE: tests/mythril/mythril_config_test.py
function test_config_path_dynloading (line 10) | def test_config_path_dynloading():
function test_set_rpc (line 33) | def test_set_rpc(rpc_type, host, port, success):
function test_dynld_config_addition (line 43) | def test_dynld_config_addition():
FILE: tests/mythril/mythril_disassembler_test.py
function test_solc_install (line 68) | def test_solc_install():
FILE: tests/plugin/interface_test.py
function test_construct_cli_plugin (line 4) | def test_construct_cli_plugin():
function test_construct_mythril_plugin (line 8) | def test_construct_mythril_plugin():
FILE: tests/plugin/loader_test.py
function test_typecheck_load (line 7) | def test_typecheck_load():
function test_unsupported_plugin_type (line 16) | def test_unsupported_plugin_type():
FILE: tests/rpc_test.py
class RpcTest (line 5) | class RpcTest(BaseTestCase):
method setUp (line 8) | def setUp(self):
method tearDown (line 12) | def tearDown(self):
method test_eth_blockNumber (line 16) | def test_eth_blockNumber(self):
method test_eth_getBalance (line 22) | def test_eth_getBalance(self):
method test_eth_getStorageAt (line 30) | def test_eth_getStorageAt(self):
method test_eth_getBlockByNumber (line 39) | def test_eth_getBlockByNumber(self):
method test_eth_getCode (line 47) | def test_eth_getCode(self):
method test_eth_getTransactionReceipt (line 54) | def test_eth_getTransactionReceipt(self):
FILE: tests/solidity_contract_test.py
class SolidityContractTest (line 11) | class SolidityContractTest(BaseTestCase):
method test_get_source_info_without_name_gets_latest_contract_info (line 12) | def test_get_source_info_without_name_gets_latest_contract_info(self):
method test_get_source_info_with_contract_name_specified (line 21) | def test_get_source_info_with_contract_name_specified(self):
method test_get_source_info_with_contract_name_specified_constructor (line 33) | def test_get_source_info_with_contract_name_specified_constructor(self):
FILE: tests/statespace_test.py
function test_statespace_dump (line 9) | def test_statespace_dump():
FILE: tests/util_tests.py
function test_sar (line 92) | def test_sar(input_, output):
Condensed preview — 989 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,570K chars).
[
{
"path": ".circleci/config.yml",
"chars": 6922,
"preview": "defaults:\n &defaults\n docker:\n # TODO: Try to replace this with `mythril/mythx-ci` image. That image is\n # used "
},
{
"path": ".dockerignore",
"chars": 40,
"preview": "/.*\n/build\n/docker-bake.hcl\n/Dockerfile\n"
},
{
"path": ".drone.yml",
"chars": 1490,
"preview": "kind: pipeline\nname: default\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n- name: edelweiss_swc\n image: mythx.azure"
},
{
"path": ".editorconfig",
"chars": 164,
"preview": "root = true\n\n[*]\nend_of_line = lf\ninsert_final_newline = true\n\n[*.py]\nindent_style = space\nindent_size = 4\ncharset = utf"
},
{
"path": ".gitattributes",
"chars": 120,
"preview": "tests/testdata/* linguist-detectable=false\nstatic/* linguist-documentation\n\n# Solidity\n*.sol linguist-language=Solidity\n"
},
{
"path": ".github/ISSUE_TEMPLATE/analysis-module.md",
"chars": 807,
"preview": "---\nname: Analysis module\nabout: Create an analysis module feature request\n\n---\n\n<!-- Please remove any of the optional "
},
{
"path": ".github/ISSUE_TEMPLATE/bug-report.md",
"chars": 1478,
"preview": "---\nname: Bug report\nabout: Tell us about Mythril bugs to help us improve\n\n---\n\n<!-- Note: did you notice that there is "
},
{
"path": ".github/ISSUE_TEMPLATE/feature-request.md",
"chars": 590,
"preview": "---\r\nname: Feature Request\r\nabout: Tell us about a new feature that would make Mythril better\r\n\r\n---\r\n\r\n## Description\r\n"
},
{
"path": ".github/dependabot.yml",
"chars": 292,
"preview": "version: 2\nupdates:\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"we"
},
{
"path": ".github/workflows/container.yml",
"chars": 983,
"preview": "on:\n pull_request:\n paths:\n - .github/workflows/container.yml\n - Dockerfile\n - docker_build_and_deplo"
},
{
"path": ".github/workflows/pre-commit-hooks-test.yml",
"chars": 655,
"preview": "name: pre-commit\n\non:\n push:\n branches:\n - master\n - develop\n tags:\n - '*'\n pull_request:\n pat"
},
{
"path": ".github/workflows/pre-commit.yml",
"chars": 793,
"preview": "on:\n push:\n branches:\n - master\n - develop\n tags:\n - '*'\n pull_request:\n\nname: pre-commit\n\nconcur"
},
{
"path": ".gitignore",
"chars": 2481,
"preview": "\n# Created by https://www.gitignore.io/api/linux,macos,python,windows\n\n### Linux ###\n*~\n\n# temporary files which can be "
},
{
"path": ".pre-commit-config.yaml",
"chars": 1386,
"preview": "# See https://pre-commit.com for more information\n# See https://pre-commit.com/hooks.html for more hooks\n# Apply to all "
},
{
"path": ".pre-commit-hooks.yaml",
"chars": 156,
"preview": "- id: mythril\n name: Mythril\n description: Analyze EVM bytecode with Mythril\n entry: myth\n args:\n - analyze\n lan"
},
{
"path": "CONTRIBUTING.md",
"chars": 1457,
"preview": "# Contributing to Mythril\nHi, if you are reading this that means that you probably want to contribute to Mythril, awesom"
},
{
"path": "Dockerfile",
"chars": 3246,
"preview": "# syntax=docker/dockerfile:1\nARG PYTHON_VERSION=3.10\nARG INSTALLED_SOLC_VERSIONS\n\n\nFROM python:${PYTHON_VERSION} AS myth"
},
{
"path": "LICENSE",
"chars": 1090,
"preview": "The MIT License (MIT)\n\nCopyright (c) since 2017 Bernhard Mueller\n\nPermission is hereby granted, free of charge, to any p"
},
{
"path": "MANIFEST.in",
"chars": 94,
"preview": "include mythril/support/assets/*\ninclude mythril/analysis/templates/*\ninclude requirements.txt"
},
{
"path": "README.md",
"chars": 4674,
"preview": "# Mythril\n\n<p align=\"center\">\n\t<img src=\"/static/mythril_new.png\" height=\"320px\"/>\n</p>\n\n[\nassert sy"
},
{
"path": "coverage_report.sh",
"chars": 484,
"preview": "#!/bin/sh\n\npython --version\necho \"Please make sure you are using python 3.6.x\"\n\nrm -rf ./tests/testdata/outputs_current/"
},
{
"path": "docker/docker-entrypoint.sh",
"chars": 694,
"preview": "#!/usr/bin/env bash\nset -euo pipefail\n\n# Install extra solc versions if SOLC is set\nif [[ ${SOLC:-} != \"\" ]]; then\n r"
},
{
"path": "docker/sync-svm-solc-versions-with-solcx.sh",
"chars": 595,
"preview": "#!/usr/bin/env bash\nset -euo pipefail\n\n# Let solcx know about the solc versions installed by svm.\n# We do this by symlin"
},
{
"path": "docker-bake.hcl",
"chars": 878,
"preview": "variable \"REGISTRY\" {\n default = \"docker.io\"\n}\n\nvariable \"VERSION\" {\n default = \"dev\"\n}\n\nvariable \"PYTHON_VERSION\" {\n "
},
{
"path": "docker_build_and_deploy.sh",
"chars": 818,
"preview": "#!/bin/bash\n\nset -eo pipefail\n\nNAME=$1\n\nif [[ ! $NAME =~ ^mythril/myth(-dev)?$ ]]; then\n echo \"Error: unknown image n"
},
{
"path": "docs/Makefile",
"chars": 584,
"preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHI"
},
{
"path": "docs/make.bat",
"chars": 791,
"preview": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sp"
},
{
"path": "docs/source/about.rst",
"chars": 655,
"preview": "What is Mythril?\n========================\n\nMythril is a security analysis tool for Ethereum smart contracts. It was `int"
},
{
"path": "docs/source/analysis-modules.rst",
"chars": 292,
"preview": "Analysis Modules\n================\n\nMythril's detection capabilities are written in modules in the `/analysis/module/modu"
},
{
"path": "docs/source/conf.py",
"chars": 5451,
"preview": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a s"
},
{
"path": "docs/source/create-module.rst",
"chars": 339,
"preview": "Creating a Module\n=================\n\nCreate a module in the :code:`analysis/modules` directory, and create an instance o"
},
{
"path": "docs/source/index.rst",
"chars": 326,
"preview": "Welcome to Mythril's documentation!\n===========================================\n\n.. toctree::\n :maxdepth: 1\n :captio"
},
{
"path": "docs/source/installation.rst",
"chars": 1505,
"preview": "Installation and Setup\n======================\n\nMythril can be setup using different methods.\n\n**************\nPyPI on Mac"
},
{
"path": "docs/source/module-list.rst",
"chars": 5489,
"preview": "Modules\n=======\n\n***********************************\nDelegate Call To Untrusted Contract\n*******************************"
},
{
"path": "docs/source/modules.rst",
"chars": 58,
"preview": "mythril\n=======\n\n.. toctree::\n :maxdepth: 4\n\n mythril\n"
},
{
"path": "docs/source/mythril.analysis.module.modules.rst",
"chars": 3495,
"preview": "mythril.analysis.module.modules package\n=======================================\n\nSubmodules\n----------\n\nmythril.analysis"
},
{
"path": "docs/source/mythril.analysis.module.rst",
"chars": 1036,
"preview": "mythril.analysis.module package\n===============================\n\nSubpackages\n-----------\n\n.. toctree::\n :maxdepth: 4\n\n"
},
{
"path": "docs/source/mythril.analysis.rst",
"chars": 2318,
"preview": "mythril.analysis package\n========================\n\nSubpackages\n-----------\n\n.. toctree::\n :maxdepth: 4\n\n mythril.ana"
},
{
"path": "docs/source/mythril.concolic.rst",
"chars": 743,
"preview": "mythril.concolic package\n========================\n\nSubmodules\n----------\n\nmythril.concolic.concolic\\_execution module\n--"
},
{
"path": "docs/source/mythril.disassembler.rst",
"chars": 552,
"preview": "mythril.disassembler package\n============================\n\nSubmodules\n----------\n\nmythril.disassembler.asm module\n------"
},
{
"path": "docs/source/mythril.ethereum.interface.rpc.rst",
"chars": 1271,
"preview": "mythril.ethereum.interface.rpc package\n======================================\n\nSubmodules\n----------\n\nmythril.ethereum.i"
},
{
"path": "docs/source/mythril.ethereum.interface.rst",
"chars": 291,
"preview": "mythril.ethereum.interface package\n==================================\n\nSubpackages\n-----------\n\n.. toctree::\n :maxdept"
},
{
"path": "docs/source/mythril.ethereum.rst",
"chars": 605,
"preview": "mythril.ethereum package\n========================\n\nSubpackages\n-----------\n\n.. toctree::\n :maxdepth: 4\n\n mythril.eth"
},
{
"path": "docs/source/mythril.interfaces.rst",
"chars": 513,
"preview": "mythril.interfaces package\n==========================\n\nSubmodules\n----------\n\nmythril.interfaces.cli module\n------------"
},
{
"path": "docs/source/mythril.laser.ethereum.function_managers.rst",
"chars": 848,
"preview": "mythril.laser.ethereum.function\\_managers package\n=================================================\n\nSubmodules\n--------"
},
{
"path": "docs/source/mythril.laser.ethereum.rst",
"chars": 2070,
"preview": "mythril.laser.ethereum package\n==============================\n\nSubpackages\n-----------\n\n.. toctree::\n :maxdepth: 4\n\n "
},
{
"path": "docs/source/mythril.laser.ethereum.state.rst",
"chars": 2298,
"preview": "mythril.laser.ethereum.state package\n====================================\n\nSubmodules\n----------\n\nmythril.laser.ethereum"
},
{
"path": "docs/source/mythril.laser.ethereum.strategy.extensions.rst",
"chars": 531,
"preview": "mythril.laser.ethereum.strategy.extensions package\n==================================================\n\nSubmodules\n------"
},
{
"path": "docs/source/mythril.laser.ethereum.strategy.rst",
"chars": 947,
"preview": "mythril.laser.ethereum.strategy package\n=======================================\n\nSubpackages\n-----------\n\n.. toctree::\n "
},
{
"path": "docs/source/mythril.laser.ethereum.transaction.rst",
"chars": 934,
"preview": "mythril.laser.ethereum.transaction package\n==========================================\n\nSubmodules\n----------\n\nmythril.la"
},
{
"path": "docs/source/mythril.laser.plugin.plugins.coverage.rst",
"chars": 763,
"preview": "mythril.laser.plugin.plugins.coverage package\n=============================================\n\nSubmodules\n----------\n\nmyth"
},
{
"path": "docs/source/mythril.laser.plugin.plugins.rst",
"chars": 1733,
"preview": "mythril.laser.plugin.plugins package\n====================================\n\nSubpackages\n-----------\n\n.. toctree::\n :max"
},
{
"path": "docs/source/mythril.laser.plugin.plugins.summary_backup.rst",
"chars": 254,
"preview": "mythril.laser.plugin.plugins.summary\\_backup package\n====================================================\n\nModule conten"
},
{
"path": "docs/source/mythril.laser.plugin.rst",
"chars": 989,
"preview": "mythril.laser.plugin package\n============================\n\nSubpackages\n-----------\n\n.. toctree::\n :maxdepth: 4\n\n myt"
},
{
"path": "docs/source/mythril.laser.rst",
"chars": 487,
"preview": "mythril.laser package\n=====================\n\nSubpackages\n-----------\n\n.. toctree::\n :maxdepth: 4\n\n mythril.laser.eth"
},
{
"path": "docs/source/mythril.laser.smt.rst",
"chars": 1437,
"preview": "mythril.laser.smt package\n=========================\n\nSubpackages\n-----------\n\n.. toctree::\n :maxdepth: 4\n\n mythril.l"
},
{
"path": "docs/source/mythril.laser.smt.solver.rst",
"chars": 840,
"preview": "mythril.laser.smt.solver package\n================================\n\nSubmodules\n----------\n\nmythril.laser.smt.solver.indep"
},
{
"path": "docs/source/mythril.mythril.rst",
"chars": 758,
"preview": "mythril.mythril package\n=======================\n\nSubmodules\n----------\n\nmythril.mythril.mythril\\_analyzer module\n-------"
},
{
"path": "docs/source/mythril.plugin.rst",
"chars": 662,
"preview": "mythril.plugin package\n======================\n\nSubmodules\n----------\n\nmythril.plugin.discovery module\n------------------"
},
{
"path": "docs/source/mythril.rst",
"chars": 565,
"preview": "mythril package\n===============\n\nSubpackages\n-----------\n\n.. toctree::\n :maxdepth: 4\n\n mythril.analysis\n mythril.c"
},
{
"path": "docs/source/mythril.solidity.rst",
"chars": 382,
"preview": "mythril.solidity package\n========================\n\nSubmodules\n----------\n\nmythril.solidity.soliditycontract module\n-----"
},
{
"path": "docs/source/mythril.support.rst",
"chars": 1675,
"preview": "mythril.support package\n=======================\n\nSubmodules\n----------\n\nmythril.support.loader module\n------------------"
},
{
"path": "docs/source/security-analysis.rst",
"chars": 4713,
"preview": "Security Analysis\n=================\n\nRunning :code:`myth analyze` with one of the input options described below will run"
},
{
"path": "docs/source/tutorial.rst",
"chars": 38849,
"preview": "Tutorial\n======================\n\n******************************************\nIntroduction\n*******************************"
},
{
"path": "mypy-stubs/z3/__init__.pyi",
"chars": 9954,
"preview": "from typing import (\n Any,\n Iterable,\n Iterator,\n List,\n Optional,\n Sequence,\n Tuple,\n TypeVar,\n"
},
{
"path": "mypy-stubs/z3/z3core.pyi",
"chars": 155,
"preview": "from .z3types import Ast, ContextObj\n\ndef Z3_mk_eq(ctx: ContextObj, a: Ast, b: Ast) -> Ast: ...\ndef Z3_mk_div(ctx: Conte"
},
{
"path": "mypy-stubs/z3/z3types.pyi",
"chars": 167,
"preview": "from typing import Any\n\nclass Z3Exception(Exception):\n def __init__(self, a: Any) -> None:\n self.value = a\n "
},
{
"path": "myth",
"chars": 271,
"preview": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"mythril.py: Bug hunting on the Ethereum blockchain\nhttp://www.github.c"
},
{
"path": "mythril/__init__.py",
"chars": 354,
"preview": "# We use RsT document formatting in docstring. For example :param to mark parameters.\n# See PEP 287\n__docformat__ = \"res"
},
{
"path": "mythril/__main__.py",
"chars": 139,
"preview": "#!/usr/bin/env python3\n# -*- coding: UTF-8 -*-\nimport mythril.interfaces.cli\n\nif __name__ == \"__main__\":\n mythril.int"
},
{
"path": "mythril/__version__.py",
"chars": 184,
"preview": "\"\"\"This file contains the current Mythril version.\n\nThis file is suitable for sourcing inside POSIX shell, e.g. bash as "
},
{
"path": "mythril/analysis/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mythril/analysis/analysis_args.py",
"chars": 0,
"preview": ""
},
{
"path": "mythril/analysis/call_helpers.py",
"chars": 1789,
"preview": "\"\"\"This module provides helper functions for the analysis modules to deal with\ncall functionality.\"\"\"\n\nfrom typing impor"
},
{
"path": "mythril/analysis/callgraph.py",
"chars": 6851,
"preview": "\"\"\"This module contains the configuration and functions to create call\ngraphs.\"\"\"\n\nimport re\nfrom typing import Dict, Li"
},
{
"path": "mythril/analysis/issue_annotation.py",
"chars": 1496,
"preview": "from copy import deepcopy\nfrom typing import List\n\nfrom mythril.analysis.report import Issue\nfrom mythril.laser.ethereum"
},
{
"path": "mythril/analysis/module/__init__.py",
"chars": 230,
"preview": "from mythril.analysis.module.base import DetectionModule, EntryPoint\nfrom mythril.analysis.module.loader import ModuleLo"
},
{
"path": "mythril/analysis/module/base.py",
"chars": 4239,
"preview": "\"\"\"Mythril Detection Modules\n\nThis module includes an definition of the DetectionModule interface.\nDetectionModules impl"
},
{
"path": "mythril/analysis/module/loader.py",
"chars": 4420,
"preview": "from typing import List, Optional\n\nfrom mythril.analysis.module.base import DetectionModule, EntryPoint\nfrom mythril.ana"
},
{
"path": "mythril/analysis/module/module_helpers.py",
"chars": 394,
"preview": "import traceback\n\n\ndef is_prehook() -> bool:\n \"\"\"Check if we are in prehook. One of Bernhard's trademark hacks!\n "
},
{
"path": "mythril/analysis/module/modules/__init__.py",
"chars": 1,
"preview": "\n"
},
{
"path": "mythril/analysis/module/modules/arbitrary_jump.py",
"chars": 3580,
"preview": "\"\"\"This module contains the detection code for Arbitrary jumps.\"\"\"\n\nimport logging\n\nfrom mythril.analysis.issue_annotati"
},
{
"path": "mythril/analysis/module/modules/arbitrary_write.py",
"chars": 2517,
"preview": "\"\"\"This module contains the detection code for arbitrary storage write.\"\"\"\n\nimport logging\n\nfrom mythril.analysis.module"
},
{
"path": "mythril/analysis/module/modules/delegatecall.py",
"chars": 3657,
"preview": "\"\"\"This module contains the detection code for insecure delegate call usage.\"\"\"\n\nimport logging\nfrom typing import List\n"
},
{
"path": "mythril/analysis/module/modules/dependence_on_origin.py",
"chars": 3956,
"preview": "\"\"\"This module contains the detection code for predictable variable\ndependence.\"\"\"\n\nimport logging\nfrom copy import copy"
},
{
"path": "mythril/analysis/module/modules/dependence_on_predictable_vars.py",
"chars": 7452,
"preview": "\"\"\"This module contains the detection code for predictable variable\ndependence.\"\"\"\n\nimport logging\nfrom typing import Li"
},
{
"path": "mythril/analysis/module/modules/ether_thief.py",
"chars": 3503,
"preview": "\"\"\"This module contains the detection code for unauthorized ether\nwithdrawal.\"\"\"\n\nimport logging\nfrom copy import copy\n\n"
},
{
"path": "mythril/analysis/module/modules/exceptions.py",
"chars": 5165,
"preview": "\"\"\"This module contains the detection code for reachable exceptions.\"\"\"\n\nimport logging\nfrom typing import List, Optiona"
},
{
"path": "mythril/analysis/module/modules/external_calls.py",
"chars": 3918,
"preview": "\"\"\"This module contains the detection code for potentially insecure low-level\ncalls.\"\"\"\n\nimport logging\nfrom copy import"
},
{
"path": "mythril/analysis/module/modules/integer.py",
"chars": 11483,
"preview": "\"\"\"This module contains the detection code for integer overflows and\nunderflows.\"\"\"\n\nimport logging\nfrom copy import cop"
},
{
"path": "mythril/analysis/module/modules/multiple_sends.py",
"chars": 4239,
"preview": "\"\"\"This module contains the detection code to find multiple sends occurring in\na single transaction.\"\"\"\n\nimport logging\n"
},
{
"path": "mythril/analysis/module/modules/requirements_violation.py",
"chars": 2857,
"preview": "\"\"\"This module contains the detection code for requirement violations in a call\"\"\"\n\nimport logging\nfrom typing import Li"
},
{
"path": "mythril/analysis/module/modules/state_change_external_calls.py",
"chars": 7620,
"preview": "import logging\nfrom copy import copy\nfrom typing import List, Optional, cast\n\nfrom mythril.analysis import solver\nfrom m"
},
{
"path": "mythril/analysis/module/modules/suicide.py",
"chars": 4590,
"preview": "import logging\n\nfrom mythril.analysis import solver\nfrom mythril.analysis.issue_annotation import IssueAnnotation\nfrom m"
},
{
"path": "mythril/analysis/module/modules/transaction_order_dependence.py",
"chars": 4467,
"preview": "\"\"\"This module contains the detection code for transaction order dependence.\"\"\"\n\nimport logging\n\nfrom mythril.analysis i"
},
{
"path": "mythril/analysis/module/modules/unchecked_retval.py",
"chars": 5647,
"preview": "\"\"\"This module contains detection code to find occurrences of calls whose\nreturn value remains unchecked.\"\"\"\n\nimport log"
},
{
"path": "mythril/analysis/module/modules/unexpected_ether.py",
"chars": 4941,
"preview": "\"\"\"This module contains the detection code for unexpected ether balance.\"\"\"\n\nimport logging\n\nfrom mythril.analysis.issue"
},
{
"path": "mythril/analysis/module/modules/user_assertions.py",
"chars": 4161,
"preview": "\"\"\"This module contains the detection code for potentially insecure low-level\ncalls.\"\"\"\n\nimport logging\n\nimport eth_abi\n"
},
{
"path": "mythril/analysis/module/util.py",
"chars": 1947,
"preview": "import logging\nfrom collections import defaultdict\nfrom typing import Callable, Dict, List, Mapping, Optional\n\nfrom myth"
},
{
"path": "mythril/analysis/ops.py",
"chars": 1823,
"preview": "\"\"\"This module contains various helper methods for dealing with EVM\noperations.\"\"\"\n\nfrom enum import Enum\n\nfrom mythril."
},
{
"path": "mythril/analysis/potential_issues.py",
"chars": 4380,
"preview": "from mythril.analysis.issue_annotation import IssueAnnotation\nfrom mythril.analysis.report import Issue\nfrom mythril.ana"
},
{
"path": "mythril/analysis/report.py",
"chars": 13142,
"preview": "\"\"\"This module provides classes that make up an issue report.\"\"\"\n\nimport json\nimport logging\nimport operator\nimport re\n\n"
},
{
"path": "mythril/analysis/security.py",
"chars": 1474,
"preview": "\"\"\"This module contains functionality for hooking in detection modules and\nexecuting them.\"\"\"\n\nimport logging\nfrom typin"
},
{
"path": "mythril/analysis/solver.py",
"chars": 9297,
"preview": "\"\"\"This module contains analysis module helpers to solve path constraints.\"\"\"\n\nimport logging\nfrom typing import Any, Di"
},
{
"path": "mythril/analysis/swc_data.py",
"chars": 2385,
"preview": "\"\"\"This module maps SWC IDs to their registry equivalents.\"\"\"\n\nDEFAULT_FUNCTION_VISIBILITY = \"100\"\nINTEGER_OVERFLOW_AND_"
},
{
"path": "mythril/analysis/symbolic.py",
"chars": 13163,
"preview": "\"\"\"This module contains a wrapper around LASER for extended analysis\npurposes.\"\"\"\n\nfrom typing import List, Optional, Ty"
},
{
"path": "mythril/analysis/templates/callgraph.html",
"chars": 2184,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <title>Call Graph</title>\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.co"
},
{
"path": "mythril/analysis/templates/report_as_markdown.jinja2",
"chars": 2020,
"preview": "# Analysis results for {{ filename }}\n{% if issues %}\n{% for issue in issues %}\n\n## {{ issue.title }}\n- SWC ID: {{ issue"
},
{
"path": "mythril/analysis/templates/report_as_text.jinja2",
"chars": 1908,
"preview": "{% if issues %}\n{% for issue in issues %}\n==== {{ issue.title }} ====\nSWC ID: {{ issue['swc-id'] }}\nSeverity: {{ issue.s"
},
{
"path": "mythril/analysis/traceexplore.py",
"chars": 4652,
"preview": "\"\"\"This module provides a function to convert a state space into a set of state\nnodes and transition edges.\"\"\"\n\nimport r"
},
{
"path": "mythril/concolic/__init__.py",
"chars": 126,
"preview": "from mythril.concolic.concolic_execution import concolic_execution\nfrom mythril.concolic.find_trace import concrete_exec"
},
{
"path": "mythril/concolic/concolic_execution.py",
"chars": 2698,
"preview": "from copy import deepcopy\nfrom datetime import datetime\nfrom typing import Any, Dict, List\n\nfrom mythril.concolic.concre"
},
{
"path": "mythril/concolic/concrete_data.py",
"chars": 612,
"preview": "from typing import Dict, List\n\nfrom typing_extensions import TypedDict\n\n\nclass AccountData(TypedDict):\n balance: str\n"
},
{
"path": "mythril/concolic/find_trace.py",
"chars": 3288,
"preview": "import binascii\nfrom copy import deepcopy\nfrom datetime import datetime\nfrom typing import List, Tuple\n\nfrom mythril.con"
},
{
"path": "mythril/config.ini",
"chars": 50,
"preview": "[defaults]\ndynamic_loading = infura\ninfura_id = \n\n"
},
{
"path": "mythril/disassembler/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mythril/disassembler/asm.py",
"chars": 4383,
"preview": "\"\"\"This module contains various helper classes and functions to deal with EVM\ncode disassembly.\"\"\"\n\nimport re\n\ntry:\n "
},
{
"path": "mythril/disassembler/disassembly.py",
"chars": 4152,
"preview": "\"\"\"This module contains the class used to represent disassembly code.\"\"\"\n\nfrom typing import Dict, List, Tuple\n\nfrom myt"
},
{
"path": "mythril/ethereum/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mythril/ethereum/evmcontract.py",
"chars": 2936,
"preview": "\"\"\"This module contains the class representing EVM contracts, aka Smart\nContracts.\"\"\"\n\nimport logging\nimport re\n\nimport "
},
{
"path": "mythril/ethereum/interface/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mythril/ethereum/interface/rpc/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mythril/ethereum/interface/rpc/base_client.py",
"chars": 2794,
"preview": "\"\"\"This module provides a basic RPC interface client.\n\nThis code is adapted from: https://github.com/ConsenSys/ethjsonrp"
},
{
"path": "mythril/ethereum/interface/rpc/client.py",
"chars": 2413,
"preview": "\"\"\"This module contains a basic Ethereum RPC client.\n\nThis code is adapted from: https://github.com/ConsenSys/ethjsonrpc"
},
{
"path": "mythril/ethereum/interface/rpc/constants.py",
"chars": 243,
"preview": "\"\"\"This file contains constants used used by the Ethereum JSON RPC\ninterface.\"\"\"\n\nBLOCK_TAG_EARLIEST = \"earliest\"\nBLOCK_"
},
{
"path": "mythril/ethereum/interface/rpc/exceptions.py",
"chars": 730,
"preview": "\"\"\"This module contains exceptions regarding JSON-RPC communication.\"\"\"\n\n\nclass EthJsonRpcError(Exception):\n \"\"\"The J"
},
{
"path": "mythril/ethereum/interface/rpc/utils.py",
"chars": 938,
"preview": "\"\"\"This module contains various utility functions regarding the RPC data format\nand validation.\"\"\"\n\nfrom .constants impo"
},
{
"path": "mythril/ethereum/util.py",
"chars": 8450,
"preview": "\"\"\"This module contains various utility functions regarding unit conversion and\nsolc integration.\"\"\"\n\nimport binascii\nim"
},
{
"path": "mythril/exceptions.py",
"chars": 1121,
"preview": "\"\"\"This module contains general exceptions used by Mythril.\"\"\"\n\n\nclass MythrilBaseException(Exception):\n \"\"\"The Mythr"
},
{
"path": "mythril/interfaces/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mythril/interfaces/cli.py",
"chars": 30794,
"preview": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"mythril.py: Bug hunting on the Ethereum blockchain\n\nhttp://www.github."
},
{
"path": "mythril/interfaces/epic.py",
"chars": 7178,
"preview": "\"\"\"Don't ask.\"\"\"\n\n#!/usr/bin/env python\n#\n# \"THE BEER-WARE LICENSE\" (Revision 43~maze)\n#\n# <maze@pyth0n.org> wrote these"
},
{
"path": "mythril/laser/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mythril/laser/ethereum/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mythril/laser/ethereum/call.py",
"chars": 8673,
"preview": "\"\"\"This module contains the business logic used by Instruction in\ninstructions.py to get the necessary elements from the"
},
{
"path": "mythril/laser/ethereum/cfg.py",
"chars": 2957,
"preview": "\"\"\"This module.\"\"\"\n\nfrom enum import Enum\nfrom typing import TYPE_CHECKING, Dict, List\n\nfrom flags import Flags\n\nfrom my"
},
{
"path": "mythril/laser/ethereum/cheat_code.py",
"chars": 1332,
"preview": "from typing import Union\n\nfrom mythril.laser.ethereum.state.calldata import (\n BaseCalldata,\n)\nfrom mythril.laser.eth"
},
{
"path": "mythril/laser/ethereum/evm_exceptions.py",
"chars": 893,
"preview": "\"\"\"This module contains EVM exception types used by LASER.\"\"\"\n\n\nclass VmException(Exception):\n \"\"\"The base VM excepti"
},
{
"path": "mythril/laser/ethereum/function_managers/__init__.py",
"chars": 149,
"preview": "from .exponent_function_manager import exponent_function_manager\nfrom .keccak_function_manager import KeccakFunctionMana"
},
{
"path": "mythril/laser/ethereum/function_managers/exponent_function_manager.py",
"chars": 2301,
"preview": "import logging\nfrom typing import Tuple\n\nfrom mythril.laser.smt import (\n And,\n BitVec,\n Function,\n URem,\n "
},
{
"path": "mythril/laser/ethereum/function_managers/keccak_function_manager.py",
"chars": 6677,
"preview": "import logging\nfrom typing import Dict, List, Optional, Tuple\n\nfrom mythril.laser.smt import (\n ULE,\n ULT,\n And"
},
{
"path": "mythril/laser/ethereum/instruction_data.py",
"chars": 1393,
"preview": "from typing import Tuple\n\nfrom eth._utils.numeric import ceil32\nfrom eth.constants import (\n GAS_ECRECOVER,\n GAS_I"
},
{
"path": "mythril/laser/ethereum/instructions.py",
"chars": 84017,
"preview": "\"\"\"This module contains a representation class for EVM instructions and\ntransitions between them.\"\"\"\n\nimport logging\nfro"
},
{
"path": "mythril/laser/ethereum/natives.py",
"chars": 7759,
"preview": "\"\"\"This nodule defines helper functions to deal with native calls.\"\"\"\n\nimport hashlib\nimport logging\nfrom typing import "
},
{
"path": "mythril/laser/ethereum/state/__init__.py",
"chars": 9,
"preview": "# Hello!\n"
},
{
"path": "mythril/laser/ethereum/state/account.py",
"chars": 7219,
"preview": "\"\"\"This module contains account-related functionality.\n\nThis includes classes representing accounts and their storage.\n\""
},
{
"path": "mythril/laser/ethereum/state/annotation.py",
"chars": 2126,
"preview": "\"\"\"This module includes classes used for annotating trace information.\n\nThis includes the base StateAnnotation class, as"
},
{
"path": "mythril/laser/ethereum/state/calldata.py",
"chars": 9179,
"preview": "\"\"\"This module declares classes to represent call data.\"\"\"\n\nfrom typing import Any, List, Tuple, Union, cast\n\nfrom z3 im"
},
{
"path": "mythril/laser/ethereum/state/constraints.py",
"chars": 4492,
"preview": "\"\"\"This module contains the class used to represent state-change constraints in\nthe call graph.\"\"\"\n\nfrom copy import cop"
},
{
"path": "mythril/laser/ethereum/state/environment.py",
"chars": 2072,
"preview": "\"\"\"This module contains the representation for an execution state's\nenvironment.\"\"\"\n\nfrom typing import Dict\n\nfrom z3 im"
},
{
"path": "mythril/laser/ethereum/state/global_state.py",
"chars": 5631,
"preview": "\"\"\"This module contains a representation of the global execution state.\"\"\"\n\nfrom copy import copy, deepcopy\nfrom typing "
},
{
"path": "mythril/laser/ethereum/state/machine_state.py",
"chars": 7942,
"preview": "\"\"\"This module contains a representation of the EVM's machine state and its\nstack.\"\"\"\n\nfrom copy import copy\nfrom typing"
},
{
"path": "mythril/laser/ethereum/state/memory.py",
"chars": 6479,
"preview": "\"\"\"This module contains a representation of a smart contract's memory.\"\"\"\n\nfrom copy import copy\nfrom typing import Dict"
},
{
"path": "mythril/laser/ethereum/state/return_data.py",
"chars": 711,
"preview": "\"\"\"This module declares classes to represent call data.\"\"\"\n\nfrom typing import List\n\nfrom mythril.laser.smt import (\n "
},
{
"path": "mythril/laser/ethereum/state/transient_storage.py",
"chars": 2101,
"preview": "from copy import copy, deepcopy\n\nfrom mythril.laser.smt import Concat, K, simplify\n\n\nclass TransientStorage:\n \"\"\"\n "
},
{
"path": "mythril/laser/ethereum/state/world_state.py",
"chars": 9239,
"preview": "\"\"\"This module contains a representation of the EVM's world state.\"\"\"\n\nfrom copy import copy, deepcopy\nfrom random impor"
},
{
"path": "mythril/laser/ethereum/strategy/__init__.py",
"chars": 1527,
"preview": "from abc import ABC, abstractmethod\nfrom typing import List\n\nfrom mythril.laser.ethereum.state.global_state import Globa"
},
{
"path": "mythril/laser/ethereum/strategy/basic.py",
"chars": 3477,
"preview": "\"\"\"This module implements basic symbolic execution search strategies.\"\"\"\n\nfrom random import choices, randrange\n\nfrom my"
},
{
"path": "mythril/laser/ethereum/strategy/beam.py",
"chars": 1200,
"preview": "from mythril.laser.ethereum.state.global_state import GlobalState\n\nfrom . import BasicSearchStrategy\n\n\nclass BeamSearch("
},
{
"path": "mythril/laser/ethereum/strategy/concolic.py",
"chars": 4684,
"preview": "import logging\nimport operator\nfrom copy import copy\nfrom functools import reduce\nfrom typing import Any, Dict, List, Tu"
},
{
"path": "mythril/laser/ethereum/strategy/constraint_strategy.py",
"chars": 1021,
"preview": "import logging\n\nfrom mythril.laser.ethereum.state.global_state import GlobalState\nfrom mythril.laser.ethereum.strategy.b"
},
{
"path": "mythril/laser/ethereum/strategy/extensions/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mythril/laser/ethereum/strategy/extensions/bounded_loops.py",
"chars": 4384,
"preview": "import logging\nfrom copy import copy\nfrom typing import Dict, List, cast\n\nfrom mythril.laser.ethereum.state.annotation i"
},
{
"path": "mythril/laser/ethereum/svm.py",
"chars": 29993,
"preview": "\"\"\"This module implements the main symbolic execution engine.\"\"\"\n\nimport logging\nimport random\nfrom abc import ABCMeta\nf"
},
{
"path": "mythril/laser/ethereum/time_handler.py",
"chars": 504,
"preview": "import time\n\nfrom mythril.support.support_utils import Singleton\n\n\nclass TimeHandler(object, metaclass=Singleton):\n d"
},
{
"path": "mythril/laser/ethereum/transaction/__init__.py",
"chars": 185,
"preview": "from mythril.laser.ethereum.transaction.symbolic import (\n execute_contract_creation,\n execute_message_call,\n)\nfro"
},
{
"path": "mythril/laser/ethereum/transaction/concolic.py",
"chars": 5289,
"preview": "\"\"\"This module contains functions to set up and execute concolic message\ncalls.\"\"\"\n\nimport binascii\nfrom typing import L"
},
{
"path": "mythril/laser/ethereum/transaction/symbolic.py",
"chars": 8733,
"preview": "\"\"\"This module contains functions setting up and executing transactions with\nsymbolic values.\"\"\"\n\nimport logging\nfrom ty"
},
{
"path": "mythril/laser/ethereum/transaction/transaction_models.py",
"chars": 9303,
"preview": "\"\"\"This module contains the transaction models used throughout LASER's symbolic\nexecution.\"\"\"\n\nimport logging\nfrom copy "
},
{
"path": "mythril/laser/ethereum/tx_prioritiser/__init__.py",
"chars": 44,
"preview": "from .rf_prioritiser import RfTxPrioritiser\n"
},
{
"path": "mythril/laser/ethereum/tx_prioritiser/rf_prioritiser.py",
"chars": 2028,
"preview": "import logging\nimport pickle\n\nimport numpy as np\n\nlog = logging.getLogger(__name__)\n\n\nclass RfTxPrioritiser:\n def __i"
},
{
"path": "mythril/laser/ethereum/util.py",
"chars": 4518,
"preview": "\"\"\"This module contains various utility conversion functions and constants for\nLASER.\"\"\"\n\nimport re\nfrom typing import T"
},
{
"path": "mythril/laser/execution_info.py",
"chars": 273,
"preview": "from abc import ABC, abstractmethod\n\n\nclass ExecutionInfo(ABC):\n @abstractmethod\n def as_dict(self):\n \"\"\"Re"
},
{
"path": "mythril/laser/plugin/__init__.py",
"chars": 733,
"preview": "\"\"\"Laser plugins\n\nThis module contains everything to do with laser plugins\n\nLaser plugins are a way of extending laser's"
},
{
"path": "mythril/laser/plugin/builder.py",
"chars": 434,
"preview": "from abc import ABC, abstractmethod\n\nfrom mythril.laser.plugin.interface import LaserPlugin\n\n\nclass PluginBuilder(ABC):\n"
},
{
"path": "mythril/laser/plugin/interface.py",
"chars": 916,
"preview": "from mythril.laser.ethereum.svm import LaserEVM\n\n\nclass LaserPlugin:\n \"\"\"Base class for laser plugins\n\n Functional"
},
{
"path": "mythril/laser/plugin/loader.py",
"chars": 2944,
"preview": "import logging\nfrom typing import Dict, List, Optional\n\nfrom mythril.laser.ethereum.svm import LaserEVM\nfrom mythril.las"
},
{
"path": "mythril/laser/plugin/plugins/__init__.py",
"chars": 918,
"preview": "\"\"\"Plugin implementations\n\nThis module contains the implementation of some features\n\n- benchmarking\n- pruning\n\"\"\"\n\nfrom "
},
{
"path": "mythril/laser/plugin/plugins/benchmark.py",
"chars": 2775,
"preview": "import logging\nfrom time import time\n\nimport matplotlib.pyplot as plt\n\nfrom mythril.laser.ethereum.svm import LaserEVM\nf"
},
{
"path": "mythril/laser/plugin/plugins/call_depth_limiter.py",
"chars": 1006,
"preview": "from mythril.laser.ethereum.state.global_state import GlobalState\nfrom mythril.laser.ethereum.svm import LaserEVM\nfrom m"
},
{
"path": "mythril/laser/plugin/plugins/coverage/__init__.py",
"chars": 101,
"preview": "from mythril.laser.plugin.plugins.coverage.coverage_plugin import (\n InstructionCoveragePlugin,\n)\n"
},
{
"path": "mythril/laser/plugin/plugins/coverage/coverage_plugin.py",
"chars": 4114,
"preview": "import logging\nfrom typing import Dict, List, Tuple\n\nfrom mythril.laser.ethereum.state.global_state import GlobalState\nf"
},
{
"path": "mythril/laser/plugin/plugins/coverage/coverage_strategy.py",
"chars": 1828,
"preview": "from mythril.laser.ethereum.state.global_state import GlobalState\nfrom mythril.laser.ethereum.strategy import BasicSearc"
},
{
"path": "mythril/laser/plugin/plugins/coverage_metrics/__init__.py",
"chars": 57,
"preview": "from .metrics_plugin import CoverageMetricsPluginBuilder\n"
},
{
"path": "mythril/laser/plugin/plugins/coverage_metrics/constants.py",
"chars": 20,
"preview": "BATCH_OF_STATES = 5\n"
},
{
"path": "mythril/laser/plugin/plugins/coverage_metrics/coverage_data.py",
"chars": 2364,
"preview": "import json\n\nfrom mythril.laser.execution_info import ExecutionInfo\nfrom mythril.support.support_utils import get_code_h"
},
{
"path": "mythril/laser/plugin/plugins/coverage_metrics/metrics_plugin.py",
"chars": 5276,
"preview": "import logging\nimport time\n\nfrom mythril.laser.ethereum.state.global_state import GlobalState\nfrom mythril.laser.ethereu"
},
{
"path": "mythril/laser/plugin/plugins/dependency_pruner.py",
"chars": 11422,
"preview": "import logging\nfrom typing import Dict, List, Set, cast\n\nfrom mythril.analysis import solver\nfrom mythril.exceptions imp"
},
{
"path": "mythril/laser/plugin/plugins/instruction_profiler.py",
"chars": 3601,
"preview": "import logging\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom typing import Dict, List, Tuple\n\nfr"
},
{
"path": "mythril/laser/plugin/plugins/mutation_pruner.py",
"chars": 3484,
"preview": "from mythril.analysis import solver\nfrom mythril.exceptions import UnsatError\nfrom mythril.laser.ethereum.state.global_s"
},
{
"path": "mythril/laser/plugin/plugins/plugin_annotations.py",
"chars": 4442,
"preview": "import logging\nfrom copy import copy\nfrom typing import Dict, List, Set\n\nfrom mythril.laser.ethereum.state.annotation im"
},
{
"path": "mythril/laser/plugin/plugins/state_merge/__init__.py",
"chars": 56,
"preview": "from .state_merge_plugin import StateMergePluginBuilder\n"
},
{
"path": "mythril/laser/plugin/plugins/state_merge/check_mergeability.py",
"chars": 3211,
"preview": "import logging\n\nfrom mythril.laser.ethereum.cfg import Node\nfrom mythril.laser.ethereum.state.account import Account\nfro"
},
{
"path": "mythril/laser/plugin/plugins/state_merge/merge_states.py",
"chars": 5324,
"preview": "import logging\nfrom typing import Tuple, cast\n\nfrom mythril.laser.ethereum.cfg import Node\nfrom mythril.laser.ethereum.s"
},
{
"path": "mythril/laser/plugin/plugins/state_merge/state_merge_plugin.py",
"chars": 3401,
"preview": "import logging\nfrom copy import copy\nfrom typing import List, Set\n\nfrom mythril.laser.ethereum.state.annotation import S"
},
{
"path": "mythril/laser/plugin/plugins/summary/__init__.py",
"chars": 47,
"preview": "from .core import SymbolicSummaryPluginBuilder\n"
},
{
"path": "mythril/laser/plugin/plugins/summary/annotations.py",
"chars": 1629,
"preview": "from copy import deepcopy\nfrom typing import List, Tuple\n\nfrom mythril.laser.ethereum.state.annotation import StateAnnot"
},
{
"path": "mythril/laser/plugin/plugins/summary/core.py",
"chars": 17282,
"preview": "import logging\nfrom copy import copy, deepcopy\nfrom typing import List, Optional, Set, Tuple\n\nimport z3\n\nfrom mythril.an"
},
{
"path": "mythril/laser/plugin/plugins/summary/summary.py",
"chars": 4994,
"preview": "import logging\nfrom copy import deepcopy\n\nimport z3\n\nfrom mythril.laser.ethereum.state.global_state import GlobalState\nf"
}
]
// ... and 789 more files (download for full content)
About this extraction
This page contains the full source code of the ConsenSys/mythril-classic GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 989 files (3.1 MB), approximately 870.4k tokens, and a symbol index with 1562 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.