Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x74250Ca1f7EA897DE8e6c3610C126557eB541b86
Balance 0 ETH
Nonce 1
Code Size 19708 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

19708 bytes
0x6080604052600436106101ee5760003560e01c806370a082311161010d578063b88d4fde116100a0578063de836ebd1161006f578063de836ebd146106b6578063e985e9c5146106df578063eb8d24441461071c578063eeda2be714610747578063f2fde38b14610770576101ee565b8063b88d4fde1461060b578063b9c1939514610634578063c5dbe1f014610650578063c87b56dd14610679576101ee565b806391b7f5ed116100dc57806391b7f5ed1461056557806395d89b411461058e578063a22cb465146105b9578063a88dcae4146105e2576101ee565b806370a08231146104bb578063715018a6146104f8578063800005ac1461050f5780638da5cb5b1461053a576101ee565b806323b872dd1161018557806342842e0e1161015457806342842e0e1461040157806355f804b31461042a5780635e59409a146104535780636352211e1461047e576101ee565b806323b872dd1461035a5780632a55205a146103835780633ccfd60b146103c15780634209a2e1146103d8576101ee565b8063095ea7b3116101c1578063095ea7b3146102c1578063162094c4146102ea57806318160ddd146103135780631a9283ad1461033e576101ee565b806301ffc9a7146101f357806302c889891461023057806306fdde0314610259578063081812fc14610284575b600080fd5b3480156101ff57600080fd5b5061021a6004803603810190610215919061311d565b610799565b6040516102279190613165565b60405180910390f35b34801561023c57600080fd5b50610257600480360381019061025291906131ac565b610813565b005b34801561026557600080fd5b5061026e6108ac565b60405161027b9190613272565b60405180910390f35b34801561029057600080fd5b506102ab60048036038101906102a691906132ca565b61093e565b6040516102b89190613338565b60405180910390f35b3480156102cd57600080fd5b506102e860048036038101906102e3919061337f565b6109c3565b005b3480156102f657600080fd5b50610311600480360381019061030c91906134f4565b610adb565b005b34801561031f57600080fd5b50610328610bcb565b604051610335919061355f565b60405180910390f35b610358600480360381019061035391906136bb565b610bdc565b005b34801561036657600080fd5b50610381600480360381019061037c9190613737565b610f8a565b005b34801561038f57600080fd5b506103aa60048036038101906103a5919061378a565b610fea565b6040516103b89291906137ca565b60405180910390f35b3480156103cd57600080fd5b506103d6611014565b005b3480156103e457600080fd5b506103ff60048036038101906103fa91906132ca565b611090565b005b34801561040d57600080fd5b5061042860048036038101906104239190613737565b611116565b005b34801561043657600080fd5b50610451600480360381019061044c91906137f3565b611136565b005b34801561045f57600080fd5b506104686111cc565b6040516104759190613165565b60405180910390f35b34801561048a57600080fd5b506104a560048036038101906104a091906132ca565b6111df565b6040516104b29190613338565b60405180910390f35b3480156104c757600080fd5b506104e260048036038101906104dd919061383c565b611291565b6040516104ef919061355f565b60405180910390f35b34801561050457600080fd5b5061050d611349565b005b34801561051b57600080fd5b506105246113d1565b6040516105319190613165565b60405180910390f35b34801561054657600080fd5b5061054f6113e4565b60405161055c9190613338565b60405180910390f35b34801561057157600080fd5b5061058c600480360381019061058791906132ca565b61140e565b005b34801561059a57600080fd5b506105a3611494565b6040516105b09190613272565b60405180910390f35b3480156105c557600080fd5b506105e060048036038101906105db9190613869565b611526565b005b3480156105ee57600080fd5b50610609600480360381019061060491906137f3565b61153c565b005b34801561061757600080fd5b50610632600480360381019061062d919061394a565b6115d2565b005b61064e600480360381019061064991906139cd565b611634565b005b34801561065c57600080fd5b50610677600480360381019061067291906131ac565b6119be565b005b34801561068557600080fd5b506106a0600480360381019061069b91906132ca565b611a57565b6040516106ad9190613272565b60405180910390f35b3480156106c257600080fd5b506106dd60048036038101906106d89190613a1a565b611b88565b005b3480156106eb57600080fd5b5061070660048036038101906107019190613a7a565b611e0d565b6040516107139190613165565b60405180910390f35b34801561072857600080fd5b50610731611ea1565b60405161073e9190613165565b60405180910390f35b34801561075357600080fd5b5061076e600480360381019061076991906131ac565b611eb4565b005b34801561077c57600080fd5b506107976004803603810190610792919061383c565b611f4d565b005b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061080c575061080b82612045565b5b9050919050565b61081b612127565b73ffffffffffffffffffffffffffffffffffffffff166108396113e4565b73ffffffffffffffffffffffffffffffffffffffff161461088f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088690613b06565b60405180910390fd5b80600f60016101000a81548160ff02191690831515021790555050565b6060600080546108bb90613b55565b80601f01602080910402602001604051908101604052809291908181526020018280546108e790613b55565b80156109345780601f1061090957610100808354040283529160200191610934565b820191906000526020600020905b81548152906001019060200180831161091757829003601f168201915b5050505050905090565b60006109498261212f565b610988576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097f90613bf9565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006109ce826111df565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3690613c8b565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610a5e612127565b73ffffffffffffffffffffffffffffffffffffffff161480610a8d5750610a8c81610a87612127565b611e0d565b5b610acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac390613d1d565b60405180910390fd5b610ad6838361219b565b505050565b610ae3612127565b73ffffffffffffffffffffffffffffffffffffffff16610b016113e4565b73ffffffffffffffffffffffffffffffffffffffff1614610b57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4e90613b06565b60405180910390fd5b610b608261212f565b610b9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9690613daf565b60405180910390fd5b80600e60008481526020019081526020016000209080519060200190610bc692919061300e565b505050565b6000610bd76008612254565b905090565b60026006541415610c22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1990613e1b565b60405180910390fd5b600260068190555082826000828290509050600f60019054906101000a900460ff16610c83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7a90613e87565b60405180910390fd5b61272b600182610c91610bcb565b610c9b9190613ed6565b610ca59190613f2c565b10610ce5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdc90613fac565b60405180910390fd5b600d54811115610d2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2190614018565b60405180910390fd5b6000868690509050600f60009054906101000a900460ff16610d81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7890614084565b60405180910390fd5b80600b54610d8f91906140a4565b341015610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc89061414a565b60405180910390fd5b60007f00000000000000000000000079fcdef22feed20eddacbb2587640e45491b757f905060005b82811015610f77576000898983818110610e1657610e1561416a565b5b905060200201359050600f60029054906101000a900460ff1615610f2b573373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610e84919061355f565b60206040518083038186803b158015610e9c57600080fd5b505afa158015610eb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed491906141ae565b73ffffffffffffffffffffffffffffffffffffffff1614610f2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2190614227565b60405180910390fd5b5b610f353382612262565b610f5981898481518110610f4c57610f4b61416a565b5b602002602001015161243c565b610f636008612468565b508080610f6f90614247565b915050610df9565b5050505050506001600681905550505050565b610f9b610f95612127565b8261247e565b610fda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd190614302565b60405180910390fd5b610fe583838361255c565b505050565b60008030612710600c5485610fff91906140a4565b6110099190614351565b915091509250929050565b6002600654141561105a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105190613e1b565b60405180910390fd5b6002600681905550600047905061108573ffb99aab5e7b7b9507df1979300a52034c1c60cc826127c3565b506001600681905550565b611098612127565b73ffffffffffffffffffffffffffffffffffffffff166110b66113e4565b73ffffffffffffffffffffffffffffffffffffffff161461110c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110390613b06565b60405180910390fd5b80600c8190555050565b611131838383604051806020016040528060008152506115d2565b505050565b61113e612127565b73ffffffffffffffffffffffffffffffffffffffff1661115c6113e4565b73ffffffffffffffffffffffffffffffffffffffff16146111b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a990613b06565b60405180910390fd5b80600990805190602001906111c892919061300e565b5050565b600f60029054906101000a900460ff1681565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611288576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127f906143f4565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611302576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f990614486565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611351612127565b73ffffffffffffffffffffffffffffffffffffffff1661136f6113e4565b73ffffffffffffffffffffffffffffffffffffffff16146113c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bc90613b06565b60405180910390fd5b6113cf60006128b7565b565b600f60009054906101000a900460ff1681565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611416612127565b73ffffffffffffffffffffffffffffffffffffffff166114346113e4565b73ffffffffffffffffffffffffffffffffffffffff161461148a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148190613b06565b60405180910390fd5b80600b8190555050565b6060600180546114a390613b55565b80601f01602080910402602001604051908101604052809291908181526020018280546114cf90613b55565b801561151c5780601f106114f15761010080835404028352916020019161151c565b820191906000526020600020905b8154815290600101906020018083116114ff57829003601f168201915b5050505050905090565b611538611531612127565b838361297d565b5050565b611544612127565b73ffffffffffffffffffffffffffffffffffffffff166115626113e4565b73ffffffffffffffffffffffffffffffffffffffff16146115b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115af90613b06565b60405180910390fd5b80600a90805190602001906115ce92919061300e565b5050565b6115e36115dd612127565b8361247e565b611622576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161990614302565b60405180910390fd5b61162e84848484612aea565b50505050565b6002600654141561167a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167190613e1b565b60405180910390fd5b600260068190555081816000828290509050600f60019054906101000a900460ff166116db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d290613e87565b60405180910390fd5b61272b6001826116e9610bcb565b6116f39190613ed6565b6116fd9190613f2c565b1061173d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173490613fac565b60405180910390fd5b600d54811115611782576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177990614018565b60405180910390fd5b6000858590509050600f60009054906101000a900460ff16156117da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d190614084565b60405180910390fd5b80600b546117e891906140a4565b34101561182a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118219061414a565b60405180910390fd5b60007f00000000000000000000000079fcdef22feed20eddacbb2587640e45491b757f905060005b828110156119ac57600088888381811061186f5761186e61416a565b5b905060200201359050600f60029054906101000a900460ff1615611984573373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016118dd919061355f565b60206040518083038186803b1580156118f557600080fd5b505afa158015611909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192d91906141ae565b73ffffffffffffffffffffffffffffffffffffffff1614611983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197a90614227565b60405180910390fd5b5b61198e3382612262565b6119986008612468565b5080806119a490614247565b915050611852565b50505050505060016006819055505050565b6119c6612127565b73ffffffffffffffffffffffffffffffffffffffff166119e46113e4565b73ffffffffffffffffffffffffffffffffffffffff1614611a3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3190613b06565b60405180910390fd5b80600f60006101000a81548160ff02191690831515021790555050565b6060611a628261212f565b611aa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9890614518565b60405180910390fd5b6000600e60008481526020019081526020016000208054611ac190613b55565b80601f0160208091040260200160405190810160405280929190818152602001828054611aed90613b55565b8015611b3a5780601f10611b0f57610100808354040283529160200191611b3a565b820191906000526020600020905b815481529060010190602001808311611b1d57829003601f168201915b50505050509050600081511115611b545780915050611b83565b611b5d83612b46565b600a604051602001611b70929190614608565b6040516020818303038152906040529150505b919050565b611b90612127565b73ffffffffffffffffffffffffffffffffffffffff16611bae6113e4565b73ffffffffffffffffffffffffffffffffffffffff1614611c04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bfb90613b06565b60405180910390fd5b60026006541415611c4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4190613e1b565b60405180910390fd5b600260068190555081816000828290509050600f60019054906101000a900460ff16611cab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca290613e87565b60405180910390fd5b61272b600182611cb9610bcb565b611cc39190613ed6565b611ccd9190613f2c565b10611d0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d0490613fac565b60405180910390fd5b600d54811115611d52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4990614018565b60405180910390fd5b6000858590509050600f60009054906101000a900460ff1615611daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da190614084565b60405180910390fd5b60005b81811015611dfb576000878783818110611dca57611dc961416a565b5b905060200201359050611ddd8982612262565b611de76008612468565b508080611df390614247565b915050611dad565b50505050506001600681905550505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600f60019054906101000a900460ff1681565b611ebc612127565b73ffffffffffffffffffffffffffffffffffffffff16611eda6113e4565b73ffffffffffffffffffffffffffffffffffffffff1614611f30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2790613b06565b60405180910390fd5b80600f60026101000a81548160ff02191690831515021790555050565b611f55612127565b73ffffffffffffffffffffffffffffffffffffffff16611f736113e4565b73ffffffffffffffffffffffffffffffffffffffff1614611fc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fc090613b06565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612039576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120309061469e565b60405180910390fd5b612042816128b7565b50565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061211057507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612120575061211f82612bed565b5b9050919050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661220e836111df565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081600001549050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156122d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122c99061470a565b60405180910390fd5b6122db8161212f565b1561231b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161231290614776565b60405180910390fd5b61232760008383612c57565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546123779190613ed6565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461243860008383612c5c565b5050565b80600e6000848152602001908152602001600020908051906020019061246392919061300e565b505050565b6001816000016000828254019250508190555050565b60006124898261212f565b6124c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bf90614808565b60405180910390fd5b60006124d3836111df565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061254257508373ffffffffffffffffffffffffffffffffffffffff1661252a8461093e565b73ffffffffffffffffffffffffffffffffffffffff16145b8061255357506125528185611e0d565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661257c826111df565b73ffffffffffffffffffffffffffffffffffffffff16146125d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125c99061489a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612642576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126399061492c565b60405180910390fd5b61264d838383612c57565b61265860008261219b565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126a89190613f2c565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126ff9190613ed6565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46127be838383612c5c565b505050565b80471015612806576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127fd90614998565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161282c906149e9565b60006040518083038185875af1925050503d8060008114612869576040519150601f19603f3d011682016040523d82523d6000602084013e61286e565b606091505b50509050806128b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128a990614a70565b60405180910390fd5b505050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156129ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129e390614adc565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612add9190613165565b60405180910390a3505050565b612af584848461255c565b612b0184848484612c61565b612b40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3790614b6e565b60405180910390fd5b50505050565b6060612b518261212f565b612b90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b8790614518565b60405180910390fd5b6000612b9a612df8565b90506000815111612bba5760405180602001604052806000815250612be5565b80612bc484612e8a565b604051602001612bd5929190614b8e565b6040516020818303038152906040525b915050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050565b505050565b6000612c828473ffffffffffffffffffffffffffffffffffffffff16612feb565b15612deb578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612cab612127565b8786866040518563ffffffff1660e01b8152600401612ccd9493929190614c07565b602060405180830381600087803b158015612ce757600080fd5b505af1925050508015612d1857506040513d601f19601f82011682018060405250810190612d159190614c68565b60015b612d9b573d8060008114612d48576040519150601f19603f3d011682016040523d82523d6000602084013e612d4d565b606091505b50600081511415612d93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d8a90614b6e565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612df0565b600190505b949350505050565b606060098054612e0790613b55565b80601f0160208091040260200160405190810160405280929190818152602001828054612e3390613b55565b8015612e805780601f10612e5557610100808354040283529160200191612e80565b820191906000526020600020905b815481529060010190602001808311612e6357829003601f168201915b5050505050905090565b60606000821415612ed2576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612fe6565b600082905060005b60008214612f04578080612eed90614247565b915050600a82612efd9190614351565b9150612eda565b60008167ffffffffffffffff811115612f2057612f1f6133c9565b5b6040519080825280601f01601f191660200182016040528015612f525781602001600182028036833780820191505090505b5090505b60008514612fdf57600182612f6b9190613f2c565b9150600a85612f7a9190614c95565b6030612f869190613ed6565b60f81b818381518110612f9c57612f9b61416a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612fd89190614351565b9450612f56565b8093505050505b919050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b82805461301a90613b55565b90600052602060002090601f01602090048101928261303c5760008555613083565b82601f1061305557805160ff1916838001178555613083565b82800160010185558215613083579182015b82811115613082578251825591602001919060010190613067565b5b5090506130909190613094565b5090565b5b808211156130ad576000816000905550600101613095565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6130fa816130c5565b811461310557600080fd5b50565b600081359050613117816130f1565b92915050565b600060208284031215613133576131326130bb565b5b600061314184828501613108565b91505092915050565b60008115159050919050565b61315f8161314a565b82525050565b600060208201905061317a6000830184613156565b92915050565b6131898161314a565b811461319457600080fd5b50565b6000813590506131a681613180565b92915050565b6000602082840312156131c2576131c16130bb565b5b60006131d084828501613197565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156132135780820151818401526020810190506131f8565b83811115613222576000848401525b50505050565b6000601f19601f8301169050919050565b6000613244826131d9565b61324e81856131e4565b935061325e8185602086016131f5565b61326781613228565b840191505092915050565b6000602082019050818103600083015261328c8184613239565b905092915050565b6000819050919050565b6132a781613294565b81146132b257600080fd5b50565b6000813590506132c48161329e565b92915050565b6000602082840312156132e0576132df6130bb565b5b60006132ee848285016132b5565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613322826132f7565b9050919050565b61333281613317565b82525050565b600060208201905061334d6000830184613329565b92915050565b61335c81613317565b811461336757600080fd5b50565b60008135905061337981613353565b92915050565b60008060408385031215613396576133956130bb565b5b60006133a48582860161336a565b92505060206133b5858286016132b5565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61340182613228565b810181811067ffffffffffffffff821117156134205761341f6133c9565b5b80604052505050565b60006134336130b1565b905061343f82826133f8565b919050565b600067ffffffffffffffff82111561345f5761345e6133c9565b5b61346882613228565b9050602081019050919050565b82818337600083830152505050565b600061349761349284613444565b613429565b9050828152602081018484840111156134b3576134b26133c4565b5b6134be848285613475565b509392505050565b600082601f8301126134db576134da6133bf565b5b81356134eb848260208601613484565b91505092915050565b6000806040838503121561350b5761350a6130bb565b5b6000613519858286016132b5565b925050602083013567ffffffffffffffff81111561353a576135396130c0565b5b613546858286016134c6565b9150509250929050565b61355981613294565b82525050565b60006020820190506135746000830184613550565b92915050565b600080fd5b600080fd5b60008083601f84011261359a576135996133bf565b5b8235905067ffffffffffffffff8111156135b7576135b661357a565b5b6020830191508360208202830111156135d3576135d261357f565b5b9250929050565b600067ffffffffffffffff8211156135f5576135f46133c9565b5b602082029050602081019050919050565b6000613619613614846135da565b613429565b9050808382526020820190506020840283018581111561363c5761363b61357f565b5b835b8181101561368357803567ffffffffffffffff811115613661576136606133bf565b5b80860161366e89826134c6565b8552602085019450505060208101905061363e565b5050509392505050565b600082601f8301126136a2576136a16133bf565b5b81356136b2848260208601613606565b91505092915050565b6000806000604084860312156136d4576136d36130bb565b5b600084013567ffffffffffffffff8111156136f2576136f16130c0565b5b6136fe86828701613584565b9350935050602084013567ffffffffffffffff811115613721576137206130c0565b5b61372d8682870161368d565b9150509250925092565b6000806000606084860312156137505761374f6130bb565b5b600061375e8682870161336a565b935050602061376f8682870161336a565b9250506040613780868287016132b5565b9150509250925092565b600080604083850312156137a1576137a06130bb565b5b60006137af858286016132b5565b92505060206137c0858286016132b5565b9150509250929050565b60006040820190506137df6000830185613329565b6137ec6020830184613550565b9392505050565b600060208284031215613809576138086130bb565b5b600082013567ffffffffffffffff811115613827576138266130c0565b5b613833848285016134c6565b91505092915050565b600060208284031215613852576138516130bb565b5b60006138608482850161336a565b91505092915050565b600080604083850312156138805761387f6130bb565b5b600061388e8582860161336a565b925050602061389f85828601613197565b9150509250929050565b600067ffffffffffffffff8211156138c4576138c36133c9565b5b6138cd82613228565b9050602081019050919050565b60006138ed6138e8846138a9565b613429565b905082815260208101848484011115613909576139086133c4565b5b613914848285613475565b509392505050565b600082601f830112613931576139306133bf565b5b81356139418482602086016138da565b91505092915050565b60008060008060808587031215613964576139636130bb565b5b60006139728782880161336a565b94505060206139838782880161336a565b9350506040613994878288016132b5565b925050606085013567ffffffffffffffff8111156139b5576139b46130c0565b5b6139c18782880161391c565b91505092959194509250565b600080602083850312156139e4576139e36130bb565b5b600083013567ffffffffffffffff811115613a0257613a016130c0565b5b613a0e85828601613584565b92509250509250929050565b600080600060408486031215613a3357613a326130bb565b5b6000613a418682870161336a565b935050602084013567ffffffffffffffff811115613a6257613a616130c0565b5b613a6e86828701613584565b92509250509250925092565b60008060408385031215613a9157613a906130bb565b5b6000613a9f8582860161336a565b9250506020613ab08582860161336a565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613af06020836131e4565b9150613afb82613aba565b602082019050919050565b60006020820190508181036000830152613b1f81613ae3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613b6d57607f821691505b60208210811415613b8157613b80613b26565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613be3602c836131e4565b9150613bee82613b87565b604082019050919050565b60006020820190508181036000830152613c1281613bd6565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000613c756021836131e4565b9150613c8082613c19565b604082019050919050565b60006020820190508181036000830152613ca481613c68565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b6000613d076038836131e4565b9150613d1282613cab565b604082019050919050565b60006020820190508181036000830152613d3681613cfa565b9050919050565b7f4552433732314d657461646174613a2055524920736574206f66206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613d99602c836131e4565b9150613da482613d3d565b604082019050919050565b60006020820190508181036000830152613dc881613d8c565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613e05601f836131e4565b9150613e1082613dcf565b602082019050919050565b60006020820190508181036000830152613e3481613df8565b9050919050565b7f546865206c6162206973206e6f74206f70656e00000000000000000000000000600082015250565b6000613e716013836131e4565b9150613e7c82613e3b565b602082019050919050565b60006020820190508181036000830152613ea081613e64565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613ee182613294565b9150613eec83613294565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f2157613f20613ea7565b5b828201905092915050565b6000613f3782613294565b9150613f4283613294565b925082821015613f5557613f54613ea7565b5b828203905092915050565b7f45786365656473206d617820737570706c790000000000000000000000000000600082015250565b6000613f966012836131e4565b9150613fa182613f60565b602082019050919050565b60006020820190508181036000830152613fc581613f89565b9050919050565b7f4d7574617465206174206d6f73742035206d6665727320617420612074696d65600082015250565b60006140026020836131e4565b915061400d82613fcc565b602082019050919050565b6000602082019050818103600083015261403181613ff5565b9050919050565b7f596f752063616e2774206d757461746520746869732077617900000000000000600082015250565b600061406e6019836131e4565b915061407982614038565b602082019050919050565b6000602082019050818103600083015261409d81614061565b9050919050565b60006140af82613294565b91506140ba83613294565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156140f3576140f2613ea7565b5b828202905092915050565b7f496e73756666696369656e74207061796d656e74000000000000000000000000600082015250565b60006141346014836131e4565b915061413f826140fe565b602082019050919050565b6000602082019050818103600083015261416381614127565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000815190506141a881613353565b92915050565b6000602082840312156141c4576141c36130bb565b5b60006141d284828501614199565b91505092915050565b7f4d666572206e6f74206f776e6564000000000000000000000000000000000000600082015250565b6000614211600e836131e4565b915061421c826141db565b602082019050919050565b6000602082019050818103600083015261424081614204565b9050919050565b600061425282613294565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561428557614284613ea7565b5b600182019050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b60006142ec6031836131e4565b91506142f782614290565b604082019050919050565b6000602082019050818103600083015261431b816142df565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061435c82613294565b915061436783613294565b92508261437757614376614322565b5b828204905092915050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b60006143de6029836131e4565b91506143e982614382565b604082019050919050565b6000602082019050818103600083015261440d816143d1565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000614470602a836131e4565b915061447b82614414565b604082019050919050565b6000602082019050818103600083015261449f81614463565b9050919050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000614502602f836131e4565b915061450d826144a6565b604082019050919050565b60006020820190508181036000830152614531816144f5565b9050919050565b600081905092915050565b600061454e826131d9565b6145588185614538565b93506145688185602086016131f5565b80840191505092915050565b60008190508160005260206000209050919050565b6000815461459681613b55565b6145a08186614538565b945060018216600081146145bb57600181146145cc576145ff565b60ff198316865281860193506145ff565b6145d585614574565b60005b838110156145f7578154818901526001820191506020810190506145d8565b838801955050505b50505092915050565b60006146148285614543565b91506146208284614589565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006146886026836131e4565b91506146938261462c565b604082019050919050565b600060208201905081810360008301526146b78161467b565b9050919050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b60006146f46020836131e4565b91506146ff826146be565b602082019050919050565b60006020820190508181036000830152614723816146e7565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000614760601c836131e4565b915061476b8261472a565b602082019050919050565b6000602082019050818103600083015261478f81614753565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b60006147f2602c836131e4565b91506147fd82614796565b604082019050919050565b60006020820190508181036000830152614821816147e5565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b60006148846025836131e4565b915061488f82614828565b604082019050919050565b600060208201905081810360008301526148b381614877565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006149166024836131e4565b9150614921826148ba565b604082019050919050565b6000602082019050818103600083015261494581614909565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b6000614982601d836131e4565b915061498d8261494c565b602082019050919050565b600060208201905081810360008301526149b181614975565b9050919050565b600081905092915050565b50565b60006149d36000836149b8565b91506149de826149c3565b600082019050919050565b60006149f4826149c6565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000614a5a603a836131e4565b9150614a65826149fe565b604082019050919050565b60006020820190508181036000830152614a8981614a4d565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000614ac66019836131e4565b9150614ad182614a90565b602082019050919050565b60006020820190508181036000830152614af581614ab9565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000614b586032836131e4565b9150614b6382614afc565b604082019050919050565b60006020820190508181036000830152614b8781614b4b565b9050919050565b6000614b9a8285614543565b9150614ba68284614543565b91508190509392505050565b600081519050919050565b600082825260208201905092915050565b6000614bd982614bb2565b614be38185614bbd565b9350614bf38185602086016131f5565b614bfc81613228565b840191505092915050565b6000608082019050614c1c6000830187613329565b614c296020830186613329565b614c366040830185613550565b8181036060830152614c488184614bce565b905095945050505050565b600081519050614c62816130f1565b92915050565b600060208284031215614c7e57614c7d6130bb565b5b6000614c8c84828501614c53565b91505092915050565b6000614ca082613294565b9150614cab83613294565b925082614cbb57614cba614322565b5b82820690509291505056fea26469706673582212209fe0cc25d9b577f5b17a960d7ad8b8f0359f5421eb24be6e8f882cdb85702f2d64736f6c63430008090033

