Skip to content

String support #11

@fracek

Description

@fracek

When discussing #9 we sort of ignored that implementing tokenUri requires a way to implement strings in Cairo. Strings are also used in ERC-20 (for the optional but so convenient symbol and name methods) and we have seen projects using them to generate dynamic NFT images (returning the NFT as svg).

In discord we mentioned that strings can be implemented by storing bytes in felts (251 bits or 31 bytes per felt). One issue is that, since StarkNet storage cannot store arrays, that's also the maximum string length that can be stored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions