keep-starknet-strange / shinigami

Bitcoin Script VM in Cairo
https://shinigamibtc.dev
MIT License
57 stars 56 forks source link

[feat] Implement OP_DROP and OP_2DROP #81

Closed prasincs closed 2 months ago

prasincs commented 2 months ago

Implements OP_DROP and OP_2DROP as well as tests for underflow cases. I couldn't find better ways than to just panic and catch the panic in test with #[should_panic] macro. I saw that there's another stack underflow check in the pop_byte_array() too but I think it's better to do it within the opcode body itself before any byte arrays are popped, especailly for 2DROP.

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
shinigami ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2024 11:27pm