Hello guys,
After compiling “NFTcontract” i get stuck.
- Deploying with the “Deploy” button, result in the console : creation of NFTcontract pending…
- Deploying with “At Address : 0x…” : The contract is deployed but when i use balanceOf, mint function i get : transact to NFTcontract.mint pending …
The only difference i have find is i compile “IERC1155.sol” but if i follow the course, it should be “Opensea_nft.sol”
pragma solidity ^0.8.0;
import "@openzeppelin/[email protected]/token/ERC1155/ERC1155.sol";
import "@openzeppelin/[email protected]/access/Ownable.sol";
contract NFTcontract is ERC1155, Ownable {
uint256 public constant ARTWORK = 0;
uint256 public constant PHOTO = 2;
constructor() ERC1155("") {
_mint(msg.sender, ARTWORK, 1, "");
_mint(msg.sender, PHOTO, 2, "");
}
function mint(address account, uint256 id, uint256 amount) public onlyOwner {
_mint(account, id, amount, "");
}
function burn(address account, uint256 id, uint256 amount) public {
require(msg.sender == account);
_burn(account, id, amount);
}
}
Any idea, ressources to debug ? Thank you guys.