Address Contract Partially Verified
Address
0x224Dc4df2A55c6C64B7223845895a703E542c258
Balance
0 ETH
Nonce
1
Code Size
14876 bytes
Creator
0x4fa8035D...00B6 at tx 0xdee2b71d...fd06e8
Indexed Transactions
0
Contract Bytecode
14876 bytes
0x60806040526004361061020f5760003560e01c80637cb6475911610118578063a22cb465116100a0578063d2cab0561161006f578063d2cab0561461072e578063d5abeb011461074a578063e640cf7d14610775578063e985e9c5146107a0578063f2fde38b146107dd5761020f565b8063a22cb46514610683578063b88d4fde146106ac578063c3b754dc146106c8578063c87b56dd146106f15761020f565b806395d89b41116100e757806395d89b41146105bf57806396ea3a47146105ea578063a035b1fe14610613578063a0712d681461063e578063a0bcfc7f1461065a5761020f565b80637cb6475914610519578063841718a6146105425780638da5cb5b1461056b57806391b7f5ed146105965761020f565b806331ffd6f11161019b5780634a65a5751161016a5780634a65a575146104365780636352211e1461045f5780636f8b44b01461049c57806370a08231146104c5578063715018a6146105025761020f565b806331ffd6f1146103ad57806333bc1c5c146103d85780633ccfd60b1461040357806342842e0e1461041a5761020f565b806316ba10e0116101e257806316ba10e0146102d557806318160ddd146102fe5780631e7269c51461032957806323b872dd146103665780632eb4a7ab146103825761020f565b806301ffc9a71461021457806306fdde0314610251578063081812fc1461027c578063095ea7b3146102b9575b600080fd5b34801561022057600080fd5b5061023b60048036038101906102369190612af8565b610806565b6040516102489190613076565b60405180910390f35b34801561025d57600080fd5b50610266610898565b60405161027391906130ac565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612b9f565b61092a565b6040516102b0919061300f565b60405180910390f35b6102d360048036038101906102ce91906129dd565b6109a9565b005b3480156102e157600080fd5b506102fc60048036038101906102f79190612b52565b610aed565b005b34801561030a57600080fd5b50610313610b0b565b604051610320919061328e565b60405180910390f35b34801561033557600080fd5b50610350600480360381019061034b919061285a565b610b22565b60405161035d919061328e565b60405180910390f35b610380600480360381019061037b91906128c7565b610b3a565b005b34801561038e57600080fd5b50610397610e5f565b6040516103a49190613091565b60405180910390f35b3480156103b957600080fd5b506103c2610e65565b6040516103cf9190613076565b60405180910390f35b3480156103e457600080fd5b506103ed610e78565b6040516103fa9190613076565b60405180910390f35b34801561040f57600080fd5b50610418610e8b565b005b610434600480360381019061042f91906128c7565b610ea6565b005b34801561044257600080fd5b5061045d60048036038101906104589190612b9f565b610ec6565b005b34801561046b57600080fd5b5061048660048036038101906104819190612b9f565b610ed8565b604051610493919061300f565b60405180910390f35b3480156104a857600080fd5b506104c360048036038101906104be9190612b9f565b610eea565b005b3480156104d157600080fd5b506104ec60048036038101906104e7919061285a565b610f46565b6040516104f9919061328e565b60405180910390f35b34801561050e57600080fd5b50610517610fff565b005b34801561052557600080fd5b50610540600480360381019061053b9190612acb565b611013565b005b34801561054e57600080fd5b5061056960048036038101906105649190612a9e565b611025565b005b34801561057757600080fd5b5061058061104a565b60405161058d919061300f565b60405180910390f35b3480156105a257600080fd5b506105bd60048036038101906105b89190612b9f565b611074565b005b3480156105cb57600080fd5b506105d4611086565b6040516105e191906130ac565b60405180910390f35b3480156105f657600080fd5b50610611600480360381019061060c9190612a1d565b611118565b005b34801561061f57600080fd5b50610628611282565b604051610635919061328e565b60405180910390f35b61065860048036038101906106539190612b9f565b611288565b005b34801561066657600080fd5b50610681600480360381019061067c9190612b52565b611545565b005b34801561068f57600080fd5b506106aa60048036038101906106a5919061299d565b611563565b005b6106c660048036038101906106c1919061291a565b61166e565b005b3480156106d457600080fd5b506106ef60048036038101906106ea9190612a9e565b6116e1565b005b3480156106fd57600080fd5b5061071860048036038101906107139190612b9f565b611706565b60405161072591906130ac565b60405180910390f35b61074860048036038101906107439190612bcc565b6117a8565b005b34801561075657600080fd5b5061075f611a7e565b60405161076c919061328e565b60405180910390f35b34801561078157600080fd5b5061078a611a84565b604051610797919061328e565b60405180910390f35b3480156107ac57600080fd5b506107c760048036038101906107c29190612887565b611a8a565b6040516107d49190613076565b60405180910390f35b3480156107e957600080fd5b5061080460048036038101906107ff919061285a565b611b1e565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061086157506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108915750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6060600280546108a7906134d2565b80601f01602080910402602001604051908101604052809291908181526020018280546108d3906134d2565b80156109205780601f106108f557610100808354040283529160200191610920565b820191906000526020600020905b81548152906001019060200180831161090357829003601f168201915b5050505050905090565b600061093582611ba2565b61096b576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006109b482610ed8565b90508073ffffffffffffffffffffffffffffffffffffffff166109d5611c01565b73ffffffffffffffffffffffffffffffffffffffff1614610a3857610a01816109fc611c01565b611a8a565b610a37576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b610af5611c09565b818160109190610b06929190612571565b505050565b6000610b15611c87565b6001546000540303905090565b60096020528060005260406000206000915090505481565b6000610b4582611c8c565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610bac576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610bb884611d5a565b91509150610bce8187610bc9611c01565b611d81565b610c1a57610be386610bde611c01565b611a8a565b610c19576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610c81576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c8e8686866001611dc5565b8015610c9957600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550610d6785610d43888887611dcb565b7c020000000000000000000000000000000000000000000000000000000017611df3565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084161415610def576000600185019050600060046000838152602001908152602001600020541415610ded576000548114610dec578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610e578686866001611e1e565b505050505050565b600a5481565b600e60019054906101000a900460ff1681565b600e60009054906101000a900460ff1681565b610e93611c09565b610ea4610e9e61104a565b47611e24565b565b610ec18383836040518060200160405280600081525061166e565b505050565b610ece611c09565b80600c8190555050565b6000610ee382611c8c565b9050919050565b610ef2611c09565b610efa610b0b565b811015610f3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f339061314e565b60405180910390fd5b80600d8190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fae576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611007611c09565b6110116000611f18565b565b61101b611c09565b80600a8190555050565b61102d611c09565b80600e60006101000a81548160ff02191690831515021790555050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61107c611c09565b80600b8190555050565b606060038054611095906134d2565b80601f01602080910402602001604051908101604052809291908181526020018280546110c1906134d2565b801561110e5780601f106110e35761010080835404028352916020019161110e565b820191906000526020600020905b8154815290600101906020018083116110f157829003601f168201915b5050505050905090565b611120611c09565b818190508484905014611168576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115f9061324e565b60405180910390fd5b600080611173610b0b565b905060005b868690508110156111bb5786868281811061119657611195613600565b5b90506020020135836111a89190613362565b9250806111b490613535565b9050611178565b50600d5482826111cb9190613362565b111561120c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112039061326e565b60405180910390fd5b6000915060005b848490508110156112795761126885858381811061123457611233613600565b5b9050602002016020810190611249919061285a565b88888481811061125c5761125b613600565b5b90506020020135611fde565b8061127290613535565b9050611213565b50505050505050565b600b5481565b3373ffffffffffffffffffffffffffffffffffffffff166112a761104a565b73ffffffffffffffffffffffffffffffffffffffff16141561132957600d54816112cf610b0b565b6112d99190613362565b111561131a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611311906130ee565b60405180910390fd5b6113243382611fde565b611542565b600e60009054906101000a900460ff16611378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136f9061310e565b60405180910390fd5b600d5481611384610b0b565b61138e9190613362565b11156113cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c6906130ee565b60405180910390fd5b600c54811115611414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140b906131ee565b60405180910390fd5b80600b5461142291906133b8565b341015611464576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145b9061312e565b60405180910390fd5b600c5481600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b29190613362565b11156114f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ea9061320e565b60405180910390fd5b80600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115413382611fde565b5b50565b61154d611c09565b8181600f919061155e929190612571565b505050565b8060076000611570611c01565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661161d611c01565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516116629190613076565b60405180910390a35050565b611679848484610b3a565b60008373ffffffffffffffffffffffffffffffffffffffff163b146116db576116a484848484611ffc565b6116da576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6116e9611c09565b80600e60016101000a81548160ff02191690831515021790555050565b606061171182611ba2565b611747576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061175161215c565b905060008151141561177257604051806020016040528060008152506117a0565b8061177c846121ee565b601060405160200161179093929190612fc9565b6040516020818303038152906040525b915050919050565b600e60019054906101000a900460ff166117f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ee906131ae565b60405180910390fd5b600d5483611803610b0b565b61180d9190613362565b111561184e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611845906130ee565b60405180910390fd5b600c54831115611893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188a906131ee565b60405180910390fd5b82600b546118a191906133b8565b3410156118e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118da9061312e565b60405180910390fd5b600c5483600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119319190613362565b1115611972576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119699061320e565b60405180910390fd5b6000336040516020016119859190612fae565b6040516020818303038152906040528051906020012090506119eb838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050600a5483612247565b611a2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a219061322e565b60405180910390fd5b83600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a783385611fde565b50505050565b600d5481565b600c5481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611b26611c09565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8d906130ce565b60405180910390fd5b611b9f81611f18565b50565b600081611bad611c87565b11158015611bbc575060005482105b8015611bfa575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b611c1161225e565b73ffffffffffffffffffffffffffffffffffffffff16611c2f61104a565b73ffffffffffffffffffffffffffffffffffffffff1614611c85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7c906131ce565b60405180910390fd5b565b600090565b60008082905080611c9b611c87565b11611d2357600054811015611d225760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415611d20575b6000811415611d16576004600083600190039350838152602001908152602001600020549050611ceb565b8092505050611d55565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8611de2868684612266565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b80471015611e67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e5e9061318e565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051611e8d90612ffa565b60006040518083038185875af1925050503d8060008114611eca576040519150601f19603f3d011682016040523d82523d6000602084013e611ecf565b606091505b5050905080611f13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f0a9061316e565b60405180910390fd5b505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611ff882826040518060200160405280600081525061226f565b5050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612022611c01565b8786866040518563ffffffff1660e01b8152600401612044949392919061302a565b602060405180830381600087803b15801561205e57600080fd5b505af192505050801561208f57506040513d601f19601f8201168201806040525081019061208c9190612b25565b60015b612109573d80600081146120bf576040519150601f19603f3d011682016040523d82523d6000602084013e6120c4565b606091505b50600081511415612101576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6060600f805461216b906134d2565b80601f0160208091040260200160405190810160405280929190818152602001828054612197906134d2565b80156121e45780601f106121b9576101008083540402835291602001916121e4565b820191906000526020600020905b8154815290600101906020018083116121c757829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b60011561223257600184039350600a81066030018453600a810490508061222d57612232565b612207565b50828103602084039350808452505050919050565b600082612254858461230c565b1490509392505050565b600033905090565b60009392505050565b6122798383612362565b60008373ffffffffffffffffffffffffffffffffffffffff163b1461230757600080549050600083820390505b6122b96000868380600101945086611ffc565b6122ef576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181106122a657816000541461230457600080fd5b50505b505050565b60008082905060005b8451811015612357576123428286838151811061233557612334613600565b5b602002602001015161251f565b9150808061234f90613535565b915050612315565b508091505092915050565b60008054905060008214156123a3576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123b06000848385611dc5565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612427836124186000866000611dcb565b6124218561254a565b17611df3565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b8181146124c857808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460018101905061248d565b506000821415612504576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600081905550505061251a6000848385611e1e565b505050565b600081831061253757612532828461255a565b612542565b612541838361255a565b5b905092915050565b60006001821460e11b9050919050565b600082600052816020526040600020905092915050565b82805461257d906134d2565b90600052602060002090601f01602090048101928261259f57600085556125e6565b82601f106125b857803560ff19168380011785556125e6565b828001600101855582156125e6579182015b828111156125e55782358255916020019190600101906125ca565b5b5090506125f391906125f7565b5090565b5b808211156126105760008160009055506001016125f8565b5090565b6000612627612622846132ce565b6132a9565b9050828152602081018484840111156126435761264261366d565b5b61264e848285613490565b509392505050565b60008135905061266581613973565b92915050565b60008083601f84011261268157612680613663565b5b8235905067ffffffffffffffff81111561269e5761269d61365e565b5b6020830191508360208202830111156126ba576126b9613668565b5b9250929050565b60008083601f8401126126d7576126d6613663565b5b8235905067ffffffffffffffff8111156126f4576126f361365e565b5b6020830191508360208202830111156127105761270f613668565b5b9250929050565b60008083601f84011261272d5761272c613663565b5b8235905067ffffffffffffffff81111561274a5761274961365e565b5b60208301915083602082028301111561276657612765613668565b5b9250929050565b60008135905061277c8161398a565b92915050565b600081359050612791816139a1565b92915050565b6000813590506127a6816139b8565b92915050565b6000815190506127bb816139b8565b92915050565b600082601f8301126127d6576127d5613663565b5b81356127e6848260208601612614565b91505092915050565b60008083601f84011261280557612804613663565b5b8235905067ffffffffffffffff8111156128225761282161365e565b5b60208301915083600182028301111561283e5761283d613668565b5b9250929050565b600081359050612854816139cf565b92915050565b6000602082840312156128705761286f613677565b5b600061287e84828501612656565b91505092915050565b6000806040838503121561289e5761289d613677565b5b60006128ac85828601612656565b92505060206128bd85828601612656565b9150509250929050565b6000806000606084860312156128e0576128df613677565b5b60006128ee86828701612656565b93505060206128ff86828701612656565b925050604061291086828701612845565b9150509250925092565b6000806000806080858703121561293457612933613677565b5b600061294287828801612656565b945050602061295387828801612656565b935050604061296487828801612845565b925050606085013567ffffffffffffffff81111561298557612984613672565b5b612991878288016127c1565b91505092959194509250565b600080604083850312156129b4576129b3613677565b5b60006129c285828601612656565b92505060206129d38582860161276d565b9150509250929050565b600080604083850312156129f4576129f3613677565b5b6000612a0285828601612656565b9250506020612a1385828601612845565b9150509250929050565b60008060008060408587031215612a3757612a36613677565b5b600085013567ffffffffffffffff811115612a5557612a54613672565b5b612a6187828801612717565b9450945050602085013567ffffffffffffffff811115612a8457612a83613672565b5b612a908782880161266b565b925092505092959194509250565b600060208284031215612ab457612ab3613677565b5b6000612ac28482850161276d565b91505092915050565b600060208284031215612ae157612ae0613677565b5b6000612aef84828501612782565b91505092915050565b600060208284031215612b0e57612b0d613677565b5b6000612b1c84828501612797565b91505092915050565b600060208284031215612b3b57612b3a613677565b5b6000612b49848285016127ac565b91505092915050565b60008060208385031215612b6957612b68613677565b5b600083013567ffffffffffffffff811115612b8757612b86613672565b5b612b93858286016127ef565b92509250509250929050565b600060208284031215612bb557612bb4613677565b5b6000612bc384828501612845565b91505092915050565b600080600060408486031215612be557612be4613677565b5b6000612bf386828701612845565b935050602084013567ffffffffffffffff811115612c1457612c13613672565b5b612c20868287016126c1565b92509250509250925092565b612c3581613412565b82525050565b612c4c612c4782613412565b61357e565b82525050565b612c5b81613424565b82525050565b612c6a81613430565b82525050565b6000612c7b82613314565b612c85818561332a565b9350612c9581856020860161349f565b612c9e8161367c565b840191505092915050565b6000612cb48261331f565b612cbe8185613346565b9350612cce81856020860161349f565b612cd78161367c565b840191505092915050565b6000612ced8261331f565b612cf78185613357565b9350612d0781856020860161349f565b80840191505092915050565b60008154612d20816134d2565b612d2a8186613357565b94506001821660008114612d455760018114612d5657612d89565b60ff19831686528186019350612d89565b612d5f856132ff565b60005b83811015612d8157815481890152600182019150602081019050612d62565b838801955050505b50505092915050565b6000612d9f602683613346565b9150612daa8261369a565b604082019050919050565b6000612dc2601383613346565b9150612dcd826136e9565b602082019050919050565b6000612de5600f83613346565b9150612df082613712565b602082019050919050565b6000612e08601283613346565b9150612e138261373b565b602082019050919050565b6000612e2b602e83613346565b9150612e3682613764565b604082019050919050565b6000612e4e603a83613346565b9150612e59826137b3565b604082019050919050565b6000612e71601d83613346565b9150612e7c82613802565b602082019050919050565b6000612e94601483613346565b9150612e9f8261382b565b602082019050919050565b6000612eb7602083613346565b9150612ec282613854565b602082019050919050565b6000612eda600883613346565b9150612ee58261387d565b602082019050919050565b6000612efd60008361333b565b9150612f08826138a6565b600082019050919050565b6000612f20601283613346565b9150612f2b826138a9565b602082019050919050565b6000612f43600f83613346565b9150612f4e826138d2565b602082019050919050565b6000612f66602c83613346565b9150612f71826138fb565b604082019050919050565b6000612f89601983613346565b9150612f948261394a565b602082019050919050565b612fa881613486565b82525050565b6000612fba8284612c3b565b60148201915081905092915050565b6000612fd58286612ce2565b9150612fe18285612ce2565b9150612fed8284612d13565b9150819050949350505050565b600061300582612ef0565b9150819050919050565b60006020820190506130246000830184612c2c565b92915050565b600060808201905061303f6000830187612c2c565b61304c6020830186612c2c565b6130596040830185612f9f565b818103606083015261306b8184612c70565b905095945050505050565b600060208201905061308b6000830184612c52565b92915050565b60006020820190506130a66000830184612c61565b92915050565b600060208201905081810360008301526130c68184612ca9565b905092915050565b600060208201905081810360008301526130e781612d92565b9050919050565b6000602082019050818103600083015261310781612db5565b9050919050565b6000602082019050818103600083015261312781612dd8565b9050919050565b6000602082019050818103600083015261314781612dfb565b9050919050565b6000602082019050818103600083015261316781612e1e565b9050919050565b6000602082019050818103600083015261318781612e41565b9050919050565b600060208201905081810360008301526131a781612e64565b9050919050565b600060208201905081810360008301526131c781612e87565b9050919050565b600060208201905081810360008301526131e781612eaa565b9050919050565b6000602082019050818103600083015261320781612ecd565b9050919050565b6000602082019050818103600083015261322781612f13565b9050919050565b6000602082019050818103600083015261324781612f36565b9050919050565b6000602082019050818103600083015261326781612f59565b9050919050565b6000602082019050818103600083015261328781612f7c565b9050919050565b60006020820190506132a36000830184612f9f565b92915050565b60006132b36132c4565b90506132bf8282613504565b919050565b6000604051905090565b600067ffffffffffffffff8211156132e9576132e861362f565b5b6132f28261367c565b9050602081019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061336d82613486565b915061337883613486565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133ad576133ac6135a2565b5b828201905092915050565b60006133c382613486565b91506133ce83613486565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613407576134066135a2565b5b828202905092915050565b600061341d82613466565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156134bd5780820151818401526020810190506134a2565b838111156134cc576000848401525b50505050565b600060028204905060018216806134ea57607f821691505b602082108114156134fe576134fd6135d1565b5b50919050565b61350d8261367c565b810181811067ffffffffffffffff8211171561352c5761352b61362f565b5b80604052505050565b600061354082613486565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613573576135726135a2565b5b600182019050919050565b600061358982613590565b9050919050565b600061359b8261368d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f6d617820737570706c7920657863656564656400000000000000000000000000600082015250565b7f73616c65206e6f74206163746976650000000000000000000000000000000000600082015250565b7f696e73756666696369656e742076616c75650000000000000000000000000000600082015250565b7f53706563696669656420737570706c79206973206c6f776572207468616e206360008201527f757272656e742062616c616e6365000000000000000000000000000000000000602082015250565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b7f77686974656c697374206e6f7420616374697665000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f746f6f206d616e79000000000000000000000000000000000000000000000000600082015250565b50565b7f616c7265616479206d696e746564206d61780000000000000000000000000000600082015250565b7f6e6f742077686974656c69737465640000000000000000000000000000000000600082015250565b7f4d7573742070726f7669646520657175616c207175616e74697469657320616e60008201527f6420726563697069656e74730000000000000000000000000000000000000000602082015250565b7f4d696e742f6f72646572206578636565647320737570706c7900000000000000600082015250565b61397c81613412565b811461398757600080fd5b50565b61399381613424565b811461399e57600080fd5b50565b6139aa81613430565b81146139b557600080fd5b50565b6139c18161343a565b81146139cc57600080fd5b50565b6139d881613486565b81146139e357600080fd5b5056fea264697066735822122008b4eb37b8513207fd97839494be5ed5e183153864aa83ea695525355f05264364736f6c63430008070033
Verified Source Code Partial Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: No
MeltedFacesReshape.sol 2096 lines
/**
*
*/
////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: 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;
}
}
/**
*
*/
////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* Cannot query the balance for the zero address.
*/
error BalanceQueryForZeroAddress();
/**
* Cannot mint to the zero address.
*/
error MintToZeroAddress();
/**
* The quantity of tokens minted must be more than zero.
*/
error MintZeroQuantity();
/**
* The token does not exist.
*/
error OwnerQueryForNonexistentToken();
/**
* The caller must own the token or be an approved operator.
*/
error TransferCallerNotOwnerNorApproved();
/**
* The token must be owned by `from`.
*/
error TransferFromIncorrectOwner();
/**
* Cannot safely transfer to a contract that does not implement the
* ERC721Receiver interface.
*/
error TransferToNonERC721ReceiverImplementer();
/**
* Cannot transfer to the zero address.
*/
error TransferToZeroAddress();
/**
* The token does not exist.
*/
error URIQueryForNonexistentToken();
/**
* The `quantity` minted with ERC2309 exceeds the safety limit.
*/
error MintERC2309QuantityExceedsLimit();
/**
* The `extraData` cannot be set on an unintialized ownership slot.
*/
error OwnershipNotInitializedForExtraData();
// =============================================================
// STRUCTS
// =============================================================
struct TokenOwnership {
// The address of the owner.
address addr;
// Stores the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
// Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
uint24 extraData;
}
// =============================================================
// TOKEN COUNTERS
// =============================================================
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() external view returns (uint256);
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
// =============================================================
// IERC721
// =============================================================
/**
* @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,
bytes calldata data
) external payable;
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external payable;
/**
* @dev Transfers `tokenId` 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 payable;
/**
* @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 payable;
/**
* @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 the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @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);
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @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);
// =============================================================
// IERC2309
// =============================================================
/**
* @dev Emitted when tokens in `fromTokenId` to `toTokenId`
* (inclusive) is transferred from `from` to `to`, as defined in the
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
*
* See {_mintERC2309} for more details.
*/
event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}
/**
*
*/
////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT
// OpenZeppelin Contracts (last updated v4.7.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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
/**
*
*/
////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Tree 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.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
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 Calldata version of {verify}
*
* _Available since v4.7._
*/
function verifyCalldata(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProofCalldata(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle 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++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Calldata version of {processProof}
*
* _Available since v4.7._
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
/**
* @dev Calldata version of {multiProofVerify}
*
* _Available since v4.7._
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
* consuming from one or the other at each step according to the instructions given by
* `proofFlags`.
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}
*
* _Available since v4.7._
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
/**
*
*/
////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
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);
}
}
/**
*
*/
////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
////import './IERC721A.sol';
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @title ERC721A
*
* @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
* Non-Fungible Token Standard, including the Metadata extension.
* Optimized for lower gas during batch mints.
*
* Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
* starting from `_startTokenId()`.
*
* Assumptions:
*
* - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
* - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
struct TokenApprovalRef {
address value;
}
// =============================================================
// CONSTANTS
// =============================================================
// Mask of an entry in packed address data.
uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
// The bit position of `numberMinted` in packed address data.
uint256 private constant _BITPOS_NUMBER_MINTED = 64;
// The bit position of `numberBurned` in packed address data.
uint256 private constant _BITPOS_NUMBER_BURNED = 128;
// The bit position of `aux` in packed address data.
uint256 private constant _BITPOS_AUX = 192;
// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
// The bit position of `startTimestamp` in packed ownership.
uint256 private constant _BITPOS_START_TIMESTAMP = 160;
// The bit mask of the `burned` bit in packed ownership.
uint256 private constant _BITMASK_BURNED = 1 << 224;
// The bit position of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;
// The bit mask of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;
// The bit position of `extraData` in packed ownership.
uint256 private constant _BITPOS_EXTRA_DATA = 232;
// Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
// The mask of the lower 160 bits for addresses.
uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
// The maximum `quantity` that can be minted with {_mintERC2309}.
// This limit is to prevent overflows on the address data entries.
// For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
// is required to cause an overflow, which is unrealistic.
uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
// The `Transfer` event signature is given by:
// `keccak256(bytes("Transfer(address,address,uint256)"))`.
bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 private _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See {_packedOwnershipOf} implementation for details.
//
// Bits Layout:
// - [0..159] `addr`
// - [160..223] `startTimestamp`
// - [224] `burned`
// - [225] `nextInitialized`
// - [232..255] `extraData`
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// =============================================================
// CONSTRUCTOR
// =============================================================
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
// =============================================================
// TOKEN COUNTING OPERATIONS
// =============================================================
/**
* @dev Returns the starting token ID.
* To change the starting token ID, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Returns the next token ID to be minted.
*/
function _nextTokenId() internal view virtual returns (uint256) {
return _currentIndex;
}
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() public view virtual override returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than `_currentIndex - _startTokenId()` times.
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
/**
* @dev Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view virtual returns (uint256) {
// Counter underflow is impossible as `_currentIndex` does not decrement,
// and it is initialized to `_startTokenId()`.
unchecked {
return _currentIndex - _startTokenId();
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return _burnCounter;
}
// =============================================================
// ADDRESS DATA OPERATIONS
// =============================================================
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
}
/**
* Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal virtual {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
_packedAddressData[owner] = packed;
}
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
// The interface IDs are constants representing the first 4 bytes
// of the XOR of all function selectors in the interface.
// See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
// (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
return
interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
}
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
}
/**
* @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, it can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
// =============================================================
// OWNERSHIPS OPERATIONS
// =============================================================
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
/**
* @dev Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around over time.
*/
function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
/**
* @dev Returns the unpacked `TokenOwnership` struct at `index`.
*/
function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr)
if (curr < _currentIndex) {
uint256 packed = _packedOwnerships[curr];
// If not burned.
if (packed & _BITMASK_BURNED == 0) {
// Invariant:
// There will always be an initialized ownership slot
// (i.e. `ownership.addr != address(0) && ownership.burned == false`)
// before an unintialized ownership slot
// (i.e. `ownership.addr == address(0) && ownership.burned == false`)
// Hence, `curr` will not underflow.
//
// We can directly compare the packed value.
// If the address is zero, packed will be zero.
while (packed == 0) {
packed = _packedOwnerships[--curr];
}
return packed;
}
}
}
revert OwnerQueryForNonexistentToken();
}
/**
* @dev Returns the unpacked `TokenOwnership` struct from `packed`.
*/
function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
ownership.addr = address(uint160(packed));
ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
ownership.burned = packed & _BITMASK_BURNED != 0;
ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
}
/**
* @dev Packs ownership data into a single uint256.
*/
function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
}
}
/**
* @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
*/
function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
// For branchless setting of the `nextInitialized` flag.
assembly {
// `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
}
}
// =============================================================
// APPROVAL OPERATIONS
// =============================================================
/**
* @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) public payable virtual override {
address owner = ownerOf(tokenId);
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_tokenApprovals[tokenId].value = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId].value;
}
/**
* @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) public virtual override {
_operatorApprovals[_msgSenderERC721A()][operator] = approved;
emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
}
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @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. See {_mint}.
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return
_startTokenId() <= tokenId &&
tokenId < _currentIndex && // If within bounds,
_packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
}
/**
* @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
*/
function _isSenderApprovedOrOwner(
address approvedAddress,
address owner,
address msgSender
) private pure returns (bool result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
msgSender := and(msgSender, _BITMASK_ADDRESS)
// `msgSender == owner || msgSender == approvedAddress`.
result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
}
}
/**
* @dev Returns the storage slot and value for the approved address of `tokenId`.
*/
function _getApprovedSlotAndAddress(uint256 tokenId)
private
view
returns (uint256 approvedAddressSlot, address approvedAddress)
{
TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
// The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
assembly {
approvedAddressSlot := tokenApproval.slot
approvedAddress := sload(approvedAddressSlot)
...
// [truncated — 76791 bytes total]
Read Contract
balanceOf 0x70a08231 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
maxQuantity 0xe640cf7d → uint256
maxSupply 0xd5abeb01 → uint256
merkleRoot 0x2eb4a7ab → bytes32
minted 0x1e7269c5 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
price 0xa035b1fe → uint256
publicSale 0x33bc1c5c → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
whitelistSale 0x31ffd6f1 → bool
Write Contract 19 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
gift 0x96ea3a47
uint256[] quantity
address[] recipient
mint 0xa0712d68
uint256 quantity
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseUri 0xa0bcfc7f
string base_uri
setMaxQuantity 0x4a65a575
uint256 new_max_quantity
setMaxSupply 0x6f8b44b0
uint256 max_supply
setMerkleRoot 0x7cb64759
bytes32 merkle_root
setPrice 0x91b7f5ed
uint256 new_price
setSaleActive 0x841718a6
bool sale_active
setUriSuffix 0x16ba10e0
string uri_suffix
setWhitelistActive 0xc3b754dc
bool wl_active
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
whitelistMint 0xd2cab056
uint256 quantity
bytes32[] proof
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address