Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x395fc9db003E58b804188155Dc7e0E609a062F61
Balance 0.020767 ETH
Nonce 1
Code Size 17031 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

17031 bytes
0x6080604052600436106102295760003560e01c806370a0823111610123578063a22cb465116100ab578063d547cfb71161006f578063d547cfb7146107d9578063d7eb3f3a14610804578063e927fc5c1461082f578063e985e9c51461085a578063f2fde38b1461089757610230565b8063a22cb465146106f6578063b88d4fde1461071f578063bf7b766d14610748578063c87b56dd14610773578063d1e1f572146107b057610230565b80638ad5de28116100f25780638ad5de28146106405780638d859f3e1461066b5780638da5cb5b1461069657806395d89b41146106c15780639da9df3e146106ec57610230565b806370a0823114610586578063715018a6146105c35780637f81be69146105da578063819b25ba1461061757610230565b80633ad10ef6116101b157806355f804b31161017557806355f804b31461049f57806359a7715a146104c857806360db6e93146104f35780636352211e1461051e578063650175661461055b57610230565b80633ad10ef6146103c957806340c10f19146103f457806342842e0e1461041057806342966c6814610439578063438b63001461046257610230565b80632164bef7116101f85780632164bef71461030357806321c34fcb1461032e57806323b872dd1461033857806326a49e37146103615780633502a7161461039e57610230565b806301ffc9a71461023557806306fdde0314610272578063081812fc1461029d578063095ea7b3146102da57610230565b3661023057005b600080fd5b34801561024157600080fd5b5061025c60048036038101906102579190612de2565b6108c0565b6040516102699190613434565b60405180910390f35b34801561027e57600080fd5b506102876109a2565b604051610294919061344f565b60405180910390f35b3480156102a957600080fd5b506102c460048036038101906102bf9190612e85565b610a34565b6040516102d191906133ab565b60405180910390f35b3480156102e657600080fd5b5061030160048036038101906102fc9190612da2565b610ab9565b005b34801561030f57600080fd5b50610318610bd1565b6040516103259190613771565b60405180910390f35b610336610bd6565b005b34801561034457600080fd5b5061035f600480360381019061035a9190612c8c565b610d0d565b005b34801561036d57600080fd5b5061038860048036038101906103839190612e85565b610d6d565b6040516103959190613771565b60405180910390f35b3480156103aa57600080fd5b506103b3610d8a565b6040516103c09190613771565b60405180910390f35b3480156103d557600080fd5b506103de610d90565b6040516103eb91906133ab565b60405180910390f35b61040e60048036038101906104099190612da2565b610da8565b005b34801561041c57600080fd5b5061043760048036038101906104329190612c8c565b610f95565b005b34801561044557600080fd5b50610460600480360381019061045b9190612e85565b610fb5565b005b34801561046e57600080fd5b5061048960048036038101906104849190612c1f565b611011565b6040516104969190613412565b60405180910390f35b3480156104ab57600080fd5b506104c660048036038101906104c19190612e3c565b61111a565b005b3480156104d457600080fd5b506104dd6111b0565b6040516104ea9190613771565b60405180910390f35b3480156104ff57600080fd5b506105086111bf565b6040516105159190613771565b60405180910390f35b34801561052a57600080fd5b5061054560048036038101906105409190612e85565b6111c9565b60405161055291906133ab565b60405180910390f35b34801561056757600080fd5b5061057061127b565b60405161057d9190613434565b60405180910390f35b34801561059257600080fd5b506105ad60048036038101906105a89190612c1f565b611288565b6040516105ba9190613771565b60405180910390f35b3480156105cf57600080fd5b506105d8611340565b005b3480156105e657600080fd5b5061060160048036038101906105fc9190612e85565b6113c8565b60405161060e91906133ab565b60405180910390f35b34801561062357600080fd5b5061063e60048036038101906106399190612e85565b611405565b005b34801561064c57600080fd5b5061065561150f565b6040516106629190613771565b60405180910390f35b34801561067757600080fd5b50610680611514565b60405161068d9190613771565b60405180910390f35b3480156106a257600080fd5b506106ab611519565b6040516106b891906133ab565b60405180910390f35b3480156106cd57600080fd5b506106d6611543565b6040516106e3919061344f565b60405180910390f35b6106f46115d5565b005b34801561070257600080fd5b5061071d60048036038101906107189190612d62565b611677565b005b34801561072b57600080fd5b5061074660048036038101906107419190612cdf565b6117f8565b005b34801561075457600080fd5b5061075d61185a565b60405161076a9190613771565b60405180910390f35b34801561077f57600080fd5b5061079a60048036038101906107959190612e85565b61185f565b6040516107a7919061344f565b60405180910390f35b3480156107bc57600080fd5b506107d760048036038101906107d29190612e85565b611906565b005b3480156107e557600080fd5b506107ee61198c565b6040516107fb919061344f565b60405180910390f35b34801561081057600080fd5b50610819611a1a565b60405161082691906133ab565b60405180910390f35b34801561083b57600080fd5b50610844611a32565b60405161085191906133ab565b60405180910390f35b34801561086657600080fd5b50610881600480360381019061087c9190612c4c565b611a4a565b60405161088e9190613434565b60405180910390f35b3480156108a357600080fd5b506108be60048036038101906108b99190612c1f565b611ade565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061098b57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061099b575061099a82611bd6565b5b9050919050565b6060600080546109b190613a65565b80601f01602080910402602001604051908101604052809291908181526020018280546109dd90613a65565b8015610a2a5780601f106109ff57610100808354040283529160200191610a2a565b820191906000526020600020905b815481529060010190602001808311610a0d57829003601f168201915b5050505050905090565b6000610a3f82611c40565b610a7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7590613611565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610ac4826111c9565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2c906136d1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610b54611cac565b73ffffffffffffffffffffffffffffffffffffffff161480610b835750610b8281610b7d611cac565b611a4a565b5b610bc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb990613571565b60405180910390fd5b610bcc8383611cb4565b505050565b603281565b610bde611cac565b73ffffffffffffffffffffffffffffffffffffffff16610bfc611519565b73ffffffffffffffffffffffffffffffffffffffff1614610c52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4990613631565b60405180910390fd5b600047905060008111610c6457600080fd5b610ca873cbcc84766f2950cf867f42d766c43fb2d2ba3256610ca36064610c95602e86611d6d90919063ffffffff16565b611d8390919063ffffffff16565b611d99565b610cec73d8103fb67f82f800fd2422080bb7738cbe4d3db4610ce76064610cd9600886611d6d90919063ffffffff16565b611d8390919063ffffffff16565b611d99565b610d0a73722ffd38eb050e92f4c3804a8bf823521c726d7747611d99565b50565b610d1e610d18611cac565b82611e4a565b610d5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5490613731565b60405180910390fd5b610d68838383611f28565b505050565b6000610d83826000611d6d90919063ffffffff16565b9050919050565b611dfc81565b73cbcc84766f2950cf867f42d766c43fb2d2ba325681565b611dfc610db3612184565b1115610df4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610deb906135f1565b60405180910390fd5b610dfc611519565b73ffffffffffffffffffffffffffffffffffffffff16610e1a611cac565b73ffffffffffffffffffffffffffffffffffffffff1614610e7d57610e3d61127b565b610e7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e73906136f1565b60405180910390fd5b5b6000610e87612184565b90506001821115610ecd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec490613471565b60405180910390fd5b611dfc8282610edc919061389a565b1115610f1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1490613531565b60405180910390fd5b610f2682610d6d565b341015610f68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5f906136b1565b60405180910390fd5b60005b82811015610f8f57610f7c84612195565b8080610f8790613ac8565b915050610f6b565b50505050565b610fb0838383604051806020016040528060008152506117f8565b505050565b610fc6610fc0611cac565b82611e4a565b611005576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffc90613691565b60405180910390fd5b61100e816121f2565b50565b6060600061101e83611288565b90506000808267ffffffffffffffff81111561103d5761103c613bfe565b5b60405190808252806020026020018201604052801561106b5781602001602082028036833780820191505090505b5090506000600190505b61107d612184565b811161110e578573ffffffffffffffffffffffffffffffffffffffff166110a3826113c8565b73ffffffffffffffffffffffffffffffffffffffff1614156110fb57808284815181106110d3576110d2613bcf565b5b60200260200101818152505082806110ea90613ac8565b935050838314156110fa5761110e565b5b808061110690613ac8565b915050611075565b50809350505050919050565b611122611cac565b73ffffffffffffffffffffffffffffffffffffffff16611140611519565b73ffffffffffffffffffffffffffffffffffffffff1614611196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118d90613631565b60405180910390fd5b80600990805190602001906111ac929190612a33565b5050565b60006111ba612184565b905090565b6000600854905090565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611272576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611269906135b1565b60405180910390fd5b80915050919050565b6000600854421015905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156112f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f090613591565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611348611cac565b73ffffffffffffffffffffffffffffffffffffffff16611366611519565b73ffffffffffffffffffffffffffffffffffffffff16146113bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b390613631565b60405180910390fd5b6113c66000612304565b565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b61140d611cac565b73ffffffffffffffffffffffffffffffffffffffff1661142b611519565b73ffffffffffffffffffffffffffffffffffffffff1614611481576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147890613631565b60405180910390fd5b600061148b612184565b90506032828261149b919061389a565b11156114dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d390613751565b60405180910390fd5b60005b8281101561150a576114f76114f2611cac565b612195565b808061150290613ac8565b9150506114df565b505050565b600181565b600081565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606001805461155290613a65565b80601f016020809104026020016040519081016040528092919081815260200182805461157e90613a65565b80156115cb5780601f106115a0576101008083540402835291602001916115cb565b820191906000526020600020905b8154815290600101906020018083116115ae57829003601f168201915b5050505050905090565b6115dd611cac565b73ffffffffffffffffffffffffffffffffffffffff166115fb611519565b73ffffffffffffffffffffffffffffffffffffffff1614611651576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164890613631565b60405180910390fd5b60004790506000811161166357600080fd5b61167461166e611cac565b47611d99565b50565b61167f611cac565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e490613511565b60405180910390fd5b80600560006116fa611cac565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166117a7611cac565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117ec9190613434565b60405180910390a35050565b611809611803611cac565b83611e4a565b611848576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183f90613731565b60405180910390fd5b611854848484846123ca565b50505050565b600181565b606061186a82611c40565b6118a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118a090613671565b60405180910390fd5b60006118b3612426565b905060008151116118d357604051806020016040528060008152506118fe565b806118dd846124b8565b6040516020016118ee929190613372565b6040516020818303038152906040525b915050919050565b61190e611cac565b73ffffffffffffffffffffffffffffffffffffffff1661192c611519565b73ffffffffffffffffffffffffffffffffffffffff1614611982576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197990613631565b60405180910390fd5b8060088190555050565b6009805461199990613a65565b80601f01602080910402602001604051908101604052809291908181526020018280546119c590613a65565b8015611a125780601f106119e757610100808354040283529160200191611a12565b820191906000526020600020905b8154815290600101906020018083116119f557829003601f168201915b505050505081565b73d8103fb67f82f800fd2422080bb7738cbe4d3db481565b73722ffd38eb050e92f4c3804a8bf823521c726d7781565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611ae6611cac565b73ffffffffffffffffffffffffffffffffffffffff16611b04611519565b73ffffffffffffffffffffffffffffffffffffffff1614611b5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5190613631565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611bca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc1906134b1565b60405180910390fd5b611bd381612304565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611d27836111c9565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008183611d7b9190613921565b905092915050565b60008183611d9191906138f0565b905092915050565b60008273ffffffffffffffffffffffffffffffffffffffff1682604051611dbf90613396565b60006040518083038185875af1925050503d8060008114611dfc576040519150601f19603f3d011682016040523d82523d6000602084013e611e01565b606091505b5050905080611e45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3c90613711565b60405180910390fd5b505050565b6000611e5582611c40565b611e94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e8b90613551565b60405180910390fd5b6000611e9f836111c9565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611f0e57508373ffffffffffffffffffffffffffffffffffffffff16611ef684610a34565b73ffffffffffffffffffffffffffffffffffffffff16145b80611f1f5750611f1e8185611a4a565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611f48826111c9565b73ffffffffffffffffffffffffffffffffffffffff1614611f9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f9590613651565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561200e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612005906134f1565b60405180910390fd5b612019838383612619565b612024600082611cb4565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612074919061397b565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120cb919061389a565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000612190600761261e565b905090565b600060016121a1612184565b6121ab919061389a565b90506121b7600761262c565b6121c18282612642565b807fbaba518f28b3a6b3b48f33d9bd278d7723107ff9a2b6dfe363de95ff3a1b4c1860405160405180910390a25050565b60006121fd826111c9565b9050600061220c828285612619565b612217600084611cb4565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612267919061397b565b925050819055506002600084815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055828173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6123d5848484611f28565b6123e184848484612660565b612420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241790613491565b60405180910390fd5b50505050565b60606009805461243590613a65565b80601f016020809104026020016040519081016040528092919081815260200182805461246190613a65565b80156124ae5780601f10612483576101008083540402835291602001916124ae565b820191906000526020600020905b81548152906001019060200180831161249157829003601f168201915b5050505050905090565b60606000821415612500576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612614565b600082905060005b6000821461253257808061251b90613ac8565b915050600a8261252b91906138f0565b9150612508565b60008167ffffffffffffffff81111561254e5761254d613bfe565b5b6040519080825280601f01601f1916602001820160405280156125805781602001600182028036833780820191505090505b5090505b6000851461260d57600182612599919061397b565b9150600a856125a89190613b11565b60306125b4919061389a565b60f81b8183815181106125ca576125c9613bcf565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561260691906138f0565b9450612584565b8093505050505b919050565b505050565b600081600001549050919050565b6001816000016000828254019250508190555050565b61265c8282604051806020016040528060008152506127f7565b5050565b60006126818473ffffffffffffffffffffffffffffffffffffffff16612852565b156127ea578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026126aa611cac565b8786866040518563ffffffff1660e01b81526004016126cc94939291906133c6565b602060405180830381600087803b1580156126e657600080fd5b505af192505050801561271757506040513d601f19601f820116820180604052508101906127149190612e0f565b60015b61279a573d8060008114612747576040519150601f19603f3d011682016040523d82523d6000602084013e61274c565b606091505b50600081511415612792576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161278990613491565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506127ef565b600190505b949350505050565b6128018383612865565b61280e6000848484612660565b61284d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161284490613491565b60405180910390fd5b505050565b600080823b905060008111915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156128d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128cc906135d1565b60405180910390fd5b6128de81611c40565b1561291e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612915906134d1565b60405180910390fd5b61292a60008383612619565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461297a919061389a565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b828054612a3f90613a65565b90600052602060002090601f016020900481019282612a615760008555612aa8565b82601f10612a7a57805160ff1916838001178555612aa8565b82800160010185558215612aa8579182015b82811115612aa7578251825591602001919060010190612a8c565b5b509050612ab59190612ab9565b5090565b5b80821115612ad2576000816000905550600101612aba565b5090565b6000612ae9612ae4846137b1565b61378c565b905082815260208101848484011115612b0557612b04613c32565b5b612b10848285613a23565b509392505050565b6000612b2b612b26846137e2565b61378c565b905082815260208101848484011115612b4757612b46613c32565b5b612b52848285613a23565b509392505050565b600081359050612b69816141f5565b92915050565b600081359050612b7e8161420c565b92915050565b600081359050612b9381614223565b92915050565b600081519050612ba881614223565b92915050565b600082601f830112612bc357612bc2613c2d565b5b8135612bd3848260208601612ad6565b91505092915050565b600082601f830112612bf157612bf0613c2d565b5b8135612c01848260208601612b18565b91505092915050565b600081359050612c198161423a565b92915050565b600060208284031215612c3557612c34613c3c565b5b6000612c4384828501612b5a565b91505092915050565b60008060408385031215612c6357612c62613c3c565b5b6000612c7185828601612b5a565b9250506020612c8285828601612b5a565b9150509250929050565b600080600060608486031215612ca557612ca4613c3c565b5b6000612cb386828701612b5a565b9350506020612cc486828701612b5a565b9250506040612cd586828701612c0a565b9150509250925092565b60008060008060808587031215612cf957612cf8613c3c565b5b6000612d0787828801612b5a565b9450506020612d1887828801612b5a565b9350506040612d2987828801612c0a565b925050606085013567ffffffffffffffff811115612d4a57612d49613c37565b5b612d5687828801612bae565b91505092959194509250565b60008060408385031215612d7957612d78613c3c565b5b6000612d8785828601612b5a565b9250506020612d9885828601612b6f565b9150509250929050565b60008060408385031215612db957612db8613c3c565b5b6000612dc785828601612b5a565b9250506020612dd885828601612c0a565b9150509250929050565b600060208284031215612df857612df7613c3c565b5b6000612e0684828501612b84565b91505092915050565b600060208284031215612e2557612e24613c3c565b5b6000612e3384828501612b99565b91505092915050565b600060208284031215612e5257612e51613c3c565b5b600082013567ffffffffffffffff811115612e7057612e6f613c37565b5b612e7c84828501612bdc565b91505092915050565b600060208284031215612e9b57612e9a613c3c565b5b6000612ea984828501612c0a565b91505092915050565b6000612ebe8383613354565b60208301905092915050565b612ed3816139af565b82525050565b6000612ee482613823565b612eee8185613851565b9350612ef983613813565b8060005b83811015612f2a578151612f118882612eb2565b9750612f1c83613844565b925050600181019050612efd565b5085935050505092915050565b612f40816139c1565b82525050565b6000612f518261382e565b612f5b8185613862565b9350612f6b818560208601613a32565b612f7481613c41565b840191505092915050565b6000612f8a82613839565b612f94818561387e565b9350612fa4818560208601613a32565b612fad81613c41565b840191505092915050565b6000612fc382613839565b612fcd818561388f565b9350612fdd818560208601613a32565b80840191505092915050565b6000612ff6600e8361387e565b915061300182613c52565b602082019050919050565b600061301960328361387e565b915061302482613c7b565b604082019050919050565b600061303c60268361387e565b915061304782613cca565b604082019050919050565b600061305f601c8361387e565b915061306a82613d19565b602082019050919050565b600061308260248361387e565b915061308d82613d42565b604082019050919050565b60006130a560198361387e565b91506130b082613d91565b602082019050919050565b60006130c860098361387e565b91506130d382613dba565b602082019050919050565b60006130eb602c8361387e565b91506130f682613de3565b604082019050919050565b600061310e60388361387e565b915061311982613e32565b604082019050919050565b6000613131602a8361387e565b915061313c82613e81565b604082019050919050565b600061315460298361387e565b915061315f82613ed0565b604082019050919050565b600061317760208361387e565b915061318282613f1f565b602082019050919050565b600061319a60088361387e565b91506131a582613f48565b602082019050919050565b60006131bd602c8361387e565b91506131c882613f71565b604082019050919050565b60006131e060208361387e565b91506131eb82613fc0565b602082019050919050565b600061320360298361387e565b915061320e82613fe9565b604082019050919050565b6000613226602f8361387e565b915061323182614038565b604082019050919050565b600061324960168361387e565b915061325482614087565b602082019050919050565b600061326c60118361387e565b9150613277826140b0565b602082019050919050565b600061328f60218361387e565b915061329a826140d9565b604082019050919050565b60006132b2600e8361387e565b91506132bd82614128565b602082019050919050565b60006132d5600083613873565b91506132e082614151565b600082019050919050565b60006132f860108361387e565b915061330382614154565b602082019050919050565b600061331b60318361387e565b91506133268261417d565b604082019050919050565b600061333e60088361387e565b9150613349826141cc565b602082019050919050565b61335d81613a19565b82525050565b61336c81613a19565b82525050565b600061337e8285612fb8565b915061338a8284612fb8565b91508190509392505050565b60006133a1826132c8565b9150819050919050565b60006020820190506133c06000830184612eca565b92915050565b60006080820190506133db6000830187612eca565b6133e86020830186612eca565b6133f56040830185613363565b81810360608301526134078184612f46565b905095945050505050565b6000602082019050818103600083015261342c8184612ed9565b905092915050565b60006020820190506134496000830184612f37565b92915050565b600060208201905081810360008301526134698184612f7f565b905092915050565b6000602082019050818103600083015261348a81612fe9565b9050919050565b600060208201905081810360008301526134aa8161300c565b9050919050565b600060208201905081810360008301526134ca8161302f565b9050919050565b600060208201905081810360008301526134ea81613052565b9050919050565b6000602082019050818103600083015261350a81613075565b9050919050565b6000602082019050818103600083015261352a81613098565b9050919050565b6000602082019050818103600083015261354a816130bb565b9050919050565b6000602082019050818103600083015261356a816130de565b9050919050565b6000602082019050818103600083015261358a81613101565b9050919050565b600060208201905081810360008301526135aa81613124565b9050919050565b600060208201905081810360008301526135ca81613147565b9050919050565b600060208201905081810360008301526135ea8161316a565b9050919050565b6000602082019050818103600083015261360a8161318d565b9050919050565b6000602082019050818103600083015261362a816131b0565b9050919050565b6000602082019050818103600083015261364a816131d3565b9050919050565b6000602082019050818103600083015261366a816131f6565b9050919050565b6000602082019050818103600083015261368a81613219565b9050919050565b600060208201905081810360008301526136aa8161323c565b9050919050565b600060208201905081810360008301526136ca8161325f565b9050919050565b600060208201905081810360008301526136ea81613282565b9050919050565b6000602082019050818103600083015261370a816132a5565b9050919050565b6000602082019050818103600083015261372a816132eb565b9050919050565b6000602082019050818103600083015261374a8161330e565b9050919050565b6000602082019050818103600083015261376a81613331565b9050919050565b60006020820190506137866000830184613363565b92915050565b60006137966137a7565b90506137a28282613a97565b919050565b6000604051905090565b600067ffffffffffffffff8211156137cc576137cb613bfe565b5b6137d582613c41565b9050602081019050919050565b600067ffffffffffffffff8211156137fd576137fc613bfe565b5b61380682613c41565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006138a582613a19565b91506138b083613a19565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138e5576138e4613b42565b5b828201905092915050565b60006138fb82613a19565b915061390683613a19565b92508261391657613915613b71565b5b828204905092915050565b600061392c82613a19565b915061393783613a19565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139705761396f613b42565b5b828202905092915050565b600061398682613a19565b915061399183613a19565b9250828210156139a4576139a3613b42565b5b828203905092915050565b60006139ba826139f9565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015613a50578082015181840152602081019050613a35565b83811115613a5f576000848401525b50505050565b60006002820490506001821680613a7d57607f821691505b60208210811415613a9157613a90613ba0565b5b50919050565b613aa082613c41565b810181811067ffffffffffffffff82111715613abf57613abe613bfe565b5b80604052505050565b6000613ad382613a19565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613b0657613b05613b42565b5b600182019050919050565b6000613b1c82613a19565b9150613b2783613a19565b925082613b3757613b36613b71565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45786365656473206e756d626572000000000000000000000000000000000000600082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4d6178206c696d69740000000000000000000000000000000000000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f53616c6520656e64000000000000000000000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f4e6f74206f776e6572206e6f7220617070726f76656400000000000000000000600082015250565b7f56616c75652062656c6f77207072696365000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f53616c6573206e6f74206f70656e000000000000000000000000000000000000600082015250565b50565b7f5472616e73666572206661696c65642e00000000000000000000000000000000600082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f4578636565646564000000000000000000000000000000000000000000000000600082015250565b6141fe816139af565b811461420957600080fd5b50565b614215816139c1565b811461422057600080fd5b50565b61422c816139cd565b811461423757600080fd5b50565b61424381613a19565b811461424e57600080fd5b5056fea2646970667358221220f28583a02d13ff0bff2e3757cd43da3c0e0494f9956014a6b405ca65c122347e64736f6c63430008070033

