Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Important: If you're upgrading snforge to version 0.48.0 or later, please read the 0.48.0 Migration Guide.

FeeSettingsTrait

#[generate_trait]
pub trait FeeSettingsTrait {
    /// Sets transaction resource bounds with specified gas values.
    fn resource_bounds(
        l1_gas: u64,
        l1_gas_price: u128,
        l2_gas: u64,
        l2_gas_price: u128,
        l1_data_gas: u64,
        l1_data_gas_price: u128
    ) -> FeeSettings;

    /// Ensures that total resource bounds of transaction execution won't exceed the given value.
    fn max_fee(max_fee: felt252) -> FeeSettings;

    /// Performs an automatic estimation of the resource bounds.
    fn estimate() -> FeeSettings;
}