Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why there has these functions inside the code? #2

Open
howardpen9 opened this issue Jul 11, 2022 · 2 comments
Open

Why there has these functions inside the code? #2

howardpen9 opened this issue Jul 11, 2022 · 2 comments

Comments

@howardpen9
Copy link

howardpen9 commented Jul 11, 2022

  1. What is the purpose to create a new lens here? ( )

image

  1. For function tokenURL, why need these line of code to connect each Strings? Can you explain?
    parts[0] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.base { fill: white; font-family: courier; font-size: 11px; }</style><rect width="100%" height="100%" fill="black" /><text x="10" y="20" class="base">SPELL #';

image

Thank you.

@kassandraoftroy
Copy link
Owner

Yeah all of this part is just to create an on-chain svg image when someone calls tokenURI. There may be more optimized ways to do it, just made this part quickly

Repository owner deleted a comment from mepcovenkat97 Feb 23, 2024
Repository owner deleted a comment from leocsilva Mar 4, 2024
@nueverest
Copy link

nueverest commented Mar 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@nueverest @kassandraoftroy @howardpen9 and others