Deserialization in Cairo
tdey audits
1 min read
Serialization of uint256 values in Cairo
In Cairo uint256 is represented as two felt252 values of 128 bit each
The first felt252 value represent the least significant bits, low part
The second felt252 value represent the most significant bits, high part
Taking examples from the Starkent documentation, let’s try to understand serialization
Serialization of 2
Serialization of 2^128
Serialization of 2^129 + 2^128 + 20
0
Subscribe to my newsletter
Read articles from tdey audits directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by