Closed whoabuddy closed 1 year ago
From Jamil: having a non-standard SIP-009 function that returns image as SVG, and get-token-uri as SIP-009 standard does expect a URI to be passed in.
Done before: Stacks Plates
STXPlates: https://explorer.stacks.co/txid/SP1CSHTKVHMMQJ7PRQRFYW6SB4QAW6SR3XY2F81PA.stxplates?chain=mainnet
(print "Each plate is represented on-chain as a 21x21 grid of pixels (drawn left-to-right, top-to-bottom). To get the pixel hex values for a token, get the string from image-by-token for that token. Each number in the string represents an index in the image-key list.")
Noting that the original code is still in the stacks-svg
repo and needs to be integrated with the Bitcoin Colors contract.
Closing after discussion on simplifying scope of the approach - SVG creation no longer needs to be optimized and reconstructed in Clarity.
One step we need to look at is how the metadata will be handled.
If the contract returns SVG values, how will they be displayed compared to a current SIP-009 URI?
There are definitely some examples from other projects we can use here, this blog post is a good reference of other SVG-on-chain projects.