diff --git a/pallets/asset-registry/src/lib.rs b/pallets/asset-registry/src/lib.rs index f1c7e0bfc..162b9d697 100644 --- a/pallets/asset-registry/src/lib.rs +++ b/pallets/asset-registry/src/lib.rs @@ -46,7 +46,7 @@ pub use pallet::*; pub use crate::types::{AssetDetails, AssetMetadata}; use frame_support::BoundedVec; -use hydradx_traits::{AssetKind, CreateRegistry, InspectRegistry, Registry, RegistryQueryForEvm, ShareTokenRegistry}; +use hydradx_traits::{AssetKind, CreateRegistry, InspectRegistry, Registry, ShareTokenRegistry}; #[frame_support::pallet] pub mod pallet { @@ -551,32 +551,6 @@ impl Pallet { } } -impl RegistryQueryForEvm for Pallet { - fn retrieve_asset_name(id: T::AssetId) -> Result::StringLimit>, DispatchError> { - if let Some(details) = Assets::::get(id) { - Ok(details.name) - } else { - Err(Error::::AssetNotFound.into()) - } - } - - fn retrieve_asset_symbol(id: T::AssetId) -> Result::StringLimit>, DispatchError> { - if let Some(meta) = AssetMetadataMap::::get(id) { - Ok(meta.symbol) - } else { - Err(Error::::AssetNotFound.into()) - } - } - - fn retrieve_asset_decimals(id: T::AssetId) -> Result { - if let Some(meta) = AssetMetadataMap::::get(id) { - Ok(meta.decimals) - } else { - Err(Error::::AssetNotFound.into()) - } - } -} - impl Registry, T::Balance, DispatchError> for Pallet { fn exists(asset_id: T::AssetId) -> bool { Assets::::contains_key(asset_id) diff --git a/runtime/hydradx/src/evm/precompiles/multicurrency.rs b/runtime/hydradx/src/evm/precompiles/multicurrency.rs index f694d3251..3504066e3 100644 --- a/runtime/hydradx/src/evm/precompiles/multicurrency.rs +++ b/runtime/hydradx/src/evm/precompiles/multicurrency.rs @@ -35,7 +35,6 @@ use crate::{ }; use codec::EncodeLike; use frame_support::traits::OriginTrait; -use hydradx_traits::RegistryQueryForEvm; use num_enum::{IntoPrimitive, TryFromPrimitive}; use orml_traits::{MultiCurrency as MultiCurrencyT, MultiCurrency}; use pallet_evm::{AddressMapping, ExitRevert, Precompile, PrecompileFailure, PrecompileHandle, PrecompileResult}; diff --git a/traits/src/registry.rs b/traits/src/registry.rs index 2f21af738..57359d48d 100644 --- a/traits/src/registry.rs +++ b/traits/src/registry.rs @@ -18,15 +18,6 @@ pub trait Registry { } } } - -pub trait RegistryQueryForEvm { - fn retrieve_asset_name(name: AssetId) -> Result, Error>; - - fn retrieve_asset_symbol(name: AssetId) -> Result, Error>; - - fn retrieve_asset_decimals(name: AssetId) -> Result; -} - // Use CreateRegistry if possible pub trait ShareTokenRegistry: Registry { fn retrieve_shared_asset(name: &AssetName, assets: &[AssetId]) -> Result;