Hi i recently, deployed a smart contract from remix ide to opensea, but encountred a problem.
Problem:
Images are not loading on opensea testnet.
contract adress:
opensea testnet:
contract code:
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
import '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
contract AI is Ownable, ERC1155 {
// Base URI
string private baseURI;
string public name;
constructor()
ERC1155(
'ipfs://bafybeihnvw42eulx3cf6ibwnxk7eibycmwp5gdlr22juhtli6gm3uxucjy/{id}.json'
)
{
setName('GF');
}
function setURI(string memory _newuri) public onlyOwner {
_setURI(_newuri);
}
function setName(string memory _name) public onlyOwner {
name = _name;
}
function mintBatch(uint256[] memory ids, uint256[] memory amounts)
public
onlyOwner
{
_mintBatch(msg.sender, ids, amounts, '');
}
function mint(uint256 id, uint256 amount) public onlyOwner {
_mint(msg.sender, id, amount, '');
}
}
how can cahnge the code to get the image loading on opensea testnet.