kkrt-labs / cairo-vm-ts

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

feat: extract Relocatable from ResOperand #129

Closed zmalatrax closed 1 month ago

zmalatrax commented 1 month 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.