pub const MAX_PIXEL_PRICE: u128 = _; // 792_281_625_142_643_375_935_439_503u128
Expand description

The maximum price that can be set to a pixel.

This number is calculated to avoid an overflow and precisely calculate a resale commission. Here’s an explanation.

The maximum number of pixels that a canvas can contain is BlockSideLength::MAX² = 2³². So the maximum price that each pixel can have is u128::MAX / BlockSideLength::MAX² = 2⁹⁶.

To calculate the commission, the number can be multiplied by 100, so, to avoid an overflow, the number must be divided by 100. Hence 2⁹⁶ / 100.