convert ERC721Pausable to initializers
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.4.24;
|
||||||
|
|
||||||
|
import "../Initializable.sol";
|
||||||
import "../token/ERC721/ERC721Pausable.sol";
|
import "../token/ERC721/ERC721Pausable.sol";
|
||||||
import "./PauserRoleMock.sol";
|
import "./PauserRoleMock.sol";
|
||||||
|
|
||||||
@ -8,7 +9,11 @@ import "./PauserRoleMock.sol";
|
|||||||
* @title ERC721PausableMock
|
* @title ERC721PausableMock
|
||||||
* This mock just provides a public mint, burn and exists functions for testing purposes
|
* This mock just provides a public mint, burn and exists functions for testing purposes
|
||||||
*/
|
*/
|
||||||
contract ERC721PausableMock is ERC721Pausable, PauserRoleMock {
|
contract ERC721PausableMock is Initializable, ERC721Pausable, PauserRoleMock {
|
||||||
|
constructor() {
|
||||||
|
ERC721Pausable.initialize();
|
||||||
|
}
|
||||||
|
|
||||||
function mint(address to, uint256 tokenId) public {
|
function mint(address to, uint256 tokenId) public {
|
||||||
super._mint(to, tokenId);
|
super._mint(to, tokenId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.4.24;
|
||||||
|
|
||||||
|
import "../../Initializable.sol";
|
||||||
import "./ERC721.sol";
|
import "./ERC721.sol";
|
||||||
import "../../lifecycle/Pausable.sol";
|
import "../../lifecycle/Pausable.sol";
|
||||||
|
|
||||||
@ -8,7 +9,12 @@ import "../../lifecycle/Pausable.sol";
|
|||||||
* @title ERC721 Non-Fungible Pausable token
|
* @title ERC721 Non-Fungible Pausable token
|
||||||
* @dev ERC721 modified with pausable transfers.
|
* @dev ERC721 modified with pausable transfers.
|
||||||
**/
|
**/
|
||||||
contract ERC721Pausable is ERC721, Pausable {
|
contract ERC721Pausable is Initializable, ERC721, Pausable {
|
||||||
|
function initialize() public initializer {
|
||||||
|
ERC721.initialize();
|
||||||
|
Pausable.initialize();
|
||||||
|
}
|
||||||
|
|
||||||
function approve(
|
function approve(
|
||||||
address to,
|
address to,
|
||||||
uint256 tokenId
|
uint256 tokenId
|
||||||
|
|||||||
Reference in New Issue
Block a user