Using printers#
Printers are Python scripts used to extract useful information from Solidity smart contracts. Wake is installed together with the wake_printers module, which provides a set of printers for common use cases.
Basic usage#
To list all available printers, run:
To run a printer, use:
A printer accepts a list of paths to contracts to be analyzed as arguments. For example:
Printer configuration#
Printers may accept additional arguments and options. To list them, run:
The output also describes environment variables that can be used to configure given arguments and options.
Additionally, printer configuration can be specified in the project-specific and global configuration TOML file, for example:
See Configuration for more information.
Changing printer loading priorities#
Printers may be loaded from local directories:
./printers
(project-specific)$XDG_DATA_HOME/wake/global-printers
(global)
and from printer packages (plugins), for example wake_printers
.
A printer of the same name may be present in multiple packages (plugins). To see the list of available sources for each printer, run:
Project-specific and global printers take precedence over printers from packages, with project-specific printers having the highest priority.
After that, printers are loaded from packages in the alphabetical order of package module names, making the first package the lowest priority.
The loading priorities can be changed in the global plugins.toml
configuration file.
See Configuration for more information.