Skip to main content
Version: Next

Function: isSierra()

isSierra(contract): contract is CompiledSierra | SierraContractClass

Defined in: src/utils/contract.ts:26

Checks if a given contract is in Sierra (Safe Intermediate Representation) format.

Parameters

contract

string | CairoContract

The contract to check. Can be either a CairoContract object or a string representation of the contract.

Returns

contract is CompiledSierra | SierraContractClass

  • Returns true if the contract is a Sierra contract, otherwise false.

Example

const result = isSierra(contract);
// result = true | false