Verified Source Code Full Match

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

/*

 ███▄ ▄███▓ █    ██ ▄▄▄█████▓ ▄▄▄       ███▄    █ ▄▄▄█████▓    ███▄ ▄███▓  █████▒▓█████  ██▀███    ██████ 
▓██▒▀█▀ ██▒ ██  ▓██▒▓  ██▒ ▓▒▒████▄     ██ ▀█   █ ▓  ██▒ ▓▒   ▓██▒▀█▀ ██▒▓██   ▒ ▓█   ▀ ▓██ ▒ ██▒▒██    ▒ 
▓██    ▓██░▓██  ▒██░▒ ▓██░ ▒░▒██  ▀█▄  ▓██  ▀█ ██▒▒ ▓██░ ▒░   ▓██    ▓██░▒████ ░ ▒███   ▓██ ░▄█ ▒░ ▓██▄   
▒██    ▒██ ▓▓█  ░██░░ ▓██▓ ░ ░██▄▄▄▄██ ▓██▒  ▐▌██▒░ ▓██▓ ░    ▒██    ▒██ ░▓█▒  ░ ▒▓█  ▄ ▒██▀▀█▄    ▒   ██▒
▒██▒   ░██▒▒▒█████▓   ▒██▒ ░  ▓█   ▓██▒▒██░   ▓██░  ▒██▒ ░    ▒██▒   ░██▒░▒█░    ░▒████▒░██▓ ▒██▒▒██████▒▒
░ ▒░   ░  ░░▒▓▒ ▒ ▒   ▒ ░░    ▒▒   ▓▒█░░ ▒░   ▒ ▒   ▒ ░░      ░ ▒░   ░  ░ ▒ ░    ░░ ▒░ ░░ ▒▓ ░▒▓░▒ ▒▓▒ ▒ ░
░  ░      ░░░▒░ ░ ░     ░      ▒   ▒▒ ░░ ░░   ░ ▒░    ░       ░  ░      ░ ░       ░ ░  ░  ░▒ ░ ▒░░ ░▒  ░ ░
░      ░    ░░░ ░ ░   ░        ░   ▒      ░   ░ ░   ░         ░      ░    ░ ░       ░     ░░   ░ ░  ░  ░  
       ░      ░                    ░  ░         ░                    ░              ░  ░   ░           ░  
                                                                                                          
*/

pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Address.sol";

contract MutantMfers is ERC721, IERC2981, ReentrancyGuard, Ownable {
  using Counters for Counters.Counter;
  Counters.Counter private supplyCounter;

  string private customBaseURI = "https://api.mutantmfers.art/mutant/";
  string private customURIExt = "";

  uint256 private price = 26900000000000000;
  uint256 private royalty = 500;
  uint256 private constant MAX_SUPPLY = 10027;
  uint256 private MAX_MULTIMINT = 5;

  address private immutable accessTokenAddress = 0x79FCDEF22feeD20eDDacbB2587640e45491b757f;

  constructor() ERC721("MutantMfers", "MMFERS") {}

  /** URI HANDLING **/

  mapping(uint256 => string) private tokenURIMap;

  function setTokenURIMint(uint256 tokenId, string memory tokenURI_) private
  {
    tokenURIMap[tokenId] = tokenURI_;
  }
  
  function setTokenURI(uint256 tokenId, string memory tokenURI_) external onlyOwner
  {
    require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
    tokenURIMap[tokenId] = tokenURI_;
  }

  function setBaseURI(string memory customBaseURI_) external onlyOwner {
    customBaseURI = customBaseURI_;
  }

  function setURIExt(string memory customURIExt_) external onlyOwner {
    customURIExt = customURIExt_;
  }

  function _baseURI() internal view virtual override returns (string memory) {
    return customBaseURI;
  }

  function tokenURI(uint256 tokenId) public view override
    returns (string memory)
  {
    require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
    string memory tokenURI_ = tokenURIMap[tokenId];
    if (bytes(tokenURI_).length > 0) {
      return tokenURI_;
    }
    return string(abi.encodePacked(super.tokenURI(tokenId), customURIExt));
  }

  /** MINTING **/

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

  bool public metaMigrated = false;
  function setMetaMigrated(bool metaMigrated_) external onlyOwner {
    metaMigrated = metaMigrated_;
  }

  modifier mintCompliance(uint256[] calldata ids) {
    uint256 count = ids.length;
    require(saleIsActive, "The lab is not open");
    require(totalSupply() + count - 1 < MAX_SUPPLY, "Exceeds max supply");
    require(count <= MAX_MULTIMINT, "Mutate at most 5 mfers at a time");
    _;
  }

  function mint(address _recipient, uint256[] calldata ids) external onlyOwner nonReentrant mintCompliance(ids)	{
		uint256 count = ids.length;
    require(!metaMigrated, "You can't mutate this way");  
    for (uint256 i = 0; i < count; i++) {
      uint256 id = ids[i];
      _mint(_recipient, id);
      supplyCounter.increment();
    }
  }

  function mutate(uint256[] calldata ids) public payable nonReentrant mintCompliance(ids) {
    uint256 count = ids.length;
    require(!metaMigrated, "You can't mutate this way");
    require(msg.value >= price * count, "Insufficient payment");
    ERC721 accessToken = ERC721(accessTokenAddress);
    for (uint256 i = 0; i < count; i++) {
      uint256 id = ids[i];
      if (accessTokenIsActive) {
        require(
          accessToken.ownerOf(id) == msg.sender,
          "Mfer not owned"
        );
      }
      _mint(msg.sender, id);
      supplyCounter.increment();
    }
  }

  function mutate2(uint256[] calldata ids, string[] memory syringeHash) public payable nonReentrant mintCompliance(ids) {
    uint256 count = ids.length;
    require(metaMigrated, "You can't mutate this way");
    require(msg.value >= price * count, "Insufficient payment");
    ERC721 accessToken = ERC721(accessTokenAddress);
    for (uint256 i = 0; i < count; i++) {
      uint256 id = ids[i];
      if (accessTokenIsActive) {
        require(
          accessToken.ownerOf(id) == msg.sender,
          "Mfer not owned"
        );
      }
      _mint(msg.sender, id);
      setTokenURIMint(id, syringeHash[i]);
      supplyCounter.increment();
    }
  }

  function totalSupply() public view returns (uint256) {
    return supplyCounter.current();
  }

  /** ACTIVATION **/

  bool public saleIsActive = false;
  function setSaleIsActive(bool saleIsActive_) external onlyOwner {
    saleIsActive = saleIsActive_;
  }

  bool public accessTokenIsActive = true;
  function setAccessTokenIsActive(bool accessTokenIsActive_) external onlyOwner
  {
    accessTokenIsActive = accessTokenIsActive_;
  }

  /** PAYOUT **/

  address private constant payoutAddress1 =
    0xffB99aaB5E7B7B9507Df1979300a52034C1c60Cc;

  function withdraw() public nonReentrant {
    uint256 balance = address(this).balance;
    Address.sendValue(payable(payoutAddress1), balance);
  }

  /** ROYALTIES **/

  function setRoyalty(uint256 royalty_) external onlyOwner
  {
    royalty = royalty_;
  }

  function royaltyInfo(uint256, uint256 salePrice) external view override
    returns (address receiver, uint256 royaltyAmount)
  {
    return (address(this), (salePrice * royalty) / 10000);
  }

  function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165)
    returns (bool)
  {
    return (
      interfaceId == type(IERC2981).interfaceId ||
      super.supportsInterface(interfaceId)
    );
  }
}
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;
    }
}
IERC165.sol 6 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";
IERC2981.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}
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;
}
ReentrancyGuard.sol 63 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}
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

accessTokenIsActive 0x5e59409a → bool
balanceOf 0x70a08231 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
metaMigrated 0x800005ac → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
royaltyInfo 0x2a55205a → address, uint256
saleIsActive 0xeb8d2444 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256

Write Contract 19 functions

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

approve 0x095ea7b3
address to
uint256 tokenId
mint 0xde836ebd
address _recipient
uint256[] ids
mutate 0xb9c19395
uint256[] ids
mutate2 0x1a9283ad
uint256[] ids
string[] syringeHash
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setAccessTokenIsActive 0xeeda2be7
bool accessTokenIsActive_
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string customBaseURI_
setMetaMigrated 0xc5dbe1f0
bool metaMigrated_
setPrice 0x91b7f5ed
uint256 price_
setRoyalty 0x4209a2e1
uint256 royalty_
setSaleIsActive 0x02c88989
bool saleIsActive_
setTokenURI 0x162094c4
uint256 tokenId
string tokenURI_
setURIExt 0xa88dcae4
string customURIExt_
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters

Token Balances (1)

View Transfers →
WETH 0.003

Recent Transactions

No transactions found for this address