Skip to content

Commit

Permalink
ref: add IErc721Consecutive trait
Browse files Browse the repository at this point in the history
Refers #336
  • Loading branch information
bidzyyys committed Oct 15, 2024
1 parent 0006cc2 commit c39a40e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/src/token/erc721/extensions/burnable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::token::erc721::{Erc721, Error};

/// An [`Erc721`] token that can be burned (destroyed).
pub trait IErc721Burnable {
/// The error type associated to this ERC-721 burnable trait implementation.
/// The error type associated to the trait implementation.
type Error: Into<alloc::vec::Vec<u8>>;

/// Burns `token_id`.
Expand Down
10 changes: 10 additions & 0 deletions contracts/src/token/erc721/extensions/consecutive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ unsafe impl TopLevelStorage for Erc721Consecutive {}

// ************** ERC-721 External **************

/// Extension of [`Erc721`] that adds consecutive transfer.
pub trait IErc721Consecutive: IErc721 {
/// The error type associated to the trait implementation.
type Error: Into<alloc::vec::Vec<u8>>;
}

impl IErc721Consecutive for Erc721Consecutive {
type Error = Error;
}

#[public]
impl IErc721 for Erc721Consecutive {
type Error = Error;
Expand Down

0 comments on commit c39a40e

Please sign in to comment.