Address Contract Partially Verified
Address
0xB161e4d8a55288d2e45F2F1216f76A92f31a2789
Balance
0 ETH
Nonce
1
Code Size
18799 bytes
Creator
0x7192B018...E2e1 at tx 0xb165ad19...b75243
Indexed Transactions
0 (1 on-chain, 1.3% indexed)
Contract Bytecode
18799 bytes
0x6080604052600436106102465760003560e01c806370a0823111610139578063ba7d2c76116100b6578063c87b56dd1161007a578063c87b56dd14610851578063d0eb26b01461088e578063da3ef23f146108b7578063e3f1e53a146108e0578063e985e9c51461090b578063f2fde38b1461094857610246565b8063ba7d2c761461076c578063ba81c38514610797578063bedb86fb146107d4578063c54e73e3146107fd578063c66828621461082657610246565b8063a0712d68116100fd578063a0712d68146106a8578063a22cb465146106c4578063aa90ed84146106ed578063b187bd2614610718578063b88d4fde1461074357610246565b806370a08231146105d3578063715018a6146106105780638da5cb5b1461062757806395364a841461065257806395d89b411461067d57610246565b80633ccfd60b116101c7578063484b973c1161018b578063484b973c146104fd57806355f804b31461051957806360fac2a4146105425780636352211e1461056b5780636c0360eb146105a857610246565b80633ccfd60b1461043b57806342842e0e1461044557806342966c681461046e578063438b63001461049757806344a0d68a146104d457610246565b806313faede61161020e57806313faede61461034257806318160ddd1461036d57806323b872dd14610398578063245a3dac146103c157806327820851146103fe57610246565b8063019137af1461024b57806301ffc9a71461027457806306fdde03146102b1578063081812fc146102dc578063095ea7b314610319575b600080fd5b34801561025757600080fd5b50610272600480360381019061026d919061337e565b610971565b005b34801561028057600080fd5b5061029b600480360381019061029691906133ab565b610a0a565b6040516102a89190613a98565b60405180910390f35b3480156102bd57600080fd5b506102c6610aec565b6040516102d39190613ab3565b60405180910390f35b3480156102e857600080fd5b5061030360048036038101906102fe919061344e565b610b7e565b6040516103109190613a0f565b60405180910390f35b34801561032557600080fd5b50610340600480360381019061033b91906132de565b610c03565b005b34801561034e57600080fd5b50610357610d1b565b6040516103649190613dd5565b60405180910390f35b34801561037957600080fd5b50610382610d21565b60405161038f9190613dd5565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba91906131c8565b610d32565b005b3480156103cd57600080fd5b506103e860048036038101906103e3919061315b565b610d92565b6040516103f59190613a98565b60405180910390f35b34801561040a57600080fd5b506104256004803603810190610420919061315b565b610e10565b6040516104329190613df0565b60405180910390f35b610443610e66565b005b34801561045157600080fd5b5061046c600480360381019061046791906131c8565b610f62565b005b34801561047a57600080fd5b506104956004803603810190610490919061344e565b610f82565b005b3480156104a357600080fd5b506104be60048036038101906104b9919061315b565b610fde565b6040516104cb9190613a76565b60405180910390f35b3480156104e057600080fd5b506104fb60048036038101906104f6919061344e565b6110e9565b005b610517600480360381019061051291906132de565b61116f565b005b34801561052557600080fd5b50610540600480360381019061053b9190613405565b611287565b005b34801561054e57600080fd5b506105696004803603810190610564919061331e565b61131d565b005b34801561057757600080fd5b50610592600480360381019061058d919061344e565b61143f565b60405161059f9190613a0f565b60405180910390f35b3480156105b457600080fd5b506105bd6114f1565b6040516105ca9190613ab3565b60405180910390f35b3480156105df57600080fd5b506105fa60048036038101906105f5919061315b565b61157f565b6040516106079190613dd5565b60405180910390f35b34801561061c57600080fd5b50610625611637565b005b34801561063357600080fd5b5061063c6116bf565b6040516106499190613a0f565b60405180910390f35b34801561065e57600080fd5b506106676116e9565b6040516106749190613a98565b60405180910390f35b34801561068957600080fd5b506106926116fc565b60405161069f9190613ab3565b60405180910390f35b6106c260048036038101906106bd919061344e565b61178e565b005b3480156106d057600080fd5b506106eb60048036038101906106e6919061329e565b611a6e565b005b3480156106f957600080fd5b50610702611bef565b60405161070f9190613a98565b60405180910390f35b34801561072457600080fd5b5061072d611c02565b60405161073a9190613a98565b60405180910390f35b34801561074f57600080fd5b5061076a6004803603810190610765919061321b565b611c15565b005b34801561077857600080fd5b50610781611c77565b60405161078e9190613dd5565b60405180910390f35b3480156107a357600080fd5b506107be60048036038101906107b9919061315b565b611c7d565b6040516107cb9190613df0565b60405180910390f35b3480156107e057600080fd5b506107fb60048036038101906107f6919061337e565b611c9d565b005b34801561080957600080fd5b50610824600480360381019061081f919061337e565b611d36565b005b34801561083257600080fd5b5061083b611dcf565b6040516108489190613ab3565b60405180910390f35b34801561085d57600080fd5b506108786004803603810190610873919061344e565b611e5d565b6040516108859190613ab3565b60405180910390f35b34801561089a57600080fd5b506108b560048036038101906108b0919061344e565b611edc565b005b3480156108c357600080fd5b506108de60048036038101906108d99190613405565b611f62565b005b3480156108ec57600080fd5b506108f5611ff8565b6040516109029190613dd5565b60405180910390f35b34801561091757600080fd5b50610932600480360381019061092d9190613188565b611ffe565b60405161093f9190613a98565b60405180910390f35b34801561095457600080fd5b5061096f600480360381019061096a919061315b565b612092565b005b61097961218a565b73ffffffffffffffffffffffffffffffffffffffff166109976116bf565b73ffffffffffffffffffffffffffffffffffffffff16146109ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e490613c95565b60405180910390fd5b80600d60026101000a81548160ff02191690831515021790555050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ad557507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610ae55750610ae482612192565b5b9050919050565b606060008054610afb90614106565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2790614106565b8015610b745780601f10610b4957610100808354040283529160200191610b74565b820191906000526020600020905b815481529060010190602001808311610b5757829003601f168201915b5050505050905090565b6000610b89826121fc565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613c75565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610c0e8261143f565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7690613d15565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610c9e61218a565b73ffffffffffffffffffffffffffffffffffffffff161480610ccd5750610ccc81610cc761218a565b611ffe565b5b610d0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0390613bb5565b60405180910390fd5b610d168383612268565b505050565b600b5481565b6000610d2d6008612321565b905090565b610d43610d3d61218a565b8261232f565b610d82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7990613d55565b60405180910390fd5b610d8d83838361240d565b505050565b600080600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1690506001811480610df65750600281145b15610e05576001915050610e0b565b60009150505b919050565b6000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b610e6e61218a565b73ffffffffffffffffffffffffffffffffffffffff16610e8c6116bf565b73ffffffffffffffffffffffffffffffffffffffff1614610ee2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed990613c95565b60405180910390fd5b6000610eec6116bf565b73ffffffffffffffffffffffffffffffffffffffff1647604051610f0f906139fa565b60006040518083038185875af1925050503d8060008114610f4c576040519150601f19603f3d011682016040523d82523d6000602084013e610f51565b606091505b5050905080610f5f57600080fd5b50565b610f7d83838360405180602001604052806000815250611c15565b505050565b610f93610f8d61218a565b8261232f565b610fd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc990613d95565b60405180910390fd5b610fdb81612669565b50565b60606000610feb8361157f565b905060008167ffffffffffffffff8111156110095761100861429f565b5b6040519080825280602002602001820160405280156110375781602001602082028036833780820191505090505b50905060006001905060005b8381108015611054575061270d8211155b156110dd5760006110648361143f565b90508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156110c957828483815181106110ae576110ad614270565b5b60200260200101818152505081806110c590614169565b9250505b82806110d490614169565b93505050611043565b82945050505050919050565b6110f161218a565b73ffffffffffffffffffffffffffffffffffffffff1661110f6116bf565b73ffffffffffffffffffffffffffffffffffffffff1614611165576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115c90613c95565b60405180910390fd5b80600b8190555050565b61117761218a565b73ffffffffffffffffffffffffffffffffffffffff166111956116bf565b73ffffffffffffffffffffffffffffffffffffffff16146111eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e290613c95565b60405180910390fd5b61270d816111f96008612321565b6112039190613f2e565b1115611244576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123b90613c35565b60405180910390fd5b6000600190505b8181116112825761125c600861277a565b61126f8361126a6008612321565b612799565b808061127a90614169565b91505061124b565b505050565b61128f61218a565b73ffffffffffffffffffffffffffffffffffffffff166112ad6116bf565b73ffffffffffffffffffffffffffffffffffffffff1614611303576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fa90613c95565b60405180910390fd5b8060099080519060200190611319929190612f04565b5050565b61132561218a565b73ffffffffffffffffffffffffffffffffffffffff166113436116bf565b73ffffffffffffffffffffffffffffffffffffffff1614611399576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139090613c95565b60405180910390fd5b60005b838390508110156114395781600e60008686858181106113bf576113be614270565b5b90506020020160208101906113d4919061315b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff160217905550808061143190614169565b91505061139c565b50505050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114df90613c15565b60405180910390fd5b80915050919050565b600980546114fe90614106565b80601f016020809104026020016040519081016040528092919081815260200182805461152a90614106565b80156115775780601f1061154c57610100808354040283529160200191611577565b820191906000526020600020905b81548152906001019060200180831161155a57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e790613bf5565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61163f61218a565b73ffffffffffffffffffffffffffffffffffffffff1661165d6116bf565b73ffffffffffffffffffffffffffffffffffffffff16146116b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116aa90613c95565b60405180910390fd5b6116bd60006127b7565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600d60019054906101000a900460ff1681565b60606001805461170b90614106565b80601f016020809104026020016040519081016040528092919081815260200182805461173790614106565b80156117845780601f1061175957610100808354040283529160200191611784565b820191906000526020600020905b81548152906001019060200180831161176757829003601f168201915b5050505050905090565b600260075414156117d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117cb90613d75565b60405180910390fd5b6002600781905550600d60009054906101000a900460ff161561182c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182390613cb5565b60405180910390fd5b6000811161186f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186690613db5565b60405180910390fd5b600061187a8261287d565b905061270d8161188a6008612321565b6118949190613f2e565b11156118d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118cc90613c35565b60405180910390fd5b6118dd6116bf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a235760011515600d60019054906101000a900460ff16151514156119745761193433610d92565b611973576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196a90613bd5565b60405180910390fd5b5b600061197f3361157f565b9050600c5482826119909190613f2e565b11156119d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c890613b35565b60405180910390fd5b82600b546119df9190613fb5565b341015611a21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1890613d35565b60405180910390fd5b505b6000600190505b818111611a6157611a3b600861277a565b611a4e33611a496008612321565b612799565b8080611a5990614169565b915050611a2a565b5050600160078190555050565b611a7661218a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611ae4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611adb90613b75565b60405180910390fd5b8060056000611af161218a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611b9e61218a565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611be39190613a98565b60405180910390a35050565b600d60029054906101000a900460ff1681565b600d60009054906101000a900460ff1681565b611c26611c2061218a565b8361232f565b611c65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c5c90613d55565b60405180910390fd5b611c718484848461296f565b50505050565b600c5481565b600e6020528060005260406000206000915054906101000a900460ff1681565b611ca561218a565b73ffffffffffffffffffffffffffffffffffffffff16611cc36116bf565b73ffffffffffffffffffffffffffffffffffffffff1614611d19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1090613c95565b60405180910390fd5b80600d60006101000a81548160ff02191690831515021790555050565b611d3e61218a565b73ffffffffffffffffffffffffffffffffffffffff16611d5c6116bf565b73ffffffffffffffffffffffffffffffffffffffff1614611db2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da990613c95565b60405180910390fd5b80600d60016101000a81548160ff02191690831515021790555050565b600a8054611ddc90614106565b80601f0160208091040260200160405190810160405280929190818152602001828054611e0890614106565b8015611e555780601f10611e2a57610100808354040283529160200191611e55565b820191906000526020600020905b815481529060010190602001808311611e3857829003601f168201915b505050505081565b6060611e68826121fc565b611ea7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9e90613cf5565b60405180910390fd5b6009611eb2836129cb565b600a604051602001611ec6939291906139c9565b6040516020818303038152906040529050919050565b611ee461218a565b73ffffffffffffffffffffffffffffffffffffffff16611f026116bf565b73ffffffffffffffffffffffffffffffffffffffff1614611f58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4f90613c95565b60405180910390fd5b80600c8190555050565b611f6a61218a565b73ffffffffffffffffffffffffffffffffffffffff16611f886116bf565b73ffffffffffffffffffffffffffffffffffffffff1614611fde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd590613c95565b60405180910390fd5b80600a9080519060200190611ff4929190612f04565b5050565b61270d81565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61209a61218a565b73ffffffffffffffffffffffffffffffffffffffff166120b86116bf565b73ffffffffffffffffffffffffffffffffffffffff161461210e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161210590613c95565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561217e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217590613af5565b60405180910390fd5b612187816127b7565b50565b600033905090565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166122db8361143f565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081600001549050919050565b600061233a826121fc565b612379576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237090613b95565b60405180910390fd5b60006123848361143f565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806123f357508373ffffffffffffffffffffffffffffffffffffffff166123db84610b7e565b73ffffffffffffffffffffffffffffffffffffffff16145b8061240457506124038185611ffe565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661242d8261143f565b73ffffffffffffffffffffffffffffffffffffffff1614612483576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161247a90613cd5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156124f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ea90613b55565b60405180910390fd5b6124fe838383612b2c565b612509600082612268565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612559919061400f565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546125b09190613f2e565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006126748261143f565b905061268281600084612b2c565b61268d600083612268565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126dd919061400f565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b600181600001600082825461278f9190613f2e565b9250508190555050565b6127b3828260405180602001604052806000815250612b31565b5050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600060011515600d60029054906101000a900460ff1615151415612966576000600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff169050600181148015612900575060058310155b1561291a576002836129129190613f2e565b91505061296a565b60018114806129295750600281145b8015612936575060038310155b801561294a575060046129483361157f565b105b156129645760018361295c9190613f2e565b91505061296a565b505b8190505b919050565b61297a84848461240d565b61298684848484612b8c565b6129c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129bc90613ad5565b60405180910390fd5b50505050565b60606000821415612a13576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612b27565b600082905060005b60008214612a45578080612a2e90614169565b915050600a82612a3e9190613f84565b9150612a1b565b60008167ffffffffffffffff811115612a6157612a6061429f565b5b6040519080825280601f01601f191660200182016040528015612a935781602001600182028036833780820191505090505b5090505b60008514612b2057600182612aac919061400f565b9150600a85612abb91906141b2565b6030612ac79190613f2e565b60f81b818381518110612add57612adc614270565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612b199190613f84565b9450612a97565b8093505050505b919050565b505050565b612b3b8383612d23565b612b486000848484612b8c565b612b87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7e90613ad5565b60405180910390fd5b505050565b6000612bad8473ffffffffffffffffffffffffffffffffffffffff16612ef1565b15612d16578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612bd661218a565b8786866040518563ffffffff1660e01b8152600401612bf89493929190613a2a565b602060405180830381600087803b158015612c1257600080fd5b505af1925050508015612c4357506040513d601f19601f82011682018060405250810190612c4091906133d8565b60015b612cc6573d8060008114612c73576040519150601f19603f3d011682016040523d82523d6000602084013e612c78565b606091505b50600081511415612cbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cb590613ad5565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612d1b565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612d93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d8a90613c55565b60405180910390fd5b612d9c816121fc565b15612ddc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dd390613b15565b60405180910390fd5b612de860008383612b2c565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612e389190613f2e565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b600080823b905060008111915050919050565b828054612f1090614106565b90600052602060002090601f016020900481019282612f325760008555612f79565b82601f10612f4b57805160ff1916838001178555612f79565b82800160010185558215612f79579182015b82811115612f78578251825591602001919060010190612f5d565b5b509050612f869190612f8a565b5090565b5b80821115612fa3576000816000905550600101612f8b565b5090565b6000612fba612fb584613e30565b613e0b565b905082815260208101848484011115612fd657612fd56142dd565b5b612fe18482856140c4565b509392505050565b6000612ffc612ff784613e61565b613e0b565b905082815260208101848484011115613018576130176142dd565b5b6130238482856140c4565b509392505050565b60008135905061303a816148c6565b92915050565b60008083601f840112613056576130556142d3565b5b8235905067ffffffffffffffff811115613073576130726142ce565b5b60208301915083602082028301111561308f5761308e6142d8565b5b9250929050565b6000813590506130a5816148dd565b92915050565b6000813590506130ba816148f4565b92915050565b6000815190506130cf816148f4565b92915050565b600082601f8301126130ea576130e96142d3565b5b81356130fa848260208601612fa7565b91505092915050565b600082601f830112613118576131176142d3565b5b8135613128848260208601612fe9565b91505092915050565b6000813590506131408161490b565b92915050565b60008135905061315581614922565b92915050565b600060208284031215613171576131706142e7565b5b600061317f8482850161302b565b91505092915050565b6000806040838503121561319f5761319e6142e7565b5b60006131ad8582860161302b565b92505060206131be8582860161302b565b9150509250929050565b6000806000606084860312156131e1576131e06142e7565b5b60006131ef8682870161302b565b93505060206132008682870161302b565b925050604061321186828701613131565b9150509250925092565b60008060008060808587031215613235576132346142e7565b5b60006132438782880161302b565b94505060206132548782880161302b565b935050604061326587828801613131565b925050606085013567ffffffffffffffff811115613286576132856142e2565b5b613292878288016130d5565b91505092959194509250565b600080604083850312156132b5576132b46142e7565b5b60006132c38582860161302b565b92505060206132d485828601613096565b9150509250929050565b600080604083850312156132f5576132f46142e7565b5b60006133038582860161302b565b925050602061331485828601613131565b9150509250929050565b600080600060408486031215613337576133366142e7565b5b600084013567ffffffffffffffff811115613355576133546142e2565b5b61336186828701613040565b9350935050602061337486828701613146565b9150509250925092565b600060208284031215613394576133936142e7565b5b60006133a284828501613096565b91505092915050565b6000602082840312156133c1576133c06142e7565b5b60006133cf848285016130ab565b91505092915050565b6000602082840312156133ee576133ed6142e7565b5b60006133fc848285016130c0565b91505092915050565b60006020828403121561341b5761341a6142e7565b5b600082013567ffffffffffffffff811115613439576134386142e2565b5b61344584828501613103565b91505092915050565b600060208284031215613464576134636142e7565b5b600061347284828501613131565b91505092915050565b6000613487838361399c565b60208301905092915050565b61349c81614043565b82525050565b60006134ad82613eb7565b6134b78185613ee5565b93506134c283613e92565b8060005b838110156134f35781516134da888261347b565b97506134e583613ed8565b9250506001810190506134c6565b5085935050505092915050565b61350981614055565b82525050565b600061351a82613ec2565b6135248185613ef6565b93506135348185602086016140d3565b61353d816142ec565b840191505092915050565b600061355382613ecd565b61355d8185613f12565b935061356d8185602086016140d3565b613576816142ec565b840191505092915050565b600061358c82613ecd565b6135968185613f23565b93506135a68185602086016140d3565b80840191505092915050565b600081546135bf81614106565b6135c98186613f23565b945060018216600081146135e457600181146135f557613628565b60ff19831686528186019350613628565b6135fe85613ea2565b60005b8381101561362057815481890152600182019150602081019050613601565b838801955050505b50505092915050565b600061363e603283613f12565b9150613649826142fd565b604082019050919050565b6000613661602683613f12565b915061366c8261434c565b604082019050919050565b6000613684601c83613f12565b915061368f8261439b565b602082019050919050565b60006136a7601c83613f12565b91506136b2826143c4565b602082019050919050565b60006136ca602483613f12565b91506136d5826143ed565b604082019050919050565b60006136ed601983613f12565b91506136f88261443c565b602082019050919050565b6000613710602c83613f12565b915061371b82614465565b604082019050919050565b6000613733603883613f12565b915061373e826144b4565b604082019050919050565b6000613756601983613f12565b915061376182614503565b602082019050919050565b6000613779602a83613f12565b91506137848261452c565b604082019050919050565b600061379c602983613f12565b91506137a78261457b565b604082019050919050565b60006137bf601683613f12565b91506137ca826145ca565b602082019050919050565b60006137e2602083613f12565b91506137ed826145f3565b602082019050919050565b6000613805602c83613f12565b91506138108261461c565b604082019050919050565b6000613828602083613f12565b91506138338261466b565b602082019050919050565b600061384b601683613f12565b915061385682614694565b602082019050919050565b600061386e602983613f12565b9150613879826146bd565b604082019050919050565b6000613891602f83613f12565b915061389c8261470c565b604082019050919050565b60006138b4602183613f12565b91506138bf8261475b565b604082019050919050565b60006138d7600083613f07565b91506138e2826147aa565b600082019050919050565b60006138fa601283613f12565b9150613905826147ad565b602082019050919050565b600061391d603183613f12565b9150613928826147d6565b604082019050919050565b6000613940601f83613f12565b915061394b82614825565b602082019050919050565b6000613963603083613f12565b915061396e8261484e565b604082019050919050565b6000613986601b83613f12565b91506139918261489d565b602082019050919050565b6139a5816140ad565b82525050565b6139b4816140ad565b82525050565b6139c3816140b7565b82525050565b60006139d582866135b2565b91506139e18285613581565b91506139ed82846135b2565b9150819050949350505050565b6000613a05826138ca565b9150819050919050565b6000602082019050613a246000830184613493565b92915050565b6000608082019050613a3f6000830187613493565b613a4c6020830186613493565b613a5960408301856139ab565b8181036060830152613a6b818461350f565b905095945050505050565b60006020820190508181036000830152613a9081846134a2565b905092915050565b6000602082019050613aad6000830184613500565b92915050565b60006020820190508181036000830152613acd8184613548565b905092915050565b60006020820190508181036000830152613aee81613631565b9050919050565b60006020820190508181036000830152613b0e81613654565b9050919050565b60006020820190508181036000830152613b2e81613677565b9050919050565b60006020820190508181036000830152613b4e8161369a565b9050919050565b60006020820190508181036000830152613b6e816136bd565b9050919050565b60006020820190508181036000830152613b8e816136e0565b9050919050565b60006020820190508181036000830152613bae81613703565b9050919050565b60006020820190508181036000830152613bce81613726565b9050919050565b60006020820190508181036000830152613bee81613749565b9050919050565b60006020820190508181036000830152613c0e8161376c565b9050919050565b60006020820190508181036000830152613c2e8161378f565b9050919050565b60006020820190508181036000830152613c4e816137b2565b9050919050565b60006020820190508181036000830152613c6e816137d5565b9050919050565b60006020820190508181036000830152613c8e816137f8565b9050919050565b60006020820190508181036000830152613cae8161381b565b9050919050565b60006020820190508181036000830152613cce8161383e565b9050919050565b60006020820190508181036000830152613cee81613861565b9050919050565b60006020820190508181036000830152613d0e81613884565b9050919050565b60006020820190508181036000830152613d2e816138a7565b9050919050565b60006020820190508181036000830152613d4e816138ed565b9050919050565b60006020820190508181036000830152613d6e81613910565b9050919050565b60006020820190508181036000830152613d8e81613933565b9050919050565b60006020820190508181036000830152613dae81613956565b9050919050565b60006020820190508181036000830152613dce81613979565b9050919050565b6000602082019050613dea60008301846139ab565b92915050565b6000602082019050613e0560008301846139ba565b92915050565b6000613e15613e26565b9050613e218282614138565b919050565b6000604051905090565b600067ffffffffffffffff821115613e4b57613e4a61429f565b5b613e54826142ec565b9050602081019050919050565b600067ffffffffffffffff821115613e7c57613e7b61429f565b5b613e85826142ec565b9050602081019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000613f39826140ad565b9150613f44836140ad565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f7957613f786141e3565b5b828201905092915050565b6000613f8f826140ad565b9150613f9a836140ad565b925082613faa57613fa9614212565b5b828204905092915050565b6000613fc0826140ad565b9150613fcb836140ad565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614004576140036141e3565b5b828202905092915050565b600061401a826140ad565b9150614025836140ad565b925082821015614038576140376141e3565b5b828203905092915050565b600061404e8261408d565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b838110156140f15780820151818401526020810190506140d6565b83811115614100576000848401525b50505050565b6000600282049050600182168061411e57607f821691505b6020821081141561413257614131614241565b5b50919050565b614141826142ec565b810181811067ffffffffffffffff821117156141605761415f61429f565b5b80604052505050565b6000614174826140ad565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156141a7576141a66141e3565b5b600182019050919050565b60006141bd826140ad565b91506141c8836140ad565b9250826141d8576141d7614212565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f6d6178204e465420706572206164647265737320657863656564656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f75736572206973206e6f7420696e20616c6c6f77206c69737400000000000000600082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f6d6178204e4654206c696d697420657863656564656400000000000000000000600082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f74686520636f6e74726163742069732070617573656400000000000000000000600082015250565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b50565b7f696e73756666696369656e742066756e64730000000000000000000000000000600082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b7f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656400000000000000000000000000000000602082015250565b7f6e65656420746f206d696e74206174206c656173742031204e46540000000000600082015250565b6148cf81614043565b81146148da57600080fd5b50565b6148e681614055565b81146148f157600080fd5b50565b6148fd81614061565b811461490857600080fd5b50565b614914816140ad565b811461491f57600080fd5b50565b61492b816140b7565b811461493657600080fd5b5056fea264697066735822122042f7075c73217852b5fd95e59bcb14482cde91527a6585d6f652b31499f15f8e64736f6c63430008070033
Verified Source Code Partial Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: No
CryptoNooniz.sol 1317 lines
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
/**
* .....#*.#.#,*
* ,*#.....................#..
* .%...............................#.
* .#.....................................*.
* *...........................................&(
* (%...............................................#(
* #...................................................*
* .%..............................................#%####./.
* ........................................,,####.&.####...,.
* .(,..........................,#*##............######,###.....#
* .#.....................#####.#######&.............######,......#%
* *#.........................######.###...................#..........,
* ,,............................######...............................#
* /#....*............................#...........&../*................/
* .#.....##........................................&##.(...............#(
* .*......% #...........................................................#(
* //..........#............................................................
* #...........#.*.##....................................................%.
* . ........... .........#.............................................#,
* .,............... ......&&.# &.......................................&.
* ..............#. ............. ,.,............................,#*./
* ............... ............ ..%#(.......&###....#
* ............** ./.........
* .*........,, .%....,..
* .#. &. %.
* created by CryptoNooniz
*
* @title Crypto Nooniz ERC-721 Smart Contract
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// File: @openzeppelin/contracts/token/ERC721/IERC721.sol
pragma solidity ^0.8.0;
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
// File: @openzeppelin/contracts/utils/introspection/ERC165.sol
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
// File: @openzeppelin/contracts/utils/Strings.sol
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
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);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
// File: @openzeppelin/contracts/utils/Address.sol
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
// File: @openzeppelin/contracts/utils/Context.sol
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// File: @openzeppelin/contracts/token/ERC721/ERC721.sol
pragma solidity ^0.8.0;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
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;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
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);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
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);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
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);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
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");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
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));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
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"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
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;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
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);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
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.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
// File: contracts\lib\Counters.sol
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
{
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
{
counter._value = value - 1;
}
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
pragma solidity >=0.7.0 <0.9.0;
contract CryptoNooniz is ERC721, Ownable, ReentrancyGuard {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.03 ether;
uint256 public constant NOONIZ_MAX_SUPPLY = 9997;
uint256 public nftPerAddressLimit = 7;
bool public isPaused = true;
bool public isPresale = true;
bool public presaleBenefits = true;
mapping(address => uint8) public allowListMap;
constructor() ERC721("CryptoNooniz", "NOONIZ") {
}
function totalSupply() public view returns (uint256) {
return supply.current();
}
// public
function mint(uint256 _mintAmount) public payable nonReentrant{
require(!isPaused, "the contract is paused");
require(_mintAmount > 0, "need to mint at least 1 NFT");
uint256 tokensToMint = setDynamicMintAmount(_mintAmount);
require(supply.current() + tokensToMint <= NOONIZ_MAX_SUPPLY, "max NFT limit exceeded");
if (msg.sender != owner()) {
if(isPresale == true) {
require(isInAllowList(msg.sender), "user is not in allow list");
}
uint256 ownerMintedCount = balanceOf(msg.sender);
require(ownerMintedCount + tokensToMint <= nftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= cost * _mintAmount, "insufficient funds");
}
for (uint256 i = 1; i <= tokensToMint; i++) {
supply.increment();
_safeMint(msg.sender, supply.current());
}
}
function isInAllowList(address _user) public view returns (bool){
uint256 _userRole = allowListMap[_user];
if(_userRole == 1 || _userRole == 2){
return true;
}
return false;
}
function getUserRole(address _user) public view returns (uint8){
return allowListMap[_user];
}
function setDynamicMintAmount(uint256 _mintAmount) internal view returns(uint256){
if(presaleBenefits == true){
uint256 _userRole = allowListMap[msg.sender];
if(_userRole == 1 && _mintAmount >= 5){
return _mintAmount + 2;
} else if((_userRole == 1 || _userRole == 2) && _mintAmount >= 3 && balanceOf(msg.sender) < 4){
return _mintAmount + 1;
}
}
return _mintAmount;
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
uint256 ownerTokenCount = balanceOf(_owner);
uint256[] memory ownedTokenIds = new uint256[](ownerTokenCount);
uint256 currentTokenId = 1;
uint256 ownedTokenIndex = 0;
while (ownedTokenIndex < ownerTokenCount && currentTokenId <= NOONIZ_MAX_SUPPLY) {
address currentTokenOwner = ownerOf(currentTokenId);
if (currentTokenOwner == _owner) {
ownedTokenIds[ownedTokenIndex] = currentTokenId;
ownedTokenIndex++;
}
currentTokenId++;
}
return ownedTokenIds;
}
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, tokenId.toString(), baseExtension));
}
// BURN IT
function burn(uint256 tokenId) external virtual {
require(
_isApprovedOrOwner(_msgSender(), tokenId),
"ERC721Burnable: caller is not owner nor approved"
);
_burn(tokenId);
}
//only owner
function ownerMint(address to, uint256 _mintAmount) public payable onlyOwner{
require(supply.current() + _mintAmount <= NOONIZ_MAX_SUPPLY, "max NFT limit exceeded");
for (uint256 i = 1; i <= _mintAmount; i++) {
supply.increment();
_safeMint(to, supply.current());
}
}
function setPause(bool _state) public onlyOwner {
isPaused = _state;
}
function setPresale(bool _state) public onlyOwner {
isPresale = _state;
}
function setPresaleBenefits(bool _state) public onlyOwner {
presaleBenefits = _state;
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
nftPerAddressLimit = _limit;
}
function setCost(uint256 _newCost) public onlyOwner {
cost = _newCost;
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
baseURI = _newBaseURI;
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
baseExtension = _newBaseExtension;
}
function setAllowMap(address[] calldata _allowUsers, uint8 role) public onlyOwner {
for (uint i = 0; i < _allowUsers.length; i++) {
allowListMap[_allowUsers[i]] = role;
}
}
function withdraw() public payable onlyOwner {
(bool os, ) = payable(owner()).call{value: address(this).balance}("");
require(os);
}
}
Read Contract
NOONIZ_MAX_SUPPLY 0xe3f1e53a → uint256
allowListMap 0xba81c385 → uint8
balanceOf 0x70a08231 → uint256
baseExtension 0xc6682862 → string
baseURI 0x6c0360eb → string
cost 0x13faede6 → uint256
getApproved 0x081812fc → address
getUserRole 0x27820851 → uint8
isApprovedForAll 0xe985e9c5 → bool
isInAllowList 0x245a3dac → bool
isPaused 0xb187bd26 → bool
isPresale 0x95364a84 → bool
name 0x06fdde03 → string
nftPerAddressLimit 0xba7d2c76 → uint256
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
presaleBenefits 0xaa90ed84 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
walletOfOwner 0x438b6300 → uint256[]
Write Contract 19 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
burn 0x42966c68
uint256 tokenId
mint 0xa0712d68
uint256 _mintAmount
ownerMint 0x484b973c
address to
uint256 _mintAmount
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setAllowMap 0x60fac2a4
address[] _allowUsers
uint8 role
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseExtension 0xda3ef23f
string _newBaseExtension
setBaseURI 0x55f804b3
string _newBaseURI
setCost 0x44a0d68a
uint256 _newCost
setNftPerAddressLimit 0xd0eb26b0
uint256 _limit
setPause 0xbedb86fb
bool _state
setPresale 0xc54e73e3
bool _state
setPresaleBenefits 0x019137af
bool _state
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
Recent Transactions
This address has 1 on-chain transactions, but only 1.3% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →