A Vyper linter for fine sneks.
Project description
Natrix
Natrix is a vyper linter that checks for common mistakes in vyper contracts. It is designed to be your vyper copilot, helping you to write code that is more secure and efficient.
Installation
You can install Natrix using pip:
pip install natrix
Currently natrix requires uv to be installed to function correctly.
Usage
To check a contract:
natrix file_to_lint.vy
To check all vyper contract in the current directory:
natrix
Command Line Options
natrix --help # Show help message
natrix --version # Show version information
natrix --list-rules # List all available rules
natrix --disable NTX1 NTX2 # Disable specific rules
natrix --rule-config RuleName.param=value # Configure rule parameters
Configuration
You can configure Natrix using a pyproject.toml file in your project root:
[tool.natrix]
# Files or directories to lint (relative to pyproject.toml)
files = ["contracts/", "tests/contracts/"]
# Rules to disable
disabled_rules = ["NTX1", "NTX2"]
# Rule-specific configurations
[tool.natrix.rule_configs.RuleName]
param = "value"
Pre-commit hook
Natrix can also be used as a pre-commit hook. This allows to have your contracts checked automatically before you can commit.
To add natrix just add the following lines to your pre-commit-config.yaml config file:
repos:
- repo: https://github.com/albertocentonze/natrix
rev: v0.1.5 # Use the latest version
hooks:
- id: natrix
and then install pre-commit in your repository by doing:
pre-commit install
Disclaimer
Natrix is highly experimental software, I do not take any responsibility for changes to the codebase suggested by this linter that might lead to loss of funds or any other issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file natrix-0.1.5.tar.gz.
File metadata
- Download URL: natrix-0.1.5.tar.gz
- Upload date:
- Size: 113.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55f3fc0dee23439f4dc9457b30be25ffdc9ba520998e8eecc5a3b5bf5c02d45b
|
|
| MD5 |
0718214fab39b98a065abbe7bf515d09
|
|
| BLAKE2b-256 |
82aa37391473d7971d370f0a27fc4a7f5e8dae39bb14c5c2a1f3cf846bcdf3a1
|
Provenance
The following attestation bundles were made for natrix-0.1.5.tar.gz:
Publisher:
release.yml on AlbertoCentonze/natrix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
natrix-0.1.5.tar.gz -
Subject digest:
55f3fc0dee23439f4dc9457b30be25ffdc9ba520998e8eecc5a3b5bf5c02d45b - Sigstore transparency entry: 221969452
- Sigstore integration time:
-
Permalink:
AlbertoCentonze/natrix@752cf4ac7e4dce31c6061cb41e92779a59d2b780 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/AlbertoCentonze
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@752cf4ac7e4dce31c6061cb41e92779a59d2b780 -
Trigger Event:
release
-
Statement type:
File details
Details for the file natrix-0.1.5-py3-none-any.whl.
File metadata
- Download URL: natrix-0.1.5-py3-none-any.whl
- Upload date:
- Size: 32.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07a5f9ce0388edc22a406de7722042edcbf1a96a779bca2c4fe225918790d886
|
|
| MD5 |
c8417ec45b701d26de3f72d6bb6dffde
|
|
| BLAKE2b-256 |
51c213bd80d057a8c2bf99f4518379b8fd55fc6200c38cc953b0f70692ef8a73
|
Provenance
The following attestation bundles were made for natrix-0.1.5-py3-none-any.whl:
Publisher:
release.yml on AlbertoCentonze/natrix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
natrix-0.1.5-py3-none-any.whl -
Subject digest:
07a5f9ce0388edc22a406de7722042edcbf1a96a779bca2c4fe225918790d886 - Sigstore transparency entry: 221969454
- Sigstore integration time:
-
Permalink:
AlbertoCentonze/natrix@752cf4ac7e4dce31c6061cb41e92779a59d2b780 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/AlbertoCentonze
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@752cf4ac7e4dce31c6061cb41e92779a59d2b780 -
Trigger Event:
release
-
Statement type: