kkrt-labs / cairo-vm-ts

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

feat: implement dict hints primitives #106

Closed zmalatrax closed 3 months ago

zmalatrax commented 4 months ago

Closes #102, closes #103, closes #104, closes #105, closes #107, closes #108, closes #109, closes #110, closes #111, closes #112, closes #113, closes #114, closes #115, closes #116, closes #117, closes #118

To execute and implement hints related to dictionnaries, a few things must be implemented first:

Once done, dictionnaries can be handled.

Implemented hint Usage
AllocFelt252Dict Dictionnary initialization
Felt252DictEntryInit Dictionnary usage (methods from dict.cairo)
Felt252DictEntryUpdate Dictionnary usage (methods from dict.cairo)
GetSegmentArenaIndex Dictionnary finalization
InitSquashData Dictionnary finalization
GetCurrentAccessIndex Dictionnary finalization
ShouldSkipSquashLoop Dictionnary finalization
GetCurrentAccessDelta Dictionnary finalization
ShouldContinueSquashLoop Dictionnary finalization
GetNextDictKey Dictionnary finalization
AssertLeFindSmallArcs Dictionnary finalization
AssertLeIsFirstArcExcluded Dictionnary finalization
AssertLeIsSecondArcExcluded Dictionnary finalization