Skip to main content
Version: 11.x

Function: computeHintedClassHash()

computeHintedClassHash(compiledContract): string

Defined in: src/utils/hash/classHash/cairo0.ts:48

Compute hinted class hash for legacy compiled contract (Cairo 0)

Parameters​

compiledContract​

LegacyCompiledContract

Returns​

string

hex-string

Example​

const compiledCairo0 = json.parse(fs.readFileSync("./cairo0contract.json").toString("ascii"));
const result=hash.computeHintedClassHash(compiledCairo0);
// result = "0x293eabb06955c0a1e55557014675aa4e7a1fd69896147382b29b2b6b166a2ac"