Address Contract Verified
Address
0xDfB29501b42f63A947Ddc5249F185D6BcBE6986f
Balance
0.000510000 ETH
Nonce
1
Code Size
14960 bytes
Creator
0x3978a70A...C05B at tx 0x444c4501...e08552
Indexed Transactions
0
Contract Bytecode
14960 bytes
0x60806040526004361061039b5760003560e01c80638c74bf0e116101dc578063b88d4fde11610102578063d20f2b48116100a0578063e33b7de31161006f578063e33b7de314610af6578063e985e9c514610b0b578063ecba222a14610b54578063f2fde38b14610b7557600080fd5b8063d20f2b4814610a8d578063d79779b214610aa2578063da034adb14610ad8578063db2e21bc14610aee57600080fd5b8063c4be7153116100dc578063c4be715314610a04578063c87b56dd14610a24578063ce7c2ac214610a44578063d1e31fbb14610a7a57600080fd5b8063b88d4fde146109b1578063b8d1e532146109c4578063c45ac050146109e457600080fd5b8063a22cb4651161017a578063acc160ba11610149578063acc160ba14610937578063b0ccc31e14610957578063b1a6676e14610977578063b80f55c91461099157600080fd5b8063a22cb465146108b7578063a28cd752146108d7578063a3f8eace146108f7578063a49a1e7d1461091757600080fd5b80639481d354116101b65780639481d3541461081d57806395d89b411461083d57806397a08fab146108525780639852595c1461088157600080fd5b80638c74bf0e146107a45780638da5cb5b146107c457806390940115146107d957600080fd5b80635314da4e116102c1578063677ab70b1161025f57806371faf9351161022e57806371faf9351461070c578063735d2a271461072c57806377cee13b1461074c5780638b83209b1461078457600080fd5b8063677ab70b146106a45780636c19e783146106b757806370a08231146106d7578063715018a6146106f757600080fd5b8063594866301161029b57806359486630146106305780635e8d37281461064f5780635ef9432a1461066f5780636352211e1461068457600080fd5b80635314da4e146105d05780635398fb80146105f05780635771026f1461061057600080fd5b806323b872dd1161033957806340cee7011161030857806340cee7011461057357806342842e0e1461058857806348b750441461059b5780634fd2b02a146105bb57600080fd5b806323b872dd146104f057806339371b25146105035780633a98ef3914610518578063406072a91461052d57600080fd5b8063081812fc11610375578063081812fc14610478578063095ea7b31461049857806318160ddd146104ad57806319165587146104d057600080fd5b806301ffc9a7146103e9578063023fcce11461041e57806306fdde031461045657600080fd5b366103e4577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156103f557600080fd5b5061040961040436600461311d565b610b95565b60405190151581526020015b60405180910390f35b34801561042a57600080fd5b5060175461043e906001600160a01b031681565b6040516001600160a01b039091168152602001610415565b34801561046257600080fd5b5061046b610be7565b604051610415919061318a565b34801561048457600080fd5b5061043e61049336600461319d565b610c79565b6104ab6104a63660046131cb565b610cbd565b005b3480156104b957600080fd5b50600154600054035b604051908152602001610415565b3480156104dc57600080fd5b506104ab6104eb3660046131f7565b610cd6565b6104ab6104fe366004613214565b610dc7565b34801561050f57600080fd5b5061046b610df2565b34801561052457600080fd5b50600a546104c2565b34801561053957600080fd5b506104c2610548366004613255565b6001600160a01b03918216600090815260106020908152604080832093909416825291909152205490565b34801561057f57600080fd5b506104ab610e80565b6104ab610596366004613214565b610ea7565b3480156105a757600080fd5b506104ab6105b6366004613255565b610ecc565b3480156105c757600080fd5b506104ab610fdd565b3480156105dc57600080fd5b506104ab6105eb3660046132b0565b611002565b3480156105fc57600080fd5b506104ab61060b3660046132dc565b611055565b34801561061c57600080fd5b50601d546104099062010000900460ff1681565b34801561063c57600080fd5b50601d5461040990610100900460ff1681565b34801561065b57600080fd5b506104ab61066a3660046131f7565b61109a565b34801561067b57600080fd5b506104ab6110c4565b34801561069057600080fd5b5061043e61069f36600461319d565b611169565b6104ab6106b236600461319d565b611174565b3480156106c357600080fd5b506104ab6106d23660046131f7565b611211565b3480156106e357600080fd5b506104c26106f23660046131f7565b61123b565b34801561070357600080fd5b506104ab61128a565b34801561071857600080fd5b506104ab6107273660046131f7565b61129e565b34801561073857600080fd5b506104ab6107473660046131f7565b6112c8565b34801561075857600080fd5b506104c26107673660046132f8565b601c60209081526000928352604080842090915290825290205481565b34801561079057600080fd5b5061043e61079f36600461319d565b6112f2565b3480156107b057600080fd5b506104ab6107bf36600461319d565b611322565b3480156107d057600080fd5b5061043e611407565b3480156107e557600080fd5b5061080a6107f4366004613326565b601f6020526000908152604090205461ffff1681565b60405161ffff9091168152602001610415565b34801561082957600080fd5b506104ab610838366004613341565b611420565b34801561084957600080fd5b5061046b6114b4565b34801561085e57600080fd5b5061040961086d366004613326565b602080526000908152604090205460ff1681565b34801561088d57600080fd5b506104c261089c3660046131f7565b6001600160a01b03166000908152600d602052604090205490565b3480156108c357600080fd5b506104ab6108d2366004613374565b6114c3565b3480156108e357600080fd5b506104c26108f23660046132f8565b6114d7565b34801561090357600080fd5b506104c26109123660046131f7565b61153a565b34801561092357600080fd5b506104ab610932366004613431565b611582565b34801561094357600080fd5b506104ab610952366004613341565b61159a565b34801561096357600080fd5b5060095461043e906001600160a01b031681565b34801561098357600080fd5b50601d546104099060ff1681565b34801561099d57600080fd5b506104ab6109ac36600461347a565b61161f565b6104ab6109bf366004613520565b611683565b3480156109d057600080fd5b506104ab6109df3660046131f7565b6116b0565b3480156109f057600080fd5b506104c26109ff366004613255565b611768565b348015610a1057600080fd5b506104ab610a1f3660046132dc565b611833565b348015610a3057600080fd5b5061046b610a3f36600461319d565b611852565b348015610a5057600080fd5b506104c2610a5f3660046131f7565b6001600160a01b03166000908152600c602052604090205490565b6104ab610a883660046135a0565b6118d5565b348015610a9957600080fd5b506104ab611dd3565b348015610aae57600080fd5b506104c2610abd3660046131f7565b6001600160a01b03166000908152600f602052604090205490565b348015610ae457600080fd5b506104c2601e5481565b6104ab611def565b348015610b0257600080fd5b50600b546104c2565b348015610b1757600080fd5b50610409610b26366004613255565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b6057600080fd5b5060095461040990600160a01b900460ff1681565b348015610b8157600080fd5b506104ab610b903660046131f7565b611e4c565b60006301ffc9a760e01b6001600160e01b031983161480610bc657506380ac58cd60e01b6001600160e01b03198316145b80610be15750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060028054610bf690613651565b80601f0160208091040260200160405190810160405280929190818152602001828054610c2290613651565b8015610c6f5780601f10610c4457610100808354040283529160200191610c6f565b820191906000526020600020905b815481529060010190602001808311610c5257829003601f168201915b5050505050905090565b6000610c8482611ec2565b610ca1576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b81610cc781611ee9565b610cd18383611fab565b505050565b6001600160a01b0381166000908152600c6020526040902054610d145760405162461bcd60e51b8152600401610d0b9061368b565b60405180910390fd5b6000610d1f8261153a565b905080600003610d415760405162461bcd60e51b8152600401610d0b906136d1565b80600b6000828254610d539190613732565b90915550506001600160a01b0382166000908152600d60205260409020805482019055610d80828261204b565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b05691015b60405180910390a15050565b826001600160a01b0381163314610de157610de133611ee9565b610dec848484612164565b50505050565b60188054610dff90613651565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2b90613651565b8015610e785780601f10610e4d57610100808354040283529160200191610e78565b820191906000526020600020905b815481529060010190602001808311610e5b57829003601f168201915b505050505081565b610e886122f1565b601d805462ff0000198116620100009182900460ff1615909102179055565b826001600160a01b0381163314610ec157610ec133611ee9565b610dec848484612350565b6001600160a01b0381166000908152600c6020526040902054610f015760405162461bcd60e51b8152600401610d0b9061368b565b6000610f0d8383611768565b905080600003610f2f5760405162461bcd60e51b8152600401610d0b906136d1565b6001600160a01b0383166000908152600f602052604081208054839290610f57908490613732565b90915550506001600160a01b038084166000908152601060209081526040808320938616835292905220805482019055610f9283838361236b565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b610fe56122f1565b601d805461ff001981166101009182900460ff1615909102179055565b61100a6122f1565b80601b600084600381111561102157611021613745565b600381111561103257611032613745565b81526020810191909152604001600020805460ff19169115159190911790555050565b61105d6122f1565b80601a600084600381111561107457611074613745565b600381111561108557611085613745565b81526020810191909152604001600020555050565b6110a26122f1565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6110cc611407565b6001600160a01b0316336001600160a01b0316146110fd57604051635fc483c560e01b815260040160405180910390fd5b600954600160a01b900460ff161561112857604051631551a48f60e11b815260040160405180910390fd5b600980546001600160a81b031916600160a01b1790556040517f51e2d870cc2e10853e38dc06fcdae46ad3c3f588f326608803dac6204541ad1690600090a1565b6000610be1826123bd565b61117c612424565b6111846122f1565b61277c8161119160005490565b61119b9190613732565b11156111b95760405162461bcd60e51b8152600401610d0b9061375b565b6111c3338261247d565b7faa7986cfc8c3cf2c022256104764ae7bed92d0699f0b8570ee203e4477678aff6111ed60005490565b60408051918252602082018490520160405180910390a161120e6001601155565b50565b6112196122f1565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216611264576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6112926122f1565b61129c6000612557565b565b6112a66122f1565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6112d06122f1565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b6000600e82815481106113075761130761377f565b6000918252602090912001546001600160a01b031692915050565b61132a612424565b601d54610100900460ff1661133e57600080fd5b33321461135d5760405162461bcd60e51b8152600401610d0b90613795565b61277c8161136a60005490565b6113749190613732565b11156113925760405162461bcd60e51b8152600401610d0b9061375b565b60145460405163029fc4d960e51b815260016004820152602481018390523360448201526001600160a01b03909116906353f89b2090606401600060405180830381600087803b1580156113e557600080fd5b505af11580156113f9573d6000803e3d6000fd5b505050506111c3338261247d565b600061141b6008546001600160a01b031690565b905090565b611428611407565b6001600160a01b0316336001600160a01b0316148061145157506017546001600160a01b031633145b61145a57600080fd5b61ffff8281166000818152601f6020908152604091829020805461ffff1916948616948517905581519283528201929092527f5caf289c3b6d274f55f49ef6c3d4db24562f85961d661fe8e00d1a120ad41b4b9101610dbb565b606060038054610bf690613651565b816114cd81611ee9565b610cd183836125a9565b6000601c60008460038111156114ef576114ef613745565b600381111561150057611500613745565b81526020019081526020016000206000836001600160a01b03166001600160a01b0316815260200190815260200160002054905092915050565b600080611546600b5490565b6115509047613732565b905061157b8382611576866001600160a01b03166000908152600d602052604090205490565b612615565b9392505050565b61158a6122f1565b601861159682826137fd565b5050565b6115a2612424565b601d5462010000900460ff166115b757600080fd5b61277c6115c360005490565b6115ce906001613732565b11156115ec5760405162461bcd60e51b8152600401610d0b9061375b565b33321461160b5760405162461bcd60e51b8152600401610d0b90613795565b6116158282612653565b6115966001601155565b611627612424565b601d5460ff1661163657600080fd5b60005b8151811015611678576116668282815181106116575761165761377f565b60200260200101516001612868565b80611670816138bd565b915050611639565b5061120e6001601155565b836001600160a01b038116331461169d5761169d33611ee9565b6116a9858585856129a0565b5050505050565b6116b8611407565b6001600160a01b0316336001600160a01b0316146116e957604051635fc483c560e01b815260040160405180910390fd5b600954600160a01b900460ff161561171457604051631551a48f60e11b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527f9f513fe86dc42fdbac355fa4d9b1d5be7b5e6cd2df67e30db8003766568de4769060200160405180910390a150565b6001600160a01b0382166000908152600f602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156117c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117eb91906138d6565b6117f59190613732565b6001600160a01b0380861660009081526010602090815260408083209388168352929052205490915061182b9084908390612615565b949350505050565b61183b6122f1565b806019600084600381111561107457611074613745565b606061185d82611ec2565b61187a57604051630a14c4b560e41b815260040160405180910390fd5b60006118846129e4565b905080516000036118a4576040518060200160405280600081525061157b565b806118ae846129f3565b6040516020016118bf9291906138ef565b6040516020818303038152906040529392505050565b6118dd612424565b6000601960008360038111156118f5576118f5613745565b600381111561190657611906613745565b81526020019081526020016000205490506000601a600084600381111561192f5761192f613745565b600381111561194057611940613745565b8152602001908152602001600020549050601b600084600381111561196757611967613745565b600381111561197857611978613745565b815260208101919091526040016000205460ff166119cf5760405162461bcd60e51b81526020600482015260146024820152734d696e742074797065206e6f742061637469766560601b6044820152606401610d0b565b3332146119ee5760405162461bcd60e51b8152600401610d0b90613795565b61277c856119fb60005490565b611a059190613732565b1115611a235760405162461bcd60e51b8152600401610d0b9061375b565b611b5885601e54611a349190613732565b1115611a795760405162461bcd60e51b8152602060048201526014602482015273105b1b1bdddb1a5cdd081b5a5b9d1959081bdd5d60621b6044820152606401610d0b565b611a83858361391e565b341015611ad25760405162461bcd60e51b815260206004820152601f60248201527f45746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610d0b565b8315611b28576016546001600160a01b03163314611b235760405162461bcd60e51b815260206004820152600e60248201526d43726f73736d696e74206f6e6c7960901b6044820152606401610d0b565b611b73565b336001600160a01b03891614611b735760405162461bcd60e51b815260206004820152601060248201526f2737ba103cb7bab9103b37bab1b432b960811b6044820152606401610d0b565b8085601c6000866003811115611b8b57611b8b613745565b6003811115611b9c57611b9c613745565b815260200190815260200160002060008b6001600160a01b03166001600160a01b0316815260200190815260200160002054611bd89190613732565b1115611c115760405162461bcd60e51b8152602060048201526008602482015267546f6f206d616e7960c01b6044820152606401610d0b565b6000836003811115611c2557611c25613745565b14611cee576040516bffffffffffffffffffffffff1960608a901b16602082015260009060340160408051601f198184030181528282528051602091820120601554601f8c018390048302850183019093528a84529350611cae926001600160a01b039092169184918c908c9081908401838280828437600092019190915250612a3792505050565b611cec5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b2103b37bab1b432b960891b6044820152606401610d0b565b505b84601e6000828254611d009190613732565b90915550859050601c6000856003811115611d1d57611d1d613745565b6003811115611d2e57611d2e613745565b815260200190815260200160002060008a6001600160a01b03166001600160a01b031681526020019081526020016000206000828254611d6e9190613732565b90915550611d7e9050888661247d565b7faa7986cfc8c3cf2c022256104764ae7bed92d0699f0b8570ee203e4477678aff611da860005490565b60408051918252602082018890520160405180910390a15050611dcb6001601155565b505050505050565b611ddb6122f1565b601d805460ff19811660ff90911615179055565b611df76122f1565b604051600090339047908381818185875af1925050503d8060008114611e39576040519150601f19603f3d011682016040523d82523d6000602084013e611e3e565b606091505b505090508061120e57600080fd5b611e546122f1565b6001600160a01b038116611eb95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d0b565b61120e81612557565b6000805482108015610be1575050600090815260046020526040902054600160e01b161590565b6009546001600160a01b03168015801590611f0e57506000816001600160a01b03163b115b1561159657604051633185c44d60e21b81523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa158015611f5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f839190613935565b61159657604051633b79c77360e21b81526001600160a01b0383166004820152602401610d0b565b6000611fb682611169565b9050336001600160a01b03821614611fef57611fd28133610b26565b611fef576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b8047101561209b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d0b565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146120e8576040519150601f19603f3d011682016040523d82523d6000602084013e6120ed565b606091505b5050905080610cd15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d0b565b600061216f826123bd565b9050836001600160a01b0316816001600160a01b0316146121a25760405162a1148160e81b815260040160405180910390fd5b600082815260066020526040902080546121ce8187335b6001600160a01b039081169116811491141790565b6121f9576121dc8633610b26565b6121f957604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661222057604051633a954ecd60e21b815260040160405180910390fd5b801561222b57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036122bd576001840160008181526004602052604081205490036122bb5760005481146122bb5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b0316600080516020613a1b83398151915260405160405180910390a4611dcb565b336122fa611407565b6001600160a01b03161461129c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d0b565b610cd183838360405180602001604052806000815250611683565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610cd1908490612ab6565b60008160005481101561240b5760008181526004602052604081205490600160e01b82169003612409575b8060000361157b5750600019016000818152600460205260409020546123e8565b505b604051636f96cda160e11b815260040160405180910390fd5b6002601154036124765760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d0b565b6002601155565b60008054908290036124a25760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b17831790558284019083908390600080516020613a1b8339815191528180a4600183015b81811461252d5780836000600080516020613a1b833981519152600080a4600101612507565b508160000361254e57604051622e076360e81b815260040160405180910390fd5b60005550505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b0384166000908152600c60205260408120549091839161263f908661391e565b6126499190613952565b61182b9190613974565b6012546040516331a9108f60e11b815261ffff841660048201526001600160a01b0390911690636352211e90602401602060405180830381865afa15801561269f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126c39190613987565b6001600160a01b0316336001600160a01b03161461270f5760405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b6044820152606401610d0b565b61ffff8216600090815260208052604090205460ff16156127635760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b6044820152606401610d0b565b6000805461ffff848116600090815260208052604090819020805460ff191660011790556013549051635209071360e01b815291851660048301523360248301529192506001600160a01b0390911690635209071390604401600060405180830381600087803b1580156127d657600080fd5b505af11580156127ea573d6000803e3d6000fd5b5050505061ffff8181166000908152601f60205260409020805461ffff191691841691909117905561281d33600161247d565b6040805161ffff8381168252858116602083015284168183015290517ff8c89bff827a9904e12125a891cb1896a9ec6b6b72efe44b9a0af070f889c45f9181900360600190a1505050565b6000612873836123bd565b90508060008061289186600090815260066020526040902080549091565b9150915084156128d1576128a68184336121b9565b6128d1576128b48333610b26565b6128d157604051632ce44b5f60e11b815260040160405180910390fd5b80156128dc57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b8516900361296a576001860160008181526004602052604081205490036129685760005481146129685760008181526004602052604090208590555b505b60405186906000906001600160a01b03861690600080516020613a1b833981519152908390a45050600180548101905550505050565b6129ab848484610dc7565b6001600160a01b0383163b15610dec576129c784848484612b88565b610dec576040516368d2bf6b60e11b815260040160405180910390fd5b606060188054610bf690613651565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480612a0d5750819003601f19909101908152919050565b6000612a99612a93846040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b83612c73565b6001600160a01b0316846001600160a01b03161490509392505050565b6000612b0b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612c979092919063ffffffff16565b805190915015610cd15780806020019051810190612b299190613935565b610cd15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d0b565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612bbd9033908990889088906004016139a4565b6020604051808303816000875af1925050508015612bf8575060408051601f3d908101601f19168201909252612bf5918101906139e1565b60015b612c56573d808015612c26576040519150601f19603f3d011682016040523d82523d6000602084013e612c2b565b606091505b508051600003612c4e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6000806000612c828585612ca6565b91509150612c8f81612ceb565b509392505050565b606061182b8484600085612ea1565b6000808251604103612cdc5760208301516040840151606085015160001a612cd087828585612f7c565b94509450505050612ce4565b506000905060025b9250929050565b6000816004811115612cff57612cff613745565b03612d075750565b6001816004811115612d1b57612d1b613745565b03612d685760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610d0b565b6002816004811115612d7c57612d7c613745565b03612dc95760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d0b565b6003816004811115612ddd57612ddd613745565b03612e355760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d0b565b6004816004811115612e4957612e49613745565b0361120e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d0b565b606082471015612f025760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d0b565b600080866001600160a01b03168587604051612f1e91906139fe565b60006040518083038185875af1925050503d8060008114612f5b576040519150601f19603f3d011682016040523d82523d6000602084013e612f60565b606091505b5091509150612f7187838387613069565b979650505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612fb35750600090506003613060565b8460ff16601b14158015612fcb57508460ff16601c14155b15612fdc5750600090506004613060565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613030573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661305957600060019250925050613060565b9150600090505b94509492505050565b606083156130d85782516000036130d1576001600160a01b0385163b6130d15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d0b565b508161182b565b61182b83838151156130ed5781518083602001fd5b8060405162461bcd60e51b8152600401610d0b919061318a565b6001600160e01b03198116811461120e57600080fd5b60006020828403121561312f57600080fd5b813561157b81613107565b60005b8381101561315557818101518382015260200161313d565b50506000910152565b6000815180845261317681602086016020860161313a565b601f01601f19169290920160200192915050565b60208152600061157b602083018461315e565b6000602082840312156131af57600080fd5b5035919050565b6001600160a01b038116811461120e57600080fd5b600080604083850312156131de57600080fd5b82356131e9816131b6565b946020939093013593505050565b60006020828403121561320957600080fd5b813561157b816131b6565b60008060006060848603121561322957600080fd5b8335613234816131b6565b92506020840135613244816131b6565b929592945050506040919091013590565b6000806040838503121561326857600080fd5b8235613273816131b6565b91506020830135613283816131b6565b809150509250929050565b80356004811061329d57600080fd5b919050565b801515811461120e57600080fd5b600080604083850312156132c357600080fd5b6132cc8361328e565b91506020830135613283816132a2565b600080604083850312156132ef57600080fd5b6131e98361328e565b6000806040838503121561330b57600080fd5b6132738361328e565b803561ffff8116811461329d57600080fd5b60006020828403121561333857600080fd5b61157b82613314565b6000806040838503121561335457600080fd5b61335d83613314565b915061336b60208401613314565b90509250929050565b6000806040838503121561338757600080fd5b82356132cc816131b6565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156133d1576133d1613392565b604052919050565b600067ffffffffffffffff8311156133f3576133f3613392565b613406601f8401601f19166020016133a8565b905082815283838301111561341a57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561344357600080fd5b813567ffffffffffffffff81111561345a57600080fd5b8201601f8101841361346b57600080fd5b61182b848235602084016133d9565b6000602080838503121561348d57600080fd5b823567ffffffffffffffff808211156134a557600080fd5b818501915085601f8301126134b957600080fd5b8135818111156134cb576134cb613392565b8060051b91506134dc8483016133a8565b81815291830184019184810190888411156134f657600080fd5b938501935b83851015613514578435825293850193908501906134fb565b98975050505050505050565b6000806000806080858703121561353657600080fd5b8435613541816131b6565b93506020850135613551816131b6565b925060408501359150606085013567ffffffffffffffff81111561357457600080fd5b8501601f8101871361358557600080fd5b613594878235602084016133d9565b91505092959194509250565b60008060008060008060a087890312156135b957600080fd5b86356135c4816131b6565b9550602087013567ffffffffffffffff808211156135e157600080fd5b818901915089601f8301126135f557600080fd5b81358181111561360457600080fd5b8a602082850101111561361657600080fd5b602083019750809650505050604087013592506060870135613637816132a2565b91506136456080880161328e565b90509295509295509295565b600181811c9082168061366557607f821691505b60208210810361368557634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610be157610be161371c565b634e487b7160e01b600052602160045260246000fd5b6020808252600a9082015269135a5b9d1959081bdd5d60b21b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b602080825260089082015267454f41206f6e6c7960c01b604082015260600190565b601f821115610cd157600081815260208120601f850160051c810160208610156137de5750805b601f850160051c820191505b81811015611dcb578281556001016137ea565b815167ffffffffffffffff81111561381757613817613392565b61382b816138258454613651565b846137b7565b602080601f83116001811461386057600084156138485750858301515b600019600386901b1c1916600185901b178555611dcb565b600085815260208120601f198616915b8281101561388f57888601518255948401946001909101908401613870565b50858210156138ad5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000600182016138cf576138cf61371c565b5060010190565b6000602082840312156138e857600080fd5b5051919050565b6000835161390181846020880161313a565b83519083019061391581836020880161313a565b01949350505050565b8082028115828204841417610be157610be161371c565b60006020828403121561394757600080fd5b815161157b816132a2565b60008261396f57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610be157610be161371c565b60006020828403121561399957600080fd5b815161157b816131b6565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906139d79083018461315e565b9695505050505050565b6000602082840312156139f357600080fd5b815161157b81613107565b60008251613a1081846020870161313a565b919091019291505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220dac32bd4bc566052b444de0f9b7072e5e4e506bac5b608bab1271e6bb9f4abd164736f6c63430008110033
Verified Source Code Full Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: Yes (200 runs)
ROTA.sol 3437 lines
// SPDX-License-Identifier: MIT
// Rise of the Apes (ROTA). Written by NiftyLabs (https://niftylabs.dev/).
// .#%&&%
// /&&%% &%/
// #&# .%#
// %%* #%%
// %## .*,&%%.
// #%%. .* .#&%%.
// .%&( ./ . %%%
// *%%, .* . (%%
// %% .* &%
// ,%/ *%%%&, /%%, .%%#(##%%&&&&&&#.
// %%, *%&&%%&%%%%%. ,& */ # &. %( .&/,&
// *&%%%%% #%%%%&%. ,%&%%&&%%& &.% ,.& % % &
// (% ( ,%%%%* /%&%%%% ( % % * %% #*/#
// #% %%%. (%%%%%( & / % & .(#/ *%
// %% #%% ,&&&%&% %.# ,.%,%(# %.,%.
// .%( %%% #%%%%%%&%# &.# ..,%. # % /&
// *% %%%%%%/ /&%%%%%%%%&%%%%% .%..( % ,& #% &#
// *% #%%%%%%%%%%%%%%%%%%&%%%%%%%%%%# .%&( /%%. &%
// /% %%%%#%%%%%%%%%%%%% #%&%%%%%/ .%&%%%* . &&
// %# /%%%%%( %%%%#%%%%%%%%%%%%%%%%%%%%%%%%%(*% &&
// ,%% (%#%%%%%%%%%%%%%%%%%%%%%%%#%%%&%%%%#% /%/ (%#
// *%* (%%%%%%%#%%%%%%%%%%%#%%%%%###%#%%%%%%%.#. /%
// #%* %%%%#%%%%#%%%%%%%%%%%%%%%%%#%%%%#%%%%%%%%%*.%, #%
// (% (%% %%##%%%##%%###%%%%%##%#%%%%%#%%#%%%% #%/ ##.
// #* /%% * #%%%#%%%#%#%%%%%##%%%##%%%,#%%% #% %%
// ##( %% %%%/ #%%# /%%%%.(###% *%%# .%% %% ,%/
// %#(( ##( %% ## %%%( ###* % ,# %(
// ## .%% ( %/ ##
// /%. #%% ## *%
// *%* %#% .* ,, (% #*
// ## #%#. #% ## #% ##
// %# %#%* #%/ ,%# .##* ##
// /#, %%%#%%/ #% ##### #%
// %# ,%#%%%### %%# #%#%%%##% ##
// ,%% (####%%##%###%%( #%
// %# ,(#%(. .##
// ### /#(
// ##/ (#/
// ###/ ./(##*
// ,*/*.
//
// File: operator-filter-registry/src/lib/Constants.sol
pragma solidity ^0.8.17;
address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// File: operator-filter-registry/src/IOperatorFilterRegistry.sol
pragma solidity ^0.8.13;
interface IOperatorFilterRegistry {
/**
* @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
* true if supplied registrant address is not registered.
*/
function isOperatorAllowed(address registrant, address operator) external view returns (bool);
/**
* @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
*/
function register(address registrant) external;
/**
* @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
*/
function registerAndSubscribe(address registrant, address subscription) external;
/**
* @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
* address without subscribing.
*/
function registerAndCopyEntries(address registrant, address registrantToCopy) external;
/**
* @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
* Note that this does not remove any filtered addresses or codeHashes.
* Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
*/
function unregister(address addr) external;
/**
* @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
*/
function updateOperator(address registrant, address operator, bool filtered) external;
/**
* @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
*/
function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
/**
* @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
*/
function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
/**
* @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
*/
function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
/**
* @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
* subscription if present.
* Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
* subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
* used.
*/
function subscribe(address registrant, address registrantToSubscribe) external;
/**
* @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
*/
function unsubscribe(address registrant, bool copyExistingEntries) external;
/**
* @notice Get the subscription address of a given registrant, if any.
*/
function subscriptionOf(address addr) external returns (address registrant);
/**
* @notice Get the set of addresses subscribed to a given registrant.
* Note that order is not guaranteed as updates are made.
*/
function subscribers(address registrant) external returns (address[] memory);
/**
* @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
* Note that order is not guaranteed as updates are made.
*/
function subscriberAt(address registrant, uint256 index) external returns (address);
/**
* @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
*/
function copyEntriesOf(address registrant, address registrantToCopy) external;
/**
* @notice Returns true if operator is filtered by a given address or its subscription.
*/
function isOperatorFiltered(address registrant, address operator) external returns (bool);
/**
* @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
*/
function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
/**
* @notice Returns true if a codeHash is filtered by a given address or its subscription.
*/
function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
/**
* @notice Returns a list of filtered operators for a given address or its subscription.
*/
function filteredOperators(address addr) external returns (address[] memory);
/**
* @notice Returns the set of filtered codeHashes for a given address or its subscription.
* Note that order is not guaranteed as updates are made.
*/
function filteredCodeHashes(address addr) external returns (bytes32[] memory);
/**
* @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
* its subscription.
* Note that order is not guaranteed as updates are made.
*/
function filteredOperatorAt(address registrant, uint256 index) external returns (address);
/**
* @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
* its subscription.
* Note that order is not guaranteed as updates are made.
*/
function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
/**
* @notice Returns true if an address has registered
*/
function isRegistered(address addr) external returns (bool);
/**
* @dev Convenience method to compute the code hash of an arbitrary contract
*/
function codeHashOf(address addr) external returns (bytes32);
}
// File: operator-filter-registry/src/UpdatableOperatorFilterer.sol
pragma solidity ^0.8.13;
/**
* @title UpdatableOperatorFilterer
* @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
* registrant's entries in the OperatorFilterRegistry. This contract allows the Owner to update the
* OperatorFilterRegistry address via updateOperatorFilterRegistryAddress, including to the zero address,
* which will bypass registry checks.
* Note that OpenSea will still disable creator earnings enforcement if filtered operators begin fulfilling orders
* on-chain, eg, if the registry is revoked or bypassed.
* @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 UpdatableOperatorFilterer {
/// @dev Emitted when an operator is not allowed.
error OperatorNotAllowed(address operator);
/// @dev Emitted when someone other than the owner is trying to call an only owner function.
error OnlyOwner();
event OperatorFilterRegistryAddressUpdated(address newRegistry);
IOperatorFilterRegistry public operatorFilterRegistry;
/// @dev The constructor that is called when the contract is being deployed.
constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe) {
IOperatorFilterRegistry registry = IOperatorFilterRegistry(_registry);
operatorFilterRegistry = registry;
// 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(registry).code.length > 0) {
if (subscribe) {
registry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
} else {
if (subscriptionOrRegistrantToCopy != address(0)) {
registry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
} else {
registry.register(address(this));
}
}
}
}
/**
* @dev A helper function to check if the operator is allowed.
*/
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);
}
_;
}
/**
* @dev A helper function to check if the operator approval is allowed.
*/
modifier onlyAllowedOperatorApproval(address operator) virtual {
_checkFilterOperator(operator);
_;
}
/**
* @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero
* address, checks will be bypassed. OnlyOwner.
*/
function updateOperatorFilterRegistryAddress(address newRegistry) public virtual {
if (msg.sender != owner()) {
revert OnlyOwner();
}
operatorFilterRegistry = IOperatorFilterRegistry(newRegistry);
emit OperatorFilterRegistryAddressUpdated(newRegistry);
}
/**
* @dev Assume the contract has an owner, but leave specific Ownable implementation up to inheriting contract.
*/
function owner() public view virtual returns (address);
/**
* @dev A helper function to check if the operator is allowed.
*/
function _checkFilterOperator(address operator) internal view virtual {
IOperatorFilterRegistry registry = operatorFilterRegistry;
// Check registry code length to facilitate testing in environments without a deployed registry.
if (address(registry) != address(0) && address(registry).code.length > 0) {
// under normal circumstances, this function will revert rather than return false, but inheriting contracts
// may specify their own OperatorFilterRegistry implementations, which may behave differently
if (!registry.isOperatorAllowed(address(this), operator)) {
revert OperatorNotAllowed(operator);
}
}
}
}
// File: operator-filter-registry/src/RevokableOperatorFilterer.sol
pragma solidity ^0.8.13;
/**
* @title RevokableOperatorFilterer
* @notice This contract is meant to allow contracts to permanently skip OperatorFilterRegistry checks if desired. The
* Registry itself has an "unregister" function, but if the contract is ownable, the owner can re-register at
* any point. As implemented, this abstract contract allows the contract owner to permanently skip the
* OperatorFilterRegistry checks by calling revokeOperatorFilterRegistry. Once done, the registry
* address cannot be further updated.
* Note that OpenSea will still disable creator earnings enforcement if filtered operators begin fulfilling orders
* on-chain, eg, if the registry is revoked or bypassed.
*/
abstract contract RevokableOperatorFilterer is UpdatableOperatorFilterer {
/// @dev Emitted when the registry has already been revoked.
error RegistryHasBeenRevoked();
/// @dev Emitted when the initial registry address is attempted to be set to the zero address.
error InitialRegistryAddressCannotBeZeroAddress();
event OperatorFilterRegistryRevoked();
bool public isOperatorFilterRegistryRevoked;
/// @dev The constructor that is called when the contract is being deployed.
constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe)
UpdatableOperatorFilterer(_registry, subscriptionOrRegistrantToCopy, subscribe)
{
// don't allow creating a contract with a permanently revoked registry
if (_registry == address(0)) {
revert InitialRegistryAddressCannotBeZeroAddress();
}
}
/**
* @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero
* address, checks will be permanently bypassed, and the address cannot be updated again. OnlyOwner.
*/
function updateOperatorFilterRegistryAddress(address newRegistry) public override {
if (msg.sender != owner()) {
revert OnlyOwner();
}
// if registry has been revoked, do not allow further updates
if (isOperatorFilterRegistryRevoked) {
revert RegistryHasBeenRevoked();
}
operatorFilterRegistry = IOperatorFilterRegistry(newRegistry);
emit OperatorFilterRegistryAddressUpdated(newRegistry);
}
/**
* @notice Revoke the OperatorFilterRegistry address, permanently bypassing checks. OnlyOwner.
*/
function revokeOperatorFilterRegistry() public {
if (msg.sender != owner()) {
revert OnlyOwner();
}
// if registry has been revoked, do not allow further updates
if (isOperatorFilterRegistryRevoked) {
revert RegistryHasBeenRevoked();
}
// set to zero address to bypass checks
operatorFilterRegistry = IOperatorFilterRegistry(address(0));
isOperatorFilterRegistryRevoked = true;
emit OperatorFilterRegistryRevoked();
}
}
// File: operator-filter-registry/src/RevokableDefaultOperatorFilterer.sol
pragma solidity ^0.8.13;
/**
* @title RevokableDefaultOperatorFilterer
* @notice Inherits from RevokableOperatorFilterer and automatically subscribes to the default OpenSea subscription.
* Note that OpenSea will disable creator earnings enforcement if filtered operators begin fulfilling orders
* on-chain, eg, if the registry is revoked or bypassed.
*/
abstract contract RevokableDefaultOperatorFilterer is RevokableOperatorFilterer {
/// @dev The constructor that is called when the contract is being deployed.
constructor()
RevokableOperatorFilterer(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS, CANONICAL_CORI_SUBSCRIPTION, true)
{}
}
// File: @openzeppelin/contracts/utils/Address.sol
// 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/token/ERC20/extensions/draft-IERC20Permit.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
// File: @openzeppelin/contracts/security/ReentrancyGuard.sol
// 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: erc721a/contracts/IERC721A.sol
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* Cannot query the balance for the zero address.
*/
error BalanceQueryForZeroAddress();
/**
* Cannot mint to the zero address.
*/
error MintToZeroAddress();
/**
* The quantity of tokens minted must be more than zero.
*/
error MintZeroQuantity();
/**
* The token does not exist.
*/
error OwnerQueryForNonexistentToken();
/**
* The caller must own the token or be an approved operator.
*/
error TransferCallerNotOwnerNorApproved();
/**
* The token must be owned by `from`.
*/
error TransferFromIncorrectOwner();
/**
* Cannot safely transfer to a contract that does not implement the
* ERC721Receiver interface.
*/
error TransferToNonERC721ReceiverImplementer();
/**
* Cannot transfer to the zero address.
*/
error TransferToZeroAddress();
/**
* The token does not exist.
*/
error URIQueryForNonexistentToken();
/**
* The `quantity` minted with ERC2309 exceeds the safety limit.
*/
error MintERC2309QuantityExceedsLimit();
/**
* The `extraData` cannot be set on an unintialized ownership slot.
*/
error OwnershipNotInitializedForExtraData();
// =============================================================
// STRUCTS
// =============================================================
struct TokenOwnership {
// The address of the owner.
address addr;
// Stores the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
// Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
uint24 extraData;
}
// =============================================================
// TOKEN COUNTERS
// =============================================================
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() external view returns (uint256);
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
// =============================================================
// IERC721
// =============================================================
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables
* (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`,
* checking first that contract recipients are aware of the ERC721 protocol
* to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move
* this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external payable;
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external payable;
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom}
* whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token
* by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external payable;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the
* zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external payable;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom}
* for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
// =============================================================
// IERC2309
// =============================================================
/**
* @dev Emitted when tokens in `fromTokenId` to `toTokenId`
* (inclusive) is transferred from `from` to `to`, as defined in the
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
*
* See {_mintERC2309} for more details.
*/
event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}
// File: erc721a/contracts/ERC721A.sol
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @title ERC721A
*
* @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
* Non-Fungible Token Standard, including the Metadata extension.
* Optimized for lower gas during batch mints.
*
* Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
* starting from `_startTokenId()`.
*
* Assumptions:
*
* - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
* - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
struct TokenApprovalRef {
address value;
}
// =============================================================
// CONSTANTS
// =============================================================
// Mask of an entry in packed address data.
uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
// The bit position of `numberMinted` in packed address data.
uint256 private constant _BITPOS_NUMBER_MINTED = 64;
// The bit position of `numberBurned` in packed address data.
uint256 private constant _BITPOS_NUMBER_BURNED = 128;
// The bit position of `aux` in packed address data.
uint256 private constant _BITPOS_AUX = 192;
// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
// The bit position of `startTimestamp` in packed ownership.
uint256 private constant _BITPOS_START_TIMESTAMP = 160;
// The bit mask of the `burned` bit in packed ownership.
uint256 private constant _BITMASK_BURNED = 1 << 224;
// The bit position of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;
// The bit mask of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;
// The bit position of `extraData` in packed ownership.
uint256 private constant _BITPOS_EXTRA_DATA = 232;
// Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
// The mask of the lower 160 bits for addresses.
uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
// The maximum `quantity` that can be minted with {_mintERC2309}.
// This limit is to prevent overflows on the address data entries.
// For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
// is required to cause an overflow, which is unrealistic.
uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
// The `Transfer` event signature is given by:
// `keccak256(bytes("Transfer(address,address,uint256)"))`.
bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 private _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See {_packedOwnershipOf} implementation for details.
//
// Bits Layout:
// - [0..159] `addr`
// - [160..223] `startTimestamp`
// - [224] `burned`
// - [225] `nextInitialized`
// - [232..255] `extraData`
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// =============================================================
// CONSTRUCTOR
// =============================================================
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
// =============================================================
// TOKEN COUNTING OPERATIONS
// =============================================================
/**
* @dev Returns the starting token ID.
* To change the starting token ID, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Returns the next token ID to be minted.
*/
function _nextTokenId() internal view virtual returns (uint256) {
return _cur...
// [truncated — 132845 bytes total]
Read Contract
_metadata 0x39371b25 → string
balanceOf 0x70a08231 → uint256
futureUtilityContract 0x023fcce1 → address
genesisMinted 0x97a08fab → bool
getAmountMintedPerType 0xa28cd752 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isBurnActive 0xb1a6676e → bool
isMutationsActive 0x5771026f → bool
isOperatorFilterRegistryRevoked 0xecba222a → bool
isReservedActive 0x59486630 → bool
name 0x06fdde03 → string
nonMutatedMinted 0xda034adb → uint256
operatorFilterRegistry 0xb0ccc31e → address
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
payee 0x8b83209b → address
releasable 0xa3f8eace → uint256
releasable 0xc45ac050 → uint256
released 0x406072a9 → uint256
released 0x9852595c → uint256
shares 0xce7c2ac2 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenToType 0x90940115 → uint16
tokenURI 0xc87b56dd → string
totalReleased 0xd79779b2 → uint256
totalReleased 0xe33b7de3 → uint256
totalShares 0x3a98ef39 → uint256
totalSupply 0x18160ddd → uint256
typeToWalletMinted 0x77cee13b → uint256
Write Contract 29 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address operator
uint256 tokenId
burn 0xb80f55c9
uint256[] tokenIds
emergencyWithdraw 0xdb2e21bc
No parameters
genesisMint 0xacc160ba
uint16 genesisId
uint16 lookingGlassId
mint 0xd1e31fbb
address wallet
bytes voucher
uint256 amount
bool isCrossmint
uint8 mintType
mintAdmin 0x677ab70b
uint256 amount
release 0x19165587
address account
release 0x48b75044
address token
address account
renounceOwnership 0x715018a6
No parameters
reservedMint 0x8c74bf0e
uint256 amount
revokeOperatorFilterRegistry 0x5ef9432a
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
setBurnActive 0xd20f2b48
No parameters
setGenesisContract 0x71faf935
address _contract
setLookingGlassContract 0x5e8d3728
address _contract
setMetadata 0xa49a1e7d
string metadata
setMintActive 0x5314da4e
uint8 mintType
bool state
setMintCost 0xc4be7153
uint8 mintType
uint256 newCost
setMintMax 0x5398fb80
uint8 mintType
uint256 newMax
setMintPassContract 0x735d2a27
address _contract
setMutationsActive 0x40cee701
No parameters
setReservedActive 0x4fd2b02a
No parameters
setSigner 0x6c19e783
address _signer
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
updateOperatorFilterRegistryAddress 0xb8d1e532
address newRegistry
updateTokenType 0x9481d354
uint16 tokenId
uint16 newValue
Recent Transactions
No transactions found for this address