pendzl_contracts 1.0.2

Reusable implementations of contracts and traits for interaction with them.
Documentation
// Copyright (c) 2012-2022 Supercolony. All Rights Reserved.
// Copyright (c) 2023 Brushfam. All Rights Reserved.
// Copyright (c) 2024 C Forge. All Rights Reserved.
// SPDX-License-Identifier: MIT

use super::super::PSP22Error;
use ink::{contract_ref, env::DefaultEnvironment, primitives::AccountId};
pub use pendzl::traits::Balance;
pub type PSP22BurnableRef = contract_ref!(PSP22Burnable, DefaultEnvironment);

/// trait extending PSP22 with burn functionality
#[ink::trait_definition]
pub trait PSP22Burnable {
    /// Destroys `amount` tokens from `account`, deducting from the caller's
    /// allowance.
    ///
    /// See [`PSP22Internal::_burn_from`].
    #[ink(message)]
    fn burn(
        &mut self,
        account: AccountId,
        amount: Balance,
    ) -> Result<(), PSP22Error>;
}