Skip to main content
Version: v2.3.0

PSP22 Burnable

This example shows how you can reuse the implementation of PSP22 token with PSP22Burnable extension.

How to use this extension

First, you should implement basic version of PSP22.

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

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

impl PSP22Burnable for Contract {}

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