API Reference

Collect Fees

This method allows the user to collect the fees accrued on their position. The fees for both coin A and B are collected and sent to caller's address. The following interfaces can be used to call the method, with the arguments described below:

Interfaces


 public entry fun collect_fee<CoinTypeA,CoinTypeB>(
        clock: &Clock,
        protocol_config: &GlobalConfig, 
        pool: &mut Pool<CoinTypeA, CoinTypeB>,
        position: &mut Position,
        ctx: &mut TxContext) {
        abort 0
     }

    /// Parameters:
    /// - clock                 : Sui clock object
    /// - protocol_config       : The `config::GlobalConfig` object used for version verification
    /// - pool                  : Mutable reference to the pool on which the position exists
    /// - position              : The position for which the fee is to be collected
    /// - ctx                   : Murable reference to caller's transaction context
    /// 
    /// Events Emitted          : UserFeeCollected