Adding Metadata to contract

Hi guys,
Can somebody please show me how to add Usable game Metadata to the NFT’s created with the contract. I want to use IPFS With Moralis on polygon. As contract type i want to use ERC1155.

I have used this moralis code as a template:

For example Metadata:
level= 2
Power = 3
Speed = 1

And can this metadata be changed later when players level up. It would be nice if it would show up in Opensea as a trait. Thank you.

what do you know how to do now?
do you know how to write and deploy an ERC1155 contract?
do you know how to upload data to IPFS?

Hi @cryptokid,
Thanks for replying.
What i do not know is how to add extra metadata besides the picture images that we can use in a game.
Do we add this together with the picture to IPFS?
The extra metadata i want to add is:
Range: 1 = common 2 = uncommon 3= rare
Power: 1 = common 2 = uncommon 3= rare
Speed: 1 = common 2 = uncommon 3= rare

I have never deployed an erc-1155 contract but i will learn. Any advise is welcome

usually you have a file with metadata that also includes that picture link, and that file is a json file. you can add there any other fields in same json like range, power, speed, or you can add them directly in the smart contract code

here is example of metadata directly on chain:

1 Like

Metadata refers to any structured information usually extracted directly from a contract. Ideally, it’s stored directly against the contract record so the information can be easily linked, accessed and aggregated, saving you from hours of contract administration.

how to download imessage on windows 10