dpp/state_transition/traits/
state_transition_addresses_fee_strategy.rs

1use crate::address_funds::AddressFundsFeeStrategy;
2
3/// Trait for state transitions that use an address-based fee strategy.
4///
5/// This trait provides access to the fee strategy for state transitions that
6/// deduct fees from input addresses or reduce output amounts.
7pub trait StateTransitionAddressesFeeStrategy {
8    /// Get the fee strategy for this state transition.
9    ///
10    /// The fee strategy defines how fees should be deducted from inputs
11    /// or outputs when processing the state transition.
12    fn fee_strategy(&self) -> &AddressFundsFeeStrategy;
13
14    /// Set the fee strategy for this state transition.
15    fn set_fee_strategy(&mut self, fee_strategy: AddressFundsFeeStrategy);
16}