diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/serialization_of_Cairo_types.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/serialization_of_Cairo_types.adoc index 7f21152447..b30874cc75 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/serialization_of_Cairo_types.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/serialization_of_Cairo_types.adoc @@ -1,7 +1,7 @@ [id="serialization_of_types_in_Cairo"] = Serialization of Cairo types -When you interact with contracts, especially if you are a library or SDK developer that wants to construt transactions, you need to understand how Cairo handles types that are larger than 252 bits so you can correctly formulate the calldata in a transaction. +When you interact with contracts, especially if you are a library or SDK developer that wants to construct transactions, you need to understand how Cairo handles types that are larger than 252 bits so you can correctly formulate the calldata in a transaction. The field element (`felt252`), which contains 252 bits, is the only actual type in the Cairo VM. So all high-level Cairo types that are larger than 252 bits, such as `u256` or arrays, are ultimately represented by a list of felts. In order to interact with a contract, you need to know how to encode its arguments as a list of felts so you can correctly formulate the calldata in the transaction. SDKs, such as starknet.js, encode the calldata for you, so you can simply specify any type and the SDK properly formulates the calldata. For example, you don’t need to know that a `u256` value is represented by two `felt252` values. You can simply specify a single integer in your code, and the SDK takes care of the serialization and encoding.