Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x838E240c0FcBd12fBfFdB327d35A32DD2E73C7ea
Balance 0 ETH
Nonce 1
Code Size 15286 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

15286 bytes
0x6080604052600436106101b75760003560e01c80638da5cb5b116100ec578063b88d4fde1161008a578063c87b56dd11610064578063c87b56dd146105a6578063e985e9c5146105e3578063f2fde38b14610620578063f47c84c514610649576101b7565b8063b88d4fde14610536578063c358575c1461055f578063c66828621461057b576101b7565b806395d89b41116100c657806395d89b411461048c5780639abc8320146104b7578063a035b1fe146104e2578063a22cb4651461050d576101b7565b80638da5cb5b1461040d5780638ecad7211461043857806391b7f5ed14610463576101b7565b806342842e0e116101595780636352211e116101335780636352211e1461037257806370a08231146103af578063715018a6146103ec578063853828b614610403576101b7565b806342842e0e146102f557806355f804b31461031e578063564566a814610347576101b7565b8063095ea7b311610195578063095ea7b31461026157806318160ddd1461028a57806323b872dd146102b557806334918dfd146102de576101b7565b806301ffc9a7146101bc57806306fdde03146101f9578063081812fc14610224575b600080fd5b3480156101c857600080fd5b506101e360048036038101906101de919061253c565b610674565b6040516101f09190612584565b60405180910390f35b34801561020557600080fd5b5061020e610756565b60405161021b9190612638565b60405180910390f35b34801561023057600080fd5b5061024b60048036038101906102469190612690565b6107e8565b60405161025891906126fe565b60405180910390f35b34801561026d57600080fd5b5061028860048036038101906102839190612745565b61086d565b005b34801561029657600080fd5b5061029f610985565b6040516102ac9190612794565b60405180910390f35b3480156102c157600080fd5b506102dc60048036038101906102d791906127af565b61098b565b005b3480156102ea57600080fd5b506102f36109eb565b005b34801561030157600080fd5b5061031c600480360381019061031791906127af565b610a93565b005b34801561032a57600080fd5b5061034560048036038101906103409190612937565b610ab3565b005b34801561035357600080fd5b5061035c610b49565b6040516103699190612584565b60405180910390f35b34801561037e57600080fd5b5061039960048036038101906103949190612690565b610b5c565b6040516103a691906126fe565b60405180910390f35b3480156103bb57600080fd5b506103d660048036038101906103d19190612980565b610c0e565b6040516103e39190612794565b60405180910390f35b3480156103f857600080fd5b50610401610cc6565b005b61040b610d4e565b005b34801561041957600080fd5b50610422610f59565b60405161042f91906126fe565b60405180910390f35b34801561044457600080fd5b5061044d610f83565b60405161045a9190612794565b60405180910390f35b34801561046f57600080fd5b5061048a60048036038101906104859190612690565b610f88565b005b34801561049857600080fd5b506104a161100e565b6040516104ae9190612638565b60405180910390f35b3480156104c357600080fd5b506104cc6110a0565b6040516104d99190612638565b60405180910390f35b3480156104ee57600080fd5b506104f761112e565b6040516105049190612794565b60405180910390f35b34801561051957600080fd5b50610534600480360381019061052f91906129d9565b611134565b005b34801561054257600080fd5b5061055d60048036038101906105589190612aba565b6112b5565b005b61057960048036038101906105749190612690565b611317565b005b34801561058757600080fd5b50610590611587565b60405161059d9190612638565b60405180910390f35b3480156105b257600080fd5b506105cd60048036038101906105c89190612690565b611615565b6040516105da9190612638565b60405180910390f35b3480156105ef57600080fd5b5061060a60048036038101906106059190612b3d565b6116bf565b6040516106179190612584565b60405180910390f35b34801561062c57600080fd5b5061064760048036038101906106429190612980565b611753565b005b34801561065557600080fd5b5061065e61184b565b60405161066b9190612794565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061073f57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061074f575061074e82611864565b5b9050919050565b60606000805461076590612bac565b80601f016020809104026020016040519081016040528092919081815260200182805461079190612bac565b80156107de5780601f106107b3576101008083540402835291602001916107de565b820191906000526020600020905b8154815290600101906020018083116107c157829003601f168201915b5050505050905090565b60006107f3826118ce565b610832576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082990612c50565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061087882610b5c565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e090612ce2565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661090861193a565b73ffffffffffffffffffffffffffffffffffffffff16148061093757506109368161093161193a565b6116bf565b5b610976576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096d90612d74565b60405180910390fd5b6109808383611942565b505050565b60095481565b61099c61099661193a565b826119fb565b6109db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d290612e06565b60405180910390fd5b6109e6838383611ad9565b505050565b6109f361193a565b73ffffffffffffffffffffffffffffffffffffffff16610a11610f59565b73ffffffffffffffffffffffffffffffffffffffff1614610a67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5e90612e72565b60405180910390fd5b600860009054906101000a900460ff1615600860006101000a81548160ff021916908315150217905550565b610aae838383604051806020016040528060008152506112b5565b505050565b610abb61193a565b73ffffffffffffffffffffffffffffffffffffffff16610ad9610f59565b73ffffffffffffffffffffffffffffffffffffffff1614610b2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2690612e72565b60405180910390fd5b80600b9080519060200190610b4592919061242d565b5050565b600860009054906101000a900460ff1681565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfc90612f04565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7690612f96565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610cce61193a565b73ffffffffffffffffffffffffffffffffffffffff16610cec610f59565b73ffffffffffffffffffffffffffffffffffffffff1614610d42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3990612e72565b60405180910390fd5b610d4c6000611d35565b565b610d5661193a565b73ffffffffffffffffffffffffffffffffffffffff16610d74610f59565b73ffffffffffffffffffffffffffffffffffffffff1614610dca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc190612e72565b60405180910390fd5b600047905060006064605083610de09190612fe5565b610dea919061306e565b905060006064601484610dfd9190612fe5565b610e07919061306e565b9050600073a477c13e0f86170f855d06efde32858ad9f1894173ffffffffffffffffffffffffffffffffffffffff1683604051610e43906130d0565b60006040518083038185875af1925050503d8060008114610e80576040519150601f19603f3d011682016040523d82523d6000602084013e610e85565b606091505b50509050600073233e73ff2e0369c401661c3739849bc98e20446473ffffffffffffffffffffffffffffffffffffffff1683604051610ec3906130d0565b60006040518083038185875af1925050503d8060008114610f00576040519150601f19603f3d011682016040523d82523d6000602084013e610f05565b606091505b50509050818015610f135750805b610f52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4990613131565b60405180910390fd5b5050505050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600a81565b610f9061193a565b73ffffffffffffffffffffffffffffffffffffffff16610fae610f59565b73ffffffffffffffffffffffffffffffffffffffff1614611004576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffb90612e72565b60405180910390fd5b8060078190555050565b60606001805461101d90612bac565b80601f016020809104026020016040519081016040528092919081815260200182805461104990612bac565b80156110965780601f1061106b57610100808354040283529160200191611096565b820191906000526020600020905b81548152906001019060200180831161107957829003601f168201915b5050505050905090565b600b80546110ad90612bac565b80601f01602080910402602001604051908101604052809291908181526020018280546110d990612bac565b80156111265780601f106110fb57610100808354040283529160200191611126565b820191906000526020600020905b81548152906001019060200180831161110957829003601f168201915b505050505081565b60075481565b61113c61193a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a19061319d565b60405180910390fd5b80600560006111b761193a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661126461193a565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516112a99190612584565b60405180910390a35050565b6112c66112c061193a565b836119fb565b611305576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fc90612e06565b60405180910390fd5b61131184848484611dfb565b50505050565b600860009054906101000a900460ff16611366576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135d90613209565b60405180910390fd5b600a8111156113aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a19061329b565b60405180910390fd5b600a81600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113f791906132bb565b1115611438576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142f9061335d565b60405180910390fd5b6000600954905061115c828261144e91906132bb565b111561148f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611486906133c9565b60405180910390fd5b346007548361149e9190612fe5565b11156114df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d69061345b565b60405180910390fd5b6000600190505b828111611513576115023382846114fd91906132bb565b611e57565b8061150c9061347b565b90506114e6565b5081600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461156391906132bb565b92505081905550816009600082825461157c91906132bb565b925050819055505050565b600c805461159490612bac565b80601f01602080910402602001604051908101604052809291908181526020018280546115c090612bac565b801561160d5780601f106115e25761010080835404028352916020019161160d565b820191906000526020600020905b8154815290600101906020018083116115f057829003601f168201915b505050505081565b6060611620826118ce565b61165f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165690613536565b60405180910390fd5b6000611669611e75565b9050600081511161168957604051806020016040528060008152506116b7565b8061169384611f07565b600c6040516020016116a793929190613626565b6040516020818303038152906040525b915050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61175b61193a565b73ffffffffffffffffffffffffffffffffffffffff16611779610f59565b73ffffffffffffffffffffffffffffffffffffffff16146117cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c690612e72565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561183f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611836906136c9565b60405180910390fd5b61184881611d35565b50565b61115c81565b600080823b905060008111915050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166119b583610b5c565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611a06826118ce565b611a45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3c9061375b565b60405180910390fd5b6000611a5083610b5c565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611abf57508373ffffffffffffffffffffffffffffffffffffffff16611aa7846107e8565b73ffffffffffffffffffffffffffffffffffffffff16145b80611ad05750611acf81856116bf565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611af982610b5c565b73ffffffffffffffffffffffffffffffffffffffff1614611b4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b46906137ed565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611bbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb69061387f565b60405180910390fd5b611bca838383612068565b611bd5600082611942565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611c25919061389f565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611c7c91906132bb565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611e06848484611ad9565b611e128484848461206d565b611e51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e4890613945565b60405180910390fd5b50505050565b611e71828260405180602001604052806000815250612204565b5050565b6060600b8054611e8490612bac565b80601f0160208091040260200160405190810160405280929190818152602001828054611eb090612bac565b8015611efd5780601f10611ed257610100808354040283529160200191611efd565b820191906000526020600020905b815481529060010190602001808311611ee057829003601f168201915b5050505050905090565b60606000821415611f4f576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612063565b600082905060005b60008214611f81578080611f6a9061347b565b915050600a82611f7a919061306e565b9150611f57565b60008167ffffffffffffffff811115611f9d57611f9c61280c565b5b6040519080825280601f01601f191660200182016040528015611fcf5781602001600182028036833780820191505090505b5090505b6000851461205c57600182611fe8919061389f565b9150600a85611ff79190613965565b603061200391906132bb565b60f81b81838151811061201957612018613996565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612055919061306e565b9450611fd3565b8093505050505b919050565b505050565b600061208e8473ffffffffffffffffffffffffffffffffffffffff16611851565b156121f7578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026120b761193a565b8786866040518563ffffffff1660e01b81526004016120d99493929190613a1a565b602060405180830381600087803b1580156120f357600080fd5b505af192505050801561212457506040513d601f19601f820116820180604052508101906121219190613a7b565b60015b6121a7573d8060008114612154576040519150601f19603f3d011682016040523d82523d6000602084013e612159565b606091505b5060008151141561219f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219690613945565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506121fc565b600190505b949350505050565b61220e838361225f565b61221b600084848461206d565b61225a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225190613945565b60405180910390fd5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156122cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122c690613af4565b60405180910390fd5b6122d8816118ce565b15612318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230f90613b60565b60405180910390fd5b61232460008383612068565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461237491906132bb565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b82805461243990612bac565b90600052602060002090601f01602090048101928261245b57600085556124a2565b82601f1061247457805160ff19168380011785556124a2565b828001600101855582156124a2579182015b828111156124a1578251825591602001919060010190612486565b5b5090506124af91906124b3565b5090565b5b808211156124cc5760008160009055506001016124b4565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612519816124e4565b811461252457600080fd5b50565b60008135905061253681612510565b92915050565b600060208284031215612552576125516124da565b5b600061256084828501612527565b91505092915050565b60008115159050919050565b61257e81612569565b82525050565b60006020820190506125996000830184612575565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156125d95780820151818401526020810190506125be565b838111156125e8576000848401525b50505050565b6000601f19601f8301169050919050565b600061260a8261259f565b61261481856125aa565b93506126248185602086016125bb565b61262d816125ee565b840191505092915050565b6000602082019050818103600083015261265281846125ff565b905092915050565b6000819050919050565b61266d8161265a565b811461267857600080fd5b50565b60008135905061268a81612664565b92915050565b6000602082840312156126a6576126a56124da565b5b60006126b48482850161267b565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126e8826126bd565b9050919050565b6126f8816126dd565b82525050565b600060208201905061271360008301846126ef565b92915050565b612722816126dd565b811461272d57600080fd5b50565b60008135905061273f81612719565b92915050565b6000806040838503121561275c5761275b6124da565b5b600061276a85828601612730565b925050602061277b8582860161267b565b9150509250929050565b61278e8161265a565b82525050565b60006020820190506127a96000830184612785565b92915050565b6000806000606084860312156127c8576127c76124da565b5b60006127d686828701612730565b93505060206127e786828701612730565b92505060406127f88682870161267b565b9150509250925092565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612844826125ee565b810181811067ffffffffffffffff821117156128635761286261280c565b5b80604052505050565b60006128766124d0565b9050612882828261283b565b919050565b600067ffffffffffffffff8211156128a2576128a161280c565b5b6128ab826125ee565b9050602081019050919050565b82818337600083830152505050565b60006128da6128d584612887565b61286c565b9050828152602081018484840111156128f6576128f5612807565b5b6129018482856128b8565b509392505050565b600082601f83011261291e5761291d612802565b5b813561292e8482602086016128c7565b91505092915050565b60006020828403121561294d5761294c6124da565b5b600082013567ffffffffffffffff81111561296b5761296a6124df565b5b61297784828501612909565b91505092915050565b600060208284031215612996576129956124da565b5b60006129a484828501612730565b91505092915050565b6129b681612569565b81146129c157600080fd5b50565b6000813590506129d3816129ad565b92915050565b600080604083850312156129f0576129ef6124da565b5b60006129fe85828601612730565b9250506020612a0f858286016129c4565b9150509250929050565b600067ffffffffffffffff821115612a3457612a3361280c565b5b612a3d826125ee565b9050602081019050919050565b6000612a5d612a5884612a19565b61286c565b905082815260208101848484011115612a7957612a78612807565b5b612a848482856128b8565b509392505050565b600082601f830112612aa157612aa0612802565b5b8135612ab1848260208601612a4a565b91505092915050565b60008060008060808587031215612ad457612ad36124da565b5b6000612ae287828801612730565b9450506020612af387828801612730565b9350506040612b048782880161267b565b925050606085013567ffffffffffffffff811115612b2557612b246124df565b5b612b3187828801612a8c565b91505092959194509250565b60008060408385031215612b5457612b536124da565b5b6000612b6285828601612730565b9250506020612b7385828601612730565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612bc457607f821691505b60208210811415612bd857612bd7612b7d565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000612c3a602c836125aa565b9150612c4582612bde565b604082019050919050565b60006020820190508181036000830152612c6981612c2d565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000612ccc6021836125aa565b9150612cd782612c70565b604082019050919050565b60006020820190508181036000830152612cfb81612cbf565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b6000612d5e6038836125aa565b9150612d6982612d02565b604082019050919050565b60006020820190508181036000830152612d8d81612d51565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b6000612df06031836125aa565b9150612dfb82612d94565b604082019050919050565b60006020820190508181036000830152612e1f81612de3565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612e5c6020836125aa565b9150612e6782612e26565b602082019050919050565b60006020820190508181036000830152612e8b81612e4f565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b6000612eee6029836125aa565b9150612ef982612e92565b604082019050919050565b60006020820190508181036000830152612f1d81612ee1565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000612f80602a836125aa565b9150612f8b82612f24565b604082019050919050565b60006020820190508181036000830152612faf81612f73565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612ff08261265a565b9150612ffb8361265a565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561303457613033612fb6565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006130798261265a565b91506130848361265a565b9250826130945761309361303f565b5b828204905092915050565b600081905092915050565b50565b60006130ba60008361309f565b91506130c5826130aa565b600082019050919050565b60006130db826130ad565b9150819050919050565b7f5472616e73666572206661696c65642e00000000000000000000000000000000600082015250565b600061311b6010836125aa565b9150613126826130e5565b602082019050919050565b6000602082019050818103600083015261314a8161310e565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006131876019836125aa565b915061319282613151565b602082019050919050565b600060208201905081810360008301526131b68161317a565b9050919050565b7f5468652073616c65206973207061757365642e00000000000000000000000000600082015250565b60006131f36013836125aa565b91506131fe826131bd565b602082019050919050565b60006020820190508181036000830152613222816131e6565b9050919050565b7f596f752063616e206f6e6c79206d696e742061206d6178696d756d206f66203160008201527f302042616c6c657220426561727320706572207472616e73616374696f6e2e00602082015250565b6000613285603f836125aa565b915061329082613229565b604082019050919050565b600060208201905081810360008301526132b481613278565b9050919050565b60006132c68261265a565b91506132d18361265a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561330657613305612fb6565b5b828201905092915050565b7f596f752063616e206f6e6c79206d696e74203130207065722077616c6c65742e600082015250565b60006133476020836125aa565b915061335282613311565b602082019050919050565b600060208201905081810360008301526133768161333a565b9050919050565b7f4578636565647320604d41585f544f4b454e5360000000000000000000000000600082015250565b60006133b36014836125aa565b91506133be8261337d565b602082019050919050565b600060208201905081810360008301526133e2816133a6565b9050919050565b7f496e73756666696369656e742066756e64732e20596f75206e656564206d6f7260008201527f6520455448210000000000000000000000000000000000000000000000000000602082015250565b60006134456026836125aa565b9150613450826133e9565b604082019050919050565b6000602082019050818103600083015261347481613438565b9050919050565b60006134868261265a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134b9576134b8612fb6565b5b600182019050919050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000613520602f836125aa565b915061352b826134c4565b604082019050919050565b6000602082019050818103600083015261354f81613513565b9050919050565b600081905092915050565b600061356c8261259f565b6135768185613556565b93506135868185602086016125bb565b80840191505092915050565b60008190508160005260206000209050919050565b600081546135b481612bac565b6135be8186613556565b945060018216600081146135d957600181146135ea5761361d565b60ff1983168652818601935061361d565b6135f385613592565b60005b83811015613615578154818901526001820191506020810190506135f6565b838801955050505b50505092915050565b60006136328286613561565b915061363e8285613561565b915061364a82846135a7565b9150819050949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006136b36026836125aa565b91506136be82613657565b604082019050919050565b600060208201905081810360008301526136e2816136a6565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613745602c836125aa565b9150613750826136e9565b604082019050919050565b6000602082019050818103600083015261377481613738565b9050919050565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b60006137d76029836125aa565b91506137e28261377b565b604082019050919050565b60006020820190508181036000830152613806816137ca565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006138696024836125aa565b91506138748261380d565b604082019050919050565b600060208201905081810360008301526138988161385c565b9050919050565b60006138aa8261265a565b91506138b58361265a565b9250828210156138c8576138c7612fb6565b5b828203905092915050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061392f6032836125aa565b915061393a826138d3565b604082019050919050565b6000602082019050818103600083015261395e81613922565b9050919050565b60006139708261265a565b915061397b8361265a565b92508261398b5761398a61303f565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b60006139ec826139c5565b6139f681856139d0565b9350613a068185602086016125bb565b613a0f816125ee565b840191505092915050565b6000608082019050613a2f60008301876126ef565b613a3c60208301866126ef565b613a496040830185612785565b8181036060830152613a5b81846139e1565b905095945050505050565b600081519050613a7581612510565b92915050565b600060208284031215613a9157613a906124da565b5b6000613a9f84828501613a66565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000613ade6020836125aa565b9150613ae982613aa8565b602082019050919050565b60006020820190508181036000830152613b0d81613ad1565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000613b4a601c836125aa565b9150613b5582613b14565b602082019050919050565b60006020820190508181036000830152613b7981613b3d565b905091905056fea2646970667358221220ce06c9f5f1f952aa221cffaef00356f53aaf452f67e9ffb1985599f20cc60e2d64736f6c63430008090033

