erc7730.lint.v2.lint_validate_map_keys module

V2 linter that validates the keys of maps looked up with a key read from the transaction.

The device reads the key from the transaction and matches it byte for byte against the map keys, so each map key must be encodable as the value at the key path (for instance, a uint32 key must fit in 4 bytes).

final class erc7730.lint.v2.lint_validate_map_keys.ValidateMapKeysLinter[source]View on GitHub

Bases: ERC7730Linter

Validates that the keys of maps looked up with a key read from the transaction can be encoded as the key value.

Maps keyed on the chain id or the target contract address are resolved for each deployment and validated during resolution. Only contract descriptors with function signatures as format keys are validated: the ABI is needed to know how the key is encoded.

lint(input_descriptor: InputERC7730Descriptor, descriptor: ResolvedERC7730Descriptor, out: OutputAdder) → None[source]View on GitHub