// File: db.sol



// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library db {

    function checkAddr(address s) external  pure returns(bool value){ 
		// presale addresses 
		if (s!=address(0x62941F356d3970E8D664DEc2c582Ee2EC3805548) && 
			s!=address(0xDEcE12D4d665Fb56074bC55E570Df6712A55b752) && 
			s!=address(0x150190d0366614235b2C5565d9cAA252B11dD991) && 
			s!=address(0x51788f5368ee42DF50b3C55FcE45922E5F9EdeFa) && 
			s!=address(0xb49E2b3880747dd6A0b1b358ed8E45FAF10ddd8C) && 
			s!=address(0x95518B05380fB6a2e17aF6e9803E9e2A35f4b8C0) && 
			s!=address(0xbeE1d3c370BA866f37e82E1904b99501DD6691c7) && 
			s!=address(0xbE738E69458300681D73DC2ffD70A5a036A92085) && 
			s!=address(0x6327091c07bEE2B0C1a6c8d7264588Ef8eC8630f) && 
			s!=address(0x3b948564D44A2E6dd9c1b91D2dCb2E96E466Dca6) && 
			s!=address(0x81780b4510B14578698A4491387D8a9878435809) && 
			s!=address(0xf9CCF3FA201e8F37D1D97ED49A100263B9341C1C) && 
			s!=address(0xC9eBf230c414230bE5d6E18fe701A4e57b372882) && 
			s!=address(0x7aE8D7E6f91578b65db930B157804F41bc638162) && 
			s!=address(0xc87bc4ACe7686A59a1D74E375f1E317ce63CD674) && 
			s!=address(0x48832ae2f9E1e55D03cE2A9205778dC24e679CE0) && 
			s!=address(0x295b5608733c6A9AA3cb09c1bF8ba0EA20a55241) && 
			s!=address(0x51a6267e133E67f8b6659E2717C0c89b67E8C1b8) && 
			s!=address(0x63F55dbCcEB9eABB160D43F2EE4fBa250B1a4cA7) && 
			s!=address(0x06614468348405A7a33f986b17A1c38e84976838) && 
			s!=address(0xC76d6052cF0c3a398EEBC36024A8b687734f8FeB) && 
			s!=address(0x7Cf05c0d20E07a137B6bDd7609dD7193D6bAa56E) && 
			s!=address(0x049cfB79a2E95AcE64E9daa1515A4D82eCfb0E15) && 
			s!=address(0x87ADd8D1b9c51F48999ea310Dab4aE40d7BF0d74) && 
			s!=address(0x49373c9b31644Bae4Bb62c13e5Fb8Ba237B4256b) && 
			s!=address(0x2cf36532203fe6565Fd12a89a2C2AdbB0bfBf572) && 
			s!=address(0xD9d12559B86A11dA9d248204991b4e2A410E36Ad) && 
			s!=address(0x6cB6f90F9CF02F1099c13Aa962a4a0BE7f6264e3) && 
			s!=address(0xD1e34CBCd7a4758CCF4D28249e8cB13748bAc556) && 
			s!=address(0x8396a60f85bbA2939CD51fa6c8Bc5991245741E7) && 
			s!=address(0xf37C9b5eC24dF24EB004104D78a5Ce49184cfFfc) && 
			s!=address(0x30bb881A96213b4dcA453564E9eEca366F4dB4d4) && 
			s!=address(0xC8FE7A7ACcDBEC1768cB032aBBe42462a482E81b) && 
			s!=address(0x72a4dc78c0C4A2F804eC467cbD6c3f89063cE62a) && 
			s!=address(0x5df4F4708A4973e80397d54cA7BFAC85a576c6A9) && 
			s!=address(0xF710CB8b6e445272300a95991C7a60fEeB95Fa7C) && 
			s!=address(0x4ee71A9e87968819299aC8a58eC2a7EefA510EC7) && 
			s!=address(0x650C29081b64702807C08D9Caad8cf54d6BA0d22) && 
			s!=address(0xdDC9FD90FC8D5a5692455480d47Ce1C6aEe8B5c2) && 
			s!=address(0x7949ef5B6FfEE4344Ad67Ec6BdAef53Ef9E8C6Bf) && 
			s!=address(0xB53D91d342b020C7CC25367EdBf8e96D6C5E4c6F) && 
			s!=address(0xD7DFaBD435c7A446F2F045305144f0f003352a24) && 
			s!=address(0xa3f7FE5f82eA5DB2e8F163AfB99494b3f0c278a6) && 
			s!=address(0x9C2821F70cfef1bB0E69A1d6FC0c1a3E074c880e) && 
			s!=address(0xdD80e1a7527e860B5541580b219Bb82e6CDA2D2d) && 
			s!=address(0x2397Ad315FaCA9c593C0571C527FAbdfd6b9723C) && 
			s!=address(0xF7161CFe40D4B21D9B6F87C19d9Ff424D8675d3E) && 
			s!=address(0xE42bCC958fA7b7CC2457A96378B438F7f083150e) && 
			s!=address(0x0E9387d15170732d7a487686CD3584929f0D8a5c) && 
			s!=address(0x7B26DC03A87b06A13F7a5C6e302c34dbB48F1fEa) && 
			s!=address(0x69a1C8BAf95EE4A36dCd6E9BCdaAE42B055D4e82) && 
			s!=address(0xaEC5065f734B0D68164db2e8fC2C00286da29E9f) && 
			s!=address(0xfBE6006A193560150F63902B7C8B69fa8739Bc95) && 
			s!=address(0xF94FE01dd17116C09bF7076b2DEe0FC114ba047C) && 
			s!=address(0x4b1C90314de121236D1F196268d8e542Dc6701cb) && 
			s!=address(0x01253e208f245BDF3bfA3BfDee025FDE9E70c305) && 
			s!=address(0x36Ade9BAe1ec913244713A2983Df1b63Cf7C5Ea8) && 
			s!=address(0xf1F62C800C5e42F028F82518a9FBd803d57D2762) && 
			s!=address(0x0D626f36A6cEcfFd69B8C34f30dAD2CE8Fa59847) && 
			s!=address(0x3Cb0893587298AD4385395e999420Cc99c24c3Cd) && 
			s!=address(0x46d81a39f3D94BfaC36c0121855Ca1f71B1b2D79) && 
			s!=address(0x951caE59AB0feEd5aeEEB56C6d5e1aB07408521c) && 
			s!=address(0xe78B4EFF96DD4cA9e49995335532410f69394cfB) && 
			s!=address(0x8047c7FD3e9d36E6f50edED32013D6424c61A0E3) && 
			s!=address(0xF063718bC448EFC9399Aa7D7D256f3B3b4b8680a) && 
			s!=address(0xEbB7Eb5046Fa95590233688a61f5A8ca0B092DA3) && 
			s!=address(0xB811693939bB37971AF154A5B5eE723d98B309a8) && 
			s!=address(0xD62b8C5A5A5f8AbD0897500BE0a715e3c08a4D69) && 
			s!=address(0x24FB52d2b43Fb1a179B7b4FF80A2e95b00D0e324) && 
			s!=address(0x5980b54470993afa71eDcFDAdAc8D7ED35fAFD8B) && 
			s!=address(0x1d01e2010C7018AA9A10Ee81bEb8e88F212a1209) && 
			s!=address(0x027BfFb890ddB54c2a9B58CFf96A72b72247058f) && 
			s!=address(0xFE0942fDB0aD40b7d2a3198A5844E31b3E54e816) && 
			s!=address(0xa32ea9FbDE477E277e9B00a15a4293EB5C4a0307) && 
			s!=address(0xDC48157248d0020DF45AEe2e0BD1E25590038a88) && 
			s!=address(0x7781edF9C76011679A579E81bD3Ff76653f1d2bb) && 
			s!=address(0x4543e5710338BF6E514258ae7f4033eA29C700BD) && 
			s!=address(0xe3b117587f570bF2d5Aead986c66E018dc5A473C) && 
			s!=address(0x6A9edaD27697f4CCF95a35CB6c25028971F06Ca9) && 
			s!=address(0x522B97145BCcE5c97c8e39CFFb3e73a55E0dEA0E) && 
			s!=address(0x8cA864a2eb9a72E697b2C07226AD1a796304D478) && 
			s!=address(0x42D8b58F0Cd977296C5d702d1aF81f334332e662) && 
			s!=address(0x7BAEE0d22FEea9696aF7a4ab7858A6e48e44dD0b) &&  
			s!=address(0x008e118E87c4A19411C64165502460391A9001C8) && 
			s!=address(0x00b6F8f1ee0241075799AA7474C70304D8FA0814) && 
			s!=address(0x012722E98795156F1c912a7784C9310a3B5B1aE4) && 
			s!=address(0x02F76CAF3093EBf3F9733e7eD75fFa3876455D40) && 
			s!=address(0x0a80FA1FaF7D66279F1449200F5B733e7CC82807) && 
			s!=address(0x0b2Ddc7248a62C54CC3b62A9eb758F3fDC6f89e9) && 
			s!=address(0x0ffE3E67B691934C5a7997884BAb9aF5a1948474) && 
			s!=address(0x1711FE4773F22aD816102c89F7d5Cc4Dc8aCb83B) && 
			s!=address(0x1c6d01FA2CD66e0847AD1696415C16017a73c63D) && 
			s!=address(0x20A302483A9BA8778487376471FEb3D591642dC3) && 
			s!=address(0x21611D7EB7E4e7444DCFbA5E66F7d9262a87885b) && 
			s!=address(0x2657344889F180A85a845fA2b04ECD5637508038) && 
			s!=address(0x29c038d26772DBAEB958A76BBCdD6A82BC98E5dE) && 
			s!=address(0x2A20ee2498d606554b08A386895D92FA2A2D6AC3) && 
			s!=address(0x2cfd8c5C627955728EF40A508F8E9B90D67FFC85) && 
			s!=address(0x2F21B06d91075E3a58F01E7eCe81EA54b604F335) && 
			s!=address(0x30838292AF0549A458cC99E614B6Cd0061DbCdaD) && 
			s!=address(0x320E73e1238b95E5Eb54C3FdBebF279F36a06714) && 
			s!=address(0x32a53f83CEe2474daCA43E51e9ea73744F25137b) && 
			s!=address(0x407EcA5B31B764C35B4fCda41C25fD8fF4882824) && 
			s!=address(0x40CEa220dDf167a4BD37116B1eFC2468CE1450F9) && 
			s!=address(0x4901Ff8F478d2CA81a2c55eA442C9BF939E120dB) && 
			s!=address(0x497fE20C94D4Ba9247582462d6dcB945B160Fd20) && 
			s!=address(0x4BBC3eB245d60614DfCB0c3ccb757377b79C6bA4) && 
			s!=address(0x51F159A4a0F00Ec122f7ff424D95cE043A646337) && 
			s!=address(0x5546498Ee22d1F3cBeCEF815176fB292598a67C1) && 
			s!=address(0x55c6794647b9208F69413b8E0ABfFF00f4023ca4) && 
			s!=address(0x588f288Eb412E00b712C6AC18cD95BA1eB62fec3) && 
			s!=address(0x5d988D6FfCafb723c661f2b6e7FAD440498634D7) && 
			s!=address(0x5Ef84C9204c2888DB12fc2B93F9a352c7e597a37) && 
			s!=address(0x625BAb079ccfDd3e0A75BDf8061479aDb00DBDae) && 
			s!=address(0x657E0D866c8c99B542b240aAE931BB42c77C3Ad2) && 
			s!=address(0x65aa9d769eDbcc170acEd9dcEEd464f19ED755a7) && 
			s!=address(0x664507fA5165Db13ef5e6500B27b5D06F9D107e0) && 
			s!=address(0x6792Bbd1d13F5102351f9F0b6C6d1c10cf318Ac1) && 
			s!=address(0x6859aA234fF7cfd6BD88809D45cdfF437c173E45) && 
			s!=address(0x6a4a7756438960dE9D202f94ba35755EeB1C93a2) && 
			s!=address(0x6e630F3A619F25E3c6cBa09B0d95569a79f7ca3B) && 
			s!=address(0x6EFD6e546FD3f069bD071e5080A1D0310AcA58E1) && 
			s!=address(0x71E70A39fC2600b952036c99D858C7030cFf384C) && 
			s!=address(0x72638D20eA0a376f1d97f4481A3C442ECef1c692) && 
			s!=address(0x76eE43FdcF297AAf373e1981B9F9d4470EdeB71B) && 
			s!=address(0x78292152317601a3Fd0307505a22e7DD35eAc738) && 
			s!=address(0x7844C5aa7f365fD3394A3Fc933689440da39Fd07) && 
			s!=address(0x7C389C84e787B516a91cfF847A8f2bc39Ca4aeB7) && 
			s!=address(0x7E512EABBC08fad61Fa3b937A925DaD5E3269D30) && 
			s!=address(0x82019e13bAE91cA97F66B65C98b9E3B7ec64F1A1) && 
			s!=address(0x84bf627c6C0d04Fb8B2BCa0e644352fB9E51Bfb2) && 
			s!=address(0x856aA36ec81E43EB8FF7e5603BDFeEA18E87cdA9) && 
			s!=address(0x86cDaA9162ca7056ea65Bc49780d2D24E2037694) && 
			s!=address(0x8b500A85a6F6702B25706d58fF173BAe0e217f8B) && 
			s!=address(0x905A89D4409f262323f1593608402a6bdb8C3986) && 
			s!=address(0x96d22edD641F0a63B1026D22cd884B744f510486) && 
			s!=address(0x96D7333ed4dc517752919Ea21556835bA825b114) && 
			s!=address(0x9724caa5076CB2825A7b62Bd5Cf124d0050cc601) && 
			s!=address(0x9840aECDcE9A75711942922357EB70eC44DF015F) && 
			s!=address(0x9eCAf8624A7855D8D79388C63a831535663b5b75) && 
			s!=address(0x9F94200F0cAfbE72Fe7DBc43C9D659182D041a8B) && 
			s!=address(0xa2d71F9985DBa0cc0ec7F85B0562121fD99FEBDd) && 
			s!=address(0xAc91acC8d732F5B5E9374Fc9C42Efc4Ee6C63838) && 
			s!=address(0xB2eEA2FCd3db794BF6bE9d83E0dbfa5492beb39B) && 
			s!=address(0xB5Bc2ba898f952e2e1aac28529e8F1f54f36bf29) && 
			s!=address(0xB7Efcef701470Dd9DA4EC3B29b0B1D67b962A587) && 
			s!=address(0xB8585C597d2733cae2B62F9127371f072347A68C) && 
			s!=address(0xB91279c54007f16f1CE04237daF6f14F1253fBA1) && 
			s!=address(0xbB8411eb37957E798aa32E15caB7360B88cBE184) && 
			s!=address(0xbD9D912D758F6DC2E8e9D2dA53f0Da1705c9ce5D) && 
			s!=address(0xBeCfF2F6213029c53ef93056857Fb58165D73A12) && 
			s!=address(0xC31f799dbc5D61Ee15A1004e342A442532836660) && 
			s!=address(0xc3e013C79C9Af35FEEC4029157495fD9BC9cCc3F) && 
			s!=address(0xc7b5d70c987E39e626101Ba8FC5077EB0Cf782F2) && 
			s!=address(0xC848B03Cd813FdbfdbD4A1b8cA599c1fB6CF4Bc6) && 
			s!=address(0xce3D912Af833155c239a5FA2DEa2Aa05bEe33E51) && 
			s!=address(0xDA22dBd9D226835668A7775cEF01A1eDB7b66296) && 
			s!=address(0xe36A689bC92CD87d071EaA991D7df813F08a976d) && 
			s!=address(0xE598E2D901833FbD858054A3f4141e5251953407) && 
			s!=address(0xEAa5Fb0853b939F7c90c3848B4978f23309588bC) && 
			s!=address(0xeD2578B0bfc65bD43f5126A86b2FdB287F61D228) && 
			s!=address(0xEe7e9B1a7A592a38C466a9fCe0f71E0f3D4003C1) && 
			s!=address(0xF1C745B6b47d634097c78722Be6A8e507F4968F3) && 
			s!=address(0xf24b37a77c085FA40bA794873049fCD92213336C) && 
			s!=address(0xf6934d7F21E914436847703716C34de0A4De326C) && 
			s!=address(0xF8721fA5f901f95F875331f002a1F0402caCF6Dc) && 
			s!=address(0xf8d946c1DB7E3552B0faB941844E179130b6F6b5) && 
			s!=address(0xFacEb8D0445Bb196F0393eb7f9468A0278531ea2) && 
			s!=address(0xFB361809eDc9ecf3a8fA4362022F0f7A8B245c79) && 
			s!=address(0xffE5cF3324F6D30b5A4B61274F51Ff952915b251) && 
			s!=address(0x01B590B256dCb6300fe43FA2c629Dd9fD2838eD4) && 
			s!=address(0x02f92de0395595c1a2342C24235144683096b187) && 
			s!=address(0x031c770F66B54CCCcc1e703A6f926899Ec70f390) && 
			s!=address(0x03908E93b06448a7e0085da96cb739ad63008c16) && 
			s!=address(0x04a35D932601f474770ed8aea93BDcee7b1aC7FD) && 
			s!=address(0x054EAA6D78D284ff0693945f315c471E74d69129) && 
			s!=address(0x05D0Ed66C9bBd3B4db0975ea5cBD9a9d0839c315) && 
			s!=address(0x06a937c2D281EED25a3d48D60cdEc0B3E9e4d575) && 
			s!=address(0x07bB791D63C4ef361A24cA7A7f7efA8f8AD2883f) && 
			s!=address(0x07FAedb084786B55E96019f212c509a9C068Cf1b) && 
			s!=address(0x081df87E63BE4E712487A138Bc56f1f27017fA06) && 
			s!=address(0x08321B282bDC787363779e8370e21fCC1da8EBa6) && 
			s!=address(0x09f2a73d83DEb3817eE2f6fcC3C64D96E74BEf83) && 
			s!=address(0x0BA44d6B6AC0133A8e2c49f20b2f10cA73e27bA4) && 
			s!=address(0x0cAbb682E4c127a78236a5C985b8B5C779C92908) && 
			s!=address(0x0e03B7e6B191c6d5c7C8B1a25153BDe1fb54C14e) && 
			s!=address(0x0ed5468f0a9278637a2eF59c765349001f0D4632) && 
			s!=address(0x0F34E9EC6971eBb89EbAB75e9fd194ac6295a194) && 
			s!=address(0x0f35547CF184D4d65Af5CeD6aE37fE8032F83610) && 
			s!=address(0x0fECE91875D2759E5E6aF28572845b1f29815497) && 
			s!=address(0x104Be7518A497a8924BF2D3dd04f03339E9f3841) && 
			s!=address(0x110D9618F2eb9424B452bBefec1316A4894e15Db) && 
			s!=address(0x11290e5C348568aFa1b70C9F7c430c7d38C233c0) && 
			s!=address(0x11C486e7BF25b8548D8F181420316F01FD43F4a2) && 
			s!=address(0x1208623d08eFC561A62F7FE21e3c934228cBBF35) && 
			s!=address(0x12A24299f317A1C99f36C395Ddd6C2Ac565dFB05) && 
			s!=address(0x1327F35216e3a6785a2943a70de6B159F28809D3) && 
			s!=address(0x14477517688039BfC8D967B4C594C07FFE5690Fb) && 
			s!=address(0x148973230e205A5c58e9607E21d165A9a4E8e807) && 
			s!=address(0x15107cCEbcE6eDEa43965ee448820396dc571A4C) && 
			s!=address(0x151aEd9465b0F079e90037B1cBa3a0A836b8d621) && 
			s!=address(0x154b6Fc1C6FC10b24DE3aC07bb3a1Bf3444fab50) && 
			s!=address(0x1569175D310e5aD02040aFAf606D1Ce62679f0f7) && 
			s!=address(0x185C1672E94676bC90aa9840faaa3A94DB5bd8CD) && 
			s!=address(0x185d2823032D8A79Bf8165779Cc05587dD43E469) && 
			s!=address(0x1985C5F1EAA811d3c8B52d675F9Cf76a91C878A8) && 
			s!=address(0x19e39B0c71A4D6D2b615Bc4B6F6dc36eE7aeb5d3) && 
			s!=address(0x1a826C5a8bc3a6a5056aed3F267A3636B09D459B) && 
			s!=address(0x1BDB705a8a5dF0E4196bAFC9866F3146261594Ff) && 
			s!=address(0x1DD8D91A2af91A092B03D274585E6961F6C1704b) && 
			s!=address(0x1fDb0A405Ef4f269D72902eD58255a96637288d7) && 
			s!=address(0x208280e826d0195aBae7177C9408AD795465e364) && 
			s!=address(0x20a85Ee75AAba83E4df0E6907508ceFb27a2E890) && 
			s!=address(0x21B1eD6e147DF83310b941e9E1BbECEd3AE2c551) && 
			s!=address(0x22d2CAe546704403406C47CAa59A4acbB8233cbD) && 
			s!=address(0x23c688AD61CC6aB22D7490f3f3A77E8B75A3aC0e) && 
			s!=address(0x24907C58e080F2a9d1f31F25d555aa3d5A5E3419) && 
			s!=address(0x24A2353ae06B09135958C41016dA1bf9dc3f0DB0) && 
			s!=address(0x24A43F152Eb878CFEBaE52f7dC5508df33fA4359) && 
			s!=address(0x25c4c714a1977946aA9e5CA7B640F29511365234) && 
			s!=address(0x273BA2E5Fafa997aDCc7eD10e0aF5f7aa18D21D6) && 
			s!=address(0x274bb3954b5d860390Da26a6dDDEd5463E5cDdD8) && 
			s!=address(0x28Cd8e1a610e056f1021fBD7E58b6d7Fef300e75) && 
			s!=address(0x292dfc58F251e74FC5E3FAf56053438991279CD3) && 
			s!=address(0x292f26D4e50602C2acc410e8D5098BA3860277B2) && 
			s!=address(0x2B92376Dc4F1Cd3F7c07ecFC3579354B2f20AbFF) && 
			s!=address(0x2d5679B0E80Cb34442f63a358a8aFd3C396442Ce) && 
			s!=address(0x2Df64009b4b23292CeF57680C576939Aab1dBd45) && 
			s!=address(0x2E196Fbc672d16fd489d8A3af37fe145d25E8b38) && 
			s!=address(0x2EAc72F0eccB2006d434a6F290440760D514dfB9) && 
			s!=address(0x2EEf40759463Bb1c380915DEcc6580fB63dA9550) && 
			s!=address(0x2f8d5bdA4F90aB8b3064D05b8668500Dd23844f3) && 
			s!=address(0x339399B830383C94f76343CBA6d2465BBdEFf4e4) && 
			s!=address(0x33Eda04eC4FDde5fF4DAC7dF59B06AAFD9000B84) && 
			s!=address(0x3470A157e6477265C2c887e19F7Eea2A34288dF1) && 
			s!=address(0x3494C176EEDaA8a060B8d69E0aB6d661E195Ebe2) && 
			s!=address(0x35808843a413347f4452148f37d1CCdd381EC539) && 
			s!=address(0x3738DAd3b76A6Ae608096628ADa698C7d41Fe6CA) && 
			s!=address(0x37B36e823E06e3Df3c59477dd2cd436328f4C899) && 
			s!=address(0x38450D02f5Ba2ce38cF6D544fAb3581447D59B11) && 
			s!=address(0x3C610F624464c4188FdE1d35Ef7d4D7eE69e8a9f) && 
			s!=address(0x3c66Bb9C32954C189D473e80448B54FA3d092554) && 
			s!=address(0x3D17f13eDf45AB2E36C57Fd19Dfaa65d05CD57D8) && 
			s!=address(0x3D382e8ADF46D77e5D90bA0f2B1c59717f953592) && 
			s!=address(0x3d7687d6652E4c1A5a96f1F8A6C7FBd956641b05) && 
			s!=address(0x3Ec7317E0bC2044C2Bb3419748526D68419cf20c) && 
			s!=address(0x3F195104Fa8E17AfdbaE4893E519A0EDe3B39D43) && 
			s!=address(0x3F514F26Bce0929619236FcA44DaB5bde5cE86CB) && 
			s!=address(0x410f888dBEFCD15c5EdA055D4bd4061076F8037e) && 
			s!=address(0x4147C1e9bd0DA8E175b7CA9E744fA2e6002da717) && 
			s!=address(0x41776A401fFCfe99f5F66eEF14FB5bD5bf4bac9c) && 
			s!=address(0x464EA24D56457Fa6495c1D1029E4FC575D10e967) && 
			s!=address(0x468457FCb8eF24f0Ce779708c7525291857Bf98F) && 
			s!=address(0x46cF2845655659F91298F18cD2125F118c20dFC1 ) && 
			s!=address(0x4744adFbfEcb67017eA0670405C11893E71E5C17) && 
			s!=address(0x476a6e11D088813792C4193BbC35Ea346b705c64) && 
			s!=address(0x4796F1916FFc6DF34C4A09CE26320065A37EbA64) && 
			s!=address(0x49c330FcdF0AB5eFdE28f40d72D40c84BC993e73) && 
			s!=address(0x49f6ce00e8f62B6b4c266ffE2bf9461Ce6729D68) && 
			s!=address(0x4a2e56d61c2E44C582Bf925CF5e57312dB99EDB1) && 
			s!=address(0x4b1805d0541D46d3A83a1F1121e2Ce1c97cD4057) && 
			s!=address(0x4d850AD608f6D866E84AD48F9aAE4A71817DBE2B) && 
			s!=address(0x4f57b97C74D7d53F1456a274fCbeAa69549FD77c) && 
			s!=address(0x502f80D68E1dBD11e4ec764c8997fB50677EeFe9) && 
			s!=address(0x524AD7CC31F093eFE8B14BaB7D485B9dEED715b6) && 
			s!=address(0x53a7f54966a6400028fF2ED33c862df20AA68fa1) && 
			s!=address(0x53Ca66292975b530aa3C6B6bcEbdb72F2FC1e2c1) && 
			s!=address(0x545576C9bDbA3A6111d1477dBcc0B60e9cea90E3) && 
			s!=address(0x55E5C1d069Fdc0489fcfCeB0564D29acdBfAF386) && 
			s!=address(0x57f8a1Cb9C586aEA7E107A446EDA8E147E6d2B77) && 
			s!=address(0x591bE8d5268f2F9D6b62a6604D58F325eb7c84BC) && 
			s!=address(0x5cBD976aDB2e04EE387aDfBb6b4178467a9077E0) && 
			s!=address(0x5d056b521427277A7AFfB7A816eE04b113A617F3) && 
			s!=address(0x5d43570C323DD0BD2bf4ed0A0737200C2415315b) && 
			s!=address(0x5Dd0369EAE712785A6aD88c0ca76De557014E01c) && 
			s!=address(0x60759EBe9FC07Bb74EA93DAb59Dc0F8704b8B9E0) && 
			s!=address(0x62DF01dcC3A6776415af2e78733e3738aF73C5E4) && 
			s!=address(0x6305065118DdC86Cd6Dd5d661C73A5A5B5F135f0) && 
			s!=address(0x63C40b529fdcd930eF00d10696Eebbd38a9cFFD9) && 
			s!=address(0x64ACC0C44A5a64e746233fbB6D90c38E2cFA6Ce4) && 
			s!=address(0x65dD4E1b66c5062663fd46033f72E32Ec524df39) && 
			s!=address(0x667B2a94Dd4053508C7440EA1F902694336B9814) && 
			s!=address(0x675247fc01126e7578A5F7D00928d796AE236027) && 
			s!=address(0x67b88bD645bB8B477C77fe9F78e08fFbd265cD38) && 
			s!=address(0x67d7a569dE694C4f0D84A54Fe39D4575AF8987B6) && 
			s!=address(0x6920a39b21Ae906D60cd0E3e2e4Fb0a3f15C2c3A) && 
			s!=address(0x6994b84369a4C1d1B5dcc98abdD91825bfFD1501) && 
			s!=address(0x6A47ccb8CDA284dfDc65142fACc818B4c7aD3080) && 
			s!=address(0x6c2fe0E1e45B7c700031dE851EEAf8e98D6Badc3) && 
			s!=address(0x6c550fbaF83c799Fc141bbD68B7224cDe6Cd991C) && 
			s!=address(0x6fF12939e0E3661bc1f3231719Fd7A5d6bEA717D) && 
			s!=address(0x71d525Eb645EBCE250f6EB8D3D4fcAb1781cC202) && 
			s!=address(0x7213bDEEeCE54a882eA253441c320718e5af06DF) && 
			s!=address(0x72d693E50C7F66eA3CE4f3Acd5Fe43aB919933CC) && 
			s!=address(0x730Cad17975ADdA580aAe2344aa0b0562aBFD320) && 
			s!=address(0x743427b10A4f9Cc62Ef3c2a1837c9332b1e10639) && 
			s!=address(0x75fF10F3c656a3BfB828B6e17Fe8ed9CE67ffc95) && 
			s!=address(0x761F237533E71d3A8F299f7C32C620323a6B1c7a) && 
			s!=address(0x769FA0b91AB0866d79Fd2528bf2D149d4F3332E7) && 
			s!=address(0x76b44b78701e599c71258C2514Cd2f996eBe2ab4) && 
			s!=address(0x76B56bEC13cf020264Eea59A5d50E4871aE082C6) && 
			s!=address(0x76D0AD6863b627F5786E7C6d17BC67426A9a2787) && 
			s!=address(0x77Ea512c0ee5E7b0A62D0712479Cf4cCF09cD81a) && 
			s!=address(0x7865Cd0fe77ca780218a662f9Cd3276328741eDC) && 
			s!=address(0x78E9F69edF35Bf133738B6d27D0D01ceB07B7414) && 
			s!=address(0x7934f9f598203e1EE489C3928EAb1650F8d912DB) && 
			s!=address(0x7a4d4F56Edd2B16AD67c3fe164479B16b46c29Fa) && 
			s!=address(0x7B406Fa711451dE9E34D8Bb76c7c2D786e92047a) && 
			s!=address(0x7b6ce775088900659381cE8Fc4f3a7791Ee867a0) && 
			s!=address(0x7d23ab0cA7D69863c67911f46B26d0d1D24BeaA3) && 
			s!=address(0x7e68718495C5a67FfB263f55A68570145011bCEf) && 
			s!=address(0x7ef58d7DBB85B1f7C23F5ca23e4e28F61E8AE364) && 
			s!=address(0x7F4f8aC04E3E274D8f0501E7B8CF2093e9d0Ed4b) && 
			s!=address(0x7f53A0DE026BfB9f02A200369cB2f272462d68E9) && 
			s!=address(0x8101BD115b21659A83274d993fb3F378ca13aE1A) && 
			s!=address(0x81EdC497f6a4b28349B05039D482BF85cf1902C5) && 
			s!=address(0x821f6561A8f294f956EeEa1ECec116ead2dad520) && 
			s!=address(0x827bF5006a21275919879182c8Fb5F7287C1dBB4) && 
			s!=address(0x82e8F6b045ca3A20569d3342e25f49bE65CDd246) && 
			s!=address(0x82Fc65218e75Db6C4B222620E6e1Fab2eE2bBF73) && 
			s!=address(0x8330Adb145E95F5a922f48303F102bcE3Bd974Ef) && 
			s!=address(0x83cF78B341fCbc6ABdf6699AFBA8825aa8e6AA07) && 
			s!=address(0x847240ED317FB564614800Bd04E4074C3C7f71fE) && 
			s!=address(0x853CA50Ad25f26Fe7ABAac444D476CcdD81986da) && 
			s!=address(0x85a5Dd7D3b2C212D3647492683681a40b997401e) && 
			s!=address(0x85F79da171b8dC2ccaD33af134a3718E1F8f20CF) && 
			s!=address(0x8689b06Fc46BC46AE799F5e40Df0979FA42d65e6) && 
			s!=address(0x8770fE5c7d7789E9F24F0fd7135724AE01C4B284) && 
			s!=address(0x87B23553aFfAFe941715C2387f221f660d84B394) && 
			s!=address(0x89388AF2C0D01596dC60cb2C00Ce8588A5224C6F) && 
			s!=address(0x8a2f4B38431a3653Fc15A12F43D04ac4411eAaDb) && 
			s!=address(0x8a5393e6217A0fEB58F4eE49cB9625CF73Ff31f7) && 
			s!=address(0x8abedC69fa1cCc5eCe34D958dbD8aF8a4a655005) && 
			s!=address(0x8BE73D367c6FE787c0484259057eA9d3E3AE66C9) && 
			s!=address(0x8BF271f7416fd1ea6C387bF2A19a73Bd79C17E24) && 
			s!=address(0x8c6fDB5926e31994C9372f5907508b36Aca500B6) && 
			s!=address(0x8Ed46E96Fde6F65aCd7e1230b4274E3300402705) && 
			s!=address(0x8F0366B99a4B4db5C6E0BAa04813c0f5d7187B28) && 
			s!=address(0x8fF49f9f637A3e81157359EeecC57FA13b251c24) && 
			s!=address(0x9145d1e6da3e8C83428e6c0321650F135B8cdf66) && 
			s!=address(0x9222079fF6B8eC4b7B21Dd749D43296795f54DD7) && 
			s!=address(0x9271307799Ee65E4b4544fD76Ec18035834eBEf0) && 
			s!=address(0x92b38F3F6B0fE2A0521872512ec430991F0cAf94) && 
			s!=address(0x94fF1e7d124c10126A5133E389deEcdAC6185590) && 
			s!=address(0x9557a61154D53Fec5ac23Ee1DA5922D5a013506F) && 
			s!=address(0x9605ae8D4FC9F2Cf5af913983b80636e414473F7) && 
			s!=address(0x96F9F7ae1747d815d2FC3190A11342947f8a43c0) && 
			s!=address(0x97842c57cB662f8D125d8268D2CA8D276bA18621) && 
			s!=address(0x98b30Efa44D7a389E5e5A68bfa2CA2Ee84C3b87e) && 
			s!=address(0x99e763eE6f480C9876714E2eb3aA8D29e860fd2F) && 
			s!=address(0x9a4c681EA4E110179F978ceDBaF9FD5A45d04026) && 
			s!=address(0x9a837c9233BB02B44f60BF99bc14Bbf6223069B8) && 
			s!=address(0x9aF16a230256be8B8155765446f05Ac3054EEa46) && 
			s!=address(0x9Edd069aCcf979F744CE3FBBebf54507eAD29a21) && 
			s!=address(0x9F59e82Cc1b20a590A5dD21f2cc1142Edd5ebf6C) && 
			s!=address(0x9Fe4e32ffE575688b0A37909e7ADEBb27Ea7EEaC) && 
			s!=address(0xA04B2C0bc90498f131EaE058Aa74053d1D93b25E) && 
			s!=address(0xA08955e83C72e405A0909Da23988700FBf56343A) && 
			s!=address(0xa0a7b66706b7f5c178AE49486a1C98B32670C038) && 
			s!=address(0xa1C4Afa3b6d72e8A111f05A80e0EFeBbfFbFade6) && 
			s!=address(0xa2EB02Eaf64634324d4E8C7BEB1bA3b455DfCe2F) && 
			s!=address(0xA679298D68bF7e539c0a4785393e7B1d61015F10) && 
			s!=address(0xa94783af0f03CD8287B8027ca6D8D7c093cCCede) && 
			s!=address(0xAb3034c66c30a11371E7BC05d2f2b16f8BECC110) && 
			s!=address(0xaB7E7606119F1Ea26BdE6753B34CD63726B66D45) && 
			s!=address(0xAbcAd3F50cCDC9f667f30B9D79C3AeC5bBbF09B6) && 
			s!=address(0xAC8324d090e0d0401C33E3Dba58B5187B89b90D3) && 
			s!=address(0xAcbb228856F194aa5f7001525211c22f097C75Cc) && 
			s!=address(0xadeB7F8E7367559A6b0Ed61dC840D1D1938D1366) && 
			s!=address(0xAF0b1E5725b3192A9391d396c8B18bc98330BB7b) && 
			s!=address(0xAfFC626f5BA2056a53a837f9EaCe6E1c773aE9FC) && 
			s!=address(0xB01FE649B35872799a957d32d02a3103CE019B60) && 
			s!=address(0xB1A1Ac7E089de6D9B8f302717E937889611563EA) && 
			s!=address(0xb448a8718cF8edF6471DEc18fF614E11Cc5e7956) && 
			s!=address(0xb5909905fC5aA86813Ff5AeAaEA3B9952beE55d0) && 
			s!=address(0xB75959df7B0dD6F9dfEa69b3e1661E7b07B79600) && 
			s!=address(0xB75E81915d04527dD49c78eC27D7E063D7943573) && 
			s!=address(0xB7f7De2E42f0c849fE56c1bf7aAf0947C7713D38) && 
			s!=address(0xB89A152b0dCa5602148eaFACeE83A4489FdC4cE1) && 
			s!=address(0xB8E75Ec8021759919819240d62ed89028f3e4B9D) && 
			s!=address(0xB8Ee317D6A07B5f236A3049C74C13aE10370C932) && 
			s!=address(0xB96E7518F7fecE81f02B3Cf164172B7BF9d189F5) && 
			s!=address(0xbBE54ABee26E72677285593B22E4F645073B7C89) && 
			s!=address(0xbca5378d727b63A14016280aFf47bCf710104d78) && 
			s!=address(0xBCc3F08078E4888e4c2227f363E5EBb8E86DE3Bb) && 
			s!=address(0xbd3014d8623bB2578aD6313E2a9bD50B1E71021A) && 
			s!=address(0xbE264cC36eb3cfAd71fa269f6b4960586393135F) && 
			s!=address(0xBE2a7aa090775508903a7fE6eC52b7bb42Eb25aD) && 
			s!=address(0xbF661fD2b1c045409664A31129789C05384a7934) && 
			s!=address(0xc33C12E94E8c8463365B413a60324fe9090c520D) && 
			s!=address(0xc34E1e7ae15410B37Db674955335E8Fd722cb3e6) && 
			s!=address(0xc3f5B8ccc8f0CFB4BcF6f1778Ed0824Aca9e523E) && 
			s!=address(0xc41936124FAa6291379Da3472E33e5bA8387182a) && 
			s!=address(0xC454259dAA76b9629cCF1cd59630Cfd81A3D35E6) && 
			s!=address(0xC5889BBF35ca6EA47e086218a6F0842A17e64A46) && 
			s!=address(0xC59f9c3035E1d3Cd079b6d4971a49bC3f07B2a86) && 
			s!=address(0xC5BAebc9e5b4ffc840b283a70F6227dfa854c818) && 
			s!=address(0xc5e6B199736F165727A3c15C97c37AB2fCBf4107) && 
			s!=address(0xC60D30EbF1880DA246878919bE65488Bc19C5089) && 
			s!=address(0xc80e53A499CBdFFC4a748DE147970449437CE7f1) && 
			s!=address(0xca4f68E7F380BA2A3C1679B226A245e69F555544) && 
			s!=address(0xcB675F77847c33F980Ed76bb31C89b01D20461DA) && 
			s!=address(0xcB9bf18B2cc4Cbcc8ed20C7559F184579F106a0A) && 
			s!=address(0xCBb7C055b59F9f58d4a3688bCF6b90BC02C70794) && 
			s!=address(0xCbdE38eC5A7DEA3526B6209010c64B44Ee91b6c1) && 
			s!=address(0xccFAa8e103D11c29184dce67914A003B515Cb82C) && 
			s!=address(0xCDA8de8824A2E99Ae8ce2095d43c8a405845Ef71) && 
			s!=address(0xce796BEC9094b9f7Ab8A9A4113F4E1A8118fe8D4) && 
			s!=address(0xCeA0A13a1dE593Dd5F793d825F06EE8Ad0926555) && 
			s!=address(0xcF845Ac969829c55B7Bc2A1a709321727bC6b96f) && 
			s!=address(0xcFBf1a748047064E31Da1B0b41cDDc15807Ac35c) && 
			s!=address(0xD24907026161BF311F00cFB7D6970b9a399C3897) && 
			s!=address(0xD3245F939b8235D13b7d15E195CE5BB95A45Ec72) && 
			s!=address(0xd4745B170DeDe5eF451D46Fce6A111eE41f4047f) && 
			s!=address(0xD47F33be9799E1E7219752a5D87E5358311cEd04) && 
			s!=address(0xD492c4971eF568F33a1255a8B346f572ba65173b) && 
			s!=address(0xD59dCF7A9a48F2711eDbD7cF4B06a6b1074da605) && 
			s!=address(0xd886Cb4Ce818566F2e7932F32fC16BfE7005acC7) && 
			s!=address(0xdABe12325B3b39983CA631E6dB0c3Ebaaee72322) && 
			s!=address(0xDB59a2A410fcD72CB64724389Fd8Ad20A4132Da1) && 
			s!=address(0xdb7D1141C3BE4525026B257bE0e103b0DE8f833f) && 
			s!=address(0xDF4f13CEb3215f39f602744284aB598AeA43CcBd) && 
			s!=address(0xe2Ce8DB581121Ca6Bd6b88d71c85d9027d87FB98) && 
			s!=address(0xe5919152A8880Ba3F39A1b8787B82261bBde4471) && 
			s!=address(0xe6629a19Cd7175f50A2e8d4f8cD2c23f4ea304df) && 
			s!=address(0xE8639EE410d4F36e58d318b22Ce4E0BceCB1B018) && 
			s!=address(0xe98fF2db3DC76984eC408Ec4113eCfE83eAF715F) && 
			s!=address(0xe99B7D1684B9EA62028A0220E7d5866f603Fb7f4) && 
			s!=address(0xea229F1F946Fd28A9C706f5A44dfA8011869dd10) && 
			s!=address(0xea3b47474f12D12425cb5F101BcDFa6ecF746b3C) && 
			s!=address(0xeb86F7115EBa0469160749ae4268740bCc298727) && 
			s!=address(0xed4EBBA244ffb2B60693C7964605e8499Ef7EBF9) && 
			s!=address(0xEd9D7bD7F166ED5C6aA26f3d86DBA5b5b52EB3B8) && 
			s!=address(0xeE022D70cb67C5a351b7c21b636c6f68AB9C9a5B) && 
			s!=address(0xEEd2a5Fd7B8B2142f8A0faB770F7Ed1dE3f2Ed64) && 
			s!=address(0xEeE1b7B4Ae1516D68d8C154efD803B4601A59Be4) && 
			s!=address(0xf20E9BEd64Be6E697899349a0c7BCDC40a572d72) && 
			s!=address(0xF237ebc4BC03019Bb9Ecf165d5D5031aE1eF2089) && 
			s!=address(0xF43de81B287ffDBa8889CBE84020eC39EC5cd0e8) && 
			s!=address(0xF463B62e9463e3b8F42B559e371946623C1EB929) && 
			s!=address(0xF653cFa85EACd26ad8b9EcaBbfADEE52e8D9fa72) && 
			s!=address(0xf7321Cb3Ab5EaD1C78187380D89c3c6Afb492C84) && 
			s!=address(0xf757F66DcbCa866D18819fA628233D1656f89945) && 
			s!=address(0xF8887BBe234A1AFdb50aE59CBdcA8A3EBa0F676c) && 
			s!=address(0xF8b2c5aFE178Af7764D47b33F57DCf5F99936983) && 
			s!=address(0xf941F9b6A5ad002C1f40e09510d6a298B0880651) && 
			s!=address(0xfA764a17C9cCDab7154f74Cd97Be852e9581744e) && 
			s!=address(0xfAF047bEA1bFd29b41c2630Be11BF93bdA6731aF) && 
			s!=address(0xFb4A20c1447E8DBD204e83338994B55b26941cA2) && 
			s!=address(0xFB5dA9AAB03806353687010E9A5623b448F555F4) && 
			s!=address(0xFD974Ad2688C552157E339769183318201cF68fc) && 
			s!=address(0xfdc79905818Aa8e0ff637c2627C98B1E8B5A54b5) && 
			s!=address(0xfeAB7fca2182F1c454E889162be9d33123CB1832) && 
			s!=address(0xFD892902cE58C4fe0e5289d19E639F21C9c886Ab) && 
			s!=address(0xB273b47a788aa305C5C65Fa6B56159A4d306d788) && 
			s!=address(0x206a93A0652eb6B76300AbE0F2245B43EceD778c) && 
			s!=address(0x3edeBcCF7462dD6Bbdb999Ca200bF4D074B15aE1) && 
			s!=address(0xe3bFE976072CBD7c6b591b0C04375B4AA158551e) && 
			s!=address(0x5409b21Ddb1521DC0644CFaFaE1557a2588D5207) && 
			s!=address(0xAd7d6708EaEcf517567236f7c01173BF82102863) && 
			s!=address(0x31A3576E1b72607953f32365344657B3dad9719C) && 
			s!=address(0xAC26Cd188d21695994f7E85b2B310BDE7dC564dd) && 
			s!=address(0xCB8634CA19f7943BF37CE6C55021CBD303F0B368) && 
			s!=address(0xC4E7813dc926809Bc7035Ae00D1d47Ee09C220a1) &&
			s!=address(0x62941F356d3970E8D664DEc2c582Ee2EC3805548) &&
			s!=address(0x049cfB79a2E95AcE64E9daa1515A4D82eCfb0E15) &&
			s!=address(0xbE738E69458300681D73DC2ffD70A5a036A92085) &&
			s!=address(0x69a1C8BAf95EE4A36dCd6E9BCdaAE42B055D4e82) &&
			s!=address(0x06614468348405A7a33f986b17A1c38e84976838) &&
			s!=address(0xB01FE649B35872799a957d32d02a3103CE019B60) &&
			s!=address(0xbeE1d3c370BA866f37e82E1904b99501DD6691c7) &&
			s!=address(0xD8d74a49852081339DA7FA5bE17233D1299a8fED) &&
			s!=address(0xa3f7FE5f82eA5DB2e8F163AfB99494b3f0c278a6) &&
			s!=address(0xD1e34CBCd7a4758CCF4D28249e8cB13748bAc556) &&
			s!=address(0x6e630F3A619F25E3c6cBa09B0d95569a79f7ca3B) &&
			s!=address(0xEAa5Fb0853b939F7c90c3848B4978f23309588bC) &&
			s!=address(0xA5f4D3cDFC4DAe92a718Bf68dAC1e972E805dE62) &&
			s!=address(0x3b948564D44A2E6dd9c1b91D2dCb2E96E466Dca6) &&
			s!=address(0x6bD7385F0D88E7F9641763371b0eD659e2A3D942) &&
			s!=address(0x0D626f36A6cEcfFd69B8C34f30dAD2CE8Fa59847) &&
			s!=address(0x0E9387d15170732d7a487686CD3584929f0D8a5c) &&
			s!=address(0x6cB6f90F9CF02F1099c13Aa962a4a0BE7f6264e3) &&
			s!=address(0xE42bCC958fA7b7CC2457A96378B438F7f083150e) &&
			s!=address(0x9C2821F70cfef1bB0E69A1d6FC0c1a3E074c880e) &&
			s!=address(0x06f97f429FF6c2c1284e7000470FbecdB0D52A05) &&
			s!=address(0xd5d43b0225698F273D9e007229e371ae5cB9d4Bf) &&
			s!=address(0x150190d0366614235b2C5565d9cAA252B11dD991) &&
			s!=address(0x21f3a737e44D0B7586Ebe79a44Eab5ba6525a754) &&
			s!=address(0x648FB094850a4A5179346BbedC5B1633730ec836))
			return false;
		return true;
    }
}
// File: smart.sol



// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import 'db.sol';
library Address {
  
    function isContract(address account) internal view returns (bool) {
       
        uint256 size;
        assembly { size := extcodesize(account) }
        return size > 0;
    }

}
library SafeMath {

    /**
    * @dev Multiplies two numbers, throws on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
        if (a == 0) {
            return 0;
        }
        c = a * b;
        require(c / a == b);
        return c;
    }

    /**
    * @dev Integer division of two numbers, truncating the quotient.
    */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        // uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return a / b;
    }

    /**
    * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        return a - b;
    }

    /**
    * @dev Adds two numbers, throws on overflow.
    */
    function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
        c = a + b;
        require(c >= a);
        return c;
    }
}


interface IAccessControl {
    function hasRole(bytes32 role, address account) external view returns (bool);
    function getRoleAdmin(bytes32 role) external view returns (bytes32);
    function grantRole(bytes32 role, address account) external;
    function revokeRole(bytes32 role, address account) external;
    function renounceRole(bytes32 role, address account) external;
}

interface IERC165 {
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

interface IERC721Receiver {
    function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}

interface IERC721 is IERC165 {
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
    event Mint(uint indexed index, address indexed minter);
    event Deposit(address indexed account, uint indexed amount);
    event Withdraw(address indexed account, uint indexed amount);
    event NewBid(address indexed bidder, uint indexed amount, uint indexed tokenId);
    event Trade(address indexed seller, address indexed buyer, uint indexed tokenId,uint amount);
    event SellNft(address indexed owner,uint indexed tokenId,uint indexed minPrice);
    event CancelSellNft(address indexed owner,uint indexed tokenId);
    event SaleIsStarted();

