This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// source: uniswap | |
library Address { | |
/** | |
* @dev Returns true if `account` is a contract. | |
* | |
* This test is non-exhaustive, and there may be false-negatives: during the | |
* execution of a contract's constructor, its address will be reported as | |
* not containing a contract. | |
* | |
* > It is unsafe to assume that an address for which this function returns |
Endianness refers to the way in which bytes are ordered in computer memory. It is essential to understand endianness when working with computer memory and saving or fetching numbers in it. There are two types of endianness: big-endian and little-endian.
In big-endian, the most significant byte (MSB) is stored at the lowest memory address, while the least significant byte (LSB) is stored at the highest memory address. This means that if we have a 4-byte integer 0x12345678
, it will be stored in memory as follows:
Address | Value |
---|