Is there any method that can be called or algorithm that will help to calculate transaction fee?
Yup! ContractCallHandler in fuels::programs::contract - Rust
https://fuellabs.github.io/fuels-rs/master/calling-contracts/cost-estimation.html?highlight=estimate_transaction_cost#estimating-contract-call-cost
Thanks for an answer lot!