Verified Source Code Full Match

Compiler: v0.8.9+commit.e5eed63a EVM: london Optimization: No
BallerBears.sol 97 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

// @title: BallerBears.sol

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";

contract BallerBears is ERC721, Ownable {
    using Strings for uint256;

    uint256 public constant MAX_TOKENS = 4444;
    uint256 private constant TOKENS_RESERVED = 20;
    uint256 public price = 80000000000000000;
    uint256 public constant MAX_MINT_PER_TX = 10;

    bool public isSaleActive;
    uint256 public totalSupply;
    mapping(address => uint256) private mintedPerWallet;

    string public baseUri;
    string public baseExtension = ".json";

    constructor() ERC721("Baller Bears", "BEARS") {
        // Base IPFS URI of the Baller Bears
        baseUri = "ipfs://Qmb1WNzRZ6jcSzFpa8zSDA7bqkjGAgUPV9AE3uSdWRbMzt/";
        for (uint256 i = 1; i <= TOKENS_RESERVED; ++i) {
            _safeMint(msg.sender, i);
        }
        totalSupply = TOKENS_RESERVED;
    }

    // PUBLIC FUNCTIONS
    function mintBear(uint256 _numTokens) external payable {
        require(isSaleActive, "The sale is paused.");
        require(_numTokens <= MAX_MINT_PER_TX, "You can only mint a maximum of 10 Baller Bears per transaction.");
        require(mintedPerWallet[msg.sender] + _numTokens <= 10, "You can only mint 10 per wallet.");
        uint256 curTotalSupply = totalSupply;
        require(curTotalSupply + _numTokens <= MAX_TOKENS, "Exceeds `MAX_TOKENS`");
        require(_numTokens * price <= msg.value, "Insufficient funds. You need more ETH!");

        for (uint256 i = 1; i <= _numTokens; ++i) {
            _safeMint(msg.sender, curTotalSupply + i);
        }
        mintedPerWallet[msg.sender] += _numTokens;
        totalSupply += _numTokens;
    }

    // OWNER ONLY FUNCTIONS
    function flipSaleState() external onlyOwner {
        isSaleActive = !isSaleActive;
    }

    function setBaseURI(string memory _baseUri) external onlyOwner {
        baseUri = _baseUri;
    }

    function setPrice(uint256 _price) external onlyOwner {
        price = _price;
    }

    function withdrawAll() external payable onlyOwner {
        uint256 balance = address(this).balance;
        uint256 balanceOne = balance * 80 / 100;
        uint256 balanceTwo = balance * 20 / 100;
        (bool transferOne, ) = payable(0xA477c13E0f86170F855d06EFDE32858ad9f18941).call{value: balanceOne}("");
        (bool transferTwo, ) = payable(0x233E73Ff2e0369C401661C3739849Bc98E204464).call{value: balanceTwo}("");
        require(transferOne && transferTwo, "Transfer failed.");
    }


    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(), baseExtension))
            : "";
  }


    // INTERNAL FUNCTIONS
    function _baseURI() internal view virtual override returns (string memory) {
        return baseUri;
    }

}
Address.sol 216 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
Context.sol 23 lines
// SPDX-License-Identifier: MIT

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 66 lines
// SPDX-License-Identifier: MIT

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 71 lines
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
ERC721.sol 411 lines
// SPDX-License-Identifier: MIT

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 {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}
IERC721.sol 142 lines
// SPDX-License-Identifier: MIT

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 28 lines
// SPDX-License-Identifier: MIT

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 24 lines
// SPDX-License-Identifier: MIT

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 26 lines
// SPDX-License-Identifier: MIT

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 26 lines
// SPDX-License-Identifier: MIT

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_TOKENS 0xf47c84c5 → uint256
balanceOf 0x70a08231 → uint256
baseExtension 0xc6682862 → string
baseUri 0x9abc8320 → string
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isSaleActive 0x564566a8 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
price 0xa035b1fe → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256

Write Contract 12 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address to
uint256 tokenId
flipSaleState 0x34918dfd
No parameters
mintBear 0xc358575c
uint256 _numTokens
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string _baseUri
setPrice 0x91b7f5ed
uint256 _price
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdrawAll 0x853828b6
No parameters

Recent Transactions

No transactions found for this address