Skip to main content
Version: v2.3.0

PSP34 Burnable

This example shows how you can reuse the implementation of PSP34 token with PSP34Burnable extension.

How to use this extension

First, you should implement basic version of PSP34.

For your smart contract to use this extension, you only need to implement the PSP34Burnable trait in your PSP34 smart contract. Add import for openbrush::contracts::psp34::extensions::burnable::*, inherit the implementation for PSP34Burnable trait, where you can also customize (override) the original functions from PSP34Burnable.

use openbrush::contracts::psp34::extensions::burnable::*;

impl PSP34Burnable for Contract {}

And that's it! Your PSP34 is now extended by the PSP34Burnable extension and ready to use its functions! You can check an example of the usage of PSP34 Burnable.