foundry-rs / starknet-foundry

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

Complex error asserting #2114

Open MaksymilianDemitraszek opened 2 months ago

MaksymilianDemitraszek commented 2 months ago

We need a way to assert complex errors involving dynaminc data like contract addresses.

https://github.com/foundry-rs/starknet-foundry/blob/991a868850317e10aead3c1cdcd13c667fc435de/crates/forge/tests/integration/l1_handler_executor.rs#L95

https://github.com/foundry-rs/starknet-foundry/blob/b5e00a0928f95300962298eebad9fe78f2ce888a/crates/forge/tests/integration/dispatchers.rs#L195

This is also a problem for user asserts. User can't check the error reason.