diff --git a/modules/nft/src/lib.rs b/modules/nft/src/lib.rs index 207bb0cd8..e382e5cd8 100644 --- a/modules/nft/src/lib.rs +++ b/modules/nft/src/lib.rs @@ -33,7 +33,7 @@ use frame_support::{ transactional, PalletId, }; use frame_system::pallet_prelude::*; -use orml_traits::NFT; +use orml_traits::InspectExtended; use primitives::{ nft::{Attributes, ClassProperty, NFTBalance, Properties, CID}, ReserveIdentifier, @@ -506,16 +506,14 @@ impl Pallet { } } -impl NFT for Pallet { - type ClassId = ClassIdOf; - type TokenId = TokenIdOf; +impl InspectExtended for Pallet { type Balance = NFTBalance; fn balance(who: &T::AccountId) -> Self::Balance { orml_nft::TokensByOwner::::iter_prefix((who,)).count() as u128 } - fn next_token_id(class: Self::ClassId) -> Self::TokenId { + fn next_token_id(class: Self::ClassId) -> Self::InstanceId { orml_nft::Pallet::::next_token_id(class) } } diff --git a/orml b/orml index 419ac91d7..6796bbd95 160000 --- a/orml +++ b/orml @@ -1 +1 @@ -Subproject commit 419ac91d7e116765f747b3acdbf3c49502dc5d6c +Subproject commit 6796bbd95c5f35be1f20df18e9fd33400d8896c3 diff --git a/runtime/common/src/precompile/nft.rs b/runtime/common/src/precompile/nft.rs index 2d597399f..4fc414936 100644 --- a/runtime/common/src/precompile/nft.rs +++ b/runtime/common/src/precompile/nft.rs @@ -27,7 +27,7 @@ use sp_core::H160; use sp_runtime::RuntimeDebug; use sp_std::{borrow::Cow, marker::PhantomData, prelude::*, result}; -use orml_traits::NFT as NFTT; +use orml_traits::InspectExtended; use super::input::{Input, InputT, Output}; use num_enum::{IntoPrimitive, TryFromPrimitive}; @@ -55,7 +55,7 @@ pub enum Action { impl Precompile for NFTPrecompile where Runtime: module_evm::Config + module_prices::Config + module_nft::Config, - module_nft::Pallet: NFTT + module_nft::Pallet: InspectExtended + Inspect + Transfer, {