I'm having erc1155 smart contract which is using following base url: https://token-cdn-domain/{id}.json. When i try to get the uri for token with id 5 for example i receive this: https://token-cdn-domain/5.json but in ipfs they are stored with leading zero padded to 64 hex characters length and 5 looks like this 0000000000000000000000000000000000000000000000000000000000000005.json any idea how to provide the correct uri?

  • Are you asking how to format the 5 in solidity or in js?
    – Richard
    Commented Jan 11, 2022 at 12:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.