0xSpaceShard / starknet-devnet-rs

A local testnet for Starknet... in Rust
https://0xspaceshard.github.io/starknet-devnet-rs/
MIT License
100 stars 56 forks source link

L2 gas fix tx v3 #528

Closed mikiw closed 2 weeks ago

mikiw commented 2 weeks ago

Usage related changes

Checklist:

mikiw commented 2 weeks ago

I think that this is_max_fee_zero_value function should be renamed and abstracted as a validate() function, seems more robust and convenient but it's leading to error mapping problem...

mikiw commented 2 weeks ago

abstractions improvements that could allow to return of different error types due to different validation problems is leading to major code refactoring for invoke, deploy, declare transactions which all rely on is_max_fee_zero_value() function

it leads to the idea of just a detailed error string:

    #[error(
        "{tx_type}: max_fee cannot be zero (exception is v3 transaction where l2 gas must be zero)"
    )]

but I'm not happy with that solution :pensive: