You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// The hash of a ContractClass.#[derive(Debug,Default,Copy,Clone,Eq,PartialEq,Hash,Deserialize,Serialize,PartialOrd,Ord,Display,)]#[cfg_attr( feature = "parity-scale-codec", derive(parity_scale_codec::Encode, parity_scale_codec::Decode))]#[cfg_attr(feature = "scale-info", derive(scale_info::TypeInfo))]pubstructClassHash(pubStarkHash);/// The hash of a compiled ContractClass.#[derive(Debug,Default,Copy,Clone,Eq,PartialEq,Hash,Deserialize,Serialize,PartialOrd,Ord,Display,)]#[cfg_attr( feature = "parity-scale-codec", derive(parity_scale_codec::Encode, parity_scale_codec::Decode))]#[cfg_attr(feature = "scale-info", derive(scale_info::TypeInfo))]pubstructCompiledClassHash(pubStarkHash);
So we have two really similar struct here.
We are using two types of class hashes in Starknet, the hash of the contract compiled to sierra and the one of the contract compiled to casm.
So my guess is that ClassHash is SierraClassHash and CompiledClassHash is for CasmClassHash.
But that could be the opposite. It's misleading because both hashes are the hashes of a compiled object, one to Sierra, and the other to Casm.
It could also be that the first one is the hash of something that is not compiled (in opposition to the second), so is the hash of the .cairo files? Or the hash of the in-memory ContractClass struct?
Would it be possible to shed some light on this? And change in naming to make it explicit for lib users. And some doc.
The text was updated successfully, but these errors were encountered:
So we have two really similar struct here.
We are using two types of class hashes in Starknet, the hash of the contract compiled to sierra and the one of the contract compiled to casm.
So my guess is that
ClassHash
isSierraClassHash
andCompiledClassHash
is forCasmClassHash
.But that could be the opposite. It's misleading because both hashes are the hashes of a compiled object, one to Sierra, and the other to Casm.
It could also be that the first one is the hash of something that is not compiled (in opposition to the second), so is the hash of the
.cairo
files? Or the hash of the in-memoryContractClass
struct?Would it be possible to shed some light on this? And change in naming to make it explicit for lib users. And some doc.
The text was updated successfully, but these errors were encountered: