kkrt-labs / cairo-vm-ts

A typescript implementation of the Cairo VM
Apache License 2.0
20 stars 13 forks source link

feat: extract Relocatable from ResOperand #129

Closed zmalatrax closed 3 months ago

zmalatrax commented 3 months ago

TestLessThanOrEqualAddress requires the possibility to extract Relocatable from a ResOperand.

Current method getResOperandValue() only extracts Felt.

Either adapt it or create a gesResOperandAddress() that only extracts Relocatable.

Having two distinct methods allows enforcing the Felt or Relocatable value directly in the vm API rather than adding checks in the hints.