Hi @spalladino,
In the short term we could add more notes to the OpenZeppelin Contracts documentation/README/website to advise the community that they need to use the evil twin. As per this topic: Ownable contract owner is always the 0 address
We could also add a warning to oz compile
if @openzeppelin\contracts
is detected, as issues have come up previously with community members not using the evil twin.
Also we could improve the existing initialize
functions, specifically in ERC721Full
.
Ideally instead of having to call a bunch of different initialize
functions:
ERC721.initialize();
ERC721Metadata.initialize("Simple721Token", "721");
ERC721Enumerable.initialize();
This could be handled for the user and just be:
ERC721Full.initialize("Simple721Token", "721");
Simple721Token.sol
pragma solidity ^0.5.0;
import "@openzeppelin/upgrades/contracts/Initializable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC721/ERC721Full.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC721/ERC721Mintable.sol";
contract Simple721Token is Initializable, ERC721Full, ERC721Mintable {
function initialize(address sender) public initializer {
ERC721.initialize();
ERC721Metadata.initialize("Simple721Token", "721");
ERC721Enumerable.initialize();
ERC721Mintable.initialize(sender);
}
}