I am developing a cross-chain NFT transfer pallet that involves transferring both item metadata and collection metadata. To accomplish this, I need to access the data
field within the ItemMetadata
struct provided by the FRAME NFT pallet. The challenge lies in the fact that the data
field is marked as private within the NFT pallet's codebase. Here is the relevant portion of the NFT pallet's code:
#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)]
#[scale_info(skip_type_params(StringLimit))]
pub struct ItemMetadata<Deposit, StringLimit: Get<u32>> {
/// The balance deposited for this metadata.
///
/// This pays for the data stored in this struct.
pub(super) deposit: Deposit,
/// General information concerning this item. Limited in length by `StringLimit`. This will
/// generally be either a JSON dump or the hash of some JSON which can be found on a
/// hash-addressable global publication system such as IPFS.
pub(super) data: BoundedVec<u8, StringLimit>,
}
I'm seeking a solution to access and utilize the data field in my cross-chain transfer functionality while respecting the privacy constraints set in the NFT pallet's design. Could anyone help me with this.