Content pfp
Content
@
https://ethereum.org
0 reply
0 recast
0 reaction

Trashpirate pfp
Trashpirate
@trashpirate.eth
Have you been using abi.encode() but you actually are not sure what really happens under the hood? Here is a hopefully straight forward explanation what abi.encode() really does.
1 reply
0 recast
0 reaction

Trashpirate pfp
Trashpirate
@trashpirate.eth
When you use abi.encode() the following operations take place: 1. Encoding: Each data type is converted into a binary format 2. Padding: The binary data is padded to encode fixed-size data types (such as uint256, address, bool, etc.) to 32-byte (256-bit) chunks and dynamic-sized data types by first encoding the length of the data followed by the actual data (like fixed-sized data) 3. Concatenation: The encoded values are concatenated to a single byte array.
1 reply
0 recast
0 reaction