Address Contract Verified
Address
0xeaE8Dd0B39e81e90B60cABC48E4dE0b2DF649bc9
Balance
0 ETH
Nonce
1
Code Size
13431 bytes
Creator
0xffAe55A8...Ed8f at tx 0x6327a5da...c7cdd8
Indexed Transactions
0
Contract Bytecode
13431 bytes
0x6080604052600436106101ee5760003560e01c80636c0360eb1161010d578063a22cb465116100a0578063d31ccdfa1161006f578063d31ccdfa146106cf578063e985e9c5146106eb578063f2fde38b14610728578063f47c84c514610751578063fcd2a4271461077c576101ee565b8063a22cb46514610629578063b88d4fde14610652578063c721f08d1461067b578063c87b56dd14610692576101ee565b80637ff9b596116100dc5780637ff9b5961461057f5780638da5cb5b146105aa57806391b7f5ed146105d557806395d89b41146105fe576101ee565b80636c0360eb146104d757806370a0823114610502578063715018a61461053f57806378cf19e914610556576101ee565b806342842e0e1161018557806355f804b31161015457806355f804b31461043c578063564566a81461046557806357ea89b6146104905780636352211e1461049a576101ee565b806342842e0e1461036e578063453c2310146103975780634f558e79146103c25780634f6ccce7146103ff576101ee565b806318160ddd116101c157806318160ddd146102c15780631ac2226e146102ec57806323b872dd146103085780632f745c5914610331576101ee565b806301ffc9a7146101f357806306fdde0314610230578063081812fc1461025b578063095ea7b314610298575b600080fd5b3480156101ff57600080fd5b5061021a6004803603810190610215919061275e565b6107a7565b6040516102279190612b42565b60405180910390f35b34801561023c57600080fd5b50610245610869565b6040516102529190612b5d565b60405180910390f35b34801561026757600080fd5b50610282600480360381019061027d9190612801565b6108f7565b60405161028f9190612adb565b60405180910390f35b3480156102a457600080fd5b506102bf60048036038101906102ba919061271e565b610973565b005b3480156102cd57600080fd5b506102d6610b12565b6040516102e39190612cdf565b60405180910390f35b6103066004803603810190610301919061259b565b610b1f565b005b34801561031457600080fd5b5061032f600480360381019061032a9190612608565b610cc7565b005b34801561033d57600080fd5b506103586004803603810190610353919061271e565b61107c565b6040516103659190612cdf565b60405180910390f35b34801561037a57600080fd5b5061039560048036038101906103909190612608565b61116c565b005b3480156103a357600080fd5b506103ac61118c565b6040516103b99190612cdf565b60405180910390f35b3480156103ce57600080fd5b506103e960048036038101906103e49190612801565b611191565b6040516103f69190612b42565b60405180910390f35b34801561040b57600080fd5b5061042660048036038101906104219190612801565b6111a3565b6040516104339190612cdf565b60405180910390f35b34801561044857600080fd5b50610463600480360381019061045e91906127b8565b6111ed565b005b34801561047157600080fd5b5061047a61120f565b6040516104879190612b42565b60405180910390f35b610498611222565b005b3480156104a657600080fd5b506104c160048036038101906104bc9190612801565b6112aa565b6040516104ce9190612adb565b60405180910390f35b3480156104e357600080fd5b506104ec6113b6565b6040516104f99190612b5d565b60405180910390f35b34801561050e57600080fd5b506105296004803603810190610524919061259b565b611444565b6040516105369190612cdf565b60405180910390f35b34801561054b57600080fd5b5061055461151f565b005b34801561056257600080fd5b5061057d6004803603810190610578919061271e565b611533565b005b34801561058b57600080fd5b506105946115b6565b6040516105a19190612cdf565b60405180910390f35b3480156105b657600080fd5b506105bf6115bc565b6040516105cc9190612adb565b60405180910390f35b3480156105e157600080fd5b506105fc60048036038101906105f79190612801565b6115e6565b005b34801561060a57600080fd5b506106136115f8565b6040516106209190612b5d565b60405180910390f35b34801561063557600080fd5b50610650600480360381019061064b91906126de565b611686565b005b34801561065e57600080fd5b506106796004803603810190610674919061265b565b6117e9565b005b34801561068757600080fd5b5061069061183c565b005b34801561069e57600080fd5b506106b960048036038101906106b49190612801565b611870565b6040516106c69190612b5d565b60405180910390f35b6106e960048036038101906106e4919061271e565b611917565b005b3480156106f757600080fd5b50610712600480360381019061070d91906125c8565b611b64565b60405161071f9190612b42565b60405180910390f35b34801561073457600080fd5b5061074f600480360381019061074a919061259b565b611bf8565b005b34801561075d57600080fd5b50610766611c7c565b6040516107739190612cdf565b60405180910390f35b34801561078857600080fd5b50610791611c82565b60405161079e9190612cdf565b60405180910390f35b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061080257506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610832575063780e9d6360e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108625750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6000805461087690612f9a565b80601f01602080910402602001604051908101604052809291908181526020018280546108a290612f9a565b80156108ef5780601f106108c4576101008083540402835291602001916108ef565b820191906000526020600020905b8154815290600101906020018083116108d257829003601f168201915b505050505081565b600061090282611c88565b610938576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061097e826112aa565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109e6576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610a295750610a278133611b64565b155b15610a60576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826003600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000600280549050905090565b600760009054906101000a900460ff16610b6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6590612c1f565b60405180910390fd5b611f48610b8c6001610b7e610b12565b611c9990919063ffffffff16565b1115610bcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc490612c5f565b60405180910390fd5b60011515600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415610c61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5890612cbf565b60405180910390fd5b6001600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610cc4816001611caf565b50565b610cd081611c88565b610d06576040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16610d26826112aa565b73ffffffffffffffffffffffffffffffffffffffff1614610d73576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dda576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610e495750610e1a826108f7565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80610e5a5750610e598433611b64565b5b905080610e93576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558260028381548110610ede57610edd613104565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600082118015610fac5750600073ffffffffffffffffffffffffffffffffffffffff166002600184610f589190612eb0565b81548110610f6957610f68613104565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b1561101b57836002600184610fc19190612eb0565b81548110610fd257610fd1613104565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b600061108783611444565b82106110bf576040517f0ddac30e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060028054905090505b80831015611134576110dc836112aa565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611127578382141561111e575050611166565b81806001019250505b82806001019350506110cb565b6040517f7339954700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b92915050565b611187838383604051806020016040528060008152506117e9565b505050565b600581565b600061119c82611c88565b9050919050565b60006111ad610b12565b82106111e5576040517fa723001c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b819050919050565b6111f5611ed8565b806006908051906020019061120b9291906123af565b5050565b600760009054906101000a900460ff1681565b61122a611ed8565b60006112346115bc565b73ffffffffffffffffffffffffffffffffffffffff164760405161125790612ac6565b60006040518083038185875af1925050503d8060008114611294576040519150601f19603f3d011682016040523d82523d6000602084013e611299565b606091505b50509050806112a757600080fd5b50565b60006112b582611c88565b6112eb576040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff166002838154811061131857611317613104565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113a4576002828154811061137257611371613104565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506113b1565b81806001019250506112ec565b919050565b600680546113c390612f9a565b80601f01602080910402602001604051908101604052809291908181526020018280546113ef90612f9a565b801561143c5780601f106114115761010080835404028352916020019161143c565b820191906000526020600020905b81548152906001019060200180831161141f57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114ac576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600280549050905060005b81811015611514576114cb816112aa565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156115075782806001019350505b80806001019150506114ba565b508192505050919050565b611527611ed8565b6115316000611f56565b565b61153b611ed8565b60008111801561154d5750600b548111155b61158c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158390612c9f565b60405180910390fd5b6115a76001611599610b12565b611c9990919063ffffffff16565b506115b28282611caf565b5050565b600a5481565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6115ee611ed8565b80600a8190555050565b6001805461160590612f9a565b80601f016020809104026020016040519081016040528092919081815260200182805461163190612f9a565b801561167e5780601f106116535761010080835404028352916020019161167e565b820191906000526020600020905b81548152906001019060200180831161166157829003601f168201915b505050505081565b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116ec576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117dd9190612b42565b60405180910390a35050565b6117f4848484610cc7565b6118008484848461201c565b611836576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b611844611ed8565b600760009054906101000a900460ff1615600760006101000a81548160ff021916908315150217905550565b606061187b82611c88565b6118ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b190612bff565b60405180910390fd5b60006118c461219e565b905060008151116118e4576040518060200160405280600081525061190f565b806118ee84612230565b6040516020016118ff929190612aa2565b6040516020818303038152906040525b915050919050565b600760009054906101000a900460ff16611966576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195d90612c1f565b60405180910390fd5b600081118015611977575060058111155b6119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad90612bbf565b60405180910390fd5b611f486119d3826119c5610b12565b611c9990919063ffffffff16565b1115611a14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0b90612c7f565b60405180910390fd5b611a2981600a5461239190919063ffffffff16565b341015611a6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a6290612b9f565b60405180910390fd5b6005611abf82600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c9990919063ffffffff16565b1115611b00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af790612c3f565b60405180910390fd5b80600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611b4f9190612dcf565b92505081905550611b608282611caf565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611c00611ed8565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6790612b7f565b60405180910390fd5b611c7981611f56565b50565b611f4881565b600b5481565b600060028054905082109050919050565b60008183611ca79190612dcf565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d16576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000811415611d51576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600280549050905060005b60018303811015611dfc576002600181600181540180825580915050039060005260206000200160009054906101000a9050508082018473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a48080600101915050611d5e565b506002839080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600182611e6d9190612eb0565b81611e789190612dcf565b8373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b611ee06123a7565b73ffffffffffffffffffffffffffffffffffffffff16611efe6115bc565b73ffffffffffffffffffffffffffffffffffffffff1614611f54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4b90612bdf565b60405180910390fd5b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808473ffffffffffffffffffffffffffffffffffffffff163b14156120465760019050612196565b8373ffffffffffffffffffffffffffffffffffffffff1663150b7a02338786866040518563ffffffff1660e01b81526004016120859493929190612af6565b602060405180830381600087803b15801561209f57600080fd5b505af19250505080156120d057506040513d601f19601f820116820180604052508101906120cd919061278b565b60015b61214a573d8060008114612100576040519150601f19603f3d011682016040523d82523d6000602084013e612105565b606091505b50600081511415612142576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150505b949350505050565b6060600680546121ad90612f9a565b80601f01602080910402602001604051908101604052809291908181526020018280546121d990612f9a565b80156122265780601f106121fb57610100808354040283529160200191612226565b820191906000526020600020905b81548152906001019060200180831161220957829003601f168201915b5050505050905090565b60606000821415612278576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061238c565b600082905060005b600082146122aa57808061229390612ffd565b915050600a826122a39190612e25565b9150612280565b60008167ffffffffffffffff8111156122c6576122c5613133565b5b6040519080825280601f01601f1916602001820160405280156122f85781602001600182028036833780820191505090505b5090505b60008514612385576001826123119190612eb0565b9150600a856123209190613046565b603061232c9190612dcf565b60f81b81838151811061234257612341613104565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561237e9190612e25565b94506122fc565b8093505050505b919050565b6000818361239f9190612e56565b905092915050565b600033905090565b8280546123bb90612f9a565b90600052602060002090601f0160209004810192826123dd5760008555612424565b82601f106123f657805160ff1916838001178555612424565b82800160010185558215612424579182015b82811115612423578251825591602001919060010190612408565b5b5090506124319190612435565b5090565b5b8082111561244e576000816000905550600101612436565b5090565b600061246561246084612d1f565b612cfa565b90508281526020810184848401111561248157612480613167565b5b61248c848285612f58565b509392505050565b60006124a76124a284612d50565b612cfa565b9050828152602081018484840111156124c3576124c2613167565b5b6124ce848285612f58565b509392505050565b6000813590506124e5816133e5565b92915050565b6000813590506124fa816133fc565b92915050565b60008135905061250f81613413565b92915050565b60008151905061252481613413565b92915050565b600082601f83011261253f5761253e613162565b5b813561254f848260208601612452565b91505092915050565b600082601f83011261256d5761256c613162565b5b813561257d848260208601612494565b91505092915050565b6000813590506125958161342a565b92915050565b6000602082840312156125b1576125b0613171565b5b60006125bf848285016124d6565b91505092915050565b600080604083850312156125df576125de613171565b5b60006125ed858286016124d6565b92505060206125fe858286016124d6565b9150509250929050565b60008060006060848603121561262157612620613171565b5b600061262f868287016124d6565b9350506020612640868287016124d6565b925050604061265186828701612586565b9150509250925092565b6000806000806080858703121561267557612674613171565b5b6000612683878288016124d6565b9450506020612694878288016124d6565b93505060406126a587828801612586565b925050606085013567ffffffffffffffff8111156126c6576126c561316c565b5b6126d28782880161252a565b91505092959194509250565b600080604083850312156126f5576126f4613171565b5b6000612703858286016124d6565b9250506020612714858286016124eb565b9150509250929050565b6000806040838503121561273557612734613171565b5b6000612743858286016124d6565b925050602061275485828601612586565b9150509250929050565b60006020828403121561277457612773613171565b5b600061278284828501612500565b91505092915050565b6000602082840312156127a1576127a0613171565b5b60006127af84828501612515565b91505092915050565b6000602082840312156127ce576127cd613171565b5b600082013567ffffffffffffffff8111156127ec576127eb61316c565b5b6127f884828501612558565b91505092915050565b60006020828403121561281757612816613171565b5b600061282584828501612586565b91505092915050565b61283781612ee4565b82525050565b61284681612ef6565b82525050565b600061285782612d81565b6128618185612d97565b9350612871818560208601612f67565b61287a81613176565b840191505092915050565b600061289082612d8c565b61289a8185612db3565b93506128aa818560208601612f67565b6128b381613176565b840191505092915050565b60006128c982612d8c565b6128d38185612dc4565b93506128e3818560208601612f67565b80840191505092915050565b60006128fc602683612db3565b915061290782613187565b604082019050919050565b600061291f601483612db3565b915061292a826131d6565b602082019050919050565b6000612942601a83612db3565b915061294d826131ff565b602082019050919050565b6000612965602083612db3565b915061297082613228565b602082019050919050565b6000612988602f83612db3565b915061299382613251565b604082019050919050565b60006129ab600f83612db3565b91506129b6826132a0565b602082019050919050565b60006129ce600083612da8565b91506129d9826132c9565b600082019050919050565b60006129f1602d83612db3565b91506129fc826132cc565b604082019050919050565b6000612a14601983612db3565b9150612a1f8261331b565b602082019050919050565b6000612a37602683612db3565b9150612a4282613344565b604082019050919050565b6000612a5a601183612db3565b9150612a6582613393565b602082019050919050565b6000612a7d601d83612db3565b9150612a88826133bc565b602082019050919050565b612a9c81612f4e565b82525050565b6000612aae82856128be565b9150612aba82846128be565b91508190509392505050565b6000612ad1826129c1565b9150819050919050565b6000602082019050612af0600083018461282e565b92915050565b6000608082019050612b0b600083018761282e565b612b18602083018661282e565b612b256040830185612a93565b8181036060830152612b37818461284c565b905095945050505050565b6000602082019050612b57600083018461283d565b92915050565b60006020820190508181036000830152612b778184612885565b905092915050565b60006020820190508181036000830152612b98816128ef565b9050919050565b60006020820190508181036000830152612bb881612912565b9050919050565b60006020820190508181036000830152612bd881612935565b9050919050565b60006020820190508181036000830152612bf881612958565b9050919050565b60006020820190508181036000830152612c188161297b565b9050919050565b60006020820190508181036000830152612c388161299e565b9050919050565b60006020820190508181036000830152612c58816129e4565b9050919050565b60006020820190508181036000830152612c7881612a07565b9050919050565b60006020820190508181036000830152612c9881612a2a565b9050919050565b60006020820190508181036000830152612cb881612a4d565b9050919050565b60006020820190508181036000830152612cd881612a70565b9050919050565b6000602082019050612cf46000830184612a93565b92915050565b6000612d04612d15565b9050612d108282612fcc565b919050565b6000604051905090565b600067ffffffffffffffff821115612d3a57612d39613133565b5b612d4382613176565b9050602081019050919050565b600067ffffffffffffffff821115612d6b57612d6a613133565b5b612d7482613176565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000612dda82612f4e565b9150612de583612f4e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612e1a57612e19613077565b5b828201905092915050565b6000612e3082612f4e565b9150612e3b83612f4e565b925082612e4b57612e4a6130a6565b5b828204905092915050565b6000612e6182612f4e565b9150612e6c83612f4e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612ea557612ea4613077565b5b828202905092915050565b6000612ebb82612f4e565b9150612ec683612f4e565b925082821015612ed957612ed8613077565b5b828203905092915050565b6000612eef82612f2e565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015612f85578082015181840152602081019050612f6a565b83811115612f94576000848401525b50505050565b60006002820490506001821680612fb257607f821691505b60208210811415612fc657612fc56130d5565b5b50919050565b612fd582613176565b810181811067ffffffffffffffff82111715612ff457612ff3613133565b5b80604052505050565b600061300882612f4e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561303b5761303a613077565b5b600182019050919050565b600061305182612f4e565b915061305c83612f4e565b92508261306c5761306b6130a6565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f302e30303035206574682070657220746f6b656e000000000000000000000000600082015250565b7f43616e204d696e74206f6e6c792035207065722057616c6c6574000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f53616c65206e6f74204163746976650000000000000000000000000000000000600082015250565b50565b7f4f6e6c792035206d696e7473207065722077616c6c65742c207072696365642060008201527f617420302e303030352065746800000000000000000000000000000000000000602082015250565b7f4d696e7420697320676f696e67206f76657220537570706c7900000000000000600082015250565b7f4d696e7420697320676f696e67206f766572206d617820706572207472616e7360008201527f616374696f6e0000000000000000000000000000000000000000000000000000602082015250565b7f446576207265736572766520656d707479000000000000000000000000000000600082015250565b7f4f6e6c79206f6e652046726565204d696e74207065722057616c6c6574000000600082015250565b6133ee81612ee4565b81146133f957600080fd5b50565b61340581612ef6565b811461341057600080fd5b50565b61341c81612f02565b811461342757600080fd5b50565b61343381612f4e565b811461343e57600080fd5b5056fea2646970667358221220125c0fa29b0569dde8b826f9f3922bb46bd12d02e2687b7a42afe5b4cbf8149e64736f6c63430008070033
Verified Source Code Full Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: No
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
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);
}
}
IERC721Receiver.sol 27 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// 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;
}
}
smileydumbfuhks.sol 130 lines
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;
pragma abicoder v2;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import './ERC721B.sol';
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
/*Mint Info:
One Free Mint per Wallet
Price for any mints after: 0.0005 eth
Max Mints Per Wallet: 5
Supply: 10000
*/
contract smileydumbfuhks is ERC721B, Ownable {
using Strings for uint256;
string public baseURI = "";
bool public isSaleActive = false;
mapping(address => bool) private _freeMintClaimed;
mapping(address => uint256) private _mintsClaimed;
uint256 public constant MAX_TOKENS = 8008;
uint256 public tokenPrice = 500000000000000;
uint256 public constant maxPerWallet = 5;
using SafeMath for uint256;
using Strings for uint256;
uint256 public devReserve = 5;
event NFTMINTED(uint256 tokenId, address owner);
constructor() ERC721B("smileydumbfuhk", "SDF") {}
function _baseURI() internal view virtual returns (string memory) {
return baseURI;
}
function _price() internal view virtual returns (uint256) {
return tokenPrice;
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
baseURI = _newBaseURI;
}
function setPrice(uint256 _newTokenPrice) public onlyOwner {
tokenPrice = _newTokenPrice;
}
function activateSale() external onlyOwner {
isSaleActive = !isSaleActive;
}
function exists(uint256 tokenId) public view returns (bool) {
return _exists(tokenId);
}
function Withdraw() public payable onlyOwner {
(bool os, ) = payable(owner()).call{ value: address(this).balance }("");
require(os);
}
function reserveTokens(address dev, uint256 reserveAmount)
external
onlyOwner
{
require(
reserveAmount > 0 && reserveAmount <= devReserve,
"Dev reserve empty"
);
totalSupply().add(1);
_mint(dev, reserveAmount);
}
function mintMultiplePublic(address to, uint256 quantity) external payable {
require(isSaleActive, "Sale not Active");
require(
quantity > 0 && quantity <= maxPerWallet,
"Can Mint only 5 per Wallet"
);
require(
totalSupply().add(quantity) <= MAX_TOKENS,
"Mint is going over max per transaction"
);
require(msg.value >= tokenPrice.mul(quantity),
"0.0005 eth per token"
);
require(
_mintsClaimed[msg.sender].add(quantity) <= maxPerWallet,
"Only 5 mints per wallet, priced at 0.0005 eth"
);
_mintsClaimed[msg.sender] += quantity;
_mint(to, quantity);
}
function freeMintClaim(address to) external payable {
require(isSaleActive, "Sale not Active");
require(
totalSupply().add(1) <= MAX_TOKENS,
"Mint is going over Supply"
);
require(
_freeMintClaimed[msg.sender] != true,
"Only one Free Mint per Wallet"
);
_freeMintClaimed[msg.sender] = true;
_mint(to, 1);
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(
_exists(tokenId),
"ERC721Metadata: URI query for nonexistent token"
);
string memory currentBaseURI = _baseURI();
return
bytes(currentBaseURI).length > 0
? string(abi.encodePacked(currentBaseURI, tokenId.toString()))
: "";
}
}
SafeMath.sol 227 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
ERC721B.sol 353 lines
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintedQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerIndexOutOfBounds();
error OwnerQueryForNonexistentToken();
error TokenIndexOutOfBounds();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error UnableDetermineTokenOwner();
error UnableGetTokenOwnerByIndex();
error URIQueryForNonexistentToken();
/**
* Updated, minimalist and gas efficient version of OpenZeppelins ERC721 contract.
* Includes the Metadata and Enumerable extension.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
* Does not support burning tokens
*
* @author beskay0x
* Credits: chiru-labs, solmate, transmissions11, nftchance, squeebo_nft and others
*/
abstract contract ERC721B {
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address indexed owner, address indexed spender, uint256 indexed id);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/*///////////////////////////////////////////////////////////////
METADATA STORAGE/LOGIC
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
function tokenURI(uint256 tokenId) public view virtual returns (string memory);
/*///////////////////////////////////////////////////////////////
ERC721 STORAGE
//////////////////////////////////////////////////////////////*/
// Array which maps token ID to address (index is tokenID)
address[] internal _owners;
// 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;
/*///////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(string memory _name, string memory _symbol) {
name = _name;
symbol = _symbol;
}
/*///////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return
interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721
interfaceId == 0x780e9d63 || // ERC165 Interface ID for ERC721Enumerable
interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata
}
/*///////////////////////////////////////////////////////////////
ERC721ENUMERABLE LOGIC
//////////////////////////////////////////////////////////////*/
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view returns (uint256) {
return _owners.length;
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* Dont call this function on chain from another smart contract, since it can become quite expensive
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual returns (uint256 tokenId) {
if (index >= balanceOf(owner)) revert OwnerIndexOutOfBounds();
uint256 count;
uint256 qty = _owners.length;
// Cannot realistically overflow, since we are using uint256
unchecked {
for (tokenId; tokenId < qty; tokenId++) {
if (owner == ownerOf(tokenId)) {
if (count == index) return tokenId;
else count++;
}
}
}
revert UnableGetTokenOwnerByIndex();
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual returns (uint256) {
if (index >= totalSupply()) revert TokenIndexOutOfBounds();
return index;
}
/*///////////////////////////////////////////////////////////////
ERC721 LOGIC
//////////////////////////////////////////////////////////////*/
/**
* @dev Iterates through _owners array, returns balance of address
* It is not recommended to call this function from another smart contract
* as it can become quite expensive -- call this function off chain instead.
*/
function balanceOf(address owner) public view virtual returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
uint256 count;
uint256 qty = _owners.length;
// Cannot realistically overflow, since we are using uint256
unchecked {
for (uint256 i; i < qty; i++) {
if (owner == ownerOf(i)) {
count++;
}
}
}
return count;
}
/**
* @dev See {IERC721-ownerOf}.
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function ownerOf(uint256 tokenId) public view virtual returns (address) {
if (!_exists(tokenId)) revert OwnerQueryForNonexistentToken();
// Cannot realistically overflow, since we are using uint256
unchecked {
for (tokenId; ; tokenId++) {
if (_owners[tokenId] != address(0)) {
return _owners[tokenId];
}
}
}
revert UnableDetermineTokenOwner();
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual {
address owner = ownerOf(tokenId);
if (to == owner) revert ApprovalToCurrentOwner();
if (msg.sender != owner && !isApprovedForAll(owner, msg.sender)) revert ApprovalCallerNotOwnerNorApproved();
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual {
if (operator == msg.sender) revert ApproveToCaller();
_operatorApprovals[msg.sender][operator] = approved;
emit ApprovalForAll(msg.sender, operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual {
if (!_exists(tokenId)) revert OwnerQueryForNonexistentToken();
if (ownerOf(tokenId) != from) revert TransferFromIncorrectOwner();
if (to == address(0)) revert TransferToZeroAddress();
bool isApprovedOrOwner = (msg.sender == from ||
msg.sender == getApproved(tokenId) ||
isApprovedForAll(from, msg.sender));
if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
// delete token approvals from previous owner
delete _tokenApprovals[tokenId];
_owners[tokenId] = to;
// if token ID below transferred one isnt set, set it to previous owner
// if tokenid is zero, skip this to prevent underflow
if (tokenId > 0 && _owners[tokenId - 1] == address(0)) {
_owners[tokenId - 1] = from;
}
emit Transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 id
) public virtual {
safeTransferFrom(from, to, id, '');
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 id,
bytes memory data
) public virtual {
transferFrom(from, to, id);
if (!_checkOnERC721Received(from, to, id, data)) revert TransferToNonERC721ReceiverImplementer();
}
/**
* @dev Returns whether `tokenId` exists.
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return tokenId < _owners.length;
}
/**
* @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.code.length == 0) return true;
try IERC721Receiver(to).onERC721Received(msg.sender, from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) revert TransferToNonERC721ReceiverImplementer();
assembly {
revert(add(32, reason), mload(reason))
}
}
}
/*///////////////////////////////////////////////////////////////
INTERNAL MINT LOGIC
//////////////////////////////////////////////////////////////*/
/**
* @dev check if contract confirms token transfer, if not - reverts
* unlike the standard ERC721 implementation this is only called once per mint,
* no matter how many tokens get minted, since it is useless to check this
* requirement several times -- if the contract confirms one token,
* it will confirm all additional ones too.
* This saves us around 5k gas per additional mint
*/
function _safeMint(address to, uint256 qty) internal virtual {
_safeMint(to, qty, '');
}
function _safeMint(
address to,
uint256 qty,
bytes memory data
) internal virtual {
_mint(to, qty);
if (!_checkOnERC721Received(address(0), to, _owners.length - 1, data))
revert TransferToNonERC721ReceiverImplementer();
}
function _mint(address to, uint256 qty) internal virtual {
if (to == address(0)) revert MintToZeroAddress();
if (qty == 0) revert MintZeroQuantity();
uint256 _currentIndex = _owners.length;
// Cannot realistically overflow, since we are using uint256
unchecked {
for (uint256 i; i < qty - 1; i++) {
_owners.push();
emit Transfer(address(0), to, _currentIndex + i);
}
}
// set last index to receiver
_owners.push(to);
emit Transfer(address(0), to, _currentIndex + (qty - 1));
}
}
Strings.sol 75 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @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);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}
Read Contract
MAX_TOKENS 0xf47c84c5 → uint256
balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
devReserve 0xfcd2a427 → uint256
exists 0x4f558e79 → bool
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isSaleActive 0x564566a8 → bool
maxPerWallet 0x453c2310 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenPrice 0x7ff9b596 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
Write Contract 14 functions
These functions modify contract state and require a wallet transaction to execute.
Withdraw 0x57ea89b6
No parameters
activateSale 0xc721f08d
No parameters
approve 0x095ea7b3
address to
uint256 tokenId
freeMintClaim 0x1ac2226e
address to
mintMultiplePublic 0xd31ccdfa
address to
uint256 quantity
renounceOwnership 0x715018a6
No parameters
reserveTokens 0x78cf19e9
address dev
uint256 reserveAmount
safeTransferFrom 0x42842e0e
address from
address to
uint256 id
safeTransferFrom 0xb88d4fde
address from
address to
uint256 id
bytes data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string _newBaseURI
setPrice 0x91b7f5ed
uint256 _newTokenPrice
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address