Hey,
I am trying to mint some 1155 tokens using a .png file as the base, minting on chain. I have done this previously on my Manifold ERC-721 contact with the help of a tool called Efficax build by 0xDiid.
I am following the guide for ERC-721 on chain minting:
But attempting to adapt this to work for 1155. The main thing i’ve come up against is what was reported by others who have encountered issues, which is the formatting required for the string, its different for 721 and 1155.
These are the steps I have followed:
Created a .png file
Converted the .png to base64 to get my code which starts data:image/png;base64,…
Opened the URI in a browser tab (looks good)
Used the metadata example, and added my URI
Minify’d it
Added my URI to the string data:application/json;utf8,<YOUR_JSON> to make my final URI
Using function 6 (mintbaseNew) in etherscan, write as proxy, I entered the address to mint the tokens to (my own) and quantity, both inside [ ] and also placed my URI into the uri(string) field.
This is where I cant get past, i’ve tried wrapping the code in [ ], and in [’ … '], i’ve tried swapping between " and ’ in the code. What ever I try I get one of the two messages below:
Unexpected token ‘:’
Invalid or unexpected token
Below is a sample of my URI I am using:
[‘data:application/json;utf8,{“name”:”In Bloom”,”description”:”A test on chain edition by OL1Y”,”image”:”data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAIACAMAAAC8QUvIAAAAq1BMVEVmk+RHVB4AAACezvt/j1DAB71pqv1jlOlmpvplpPllqf1nmu9jl+xnl+l2u/9ur/9srv9mmO14tP91r/9sqf5op/xmo…=)}’]
As mentioned i’ve tried wrapping with different sets of brackets, and swapping out the " for 's, but nothing works.
Hey! Could you help us debug for you? Please link the transactions and contracts you are interacting with. This will give us a better sense of what’s going on.
Hey, a bit more luck this time, I managed to adapt what you had written in your test, to include my base64 code, and it let me submit the transaction, but it failed and returned this message:
Sheesh, ok thanks, I need to go back to the drawing board on the final piece, something more simple it seems is key! Thanks for helping me get to the point where I can actually submit the transaction!
Ok, we have success, almost, i’ve used a new image, the image I indent to mint, which was 16kb, managed to mint 10 tokens using mintbaseNew, cost around 0.022 GoerliETH.
Unfortunatly the image isnt rendering on testnet opensea.
Not sure if this is an issue with opensea, or something I did wrong in the minting. I’ve tried refreshing metadata a few times, but nothing.
Looks like you are ending it with the " correctly. But you have a bunch of non-standard " in your JSON. Are you editing in like macbook notes app or something?
Every double quote should be ". You have “ and ” and other random quotes.
Hey, so I swapped out the dodgy " for "s, then I got an error that it didn’t recognise the ‘name’. I then swapped all but the start and end ", with 's, so ‘name’ etc. this allowed me to submit the transaction, but still not seeing the name, description or image.
data:application/json;utf8,{\"name\":\"Soar\",\"description\":\"A test on chain edition by OL1Y\",\"image\":\"data:image/png;base64,iVBORw0KGgoAAA...\"}