I have the following contract
pragma solidity >=0.4.21 <0.7.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract Sketch is ERC721 {
string[] public sketchs;
mapping(string => bool) _sketchExists;
constructor() ERC721("Sketch", "SKETCH") public {
}
function mint(string memory _sketch) public {
uint _id = sketchs.push(_sketch);
_mint(msg.sender, _id);
_sketchExists[_sketch] = true;
}
}
But when I run truffle test I get the error message TypeError: Different number of components on the left hand side (1) than on the right hand side (0)" In relation to the line
uint _id = sketchs.push(_sketch)
How would I get around this? Do I have to initiate sketchs beforehand? What would that look like?
Any help would be appreciated