Open tdelabro opened 7 months ago
Hello, can this task be assigned to me?
@raizo07 I would love it if you could implement it, sadly I'm not the manager of this repo. @noaov1 is more likely to give you the green light
also I had to create those methods:
pub fn get_transaction_hash(tx: &Transaction) -> &TransactionHash {
match tx {
Transaction::AccountTransaction(tx) => get_account_transaction_hash(tx),
Transaction::L1HandlerTransaction(tx) => &tx.tx_hash,
}
}
pub fn get_account_transaction_hash(tx: &AccountTransaction) -> &TransactionHash {
match tx {
AccountTransaction::Invoke(tx) => &tx.tx_hash,
AccountTransaction::Declare(tx) => &tx.tx_hash,
AccountTransaction::DeployAccount(tx) => &tx.tx_hash,
}
}
Just add some getters please :)
https://github.com/keep-starknet-strange/madara/blob/main/crates/primitives/transactions/src/getters.rs#L51
In madara we added a set of common getters for all our tx types. You should do that for the one defined in blockifier too. It would avoid lib users having to write this type of bad boilerplate code all the time:
This should be a trait.