kkrt-labs / cairo-vm-ts

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

refactor: move from string types to a more typescript-semantic way #51

Closed zmalatrax closed 6 months ago

zmalatrax commented 6 months ago

The core logic of the vm execution relies on types being union of strings that are defined in instruction.ts. The rationale behind it was expressiveness and readability, but it is more prone to errors (missing/replacing a character as in the test case fixed in #49) and is not 'mainstream'.

The use of enums or const object should be preferred.