Address Contract Partially Verified
Address
0x52dAa968dc4c5F49A0e97C960FBBF79ba6BCD992
Balance
0 ETH
Nonce
1
Code Size
12604 bytes
Creator
0xC2FFb053...f0B0 at tx 0xd6be57ba...d2acb6
Indexed Transactions
0
Contract Bytecode
12604 bytes
0x6080604052600436106102ac5760003560e01c80636352211e11610175578063a035b1fe116100dc578063bc8893b411610095578063e83157421161006f578063e8315742146107d4578063e985e9c5146107ea578063f2fde38b14610833578063ffe630b51461085357600080fd5b8063bc8893b41461077d578063c87b56dd1461079e578063de7fcb1d146107be57600080fd5b8063a035b1fe146106dd578063a22cb465146106f3578063a43be57b14610713578063a475b5dd14610728578063aac5d69f1461073d578063b88d4fde1461075d57600080fd5b8063853828b61161012e578063853828b61461064c5780638581c4ec146106615780638c8acaa9146106745780638da5cb5b1461069457806393e6a071146106b257806395d89b41146106c857600080fd5b80636352211e146105a257806370a08231146105c2578063715018a6146105e257806372537189146105f75780637d55094d14610617578063820de0c51461062c57600080fd5b80632b45079e116102195780634a427725116101d25780634a427725146104e9578063518302271461050957806353135ca01461052357806355f804b3146105435780635c975abb14610563578063616cdb1e1461058257600080fd5b80632b45079e14610448578063408ae5851461046857806342842e0e14610488578063433adb05146104a857806345912352146104be578063469132ce146104d357600080fd5b8063095ea7b31161026b578063095ea7b3146103a65780630c1c972a146103c657806318160ddd146103db57806323b872dd146103f25780632417f31d1461041257806326f8f7e61461042857600080fd5b80620e7fa8146102b1578062f714ce146102da57806301ffc9a7146102fc57806306fdde031461032c578063076102fc1461034e578063081812fc1461036e575b600080fd5b3480156102bd57600080fd5b506102c760135481565b6040519081526020015b60405180910390f35b3480156102e657600080fd5b506102fa6102f5366004612c42565b610873565b005b34801561030857600080fd5b5061031c610317366004612ba6565b610a56565b60405190151581526020016102d1565b34801561033857600080fd5b50610341610aa8565b6040516102d19190612e3e565b34801561035a57600080fd5b506102fa610369366004612ae0565b610b3a565b34801561037a57600080fd5b5061038e610389366004612c29565b610cc0565b6040516001600160a01b0390911681526020016102d1565b3480156103b257600080fd5b506102fa6103c1366004612ab6565b610d55565b3480156103d257600080fd5b506102fa610e6b565b3480156103e757600080fd5b506008546102c79081565b3480156103fe57600080fd5b506102fa61040d3660046129d4565b610f95565b34801561041e57600080fd5b506102c7600e5481565b34801561043457600080fd5b506102fa610443366004612c29565b610fc6565b34801561045457600080fd5b5061031c61046336600461297f565b6110e1565b34801561047457600080fd5b506102fa610483366004612ae0565b611117565b34801561049457600080fd5b506102fa6104a33660046129d4565b6112f4565b3480156104b457600080fd5b506102c760125481565b3480156104ca57600080fd5b5061034161130f565b3480156104df57600080fd5b506102c7600f5481565b3480156104f557600080fd5b506102fa610504366004612c29565b61139d565b34801561051557600080fd5b5060155461031c9060ff1681565b34801561052f57600080fd5b5060155461031c9062010000900460ff1681565b34801561054f57600080fd5b506102fa61055e366004612be0565b6113cc565b34801561056f57600080fd5b5060155461031c90610100900460ff1681565b34801561058e57600080fd5b506102fa61059d366004612c29565b61140d565b3480156105ae57600080fd5b5061038e6105bd366004612c29565b61143c565b3480156105ce57600080fd5b506102c76105dd36600461297f565b6114b3565b3480156105ee57600080fd5b506102fa61153a565b34801561060357600080fd5b506102fa610612366004612c29565b611570565b34801561062357600080fd5b506102fa61159f565b34801561063857600080fd5b506102fa610647366004612be0565b6115e6565b34801561065857600080fd5b506102fa611623565b6102fa61066f366004612c29565b61173b565b34801561068057600080fd5b5061031c61068f36600461297f565b611ce5565b3480156106a057600080fd5b506006546001600160a01b031661038e565b3480156106be57600080fd5b506102c760105481565b3480156106d457600080fd5b50610341611d0e565b3480156106e957600080fd5b506102c760145481565b3480156106ff57600080fd5b506102fa61070e366004612a8c565b611d1d565b34801561071f57600080fd5b506102fa611d28565b34801561073457600080fd5b506102fa611db1565b34801561074957600080fd5b506102fa610758366004612c29565b611dea565b34801561076957600080fd5b506102fa610778366004612a10565b611e19565b34801561078957600080fd5b5060155461031c906301000000900460ff1681565b3480156107aa57600080fd5b506103416107b9366004612c29565b611e51565b3480156107ca57600080fd5b506102c760115481565b3480156107e057600080fd5b506102c7600d5481565b3480156107f657600080fd5b5061031c6108053660046129a1565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561083f57600080fd5b506102fa61084e36600461297f565b611f8d565b34801561085f57600080fd5b506102fa61086e366004612be0565b612028565b6006546001600160a01b031633146108a65760405162461bcd60e51b815260040161089d90612ee9565b60405180910390fd5b600260075414156108f95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161089d565b60026007556017546001600160a01b038281169116148061092757506018546001600160a01b038281169116145b61097f5760405162461bcd60e51b815260206004820152602360248201527f546869732061646472657373206973206e6f7420696e20616c6c6f776564206c6044820152621a5cdd60ea1b606482015260840161089d565b814710156109cf5760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f7567682045544820746f207769746864726177210000000000604482015260640161089d565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610a1c576040519150601f19603f3d011682016040523d82523d6000602084013e610a21565b606091505b5050905080610a4c5760405162461bcd60e51b8152602060048201526000602482015260440161089d565b5050600160075550565b60006001600160e01b031982166380ac58cd60e01b1480610a8757506001600160e01b03198216635b5e139f60e01b145b80610aa257506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060008054610ab79061302e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ae39061302e565b8015610b305780601f10610b0557610100808354040283529160200191610b30565b820191906000526020600020905b815481529060010190602001808311610b1357829003601f168201915b5050505050905090565b6006546001600160a01b03163314610b645760405162461bcd60e51b815260040161089d90612ee9565b81818015610bbf576015546301000000900460ff1615610bbf5760405162461bcd60e51b815260206004820152601660248201527550726573616c6520616c726561647920656e6465642160501b604482015260640161089d565b600182511015610be15760405162461bcd60e51b815260040161089d90612ea3565b60005b8451811015610cb9578315610c4f576000600a6000878481518110610c0b57610c0b6130c4565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550610ca7565b600060096000878481518110610c6757610c676130c4565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610cb181613069565b915050610be4565b5050505050565b6000818152600260205260408120546001600160a01b0316610d395760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161089d565b506000908152600460205260409020546001600160a01b031690565b6000610d608261143c565b9050806001600160a01b0316836001600160a01b03161415610dce5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161089d565b336001600160a01b0382161480610dea5750610dea8133610805565b610e5c5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161089d565b610e668383612065565b505050565b6006546001600160a01b03163314610e955760405162461bcd60e51b815260040161089d90612ee9565b60155462010000900460ff1615610f265760405162461bcd60e51b815260206004820152604960248201527f50726573616c65206973207374696c6c206163746976652120456e642069742060448201527f666972737420776974682063616c6c696e6720656e6450726573616c65282920606482015268333ab731ba34b7b71760b91b608482015260a40161089d565b6015546301000000900460ff1615610f805760405162461bcd60e51b815260206004820152601e60248201527f5075626c69632073616c6520697320616c726561647920616374697665210000604482015260640161089d565b6015805463ff00000019166301000000179055565b610f9f33826120d3565b610fbb5760405162461bcd60e51b815260040161089d90612f1e565b610e668383836121ca565b6006546001600160a01b03163314610ff05760405162461bcd60e51b815260040161089d90612ee9565b6012548111156110565760405162461bcd60e51b815260206004820152602b60248201527f43616e277420636c61696d206d6f7265207468616e207265736572766564207460448201526a37b5b2b739903632b33a1760a91b606482015260840161089d565b60005b818110156110cc5761106f600880546001019055565b600061107a60085490565b9050611086338261236a565b6040518181527ff00d28232b285f24f2e38415deb2ceb31069e70d4505838b3911b4f02058502e9060200160405180910390a150806110c481613069565b915050611059565b50806012546110db9190612feb565b60125550565b6001600160a01b03811660009081526009602052604081205460ff161561110a57506001919050565b506000919050565b919050565b6006546001600160a01b031633146111415760405162461bcd60e51b815260040161089d90612ee9565b8181801561119c576015546301000000900460ff161561119c5760405162461bcd60e51b815260206004820152601660248201527550726573616c6520616c726561647920656e6465642160501b604482015260640161089d565b6001825110156111be5760405162461bcd60e51b815260040161089d90612ea3565b821561121c5760155462010000900460ff1661121c5760405162461bcd60e51b815260206004820152601e60248201527f50726573616c65206973206e6f742061637469766520616e796d6f7265210000604482015260640161089d565b60005b8451811015610cb957831561128a576001600a6000878481518110611246576112466130c4565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506112e2565b6001600960008784815181106112a2576112a26130c4565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806112ec81613069565b91505061121f565b610e6683838360405180602001604052806000815250611e19565b6016805461131c9061302e565b80601f01602080910402602001604051908101604052809291908181526020018280546113489061302e565b80156113955780601f1061136a57610100808354040283529160200191611395565b820191906000526020600020905b81548152906001019060200180831161137857829003601f168201915b505050505081565b6006546001600160a01b031633146113c75760405162461bcd60e51b815260040161089d90612ee9565b601055565b6006546001600160a01b031633146113f65760405162461bcd60e51b815260040161089d90612ee9565b805161140990600b906020840190612867565b5050565b6006546001600160a01b031633146114375760405162461bcd60e51b815260040161089d90612ee9565b601155565b6000818152600260205260408120546001600160a01b031680610aa25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161089d565b60006001600160a01b03821661151e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161089d565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146115645760405162461bcd60e51b815260040161089d90612ee9565b61156e6000612384565b565b6006546001600160a01b0316331461159a5760405162461bcd60e51b815260040161089d90612ee9565b600e55565b6006546001600160a01b031633146115c95760405162461bcd60e51b815260040161089d90612ee9565b6015805461ff001981166101009182900460ff1615909102179055565b6006546001600160a01b031633146116105760405162461bcd60e51b815260040161089d90612ee9565b805161140990600c906020840190612867565b6006546001600160a01b0316331461164d5760405162461bcd60e51b815260040161089d90612ee9565b600260075414156116a05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161089d565b600260075560006116b96006546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114611703576040519150601f19603f3d011682016040523d82523d6000602084013e611708565b606091505b50509050806117335760405162461bcd60e51b8152602060048201526000602482015260440161089d565b506001600755565b601554610100900460ff16156117885760405162461bcd60e51b81526020600482015260126024820152714d696e74696e67206973207061757365642160701b604482015260640161089d565b60155462010000900460ff16806117a857506015546301000000900460ff165b6117f45760405162461bcd60e51b815260206004820181905260248201527f5075626c69632073616c6520686173206e6f7420737461727465642079657421604482015260640161089d565b60155462010000900460ff16156119c457336118186006546001600160a01b031690565b6001600160a01b0316146118fc57336000908152600a602052604090205460ff166118a05760405162461bcd60e51b815260206004820152603260248201527f596f7520617265206e6f742077686974656c697374656420746f207061727469604482015271636970617465206f6e2070726573616c652160701b606482015260840161089d565b6000811180156118b257506010548111155b6118bd6010546123d6565b6040516020016118cd9190612d9a565b604051602081830303815290604052906118fa5760405162461bcd60e51b815260040161089d9190612e3e565b505b6008546119099082612fa0565b600e54101561195a5760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f7567682070726573616c6520746f6b656e73206c6566742100604482015260640161089d565b806013546119689190612fcc565b3410156119818260135461197c9190612fcc565b6123d6565b6040516020016119919190612cd0565b604051602081830303815290604052906119be5760405162461bcd60e51b815260040161089d9190612e3e565b50611b78565b336119d76006546001600160a01b031690565b6001600160a01b031614611abf573360009081526009602052604090205460ff16611a635760405162461bcd60e51b815260206004820152603660248201527f596f7520617265206e6f742077686974656c697374656420746f207061727469604482015275636970617465206f6e207075626c69632073616c652160501b606482015260840161089d565b600081118015611a7557506011548111155b611a806011546123d6565b604051602001611a909190612d33565b60405160208183030381529060405290611abd5760405162461bcd60e51b815260040161089d9190612e3e565b505b600854611acc9082612fa0565b600d541015611b175760405162461bcd60e51b81526020600482015260176024820152764e6f7420656e6f75676820746f6b656e73206c6566742160481b604482015260640161089d565b80601454611b259190612fcc565b341015611b398260145461197c9190612fcc565b604051602001611b499190612cd0565b60405160208183030381529060405290611b765760405162461bcd60e51b815260040161089d9190612e3e565b505b33611b8b6006546001600160a01b031690565b6001600160a01b031614611c6f57601254600854611ba99083612fa0565b611bb39190612fa0565b600d541015611bfe5760405162461bcd60e51b81526020600482015260176024820152764e6f7420656e6f75676820746f6b656e73206c6566742160481b604482015260640161089d565b80611c08336114b3565b611c129190612fa0565b600f541015611c6f5760405162461bcd60e51b8152602060048201526024808201527f4d617820746f6b656e20636f756e74207065722077616c6c65742065786365656044820152636465642160e01b606482015260840161089d565b60005b8181101561140957611c88600880546001019055565b6000611c9360085490565b9050611c9f338261236a565b6040518181527ff00d28232b285f24f2e38415deb2ceb31069e70d4505838b3911b4f02058502e9060200160405180910390a15080611cdd81613069565b915050611c72565b6001600160a01b0381166000908152600a602052604081205460ff161561110a57506001919050565b606060018054610ab79061302e565b6114093383836124d4565b6006546001600160a01b03163314611d525760405162461bcd60e51b815260040161089d90612ee9565b60155462010000900460ff16611da35760405162461bcd60e51b815260206004820152601660248201527550726573616c65206973206e6f74206163746976652160501b604482015260640161089d565b6015805462ff000019169055565b6006546001600160a01b03163314611ddb5760405162461bcd60e51b815260040161089d90612ee9565b6015805460ff19166001179055565b6006546001600160a01b03163314611e145760405162461bcd60e51b815260040161089d90612ee9565b600f55565b611e2333836120d3565b611e3f5760405162461bcd60e51b815260040161089d90612f1e565b611e4b848484846125a3565b50505050565b6000818152600260205260409020546060906001600160a01b0316611eb85760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e00604482015260640161089d565b60155460ff1615611efb57611ecb6125d6565b611ed4836123d6565b604051602001611ee5929190612c91565b6040516020818303038152906040529050919050565b600c8054611f089061302e565b80601f0160208091040260200160405190810160405280929190818152602001828054611f349061302e565b8015611f815780601f10611f5657610100808354040283529160200191611f81565b820191906000526020600020905b815481529060010190602001808311611f6457829003601f168201915b50505050509050919050565b6006546001600160a01b03163314611fb75760405162461bcd60e51b815260040161089d90612ee9565b6001600160a01b03811661201c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161089d565b61202581612384565b50565b6006546001600160a01b031633146120525760405162461bcd60e51b815260040161089d90612ee9565b8051611409906016906020840190612867565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061209a8261143c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661214c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161089d565b60006121578361143c565b9050806001600160a01b0316846001600160a01b031614806121925750836001600160a01b031661218784610cc0565b6001600160a01b0316145b806121c257506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166121dd8261143c565b6001600160a01b0316146122455760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161089d565b6001600160a01b0382166122a75760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161089d565b6122b2600082612065565b6001600160a01b03831660009081526003602052604081208054600192906122db908490612feb565b90915550506001600160a01b0382166000908152600360205260408120805460019290612309908490612fa0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6114098282604051806020016040528060008152506125e5565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060816123fa5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612424578061240e81613069565b915061241d9050600a83612fb8565b91506123fe565b60008167ffffffffffffffff81111561243f5761243f6130da565b6040519080825280601f01601f191660200182016040528015612469576020820181803683370190505b5090505b84156121c25761247e600183612feb565b915061248b600a86613084565b612496906030612fa0565b60f81b8183815181106124ab576124ab6130c4565b60200101906001600160f81b031916908160001a9053506124cd600a86612fb8565b945061246d565b816001600160a01b0316836001600160a01b031614156125365760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161089d565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6125ae8484846121ca565b6125ba84848484612618565b611e4b5760405162461bcd60e51b815260040161089d90612e51565b6060600b8054610ab79061302e565b6125ef8383612725565b6125fc6000848484612618565b610e665760405162461bcd60e51b815260040161089d90612e51565b60006001600160a01b0384163b1561271a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061265c903390899088908890600401612e01565b602060405180830381600087803b15801561267657600080fd5b505af19250505080156126a6575060408051601f3d908101601f191682019092526126a391810190612bc3565b60015b612700573d8080156126d4576040519150601f19603f3d011682016040523d82523d6000602084013e6126d9565b606091505b5080516126f85760405162461bcd60e51b815260040161089d90612e51565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506121c2565b506001949350505050565b6001600160a01b03821661277b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161089d565b6000818152600260205260409020546001600160a01b0316156127e05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161089d565b6001600160a01b0382166000908152600360205260408120805460019290612809908490612fa0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546128739061302e565b90600052602060002090601f01602090048101928261289557600085556128db565b82601f106128ae57805160ff19168380011785556128db565b828001600101855582156128db579182015b828111156128db5782518255916020019190600101906128c0565b506128e79291506128eb565b5090565b5b808211156128e757600081556001016128ec565b600067ffffffffffffffff83111561291a5761291a6130da565b61292d601f8401601f1916602001612f6f565b905082815283838301111561294157600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461111257600080fd5b8035801515811461111257600080fd5b60006020828403121561299157600080fd5b61299a82612958565b9392505050565b600080604083850312156129b457600080fd5b6129bd83612958565b91506129cb60208401612958565b90509250929050565b6000806000606084860312156129e957600080fd5b6129f284612958565b9250612a0060208501612958565b9150604084013590509250925092565b60008060008060808587031215612a2657600080fd5b612a2f85612958565b9350612a3d60208601612958565b925060408501359150606085013567ffffffffffffffff811115612a6057600080fd5b8501601f81018713612a7157600080fd5b612a8087823560208401612900565b91505092959194509250565b60008060408385031215612a9f57600080fd5b612aa883612958565b91506129cb6020840161296f565b60008060408385031215612ac957600080fd5b612ad283612958565b946020939093013593505050565b60008060408385031215612af357600080fd5b823567ffffffffffffffff80821115612b0b57600080fd5b818501915085601f830112612b1f57600080fd5b8135602082821115612b3357612b336130da565b8160051b9250612b44818401612f6f565b8281528181019085830185870184018b1015612b5f57600080fd5b600096505b84871015612b8957612b7581612958565b835260019690960195918301918301612b64565b509650612b99905087820161296f565b9450505050509250929050565b600060208284031215612bb857600080fd5b813561299a816130f0565b600060208284031215612bd557600080fd5b815161299a816130f0565b600060208284031215612bf257600080fd5b813567ffffffffffffffff811115612c0957600080fd5b8201601f81018413612c1a57600080fd5b6121c284823560208401612900565b600060208284031215612c3b57600080fd5b5035919050565b60008060408385031215612c5557600080fd5b823591506129cb60208401612958565b60008151808452612c7d816020860160208601613002565b601f01601f19169290920160200192915050565b60008351612ca3818460208801613002565b835190830190612cb7818360208801613002565b64173539b7b760d91b9101908152600501949350505050565b7f4e6f7420656e6f7567682045544821204174206c656173742000000000000000815260008251612d08816019850160208701613002565b73207765692068617320746f2062652073656e742160601b6019939091019283015250602d01919050565b7702cb7ba9031b0b713ba10313abc9036b7b932903a3430b7160451b815260008251612d66816018850160208701613002565b7f20746f6b656e7320706572207472616e73616374696f6e2e00000000000000006018939091019283015250603001919050565b7702cb7ba9031b0b713ba10313abc9036b7b932903a3430b7160451b815260008251612dcd816018850160208701613002565b7f20746f6b656e7320706572207472616e73616374696f6e0000000000000000006018939091019283015250602f01919050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612e3490830184612c65565b9695505050505050565b60208152600061299a6020830184612c65565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f596f75206e65656420746f2073656e64206174206c65617374206f6e6520616460408201526564726573732160d01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715612f9857612f986130da565b604052919050565b60008219821115612fb357612fb3613098565b500190565b600082612fc757612fc76130ae565b500490565b6000816000190483118215151615612fe657612fe6613098565b500290565b600082821015612ffd57612ffd613098565b500390565b60005b8381101561301d578181015183820152602001613005565b83811115611e4b5750506000910152565b600181811c9082168061304257607f821691505b6020821081141561306357634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561307d5761307d613098565b5060010190565b600082613093576130936130ae565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461202557600080fdfea26469706673582212205e52efe795c213bec85c865db8450366604be0170be14674dd541133fbdf219164736f6c63430008070033
Verified Source Code Partial Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: Yes (200 runs)
SuperApesClub.sol 1734 lines
// @title: SUPER APES CLUB
// @desc: 10,000 SUPER APES LIVING ON THE ETHEREUM BLOCKCHAIN
// @url: https://superapesclub.com
// @twitter: https://twitter.com/superapesclub
// @instagram: https://www.instagram.com/superapesclub
pragma solidity >=0.8.0;
// File: @openzeppelin/contracts/security/ReentrancyGuard.sol
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
/**
* @dev Contract module that helps prevent reentrant caolls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
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 making 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/Counters.sol
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. 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 {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
// File: @openzeppelin/contracts/utils/Strings.sol
// OpenZeppelin Contracts v4.4.1 (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/Context.sol
// OpenZeppelin Contracts v4.4.1 (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/access/Ownable.sol
// OpenZeppelin Contracts v4.4.1 (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() {
_transferOwnership(_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 {
_transferOwnership(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"
);
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File: @openzeppelin/contracts/utils/Address.sol
// OpenZeppelin Contracts v4.4.1 (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/IERC721Receiver.sol
// OpenZeppelin Contracts v4.4.1 (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/introspection/IERC165.sol
// OpenZeppelin Contracts v4.4.1 (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/utils/introspection/ERC165.sol
// OpenZeppelin Contracts v4.4.1 (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/token/ERC721/IERC721.sol
// OpenZeppelin Contracts v4.4.1 (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/token/ERC721/extensions/IERC721Metadata.sol
// OpenZeppelin Contracts v4.4.1 (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/ERC721.sol
// OpenZeppelin Contracts v4.4.1 (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
{
_setApprovalForAll(_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 Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @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: HCW.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract SuperApesClub is ERC721, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
Counters.Counter public totalSupply;
mapping(address => bool) whitelist;
mapping(address => bool) presaleWhitelist;
string private baseURI;
string private unrevealedTokenURI;
uint256 public maxTokens = 10000;
uint256 public maxPresaleTokens = 6000;
uint256 public maxTokensPerWallet = 4;
uint256 public maxMintPerTxPresale = 4;
uint256 public maxMintPerTx = 4;
uint256 public tokensReserved = 90;
uint256 public presalePrice = 0.07 ether;
uint256 public price = 0.07 ether;
bool public revealed = false;
bool public paused = true;
bool public presaleActive = true;
bool public publicSaleActive = false;
string public SAC_PROVENANCE;
address a1 = 0xC2FFb0534d3173Cb787e6e2B352621205cA8f0B0;
address a2 = 0x7059b23395781590DC869ee72c599C2B0C91ad49;
event TokenMinted(uint256 tokenId);
constructor() ERC721("SuperApesClub", "SAC") {}
modifier whitelistFunction(address[] memory _addresses, bool _presale) {
if (_presale) {
require(!publicSaleActive, "Presale already ended!");
}
require(
_addresses.length >= 1,
"You need to send at least one address!"
);
_;
}
function setMaxPresaleTokens(uint256 _maxPresaleTokens)
external
onlyOwner
{
maxPresaleTokens = _maxPresaleTokens;
}
/*
* set Max Tokens limit Per Wallet
*/
function setMaxTokensPerWallet(uint256 _maxTokensPerWallet)
external
onlyOwner
{
maxTokensPerWallet = _maxTokensPerWallet;
}
/*
* set Max Mint Per Tx pre sale
*/
function setMaxMintPerTxPresale(uint256 _maxMintPerTxPresale)
external
onlyOwner
{
maxMintPerTxPresale = _maxMintPerTxPresale;
}
/*
* set Max Mint Per Tx public sale
*/
function setMaxMintPerTx(uint256 _maxMintPerTx) external onlyOwner {
maxMintPerTx = _maxMintPerTx;
}
/*
* setUnrevealedTokenURI
*/
function setUnrevealedTokenURI(string memory _unrevealedTokenURI)
external
onlyOwner
{
unrevealedTokenURI = _unrevealedTokenURI;
}
/*
* Pause sale if active, make active if paused
*/
function toggleMinting() public onlyOwner {
paused = !paused;
}
/*
* Reveals token once all tokens are minted
*/
function reveal() external onlyOwner {
revealed = true;
}
/*
* Set Base URI
*/
function setBaseURI(string memory _URI) external onlyOwner {
baseURI = _URI;
}
/*
* Set provenance immediately upon deployment of the contract, prior to starting the pre-sale
*/
function setProvenance(string memory _provenance) public onlyOwner {
SAC_PROVENANCE = _provenance;
}
/*
*end presale
*/
function endPresale() public onlyOwner {
require(presaleActive, "Presale is not active!");
presaleActive = false;
}
/*
*startPublicSale
*/
function startPublicSale() public onlyOwner {
require(
!presaleActive,
"Presale is still active! End it first with calling endPresale() function."
);
require(!publicSaleActive, "Public sale is already active!");
publicSaleActive = true;
}
/*
*addToWhitelist
*/
function addToWhitelist(address[] memory _addresses, bool _presale)
public
onlyOwner
whitelistFunction(_addresses, _presale)
{
if (_presale) {
require(presaleActive, "Presale is not active anymore!");
}
for (uint256 i = 0; i < _addresses.length; i++) {
if (_presale) {
presaleWhitelist[_addresses[i]] = true;
} else {
whitelist[_addresses[i]] = true;
}
}
}
/*
*removeFromwhitelist
*/
function removeFromwhitelist(address[] memory _addresses, bool _presale)
public
onlyOwner
whitelistFunction(_addresses, _presale)
{
for (uint256 i = 0; i < _addresses.length; i++) {
if (_presale) {
presaleWhitelist[_addresses[i]] = false;
} else {
whitelist[_addresses[i]] = false;
}
}
}
/*
*_baseURI
*/
function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
/*
*tokenURI
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(_exists(tokenId), "URI query for nonexistent token");
if (revealed) {
return
string(
abi.encodePacked(
_baseURI(),
Strings.toString(tokenId),
".json"
)
);
} else {
return unrevealedTokenURI;
}
}
/*
*checkAddressForPresale
*/
function checkAddressForPresale(address _address)
public
view
returns (bool)
{
if (presaleWhitelist[_address]) {
return true;
} else {
return false;
}
}
/*
*checkAddressForPublicSale
*/
function checkAddressForPublicSale(address _address)
public
view
returns (bool)
{
if (whitelist[_address]) {
return true;
} else {
return false;
}
}
/*
* claims reserved
*/
function claimReserved(uint256 _amount) public onlyOwner {
require(
_amount <= tokensReserved,
"Can't claim more than reserved tokens left."
);
for (uint256 i = 0; i < _amount; i++) {
totalSupply.increment();
uint256 newItemId = totalSupply.current();
_safeMint(msg.sender, newItemId);
emit TokenMinted(newItemId);
}
tokensReserved = tokensReserved - _amount;
}
/**
* Mints Super Apes
*/
function mintSuperApe(uint256 _amount) public payable {
require(!paused, "Minting is paused!");
require(
presaleActive || publicSaleActive,
"Public sale has not started yet!"
);
if (presaleActive) {
if (owner() != msg.sender) {
require(
presaleWhitelist[msg.sender],
"You are not whitelisted to participate on presale!"
);
require(
_amount > 0 && _amount <= maxMintPerTxPresale,
string(
abi.encodePacked(
"You can't buy more than ",
Strings.toString(maxMintPerTxPresale),
" tokens per transaction"
)
)
);
}
require(
maxPresaleTokens >= _amount + totalSupply.cu...
// [truncated — 52961 bytes total]
Read Contract
SAC_PROVENANCE 0x45912352 → string
balanceOf 0x70a08231 → uint256
checkAddressForPresale 0x8c8acaa9 → bool
checkAddressForPublicSale 0x2b45079e → bool
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
maxMintPerTx 0xde7fcb1d → uint256
maxMintPerTxPresale 0x93e6a071 → uint256
maxPresaleTokens 0x2417f31d → uint256
maxTokens 0xe8315742 → uint256
maxTokensPerWallet 0x469132ce → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
presaleActive 0x53135ca0 → bool
presalePrice 0x000e7fa8 → uint256
price 0xa035b1fe → uint256
publicSaleActive 0xbc8893b4 → bool
revealed 0x51830227 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
tokensReserved 0x433adb05 → uint256
totalSupply 0x18160ddd → uint256
Write Contract 24 functions
These functions modify contract state and require a wallet transaction to execute.
addToWhitelist 0x408ae585
address[] _addresses
bool _presale
approve 0x095ea7b3
address to
uint256 tokenId
claimReserved 0x26f8f7e6
uint256 _amount
endPresale 0xa43be57b
No parameters
mintSuperApe 0x8581c4ec
uint256 _amount
removeFromwhitelist 0x076102fc
address[] _addresses
bool _presale
renounceOwnership 0x715018a6
No parameters
reveal 0xa475b5dd
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string _URI
setMaxMintPerTx 0x616cdb1e
uint256 _maxMintPerTx
setMaxMintPerTxPresale 0x4a427725
uint256 _maxMintPerTxPresale
setMaxPresaleTokens 0x72537189
uint256 _maxPresaleTokens
setMaxTokensPerWallet 0xaac5d69f
uint256 _maxTokensPerWallet
setProvenance 0xffe630b5
string _provenance
setUnrevealedTokenURI 0x820de0c5
string _unrevealedTokenURI
startPublicSale 0x0c1c972a
No parameters
toggleMinting 0x7d55094d
No parameters
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x00f714ce
uint256 _weiAmount
address _to
withdrawAll 0x853828b6
No parameters
Recent Transactions
No transactions found for this address