#LSP7 Metadata not working

1 messages · Page 1 of 1 (latest)

agile vapor
#

Hey guys I have deployed and set metadata for my LSP7 token which can be seen right here https://erc725-inspect.lukso.tech/inspector?network=mainnet&address=0x3D6894787Ea0228237b408Ec04d1d1C39554Cb61

As you can see, LSP4Metadata is pointing to this ipfs CID https://api.universalprofile.cloud/ipfs/QmTXXCWcZfTrYK8aaNmJqHi1mKgr7T399EupL31ua4MdRG

I'm not understanding why it's not loading at all at universal profiles or universal page, need a bit of help knowing what I'm doing wrong please!!!

Universal Profile: https://universalprofile.cloud/asset/0x3D6894787Ea0228237b408Ec04d1d1C39554Cb61
Universal Page: https://universal.page/assets/lukso/0x3d6894787ea0228237b408ec04d1d1c39554cb61

#

<@&1202643107741704282>

cerulean hollow
#

The verification data is invalid. If you don't want verification then the method needs to be 0x00000000 otherwise you'd have to supply a good keccak value in the data field. up.cloud verifies each image.

#

Alternatively you could skip the whole verification object, but data=0x is invalid.

agile vapor
cerulean hollow
#

YEs the two in here json { "LSP4Metadata": { "name": "Chillwhales Head", "description": "First wearable drop from THE HUB DAO featuring Chillwhales. This LSP7 token can only be used once. If you equip it to your Citizen or Creator, this token will be burnt. Choose wisely!", "totalSupply": 69, "images": [ [ { "width": 1080, "height": 1080, "url": "ipfs://QmXSMGDhoRDsdNpdjQBXpDvp59fGwoeDppRZEDnvo1bc9W", "verification": { "method": "keccak256(bytes)", "data": "0x" } } ] ], "assets": [ { "url": "ipfs://QmTYx5uE8JRxT3d5BtPBY67Xo5hzdwosxbBrtzpuQw3P2o", "fileType": "video/mp4", "verification": { "method": "keccak256(bytes)", "data": "0x" } } ], "attributes": [ { "value": "Tier", "type": "string", "key": "Mythical" } ] } } and then assigning a new verifiableURI to LSP4Metadata, I didn't check whether the keccak there is ok, do you know? I assume so.

#

It's 0x717c3517cb1c5ff6815cfc31cbf705e3041ebc03198d9fc478a7f16a5504c149 checking.

agile vapor
#

Yep I'm assuming it's correct, being encoded with ERC725.js

#

Have to wait?

cerulean hollow
#

Where did you pin the content?

agile vapor
#

Filebase

cerulean hollow
#

I am getting a different keccak for the JSON 4be258bf487f72c2b765aa63bc6c87018b5f48abc8fd497a70bc991da66d78bf hmmm. I don't have the full lib attached though.

agile vapor
#

With this one json?

{"LSP4Metadata":{"name":"Chillwhales Head","description":"First wearable drop from THE HUB DAO featuring Chillwhales. This LSP7 token can only be used once. If you equip it to your Citizen or Creator, this token will be burnt. Choose wisely!","images":[[{"width":1080,"height":1080,"url":"ipfs://QmXSMGDhoRDsdNpdjQBXpDvp59fGwoeDppRZEDnvo1bc9W"}]],"assets":[{"url":"ipfs://QmTYx5uE8JRxT3d5BtPBY67Xo5hzdwosxbBrtzpuQw3P2o","fileType":"video/mp4"}],"attributes":[{"value":"Tier","type":"string","key":"Mythical"}]}}

#

I removed totalSupply

cerulean hollow
#

It looks wrong. Here is mine curl https://api.universalprofile.cloud/ipfs/QmTXXCWcZfTrYK8aaNmJqHi1mKgr7T399EupL31ua4MdRG | keccak-256sum => 284d396c6ff7a626585ef6c1ba08bb3a62edb33e66220aa930a9fbe07470236e and https://erc725-inspect.lukso.tech/inspector?network=mainnet&address=0xE7AcC93fC62F67b8576654cB1fC2fEBB9a994ce6. Using your file curl https://api.universalprofile.cloud/ipfs/QmTXXCWcZfTrYK8aaNmJqHi1mKgr7T399EupL31ua4MdRG | keccak-256sum I get 4be258bf487f72c2b765aa63bc6c87018b5f48abc8fd497a70bc991da66d78bf and not 0x717c3517cb1c5ff6815cfc31cbf705e3041ebc03198d9fc478a7f16a5504c149 as your verifiableURI contains. Hmmm, might also have problems there.

