Parameters
- class_hashstringREQUIRED
The hash of the contract class whose CASM will be returned
Returns
- resultobject
The compiled contract class with the following fields:
- bytecodearray
The CASM bytecode of the compiled class
- compiler_versionstring
The version of the Cairo compiler used to compile the class
- entry_points_by_typeobject
The entry points of the compiled class, grouped into the CONSTRUCTOR, EXTERNAL and L1_HANDLER keys. Each entry point has the following fields
- selectorstring
A unique identifier of the entry point (function) in the program
- offsetinteger
The offset of the instruction in the class's bytecode
- builtinsarray
The list of builtins used by the entry point, for example 'range_check' or 'pedersen'
- hintsarray
The hints of the compiled class, given as [bytecode index, list of hints] pairs. Each hint is an object keyed by its type, for example 'TestLessThanOrEqual' or 'AllocSegment', whose value holds the hint's operands
- primestring
The prime field of the Cairo VM
- bytecode_segment_lengthsarray
(Optional) A list of sizes of segments in the bytecode, each segment is hashed individually when computing the bytecode hash. Only returned for classes compiled with Sierra 1.5.0 or above