Skip to main content

Try it Live

Run Uint examples in the interactive playground

Uint.equals(a: BrandedUint256, b: BrandedUint256): boolean

Check if two Uint256 values are equal. Parameters:
  • a: BrandedUint256 - First value
  • b: BrandedUint256 - Second value
Returns: boolean - True if equal Example:
import { Uint } from 'tevm'

const a = Uint(100n)
const b = Uint(100n)
Uint.equals(a, b)  // true

const c = Uint(200n)
Uint.equals(a, c)  // false

Uint.equals(Uint.ZERO, Uint(0n))  // true
Defined in: primitives/Uint/equals.ts

See Also