Address Contract Partially Verified
Address
0xEe31eA1F63cAb8387222551C469E31D189711Cf7
Balance
0 ETH
Nonce
1
Code Size
16666 bytes
Creator
0xF6437797...d49e at tx 0x87134575...c67c85
Indexed Transactions
0
Contract Bytecode
16666 bytes
0x6080604052600436106101c25760003560e01c806370a08231116100f7578063ba26d98711610095578063e985e9c511610064578063e985e9c51461061f578063f2c4ce1e1461065c578063f2fde38b14610685578063fc31f0bf146106ae576101c2565b8063ba26d98714610561578063c16ccf3b1461058c578063c87b56dd146105b7578063e8a3d485146105f4576101c2565b806395d89b41116100d157806395d89b41146104c8578063a0712d68146104f3578063a22cb4651461050f578063b88d4fde14610538576101c2565b806370a0823114610449578063715018a6146104865780638da5cb5b1461049d576101c2565b806342842e0e116101645780634bdbb80d1161013e5780634bdbb80d1461038f57806351cff8d9146103ba57806355f804b3146103e35780636352211e1461040c576101c2565b806342842e0e146103145780634891ad881461033d57806349a5980a14610366576101c2565b8063095ea7b3116101a0578063095ea7b31461026c57806313faede61461029557806318160ddd146102c057806323b872dd146102eb576101c2565b806301ffc9a7146101c757806306fdde0314610204578063081812fc1461022f575b600080fd5b3480156101d357600080fd5b506101ee60048036038101906101e991906130d6565b6106d7565b6040516101fb91906135bd565b60405180910390f35b34801561021057600080fd5b50610219610769565b60405161022691906135f3565b60405180910390f35b34801561023b57600080fd5b50610256600480360381019061025191906131a6565b6107fb565b6040516102639190613556565b60405180910390f35b34801561027857600080fd5b50610293600480360381019061028e9190612f9d565b610877565b005b3480156102a157600080fd5b506102aa610a1e565b6040516102b791906137b5565b60405180910390f35b3480156102cc57600080fd5b506102d5610a24565b6040516102e291906137b5565b60405180910390f35b3480156102f757600080fd5b50610312600480360381019061030d9190612e87565b610a3b565b005b34801561032057600080fd5b5061033b60048036038101906103369190612e87565b610a4b565b005b34801561034957600080fd5b50610364600480360381019061035f9190613130565b610a6b565b005b34801561037257600080fd5b5061038d600480360381019061038891906130a9565b610b49565b005b34801561039b57600080fd5b506103a4610be2565b6040516103b191906137b5565b60405180910390f35b3480156103c657600080fd5b506103e160048036038101906103dc9190612e1a565b610be8565b005b3480156103ef57600080fd5b5061040a6004803603810190610405919061315d565b610cb4565b005b34801561041857600080fd5b50610433600480360381019061042e91906131a6565b610d4a565b6040516104409190613556565b60405180910390f35b34801561045557600080fd5b50610470600480360381019061046b9190612ded565b610d5c565b60405161047d91906137b5565b60405180910390f35b34801561049257600080fd5b5061049b610e15565b005b3480156104a957600080fd5b506104b2610e9d565b6040516104bf9190613556565b60405180910390f35b3480156104d457600080fd5b506104dd610ec7565b6040516104ea91906135f3565b60405180910390f35b61050d600480360381019061050891906131a6565b610f59565b005b34801561051b57600080fd5b5061053660048036038101906105319190612f5d565b6111b6565b005b34801561054457600080fd5b5061055f600480360381019061055a9190612eda565b61132e565b005b34801561056d57600080fd5b506105766113a1565b60405161058391906137b5565b60405180910390f35b34801561059857600080fd5b506105a16113a7565b6040516105ae91906135d8565b60405180910390f35b3480156105c357600080fd5b506105de60048036038101906105d991906131a6565b6113ba565b6040516105eb91906135f3565b60405180910390f35b34801561060057600080fd5b506106096114db565b60405161061691906135f3565b60405180910390f35b34801561062b57600080fd5b5061064660048036038101906106419190612e47565b6114fb565b60405161065391906135bd565b60405180910390f35b34801561066857600080fd5b50610683600480360381019061067e919061315d565b61158f565b005b34801561069157600080fd5b506106ac60048036038101906106a79190612ded565b611625565b005b3480156106ba57600080fd5b506106d560048036038101906106d09190612fdd565b61171d565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061073257506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107625750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60606002805461077890613b09565b80601f01602080910402602001604051908101604052809291908181526020018280546107a490613b09565b80156107f15780601f106107c6576101008083540402835291602001916107f1565b820191906000526020600020905b8154815290600101906020018083116107d457829003601f168201915b5050505050905090565b60006108068261185b565b61083c576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610882826118ba565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108ea576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610909611988565b73ffffffffffffffffffffffffffffffffffffffff161461096c5761093581610930611988565b6114fb565b61096b576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600b5481565b6000610a2e611990565b6001546000540303905090565b610a46838383611995565b505050565b610a668383836040518060200160405280600081525061132e565b505050565b610a73611d3f565b73ffffffffffffffffffffffffffffffffffffffff16610a91610e9d565b73ffffffffffffffffffffffffffffffffffffffff1614610ae7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ade90613715565b60405180910390fd5b80601260006101000a81548160ff02191690836002811115610b0c57610b0b613c44565b5b021790555060016002811115610b2557610b24613c44565b5b816002811115610b3857610b37613c44565b5b1415610b4657426014819055505b50565b610b51611d3f565b73ffffffffffffffffffffffffffffffffffffffff16610b6f610e9d565b73ffffffffffffffffffffffffffffffffffffffff1614610bc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbc90613715565b60405180910390fd5b80600d60006101000a81548160ff02191690831515021790555050565b600a5481565b610bf0611d3f565b73ffffffffffffffffffffffffffffffffffffffff16610c0e610e9d565b73ffffffffffffffffffffffffffffffffffffffff1614610c64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5b90613715565b60405180910390fd5b60004790508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610caf573d6000803e3d6000fd5b505050565b610cbc611d3f565b73ffffffffffffffffffffffffffffffffffffffff16610cda610e9d565b73ffffffffffffffffffffffffffffffffffffffff1614610d30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2790613715565b60405180910390fd5b8060099080519060200190610d46929190612a71565b5050565b6000610d55826118ba565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dc4576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b610e1d611d3f565b73ffffffffffffffffffffffffffffffffffffffff16610e3b610e9d565b73ffffffffffffffffffffffffffffffffffffffff1614610e91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8890613715565b60405180910390fd5b610e9b6000611d47565b565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060038054610ed690613b09565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0290613b09565b8015610f4f5780601f10610f2457610100808354040283529160200191610f4f565b820191906000526020600020905b815481529060010190602001808311610f3257829003601f168201915b5050505050905090565b60016002811115610f6d57610f6c613c44565b5b601260009054906101000a900460ff166002811115610f8f57610f8e613c44565b5b14610fcf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc6906136f5565b60405180910390fd5b60008111611012576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100990613775565b60405180910390fd5b600a54811115611057576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104e90613675565b60405180910390fd5b600f54611062610a24565b106110a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109990613615565b60405180910390fd5b60004290506202a3006014546110b89190613907565b8111156110cf57670214e8348c4f0000600b819055505b81600b546110dd919061398e565b34101561111f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111690613695565b60405180910390fd5b601454811015801561114157506201518060145461113d9190613907565b8111155b15611151576111508282611e0d565b5b620151806014546111629190613907565b8111801561118057506202a30060145461117c9190613907565b8111155b1561118f5761118e82611f1f565b5b6202a3006014546111a09190613907565b8111156111b2576111b13383612187565b5b5050565b6111be611988565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611223576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060076000611230611988565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166112dd611988565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161132291906135bd565b60405180910390a35050565b611339848484611995565b60008373ffffffffffffffffffffffffffffffffffffffff163b1461139b57611364848484846121a5565b61139a576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b60145481565b601260009054906101000a900460ff1681565b60606113c58261185b565b611404576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113fb906136b5565b60405180910390fd5b600d60009054906101000a900460ff16611479576000600e805461142790613b09565b9050116114435760405180602001604052806000815250611472565b600e61144e83612305565b600c60405160200161146293929190613525565b6040516020818303038152906040525b90506114d6565b60006009805461148890613b09565b9050116114a457604051806020016040528060008152506114d3565b60096114af83612305565b600c6040516020016114c393929190613525565b6040516020818303038152906040525b90505b919050565b606060405180608001604052806050815260200161409560509139905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611597611d3f565b73ffffffffffffffffffffffffffffffffffffffff166115b5610e9d565b73ffffffffffffffffffffffffffffffffffffffff161461160b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160290613715565b60405180910390fd5b80600e9080519060200190611621929190612a71565b5050565b61162d611d3f565b73ffffffffffffffffffffffffffffffffffffffff1661164b610e9d565b73ffffffffffffffffffffffffffffffffffffffff16146116a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169890613715565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611711576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170890613635565b60405180910390fd5b61171a81611d47565b50565b611725611d3f565b73ffffffffffffffffffffffffffffffffffffffff16611743610e9d565b73ffffffffffffffffffffffffffffffffffffffff1614611799576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161179090613715565b60405180910390fd5b60005b81518110156118575760405180604001604052806000815260200160011515815250601360008484815181106117d5576117d4613ca2565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548160ff021916908315150217905550905050808061184f90613b6c565b91505061179c565b5050565b600081611866611990565b11158015611875575060005482105b80156118b3575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600080829050806118c9611990565b11611951576000548110156119505760006004600083815260200190815260200160002054905060007c01000000000000000000000000000000000000000000000000000000008216141561194e575b6000811415611944576004600083600190039350838152602001908152602001600020549050611919565b8092505050611983565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b600033905090565b600090565b60006119a0826118ba565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611a07576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008473ffffffffffffffffffffffffffffffffffffffff16611a28611988565b73ffffffffffffffffffffffffffffffffffffffff161480611a575750611a5685611a51611988565b6114fb565b5b80611a9c5750611a65611988565b73ffffffffffffffffffffffffffffffffffffffff16611a84846107fb565b73ffffffffffffffffffffffffffffffffffffffff16145b905080611ad5576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611b3c576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b498585856001612466565b6006600084815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055507c020000000000000000000000000000000000000000000000000000000060a042901b611c468661246c565b1717600460008581526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000083161415611cd0576000600184019050600060046000838152602001908152602001600020541415611cce576000548114611ccd578260046000838152602001908152602001600020819055505b5b505b828473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611d388585856001612476565b5050505050565b600033905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611fd0611e18610a24565b10611e58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e4f90613795565b60405180910390fd5b61a8c0601454611e689190613907565b8110611ec957611e7661247c565b80611e855750611e84612521565b5b611ec4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ebb90613755565b60405180910390fd5b611f11565b611ed161247c565b611f10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f0790613755565b60405180910390fd5b5b611f1b3383612187565b5050565b6004811115611f63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f5a90613675565b60405180910390fd5b806010541015611fa8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f9f906136d5565b60405180910390fd5b611fb1336125e9565b611ff0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe790613755565b60405180910390fd5b601154601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410612076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206d90613655565b60405180910390fd5b60115481601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546120c79190613907565b1115612108576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ff90613735565b60405180910390fd5b6121123382612187565b80601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282546121649190613907565b92505081905550806010600082825461217d91906139e8565b9250508190555050565b6121a1828260405180602001604052806000815250612642565b5050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a026121cb611988565b8786866040518563ffffffff1660e01b81526004016121ed9493929190613571565b602060405180830381600087803b15801561220757600080fd5b505af192505050801561223857506040513d601f19601f820116820180604052508101906122359190613103565b60015b6122b2573d8060008114612268576040519150601f19603f3d011682016040523d82523d6000602084013e61226d565b606091505b506000815114156122aa576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6060600082141561234d576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612461565b600082905060005b6000821461237f57808061236890613b6c565b915050600a82612378919061395d565b9150612355565b60008167ffffffffffffffff81111561239b5761239a613cd1565b5b6040519080825280601f01601f1916602001820160405280156123cd5781602001600182028036833780820191505090505b5090505b6000851461245a576001826123e691906139e8565b9150600a856123f59190613bb5565b60306124019190613907565b60f81b81838151811061241757612416613ca2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612453919061395d565b94506123d1565b8093505050505b919050565b50505050565b6000819050919050565b50505050565b60006124a9601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166128f7565b806124db57506124da601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166128f7565b5b806124ea57506124e9612999565b5b8061251c575061251b601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166128f7565b5b905090565b600061254e601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166128f7565b80612580575061257f601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166128f7565b5b806125b257506125b1601a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166128f7565b5b806125e457506125e3601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166128f7565b5b905090565b6000601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900460ff169050919050565b600080549050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156126af576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008314156126ea576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126f76000858386612466565b600160406001901b178302600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555060e161275c60018514612a67565b901b60a042901b61276c8661246c565b1717600460008381526020019081526020016000208190555060008190506000848201905060008673ffffffffffffffffffffffffffffffffffffffff163b14612870575b818673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461282060008784806001019550876121a5565b612856576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8082106127b157826000541461286b57600080fd5b6128db565b5b818060010192508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4808210612871575b8160008190555050506128f16000858386612476565b50505050565b6000808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016129339190613556565b60206040518083038186803b15801561294b57600080fd5b505afa15801561295f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061298391906131d3565b1161298f576000612992565b60015b9050919050565b6000806000806000601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a006dfe1336040518263ffffffff1660e01b81526004016129fc9190613556565b60006040518083038186803b158015612a1457600080fd5b505afa158015612a28573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190612a519190613026565b9350935093509350600084511194505050505090565b6000819050919050565b828054612a7d90613b09565b90600052602060002090601f016020900481019282612a9f5760008555612ae6565b82601f10612ab857805160ff1916838001178555612ae6565b82800160010185558215612ae6579182015b82811115612ae5578251825591602001919060010190612aca565b5b509050612af39190612af7565b5090565b5b80821115612b10576000816000905550600101612af8565b5090565b6000612b27612b22846137f5565b6137d0565b90508083825260208201905082856020860282011115612b4a57612b49613d05565b5b60005b85811015612b7a5781612b608882612c78565b845260208401935060208301925050600181019050612b4d565b5050509392505050565b6000612b97612b9284613821565b6137d0565b90508083825260208201905082856020860282011115612bba57612bb9613d05565b5b60005b85811015612bea5781612bd08882612dd8565b845260208401935060208301925050600181019050612bbd565b5050509392505050565b6000612c07612c028461384d565b6137d0565b905082815260208101848484011115612c2357612c22613d0a565b5b612c2e848285613ac7565b509392505050565b6000612c49612c448461387e565b6137d0565b905082815260208101848484011115612c6557612c64613d0a565b5b612c70848285613ac7565b509392505050565b600081359050612c8781614011565b92915050565b600081519050612c9c81614011565b92915050565b600081359050612cb181614028565b92915050565b600082601f830112612ccc57612ccb613d00565b5b8135612cdc848260208601612b14565b91505092915050565b600082601f830112612cfa57612cf9613d00565b5b8151612d0a848260208601612b84565b91505092915050565b600081359050612d228161403f565b92915050565b600081359050612d3781614056565b92915050565b600081519050612d4c81614056565b92915050565b600082601f830112612d6757612d66613d00565b5b8135612d77848260208601612bf4565b91505092915050565b600081359050612d8f8161406d565b92915050565b600082601f830112612daa57612da9613d00565b5b8135612dba848260208601612c36565b91505092915050565b600081359050612dd28161407d565b92915050565b600081519050612de78161407d565b92915050565b600060208284031215612e0357612e02613d14565b5b6000612e1184828501612c78565b91505092915050565b600060208284031215612e3057612e2f613d14565b5b6000612e3e84828501612ca2565b91505092915050565b60008060408385031215612e5e57612e5d613d14565b5b6000612e6c85828601612c78565b9250506020612e7d85828601612c78565b9150509250929050565b600080600060608486031215612ea057612e9f613d14565b5b6000612eae86828701612c78565b9350506020612ebf86828701612c78565b9250506040612ed086828701612dc3565b9150509250925092565b60008060008060808587031215612ef457612ef3613d14565b5b6000612f0287828801612c78565b9450506020612f1387828801612c78565b9350506040612f2487828801612dc3565b925050606085013567ffffffffffffffff811115612f4557612f44613d0f565b5b612f5187828801612d52565b91505092959194509250565b60008060408385031215612f7457612f73613d14565b5b6000612f8285828601612c78565b9250506020612f9385828601612d13565b9150509250929050565b60008060408385031215612fb457612fb3613d14565b5b6000612fc285828601612c78565b9250506020612fd385828601612dc3565b9150509250929050565b600060208284031215612ff357612ff2613d14565b5b600082013567ffffffffffffffff81111561301157613010613d0f565b5b61301d84828501612cb7565b91505092915050565b600080600080608085870312156130405761303f613d14565b5b600085015167ffffffffffffffff81111561305e5761305d613d0f565b5b61306a87828801612ce5565b945050602061307b87828801612dd8565b935050604061308c87828801612dd8565b925050606061309d87828801612c8d565b91505092959194509250565b6000602082840312156130bf576130be613d14565b5b60006130cd84828501612d13565b91505092915050565b6000602082840312156130ec576130eb613d14565b5b60006130fa84828501612d28565b91505092915050565b60006020828403121561311957613118613d14565b5b600061312784828501612d3d565b91505092915050565b60006020828403121561314657613145613d14565b5b600061315484828501612d80565b91505092915050565b60006020828403121561317357613172613d14565b5b600082013567ffffffffffffffff81111561319157613190613d0f565b5b61319d84828501612d95565b91505092915050565b6000602082840312156131bc576131bb613d14565b5b60006131ca84828501612dc3565b91505092915050565b6000602082840312156131e9576131e8613d14565b5b60006131f784828501612dd8565b91505092915050565b61320981613a1c565b82525050565b61321881613a40565b82525050565b6000613229826138c4565b61323381856138da565b9350613243818560208601613ad6565b61324c81613d19565b840191505092915050565b61326081613ab5565b82525050565b6000613271826138cf565b61327b81856138eb565b935061328b818560208601613ad6565b61329481613d19565b840191505092915050565b60006132aa826138cf565b6132b481856138fc565b93506132c4818560208601613ad6565b80840191505092915050565b600081546132dd81613b09565b6132e781866138fc565b94506001821660008114613302576001811461331357613346565b60ff19831686528186019350613346565b61331c856138af565b60005b8381101561333e5781548189015260018201915060208101905061331f565b838801955050505b50505092915050565b600061335c6008836138eb565b915061336782613d2a565b602082019050919050565b600061337f6026836138eb565b915061338a82613d53565b604082019050919050565b60006133a2602c836138eb565b91506133ad82613da2565b604082019050919050565b60006133c5600f836138eb565b91506133d082613df1565b602082019050919050565b60006133e86012836138eb565b91506133f382613e1a565b602082019050919050565b600061340b6011836138eb565b915061341682613e43565b602082019050919050565b600061342e6025836138eb565b915061343982613e6c565b604082019050919050565b60006134516017836138eb565b915061345c82613ebb565b602082019050919050565b60006134746020836138eb565b915061347f82613ee4565b602082019050919050565b60006134976028836138eb565b91506134a282613f0d565b604082019050919050565b60006134ba6025836138eb565b91506134c582613f5c565b604082019050919050565b60006134dd6007836138eb565b91506134e882613fab565b602082019050919050565b60006135006010836138eb565b915061350b82613fd4565b602082019050919050565b61351f81613aab565b82525050565b600061353182866132d0565b915061353d828561329f565b915061354982846132d0565b9150819050949350505050565b600060208201905061356b6000830184613200565b92915050565b60006080820190506135866000830187613200565b6135936020830186613200565b6135a06040830185613516565b81810360608301526135b2818461321e565b905095945050505050565b60006020820190506135d2600083018461320f565b92915050565b60006020820190506135ed6000830184613257565b92915050565b6000602082019050818103600083015261360d8184613266565b905092915050565b6000602082019050818103600083015261362e8161334f565b9050919050565b6000602082019050818103600083015261364e81613372565b9050919050565b6000602082019050818103600083015261366e81613395565b9050919050565b6000602082019050818103600083015261368e816133b8565b9050919050565b600060208201905081810360008301526136ae816133db565b9050919050565b600060208201905081810360008301526136ce816133fe565b9050919050565b600060208201905081810360008301526136ee81613421565b9050919050565b6000602082019050818103600083015261370e81613444565b9050919050565b6000602082019050818103600083015261372e81613467565b9050919050565b6000602082019050818103600083015261374e8161348a565b9050919050565b6000602082019050818103600083015261376e816134ad565b9050919050565b6000602082019050818103600083015261378e816134d0565b9050919050565b600060208201905081810360008301526137ae816134f3565b9050919050565b60006020820190506137ca6000830184613516565b92915050565b60006137da6137eb565b90506137e68282613b3b565b919050565b6000604051905090565b600067ffffffffffffffff8211156138105761380f613cd1565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561383c5761383b613cd1565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561386857613867613cd1565b5b61387182613d19565b9050602081019050919050565b600067ffffffffffffffff82111561389957613898613cd1565b5b6138a282613d19565b9050602081019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600061391282613aab565b915061391d83613aab565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561395257613951613be6565b5b828201905092915050565b600061396882613aab565b915061397383613aab565b92508261398357613982613c15565b5b828204905092915050565b600061399982613aab565b91506139a483613aab565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139dd576139dc613be6565b5b828202905092915050565b60006139f382613aab565b91506139fe83613aab565b925082821015613a1157613a10613be6565b5b828203905092915050565b6000613a2782613a8b565b9050919050565b6000613a3982613a8b565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050613a8682613ffd565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000613ac082613a78565b9050919050565b82818337600083830152505050565b60005b83811015613af4578082015181840152602081019050613ad9565b83811115613b03576000848401525b50505050565b60006002820490506001821680613b2157607f821691505b60208210811415613b3557613b34613c73565b5b50919050565b613b4482613d19565b810181811067ffffffffffffffff82111715613b6357613b62613cd1565b5b80604052505050565b6000613b7782613aab565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613baa57613ba9613be6565b5b600182019050919050565b6000613bc082613aab565b9150613bcb83613aab565b925082613bdb57613bda613c15565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f536f6c64204f7574000000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f596f752068617665207265616368656420746865206d6178696d756d206e756d60008201527f626572206f66206d696e74730000000000000000000000000000000000000000602082015250565b7f546f6f206d616e79206d696e7473210000000000000000000000000000000000600082015250565b7f496e73756666696369656e742066756e64730000000000000000000000000000600082015250565b7f4e6f6e6578697374656e7420746f6b656e000000000000000000000000000000600082015250565b7f546f6f206d616e79206d696e747320666f72207468652072656d61696e696e6760008201527f204e465473000000000000000000000000000000000000000000000000000000602082015250565b7f5468652073616c65206973206e6f742073746172746564000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f546f6f206d616e79206d696e747320666f72207468652072656d61696e696e6760008201527f2062616c616e6365000000000000000000000000000000000000000000000000602082015250565b7f596f7520617265206e6f742077686974656c697374656420666f72207468697360008201527f2073616c65000000000000000000000000000000000000000000000000000000602082015250565b7f5265616c6c793f00000000000000000000000000000000000000000000000000600082015250565b7f5068617365203120536f6c64204f757400000000000000000000000000000000600082015250565b6003811061400e5761400d613c44565b5b50565b61401a81613a1c565b811461402557600080fd5b50565b61403181613a2e565b811461403c57600080fd5b50565b61404881613a40565b811461405357600080fd5b50565b61405f81613a4c565b811461406a57600080fd5b50565b6003811061407a57600080fd5b50565b61408681613aab565b811461409157600080fd5b5056fe68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d664a6177787961716843783458425154734a697936326837507133644a414158635a483931454879336f3265a264697066735822122055052eab54da472f447c61b12c936b8a716ed5b986b7b8bc7cce438ca103bb7d64736f6c63430008070033
Verified Source Code Partial Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: No
Welly.sol 192 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "ERC721A.sol";
import "Ownable.sol";
import "Strings.sol";
struct WLMinter {
uint _obtained;
bool _check;
}
enum SaleStatus {
stopped,
started,
killed
}
interface Holder {
function balanceOf(address owner) external view returns (uint256);
}
interface ShiboshiStakingHolder {
function lockInfoOf(address user) external view returns(
uint256[] memory ids,
uint256 startTime,
uint256 numDays,
address ogUser
);
}
contract Welly is ERC721A, Ownable {
using Strings for uint256;
string private baseURI;
uint public max_tokens_per_mint = 10;
uint256 public cost = 0.12 ether;
string private uriPrefix = ".json";
bool private is_revealed = false;
string private not_revealed_uri;
uint total_tokens = 10000;
uint wl_remaining_tokens = 1856;
uint max_wl_balance = 4;
SaleStatus public _actual_sale_status;
mapping(address => WLMinter) private _sale_wl;
uint public sale_start_date;
address private _shiboshi_contract = 0x11450058d796B02EB53e65374be59cFf65d3FE7f;
address private _leash_contract = 0x27C70Cd1946795B66be9d954418546998b546634;
address private _shiboshi_staking_contract = 0xBe4E191B22368bfF26aA60Be498575C477AF5Cc3;
address private _xleash_contract = 0xa57D319B3Cf3aD0E4d19770f71E63CF847263A0b;
address private _bone_token_contract = 0x9813037ee2218799597d83D4a5B6F3b6778218d9;
address private _tbone_staking_contract = 0xf7A0383750feF5AbaCe57cc4C9ff98e3790202b3;
address private _shiba_token_contract = 0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE;
address private _xshib_staking_contract = 0xB4a81261b16b92af0B9F7C4a83f1E885132D81e4;
constructor(string memory _initBaseURI, string memory _not_revealed_uri) ERC721A("Welly Friends", "WELLY") {
setNotRevealedURI(_not_revealed_uri);
setBaseURI(_initBaseURI);
}
function contractURI() public pure returns (string memory) {
return "https://gateway.pinata.cloud/ipfs/QmfJawxyaqhCx4XBQTsJiy62h7Pq3dJAAXcZH91EHy3o2e";
}
function setIsRevealed(bool _flag) public onlyOwner {
is_revealed = _flag;
}
function setNotRevealedURI(string memory _newRevealedURI) public onlyOwner {
not_revealed_uri = _newRevealedURI;
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
baseURI = _newBaseURI;
}
function setSaleStatus(SaleStatus _newStatus) public onlyOwner {
_actual_sale_status = _newStatus;
if (_newStatus == SaleStatus.started) {
sale_start_date = block.timestamp;
}
}
function isSaleWL(address _addr) private view returns(bool) {
return _sale_wl[_addr]._check;
}
function setWhiteLists(address[] memory _addrs) public onlyOwner{
for (uint i=0; i<_addrs.length; i++) {
_sale_wl[_addrs[i]] = WLMinter(0, true);
}
}
function tokenURI(uint256 tokenId) public view override(ERC721A) returns (string memory) {
require(_exists(tokenId), "Nonexistent token");
if (!is_revealed) {
return bytes(not_revealed_uri).length > 0 ? string(abi.encodePacked(not_revealed_uri, tokenId.toString(), uriPrefix)) : "";
}
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), uriPrefix)) : "";
}
function isHolderOf(address _contract) private view returns(bool){
return Holder(_contract).balanceOf(msg.sender) > 0 ? true : false;
}
function isShiboshiStaking() private view returns(bool) {
(uint256[] memory ids, uint256 b, uint256 c, address d) = ShiboshiStakingHolder(_shiboshi_staking_contract).lockInfoOf(msg.sender);
return ids.length > 0;
}
function isFirstPhaseHolder() private view returns(bool) {
return isHolderOf(_shiboshi_contract) || isHolderOf(_leash_contract) || isShiboshiStaking() || isHolderOf(_xleash_contract);
}
function isTokensHolder() private view returns(bool) {
return isHolderOf(_bone_token_contract) || isHolderOf(_shiba_token_contract) || isHolderOf(_tbone_staking_contract) || isHolderOf(_xshib_staking_contract);
}
function mint(uint256 _mintAmount) public payable {
require(_actual_sale_status == SaleStatus.started, "The sale is not started");
require(_mintAmount > 0, "Really?");
require(_mintAmount <= max_tokens_per_mint, "Too many mints!");
require(totalSupply() < total_tokens, "Sold Out");
uint _now = block.timestamp;
if(_now > sale_start_date + 2 days)
cost = 0.15 ether;
require(msg.value >= cost * _mintAmount, "Insufficient funds");
// Phase 1 (Holders)
if (_now >= sale_start_date && _now <= sale_start_date + 1 days)
firstPhaseMint(_mintAmount, _now);
// Phase 2 (WL)
if (_now > sale_start_date + 1 days && _now <= sale_start_date + 2 days)
secondPhaseMint(_mintAmount);
// Phase 3 (Public)
if (_now > sale_start_date + 2 days)
_safeMint(msg.sender, _mintAmount);
}
function firstPhaseMint(uint _mintAmount, uint _now) private {
require(totalSupply() < 8144, "Phase 1 Sold Out");
// Shiba - Bone token and stakers
if(_now >= sale_start_date + 12 hours)
require(isFirstPhaseHolder() || isTokensHolder(), "You are not whitelisted for this sale");
else
require(isFirstPhaseHolder(), "You are not whitelisted for this sale");
_safeMint(msg.sender, _mintAmount);
}
function secondPhaseMint(uint _mintAmount) private {
require(_mintAmount <= 4, "Too many mints!");
require(wl_remaining_tokens >= _mintAmount, "Too many mints for the remaining NFTs");
require(isSaleWL(msg.sender), "You are not whitelisted for this sale");
require(_sale_wl[msg.sender]._obtained < max_wl_balance, "You have reached the maximum number of mints");
require(_sale_wl[msg.sender]._obtained + _mintAmount <= max_wl_balance, "Too many mints for the remaining balance");
_safeMint(msg.sender, _mintAmount);
_sale_wl[msg.sender]._obtained += _mintAmount;
wl_remaining_tokens -= _mintAmount;
}
function withdraw(address payable recipient) public onlyOwner {
uint256 balance = address(this).balance;
recipient.transfer(balance);
}
}
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;
}
}
ERC721A.sol 816 lines
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import 'IERC721A.sol';
/**
* @dev ERC721 token receiver interface.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
*
* Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
*
* Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// 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 tokenId of the next token 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`
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 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
/**
* @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 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 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 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 returns (uint256) {
return _burnCounter;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
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: 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.
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view 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 auxillary 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 auxillary 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 {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
assembly { // Cast aux without masking.
auxCasted := aux
}
packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX);
_packedAddressData[owner] = packed;
}
/**
* 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 ownership that has an address and is not burned
// before an ownership that does not have an address and is not burned.
// Hence, curr will not underflow.
//
// We can directly compare the packed value.
// If the address is zero, packed is zero.
while (packed == 0) {
packed = _packedOwnerships[--curr];
}
return packed;
}
}
}
revert OwnerQueryForNonexistentToken();
}
/**
* 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;
}
/**
* Returns the unpacked `TokenOwnership` struct at `index`.
*/
function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
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, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
/**
* @dev Casts the address to uint256 without masking.
*/
function _addressToUint256(address value) private pure returns (uint256 result) {
assembly {
result := value
}
}
/**
* @dev Casts the boolean to uint256 without branching.
*/
function _boolToUint256(bool value) private pure returns (uint256 result) {
assembly {
result := value
}
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
address owner = address(uint160(_packedOwnershipOf(tokenId)));
if (to == owner) revert ApprovalToCurrentOwner();
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
if (operator == _msgSenderERC721A()) revert ApproveToCaller();
_operatorApprovals[_msgSenderERC721A()][operator] = approved;
emit ApprovalForAll(_msgSenderERC721A(), 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 {
_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 {
_transfer(from, to, tokenId);
if (to.code.length != 0)
if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
/**
* @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`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
return
_startTokenId() <= tokenId &&
tokenId < _currentIndex && // If within bounds,
_packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned.
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal {
_safeMint(to, quantity, '');
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are incredibly unrealistic.
// balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
// updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the balance and number minted.
_packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] =
_addressToUint256(to) |
(block.timestamp << BITPOS_START_TIMESTAMP) |
(_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);
uint256 updatedIndex = startTokenId;
uint256 end = updatedIndex + quantity;
if (to.code.length != 0) {
do {
emit Transfer(address(0), to, updatedIndex);
if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (updatedIndex < end);
// Reentrancy protection
if (_currentIndex != startTokenId) revert();
} else {
do {
emit Transfer(address(0), to, updatedIndex++);
} while (updatedIndex < end);
}
_currentIndex = updatedIndex;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 quantity) internal {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are incredibly unrealistic.
// balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
// updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the balance and number minted.
_packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] =
_addressToUint256(to) |
(block.timestamp << BITPOS_START_TIMESTAMP) |
(_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);
uint256 updatedIndex = startTokenId;
uint256 end = updatedIndex + quantity;
do {
emit Transfer(address(0), to, updatedIndex++);
} while (updatedIndex < end);
_currentIndex = updatedIndex;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* 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
) private {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();
bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
isApprovedForAll(from, _msgSenderERC721A()) ||
getApproved(tokenId) == _msgSenderERC721A());
if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner.
delete _tokenApprovals[tokenId];
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
unchecked {
// We can directly increment and decrement the balances.
--_packedAddressData[from]; // Updates: `balance -= 1`.
++_packedAddressData[to]; // Updates: `balance += 1`.
// Updates:
// - `address` to the next owner.
// - `startTimestamp` to the timestamp of transfering.
// - `burned` to `false`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] =
_addressToUint256(to) |
(block.timestamp << BITPOS_START_TIMESTAMP) |
BITMASK_NEXT_INITIALIZED;
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
_burn(tokenId, false);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
address from = address(uint160(prevOwnershipPacked));
if (approvalCheck) {
bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
isApprovedForAll(from, _msgSenderERC721A()) ||
getApproved(tokenId) == _msgSenderERC721A());
if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
}
_beforeTokenTransfers(from, address(0), tokenId, 1);
// Clear approvals from the previous owner.
delete _tokenApprovals[tokenId];
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
unchecked {
// Updates:
// - `balance -= 1`.
// - `numberBurned += 1`.
//
// We can directly decrement the balance, and increment the number burned.
// This is equivalent to `packed -= 1; packed += 1 << BITPOS_NUMBER_BURNED;`.
_packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1;
// Updates:
// - `address` to the last owner.
// - `startTimestamp` to the timestamp of burning.
// - `burned` to `true`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] =
_addressToUint256(from) |
(block.timestamp << BITPOS_START_TIMESTAMP) |
BITMASK_BURNED |
BITMASK_NEXT_INITIALIZED;
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, address(0), tokenId);
_afterTokenTransfers(from, address(0), tokenId, 1);
// Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
unchecked {
_burnCounter++;
}
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
bytes4 retval
) {
return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
* And also called before burning one token.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* 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, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
* And also called after one token has been burned.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Returns the message sender (defaults to `msg.sender`).
*
* If you are writing GSN compatible contracts, you need to override this function.
*/
function _msgSenderERC721A() internal view virtual returns (address) {
return msg.sender;
}
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function _toString(uint256 value) internal pure returns (string memory ptr) {
assembly {
// The maximum value of a uint256 contains 78 digits (1 byte per digit),
// but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
// We will need 1 32-byte word to store the length,
// and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
ptr := add(mload(0x40), 128)
// Update the free memory pointer to allocate.
mstore(0x40, ptr)
// Cache the end of the memory to calculate the length later.
let end := ptr
// We write the string from the rightmost digit to the leftmost digit.
// The following is essentially a do-while loop that also handles the zero case.
// Costs a bit more than early returning for the zero case,
// but cheaper in terms of deployment and overall runtime costs.
for {
// Initialize and perform the first pass without check.
let temp := value
// Move the pointer 1 byte leftwards to point to an empty character slot.
ptr := sub(ptr, 1)
// Write the character to the pointer. 48 is the ASCII index of '0'.
mstore8(ptr, add(48, mod(temp, 10)))
temp := div(temp, 10)
} temp {
// Keep dividing `temp` until zero.
temp := div(temp, 10)
} { // Body of the for loop.
ptr := sub(ptr, 1)
mstore8(ptr, add(48, mod(temp, 10)))
}
let length := sub(end, ptr)
// Move the pointer 32 bytes leftwards to make room for the length.
ptr := sub(ptr, 32)
// Store the length.
mstore(ptr, length)
}
}
}
Ownable.sol 76 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "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);
}
}
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);
}
}
IERC721A.sol 260 lines
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of an ERC721A compliant contract.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* The caller cannot approve to their own address.
*/
error ApproveToCaller();
/**
* The caller cannot approve to the current owner.
*/
error ApprovalToCurrentOwner();
/**
* 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();
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
}
/**
* @dev Returns the total amount of tokens stored by the contract.
*
* Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
*/
function totalSupply() external view returns (uint256);
// ==============================
// 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);
// ==============================
// 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`.
*
* 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;
/**
* @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 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);
}
Read Contract
_actual_sale_status 0xc16ccf3b → uint8
balanceOf 0x70a08231 → uint256
contractURI 0xe8a3d485 → string
cost 0x13faede6 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
max_tokens_per_mint 0x4bdbb80d → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
sale_start_date 0xba26d987 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
Write Contract 14 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
mint 0xa0712d68
uint256 _mintAmount
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string _newBaseURI
setIsRevealed 0x49a5980a
bool _flag
setNotRevealedURI 0xf2c4ce1e
string _newRevealedURI
setSaleStatus 0x4891ad88
uint8 _newStatus
setWhiteLists 0xfc31f0bf
address[] _addrs
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x51cff8d9
address recipient
Recent Transactions
No transactions found for this address