ourzora / nft-metadata

generic nft metadata parsers
MIT License
65 stars 13 forks source link

fix: correctly implement EIP 1155 tokenId padding #40

Closed shrugs closed 2 years ago

shrugs commented 2 years ago

EIP 1155 requests that tokenIds be padded to "64 hex characters" but the current code pads the data to 64 bytes and then hexlifies it to 128 characters. the correct implementation is to just hexPad the data itself to the correct data length, which will naturally produce the correct hex character length.