PNC-721

// SPDX-License-Identifier: MIT // // ERC-721 Non-Fungible Token implementation based on the OpenZeppelin Lib //

pragma solidity ^0.6.2;

Abstract contract Context

function _msgData() 
internal view virtual returns (bytes memory) 
{
    this; // silence state mutability warning without generating bytecode - see                https://github.com/ethereum/solidity/issues/2691
    return msg.data;
}

Library SafeMath

library SafeMath { function add(uint256 a, uint256 b) 
internal pure returns (uint256) 
{ 
 uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); 
 return c;
}
 function sub(uint256 a, uint256 b) internal pure returns (uint256) 
{
 return sub(a, b, "SafeMath: subtraction overflow");
}
 function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns    (uint256) 
 {
    require(b <= a, errorMessage);
    uint256 c = a - b;
    return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
    if (a == 0) {
        return 0;
    }
    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");
    return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
    return div(a, b, "SafeMath: division by zero");
}
function div(uint256 a, uint256 b, string memory errorMessage) 
internal pure returns (uint256) 
{
    require(b > 0, errorMessage);
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    return mod(a, b, "SafeMath: modulo by zero");
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b != 0, errorMessage);
    return a % b;
}
}

Library Address

Library EnumerableSet

Library EnumerableMap

Library Strings

Interface IERC165

Contract ERC165

Panda Network Token contract ERC721

}

contract CoolNFT is ERC721 { constructor (string memory name, string memory symbol, string memory uri) public ERC721(name, symbol) { uint mintIndex = totalSupply(); _safeMint(msg.sender, mintIndex); _setTokenURI(mintIndex, uri); } }

Last updated