Search Apps Documentation Source Content File Folder Download Copy Actions Download

doc.gno

0.71 Kb ยท 14 lines
 1// Package uint256 implements 256-bit unsigned integer arithmetic for GnoSwap.
 2//
 3// This package provides a Uint type that represents a 256-bit unsigned integer,
 4// stored as four uint64 values in little-endian order. It includes arithmetic
 5// operations with overflow detection, which are essential for safe token
 6// calculations in DeFi protocols.
 7//
 8// The implementation is optimized for gas efficiency while maintaining
 9// compatibility with Ethereum's uint256 semantics, ensuring consistent
10// behavior across different blockchain environments.
11//
12// All operations that may overflow return both the result and an overflow flag,
13// allowing calling code to handle overflow conditions appropriately.
14package uint256