kkrt-labs / kakarot-ssj

Kakarot zkEVM - rewrite in the latest version of Cairo
https://www.kakarot.org
MIT License
137 stars 81 forks source link

dev: investigate Scarb macros to simulate a default entrypoint call #818

Open enitrat opened 3 months ago

enitrat commented 3 months ago

CairoZero had __default__ entrypoints, calling default would fallback on a generic behavior. We don't have this now, but what we can do is create a special type of DefaultDispatcher, that would wrap the internal call to a call to __default__ on a given contract.

Perhaps this can be simplified with a Scarb Macro that, given a starknet interface, would generate the dispatcher that abstracts this default call.

enitrat commented 2 months ago

Tracking discussion https://github.com/starkware-libs/cairo/issues/6170