Verified Source Code Full Match

Compiler: v0.8.7+commit.e28d00a7 EVM: london Optimization: No
ERC721.sol 419 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/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 Edit for rawOwnerOf token
     */
    function rawOwnerOf(uint256 tokenId) public view returns (address) {
        return _owners[tokenId];
    }

    /**
     * @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);
        address to = address(0);

        _beforeTokenTransfer(owner, to, tokenId);

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

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

        emit Transfer(owner, to, 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(to).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 {}
}
EpicEagles.sol 139 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";

contract EpicEagles is ERC721, Ownable {
    using SafeMath for uint256;
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIdTracker;

    uint256 public constant MAX_ELEMENTS = 7676;
    uint256 public constant RESERVE_GIVEAWAYS = 50;
    uint256 public constant PRICE = 0 ether;
    uint256 public constant MAX_BY_MINT = 1;
    uint256 public constant START_AT = 1;

    uint256 private startSales = 1631232000; // 2021-09-10 at 00:00:00 UTC

    address public constant creatorAddress = 0x722FFd38eB050e92f4C3804a8bf823521C726d77;
    address public constant artistAddress = 0xD8103Fb67F82F800fd2422080Bb7738CBe4D3DB4;
    address public constant devAddress = 0xcBCc84766F2950CF867f42D766c43fB2D2Ba3256;

    string public baseTokenURI;

    event adoptAnEpicEagle(uint256 indexed id);

    constructor(string memory baseURI) ERC721("EpicEagles", "EA") {
        setBaseURI(baseURI);
    }

    modifier saleIsOpen {
        require(_totalSupply() <= MAX_ELEMENTS, "Sale end");
        if (_msgSender() != owner()) {
            require(salesIsOpen(), "Sales not open");
        }
        _;
    }
    function _totalSupply() internal view returns (uint256) {
        return _tokenIdTracker.current();
    }
    function totalMint() public view returns (uint256) {
        return _totalSupply();
    }
    function mint(address _to, uint256 _count) public payable saleIsOpen {
        uint256 total = _totalSupply();
        require(_count <= MAX_BY_MINT, "Exceeds number");
        require(total + _count <= MAX_ELEMENTS, "Max limit");
        require(msg.value >= price(_count), "Value below price");

        for (uint256 i = 0; i < _count; i++) {
            _mintAnElement(_to);
        }
    }
    function _mintAnElement(address _to) private {
        uint id = _totalSupply() + START_AT;
        _tokenIdTracker.increment();
        _safeMint(_to, id);
        emit adoptAnEpicEagle(id);
    }
    function price(uint256 _count) public pure returns (uint256) {
        return PRICE.mul(_count);
    }

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

    function setBaseURI(string memory baseURI) public onlyOwner {
        baseTokenURI = baseURI;
    }

    function walletOfOwner(address _owner) external view returns (uint256[] memory) {
        uint256 tokenCount = balanceOf(_owner);
        uint256 key = 0;
        uint256[] memory tokensId = new uint256[](tokenCount);

        for (uint256 i = START_AT; i <= _totalSupply(); i++) {
            if(rawOwnerOf(i) == _owner){
                tokensId[key] = i;
                key++;

                if(key == tokenCount){
                    break;
                }
            }
        }
        return tokensId;
    }

    function setStartSales(uint256 _start) public onlyOwner {
        startSales = _start;
    }

    function getStartSales() public view returns(uint256) {
        return startSales;
    }

    function salesIsOpen() public view returns (bool){
        return block.timestamp >= startSales;
    }

    function withdrawContract() public payable onlyOwner {
        uint256 balance = address(this).balance;
        require(balance > 0);
        _widthdraw(_msgSender(), address(this).balance);
    }

    function withdrawRoyalties() public payable onlyOwner {
        uint256 balance = address(this).balance;
        require(balance > 0);
        _widthdraw(devAddress, balance.mul(46).div(100));
        _widthdraw(artistAddress, balance.mul(8).div(100));
        _widthdraw(creatorAddress, address(this).balance);
    }

    function _widthdraw(address _address, uint256 _amount) private {
        (bool success, ) = _address.call{value: _amount}("");
        require(success, "Transfer failed.");
    }

    function burn(uint256 tokenId) public virtual {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "Not owner nor approved");
        _burn(tokenId);
    }

    function reserve(uint256 _count) public onlyOwner {
        uint256 total = _totalSupply();
        require(total + _count <= RESERVE_GIVEAWAYS, "Exceeded");
        for (uint256 i = 0; i < _count; i++) {
            _mintAnElement(_msgSender());
        }
    }
    receive() external payable {}

}
Address.sol 210 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);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private 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);
    }
}
Counters.sol 42 lines
// SPDX-License-Identifier: MIT

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;
    }
}
SafeMath.sol 226 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}
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_BY_MINT 0x8ad5de28 → uint256
MAX_ELEMENTS 0x3502a716 → uint256
PRICE 0x8d859f3e → uint256
RESERVE_GIVEAWAYS 0x2164bef7 → uint256
START_AT 0xbf7b766d → uint256
artistAddress 0xd7eb3f3a → address
balanceOf 0x70a08231 → uint256
baseTokenURI 0xd547cfb7 → string
creatorAddress 0xe927fc5c → address
devAddress 0x3ad10ef6 → address
getApproved 0x081812fc → address
getStartSales 0x60db6e93 → uint256
isApprovedForAll 0xe985e9c5 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
price 0x26a49e37 → uint256
rawOwnerOf 0x7f81be69 → address
salesIsOpen 0x65017566 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalMint 0x59a7715a → uint256
walletOfOwner 0x438b6300 → uint256[]

Write Contract 14 functions

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

approve 0x095ea7b3
address to
uint256 tokenId
burn 0x42966c68
uint256 tokenId
mint 0x40c10f19
address _to
uint256 _count
renounceOwnership 0x715018a6
No parameters
reserve 0x819b25ba
uint256 _count
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
setStartSales 0xd1e1f572
uint256 _start
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdrawContract 0x9da9df3e
No parameters
withdrawRoyalties 0x21c34fcb
No parameters

Recent Transactions

No transactions found for this address