Expand description
On-chain protocol constants matching polygon.move:31-42. These are HARDCODED โ no Config struct, no runtime parameters.
Constantsยง
- AREA_
DIVISOR - Divisor to convert twice_area_fp2 to whole square meters: 2 * SCALE^2.
- MAX_
PARTS - Maximum number of convex parts per polygon.
- MAX_
VERTICES_ PER_ PART - Maximum vertices per convex part (admin-configurable on-chain, here hardcoded to protocol default).
- MAX_
WORLD - Maximum world coordinate (Earth circumference in Web Mercator, scaled).
- MIN_
COMPACTNESS_ PPM - Minimum compactness ratio in parts-per-million for isoperimetric validation. Formula: 8_000_000 * twice_area >= MIN_COMPACTNESS_PPM * L1_perimeter^2
- MIN_
EDGE_ LENGTH - Minimum edge length in fixed-point units (1 meter).
- MIN_
EDGE_ LENGTH_ SQUARED - Minimum edge length squared (used to avoid sqrt). 1_000_000^2.
- SCALE
- Scaling factor: 1 meter in fixed-point space (= 1_000_000 units).