foundry-rs / starknet-foundry

Blazing fast toolkit for developing Starknet contracts.
https://foundry-rs.github.io/starknet-foundry/
MIT License
308 stars 150 forks source link

L2 -> L1 messages extracting cheatcode #644

Closed Arcticae closed 2 months ago

Arcticae commented 1 year ago

⚠ This task is a design task, resolution will only be valid when a design doc is submitted (please refer to https://github.com/foundry-rs/starknet-foundry/tree/5465c41541c44a7804d16318fab45a2f0ccec9e7/design_documents for examples) ⚠

We need a cheatcode which will capture messages to L1 (approach similar to Spy), and will allow the user to fetch and assert the messages.

Implementation will probably be very similar to Spy for Events, please take that into account when designing the interface and behavior.

This will improve the parity with cairo-test

MaksymilianDemitraszek commented 1 year ago

We should also be able to assert l1 message emited from test code