#

I assume universalpage is validating the JSON though, hmmmm. Not sure. Maybe I just cought it in the middle of you changing it.

agile vapor
#

There's no way to skip verification for LSP4Metadata?

cerulean hollow
#

You could set the method to 0x00000000 but that only works with VerifiableURI and not JSONURL

#

So make sure you use a VerifiableURI

#

It's not ideal if the URI's are verified, but that way you can turn it off.

agile vapor
cerulean hollow
#

If you're on a mac you can just use brew install sha3sum to get the keccak-256sum tool.

agile vapor
#

Cause I deployed that one with the same code

#

And it works fine

cerulean hollow
#

Checking

#

This checksum 0x6eb148d434678c29fc34a43100595b04d7b4e8c3435d43ca86fe9683036fe091 is correct.

#
❯ curl https://api.universalprofile.cloud/ipfs/bafkreiapndre77kaem74q75u54fj2v6hpbdm67ud6u2bns4hvvckxnnjkm | keccak-256sum
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1083  100  1083    0     0   9464      0 --:--:-- --:--:-- --:--:--  9500
6eb148d434678c29fc34a43100595b04d7b4e8c3435d43ca86fe9683036fe091  -
agile vapor
#

Omg it's the same code lol

cerulean hollow
#

Well 😦 not sure

agile vapor
#

Could you check with this one please? I have no mac 😦

cerulean hollow
#

Make sure you use JSON.stringify(o) and not JSON.stringify(o, null, 2) for example. We try to account for pretty printing, but not sure.

#

Oh WSL2 or ubuntu?

#

The tools are available there as well. I use linuxbrew there, but I think it's also in aptitude

agile vapor
#

I'm on windows but wsl is not working for me dunno why, tried it a couple of times

cerulean hollow
#

🙂

#

Ok

#

Checking.

#
❯ curl https://api.universalprofile.cloud/ipfs/QmQLQc3QrLo3rroQVd3XvXnhAt5vquicinkFmxBqCuaU7A | keccak-256sum
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   512  100   512    0     0   3563      0 --:--:-- --:--:-- --:--:--  3580
cbaf668587a79b2e780ef6fed58400dde0957f55f1876bca441c432836aee8be  -
agile vapor
#

Might be cause of some spacing weir thing 😦

cerulean hollow
#

You're not allowed to pretty print the JSON for sure.

#

Best thing to do is JSON.stringify(JSON.parse(fs.readFileSync('./json.json', 'utf-8') and upload that.

#

We try to calculate the keccak256 of the plain file, JSON.stringify(JSON.parse()) of the file and the plain file with and without a possible ending \r\n or \n.

#

After that, it's a no-go.

agile vapor
#

Do you know how could I just set it manually?

#

You provided me the checksum, could do it for now

#

I set it manually, not seeing it working 😦

#

Not sure what could be

cerulean hollow
#

I am not sure either, but I can see the checksum is now correct. Checking

cerulean hollow
#

I am pretty sure it's due to the / at the end of the URL.

#

URLs ending in / are kind of reserved for LSP8TokenMetadataBaseURI since they don't really point to a file.

agile vapor
#

Thank you so much dude! it was it!

agile vapor
#

Hey dude @cerulean hollow, just having something weird on my asset not apprearing on universal profiles but it's correct on universal pag

#

Do you maybe know why could it happen?

cerulean hollow
#

Can you point me to the universalprofile.cloud page you're using? I am thinking you might need to clear cache (go to the debugger, on the applications tab, storage and click the clear button)

#

Unfortunately universal.page caches all content in a supabase so once the content is available it will permanently be available from there even if verification or IPFS URLs are no longer valid or pinned.

#

Ok let me know. I am not seeing missing images?

agile vapor
#

I deleted cache and also were looking at it on another device but still not appearing :((

cerulean hollow
#

This is what I see.

agile vapor
#

I mean I cannot see it on my UP assets

cerulean hollow
#

Can you take a pic where? On this particular page I am showing?

agile vapor