Address Contract Partially Verified
Address
0x19F636d66D7F39DC12f58E900247d899ac1cB034
Balance
0 ETH
Nonce
1
Code Size
11575 bytes
Creator
0x486A4CB5...9Fbb at tx 0x6336f18a...31a2c6
Indexed Transactions
0
Contract Bytecode
11575 bytes
0x608060405234801561001057600080fd5b50600436106102a05760003560e01c806372131db311610167578063ba55ce82116100ce578063ea979d8411610087578063ea979d8414610596578063ecab9152146105a9578063ed39a0a0146105be578063f1eccd35146105f4578063f2fde38b14610607578063fa6171e41461061a57600080fd5b8063ba55ce8214610543578063c87b56dd1461054b578063d5bb68791461055e578063ddd1783a14610567578063dfb218fa14610570578063e985e9c51461058357600080fd5b80638da5cb5b116101205780638da5cb5b146104ce57806395d89b41146104df57806398a8cffe146104e7578063a22cb4651461050a578063b41d74d81461051d578063b88d4fde1461053057600080fd5b806372131db31461046a578063788c59991461047d57806378e979251461049757806379489966146104a05780637a7aa044146104b35780637cb64759146104bb57600080fd5b8063381b965c1161020b57806362e42cb0116101c457806362e42cb0146104145780636352211e1461042c5780636bf326c61461043f5780636c0360eb1461044757806370a082311461044f578063715018a61461046257600080fd5b8063381b965c146103a05780633e0a322d146103b357806341f43434146103c657806342842e0e146103db57806355f804b3146103ee57806362dbb43e1461040157600080fd5b806318160ddd1161025d57806318160ddd1461034c57806323b872dd146103555780632ab4d052146103685780632eb4a7ab146103715780633028f63a1461037a578063372f657c1461038d57600080fd5b806301ffc9a7146102a557806306fdde03146102cd57806307e322a5146102e2578063081812fc146102f9578063095ea7b3146103245780630c56ae3b14610339575b600080fd5b6102b86102b3366004612515565b61062d565b60405190151581526020015b60405180910390f35b6102d5610658565b6040516102c4919061258a565b6102eb60145481565b6040519081526020016102c4565b61030c61030736600461259d565b6106ea565b6040516001600160a01b0390911681526020016102c4565b6103376103323660046125cb565b610711565b005b60195461030c906001600160a01b031681565b6102eb60105481565b6103376103633660046125f7565b61072a565b6102eb600f5481565b6102eb60165481565b610337610388366004612638565b610755565b61033761039b366004612655565b61077f565b6103376103ae36600461259d565b6109d0565b6103376103c136600461259d565b6109dd565b61030c6daaeb6d7670e522a718067333cd4e81565b6103376103e93660046125f7565b6109ea565b6103376103fc366004612777565b610a0f565b61033761040f36600461259d565b610a2a565b60185461030c9061010090046001600160a01b031681565b61030c61043a36600461259d565b610a43565b600c546102eb565b6102d5610aa3565b6102eb61045d366004612638565b610b31565b610337610bb7565b6103376104783660046127c0565b610bcb565b60185461048a9060ff1681565b6040516102c491906127f7565b6102eb60175481565b6103376104ae3660046125cb565b610bfa565b600d546102eb565b6103376104c936600461259d565b610d47565b6000546001600160a01b031661030c565b6102d5610d54565b6102b86104f5366004612638565b60126020526000908152604090205460ff1681565b61033761051836600461282d565b610d63565b61033761052b366004612638565b610d77565b61033761053e366004612866565b610da7565b600b546102eb565b6102d561055936600461259d565b610dd4565b6102eb60135481565b6102eb60115481565b61033761057e36600461259d565b610e3b565b6102b86105913660046128e6565b610e4c565b6103376105a436600461282d565b610e7a565b6105b1610e8c565b6040516102c49190612914565b6102eb6105cc3660046125cb565b6001600160a01b03919091166000908152600a60209081526040808320938352929052205490565b61033761060236600461259d565b6110cc565b610337610615366004612638565b6110e2565b6103376106283660046125cb565b611158565b60006001600160e01b031982166355273cf960e11b1480610652575061065282611284565b92915050565b606060018054610667906129bd565b80601f0160208091040260200160405190810160405280929190818152602001828054610693906129bd565b80156106e05780601f106106b5576101008083540402835291602001916106e0565b820191906000526020600020905b8154815290600101906020018083116106c357829003601f168201915b5050505050905090565b60006106f5826112d4565b506000908152600560205260409020546001600160a01b031690565b8161071b81611333565b61072583836113ec565b505050565b826001600160a01b03811633146107445761074433611333565b61074f8484846114fc565b50505050565b61075d61152d565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b610787611587565b6017544210156107b25760405162461bcd60e51b81526004016107a9906129f7565b60405180910390fd5b600060185460ff1660028111156107cb576107cb6127e1565b146107e85760405162461bcd60e51b81526004016107a990612a20565b6014546011546010546107fb9190612a64565b11156108495760405162461bcd60e51b815260206004820152601a60248201527f6f7665722066697273742073746570206d617820737570706c7900000000000060448201526064016107a9565b600f5460115460105461085c9190612a64565b111561087a5760405162461bcd60e51b81526004016107a990612a7c565b3360009081526012602052604090205460ff16156108cb5760405162461bcd60e51b815260206004820152600e60248201526d6d696e74656420616c726561647960901b60448201526064016107a9565b61090c8282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060165491503390506115e0565b6109585760405162461bcd60e51b815260206004820152601760248201527f696e76616c69642077686974656c6973742070726f6f6600000000000000000060448201526064016107a9565b60005b60115481101561098e5761097c33826010546109779190612a64565b6115f6565b8061098681612aa7565b91505061095b565b50601154601060008282546109a39190612a64565b9091555050336000908152601260205260409020805460ff191660011790556109cc6001600e55565b5050565b6109d861152d565b601155565b6109e561152d565b601755565b826001600160a01b0381163314610a0457610a0433611333565b61074f84848461178f565b610a1761152d565b80516109cc906015906020840190612466565b610a3261152d565b6013819055610a4081600b55565b50565b6000818152600360205260408120546001600160a01b0316806106525760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016107a9565b60158054610ab0906129bd565b80601f0160208091040260200160405190810160405280929190818152602001828054610adc906129bd565b8015610b295780601f10610afe57610100808354040283529160200191610b29565b820191906000526020600020905b815481529060010190602001808311610b0c57829003601f168201915b505050505081565b60006001600160a01b038216610b9b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016107a9565b506001600160a01b031660009081526004602052604090205490565b610bbf61152d565b610bc960006117aa565b565b610bd361152d565b6018805482919060ff19166001836002811115610bf257610bf26127e1565b021790555050565b610c02611587565b601754421015610c245760405162461bcd60e51b81526004016107a9906129f7565b600160185460ff166002811115610c3d57610c3d6127e1565b14610c5a5760405162461bcd60e51b81526004016107a990612a20565b601454601354601054610c6d9190612a64565b1115610cbb5760405162461bcd60e51b815260206004820152601a60248201527f6f7665722066697273742073746570206d617820737570706c7900000000000060448201526064016107a9565b600f54601354601054610cce9190612a64565b1115610cec5760405162461bcd60e51b81526004016107a990612a7c565b60005b601354811015610d2457610d1181601054610d0a9190612a64565b84846117fa565b5080610d1c81612aa7565b915050610cef565b5060135460106000828254610d399190612a64565b90915550506001600e555050565b610d4f61152d565b601655565b606060028054610667906129bd565b81610d6d81611333565b6107258383611a9b565b610d7f61152d565b601880546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b836001600160a01b0381163314610dc157610dc133611333565b610dcd85858585611aa6565b5050505050565b6060610ddf826112d4565b6000610de9611ad8565b90506000815111610e095760405180602001604052806000815250610e34565b80610e1384611ae7565b604051602001610e24929190612ac0565b6040516020818303038152906040525b9392505050565b610e4361152d565b610a4081600d55565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b610e8261152d565b6109cc8282611b7a565b60606000806000610e9d6007611be5565b67ffffffffffffffff811115610eb557610eb56126ca565b604051908082528060200260200182016040528015610f1c57816020015b610f09604051806080016040528060006001600160a01b0316815260200160608152602001606081526020016000151581525090565b815260200190600190039081610ed35790505b50905060005b610f2c6007611be5565b8110156110c457610f3e600782611bf0565b809550819450505082828281518110610f5957610f59612aef565b60209081029190910101516001600160a01b039091169052815184151590839083908110610f8957610f89612aef565b602090810291909101015190151560609091015283156110b257826001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa158015610fe1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110099190810190612b05565b82828151811061101b5761101b612aef565b602002602001015160200181905250826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015611068573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110909190810190612b05565b8282815181106110a2576110a2612aef565b6020026020010151604001819052505b806110bc81612aa7565b915050610f22565b509392505050565b6110d461152d565b6014819055610a4081600b55565b6110ea61152d565b6001600160a01b03811661114f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107a9565b610a40816117aa565b611160611587565b6017544210156111825760405162461bcd60e51b81526004016107a9906129f7565b600260185460ff16600281111561119b5761119b6127e1565b146111b85760405162461bcd60e51b81526004016107a990612a20565b60185461010090046001600160a01b0316331461120e5760405162461bcd60e51b815260206004820152601460248201527334b73b30b634b21039bab832b91036b4b73a32b960611b60448201526064016107a9565b600f548160105461121f9190612a64565b111561123d5760405162461bcd60e51b81526004016107a990612a7c565b60005b8181101561126c5761125a83826010546109779190612a64565b8061126481612aa7565b915050611240565b508060106000828254610d399190612a64565b600d55565b60006001600160e01b031982166380ac58cd60e01b14806112b557506001600160e01b03198216635b5e139f60e01b145b8061065257506301ffc9a760e01b6001600160e01b0319831614610652565b6000818152600360205260409020546001600160a01b0316610a405760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016107a9565b6daaeb6d7670e522a718067333cd4e3b15610a4057604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156113a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c49190612b7c565b610a4057604051633b79c77360e21b81526001600160a01b03821660048201526024016107a9565b60006113f782610a43565b9050806001600160a01b0316836001600160a01b0316036114645760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107a9565b336001600160a01b038216148061148057506114808133610e4c565b6114f25760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016107a9565b6107258383611c0e565b6115063382611c7c565b6115225760405162461bcd60e51b81526004016107a990612b99565b610725838383611cdb565b6000546001600160a01b03163314610bc95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107a9565b6002600e54036115d95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107a9565b6002600e55565b6000826115ed8584611da8565b14949350505050565b6001600160a01b03821661164c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107a9565b6000818152600360205260409020546001600160a01b0316156116b15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107a9565b6116bf600083836001611ded565b6000818152600360205260409020546001600160a01b0316156117245760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107a9565b6001600160a01b038216600081815260046020908152604080832080546001019055848352600390915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61072583838360405180602001604052806000815250610da7565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008080611809600786611e75565b915091508161185a5760405162461bcd60e51b815260206004820152601c60248201527f455243373231473a20696e76616c69642061757468206572633732310000000060448201526064016107a9565b806000036118aa5760405162461bcd60e51b815260206004820152601c60248201527f455243373231473a20696e76616c69642061757468206572633732310000000060448201526064016107a9565b600d54600c546118bb906001612a64565b11156119145760405162461bcd60e51b815260206004820152602260248201527f455243373231473a206f766572206d617820746f74616c206d696e74206c696d6044820152611a5d60f21b60648201526084016107a9565b600b546001600160a01b0386166000908152600a60209081526040808320888452909152902054106119815760405162461bcd60e51b8152602060048201526016602482015275455243373231473a206d696e7420746f6f206d616e7960501b60448201526064016107a9565b6001600160a01b0385166000908152600a6020908152604080832087845290915281208054916119b083612aa7565b9091555050600c80549060006119c583612aa7565b90915550506040516331a9108f60e11b8152600481018590526000906001600160a01b03871690636352211e90602401602060405180830381865afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a369190612be6565b90506001600160a01b038116611a875760405162461bcd60e51b815260206004820152601660248201527522a9219b9918a39d1034b73b30b634b21036b4b732b960511b60448201526064016107a9565b611a9181886115f6565b9695505050505050565b6109cc338383611e8d565b611ab03383611c7c565b611acc5760405162461bcd60e51b81526004016107a990612b99565b61074f84848484611f5b565b606060158054610667906129bd565b60606000611af483611f8e565b600101905060008167ffffffffffffffff811115611b1457611b146126ca565b6040519080825280601f01601f191660200182016040528015611b3e576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611b4857509392505050565b600081611b88576000611b8b565b60015b60ff169050611b9c60078483612066565b50604080516001600160a01b038516815283151560208201527f377400ac3a6f567dd1f26d24a9205f1d26ece708879aa8aa41a3b67352e2aef5910160405180910390a1505050565b60006106528261207c565b6000808080611bff8686612087565b909450925050505b9250929050565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c4382610a43565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611c8883610a43565b9050806001600160a01b0316846001600160a01b03161480611caf5750611caf8185610e4c565b80611cd35750836001600160a01b0316611cc8846106ea565b6001600160a01b0316145b949350505050565b6019546001600160a01b031615611d9d57601954604051635d525cd560e01b8152600481018390526001600160a01b0390911690635d525cd590602401602060405180830381865afa158015611d35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d599190612b7c565b15611d9d5760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b881a185cc81899595b881c1a5b995960621b60448201526064016107a9565b6107258383836120b2565b600081815b84518110156110c457611dd982868381518110611dcc57611dcc612aef565b6020026020010151612223565b915080611de581612aa7565b915050611dad565b600181111561074f576001600160a01b03841615611e33576001600160a01b03841660009081526004602052604081208054839290611e2d908490612c03565b90915550505b6001600160a01b0383161561074f576001600160a01b03831660009081526004602052604081208054839290611e6a908490612a64565b909155505050505050565b6000808080611bff866001600160a01b03871661224f565b816001600160a01b0316836001600160a01b031603611eee5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016107a9565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611f66848484611cdb565b611f7284848484612289565b61074f5760405162461bcd60e51b81526004016107a990612c1a565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611fcd5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ff9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061201757662386f26fc10000830492506010015b6305f5e100831061202f576305f5e100830492506008015b612710831061204357612710830492506004015b60648310612055576064830492506002015b600a83106106525760010192915050565b6000611cd3846001600160a01b0385168461238a565b6000610652826123a7565b6000808061209585856123b1565b600081815260029690960160205260409095205494959350505050565b826001600160a01b03166120c582610a43565b6001600160a01b0316146120eb5760405162461bcd60e51b81526004016107a990612c6c565b6001600160a01b03821661214d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107a9565b61215a8383836001611ded565b826001600160a01b031661216d82610a43565b6001600160a01b0316146121935760405162461bcd60e51b81526004016107a990612c6c565b600081815260056020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260048552838620805460001901905590871680865283862080546001019055868652600390945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081831061223f576000828152602084905260409020610e34565b5060009182526020526040902090565b600081815260028301602052604081205481908061227e5761227185856123bd565b925060009150611c079050565b600192509050611c07565b60006001600160a01b0384163b1561237f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906122cd903390899088908890600401612cb1565b6020604051808303816000875af1925050508015612308575060408051601f3d908101601f1916820190925261230591810190612ce4565b60015b612365573d808015612336576040519150601f19603f3d011682016040523d82523d6000602084013e61233b565b606091505b50805160000361235d5760405162461bcd60e51b81526004016107a990612c1a565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cd3565b506001949350505050565b60008281526002840160205260408120829055611cd384846123c9565b6000610652825490565b6000610e3483836123d5565b6000610e3483836123ff565b6000610e348383612417565b60008260000182815481106123ec576123ec612aef565b9060005260206000200154905092915050565b60008181526001830160205260408120541515610e34565b600081815260018301602052604081205461245e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610652565b506000610652565b828054612472906129bd565b90600052602060002090601f01602090048101928261249457600085556124da565b82601f106124ad57805160ff19168380011785556124da565b828001600101855582156124da579182015b828111156124da5782518255916020019190600101906124bf565b506124e69291506124ea565b5090565b5b808211156124e657600081556001016124eb565b6001600160e01b031981168114610a4057600080fd5b60006020828403121561252757600080fd5b8135610e34816124ff565b60005b8381101561254d578181015183820152602001612535565b8381111561074f5750506000910152565b60008151808452612576816020860160208601612532565b601f01601f19169290920160200192915050565b602081526000610e34602083018461255e565b6000602082840312156125af57600080fd5b5035919050565b6001600160a01b0381168114610a4057600080fd5b600080604083850312156125de57600080fd5b82356125e9816125b6565b946020939093013593505050565b60008060006060848603121561260c57600080fd5b8335612617816125b6565b92506020840135612627816125b6565b929592945050506040919091013590565b60006020828403121561264a57600080fd5b8135610e34816125b6565b6000806020838503121561266857600080fd5b823567ffffffffffffffff8082111561268057600080fd5b818501915085601f83011261269457600080fd5b8135818111156126a357600080fd5b8660208260051b85010111156126b857600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612709576127096126ca565b604052919050565b600067ffffffffffffffff82111561272b5761272b6126ca565b50601f01601f191660200190565b600061274c61274784612711565b6126e0565b905082815283838301111561276057600080fd5b828260208301376000602084830101529392505050565b60006020828403121561278957600080fd5b813567ffffffffffffffff8111156127a057600080fd5b8201601f810184136127b157600080fd5b611cd384823560208401612739565b6000602082840312156127d257600080fd5b813560038110610e3457600080fd5b634e487b7160e01b600052602160045260246000fd5b602081016003831061281957634e487b7160e01b600052602160045260246000fd5b91905290565b8015158114610a4057600080fd5b6000806040838503121561284057600080fd5b823561284b816125b6565b9150602083013561285b8161281f565b809150509250929050565b6000806000806080858703121561287c57600080fd5b8435612887816125b6565b93506020850135612897816125b6565b925060408501359150606085013567ffffffffffffffff8111156128ba57600080fd5b8501601f810187136128cb57600080fd5b6128da87823560208401612739565b91505092959194509250565b600080604083850312156128f957600080fd5b8235612904816125b6565b9150602083013561285b816125b6565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b838110156129af57888303603f19018552815180516001600160a01b03168452878101516080898601819052906129748287018261255e565b915050878201518582038987015261298c828261255e565b60609384015115159690930195909552509487019492509086019060010161293b565b509098975050505050505050565b600181811c908216806129d157607f821691505b6020821081036129f157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600f908201526e1b9bdd081e595d081cdd185c9d1959608a1b604082015260600190565b602080825260149082015273696e76616c6964206d696e74696e67206d6f646560601b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115612a7757612a77612a4e565b500190565b6020808252601190820152706f76657220746f74616c20737570706c7960781b604082015260600190565b600060018201612ab957612ab9612a4e565b5060010190565b60008351612ad2818460208801612532565b835190830190612ae6818360208801612532565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612b1757600080fd5b815167ffffffffffffffff811115612b2e57600080fd5b8201601f81018413612b3f57600080fd5b8051612b4d61274782612711565b818152856020838501011115612b6257600080fd5b612b73826020830160208601612532565b95945050505050565b600060208284031215612b8e57600080fd5b8151610e348161281f565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b600060208284031215612bf857600080fd5b8151610e34816125b6565b600082821015612c1557612c15612a4e565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611a919083018461255e565b600060208284031215612cf657600080fd5b8151610e34816124ff56fea26469706673582212208b1ac96d1190ab3f07194a19cbf6f0fe08fa1dc552d2befcc1d56966acf5214164736f6c634300080d0033
Verified Source Code Partial Match
Compiler: v0.8.13+commit.abaa5c0e
EVM: london
Optimization: Yes (200 runs)
Lucky.sol 3230 lines
// Sources flattened with hardhat v2.9.9 https://hardhat.org // File @openzeppelin/contracts/utils/[email protected] // 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; } } // File @openzeppelin/contracts/access/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @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); } } // File @openzeppelin/contracts/utils/cryptography/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * 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. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ 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 simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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 sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _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}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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) } } } // File @openzeppelin/contracts/security/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // File operator-filter-registry/src/[email protected] pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); } // File operator-filter-registry/src/[email protected] pragma solidity ^0.8.13; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } } // File operator-filter-registry/src/[email protected] pragma solidity ^0.8.13; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} } // File contracts/interface/ILucky.sol pragma solidity ^0.8.0; // ILucky interface ILucky { function superMint(address to, uint quantity) external; } interface ILuckyEx { function totalSupply() external view returns(uint); function superMint(address to, uint quantity) external; } // File contracts/interface/IStakingPool.sol pragma solidity ^0.8.0; interface IStakingPool { function pined(uint256 tokenId) external view returns (bool); } // File @openzeppelin/contracts/utils/introspection/[email protected] // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File @openzeppelin/contracts/token/ERC721/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * 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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * 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); } // File @openzeppelin/contracts/token/ERC721/[email protected] // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File @openzeppelin/contracts/token/ERC721/extensions/[email protected] // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); } // File @openzeppelin/contracts/utils/[email protected] // OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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); } } } // File @openzeppelin/contracts/utils/math/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; ... // [truncated — 114777 bytes total]
Read Contract
OPERATOR_FILTER_REGISTRY 0x41f43434 → address
balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
bluechipMintLimit 0xd5bb6879 → uint256
firstStepMaxSupply 0x07e322a5 → uint256
getAllGiftAuth 0xecab9152 → tuple[]
getApproved 0x081812fc → address
getGiftMintLimit 0xba55ce82 → uint256
getGiftMintedQuantity 0xed39a0a0 → uint256
getMaxTotalGiftMint 0x7a7aa044 → uint256
getTotalGiftMint 0x6bf326c6 → uint256
isApprovedForAll 0xe985e9c5 → bool
maxTotalSupply 0x2ab4d052 → uint256
merkleRoot 0x2eb4a7ab → bytes32
mintMode 0x788c5999 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
stakingPool 0x0c56ae3b → address
startTime 0x78e97925 → uint256
superMinter 0x62e42cb0 → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
whitelistMintLimit 0xddd1783a → uint256
whitelistMinted 0x98a8cffe → bool
Write Contract 21 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address operator
uint256 tokenId
bluechipMint 0x79489966
address bluechipERC721
uint256 bluechipTokenId
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 baseURI_
setBluechip 0xea979d84
address erc721
bool isOpen
setBluechipMaxTotalMint 0xdfb218fa
uint256 bluechipMaxTotalMint_
setBluechipMintLimit 0x62dbb43e
uint256 limit_
setFirstStepMaxSupply 0xf1eccd35
uint256 max
setMerkleRoot 0x7cb64759
bytes32 merkleRoot_
setMintMode 0x72131db3
uint8 mode_
setStakingPool 0x3028f63a
address stakingPool_
setStartTime 0x3e0a322d
uint256 startTime_
setSuperMinter 0xb41d74d8
address minter
setWhitelistMintLimit 0x381b965c
uint256 limit_
superMint 0xfa6171e4
address to
uint256 quantity
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
whitelistMint 0x372f657c
bytes32[] proof
Recent Transactions
No transactions found for this address