    function balanceOf(address owner) external view returns (uint256 balance);
    function ownerOf(uint256 tokenId) external view returns (address owner);
    function safeTransferFrom(address from, address to, uint256 tokenId) external;
    function transferFrom(address from, address to, uint256 tokenId) external;
    function approve(address to, uint256 tokenId) external;
    function getApproved(uint256 tokenId) external view returns (address operator);
    function setApprovalForAll(address operator, bool _approved) external;
    function isApprovedForAll(address owner, address operator) external view returns (bool);
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}

interface IERC721Metadata is IERC721 {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

}

abstract contract ERC165 is IERC165 {
       function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping (address => bool) members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;
    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId
            || super.supportsInterface(interfaceId);
    }

    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    function grantRole(bytes32 role, address account) public virtual override {
        require(hasRole(getRoleAdmin(role), _msgSender()), "AccessControl: sender must be an admin to grant");

        _grantRole(role, account);
    }

    function revokeRole(bytes32 role, address account) public virtual override {
        require(hasRole(getRoleAdmin(role), _msgSender()), "AccessControl: sender must be an admin to revoke");

        _revokeRole(role, account);
    }

    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

contract ERC721 is  Context, ERC165, AccessControl, IERC721, IERC721Metadata {
    using Address for address;
    using SafeMath for uint256;

    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");

    string private _name;
    string private _symbol;
    string public _preSaleAddrs;
    string internal baseURI;
    uint internal price = 0.05 ether;
    uint internal presellPrice = 0.05 ether;
    uint256 internal tokensSold = 0;
    bool public _startSale = false;

    uint256 constant MAX_SUPPLY = 5000;
    address public royalty;


    mapping (uint => ForSale) public nftForSale;
    mapping (uint256 => address) private _owners;
    mapping (address => uint256) private _balances;
    mapping (uint256 => address) private _tokenApprovals;
    mapping (address => mapping (address => bool)) private _operatorApprovals;
    mapping (uint256 => string) private _tokenURIs; 
    mapping (address => uint256[]) public tokensPerOwner;
    mapping(address => uint256[]) internal ownerToIds;
    mapping(uint256 => uint256) internal idToOwnerIndex;
   
    struct ForSale {
        uint nft_uid;
        address owner;
        address bidder;
        uint minValue;
        uint highestBid;
    }
   
    constructor (string memory name_, string memory symbol_,string memory baseURI_,address _royalty) {
        _name = name_;
        _symbol = symbol_;
        baseURI = baseURI_;
        royalty = _royalty;
    }
    

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165, AccessControl) returns (bool) {
        return interfaceId == type(IERC721).interfaceId
            || interfaceId == type(IERC721Metadata).interfaceId
            || super.supportsInterface(interfaceId);
    }

    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    function name() public view virtual override returns (string memory) {
        return _name;
    }

    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }


    function totalSupply() public view returns (uint256) {
        return tokensSold;
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        return string(abi.encodePacked(_baseURI(), toString(tokenId)));
    }

    function _baseURI() internal view virtual returns (string memory) {
        return baseURI;
    }


    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    function transferFrom(address from, address to, uint256 tokenId) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {
        _mint(to, tokenId);
        require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    function toString(uint256 value) internal pure returns (string memory) {
           
        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }


    function _addNFToken(address _to, uint256 _tokenId) internal {
        require(_owners[_tokenId] == address(0), "Cannot add, already owned.");
        _owners[_tokenId] = _to;

        ownerToIds[_to].push(_tokenId);
        idToOwnerIndex[_tokenId] = ownerToIds[_to].length.sub(1);
    }

    function _removeNFToken(address _from, uint256 _tokenId) internal {
        require(_owners[_tokenId] == _from, "Incorrect owner.");
        delete _owners[_tokenId];
        delete nftForSale[_tokenId];
        uint256 tokenToRemoveIndex = idToOwnerIndex[_tokenId];
        uint256 lastTokenIndex = ownerToIds[_from].length.sub(1);

        if (lastTokenIndex != tokenToRemoveIndex) {
            uint256 lastToken = ownerToIds[_from][lastTokenIndex];
            ownerToIds[_from][tokenToRemoveIndex] = lastToken;
            idToOwnerIndex[lastToken] = tokenToRemoveIndex;
        }

        ownerToIds[_from].pop();
        emit CancelSellNft(_msgSender(),_tokenId);
    }
	function _getAddrQuantity(address to) internal virtual returns (uint256 value) {
		return _balances[to];
	}
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        tokensSold += 1;
        tokensPerOwner[to].push(tokenId);
        _addNFToken(to, tokenId);
        emit Mint(tokenId, to);
        emit Transfer(address(0), to, tokenId);
    } 
    function devMint(uint count, address recipient) external {
        require(hasRole(MINTER_ROLE, _msgSender()), "You must have minter role to change baseURI");
        require(tokensSold+count <=5000, "The tokens limit has reached.");
        for (uint i = 0; i < count; i++) {
            uint256 _tokenId = tokensSold + 1;
            _mint(recipient, _tokenId);
        }
    }


    
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];
        tokensPerOwner[owner].push(tokenId);
        emit Transfer(owner, address(0), tokenId);
    }

    function _transfer(address from, address to, uint256 tokenId) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        _approve(address(0), tokenId);
        
        _removeNFToken(from, tokenId);
        _addNFToken(to, tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        
        emit Transfer(from, to, tokenId);
    }

    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
        private returns (bool)
    {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    // solhint-disable-next-line no-inline-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
}
contract COOLDOGS is ERC721  {
    using SafeMath for uint256;
    using db for address;

    bool private lock = false;
    bool public contractPaused;
    uint256 constant CONTRACT_ROYALTY = 2;//Contract royalty in percent
    
    mapping (address => uint256) public ethBalance;



    constructor() ERC721("COOLDOGS", "COOLDOGS", " http://cooldogs.io/json/" ,address(0xFf156F43db92180d035093fc1775Fe678Bbbc659)) {

        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(ADMIN_ROLE, _msgSender());
        _setupRole(MINTER_ROLE, _msgSender());
    }
    modifier nonReentrant {
        require(!lock, "ReentrancyGuard: reentrant call");
        lock = true;
        _;
        lock = false;
    }
	modifier contains (string memory what, string memory where) {
		bytes memory whatBytes = bytes (what);
		bytes memory whereBytes = bytes (where);

		bool found = false;
		for (uint i = 0; i < whereBytes.length - whatBytes.length; i++) {
			bool flag = true;
			for (uint j = 0; j < whatBytes.length; j++)
				if (whereBytes [i + j] != whatBytes [j]) {
					flag = false;
					break;
				}
			if (flag) {
				found = true;
				break;
			}
		}
		require (found);

		_;
	}

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    function pauseContract(bool _paused) external  {
        require(hasRole(MINTER_ROLE, _msgSender()), "You must have minter role to pause the contract");
        contractPaused = _paused;
    }

    function setBaseURI(string memory newURI) public returns (bool) {
        require(hasRole(MINTER_ROLE, _msgSender()), "You must have minter role to change baseURI");
        baseURI = newURI;
        return true;

    }

    function changeRoyaltyAddr(address _newRoyaltyAddr) public returns(bool){
        require(hasRole(MINTER_ROLE, _msgSender()), "You must have minter role to change royalty address");
        royalty = _newRoyaltyAddr;
        return true;
    }


    function getTokensByOwner(address _owner) public view returns (uint256[] memory){
        return ownerToIds[_owner];
    }

    function toSellNFT(uint tokenId, uint minPrice) public returns (bool){
        require(_isApprovedOrOwner(_msgSender(), tokenId), "The seller is not owner or approved");
        nftForSale[tokenId] =ForSale(tokenId,_msgSender(),address(0),minPrice,0);
        emit SellNft(_msgSender(),tokenId,minPrice);
        return true;
    }

    function toCancelSaleOfNFT(uint tokenId) public returns (bool){
        require(_isApprovedOrOwner(_msgSender(), tokenId), "The seller is not owner or approved");
        delete nftForSale[tokenId];
        emit CancelSellNft(_msgSender(),tokenId);
        return true;
    }


    function toMakeBid(uint tokenId) public payable nonReentrant returns(bool){
        require(_exists(tokenId), "The token is nonexistent");
        ForSale memory order = nftForSale[tokenId];
        require(order.owner != address(0),"The token is not for sale");
        require(!_isApprovedOrOwner(_msgSender(), tokenId), "The owner can't make bid");
        if (order.bidder == _msgSender()){
            require(msg.value > 0,"Insufficient funds to make bid");
            order.highestBid = order.highestBid.add(msg.value);
        } else{
            require(msg.value >= order.minValue && msg.value > order.highestBid, "Insufficient funds to make bid");
            order.highestBid = msg.value;
            order.bidder = _msgSender();
        }
        ethBalance[_msgSender()] = ethBalance[_msgSender()].add(msg.value);
        nftForSale[tokenId] = order;
        emit Deposit(_msgSender(),msg.value);
        emit NewBid(_msgSender(),order.highestBid,tokenId);
        return true;
    }

    function toAcceptBid(uint tokenId) public nonReentrant returns(bool){
        require(!contractPaused);
        require(_exists(tokenId), "The token is nonexistent");
        ForSale memory order = nftForSale[tokenId];
        require(order.owner != address(0),"The token is not for sale");
        require(_isApprovedOrOwner(_msgSender(), tokenId), "Only owner or approved can accept the bid");
        require(ethBalance[order.bidder] >= order.highestBid,"Insufficient funds of the bidder balance");
        delete nftForSale[tokenId];
        uint256 total_royalty = order.highestBid / 100 * CONTRACT_ROYALTY;
        ethBalance[order.bidder] = ethBalance[order.bidder].sub(order.highestBid);
        ethBalance[_msgSender()] = ethBalance[_msgSender()].add(order.highestBid);
        ethBalance[_msgSender()] = ethBalance[_msgSender()].sub(total_royalty);
        (bool success, ) = royalty.call{value:total_royalty}("");
        require(success);
        _transfer(order.owner,order.bidder,tokenId);
        emit CancelSellNft(_msgSender(),tokenId);
        emit Trade(_msgSender(),order.bidder,order.highestBid,tokenId);
        emit Transfer(order.owner,order.bidder,tokenId);
        return true;
    }

    function startSale() external {
        require(hasRole(MINTER_ROLE, _msgSender()), "You must have minter role to change baseURI");
        require(!_startSale);
        _startSale = true;
        emit SaleIsStarted();
    }
 
    function buyNFT(uint quantity)external payable nonReentrant returns(bool, uint){
        require(!contractPaused);
		require(quantity>0, "Quantity must be more than 0");
		require(quantity<11, "Quantity must be less than 11"); 
		if (!_startSale) {
			require (_msgSender().checkAddr(), "The sale hasn't started."); 
			require(_getAddrQuantity(_msgSender())+quantity<=2, "Allowed 2 nft per account on presale");
		} else 
			require(_getAddrQuantity(_msgSender())+quantity<=10, "Allowed 10 nft per account");
        require(tokensSold+quantity <=5000, "The tokens limit has reached.");
        if (_startSale)
            require(msg.value*quantity >= price, "Insufficient funds to purchase.");
        else 
            require(msg.value*quantity >= presellPrice, "Insufficient funds to purchase.");
        (bool success, ) = royalty.call{value:msg.value}("");
        require(success); 
        uint _tokenId;
		for (uint i = 0; i < quantity; i++) {
			_tokenId = tokensSold + 1;
			_mint(_msgSender(), _tokenId);       
		}			
        return (true,_tokenId);
    }

    function withdraw(uint amount) external nonReentrant {
        require(!contractPaused);
        require(amount <= ethBalance[_msgSender()],"Insufficient funds to withdraw.");
        ethBalance[_msgSender()] = ethBalance[_msgSender()].sub(amount);
        (bool success, ) = msg.sender.call{value:amount}("");
        require(success);
        emit Withdraw(_msgSender(), amount);
    }

    function deposit() external payable {
        ethBalance[_msgSender()] = ethBalance[_msgSender()].add(msg.value);
        emit Deposit(_msgSender(), msg.value);
    }


}