Open abulenok opened 10 months ago
Can also come in handy for state files
https://github.com/foundry-rs/starknet-foundry/pull/1710/files#r1490733410
In https://github.com/foundry-rs/starknet-foundry/pull/1710 StarknetCommandError
was introduced. Some subcommands use .map_err(handle_starknet_command_error)
which converts StarknetCommandError
to anyhow::Error
.
One way to improve this would be to make all subcommands return StarknetCommandError
, the other one is to replace handle_starknet_command_error
with impl From<StarknetCommandError> for anyhow::Error
and make print_command_result
accept Result<T, E>
where E can be converted to anyhow::Error.
we should also include transaction hash somewhere in the StarknetCommandError
(maybe as a part of TransactionError)
Which components does the task require to be changed? (think hard pls)
sncast
Description
... and incorporate transaction hash in the error struct
https://github.com/foundry-rs/starknet-foundry/pull/1358/files#r1440261704