Skip to main content

exceeds_spending_limit

Function exceeds_spending_limit 

Source
pub(crate) fn exceeds_spending_limit(
    provider: &mut impl StateProvider,
    subject: &KeychainSubject,
    fee_token_cost: U256,
) -> bool
Expand description

Checks whether a pending keychain tx exceeds its remaining spending limit.

Re-reads the current remaining limit from state for the tx’s (account, key_id, fee_token) combo. Returns true if the tx’s fee cost exceeds the remaining limit, meaning it should be evicted.