wake.config.data_model
module
#
AnvilConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
cmd_args = '--prune-history 100 --transaction-block-keeper 10 --steps-tracing --silent'
class-attribute
instance-attribute
#
Command line arguments to pass to anvil.
CodeLensConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
enable = True
class-attribute
instance-attribute
#
Show code lenses.
sort_tag_priority = ['lsp-references', 'lsp-selectors', 'lsp-inheritance-graph', 'lsp-linearized-inheritance-graph']
class-attribute
instance-attribute
#
Order of code lens with the same start and end position based on sort tags used in detectors/printers. Sort tags default to the printer/detector name.
CompilerConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
solc = Field(default_factory=SolcConfig)
class-attribute
instance-attribute
#
ControlFlowGraphConfig
class
#
DeploymentConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
DetectorConfig
class
#
Bases: WakeConfigModel
Namespace for detector-specific config options. Each attribute should be named after the detector name and hold a dictionary with string keys matching the Click option names.
Source code in wake/config/data_model.py
DetectorsConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
_normalize_paths = field_validator('ignore_paths', 'exclude_paths', mode='before')(normalize_paths)
class-attribute
instance-attribute
#
exclude = frozenset()
class-attribute
instance-attribute
#
Names of detectors that should not be loaded.
exclude_paths = Field(default_factory=lambda: frozenset([Path.cwd() / 'node_modules', Path.cwd() / 'lib', Path.cwd() / 'script']))
class-attribute
instance-attribute
#
Detections in these paths are ignored unless linked to a (sub)detection in a non-excluded path. Useful for ignoring detections in dependencies.
ignore_paths = Field(default_factory=lambda: frozenset([Path.cwd() / 'venv', Path.cwd() / '.venv', Path.cwd() / 'test']))
class-attribute
instance-attribute
#
Detections in these paths must be ignored under all circumstances. Useful for ignoring detections in Solidity test files.
only = None
class-attribute
instance-attribute
#
Names of detectors that should only be loaded.
DetectorsLspConfig
class
#
FindReferencesConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
include_declarations = False
class-attribute
instance-attribute
#
Include declarations in the results.
GeneralConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
call_trace_options = frozenset(['contract_name', 'function_name', 'named_arguments', 'status', 'call_type', 'value', 'return_value', 'error', 'events'])
class-attribute
instance-attribute
#
Options to include in call traces.
json_rpc_timeout = 15
class-attribute
instance-attribute
#
Timeout applied to JSON-RPC requests.
link_format = 'vscode://file/{path}:{line}:{col}'
class-attribute
instance-attribute
#
Format of links used in detectors and printers.
GeneratorConfig
class
#
Bases: WakeConfigModel
Unstable, may change in the future.
Source code in wake/config/data_model.py
control_flow_graph = Field(default_factory=ControlFlowGraphConfig)
class-attribute
instance-attribute
#
imports_graph = Field(default_factory=ImportsGraphConfig)
class-attribute
instance-attribute
#
inheritance_graph = Field(default_factory=InheritanceGraphConfig)
class-attribute
instance-attribute
#
inheritance_graph_full = Field(default_factory=InheritanceGraphConfig)
class-attribute
instance-attribute
#
linearized_inheritance_graph = Field(default_factory=LinearizedInheritanceGraphConfig)
class-attribute
instance-attribute
#
GraphsDirection
class
#
Bases: StrEnum
Source code in wake/config/data_model.py
HardhatConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
cmd_args = ''
class-attribute
instance-attribute
#
Command line arguments to pass to npx hardhat node.
ImportsDirection
class
#
Bases: StrEnum
Source code in wake/config/data_model.py
ImportsGraphConfig
class
#
InheritanceGraphConfig
class
#
InlayHintsConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
LinearizedInheritanceGraphConfig
class
#
LspConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
code_lens = Field(default_factory=CodeLensConfig)
class-attribute
instance-attribute
#
Code lens config options.
compilation_delay = 0
class-attribute
instance-attribute
#
Delay to wait after a file content change before recompiling.
detectors = Field(default_factory=DetectorsLspConfig)
class-attribute
instance-attribute
#
Detectors config options specific to LSP.
find_references = Field(default_factory=FindReferencesConfig)
class-attribute
instance-attribute
#
Find references config options.
inlay_hints = Field(default_factory=InlayHintsConfig)
class-attribute
instance-attribute
#
Inlay hints config options.
MetadataBytecodeHashEnum
class
#
Bases: StrEnum
Source code in wake/config/data_model.py
PrinterConfig
class
#
Bases: WakeConfigModel
Namespace for printer-specific config options. Each attribute should be named after the printer name and hold a dictionary with string keys matching the Click option names.
Source code in wake/config/data_model.py
PrintersConfig
class
#
Bases: WakeConfigModel
Holds general printer config options for all printers.
Source code in wake/config/data_model.py
SolcConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
_normalize_paths = field_validator('allow_paths', 'include_paths', 'exclude_paths', mode='before')(normalize_paths)
class-attribute
instance-attribute
#
allow_paths = frozenset()
class-attribute
instance-attribute
#
Wake should set solc --allow-paths automatically. This option allows to specify additional allowed paths.
evm_version = None
class-attribute
instance-attribute
#
Version of the EVM to compile for. Leave unset to let the solc decide.
exclude_paths = Field(default_factory=lambda: frozenset([Path.cwd() / 'node_modules', Path.cwd() / 'venv', Path.cwd() / '.venv', Path.cwd() / 'lib', Path.cwd() / 'script', Path.cwd() / 'test']))
class-attribute
instance-attribute
#
Solidity files in these paths are excluded from compilation unless imported from a non-excluded file.
experimental = Field(default_factory=SolcExperimentalConfig)
class-attribute
instance-attribute
#
Experimental (unstable) compiler features, gated behind solc's experimental mode.
include_paths = Field(default_factory=lambda: frozenset([Path.cwd() / 'node_modules']))
class-attribute
instance-attribute
#
Paths where to search for Solidity files imported using direct (non-relative) import paths.
metadata = Field(default_factory=SolcMetadataConfig)
class-attribute
instance-attribute
#
Metadata config options.
optimizer = Field(default_factory=SolcOptimizerConfig)
class-attribute
instance-attribute
#
Optimizer config options.
remappings = []
class-attribute
instance-attribute
#
Remappings to apply during compilation.
target_version = None
class-attribute
instance-attribute
#
Target Solidity version to use for all files during compilation.
via_IR = None
class-attribute
instance-attribute
#
Use new IR-based compiler pipeline.
SolcExperimentalConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
enable = False
class-attribute
instance-attribute
#
Enable solc experimental mode (maps to Standard JSON settings.experimental, requires solc >= 0.8.35).
On its own it only unlocks experimental features; it does not activate any of them. Experimental
features have no stability guarantees between releases and are not suited for production, and enabling
this marks the compiled contract metadata as experimental.
via_ssa_cfg = False
class-attribute
instance-attribute
#
Use the experimental SSA CFG-based code generator (maps to settings.viaSSACFG). Requires
enable = true and solc >= 0.8.35.
_require_experimental_mode()
#
Source code in wake/config/data_model.py
SolcMetadataConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
SolcOptimizerConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
SolcOptimizerDetailsConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
constant_optimizer = None
class-attribute
instance-attribute
#
cse = None
class-attribute
instance-attribute
#
deduplicate = None
class-attribute
instance-attribute
#
inliner = None
class-attribute
instance-attribute
#
jumpdest_remover = None
class-attribute
instance-attribute
#
order_literals = None
class-attribute
instance-attribute
#
peephole = None
class-attribute
instance-attribute
#
simple_counter_for_loop_unchecked_increment = None
class-attribute
instance-attribute
#
yul_details = Field(default_factory=SolcOptimizerYulDetailsConfig)
class-attribute
instance-attribute
#
SolcOptimizerYulDetailsConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
SolcRemapping
class
#
Source code in wake/config/data_model.py
SubprojectConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
_normalize_paths = field_validator('paths', mode='before')(normalize_paths)
class-attribute
instance-attribute
#
evm_version = None
class-attribute
instance-attribute
#
experimental = Field(default_factory=SolcExperimentalConfig)
class-attribute
instance-attribute
#
metadata = Field(default_factory=SolcMetadataConfig)
class-attribute
instance-attribute
#
optimizer = Field(default_factory=SolcOptimizerConfig)
class-attribute
instance-attribute
#
paths = frozenset()
class-attribute
instance-attribute
#
target_version = None
class-attribute
instance-attribute
#
via_IR = None
class-attribute
instance-attribute
#
TestingConfig
class
#
Bases: WakeConfigModel
Source code in wake/config/data_model.py
anvil = Field(default_factory=AnvilConfig)
class-attribute
instance-attribute
#
Anvil-specific config options.
block_history = Field(default=256, ge=0)
class-attribute
instance-attribute
#
Target number of blocks each chain keeps. Pruning uses a small hysteresis window,
temporarily retaining ceil(target / 8) extra blocks (at least 1 and at most
32) before draining back to the target. 0 is treated as 1, so the latest
block remains resolvable. null keeps everything, at the cost of memory linear
in transactions executed.
Blocks are the unit of retention: a transaction is kept exactly as long as the block
containing it, and the EVM journal keeps only what those blocks need to re-execute.
Reaching further back than the window raises HistoryPrunedError - including
chain.txs[-1] once the newest transaction's own block has aged out, so hold the
transaction object if you need it beyond that. chain.blocks["latest"] always
resolves.
The bound is in blocks, and a block's journal cost is proportional to the writes it
contains. With automine off a block can hold any number of transactions or state
assignments, and an unmined block never closes, so retention is bounded only once
blocks are mined. revm only.
cmd = 'revm'
class-attribute
instance-attribute
#
Which development chain to use for testing. Should be one of revm, anvil, or
hardhat.
coverage_sync_timeout = 5
class-attribute
instance-attribute
#
Timeout for syncing coverage data.
hardhat = Field(default_factory=HardhatConfig)
class-attribute
instance-attribute
#
Hardhat-specific config options.
TopLevelConfig
class
#
Bases: WakeConfigModel