The UniquePayments struct manages a collection of payment transactions. It is designed to store and manipulate unique payment entries, ensuring no duplicates are recorded.
PaymentsVec<M>: A managed vector of ESDT token payments specific to the MultiversX blockchain.UniquePayments<M>
Default for UniquePayments<M>
UniquePayments, which contains an empty vector of payments.new() -> Self
UniquePayments.new_from_unique_payments(payments: PaymentsVec<M>) -> Self
UniquePayments from an existing vector of unique payments.new_from_payments(payments: PaymentsVec<M>) -> Self
UniquePayments instance by merging payments into a unique collection.add_payment(p: &EsdtTokenPayment<M>)
withdraw_payments(payment: &EsdtTokenPayment<M>)
UniquePayments struct is instantiated with either the new, new_from_unique_payments, or new_from_payments methods.add_payment method allows adding new payment entries while maintaining the uniqueness of the payments vector.