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

Return `Result` in `stark_sign_message` and `ecdsa_sign_message` cheatcodes #2116

Closed Draggu closed 2 months ago

Draggu commented 2 months ago

Which components does the task require to be changed? (think hard pls)

snforge

Description

cheatcode::<'stark_sign_message'>() and cheatcode::<'ecdsa_sign_message'>() currently panic with 'invalid secret_key' or 'message_hash out of range', we should return Result instead.