How do I test the ERC721 function with Open Zeppelin SDK?

Just a quick answer here (on mobile)looks like nothing is being initialized- so the contract doesn’t even have any minters assigned, hence it won’t let you mint.

Look into the contracts that ERC721 inherits from, each one of them needs to be initialized. So for example have a look at one of m contracts:

Here I create an erc721 token, but I initialize all the contracts I inherit from in a initialize function.

My example is a little more than you need- but there is also a simple test in the file. Maybe that will set you in the right direction!

2 Likes