/// Create a new kitty
///
/// NOTE: Calling this function will bypass origin filters.
Create a new kitty
NOTE: Calling this function will bypass origin filters.
Create a new kitty NOTE : Calling this function will bypass origin filters .
pub fn create(origin: T::Origin) -> ::frame_support::dispatch::DispatchResult {
        let __within_span__ = {
            use ::tracing::__macro_support::Callsite as _;
            static CALLSITE: ::tracing::__macro_support::MacroCallsite = {
                use ::tracing::__macro_support::MacroCallsite;
                static META: ::tracing::Metadata<'static> = {
                    ::tracing_core::metadata::Metadata::new(
                        "create",
                        "pallet_kitties",
                        ::tracing::Level::TRACE,
                        Some("pallets/kitties/src/lib.rs"),
                        Some(110u32),
                        Some("pallet_kitties"),
                        ::tracing_core::field::FieldSet::new(
                            &[],
                            ::tracing_core::callsite::Identifier(&CALLSITE),
                        ),
                        ::tracing::metadata::Kind::SPAN,
                    )
                };
                MacroCallsite::new(&META)
            };
            let mut interest = ::tracing::subscriber::Interest::never();
            if ::tracing::Level::TRACE <= ::tracing::level_filters::STATIC_MAX_LEVEL
                && ::tracing::Level::TRACE <= ::tracing::level_filters::LevelFilter::current()
                && {
                    interest = CALLSITE.interest();
                    !interest.is_never()
                }
                && CALLSITE.is_enabled(interest)
            {
                let meta = CALLSITE.metadata();
                ::tracing::Span::new(meta, &{ meta.fields().value_set(&[]) })
            } else {
                let span = CALLSITE.disabled_span();
                {};
                span
            }
        };
        let __tracing_guard__ = __within_span__.enter();
        {
            let sender = ensure_signed(origin)?;
            let dna = Self::random_value(&sender);
            let kitty = Kitty(dna);
            let kitty_id =
                NftModule::<T>::mint(&sender, Self::class_id(), Vec::new(), kitty.clone())?;
            Self::deposit_event(RawEvent::KittyCreated(sender, kitty_id, kitty));
        }
        Ok(())
    }
pub fn create ( origin : T :: Origin ) -> :: frame_support :: dispatch :: DispatchResult { let __within_span__ = { use :: tracing :: __macro_support :: Callsite as _ ; static CALLSITE : :: tracing :: __macro_support :: MacroCallsite = { use :: tracing :: __macro_support :: MacroCallsite ; static META : :: tracing :: Metadata < ' static > = { :: tracing_core :: metadata :: Metadata :: new ( " " , " " , :: tracing :: Level :: TRACE , Some ( " " ) , Some ( 110u32 ) , Some ( " " ) , :: tracing_core :: field :: FieldSet :: new ( & [ ] , :: tracing_core :: callsite :: Identifier ( & CALLSITE ) , ) , :: tracing :: metadata :: Kind :: SPAN , ) } ; MacroCallsite :: new ( & META ) } ; let mut interest = :: tracing :: subscriber :: Interest :: never ( ) ; if :: tracing :: Level :: TRACE <= :: tracing :: level_filters :: STATIC_MAX_LEVEL && :: tracing :: Level :: TRACE <= :: tracing :: level_filters :: LevelFilter :: current ( ) && { interest = CALLSITE . interest ( ) ; ! interest . is_never ( ) } && CALLSITE . is_enabled ( interest ) { let meta = CALLSITE . metadata ( ) ; :: tracing :: Span :: new ( meta , & { meta . fields ( ) . value_set ( & [ ] ) } ) } else { let span = CALLSITE . disabled_span ( ) ; { } ; span } } ; let __tracing_guard__ = __within_span__ . enter ( ) ; { let sender = ensure_signed ( origin ) ? ; let dna = Self :: random_value ( & sender ) ; let kitty = Kitty ( dna ) ; let kitty_id = NftModule :: < T > :: mint ( & sender , Self :: class_id ( ) , Vec :: new ( ) , kitty . clone ( ) ) ? ; Self :: deposit_event ( RawEvent :: KittyCreated ( sender , kitty_id , kitty ) ) ; } Ok ( ( ) ) }
Create a new kitty
NOTE: Calling this function will bypass origin filters.
Create a new kitty NOTE : Calling this function will bypass origin filters .
origin
T::Origin