soroban_env_host::fees

Function compute_transaction_resource_fee

Source
pub fn compute_transaction_resource_fee(
    tx_resources: &TransactionResources,
    fee_config: &FeeConfiguration,
) -> (i64, i64)
Expand description

Computes the resource fee for a transaction based on the resource consumption and the fee-related network configuration.

This can handle unsantized user inputs for tx_resources, but expects sane configuration.

Returns a pair of (non_refundable_fee, refundable_fee) that represent non-refundable and refundable resource fee components respectively.