Address Contract Verified
Address
0xA95d69F207D972992D35D9692a8092a45735E173
Balance
0 ETH
Nonce
1
Code Size
16282 bytes
Creator
0xB9542fc0...1ead at tx 0x71f4c0d2...845cd0
Indexed Transactions
0
Contract Bytecode
16282 bytes
0x6080604052600436106101e35760003560e01c80638da5cb5b11610102578063b19960e611610095578063e16ff2f411610064578063e16ff2f414610699578063e7ecda90146106c4578063e985e9c5146106ed578063f2fde38b1461072a576101e3565b8063b19960e6146105f1578063b88d4fde1461061c578063c87b56dd14610645578063d0fa532014610682576101e3565b80639a5d140b116100d15780639a5d140b14610558578063a035b1fe14610581578063a0712d68146105ac578063a22cb465146105c8576101e3565b80638da5cb5b146104ae5780638ecad721146104d957806391b7f5ed1461050457806395d89b411461052d576101e3565b80633ccfd60b1161017a57806368428a1b1161014957806368428a1b146104045780636c0360eb1461042f57806370a082311461045a578063715018a614610497576101e3565b80633ccfd60b1461035e57806342842e0e1461037557806355f804b31461039e5780636352211e146103c7576101e3565b8063095ea7b3116101b6578063095ea7b3146102b657806323b872dd146102df5780632a33f5531461030857806332cb6b0c14610333576101e3565b806301ffc9a7146101e8578063053d4a5f1461022557806306fdde031461024e578063081812fc14610279575b600080fd5b3480156101f457600080fd5b5061020f600480360381019061020a9190612bb5565b610753565b60405161021c91906130e2565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612c58565b610835565b005b34801561025a57600080fd5b5061026361090f565b60405161027091906130fd565b60405180910390f35b34801561028557600080fd5b506102a0600480360381019061029b9190612c58565b6109a1565b6040516102ad919061307b565b60405180910390f35b3480156102c257600080fd5b506102dd60048036038101906102d89190612b28565b610a26565b005b3480156102eb57600080fd5b5061030660048036038101906103019190612a12565b610b3e565b005b34801561031457600080fd5b5061031d610b9e565b60405161032a91906133df565b60405180910390f35b34801561033f57600080fd5b50610348610ba4565b60405161035591906133df565b60405180910390f35b34801561036a57600080fd5b50610373610baa565b005b34801561038157600080fd5b5061039c60048036038101906103979190612a12565b610c76565b005b3480156103aa57600080fd5b506103c560048036038101906103c09190612c0f565b610c96565b005b3480156103d357600080fd5b506103ee60048036038101906103e99190612c58565b610d2c565b6040516103fb919061307b565b60405180910390f35b34801561041057600080fd5b50610419610dde565b60405161042691906130e2565b60405180910390f35b34801561043b57600080fd5b50610444610df1565b60405161045191906130fd565b60405180910390f35b34801561046657600080fd5b50610481600480360381019061047c91906129a5565b610e7f565b60405161048e91906133df565b60405180910390f35b3480156104a357600080fd5b506104ac610f37565b005b3480156104ba57600080fd5b506104c3610fbf565b6040516104d0919061307b565b60405180910390f35b3480156104e557600080fd5b506104ee610fe9565b6040516104fb91906133df565b60405180910390f35b34801561051057600080fd5b5061052b60048036038101906105269190612c58565b610fee565b005b34801561053957600080fd5b50610542611080565b60405161054f91906130fd565b60405180910390f35b34801561056457600080fd5b5061057f600480360381019061057a9190612c58565b611112565b005b34801561058d57600080fd5b5061059661124a565b6040516105a391906133df565b60405180910390f35b6105c660048036038101906105c19190612c58565b611250565b005b3480156105d457600080fd5b506105ef60048036038101906105ea9190612ae8565b611506565b005b3480156105fd57600080fd5b5061060661151c565b60405161061391906133df565b60405180910390f35b34801561062857600080fd5b50610643600480360381019061063e9190612a65565b611521565b005b34801561065157600080fd5b5061066c60048036038101906106679190612c58565b611583565b60405161067991906130fd565b60405180910390f35b34801561068e57600080fd5b5061069761162a565b005b3480156106a557600080fd5b506106ae6116d2565b6040516106bb91906133df565b60405180910390f35b3480156106d057600080fd5b506106eb60048036038101906106e69190612b68565b6116d8565b005b3480156106f957600080fd5b50610714600480360381019061070f91906129d2565b61183e565b60405161072191906130e2565b60405180910390f35b34801561073657600080fd5b50610751600480360381019061074c91906129a5565b6118d2565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061081e57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061082e575061082d826119e0565b5b9050919050565b61083d611a4a565b73ffffffffffffffffffffffffffffffffffffffff1661085b610fbf565b73ffffffffffffffffffffffffffffffffffffffff16146108b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a8906132ff565b60405180910390fd5b80600954600c546108c291906135a5565b811115610904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fb9061339f565b60405180910390fd5b816009819055505050565b60606000805461091e906136b9565b80601f016020809104026020016040519081016040528092919081815260200182805461094a906136b9565b80156109975780601f1061096c57610100808354040283529160200191610997565b820191906000526020600020905b81548152906001019060200180831161097a57829003601f168201915b5050505050905090565b60006109ac82611a52565b6109eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e2906132df565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610a3182610d2c565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610aa2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a999061335f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610ac1611a4a565b73ffffffffffffffffffffffffffffffffffffffff161480610af05750610aef81610aea611a4a565b61183e565b5b610b2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b269061321f565b60405180910390fd5b610b398383611abe565b505050565b610b4f610b49611a4a565b82611b77565b610b8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b859061337f565b60405180910390fd5b610b99838383611c55565b505050565b600c5481565b611e6181565b610bb2611a4a565b73ffffffffffffffffffffffffffffffffffffffff16610bd0610fbf565b73ffffffffffffffffffffffffffffffffffffffff1614610c26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1d906132ff565b60405180910390fd5b610c2e610fbf565b73ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610c73573d6000803e3d6000fd5b50565b610c9183838360405180602001604052806000815250611521565b505050565b610c9e611a4a565b73ffffffffffffffffffffffffffffffffffffffff16610cbc610fbf565b73ffffffffffffffffffffffffffffffffffffffff1614610d12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d09906132ff565b60405180910390fd5b80600a9080519060200190610d28929190612763565b5050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcc9061327f565b60405180910390fd5b80915050919050565b600b60009054906101000a900460ff1681565b600a8054610dfe906136b9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2a906136b9565b8015610e775780601f10610e4c57610100808354040283529160200191610e77565b820191906000526020600020905b815481529060010190602001808311610e5a57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee79061325f565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610f3f611a4a565b73ffffffffffffffffffffffffffffffffffffffff16610f5d610fbf565b73ffffffffffffffffffffffffffffffffffffffff1614610fb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610faa906132ff565b60405180910390fd5b610fbd6000611ebc565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600581565b610ff6611a4a565b73ffffffffffffffffffffffffffffffffffffffff16611014610fbf565b73ffffffffffffffffffffffffffffffffffffffff161461106a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611061906132ff565b60405180910390fd5b600181611077919061354b565b60088190555050565b60606001805461108f906136b9565b80601f01602080910402602001604051908101604052809291908181526020018280546110bb906136b9565b80156111085780601f106110dd57610100808354040283529160200191611108565b820191906000526020600020905b8154815290600101906020018083116110eb57829003601f168201915b5050505050905090565b61111a611a4a565b73ffffffffffffffffffffffffffffffffffffffff16611138610fbf565b73ffffffffffffffffffffffffffffffffffffffff161461118e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611185906132ff565b60405180910390fd5b806009548111156111d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111cb9061323f565b60405180910390fd5b60005b828110156112455760006111eb6007611f82565b90506111f73382611f90565b61120160076119ca565b600c60008154809291906112149061368f565b91905055506009600081548092919061122c9061368f565b919050555050808061123d9061371c565b9150506111d7565b505050565b60085481565b600b60009054906101000a900460ff1661129f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112969061329f565b60405180910390fd5b80600954600c546112b091906135a5565b8111156112f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e99061339f565b60405180910390fd5b816005811115611337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132e906133bf565b60405180910390fd5b82600f81600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461138591906134c4565b11156113c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bd9061333f565b60405180910390fd5b83600854816113d5919061354b565b3414611416576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140d9061319f565b60405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461144e57600080fd5b60005b858110156114fe5760006114656007611f82565b90506114713382611f90565b61147b60076119ca565b6001600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546114cb91906134c4565b92505081905550600c60008154809291906114e59061368f565b91905055505080806114f69061371c565b915050611451565b505050505050565b611518611511611a4a565b8383611fae565b5050565b600f81565b61153261152c611a4a565b83611b77565b611571576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115689061337f565b60405180910390fd5b61157d8484848461211b565b50505050565b606061158e82611a52565b6115cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c49061331f565b60405180910390fd5b60006115d7612177565b905060008151116115f75760405180602001604052806000815250611622565b8061160184612209565b604051602001611612929190613057565b6040516020818303038152906040525b915050919050565b611632611a4a565b73ffffffffffffffffffffffffffffffffffffffff16611650610fbf565b73ffffffffffffffffffffffffffffffffffffffff16146116a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169d906132ff565b60405180910390fd5b600b60009054906101000a900460ff1615600b60006101000a81548160ff021916908315150217905550565b60095481565b6116e0611a4a565b73ffffffffffffffffffffffffffffffffffffffff166116fe610fbf565b73ffffffffffffffffffffffffffffffffffffffff1614611754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174b906132ff565b60405180910390fd5b8181905060095481111561179d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117949061323f565b60405180910390fd5b60005b838390508110156118385760006117b76007611f82565b90506117ea8585848181106117cf576117ce613823565b5b90506020020160208101906117e491906129a5565b82611f90565b6117f460076119ca565b600c60008154809291906118079061368f565b91905055506009600081548092919061181f9061368f565b91905055505080806118309061371c565b9150506117a0565b50505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6118da611a4a565b73ffffffffffffffffffffffffffffffffffffffff166118f8610fbf565b73ffffffffffffffffffffffffffffffffffffffff161461194e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611945906132ff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156119be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b59061313f565b60405180910390fd5b6119c781611ebc565b50565b6001816000016000828254019250508190555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611b3183610d2c565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611b8282611a52565b611bc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb8906131ff565b60405180910390fd5b6000611bcc83610d2c565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611c3b57508373ffffffffffffffffffffffffffffffffffffffff16611c23846109a1565b73ffffffffffffffffffffffffffffffffffffffff16145b80611c4c5750611c4b818561183e565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611c7582610d2c565b73ffffffffffffffffffffffffffffffffffffffff1614611ccb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc29061315f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d32906131bf565b60405180910390fd5b611d4683838361236a565b611d51600082611abe565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611da191906135a5565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611df891906134c4565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611eb783838361236f565b505050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600001549050919050565b611faa828260405180602001604052806000815250612374565b5050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561201d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612014906131df565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161210e91906130e2565b60405180910390a3505050565b612126848484611c55565b612132848484846123cf565b612171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121689061311f565b60405180910390fd5b50505050565b6060600a8054612186906136b9565b80601f01602080910402602001604051908101604052809291908181526020018280546121b2906136b9565b80156121ff5780601f106121d4576101008083540402835291602001916121ff565b820191906000526020600020905b8154815290600101906020018083116121e257829003601f168201915b5050505050905090565b60606000821415612251576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612365565b600082905060005b6000821461228357808061226c9061371c565b915050600a8261227c919061351a565b9150612259565b60008167ffffffffffffffff81111561229f5761229e613852565b5b6040519080825280601f01601f1916602001820160405280156122d15781602001600182028036833780820191505090505b5090505b6000851461235e576001826122ea91906135a5565b9150600a856122f99190613765565b603061230591906134c4565b60f81b81838151811061231b5761231a613823565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612357919061351a565b94506122d5565b8093505050505b919050565b505050565b505050565b61237e8383612566565b61238b60008484846123cf565b6123ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123c19061311f565b60405180910390fd5b505050565b60006123f08473ffffffffffffffffffffffffffffffffffffffff16612740565b15612559578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612419611a4a565b8786866040518563ffffffff1660e01b815260040161243b9493929190613096565b602060405180830381600087803b15801561245557600080fd5b505af192505050801561248657506040513d601f19601f820116820180604052508101906124839190612be2565b60015b612509573d80600081146124b6576040519150601f19603f3d011682016040523d82523d6000602084013e6124bb565b606091505b50600081511415612501576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f89061311f565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061255e565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156125d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125cd906132bf565b60405180910390fd5b6125df81611a52565b1561261f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126169061317f565b60405180910390fd5b61262b6000838361236a565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461267b91906134c4565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461273c6000838361236f565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b82805461276f906136b9565b90600052602060002090601f01602090048101928261279157600085556127d8565b82601f106127aa57805160ff19168380011785556127d8565b828001600101855582156127d8579182015b828111156127d75782518255916020019190600101906127bc565b5b5090506127e591906127e9565b5090565b5b808211156128025760008160009055506001016127ea565b5090565b60006128196128148461341f565b6133fa565b90508281526020810184848401111561283557612834613890565b5b61284084828561364d565b509392505050565b600061285b61285684613450565b6133fa565b90508281526020810184848401111561287757612876613890565b5b61288284828561364d565b509392505050565b60008135905061289981613f08565b92915050565b60008083601f8401126128b5576128b4613886565b5b8235905067ffffffffffffffff8111156128d2576128d1613881565b5b6020830191508360208202830111156128ee576128ed61388b565b5b9250929050565b60008135905061290481613f1f565b92915050565b60008135905061291981613f36565b92915050565b60008151905061292e81613f36565b92915050565b600082601f83011261294957612948613886565b5b8135612959848260208601612806565b91505092915050565b600082601f83011261297757612976613886565b5b8135612987848260208601612848565b91505092915050565b60008135905061299f81613f4d565b92915050565b6000602082840312156129bb576129ba61389a565b5b60006129c98482850161288a565b91505092915050565b600080604083850312156129e9576129e861389a565b5b60006129f78582860161288a565b9250506020612a088582860161288a565b9150509250929050565b600080600060608486031215612a2b57612a2a61389a565b5b6000612a398682870161288a565b9350506020612a4a8682870161288a565b9250506040612a5b86828701612990565b9150509250925092565b60008060008060808587031215612a7f57612a7e61389a565b5b6000612a8d8782880161288a565b9450506020612a9e8782880161288a565b9350506040612aaf87828801612990565b925050606085013567ffffffffffffffff811115612ad057612acf613895565b5b612adc87828801612934565b91505092959194509250565b60008060408385031215612aff57612afe61389a565b5b6000612b0d8582860161288a565b9250506020612b1e858286016128f5565b9150509250929050565b60008060408385031215612b3f57612b3e61389a565b5b6000612b4d8582860161288a565b9250506020612b5e85828601612990565b9150509250929050565b60008060208385031215612b7f57612b7e61389a565b5b600083013567ffffffffffffffff811115612b9d57612b9c613895565b5b612ba98582860161289f565b92509250509250929050565b600060208284031215612bcb57612bca61389a565b5b6000612bd98482850161290a565b91505092915050565b600060208284031215612bf857612bf761389a565b5b6000612c068482850161291f565b91505092915050565b600060208284031215612c2557612c2461389a565b5b600082013567ffffffffffffffff811115612c4357612c42613895565b5b612c4f84828501612962565b91505092915050565b600060208284031215612c6e57612c6d61389a565b5b6000612c7c84828501612990565b91505092915050565b612c8e816135d9565b82525050565b612c9d816135eb565b82525050565b6000612cae82613481565b612cb88185613497565b9350612cc881856020860161365c565b612cd18161389f565b840191505092915050565b6000612ce78261348c565b612cf181856134a8565b9350612d0181856020860161365c565b612d0a8161389f565b840191505092915050565b6000612d208261348c565b612d2a81856134b9565b9350612d3a81856020860161365c565b80840191505092915050565b6000612d536032836134a8565b9150612d5e826138b0565b604082019050919050565b6000612d766026836134a8565b9150612d81826138ff565b604082019050919050565b6000612d996025836134a8565b9150612da48261394e565b604082019050919050565b6000612dbc601c836134a8565b9150612dc78261399d565b602082019050919050565b6000612ddf6047836134a8565b9150612dea826139c6565b606082019050919050565b6000612e026024836134a8565b9150612e0d82613a3b565b604082019050919050565b6000612e256019836134a8565b9150612e3082613a8a565b602082019050919050565b6000612e48602c836134a8565b9150612e5382613ab3565b604082019050919050565b6000612e6b6038836134a8565b9150612e7682613b02565b604082019050919050565b6000612e8e603f836134a8565b9150612e9982613b51565b604082019050919050565b6000612eb1602a836134a8565b9150612ebc82613ba0565b604082019050919050565b6000612ed46029836134a8565b9150612edf82613bef565b604082019050919050565b6000612ef76026836134a8565b9150612f0282613c3e565b604082019050919050565b6000612f1a6020836134a8565b9150612f2582613c8d565b602082019050919050565b6000612f3d602c836134a8565b9150612f4882613cb6565b604082019050919050565b6000612f606020836134a8565b9150612f6b82613d05565b602082019050919050565b6000612f83602f836134a8565b9150612f8e82613d2e565b604082019050919050565b6000612fa66036836134a8565b9150612fb182613d7d565b604082019050919050565b6000612fc96021836134a8565b9150612fd482613dcc565b604082019050919050565b6000612fec6031836134a8565b9150612ff782613e1b565b604082019050919050565b600061300f6036836134a8565b915061301a82613e6a565b604082019050919050565b60006130326032836134a8565b915061303d82613eb9565b604082019050919050565b61305181613643565b82525050565b60006130638285612d15565b915061306f8284612d15565b91508190509392505050565b60006020820190506130906000830184612c85565b92915050565b60006080820190506130ab6000830187612c85565b6130b86020830186612c85565b6130c56040830185613048565b81810360608301526130d78184612ca3565b905095945050505050565b60006020820190506130f76000830184612c94565b92915050565b600060208201905081810360008301526131178184612cdc565b905092915050565b6000602082019050818103600083015261313881612d46565b9050919050565b6000602082019050818103600083015261315881612d69565b9050919050565b6000602082019050818103600083015261317881612d8c565b9050919050565b6000602082019050818103600083015261319881612daf565b9050919050565b600060208201905081810360008301526131b881612dd2565b9050919050565b600060208201905081810360008301526131d881612df5565b9050919050565b600060208201905081810360008301526131f881612e18565b9050919050565b6000602082019050818103600083015261321881612e3b565b9050919050565b6000602082019050818103600083015261323881612e5e565b9050919050565b6000602082019050818103600083015261325881612e81565b9050919050565b6000602082019050818103600083015261327881612ea4565b9050919050565b6000602082019050818103600083015261329881612ec7565b9050919050565b600060208201905081810360008301526132b881612eea565b9050919050565b600060208201905081810360008301526132d881612f0d565b9050919050565b600060208201905081810360008301526132f881612f30565b9050919050565b6000602082019050818103600083015261331881612f53565b9050919050565b6000602082019050818103600083015261333881612f76565b9050919050565b6000602082019050818103600083015261335881612f99565b9050919050565b6000602082019050818103600083015261337881612fbc565b9050919050565b6000602082019050818103600083015261339881612fdf565b9050919050565b600060208201905081810360008301526133b881613002565b9050919050565b600060208201905081810360008301526133d881613025565b9050919050565b60006020820190506133f46000830184613048565b92915050565b6000613404613415565b905061341082826136eb565b919050565b6000604051905090565b600067ffffffffffffffff82111561343a57613439613852565b5b6134438261389f565b9050602081019050919050565b600067ffffffffffffffff82111561346b5761346a613852565b5b6134748261389f565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006134cf82613643565b91506134da83613643565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561350f5761350e613796565b5b828201905092915050565b600061352582613643565b915061353083613643565b9250826135405761353f6137c5565b5b828204905092915050565b600061355682613643565b915061356183613643565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561359a57613599613796565b5b828202905092915050565b60006135b082613643565b91506135bb83613643565b9250828210156135ce576135cd613796565b5b828203905092915050565b60006135e482613623565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561367a57808201518184015260208101905061365f565b83811115613689576000848401525b50505050565b600061369a82613643565b915060008214156136ae576136ad613796565b5b600182039050919050565b600060028204905060018216806136d157607f821691505b602082108114156136e5576136e46137f4565b5b50919050565b6136f48261389f565b810181811067ffffffffffffffff8211171561371357613712613852565b5b80604052505050565b600061372782613643565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561375a57613759613796565b5b600182019050919050565b600061377082613643565b915061377b83613643565b92508261378b5761378a6137c5565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f57616e64657256657273653a20546865726520776173206e6f7420656e6f756760008201527f682f657874726120455448207472616e7366657272656420746f206d696e742060208201527f616e204e46542e00000000000000000000000000000000000000000000000000604082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f57616e64657256657273653a20546865726520617265206e6f206d6f7265207260008201527f656d61696e696e67207265736572766564204e46547320746f206d696e742e00602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f57616e64657256657273653a204e46542063616e6e6f74206265206d696e746560008201527f64207965742e0000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f57616e64657256657273653a204d696e7420616d6f756e74206578636565647360008201527f206d6178206c696d6974207065722077616c6c65742e00000000000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f57616e64657256657273653a20546865726520617265206e6f206d6f7265207260008201527f656d61696e696e67204e46547320746f206d696e742e00000000000000000000602082015250565b7f57616e64657256657273653a204d696e7420616d6f756e74206578636565647360008201527f206d6178206c696d6974207065722074782e0000000000000000000000000000602082015250565b613f11816135d9565b8114613f1c57600080fd5b50565b613f28816135eb565b8114613f3357600080fd5b50565b613f3f816135f7565b8114613f4a57600080fd5b50565b613f5681613643565b8114613f6157600080fd5b5056fea26469706673582212201a1fbe8da540955c32bc0e781ee2e7ecaf71f4373d60e412d75d9a5b4ac018ab64736f6c63430008060033
Verified Source Code Full Match
Compiler: v0.8.6+commit.11564f7e
EVM: berlin
Optimization: No
WanderVerse.sol 149 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract WanderVerse is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant MAX_MINT_PER_TX = 5;
uint256 public constant MAX_MINT_PER_WALLET = 15;
uint256 public price = 0.07 ether;
uint256 public amountTokensReserved = 50;
string public baseURI;
bool public saleActive = false;
uint256 public totalSupplyRemaining = MAX_SUPPLY;
mapping(address => uint256) private transactionsPerWallet;
constructor() ERC721("WanderVerse", "WV") {
_tokenIds.increment();
}
modifier isMintable() {
require(saleActive, "WanderVerse: NFT cannot be minted yet.");
_;
}
modifier isNotExceedMaxMintPerTx(uint256 amount) {
require(
amount <= MAX_MINT_PER_TX,
"WanderVerse: Mint amount exceeds max limit per tx."
);
_;
}
modifier isNotExceedMaxMintPerWallet(uint256 amount) {
require(
transactionsPerWallet[msg.sender] + amount <= MAX_MINT_PER_WALLET,
"WanderVerse: Mint amount exceeds max limit per wallet."
);
_;
}
modifier isNotExceedAvailableSupply(uint256 amount) {
require(
amount <= totalSupplyRemaining - amountTokensReserved,
"WanderVerse: There are no more remaining NFTs to mint."
);
_;
}
modifier isNotExceedReservedSupply(uint256 amount) {
require(
amount <= amountTokensReserved,
"WanderVerse: There are no more remaining reserved NFTs to mint."
);
_;
}
modifier isPaymentSufficient(uint256 amount) {
require(
msg.value == amount * price,
"WanderVerse: There was not enough/extra ETH transferred to mint an NFT."
);
_;
}
function mint(uint256 amount)
public
payable
isMintable
isNotExceedAvailableSupply(amount)
isNotExceedMaxMintPerTx(amount)
isNotExceedMaxMintPerWallet(amount)
isPaymentSufficient(amount)
{
require(msg.sender == tx.origin);
for (uint256 i = 0; i < amount; i++) {
uint256 id = _tokenIds.current();
_safeMint(msg.sender, id);
_tokenIds.increment();
transactionsPerWallet[msg.sender] += 1;
totalSupplyRemaining--;
}
}
function mintReserved(uint256 amount)
external
onlyOwner
isNotExceedReservedSupply(amount)
{
for (uint256 i = 0; i < amount; i++) {
uint256 id = _tokenIds.current();
_safeMint(msg.sender, id);
_tokenIds.increment();
totalSupplyRemaining--;
amountTokensReserved--;
}
}
function giftReserved(address[] calldata addresses)
external
onlyOwner
isNotExceedReservedSupply(addresses.length)
{
for (uint256 i = 0; i < addresses.length; i++) {
uint256 id = _tokenIds.current();
_safeMint(addresses[i], id);
_tokenIds.increment();
totalSupplyRemaining--;
amountTokensReserved--;
}
}
function setBaseURI(string memory _URI) public onlyOwner {
baseURI = _URI;
}
function setPrice(uint256 _price) public onlyOwner {
price = _price * (1 wei);
}
function flipSaleActiveState() public onlyOwner {
saleActive = !saleActive;
}
function setAmountTokensReserved(uint256 _amountTokensReserved)
public
onlyOwner
isNotExceedAvailableSupply(_amountTokensReserved)
{
amountTokensReserved = _amountTokensReserved;
}
function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
function withdraw() external onlyOwner {
payable(owner()).transfer(address(this).balance);
}
}
Address.sol 222 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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);
}
}
}
}
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;
}
}
Strings.sol 67 lines
// SPDX-License-Identifier: MIT
// 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);
}
}
Ownable.sol 76 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 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);
}
}
Counters.sol 43 lines
// SPDX-License-Identifier: MIT
// 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;
}
}
ERC721.sol 447 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @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);
_afterTokenTransfer(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);
_afterTokenTransfer(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 from incorrect owner");
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);
_afterTokenTransfer(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 {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
IERC721.sol 143 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @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;
}
ERC165.sol 29 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @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;
}
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// 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);
}
IERC721Receiver.sol 27 lines
// SPDX-License-Identifier: MIT
// 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);
}
IERC721Metadata.sol 27 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @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);
}
Read Contract
MAX_MINT_PER_TX 0x8ecad721 → uint256
MAX_MINT_PER_WALLET 0xb19960e6 → uint256
MAX_SUPPLY 0x32cb6b0c → uint256
amountTokensReserved 0xe16ff2f4 → uint256
balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
price 0xa035b1fe → uint256
saleActive 0x68428a1b → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupplyRemaining 0x2a33f553 → uint256
Write Contract 15 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
flipSaleActiveState 0xd0fa5320
No parameters
giftReserved 0xe7ecda90
address[] addresses
mint 0xa0712d68
uint256 amount
mintReserved 0x9a5d140b
uint256 amount
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setAmountTokensReserved 0x053d4a5f
uint256 _amountTokensReserved
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string _URI
setPrice 0x91b7f5ed
uint256 _price
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address