ERC-721 Burnable
ERC-721 Token that can be burned (destroyed).
Usage
In order to make ERC-721 Burnable
methods “external” so that other contracts can call them, you need to implement them by yourself for your final contract as follows:
use openzeppelin_stylus::token::erc721::{
self, extensions::IErc721Burnable, Erc721, IErc721,
};
#[entrypoint]
#[storage]
struct Erc721Example {
#[borrow]
erc721: Erc721,
}
#[public]
#[inherit(Erc721)]
impl Erc721Example {
fn burn(&mut self, token_id: U256) -> Result<(), erc721::Error> {
// ...
self.erc721.burn(token_id)
}
}