From c39a40ed46981a1fe6dd0860d5715552c95d6cb1 Mon Sep 17 00:00:00 2001 From: Daniel Bigos Date: Tue, 15 Oct 2024 10:55:01 +0200 Subject: [PATCH] ref: add IErc721Consecutive trait Refers #336 --- contracts/src/token/erc721/extensions/burnable.rs | 2 +- contracts/src/token/erc721/extensions/consecutive.rs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/contracts/src/token/erc721/extensions/burnable.rs b/contracts/src/token/erc721/extensions/burnable.rs index 31d5701b8..12593ecfe 100644 --- a/contracts/src/token/erc721/extensions/burnable.rs +++ b/contracts/src/token/erc721/extensions/burnable.rs @@ -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>; /// Burns `token_id`. diff --git a/contracts/src/token/erc721/extensions/consecutive.rs b/contracts/src/token/erc721/extensions/consecutive.rs index 60e286679..d0f7d8818 100644 --- a/contracts/src/token/erc721/extensions/consecutive.rs +++ b/contracts/src/token/erc721/extensions/consecutive.rs @@ -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>; +} + +impl IErc721Consecutive for Erc721Consecutive { + type Error = Error; +} + #[public] impl IErc721 for Erc721Consecutive { type Error = Error;