Skip to content

NFT Example from book is not complete/accurate #9

Description

@gurugeek

the example at https://github.com/clarity-lang/book/blob/main/projects/sip009-nft/contracts/marvin-token.clar for instance

(define-read-only (get-token-uri (token-id uint))
	(ok none)
)

This will essentially show no image, so by definition is not a valid NTF. I assume that this should be changed to something like


(define-read-only (get-token-uri (token-id uint))

	(ok (some "https://....../{id}.json"))
)

or something similar with an IPFS address if one prefers to use that.

I think that Stacks looks very interesting and has a lot of potential but the only two tutorials available online are the one of this book and the one from hiro.so that is also wrong (doesn't provide with a viable example of a token to be minted only by the owner).

I really think that having a clear and updated NFT contract tutorial is absolutely crucial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions