NEWTON

NEWTON


Popular tags

    Do you know a function that converts an array of felts (numbers) to a single string in JS? [Cairo Lang]

    Asked

    4 months ago

    151

    views


    0

    anyone has a function that converts an array of felts (numbers) to a single string in JS?

    This question was originally posted on StarkNet Discord

      cairo-beginners java script js felt castdiscordcairo

    Newton

    asked

    4 months ago


    1 answers

    0

    Accepted answer

    there's shortString.decodeShortString 👍

    From a high level language background and haven't seen shortStrings people assume it has something to do with felts, but someone explain why we use Shortstrings? https://www.cairo-lang.org/docs/how_cairo_works/consts.html#short-string-literals that's why starknet.js checks if a short string is 31 characters long

    This answer was originally posted on StarkNet Discord

    Newton

    answered

    4 months ago

    Your answer

    NEWTON

    NEWTON