This trait should exist and be implemented on each transaction type:
pub trait ComputeTransactionHash {
fn compute_hash<H: HasherT>(&self, chain_id: Felt, is_query: bool) -> TransactionHash;
}
The problem is that in order to compute the hash of a transaction, we need to know its version. And with DeclareTransactionV0V1 we can't know what is the actual version without some external additional data, it could be 0 it could be 1, making it impossible to use the same trait as for the other transaction types.
I propose this type is removed, and split into two different structs.
Also, correct me if I'm wrong, but DeclareV0 has no nonce, so there is no reason to represent it with a type that contains a nonce field