Try it Live
Run Address examples in the interactive playground
Bit Masking
Takes lower 160 bits (20 bytes) of input value. Higher bits are discarded. Formula:address = value & ((1 << 160) - 1)
Examples:
Use Cases
Sequential Addresses
Generate sequential addresses for testing:Address Arithmetic
Perform arithmetic on addresses:Numeric Conversions
Convert between numeric and address representations:Test Fixtures
Create predictable test addresses:Number vs Bigint
Number (JavaScript): Safe for values up to 2^53 - 1:Error Handling
Overflow Behavior
Values larger than 160 bits are truncated (not an error):Comparison with Other Constructors
fromNumber():
- Have numeric value
- Performing address arithmetic
- Generating test addresses
- Converting from U256
fromHex()- Have hex stringfromBytes()- Have byte arrayfrom()- Type unknown or mixed inputs

