Hello, i have basic erc-1155 contract deployed like this:
pragma solidity 0.8.0;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
contract coin is ERC1155 {
constructor() ERC1155("https://www.xxxxx.es/JSONS/") {
_mint(msg.sender, 1 /* Id Zanahoria */, 10 /* Cantidad */, "");
_mint(msg.sender, 2 /* Id Papa */, 20 /* Cantidad */, "");
}
}
Then i have modified the function uri (in erc1155.sol) like this to concatenate _url, with id
function uri(uint256 id) public view virtual override returns (string memory) {
string memory st="";
string memory st3= string(abi.encodePacked(st, Strings.toString(id)));
st=string(abi.encodePacked(_uri, st3));
return st;
}
When deployed, function uri() returns this
https://www.xxxxx.es/JSONS/1
i also tried
https://www.xxxxx.es/JSONS/1.json
or
https://www.xxxxx.es/JSONS/000....00001.json
I also tried like the example
constructor() public ERC1155("https://game.example/api/item/{id}.json")
In my private server theres that path with accordingly named json at each try.
And nothing is working, i mean opensea can not read the metadata json file.
Thanks
What the Am I doing wrong please