contract DTS is ERC721, Ownable {
    using SafeERC20 for IERC20;
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;
    mapping(uint16 => uint8) private _burnedTokenIndexs;
    uint256 DTS_DATA = 0x42c5aac7e51b86472487799b4ba3e4e9f4a90cc58dee8437cc73eb5ba98ae891;
    address private _burnAddress = 0xdead000000000000000000000000000000000001;
    address[] private _tokenAddresses = [   0x37E8789bB9996CaC9156cD5F5Fd32599E6b91289,
                                            0x1a7a8BD9106F2B8D977E08582DC7d24c723ab0DB,
                                            0xC80c5E40220172B36aDee2c951f26F2a577810C5,
                                            0x780116D91E5592E58a3b3c76A351571b39abCEc6,
                                            0x11613b1f840bb5A40F8866d857e24DA126B79D73,
                                            0x2e071D2966Aa7D8dECB1005885bA1977D6038A65,
                                            0x82f4dED9Cec9B5750FBFf5C2185AEe35AfC16587,
                                            0x9AF4f26941677C706cfEcf6D3379FF01bB85D5Ab,
                                            0xf0Ee6b27b759C9893Ce4f094b49ad28fd15A23e4,
                                            0xd780Ae2Bf04cD96E577D3D014762f831d97129d0,
                                            0xEA38eAa3C86c8F9B751533Ba2E562deb9acDED40,
                                            0xf04a8ac553FceDB5BA99A64799155826C136b0Be,
                                            0x491C9A23DB85623EEd455a8EfDd6AbA9b911C5dF,
                                            0xB705268213D593B8FD88d3FDEFF93AFF5CbDcfAE,
                                            0x5136C98A80811C3f46bDda8B5c4555CFd9f812F0,
                                            0x40395044Ac3c0C57051906dA938B54BD6557F212,
                                            0xec67005c4E498Ec7f55E092bd1d35cbC47C91892,
                                            0xB97048628DB6B661D4C2aA833e95Dbe1A905B280,
                                            0x0AfFa06e7Fbe5bC9a764C979aA66E8256A631f02,
                                            0x255Aa6DF07540Cb5d3d297f0D0D4D84cb52bc8e6,
                                            0x4156D3342D5c385a87D264F90653733592000581,
                                            0x983F6d60db79ea8cA4eB9968C6aFf8cfA04B3c63,
                                            0x68d57c9a1C35f63E2c83eE8e49A64e9d70528D25,
                                            0x8D75959f1E61EC2571aa72798237101F084DE63a,
                                            0xF8e06E4e4A80287FDCa5b02dcCecAa9D0954840F,
                                            0x92e52a1A235d9A103D970901066CE910AAceFD37,
                                            0x24692791Bc444c5Cd0b81e3CBCaba4b04Acd1F3B,
                                            0x9e3319636e2126e3c0bc9e3134AEC5e1508A46c7,
                                            0x4CF488387F035FF08c371515562CBa712f9015d4,
                                            0x55296f69f40Ea6d20E478533C15A6B08B654E758//,
                                            //0x8f16BCAed98Fb63CfE9bd48AeD423A8d5Ff5C573,
                                            //0x0174b9096B47707E2646A4aCC69304ed863D3293,
                                            //0xfb6806a8c7CeE0CAFfA5C77b0038Df07a927F985,
                                            //0xe21446979400cb63fa5f48F55c46F9fEd526F13d,
                                            //0xC5fC811147FB271F01D8b24BB6f770f7Df5609b2,
                                            //0x39C9CE1a63B5612d44B1263a15D16Ae6ed744C79,
                                            //0x9880437A9edF6A7F38b8316A80d8c718bf623307,
                                            //0x2606A454a09Da7aC00ef8242391167eAFA0d0121,
                                            //0x1140F23Dc05cc150Ecb44cF57a7Ec4e95B670D7c,
                                            //0x9b6bf33B0a1f2A4Ac195134A3Ed249B09D4115FA,
                                            //0x8f2D31b86b15ef9Ba7B1686a405C7E59739334Ad,
                                            //0xA402F58FfF52d2B6B85A5cBc27A266108016DEf7,
                                            //0x3e100D9C4CBD4F0cE73023A6BE64eEAcACBFA3a1,
                                            //0x0570D814311c49856F4198368589225b07aF54D2
                                            ];

    constructor() payable ERC721("Dead Token Society", "GRAVE") {
      _setBaseURI("https://www.deadtokensociety.com/api/");
    }

    function renounceOwnership() public override onlyOwner {
    }

    function updateBaseURI(string memory newBaseURI) public onlyOwner{
      _setBaseURI(newBaseURI);
    }

    function withdraw(uint256 amount) public onlyOwner {
      require(amount <= address(this).balance);
      msg.sender.transfer(amount);
    }

    function getBuriedToken(uint16 reqTokenId) public view returns(address){
      require(reqTokenId <= 25000);
      return _tokenAddresses[_burnedTokenIndexs[reqTokenId]];
    }

   /**
   * @dev Mints a new NFT.
   */
    function bury(uint8 tokenAddressesIndex) public payable {

        require(msg.value == 5 * (10 ** 16)); // 0.05 eth

        IERC20 token = IERC20(_tokenAddresses[tokenAddressesIndex]);

        uint256 mintCost = token.totalSupply()/2000000;
        if(token.balanceOf(_burnAddress) > 0)
            mintCost = mintCost + token.balanceOf(_burnAddress)/225;

        token.safeTransferFrom(msg.sender, _burnAddress, mintCost);

        _tokenIds.increment();

        uint256 tokenId = _tokenIds.current();
        require(tokenId <= 25000);
        uint16 smTokenId = uint16(tokenId);
        _burnedTokenIndexs[smTokenId] = tokenAddressesIndex;
        super._safeMint(msg.sender, tokenId);
    }

}
function bury(uint8 tokenAddressesIndex) public payable {

    require(msg.value == 5 * (10 ** 16)); // 0.05 eth

    IERC20 token = IERC20(_tokenAddresses[tokenAddressesIndex]);

    uint256 mintCost = token.totalSupply()/2000000;
    if(token.balanceOf(_burnAddress) > 0)
        mintCost = mintCost + token.balanceOf(_burnAddress)/225;

    token.safeTransferFrom(msg.sender, _burnAddress, mintCost);

    _tokenIds.increment();

    uint256 tokenId = _tokenIds.current();
    require(tokenId <= 25000);
    uint16 smTokenId = uint16(tokenId);
    _burnedTokenIndexs[smTokenId] = tokenAddressesIndex;
    super._safeMint(msg.sender, tokenId);
}

/**
 * @dev Mints a new NFT.
 */