|
@ -11,12 +11,14 @@ contract NFT is ERC721Enumerable { |
|
|
bool first; |
|
|
bool first; |
|
|
address public pledgeAddress; |
|
|
address public pledgeAddress; |
|
|
uint256[] public blacks; |
|
|
uint256[] public blacks; |
|
|
|
|
|
string public baseURI; |
|
|
|
|
|
|
|
|
constructor(string memory name,string memory symbol) ERC721(name,symbol) { |
|
|
|
|
|
|
|
|
constructor(string memory name,string memory symbol,string memory uri) ERC721(name,symbol) { |
|
|
require(first == false,"You can only use it once."); |
|
|
require(first == false,"You can only use it once."); |
|
|
admins.push(msg.sender); |
|
|
admins.push(msg.sender); |
|
|
deployAddress = msg.sender; |
|
|
deployAddress = msg.sender; |
|
|
first = true; |
|
|
first = true; |
|
|
|
|
|
baseURI = uri; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
modifier onlyAdmin(){ |
|
|
modifier onlyAdmin(){ |
|
@ -62,6 +64,10 @@ contract NFT is ERC721Enumerable { |
|
|
admins = _admins; |
|
|
admins = _admins; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function setBaseURI(string memory _uri) external onlyAdmin { |
|
|
|
|
|
baseURI = _uri; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
function getAdmin() public view returns(address[] memory){ |
|
|
function getAdmin() public view returns(address[] memory){ |
|
|
return admins; |
|
|
return admins; |
|
|
} |
|
|
} |
|
@ -88,4 +94,8 @@ contract NFT is ERC721Enumerable { |
|
|
return super._update(to,tokenId,auth); |
|
|
return super._update(to,tokenId,auth); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function tokenURI(uint256 tokenId) public view override returns (string memory) { |
|
|
|
|
|
return baseURI; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |