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

feat: recover from declaration of existing class hash #2099

Open tserg opened 2 months ago

tserg commented 2 months ago

Which component is your feature related to?

Cast

Feature Request

Currently, trying to declare(..) an already declared contract where the declare transaction is not in the state file causes sncast to throw. It would be nice if sncast could recover from this error on its own and declare the contract instead, then adding it to the state file.