Address Contract Partially Verified
Address
0x82b46Ed280fF4Eff0f239536f449B79c0dA0e7de
Balance
0 ETH
Nonce
1
Code Size
14456 bytes
Creator
0x11c6AFEB...DE63 at tx 0xe4ebc0df...44ca6b
Last Active
Indexed Transactions
3 (24,291,823 → 24,311,838)
Gas Used (indexed)
74,513
Contract Bytecode
14456 bytes
0x608060405234801561000f575f5ffd5b50600436106101a7575f3560e01c8063879fbedf116100f7578063c6a768f411610095578063eb15aad21161006f578063eb15aad21461049f578063ede41cd7146104cf578063ef533a22146104ed578063f2fde38b1461050b576101a7565b8063c6a768f414610423578063c87b56dd1461043f578063e985e9c51461046f576101a7565b8063a22cb465116100d1578063a22cb465146103b1578063a410bed6146103cd578063b77a147b146103eb578063b88d4fde14610407576101a7565b8063879fbedf146103595780638da5cb5b1461037557806395d89b4114610393576101a7565b8063341ffbc01161016457806355f804b31161013e57806355f804b3146102d35780636352211e146102ef57806370a082311461031f578063715018a61461034f576101a7565b8063341ffbc01461026b57806342842e0e1461029b578063440bc7f3146102b7576101a7565b806301ffc9a7146101ab57806306fdde03146101db578063081812fc146101f9578063095ea7b31461022957806323b872dd1461024557806326092b8314610261575b5f5ffd5b6101c560048036038101906101c091906120c6565b610527565b6040516101d2919061210b565b60405180910390f35b6101e3610608565b6040516101f09190612194565b60405180910390f35b610213600480360381019061020e91906121e7565b610697565b6040516102209190612251565b60405180910390f35b610243600480360381019061023e9190612294565b610718565b005b61025f600480360381019061025a91906122d2565b610753565b005b6102696107b3565b005b61028560048036038101906102809190612322565b6108e9565b604051610292919061235c565b60405180910390f35b6102b560048036038101906102b091906122d2565b6109ae565b005b6102d160048036038101906102cc91906123a8565b6109cd565b005b6102ed60048036038101906102e891906124ff565b610a53565b005b610309600480360381019061030491906121e7565b610ae2565b6040516103169190612251565b60405180910390f35b61033960048036038101906103349190612322565b610b8e565b604051610346919061235c565b60405180910390f35b610357610c42565b005b610373600480360381019061036e9190612570565b610cc9565b005b61037d610d62565b60405161038a9190612251565b60405180910390f35b61039b610d8a565b6040516103a89190612194565b60405180910390f35b6103cb60048036038101906103c6919061259b565b610e1a565b005b6103d5610e55565b6040516103e2919061210b565b60405180910390f35b61040560048036038101906104009190612636565b610e68565b005b610421600480360381019061041c919061271f565b61109c565b005b61043d60048036038101906104389190612570565b6110fe565b005b610459600480360381019061045491906121e7565b611196565b6040516104669190612194565b60405180910390f35b6104896004803603810190610484919061279f565b611218565b604051610496919061210b565b60405180910390f35b6104b960048036038101906104b49190612322565b6112a6565b6040516104c6919061235c565b60405180910390f35b6104d76112bb565b6040516104e4919061210b565b60405180910390f35b6104f56112cd565b60405161050291906127ec565b60405180910390f35b61052560048036038101906105209190612322565b6112d3565b005b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806105f157507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806106015750610600826113c9565b5b9050919050565b60605f805461061690612832565b80601f016020809104026020016040519081016040528092919081815260200182805461064290612832565b801561068d5780601f106106645761010080835404028352916020019161068d565b820191905f5260205f20905b81548152906001019060200180831161067057829003601f168201915b5050505050905090565b5f6106a182611432565b6106e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d7906128d2565b60405180910390fd5b60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074a9061293a565b60405180910390fd5b61076461075e61149a565b826114a1565b6107a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079a906129c8565b60405180910390fd5b6107ae83838361157d565b505050565b600a60019054906101000a900460ff16610802576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f990612a30565b60405180910390fd5b5f600c5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205414610881576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087890612a98565b60405180910390fd5b5f60085f81548092919061089490612ae3565b91905055905080600c5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055506108e633826117d8565b50565b5f5f600c5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205403610969576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096090612b74565b60405180910390fd5b600c5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6109c883838360405180602001604052805f81525061109c565b505050565b6109d561149a565b73ffffffffffffffffffffffffffffffffffffffff166109f3610d62565b73ffffffffffffffffffffffffffffffffffffffff1614610a49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4090612bdc565b60405180910390fd5b80600b8190555050565b610a5b61149a565b73ffffffffffffffffffffffffffffffffffffffff16610a79610d62565b73ffffffffffffffffffffffffffffffffffffffff1614610acf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac690612bdc565b60405180910390fd5b8060099081610ade9190612d9a565b5050565b5f5f60025f8481526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7c90612ed9565b60405180910390fd5b80915050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610bfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf490612f67565b60405180910390fd5b60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610c4a61149a565b73ffffffffffffffffffffffffffffffffffffffff16610c68610d62565b73ffffffffffffffffffffffffffffffffffffffff1614610cbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb590612bdc565b60405180910390fd5b610cc75f6119a7565b565b610cd161149a565b73ffffffffffffffffffffffffffffffffffffffff16610cef610d62565b73ffffffffffffffffffffffffffffffffffffffff1614610d45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3c90612bdc565b60405180910390fd5b80600a60016101000a81548160ff02191690831515021790555050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054610d9990612832565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc590612832565b8015610e105780601f10610de757610100808354040283529160200191610e10565b820191905f5260205f20905b815481529060010190602001808311610df357829003601f168201915b5050505050905090565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4c90612fcf565b60405180910390fd5b600a60019054906101000a900460ff1681565b600a5f9054906101000a900460ff16610eb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ead90613037565b60405180910390fd5b5f600c5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205414610f35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2c90612a98565b60405180910390fd5b60646007541115610f7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f729061309f565b60405180910390fd5b5f33604051602001610f8d9190613102565b604051602081830303815290604052805190602001209050610ff28383808060200260200160405190810160405280939291908181526020018383602002808284375f81840152601f19601f82011690508083019250505050505050600b5483611a6a565b611031576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102890613166565b60405180910390fd5b5f60075f81548092919061104490612ae3565b91905055905080600c5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555061109633826117d8565b50505050565b6110ad6110a761149a565b836114a1565b6110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e3906129c8565b60405180910390fd5b6110f884848484611a80565b50505050565b61110661149a565b73ffffffffffffffffffffffffffffffffffffffff16611124610d62565b73ffffffffffffffffffffffffffffffffffffffff161461117a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117190612bdc565b60405180910390fd5b80600a5f6101000a81548160ff02191690831515021790555050565b60606111a182611432565b6111e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d7906131ce565b60405180910390fd5b6111e8611adc565b6111f183611b6c565b604051602001611202929190613226565b6040516020818303038152906040529050919050565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b600c602052805f5260405f205f915090505481565b600a5f9054906101000a900460ff1681565b600b5481565b6112db61149a565b73ffffffffffffffffffffffffffffffffffffffff166112f9610d62565b73ffffffffffffffffffffffffffffffffffffffff161461134f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134690612bdc565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036113bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b4906132b9565b60405180910390fd5b6113c6816119a7565b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff1660025f8481526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b5f33905090565b5f6114ab82611432565b6114ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e190613347565b60405180910390fd5b5f6114f483610ae2565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061156357508373ffffffffffffffffffffffffffffffffffffffff1661154b84610697565b73ffffffffffffffffffffffffffffffffffffffff16145b8061157457506115738185611218565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661159d82610ae2565b73ffffffffffffffffffffffffffffffffffffffff16146115f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ea906133d5565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165890613463565b60405180910390fd5b61166c838383611cc5565b6116765f82611d79565b600160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546116c39190613481565b92505081905550600160035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461171791906134b4565b925050819055508160025f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46117d3838383611e2f565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611846576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183d90613531565b60405180910390fd5b61184f81611432565b1561188f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188690613599565b60405180910390fd5b61189a5f8383611cc5565b600160035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546118e791906134b4565b925050819055508160025f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46119a35f8383611e2f565b5050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f82611a768584611e34565b1490509392505050565b611a8b84848461157d565b611a9784848484611ea3565b611ad6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611acd90613627565b60405180910390fd5b50505050565b606060098054611aeb90612832565b80601f0160208091040260200160405190810160405280929190818152602001828054611b1790612832565b8015611b625780601f10611b3957610100808354040283529160200191611b62565b820191905f5260205f20905b815481529060010190602001808311611b4557829003601f168201915b5050505050905090565b60605f8203611bb2576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611cc0565b5f8290505f5b5f8214611be1578080611bca90612ae3565b915050600a82611bda9190613672565b9150611bb8565b5f8167ffffffffffffffff811115611bfc57611bfb6123db565b5b6040519080825280601f01601f191660200182016040528015611c2e5781602001600182028036833780820191505090505b5090505b5f8514611cb957600182611c469190613481565b9150600a85611c5591906136a2565b6030611c6191906134b4565b60f81b818381518110611c7757611c766136d2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350600a85611cb29190613672565b9450611c32565b8093505050505b919050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480611d2a57505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b611d69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6090613749565b60405180910390fd5b611d74838383612025565b505050565b8160045f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611de983610ae2565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b505050565b5f5f8290505f5f90505b8451811015611e98575f858281518110611e5b57611e5a6136d2565b5b60200260200101519050808311611e7d57611e76838261202a565b9250611e8a565b611e87818461202a565b92505b508080600101915050611e3e565b508091505092915050565b5f611ec38473ffffffffffffffffffffffffffffffffffffffff1661203e565b15612018578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611eec61149a565b8786866040518563ffffffff1660e01b8152600401611f0e94939291906137b9565b6020604051808303815f875af1925050508015611f4957506040513d601f19601f82011682018060405250810190611f469190613817565b60015b611fc8573d805f8114611f77576040519150601f19603f3d011682016040523d82523d5f602084013e611f7c565b606091505b505f815103611fc0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fb790613627565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061201d565b600190505b949350505050565b505050565b5f825f528160205260405f20905092915050565b5f5f8273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f604051905090565b5f5ffd5b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6120a581612071565b81146120af575f5ffd5b50565b5f813590506120c08161209c565b92915050565b5f602082840312156120db576120da612069565b5b5f6120e8848285016120b2565b91505092915050565b5f8115159050919050565b612105816120f1565b82525050565b5f60208201905061211e5f8301846120fc565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61216682612124565b612170818561212e565b935061218081856020860161213e565b6121898161214c565b840191505092915050565b5f6020820190508181035f8301526121ac818461215c565b905092915050565b5f819050919050565b6121c6816121b4565b81146121d0575f5ffd5b50565b5f813590506121e1816121bd565b92915050565b5f602082840312156121fc576121fb612069565b5b5f612209848285016121d3565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61223b82612212565b9050919050565b61224b81612231565b82525050565b5f6020820190506122645f830184612242565b92915050565b61227381612231565b811461227d575f5ffd5b50565b5f8135905061228e8161226a565b92915050565b5f5f604083850312156122aa576122a9612069565b5b5f6122b785828601612280565b92505060206122c8858286016121d3565b9150509250929050565b5f5f5f606084860312156122e9576122e8612069565b5b5f6122f686828701612280565b935050602061230786828701612280565b9250506040612318868287016121d3565b9150509250925092565b5f6020828403121561233757612336612069565b5b5f61234484828501612280565b91505092915050565b612356816121b4565b82525050565b5f60208201905061236f5f83018461234d565b92915050565b5f819050919050565b61238781612375565b8114612391575f5ffd5b50565b5f813590506123a28161237e565b92915050565b5f602082840312156123bd576123bc612069565b5b5f6123ca84828501612394565b91505092915050565b5f5ffd5b5f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6124118261214c565b810181811067ffffffffffffffff821117156124305761242f6123db565b5b80604052505050565b5f612442612060565b905061244e8282612408565b919050565b5f67ffffffffffffffff82111561246d5761246c6123db565b5b6124768261214c565b9050602081019050919050565b828183375f83830152505050565b5f6124a361249e84612453565b612439565b9050828152602081018484840111156124bf576124be6123d7565b5b6124ca848285612483565b509392505050565b5f82601f8301126124e6576124e56123d3565b5b81356124f6848260208601612491565b91505092915050565b5f6020828403121561251457612513612069565b5b5f82013567ffffffffffffffff8111156125315761253061206d565b5b61253d848285016124d2565b91505092915050565b61254f816120f1565b8114612559575f5ffd5b50565b5f8135905061256a81612546565b92915050565b5f6020828403121561258557612584612069565b5b5f6125928482850161255c565b91505092915050565b5f5f604083850312156125b1576125b0612069565b5b5f6125be85828601612280565b92505060206125cf8582860161255c565b9150509250929050565b5f5ffd5b5f5ffd5b5f5f83601f8401126125f6576125f56123d3565b5b8235905067ffffffffffffffff811115612613576126126125d9565b5b60208301915083602082028301111561262f5761262e6125dd565b5b9250929050565b5f5f6020838503121561264c5761264b612069565b5b5f83013567ffffffffffffffff8111156126695761266861206d565b5b612675858286016125e1565b92509250509250929050565b5f67ffffffffffffffff82111561269b5761269a6123db565b5b6126a48261214c565b9050602081019050919050565b5f6126c36126be84612681565b612439565b9050828152602081018484840111156126df576126de6123d7565b5b6126ea848285612483565b509392505050565b5f82601f830112612706576127056123d3565b5b81356127168482602086016126b1565b91505092915050565b5f5f5f5f6080858703121561273757612736612069565b5b5f61274487828801612280565b945050602061275587828801612280565b9350506040612766878288016121d3565b925050606085013567ffffffffffffffff8111156127875761278661206d565b5b612793878288016126f2565b91505092959194509250565b5f5f604083850312156127b5576127b4612069565b5b5f6127c285828601612280565b92505060206127d385828601612280565b9150509250929050565b6127e681612375565b82525050565b5f6020820190506127ff5f8301846127dd565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061284957607f821691505b60208210810361285c5761285b612805565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e65785f8201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b5f6128bc602c8361212e565b91506128c782612862565b604082019050919050565b5f6020820190508181035f8301526128e9816128b0565b9050919050565b7f536f756c626f756e643a2043616e6e6f7420617070726f7665000000000000005f82015250565b5f61292460198361212e565b915061292f826128f0565b602082019050919050565b5f6020820190508181035f83015261295181612918565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f5f8201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b5f6129b260318361212e565b91506129bd82612958565b604082019050919050565b5f6020820190508181035f8301526129df816129a6565b9050919050565b7f5075626c6963206d696e7420697320636c6f73656400000000000000000000005f82015250565b5f612a1a60158361212e565b9150612a25826129e6565b602082019050919050565b5f6020820190508181035f830152612a4781612a0e565b9050919050565b7f596f752063616e206f6e6c79206d696e74206f6e6365000000000000000000005f82015250565b5f612a8260168361212e565b9150612a8d82612a4e565b602082019050919050565b5f6020820190508181035f830152612aaf81612a76565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612aed826121b4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b1f57612b1e612ab6565b5b600182019050919050565b7f4164647265737320686173206e6f74206d696e746564000000000000000000005f82015250565b5f612b5e60168361212e565b9150612b6982612b2a565b602082019050919050565b5f6020820190508181035f830152612b8b81612b52565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612bc660208361212e565b9150612bd182612b92565b602082019050919050565b5f6020820190508181035f830152612bf381612bba565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302612c567fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612c1b565b612c608683612c1b565b95508019841693508086168417925050509392505050565b5f819050919050565b5f612c9b612c96612c91846121b4565b612c78565b6121b4565b9050919050565b5f819050919050565b612cb483612c81565b612cc8612cc082612ca2565b848454612c27565b825550505050565b5f5f905090565b612cdf612cd0565b612cea818484612cab565b505050565b5b81811015612d0d57612d025f82612cd7565b600181019050612cf0565b5050565b601f821115612d5257612d2381612bfa565b612d2c84612c0c565b81016020851015612d3b578190505b612d4f612d4785612c0c565b830182612cef565b50505b505050565b5f82821c905092915050565b5f612d725f1984600802612d57565b1980831691505092915050565b5f612d8a8383612d63565b9150826002028217905092915050565b612da382612124565b67ffffffffffffffff811115612dbc57612dbb6123db565b5b612dc68254612832565b612dd1828285612d11565b5f60209050601f831160018114612e02575f8415612df0578287015190505b612dfa8582612d7f565b865550612e61565b601f198416612e1086612bfa565b5f5b82811015612e3757848901518255600182019150602085019450602081019050612e12565b86831015612e545784890151612e50601f891682612d63565b8355505b6001600288020188555050505b505050505050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e65786973745f8201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b5f612ec360298361212e565b9150612ece82612e69565b604082019050919050565b5f6020820190508181035f830152612ef081612eb7565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a655f8201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b5f612f51602a8361212e565b9150612f5c82612ef7565b604082019050919050565b5f6020820190508181035f830152612f7e81612f45565b9050919050565b7f536f756c626f756e643a2043616e6e6f742073657420617070726f76616c00005f82015250565b5f612fb9601e8361212e565b9150612fc482612f85565b602082019050919050565b5f6020820190508181035f830152612fe681612fad565b9050919050565b7f4d696e74696e6720697320636c6f7365640000000000000000000000000000005f82015250565b5f61302160118361212e565b915061302c82612fed565b602082019050919050565b5f6020820190508181035f83015261304e81613015565b9050919050565b7f536f6c64206f75742100000000000000000000000000000000000000000000005f82015250565b5f61308960098361212e565b915061309482613055565b602082019050919050565b5f6020820190508181035f8301526130b68161307d565b9050919050565b5f8160601b9050919050565b5f6130d3826130bd565b9050919050565b5f6130e4826130c9565b9050919050565b6130fc6130f782612231565b6130da565b82525050565b5f61310d82846130eb565b60148201915081905092915050565b7f496e76616c69642077686974656c6973742070726f6f660000000000000000005f82015250565b5f61315060178361212e565b915061315b8261311c565b602082019050919050565b5f6020820190508181035f83015261317d81613144565b9050919050565b7f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e005f82015250565b5f6131b8601f8361212e565b91506131c382613184565b602082019050919050565b5f6020820190508181035f8301526131e5816131ac565b9050919050565b5f81905092915050565b5f61320082612124565b61320a81856131ec565b935061321a81856020860161213e565b80840191505092915050565b5f61323182856131f6565b915061323d82846131f6565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6132a360268361212e565b91506132ae82613249565b604082019050919050565b5f6020820190508181035f8301526132d081613297565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e65785f8201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b5f613331602c8361212e565b915061333c826132d7565b604082019050919050565b5f6020820190508181035f83015261335e81613325565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f7272656374205f8201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b5f6133bf60258361212e565b91506133ca82613365565b604082019050919050565b5f6020820190508181035f8301526133ec816133b3565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f61344d60248361212e565b9150613458826133f3565b604082019050919050565b5f6020820190508181035f83015261347a81613441565b9050919050565b5f61348b826121b4565b9150613496836121b4565b92508282039050818111156134ae576134ad612ab6565b5b92915050565b5f6134be826121b4565b91506134c9836121b4565b92508282019050808211156134e1576134e0612ab6565b5b92915050565b7f4552433732313a206d696e7420746f20746865207a65726f20616464726573735f82015250565b5f61351b60208361212e565b9150613526826134e7565b602082019050919050565b5f6020820190508181035f8301526135488161350f565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e746564000000005f82015250565b5f613583601c8361212e565b915061358e8261354f565b602082019050919050565b5f6020820190508181035f8301526135b081613577565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e2045524337323152655f8201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b5f61361160328361212e565b915061361c826135b7565b604082019050919050565b5f6020820190508181035f83015261363e81613605565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61367c826121b4565b9150613687836121b4565b92508261369757613696613645565b5b828204905092915050565b5f6136ac826121b4565b91506136b7836121b4565b9250826136c7576136c6613645565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f536f756c626f756e643a205472616e73666572732064697361626c65640000005f82015250565b5f613733601d8361212e565b915061373e826136ff565b602082019050919050565b5f6020820190508181035f83015261376081613727565b9050919050565b5f81519050919050565b5f82825260208201905092915050565b5f61378b82613767565b6137958185613771565b93506137a581856020860161213e565b6137ae8161214c565b840191505092915050565b5f6080820190506137cc5f830187612242565b6137d96020830186612242565b6137e6604083018561234d565b81810360608301526137f88184613781565b905095945050505050565b5f815190506138118161209c565b92915050565b5f6020828403121561382c5761382b612069565b5b5f61383984828501613803565b9150509291505056fea2646970667358221220df5354795752c865903e67cad2de0b4ecf233d3dd46ff18a60916ab3fd0cdb7064736f6c634300081e0033
Verified Source Code Partial Match
Compiler: v0.8.30+commit.73712a01
EVM: prague
Optimization: No
DistantSummerRain.sol 94 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "./@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "./@openzeppelin/contracts/access/Ownable.sol";
import "./@openzeppelin/contracts/utils/Strings.sol";
import "./@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract DistantSummerRain is ERC721, Ownable {
using Strings for uint256;
uint256 private _tokenIdCounter = 1;
uint256 private _publicTokenIdCounter = 101;
string private _baseTokenURI;
bool public _whitelistMintOpen = false;
bool public _publicMintOpen = false;
bytes32 public dedicatedMerkleRoot;
mapping(address => uint256) public mintedId;
constructor(string memory baseURI) ERC721("DistantSummerRain", "DSR") {
_baseTokenURI = baseURI;
}
function mint(bytes32[] calldata proof) external {
require(_whitelistMintOpen, "Minting is closed");
require(mintedId[msg.sender] == 0, "You can only mint once");
require(_tokenIdCounter <= 100, "Sold out!");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(proof, dedicatedMerkleRoot, leaf),
"Invalid whitelist proof"
);
uint256 tokenId = _tokenIdCounter++;
mintedId[msg.sender] = tokenId;
_mint(msg.sender, tokenId);
}
function publicMint() external {
require(_publicMintOpen, "Public mint is closed");
require(mintedId[msg.sender] == 0, "You can only mint once");
uint256 tokenId = _publicTokenIdCounter++;
mintedId[msg.sender] = tokenId;
_mint(msg.sender, tokenId);
}
function setWhitelist(bytes32 _dedicatedMerkleRoot) external onlyOwner{
dedicatedMerkleRoot = _dedicatedMerkleRoot;
}
function setWhitelistMintState(bool newMintState) external onlyOwner {
_whitelistMintOpen = newMintState;
}
function setPublicMintState(bool newMintState) external onlyOwner {
_publicMintOpen = newMintState;
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
_baseTokenURI = newBaseURI;
}
function _baseURI() internal view override returns (string memory) {
return _baseTokenURI;
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
require(_exists(tokenId), "URI query for nonexistent token");
return string(abi.encodePacked(_baseURI(), tokenId.toString()));
}
function getTokenForOwner(address tokenOwner) public view returns (uint256) {
require(mintedId[tokenOwner] != 0, "Address has not minted");
return mintedId[tokenOwner];
}
// Soulbound enforcement
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override {
require(from == address(0) || to == address(0), "Soulbound: Transfers disabled");
super._beforeTokenTransfer(from, to, tokenId);
}
function approve(address, uint256 ) public pure override {
revert("Soulbound: Cannot approve");
}
function setApprovalForAll(address, bool ) public pure override {
revert("Soulbound: Cannot set approval");
}
}
MerkleProof.sol 60 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = _efficientHash(computedHash, proofElement);
} else {
// Hash(current element of the proof + current computed hash)
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
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);
}
}
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 {}
}
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;
}
}
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;
}
}
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);
}
}
}
}
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);
}
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);
}
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;
}
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);
}
Read Contract
_publicMintOpen 0xa410bed6 → bool
_whitelistMintOpen 0xede41cd7 → bool
approve 0x095ea7b3
balanceOf 0x70a08231 → uint256
dedicatedMerkleRoot 0xef533a22 → bytes32
getApproved 0x081812fc → address
getTokenForOwner 0x341ffbc0 → uint256
isApprovedForAll 0xe985e9c5 → bool
mintedId 0xeb15aad2 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
setApprovalForAll 0xa22cb465
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
Write Contract 11 functions
These functions modify contract state and require a wallet transaction to execute.
mint 0xb77a147b
bytes32[] proof
publicMint 0x26092b83
No parameters
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setBaseURI 0x55f804b3
string newBaseURI
setPublicMintState 0x879fbedf
bool newMintState
setWhitelist 0x440bc7f3
bytes32 _dedicatedMerkleRoot
setWhitelistMintState 0xc6a768f4
bool newMintState
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
Top Interactions
| Address | Txns | Sent | Received |
|---|---|---|---|
| 0xA7df842D...d5EE | 3 | 3 |
Recent Transactions
|
| Hash | Block | Age | From/To | Value | |
|---|---|---|---|---|---|
| 0x4dcc57aa...8d2b0b Fail | 24,311,838 | IN | 0xA7df842D...d5EE | 0 ETH | |
| 0xe29657af...d01e55 Fail | 24,291,825 | IN | 0xA7df842D...d5EE | 0 ETH | |
| 0x6b65b02b...24e93d Fail | 24,291,823 | IN | 0xA7df842D...d5EE | 0 ETH |